docs(L1): correct ProtocolVersions owner references and document uncapped iteration - #388
Merged
Merged
Conversation
The NatSpec described the contract as Security Council-controlled, but access control is enforced via _assertOnlyProxyAdminOwner, so the controlling party is the ProxyAdmin owner. Name that role consistently on the contract and on each owner-gated function.
Every loop in ProtocolVersions iterates _timestamps, so each one reads as unbounded iteration. Document the bound once at the array declaration rather than per loop: the array only grows via owner-gated registerUpgrade, one entry per hardfork.
Collaborator
✅ Heimdall Review Status
|
jackchuma
approved these changes
Jul 29, 2026
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.
Summary
Comment-only changes to
ProtocolVersions. No behavior change —initCodeHashisunchanged; only
sourceCodeHashmoves.Owner references. The NatSpec described the contract as Security Council-controlled,
but access control is enforced via
_assertOnlyProxyAdminOwner, so the controlling partyis the ProxyAdmin owner — in production the 2-of-2 multisig. The contract-level
@noticenow names that role, and the three owner-gated functions (
registerUpgrade,setMinimumProtocolVersion,setIncidentResponder) readProxyAdmin owner onlyinsteadof a bare
Owner only.Uncapped iteration. All five loops in this contract iterate
_timestamps, so each onereads as unbounded. Rather than repeat the rationale per loop, it is documented once at the
array declaration: the array only grows via owner-gated
registerUpgrade, one entry perhardfork, so the unbounded iteration poses no gas exhaustion risk.
Test plan
forge test— full suite passesforge fmt --checkclean on the changed filejust semver-lock— refreshedProtocolVersionssourceCodeHash;initCodeHashidentical, confirming the change is comment-only