Skip to content

Commit

Permalink
deneb support for light client
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Jan 13, 2024
1 parent ad2d983 commit e6f27ff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/light-client-cli/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use ethereum_consensus::{
config::{self, Config},
types::H256,
};
use ethereum_light_client_verifier::updates::capella::LightClientBootstrapInfo;
use ethereum_light_client_verifier::updates::deneb::LightClientBootstrapInfo;
use lodestar_rpc::client::RPCClient;

type Result<T> = core::result::Result<T, Error>;
Expand Down
8 changes: 4 additions & 4 deletions crates/light-client-cli/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use crate::{
use core::time::Duration;
use ethereum_consensus::{
beacon::{Root, Slot},
capella::{self, LightClientUpdate},
compute::compute_sync_committee_period_at_slot,
context::ChainContext,
deneb::{self, LightClientUpdate},
execution::{
BlockNumber, EXECUTION_PAYLOAD_BLOCK_NUMBER_INDEX, EXECUTION_PAYLOAD_STATE_ROOT_INDEX,
},
Expand All @@ -20,7 +20,7 @@ use ethereum_light_client_verifier::{
consensus::{CurrentNextSyncProtocolVerifier, SyncProtocolVerifier},
context::{ConsensusVerificationContext, Fraction, LightClientContext},
state::apply_sync_committee_update,
updates::capella::ConsensusUpdateInfo,
updates::deneb::ConsensusUpdateInfo,
};
use log::*;
type Result<T> = core::result::Result<T, Error>;
Expand Down Expand Up @@ -221,11 +221,11 @@ impl<

let execution_update = {
let execution_payload_header = update.finalized_header.execution.clone();
let (_, state_root_branch) = capella::gen_execution_payload_fields_proof(
let (_, state_root_branch) = deneb::gen_execution_payload_fields_proof(
&execution_payload_header,
&[EXECUTION_PAYLOAD_STATE_ROOT_INDEX],
)?;
let (_, block_number_branch) = capella::gen_execution_payload_fields_proof(
let (_, block_number_branch) = deneb::gen_execution_payload_fields_proof(
&execution_payload_header,
&[EXECUTION_PAYLOAD_BLOCK_NUMBER_INDEX],
)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/light-client-cli/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use crate::chain::Network;
use crate::cli::Opts;
use crate::db::{FileDB, DB};
use crate::{errors::Error, state::LightClientStore};
use ethereum_consensus::capella::LightClientBootstrap;
use ethereum_consensus::config::Config;
use ethereum_consensus::context::ChainContext;
use ethereum_consensus::deneb::LightClientBootstrap;
use log::*;

#[derive(Debug)]
Expand Down
2 changes: 1 addition & 1 deletion crates/light-client-cli/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ethereum_consensus::{
beacon::{BeaconBlockHeader, Slot},
capella::{ExecutionPayloadHeader, LightClientBootstrap},
deneb::{ExecutionPayloadHeader, LightClientBootstrap},
sync_protocol::SyncCommittee,
types::{H256, U64},
};
Expand Down
2 changes: 1 addition & 1 deletion crates/lodestar-rpc/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ethereum_consensus::{
beacon::{BeaconBlockHeader, Checkpoint, Root, Slot},
bls::Signature,
capella::{LightClientBootstrap, LightClientHeader, LightClientUpdate},
deneb::{LightClientBootstrap, LightClientHeader, LightClientUpdate},
sync_protocol::FINALIZED_ROOT_DEPTH,
sync_protocol::{
SyncAggregate, SyncCommittee, CURRENT_SYNC_COMMITTEE_DEPTH, NEXT_SYNC_COMMITTEE_DEPTH,
Expand Down

0 comments on commit e6f27ff

Please sign in to comment.