fix(cosmos): Migrate bundle chunking params on upgrade#12621
Merged
mergify[bot] merged 2 commits intomasterfrom Apr 21, 2026
Merged
fix(cosmos): Migrate bundle chunking params on upgrade#12621mergify[bot] merged 2 commits intomasterfrom
mergify[bot] merged 2 commits intomasterfrom
Conversation
5d1ecd4 to
70fa4bc
Compare
Co-authored-by: Codex <codex@openai.com>
70fa4bc to
76254e2
Compare
michaelfig
approved these changes
Apr 21, 2026
Member
michaelfig
left a comment
There was a problem hiding this comment.
LGTM! You and the agents did a good job. :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Chunked artifact bundle uploads fail on chains that upgraded to bundle-chunking
without a migration: the
InstallationDeadlineSecondsandInstallationDeadlineBlocksparams were defined in the protobuf but neverregistered in
ParamSetPairs, so they persisted as0(Go zero value). Adeadline of
0means "expire immediately", causingPruneExpiredBundleInstallsto remove every pending upload before the first chunk can land.
ParamSetPairsso the legacy param storeround-trips them correctly and they become governable.
Migrate2to3(consensus version 2 → 3) that callsMigrateParams,which treats
0as "unset" and replaces it with the default (24 h / unlimitedblocks). This fixes existing chains (e.g. devnet) that already have
0stored.ValidateBasic— values below-1arerejected.
ChunkedArtifactStatusgRPC query — errormessages now include the artifact ID and distinguish "expired/finalized" from
"state inconsistency".
Security Considerations
No new authorities or trust boundaries are introduced. The migration only
replaces a zero (immediate-expiry) deadline with the intended default (24 h),
restoring the designed behavior.
Scaling Considerations
No change to resource consumption. The migration touches only the param store
(a single key-value write per param).
Documentation Considerations
Operators upgrading from consensus version 2 to 3 will automatically get the
deadline params populated. No manual steps required. Existing deployments that
already have non-zero values are unaffected.
Testing Considerations
TestValidateInstallationDeadlineBoundscovers boundary validation.x/swingsetGo tests continue to pass.Upgrade Considerations
The module's
ConsensusVersionis bumped from 2 to 3. TheMigrate2to3migration is registered and will run automatically during the upgrade handler.
To verify on a target chain: query
swingset paramsand confirminstallation_deadline_secondsis86400andinstallation_deadline_blocksis-1(unless governance has set different values).