Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion derivation/src/oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn verify_blob_preimage(
})?
}
};
// Ensure valida blob
// Ensure valid blob
let kzg_blob = kzg_rs::Blob::from_slice(&blob).map_err(Error::UnexpectedKZGBlob)?;
let settings = kzg_rs::get_kzg_settings();
let result = kzg_rs::kzg_proof::KzgProof::verify_blob_kzg_proof(
Expand Down
4 changes: 2 additions & 2 deletions light-client/src/account.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::commitment::decode_eip1184_rlp_proof;
use crate::commitment::decode_rlp_proof;
use crate::errors::Error;
use alloc::vec::Vec;
use alloy_primitives::hex;
Expand All @@ -16,7 +16,7 @@ impl TryFrom<ProtoAccountUpdate> for AccountUpdateInfo {
type Error = Error;
fn try_from(value: ProtoAccountUpdate) -> Result<Self, Self::Error> {
Ok(Self {
account_proof: decode_eip1184_rlp_proof(value.account_proof)?,
account_proof: decode_rlp_proof(value.account_proof)?,
account_storage_root: H256::from_slice(&value.account_storage_root),
})
}
Expand Down
4 changes: 2 additions & 2 deletions light-client/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::client_state::ClientState;
use crate::commitment::{calculate_ibc_commitment_storage_location, decode_eip1184_rlp_proof};
use crate::commitment::{calculate_ibc_commitment_storage_location, decode_rlp_proof};
use crate::consensus_state::ConsensusState;
use crate::errors::Error;
use crate::header::Header;
Expand Down Expand Up @@ -238,7 +238,7 @@ impl<const L1_SYNC_COMMITTEE_SIZE: usize> OptimismLightClient<L1_SYNC_COMMITTEE_
.map_err(Error::LCPError)?,
)?;
let root = consensus_state.storage_root;
let proof = decode_eip1184_rlp_proof(proof)?;
let proof = decode_rlp_proof(proof)?;
if root.is_zero() {
return Err(Error::UnexpectedStorageRoot(
proof_height,
Expand Down
2 changes: 1 addition & 1 deletion light-client/src/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn calculate_ibc_commitment_storage_location(ibc_commitments_slot: &H256, pa
}

/// decode rlp format `List<List>` to `Vec<List>`
pub fn decode_eip1184_rlp_proof(proof: Vec<u8>) -> Result<Vec<Vec<u8>>, Error> {
pub fn decode_rlp_proof(proof: Vec<u8>) -> Result<Vec<Vec<u8>>, Error> {
let r = Rlp::new(&proof);
if r.is_list() {
Ok(r.into_iter()
Expand Down
4 changes: 2 additions & 2 deletions light-client/src/l1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ pub fn convert_proto_to_execution_update(
}
}

fn convert_proto_sync_aggregate<const SYNC_COMMITTEE_SIZE: usize>(
fn convert_proto_to_sync_aggregate<const SYNC_COMMITTEE_SIZE: usize>(
sync_aggregate: ProtoSyncAggregate,
) -> Result<SyncAggregate<SYNC_COMMITTEE_SIZE>, Error> {
Ok(SyncAggregate {
Expand Down Expand Up @@ -492,7 +492,7 @@ fn convert_proto_to_consensus_update<const SYNC_COMMITTEE_SIZE: usize>(
finalized_header,
decode_branch(consensus_update.finalized_header_branch),
),
sync_aggregate: convert_proto_sync_aggregate(
sync_aggregate: convert_proto_to_sync_aggregate(
consensus_update
.sync_aggregate
.ok_or(Error::proto_missing("sync_aggregate"))?,
Expand Down
Loading