Skip to content

Commit

Permalink
chore: v0.6.6 op-alloy (#804)
Browse files Browse the repository at this point in the history
* fix: update deps

* fix: use updated deps

* fix: update alloy

* chore: update deps

* fix

* feat: stateful
  • Loading branch information
refcell authored Nov 16, 2024
1 parent 4a3b928 commit 138a8f2
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 107 deletions.
167 changes: 92 additions & 75 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,25 @@ kona-proof = { path = "crates/proof-sdk/proof", version = "0.0.1", default-featu

# Alloy
alloy-rlp = { version = "0.3.9", default-features = false }
alloy-trie = { version = "0.7.2", default-features = false }
alloy-eips = { version = "0.5.4", default-features = false }
alloy-serde = { version = "0.5.4", default-features = false }
alloy-provider = { version = "0.5.4", default-features = false }
alloy-primitives = { version = "0.8", default-features = false }
alloy-consensus = { version = "0.5.4", default-features = false }
alloy-transport = { version = "0.5.4", default-features = false }
alloy-rpc-types = { version = "0.5.4", default-features = false }
alloy-rpc-client = { version = "0.5.4", default-features = false }
alloy-node-bindings = { version = "0.5.4", default-features = false }
alloy-transport-http = { version = "0.5.4", default-features = false }
alloy-rpc-types-engine = { version = "0.5.4", default-features = false }
alloy-rpc-types-beacon = { version = "0.5.4", default-features = false }
alloy-trie = { version = "0.7.4", default-features = false }
alloy-eips = { version = "0.6.4", default-features = false }
alloy-serde = { version = "0.6.4", default-features = false }
alloy-provider = { version = "0.6.4", default-features = false }
alloy-primitives = { version = "0.8.12", default-features = false }
alloy-consensus = { version = "0.6.4", default-features = false }
alloy-transport = { version = "0.6.4", default-features = false }
alloy-rpc-types = { version = "0.6.4", default-features = false }
alloy-rpc-client = { version = "0.6.4", default-features = false }
alloy-node-bindings = { version = "0.6.4", default-features = false }
alloy-transport-http = { version = "0.6.4", default-features = false }
alloy-rpc-types-engine = { version = "0.6.4", default-features = false }
alloy-rpc-types-beacon = { version = "0.6.4", default-features = false }

# OP Alloy
op-alloy-genesis = { version = "0.5.2", default-features = false }
op-alloy-protocol = { version = "0.5.2", default-features = false }
op-alloy-consensus = { version = "0.5.2", default-features = false }
op-alloy-rpc-types-engine = { version = "0.5.2", default-features = false }
op-alloy-genesis = { version = "0.6.6", default-features = false }
op-alloy-protocol = { version = "0.6.6", default-features = false }
op-alloy-consensus = { version = "0.6.6", default-features = false }
op-alloy-rpc-types-engine = { version = "0.6.6", default-features = false }

# General
lru = "0.12.4"
Expand Down
6 changes: 1 addition & 5 deletions bin/host/src/fetcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,7 @@ where
let encoded_transactions = transactions
.into_iter()
.map(|tx| {
let envelope: TxEnvelope = tx.try_into().map_err(|e| {
anyhow!(
"Failed to convert RPC transaction into consensus envelope: {e}"
)
})?;
let envelope: TxEnvelope = tx.into();

Ok::<_, anyhow::Error>(envelope.encoded_2718())
})
Expand Down
8 changes: 4 additions & 4 deletions bin/host/src/providers/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ where
let hash = blob_hashes
.get(i)
.ok_or(BlobProviderError::Backend("Missing blob hash".to_string()))?;
match sidecar.verify_blob(&alloy_eips::NumHash {
match sidecar.verify_blob(&alloy_eips::eip4844::IndexedBlobHash {
hash: hash.hash,
number: hash.index as u64,
index: hash.index as u64,
}) {
Ok(_) => Ok(sidecar.blob),
Err(e) => Err(BlobProviderError::Backend(e.to_string())),
Expand Down Expand Up @@ -312,9 +312,9 @@ where
let hash = blob_hashes.get(i).ok_or(BlobProviderError::Backend(
"fallback: failed to get blob hash".to_string(),
))?;
match sidecar.verify_blob(&alloy_eips::NumHash {
match sidecar.verify_blob(&alloy_eips::eip4844::IndexedBlobHash {
hash: hash.hash,
number: hash.index as u64,
index: hash.index as u64,
}) {
Ok(_) => Ok(sidecar.blob),
Err(e) => Err(BlobProviderError::Backend(e.to_string())),
Expand Down
1 change: 1 addition & 0 deletions crates/derive/src/attributes/stateful.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ async fn derive_deposits(
for l in r.logs.iter() {
let curr_index = global_index;
global_index += 1;
#[allow(clippy::all)]
if !l.data.topics().first().map_or(false, |i| *i == DEPOSIT_EVENT_ABI_HASH) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/sources/calldata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ mod tests {
use crate::{errors::PipelineErrorKind, test_utils::TestChainProvider};
use alloc::{vec, vec::Vec};
use alloy_consensus::{Signed, TxEip2930, TxEip4844, TxEip4844Variant, TxLegacy};
use alloy_primitives::{address, Address, Signature, TxKind};
use alloy_primitives::{address, Address, PrimitiveSignature as Signature, TxKind};

pub(crate) fn test_legacy_tx(to: Address) -> TxEnvelope {
let sig = Signature::test_signature();
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/stages/batch/batch_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ where
{
fn is_last_in_span(&self) -> bool {
self.batch_validator.as_ref().map_or_else(
|| self.batch_queue.as_ref().map_or(false, |batch_queue| batch_queue.is_last_in_span()),
|| self.batch_queue.as_ref().is_some_and(|batch_queue| batch_queue.is_last_in_span()),
|batch_validator| batch_validator.is_last_in_span(),
)
}
Expand Down
5 changes: 1 addition & 4 deletions crates/mpt/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ pub(crate) async fn get_live_derivable_transactions_list(
let BlockTransactions::Full(txs) = block.transactions else {
anyhow::bail!("Did not fetch full block");
};
let consensus_txs = txs
.into_iter()
.map(|tx| TxEnvelope::try_from(tx).map_err(anyhow::Error::from))
.collect::<Result<Vec<_>>>()?;
let consensus_txs = txs.into_iter().map(TxEnvelope::from).collect::<Vec<_>>();

// Compute the derivable list
let mut list = ordered_trie_with_encoder(consensus_txs.as_ref(), |rlp: &TxEnvelope, buf| {
Expand Down

0 comments on commit 138a8f2

Please sign in to comment.