Skip to content

conditional deactivation of consensus timeout overrides in config#3601

Merged
pompon0 merged 4 commits into
mainfrom
gprusak-gate
Jun 22, 2026
Merged

conditional deactivation of consensus timeout overrides in config#3601
pompon0 merged 4 commits into
mainfrom
gprusak-gate

Conversation

@pompon0

@pompon0 pompon0 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

In 6.6 release we want to disable the overrides support.
Overrides can only be disabled AFTER onchain params are updated via government proposal.
Govenment proposal needs to wait for changes deployed in 6.6.
Disabling overrides needs to be synchronized across the network.
We need ability to reenable overrides for disaster recovery (chain halt).

To achieve that we:

  • add a unsafeOverridesEnabled flag
  • unsafeOverridesEnabled defaults to true BEFORE the government proposal goes through, and to false AFTERWARDS

@cursor

cursor Bot commented Jun 16, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes how every node computes propose/vote/commit timeouts and commit bypass, which directly affects consensus liveness and must stay synchronized with on-chain param migration and operator config.

Overview
Adds unsafe-overrides-enabled on consensus config and centralizes effective timeout selection in ConsensusConfig.ResolveTimeouts, so operators can stop applying local Unsafe*TimeoutOverride values once on-chain params are fixed while still re-enabling overrides for recovery.

When overrides are disabled, config overrides are ignored unless on-chain timeouts still match the hard-coded badParams snapshot (legacy pacific-1 values); in that case override behavior is preserved until a gov proposal updates chain params. BypassCommitTimeout remains a special case: only a non-nil pointer override replaces the resolved value.

Consensus proposeTimeout, voteTimeout, commitTime, and bypassCommitTimeout now call ResolveTimeouts instead of duplicating override logic. TimeoutParams.TimeoutParamsOrDefaults is replaced by TimeoutParams.Or, which also merges BypassCommitTimeout via cmp.Or. RPC consensus-params loading uses the same Or helper for defaults.

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

@github-actions

github-actions Bot commented Jun 16, 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 22, 2026, 2:09 PM

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.18%. Comparing base (4cf4ede) to head (ab5f001).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3601      +/-   ##
==========================================
- Coverage   58.96%   58.18%   -0.78%     
==========================================
  Files        2208     2134      -74     
  Lines      181757   173832    -7925     
==========================================
- Hits       107164   101152    -6012     
+ Misses      64976    63713    -1263     
+ Partials     9617     8967     -650     
Flag Coverage Δ
sei-chain-pr 73.69% <100.00%> (?)
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 Δ
sei-tendermint/config/config.go 74.27% <100.00%> (+0.76%) ⬆️
sei-tendermint/internal/consensus/state.go 76.28% <100.00%> (+3.37%) ⬆️
sei-tendermint/internal/rpc/core/consensus.go 38.94% <100.00%> (ø)
sei-tendermint/types/params.go 80.06% <100.00%> (+1.03%) ⬆️

... and 76 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.

Vote: 50 * time.Millisecond,
VoteDelta: 500 * time.Millisecond,
Commit: 50 * time.Millisecond,
BypassCommitTimeout: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this the same as DefaultTimeoutParams?

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.

huh, indeed. Perhaps timeouts are currently not set at all.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hm..

t = t.Or(types.DefaultTimeoutParams())
// Overrides are effective iff UnsafeOverridesEnabled OR t == badParams:
// see doc on badParams.
if !c.UnsafeOverridesEnabled && t != badParams {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Our gov proposal will always override all params at the same time right? It would be a headache if proposal updates some args while override updates some.

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.

proposal updates everything atomically, yes. It wouldn't make sense otherwise.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

correct, all happens within a block

@pompon0 pompon0 requested a review from wen-coding June 17, 2026 11:35
Comment thread sei-tendermint/config/config.go Outdated
Comment thread sei-tendermint/config/config.go Outdated
Vote: 50 * time.Millisecond,
VoteDelta: 500 * time.Millisecond,
Commit: 50 * time.Millisecond,
BypassCommitTimeout: false,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hm..

@pompon0 pompon0 enabled auto-merge June 22, 2026 14:07
@pompon0 pompon0 added this pull request to the merge queue Jun 22, 2026
Merged via the queue into main with commit 75257f8 Jun 22, 2026
91 of 94 checks passed
@pompon0 pompon0 deleted the gprusak-gate branch June 22, 2026 15:00
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