File tree Expand file tree Collapse file tree
src/lean_spec/subspecs/containers/state Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""State-specific SSZ types for the Lean Ethereum consensus specification."""
22
3+ from lean_spec .subspecs .chain .config import DEVNET_CONFIG
34from lean_spec .types import Bytes32 , SSZList
45from lean_spec .types .bitfields import BaseBitlist
56
6- # Maximum number of historical roots to keep
7- HISTORICAL_ROOTS_LIMIT = 262144
8-
97
108class HistoricalBlockHashes (SSZList ):
119 """List of historical block root hashes up to historical_roots_limit."""
1210
1311 ELEMENT_TYPE = Bytes32
14- LIMIT = HISTORICAL_ROOTS_LIMIT
12+ LIMIT = DEVNET_CONFIG . historical_roots_limit . as_int ()
1513
1614
1715class JustificationRoots (SSZList ):
1816 """List of justified block roots up to historical_roots_limit."""
1917
2018 ELEMENT_TYPE = Bytes32
21- LIMIT = HISTORICAL_ROOTS_LIMIT
19+ LIMIT = DEVNET_CONFIG . historical_roots_limit . as_int ()
2220
2321
2422class JustifiedSlots (BaseBitlist ):
2523 """Bitlist tracking justified slots up to historical roots limit."""
2624
27- LIMIT = HISTORICAL_ROOTS_LIMIT
25+ LIMIT = DEVNET_CONFIG . historical_roots_limit . as_int ()
2826
2927
3028class JustificationValidators (BaseBitlist ):
31- """Bitlist for tracking validator justifications (262144^2 limit) ."""
29+ """Bitlist for tracking validator justifications per historical root ."""
3230
33- LIMIT = HISTORICAL_ROOTS_LIMIT * HISTORICAL_ROOTS_LIMIT
31+ LIMIT = (
32+ DEVNET_CONFIG .historical_roots_limit .as_int ()
33+ * DEVNET_CONFIG .validator_registry_limit .as_int ()
34+ )
You can’t perform that action at this time.
0 commit comments