Conversation
Lesnak1
requested review from
ZhiyuCircle,
ancazamfir,
romac and
sergio-mena
as code owners
September 14, 2026 10:46
…n Denylist schema Align Denylist genesis schema with runtime contract invariants from Denylist.sol: 1. Validate that owner is not the zero address (reverts on-chain in initialize). 2. Validate that denylisters do not contain the zero address (reverts on-chain in addDenylister). 3. Validate that denylisters are unique (case-insensitive) to prevent duplicate storage key collisions during genesis allocation building. 4. Add unit test suite in tests/unit/denylist-genesis.test.ts covering all validation cases.
Lesnak1
force-pushed
the
fix/genesis-denylist-validation
branch
from
September 16, 2026 09:57
b195c2c to
baf964f
Compare
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
Follow-up to genesis/runtime invariant alignments (similar to #359 for ProtocolConfig and #346 for ValidatorManager):
Denylist.initialize(initialOwner)inDenylist.solexplicitly reverts withZeroAddress()when givenaddress(0). The genesis schema previously acceptedaddress(0), writing an un-ownable proxy contract state.Denylist.addDenylister(account)inDenylist.solexplicitly reverts withZeroAddress(). The genesis schema previously allowedaddress(0)to be configured and initialized as a denylister in genesis storage.slotForAddressMap(DENYLIST_STORAGE_LOCATION + 1n, addr). Duplicate entries (or case-variant hex duplicates) previously resulted in duplicate storage keys, throwing an unhandledDuplicate storage keyruntime error inbuildAccountAllocinstead of failing graceful schema validation. Matches the uniqueness validation in sibling modulesValidatorManager.tsandNativeFiatToken.ts.Test plan
tests/unit/denylist-genesis.test.tscovering zero-address owner, zero-address denylisters, duplicate denylisters, mixed-casing hex duplicates, and proxy admin separation.31 passingacross all unit tests intests/unit/.