Skip to content

Commit

Permalink
Fix aggregation bits concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tumas committed May 14, 2024
1 parent 24f6beb commit 980101e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions validator/src/validator.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! <https://github.com/ethereum/consensus-specs/blob/b2f42bf4d79432ee21e2f2b3912ff4bbf7898ada/specs/phase0/validator.md>

use core::ops::{ControlFlow, Div as _};
use core::ops::{ControlFlow, Deref as _, Div as _};
use std::{
collections::{BTreeMap, BTreeSet, HashMap, HashSet},
error::Error as StdError,
Expand Down Expand Up @@ -1373,7 +1373,14 @@ impl<P: Preset, W: Wait + Sync> Validator<P, W> {
committee_bits.set(committee_index.try_into()?, true);
}

let bits = Vec::<u8>::from(aggregate.aggregation_bits);
// let bits = Vec::<u8>::from(aggregate.aggregation_bits);
let bits = aggregate
.aggregation_bits
.deref()
.clone()
.into_bitvec()
.into_vec();

aggregation_bits.extend_from_slice(&bits);

signature.aggregate_in_place(aggregate.signature.try_into()?);
Expand Down

0 comments on commit 980101e

Please sign in to comment.