[Bug or Feature]: the changes made in precommiter and abci listeners are ignored #22246
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
Current cosmos sdk is writing the changes infinalizeBlockState
right after internalFinalize
finished by calling app.workingHash()
.
Lines 925 to 928 in 65ed5eb
Lines 1013 to 1017 in 65ed5eb
but abci listeners
and precommiter
are called with this already written finalizeBlockState
Lines 897 to 901 in 65ed5eb
Lines 979 to 987 in 65ed5eb
Lines 962 to 964 in 65ed5eb
and the finalizeBlockState
is trashed in commit
Line 996 in 65ed5eb
so all changes made in the abci listeners
and precommiter
are trashed.
Not sure this is intended or not?
If this is intended, it should be good to make a new interface to pass finalize request and response for custom logics similar with ListenFinalizeBlock
but can write some state changes. Need this interface in v0.50!!
Cosmos SDK Version
v0.50, latest
How to reproduce?
update state in abci listeners or precommiter
Metadata
Assignees
Type
Projects
Status
📋 Backlog
Activity