Skip to content

add CI safe max validator genesis transition test#699

Merged
tcoratger merged 1 commit intoleanEthereum:mainfrom
shrirajpawar4:fix/genesis-with-max-validators
May 5, 2026
Merged

add CI safe max validator genesis transition test#699
tcoratger merged 1 commit intoleanEthereum:mainfrom
shrirajpawar4:fix/genesis-with-max-validators

Conversation

@shrirajpawar4
Copy link
Copy Markdown
Contributor

🗒️ Description

Adds focused coverage for the max validator registry state-transition path from #580.

This test builds a genesis state directly with VALIDATOR_REGISTRY_LIMIT placeholder validators using zero pubkeys, instead of calling generate_pre_state(num_validators=4096). That avoids
generating 4096 XMSS keys or adding key fixtures.

It then processes a normal slot-1 block and uses one forced_attestations entry with validators 0..2730 to exercise the 2731-of-4096 justification tally in the STF. This is intentionally registry-
limit/state-transition coverage, not signature-generation coverage.

🔗 Related Issues or PRs

Closes #580

Related: #641

✅ Checklist

  • Ran tox checks to avoid unnecessary CI fails:
    uvx tox
    
  • Considered adding appropriate tests for the changes.
  • Considered updating the online docs in the //leanEthereum/leanSpec/tree/main/docs/ directory.

Local verification

 uv run ruff check tests/consensus/devnet/state_transition/test_genesis.py

  uv run fill --fork=Lstar --output /tmp/leanSpec-issue580-fixtures --clean -k test_genesis_maximum_validators_with_forced_threshold_attestation

  The targeted fixture passed locally:

  1 passed, 553 deselected in 0.49s

@shrirajpawar4
Copy link
Copy Markdown
Contributor Author

@tcoratger can you take a look please

Adds a state-transition fixture that fills the registry to capacity
(4096 placeholder validators), then justifies block 1 with an attestation
from the 2731/4096 supermajority threshold. The placeholder validators
carry zero pubkeys to skip XMSS key generation; signatures are appended
via forced_attestations to bypass the builder's signing path. The state
transition still tallies the votes and applies the same supermajority
rule as the production path.

Closes leanEthereum#580

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tcoratger tcoratger force-pushed the fix/genesis-with-max-validators branch from 2174aec to 24528cc Compare May 5, 2026 15:28
@tcoratger tcoratger merged commit 34cc920 into leanEthereum:main May 5, 2026
13 checks passed
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.

test(st): genesis with maximum validators (VALIDATOR_REGISTRY_LIMIT)

2 participants