Skip to content

fix(L1): require a minimum protocol version to schedule an activation - #435

Merged
jackchuma merged 2 commits into
mainfrom
fix/protocol-versions-schedule-requires-minimum-version
Sep 11, 2026
Merged

fix(L1): require a minimum protocol version to schedule an activation#435
jackchuma merged 2 commits into
mainfrom
fix/protocol-versions-schedule-requires-minimum-version

Conversation

@jackchuma

@jackchuma jackchuma commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What changed? Why?

  • Require ProtocolVersions.initialize to receive a non-zero initial minimum protocol version, including when the imported upgrade schedule is empty or contains only unscheduled entries. This ensures a newly initialized registry always supplies the protocol-version floor that nodes need to validate it.
  • Reject an omitted or zero protocolVersionsInitialMinimumVersion while reading deployment configuration, and set the local configuration to packed version 1.0.0.
  • Apply the same validation in system deployment utilities, update the multiproof configuration documentation, adjust tests, and refresh the ProtocolVersions semver lock hashes.

Notes to reviewers

  • This replaces the former conditional rule that required a minimum version only when the initial schedule included an activation; zero is now invalid for every new initialization.
  • Existing schedules and future activation notice validation are unchanged. The new requirement only applies when initializing a registry or building deployment input.
  • The local config value 0x1000000000000000000000000 is packed semver 1.0.0 (major << 96).

ProtocolVersions.initialize rejects an imported non-zero timestamp paired with a
zero minimum protocol version, but the pairing was only enforced at that
boundary. registerUpgrade and setTimestamp could still schedule an activation
against a registry whose minimum version was zero, which initialize explicitly
permits for an empty or zero-only schedule.

Nodes attach the contract's global minimum to every timestamp they read, so any
positive activation at version zero makes the whole schedule unreadable: strict
modes abort startup and the runtime refresher declines to apply it.

Enforce the pairing on every write path via a shared assertion. registerUpgrade
counts a version supplied in the same call, so a first activation stays a single
transaction. setTimestamp cannot supply one, so a registry at zero must call
setMinimumProtocolVersion first; that ordering is what removes the window in
which a live schedule would be unreadable. delayTimestamp is deliberately exempt:
it requires an already-scheduled activation so it cannot introduce the pairing,
and guarding it would strand the incident responder on a registry upgraded into
this implementation while already holding a zero version.

Also ship a non-zero protocolVersionsInitialMinimumVersion in the deploy config.
The field is read with a zero default, so the standard deployment previously
produced a registry at zero and its first hardfork would have hit the new guard.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cb-heimdall

cb-heimdall commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Co-authored-by: Codex <codex-noreply@coinbase.com>

@refcell refcell left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks fine to me ✅

@jackchuma
jackchuma merged commit 30e4390 into main Sep 11, 2026
6 checks passed
@jackchuma
jackchuma deleted the fix/protocol-versions-schedule-requires-minimum-version branch September 11, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants