Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ncitron committed Aug 26, 2024
1 parent ea5d459 commit 4480fbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions consensus-core/src/consensus_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ use crate::proof::{
};
use crate::types::bls::{PublicKey, Signature};
use crate::types::{
Bootstrap, FinalityUpdate, GenericUpdate, Header, LightClientStore, OptimisticUpdate, Update
Bootstrap, FinalityUpdate, GenericUpdate, Header, LightClientStore, OptimisticUpdate, Update,
};
use crate::utils::{
calculate_fork_version, compute_committee_sign_root, compute_fork_data_root, get_participating_keys
calculate_fork_version, compute_committee_sign_root, compute_fork_data_root,
get_participating_keys,
};

pub fn verify_bootstrap(bootstrap: &Bootstrap, checkpoint: B256) -> Result<()> {
Expand Down Expand Up @@ -107,7 +108,6 @@ pub fn apply_optimistic_update(
apply_generic_update(store, &update)
}


// implements state changes from apply_light_client_update and process_light_client_update in
// the specification
/// Returns the new checkpoint if one is created, otherwise None
Expand Down
1 change: 0 additions & 1 deletion consensus-core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use tree_hash_derive::TreeHash;

use crate::types::{bls::PublicKey, SyncCommittee};


pub fn compute_committee_sign_root(header: B256, fork_data_root: B256) -> B256 {
let domain_type = [7, 00, 00, 00];
let domain = compute_domain(domain_type, fork_data_root);
Expand Down
11 changes: 4 additions & 7 deletions consensus/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ use consensus_core::{
apply_finality_update, apply_optimistic_update, apply_update, calc_sync_period,
errors::ConsensusError,
expected_current_slot, get_bits,
types::{
ExecutionPayload, FinalityUpdate, LightClientStore, OptimisticUpdate, Update,
},
types::{ExecutionPayload, FinalityUpdate, LightClientStore, OptimisticUpdate, Update},
};

pub struct ConsensusClient<R: ConsensusRpc, DB: Database> {
Expand Down Expand Up @@ -383,7 +381,7 @@ impl<R: ConsensusRpc> Inner<R> {

pub fn verify_update(&self, update: &Update) -> Result<()> {
verify_update(
&update,
update,
self.expected_current_slot(),
&self.store,
self.config.chain.genesis_root,
Expand All @@ -393,7 +391,7 @@ impl<R: ConsensusRpc> Inner<R> {

fn verify_finality_update(&self, update: &FinalityUpdate) -> Result<()> {
verify_finality_update(
&update,
update,
self.expected_current_slot(),
&self.store,
self.config.chain.genesis_root,
Expand All @@ -403,7 +401,7 @@ impl<R: ConsensusRpc> Inner<R> {

fn verify_optimistic_update(&self, update: &OptimisticUpdate) -> Result<()> {
verify_optimistic_update(
&update,
update,
self.expected_current_slot(),
&self.store,
self.config.chain.genesis_root,
Expand All @@ -418,7 +416,6 @@ impl<R: ConsensusRpc> Inner<R> {
}
}


fn apply_finality_update(&mut self, update: &FinalityUpdate) {
let new_checkpoint = apply_finality_update(&mut self.store, update);
if new_checkpoint.is_some() {
Expand Down

0 comments on commit 4480fbf

Please sign in to comment.