|
10 | 10 | from lean_spec.subspecs.ssz.hash import hash_tree_root |
11 | 11 | from lean_spec.types import Boolean, Bytes32, Container, Uint64, ValidatorIndex |
12 | 12 | from lean_spec.types import List as SSZList |
| 13 | +from lean_spec.types.bitfields import Bitlist |
13 | 14 |
|
14 | 15 | from .block import Block, BlockBody, BlockHeader, SignedBlock |
15 | 16 | from .checkpoint import Checkpoint |
@@ -43,17 +44,16 @@ class State(Container): |
43 | 44 | historical_block_hashes: SSZList[Bytes32, DEVNET_CONFIG.historical_roots_limit.as_int()] # type: ignore |
44 | 45 | """A list of historical block root hashes.""" |
45 | 46 |
|
46 | | - justified_slots: SSZList[Boolean, DEVNET_CONFIG.historical_roots_limit.as_int()] # type: ignore |
| 47 | + justified_slots: Bitlist[DEVNET_CONFIG.historical_roots_limit.as_int()] # type: ignore |
47 | 48 | """A bitfield indicating which historical slots were justified.""" |
48 | 49 |
|
49 | 50 | # Justification tracking (flattened for SSZ compatibility) |
50 | 51 | justifications_roots: SSZList[Bytes32, DEVNET_CONFIG.historical_roots_limit.as_int()] # type: ignore |
51 | 52 | """Roots of justified blocks.""" |
52 | 53 |
|
53 | | - justifications_validators: SSZList[ # type: ignore |
54 | | - Boolean, |
| 54 | + justifications_validators: Bitlist[ # type: ignore[valid-type, type-arg] |
55 | 55 | DEVNET_CONFIG.historical_roots_limit.as_int() |
56 | | - * DEVNET_CONFIG.historical_roots_limit.as_int(), |
| 56 | + * DEVNET_CONFIG.historical_roots_limit.as_int() |
57 | 57 | ] |
58 | 58 | """A bitlist of validators who participated in justifications.""" |
59 | 59 |
|
|
0 commit comments