mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Bump SSZ version for larger bitfield SmallVec (#6915)
NA Bumps the `ethereum_ssz` version, along with other crates that share the dep. Primarily, this give us bitfields which can store 128 bytes on the stack before allocating, rather than 32 bytes (https://github.com/sigp/ethereum_ssz/pull/38). The validator count has increase massively since we set it at 32 bytes, so aggregation bitfields (et al) now require a heap allocation. This new value of 128 should get us to ~2m active validators.
This commit is contained in:
@@ -2713,16 +2713,16 @@ where
|
||||
let mut block_hash_from_slot: HashMap<Slot, SignedBeaconBlockHash> = HashMap::new();
|
||||
let mut state_hash_from_slot: HashMap<Slot, BeaconStateHash> = HashMap::new();
|
||||
for slot in slots {
|
||||
let (block_hash, new_state) = self
|
||||
.add_attested_block_at_slot_with_sync(
|
||||
*slot,
|
||||
state,
|
||||
state_root,
|
||||
validators,
|
||||
sync_committee_strategy,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
// Using a `Box::pin` to reduce the stack size. Clippy was raising a lints.
|
||||
let (block_hash, new_state) = Box::pin(self.add_attested_block_at_slot_with_sync(
|
||||
*slot,
|
||||
state,
|
||||
state_root,
|
||||
validators,
|
||||
sync_committee_strategy,
|
||||
))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
state = new_state;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user