diff --git a/CHANGELOG.md b/CHANGELOG.md index 303c5366189..040a2d895b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +### Bug Fixes + +* [#10725](https://github.com/cosmos/cosmos-sdk/pull/10725) populate `ctx.ConsensusParams` for begin/end blockers. + ## [v0.42.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.11) - 2021-12-07 ### Improvements diff --git a/baseapp/abci.go b/baseapp/abci.go index 46e258f4811..6ec5b800b76 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -177,7 +177,8 @@ func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeg app.deliverState.ctx = app.deliverState.ctx. WithBlockGasMeter(gasMeter). - WithHeaderHash(req.Hash) + WithHeaderHash(req.Hash). + WithConsensusParams(app.GetConsensusParams(app.deliverState.ctx)) // we also set block gas meter to checkState in case the application needs to // verify gas consumption during (Re)CheckTx