Skip to content

Commit

Permalink
chore: op-alloy 0.6.8 (#830)
Browse files Browse the repository at this point in the history
* chore: bump op-alloy 0.6.8

* chore: 0.6.8 release
  • Loading branch information
refcell authored Nov 20, 2024
1 parent 2630f7a commit 9f613a2
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 24 deletions.
39 changes: 27 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ 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.6.7", default-features = false }
op-alloy-protocol = { version = "0.6.7", default-features = false }
op-alloy-consensus = { version = "0.6.7", default-features = false }
op-alloy-rpc-types-engine = { version = "0.6.7", default-features = false }
op-alloy-genesis = { version = "0.6.8", default-features = false }
op-alloy-registry = { version = "0.6.8", default-features = false }
op-alloy-protocol = { version = "0.6.8", default-features = false }
op-alloy-consensus = { version = "0.6.8", default-features = false }
op-alloy-rpc-types-engine = { version = "0.6.8", default-features = false }

# General
lru = "0.12.4"
Expand Down
1 change: 1 addition & 0 deletions crates/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ tracing-subscriber = { workspace = true, optional = true, features = ["fmt"] }
spin.workspace = true
proptest.workspace = true
serde_json.workspace = true
op-alloy-registry.workspace = true
tokio = { workspace = true, features = ["full"] }
tracing-subscriber = { workspace = true, features = ["fmt"] }
alloy-primitives = { workspace = true, features = ["rlp", "k256", "map", "arbitrary"] }
Expand Down
6 changes: 3 additions & 3 deletions crates/derive/src/attributes/stateful.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use alloy_primitives::{address, Address, Bytes, B256};
use alloy_rlp::Encodable;
use alloy_rpc_types_engine::PayloadAttributes;
use async_trait::async_trait;
use op_alloy_consensus::Hardforks;
use op_alloy_consensus::{Hardfork, Hardforks};
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{decode_deposit, L1BlockInfoTx, L2BlockInfo, DEPOSIT_EVENT_ABI_HASH};
use op_alloy_rpc_types_engine::OpPayloadAttributes;
Expand Down Expand Up @@ -132,12 +132,12 @@ where
if self.rollup_cfg.is_ecotone_active(next_l2_time) &&
!self.rollup_cfg.is_ecotone_active(l2_parent.block_info.timestamp)
{
upgrade_transactions = Hardforks::ecotone_txs();
upgrade_transactions = Hardforks::ECOTONE.txs().collect();
}
if self.rollup_cfg.is_fjord_active(next_l2_time) &&
!self.rollup_cfg.is_fjord_active(l2_parent.block_info.timestamp)
{
upgrade_transactions.append(&mut Hardforks::fjord_txs());
upgrade_transactions.append(&mut Hardforks::FJORD.txs().collect());
}

// Build and encode the L1 info transaction for the current payload.
Expand Down
8 changes: 5 additions & 3 deletions crates/derive/src/stages/channel/channel_bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ mod tests {
types::ResetSignal,
};
use alloc::{vec, vec::Vec};
use op_alloy_genesis::{BASE_MAINNET_CONFIG, OP_MAINNET_CONFIG};
use tracing::Level;
use tracing_subscriber::layer::SubscriberExt;

Expand Down Expand Up @@ -508,9 +507,12 @@ mod tests {
let subscriber = tracing_subscriber::Registry::default().with(layer);
let _guard = tracing::subscriber::set_default(subscriber);

const ROLLUP_CONFIGS: [RollupConfig; 2] = [OP_MAINNET_CONFIG, BASE_MAINNET_CONFIG];
let configs: [RollupConfig; 2] = [
op_alloy_registry::ROLLUP_CONFIGS.get(&10).cloned().unwrap(),
op_alloy_registry::ROLLUP_CONFIGS.get(&8453).cloned().unwrap(),
];

for cfg in ROLLUP_CONFIGS {
for cfg in configs {
let frames = [
crate::frame!(0xFF, 0, vec![0xDD; 50], false),
crate::frame!(0xFF, 1, vec![0xDD; 50], true),
Expand Down
1 change: 1 addition & 0 deletions crates/proof-sdk/proof/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ alloy-consensus.workspace = true
alloy-primitives.workspace = true

# Op Alloy
op-alloy-registry.workspace = true
op-alloy-protocol.workspace = true
op-alloy-consensus.workspace = true
op-alloy-rpc-types-engine.workspace = true
Expand Down
5 changes: 3 additions & 2 deletions crates/proof-sdk/proof/src/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::errors::OracleProviderError;
use alloy_primitives::{B256, U256};
use kona_preimage::{PreimageKey, PreimageOracleClient};
use op_alloy_genesis::RollupConfig;
use op_alloy_registry::ROLLUP_CONFIGS;
use serde::{Deserialize, Serialize};

/// The local key ident for the L1 head hash.
Expand Down Expand Up @@ -104,8 +105,8 @@ impl BootInfo {

// Attempt to load the rollup config from the chain ID. If there is no config for the chain,
// fall back to loading the config from the preimage oracle.
let rollup_config = if let Some(config) = RollupConfig::from_l2_chain_id(chain_id) {
config
let rollup_config = if let Some(config) = ROLLUP_CONFIGS.get(&chain_id) {
config.clone()
} else {
warn!(
target: "boot-loader",
Expand Down

0 comments on commit 9f613a2

Please sign in to comment.