Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zjma committed Feb 5, 2024
1 parent 21e47cd commit 99de43b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions crates/aptos-jwk-consensus/src/observation_aggregation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@ use crate::types::{
JWKConsensusMsg, ObservedUpdate, ObservedUpdateRequest, ObservedUpdateResponse,
};
use anyhow::{anyhow, ensure};
use aptos_bitvec::BitVec;
use aptos_consensus_types::common::Author;
use aptos_crypto::bls12381::Signature;
use aptos_infallible::Mutex;
use aptos_reliable_broadcast::BroadcastStatus;
use aptos_types::{
aggregate_signature::PartialSignatures,
aggregate_signature::{AggregateSignature, PartialSignatures},
epoch_state::EpochState,
jwks::{ProviderJWKs, QuorumCertifiedUpdate},
};
use move_core_types::account_address::AccountAddress;
use std::{collections::BTreeSet, sync::Arc};
use aptos_bitvec::BitVec;
use aptos_types::aggregate_signature::AggregateSignature;

/// The aggregation state of reliable broadcast where a validator broadcast JWK observation requests
/// and produce quorum-certified JWK updates.
Expand Down Expand Up @@ -95,7 +94,14 @@ impl BroadcastStatus<JWKConsensusMsg> for Arc<ObservationAggregationState> {
.collect::<Vec<_>>(),
)
.map_err(|e| anyhow!("jwk update certification failed with sig agg error: {e}"))?;
let signer_bit_vec = BitVec::from(self.epoch_state.verifier.get_ordered_account_addresses().into_iter().map(|addr|voters.contains(&addr)).collect::<Vec<_>>());
let signer_bit_vec = BitVec::from(
self.epoch_state
.verifier
.get_ordered_account_addresses()
.into_iter()
.map(|addr| voters.contains(&addr))
.collect::<Vec<_>>(),
);
let multi_sig = AggregateSignature::new(signer_bit_vec, Some(multi_sig));

Ok(Some(QuorumCertifiedUpdate {
Expand Down

0 comments on commit 99de43b

Please sign in to comment.