You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While we upgrading ICS to v0.50.1 we noticed that our ABCIListener hooks were not getting any FinalizeBlock updates even though ListenFinalizeBlock was implemented. ListenCommit is working correctly.
Upon further inspection, we found that the issue lies in baseapp/abci.go.
The issue likely arose when Begin/EndBlock operations got superseded by FinalizeBlock.
Previosly, in v0.47.x we can see that BeginBlock and EndBlock calls would pass the abci req/res to registered ABCI listeners.
// BeginBlock implements the ABCI application interface.func (app*BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock) {
// ...// call the hooks with the BeginBlock messagesfor_, streamingListener:=rangeapp.abciListeners {
iferr:=streamingListener.ListenBeginBlock(app.deliverState.ctx, req, res); err!=nil {
panic(fmt.Errorf("BeginBlock listening hook failed, height: %d, err: %w", req.Header.Height, err))
}
}
returnres
}
// EndBlock implements the ABCI interface.func (app*BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBlock) {
// ...// call the streaming service hooks with the EndBlock messagesfor_, streamingListener:=rangeapp.abciListeners {
iferr:=streamingListener.ListenEndBlock(app.deliverState.ctx, req, res); err!=nil {
panic(fmt.Errorf("EndBlock listening hook failed, height: %d, err: %w", req.Height, err))
}
}
returnres
}
Is there an existing issue for this?
What happened?
While we upgrading ICS to
v0.50.1
we noticed that ourABCIListener
hooks were not getting anyFinalizeBlock
updates even thoughListenFinalizeBlock
was implemented.ListenCommit
is working correctly.Upon further inspection, we found that the issue lies in
baseapp/abci.go
.The issue likely arose when
Begin/EndBlock
operations got superseded byFinalizeBlock
.Previosly, in v0.47.x we can see that BeginBlock and EndBlock calls would pass the abci req/res to registered ABCI listeners.
In FinalizeBlock this does not happen.
Credits for finding the issue: @tbruyelle
Cosmos SDK Version
0.50.1
How to reproduce?
Register an ABCIListener and check if
ListenFinalizeBlock
is ever executed.ListenCommit
works without issues.The text was updated successfully, but these errors were encountered: