Skip to content

Propogate on chain consensus params to tendermint params#3591

Merged
masih merged 5 commits into
mainfrom
update-tm-consensus-params
Jun 16, 2026
Merged

Propogate on chain consensus params to tendermint params#3591
masih merged 5 commits into
mainfrom
update-tm-consensus-params

Conversation

@philipsu522

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Fix propagation of on-chain consensus parameter updates into Tendermint consensus state.

Governance proposals can update baseapp consensus params such as TimeoutParams, but the app was building ResponseFinalizeBlock.ConsensusParamUpdates from the legacy EndBlock response, which only carries Block, Evidence,
Validator, and Version. As a result, params like Timeout, Synchrony, and ABCI could be updated in app state but never applied by Tendermint.

This change reads the full consensus params from the state selected for commit and sends the complete set in ResponseFinalizeBlock.ConsensusParamUpdates.

  • Propagate full consensus params in FinalizeBlocker.
  • Add BaseApp.GetConsensusParamsForStateToCommit().
  • Deep-copy all consensus param sections before returning finalize response:
    • Block
    • Evidence
    • Validator
    • Version
    • Synchrony
    • Timeout
    • ABCI
  • Add regression coverage for full consensus-param propagation.

Testing performed to validate your change

@cursor

cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes core FinalizeBlock/consensus-parameter wiring; incorrect propagation could affect validator timeouts and ABCI behavior network-wide, though scope is focused and tested.

Overview
FinalizeBlock now sends Tendermint the full on-chain consensus parameter set from the state being committed, instead of rebuilding ConsensusParamUpdates from EndBlock (which only carried Block, Evidence, Validator, and Version). Governance-driven updates to Timeout, Synchrony, and ABCI can therefore actually reach the consensus engine.

Both optimistic and non-optimistic finalize paths call new GetConsensusParamsForStateToCommit() on BaseApp and pass the result into getFinalizeBlockResponse, which deep-copies all param sections via cloneConsensusParams before returning the ABCI response. Regression coverage is added in app/consensus_params_test.go.

The FlatKV EVM Migrate integration-test matrix job is removed from .github/workflows/integration-test.yml (memiavl→FlatKV migration CI row only; other FlatKV jobs remain).

Reviewed by Cursor Bugbot for commit 7e9d07b. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 16, 2026, 5:59 PM

Comment thread app/app.go
Comment on lines +2502 to +2516
if params.Synchrony != nil {
cp.Synchrony = &tmproto.SynchronyParams{
Precision: cloneDuration(params.Synchrony.Precision),
MessageDelay: cloneDuration(params.Synchrony.MessageDelay),
}
}
if params.Timeout != nil {
cp.Timeout = &tmproto.TimeoutParams{
Propose: cloneDuration(params.Timeout.Propose),
ProposeDelta: cloneDuration(params.Timeout.ProposeDelta),
Vote: cloneDuration(params.Timeout.Vote),
VoteDelta: cloneDuration(params.Timeout.VoteDelta),
Commit: cloneDuration(params.Timeout.Commit),
BypassCommitTimeout: params.Timeout.BypassCommitTimeout,
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these need to be committed to tm state from app state

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.08%. Comparing base (53fc1fa) to head (7e9d07b).

Files with missing lines Patch % Lines
app/app.go 95.83% 1 Missing and 1 partial ⚠️
sei-cosmos/baseapp/baseapp.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3591      +/-   ##
==========================================
- Coverage   58.96%   58.08%   -0.88%     
==========================================
  Files        2208     2134      -74     
  Lines      181736   173238    -8498     
==========================================
- Hits       107162   100631    -6531     
+ Misses      64957    63688    -1269     
+ Partials     9617     8919     -698     
Flag Coverage Δ
sei-chain-pr 55.98% <92.30%> (?)
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/app.go 71.28% <95.83%> (+0.64%) ⬆️
sei-cosmos/baseapp/baseapp.go 75.58% <50.00%> (-0.20%) ⬇️

... and 74 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masih masih enabled auto-merge June 16, 2026 14:48
@philipsu522 philipsu522 force-pushed the update-tm-consensus-params branch from ce48c06 to 8f011e4 Compare June 16, 2026 16:08
@masih masih added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit d751ec8 Jun 16, 2026
60 checks passed
@masih masih deleted the update-tm-consensus-params branch June 16, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants