From 2841d81e0d815d26663392cefb5b62f9cd4adbcd Mon Sep 17 00:00:00 2001 From: Sergei Shulepov Date: Thu, 5 Nov 2026 03:11:11 +0000 Subject: [PATCH 001/100] fix(eth-wire): bound malformed disconnect payloads (#28280) Co-authored-by: Matthias Seitz --- crates/net/eth-wire/src/p2pstream.rs | 48 ++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/crates/net/eth-wire/src/p2pstream.rs b/crates/net/eth-wire/src/p2pstream.rs index 62dac05ef9b..a8a72cf977c 100644 --- a/crates/net/eth-wire/src/p2pstream.rs +++ b/crates/net/eth-wire/src/p2pstream.rs @@ -34,6 +34,14 @@ use serde::{Deserialize, Serialize}; /// This is defined in [EIP-706](https://eips.ethereum.org/EIPS/eip-706). const MAX_PAYLOAD_SIZE: usize = 16 * 1024 * 1024; +/// Maximum size of a decompressed `p2p` disconnect payload: [`DisconnectReason`] decodes at most +/// two bytes, a reason code optionally wrapped in a one-item list. +const MAX_DISCONNECT_PAYLOAD_SIZE: usize = 2; + +/// Maximum number of bytes of a malformed peer message included in debug logs, so a peer cannot +/// turn one message into a multi-megabyte log record. +const MAX_LOGGED_PAYLOAD_SIZE: usize = 64; + /// [`MAX_RESERVED_MESSAGE_ID`] is the maximum message ID reserved for the `p2p` subprotocol. If /// there are any incoming messages with an ID greater than this, they are subprotocol messages. pub const MAX_RESERVED_MESSAGE_ID: u8 = 0x0f; @@ -151,7 +159,12 @@ where Err(P2PStreamError::HandshakeError(P2PHandshakeError::Disconnected(reason))) } Err(err) => { - debug!(%err, msg=%hex::encode(&first_message_bytes), "Failed to decode first message from peer"); + debug!( + %err, + len = first_message_bytes.len(), + msg = %hex::encode(log_prefix(&first_message_bytes)), + "Failed to decode first message from peer" + ); Err(P2PStreamError::HandshakeError(err.into())) } Ok(msg) => { @@ -628,6 +641,15 @@ where }))) } + if id == P2PMessageID::Disconnect as u8 && + decompressed_len > MAX_DISCONNECT_PAYLOAD_SIZE + { + return Poll::Ready(Some(Err(P2PStreamError::MessageTooBig { + message_size: decompressed_len, + max_size: MAX_DISCONNECT_PAYLOAD_SIZE, + }))) + } + let frame_len = decompressed_len + 1; if let Some(limit) = this.inbound_protocol_limit(id) && frame_len > limit.max_frame_bytes @@ -649,7 +671,8 @@ where this.decoder.decompress(&bytes[1..], &mut decompress_buf[1..]).map_err(|err| { debug!( %err, - msg=%hex::encode(&bytes[1..]), + len = bytes.len() - 1, + msg = %hex::encode(log_prefix(&bytes[1..])), "error decompressing p2p message" ); err @@ -715,6 +738,11 @@ where } } +/// Returns the prefix of a peer message that is included in debug logs. +fn log_prefix(bytes: &[u8]) -> &[u8] { + &bytes[..bytes.len().min(MAX_LOGGED_PAYLOAD_SIZE)] +} + /// Validates a compressed Ping or Pong payload without allocating from its advertised size. fn validate_ping_pong_payload( decoder: &mut snap::raw::Decoder, @@ -1152,6 +1180,22 @@ mod tests { } } + #[tokio::test] + async fn rejects_oversized_disconnect_before_decompression() { + // A snappy header advertising a 16 MiB payload, with no compressed body behind it. + let frame = + BytesMut::from([P2PMessageID::Disconnect as u8, 0x80, 0x80, 0x80, 0x08].as_slice()); + let mut stream = stream_with_incoming(frame); + + assert!(matches!( + stream.next().await.unwrap().unwrap_err(), + P2PStreamError::MessageTooBig { + message_size: MAX_PAYLOAD_SIZE, + max_size: MAX_DISCONNECT_PAYLOAD_SIZE, + } + )); + } + #[tokio::test] async fn rejects_ping_pong_with_non_list_payload() { for message_id in [P2PMessageID::Ping, P2PMessageID::Pong] { From 9dc3e4c9ca083a26011a50f70075337f3aa02a07 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 5 Nov 2026 04:24:31 +0100 Subject: [PATCH 002/100] fix(node): suffix auth ipc path with instance (#28257) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/cli/commands/src/node.rs | 1 + crates/node/core/src/args/rpc_server.rs | 67 ++++++++++++++++++++++--- crates/rpc/rpc-builder/src/config.rs | 2 +- docs/vocs/docs/pages/cli/reth/node.mdx | 6 +-- 4 files changed, 66 insertions(+), 10 deletions(-) diff --git a/crates/cli/commands/src/node.rs b/crates/cli/commands/src/node.rs index 4ab1dce1987..3f9c49d3194 100644 --- a/crates/cli/commands/src/node.rs +++ b/crates/cli/commands/src/node.rs @@ -57,6 +57,7 @@ pub struct NodeCommand, diff --git a/crates/node/core/src/args/rpc_server.rs b/crates/node/core/src/args/rpc_server.rs index 6e4634f8c14..ba797527652 100644 --- a/crates/node/core/src/args/rpc_server.rs +++ b/crates/node/core/src/args/rpc_server.rs @@ -570,9 +570,12 @@ pub struct RpcServerArgs { #[arg(long, default_value_t = DefaultRpcServerArgs::get_global().auth_ipc)] pub auth_ipc: bool, - /// Filename for auth IPC socket/pipe within the datadir - #[arg(long = "auth-ipc.path", default_value_t = DefaultRpcServerArgs::get_global().auth_ipc_path.clone())] - pub auth_ipc_path: String, + /// Path for the auth IPC socket/pipe. Explicit paths are used unchanged. + /// + /// If omitted, uses `/tmp/reth_engine_api.ipc`, with `-` appended when + /// `--instance` is set. Applications can override this default via `DefaultRpcServerArgs`. + #[arg(long = "auth-ipc.path")] + pub auth_ipc_path: Option, /// Disable the auth/engine API server. /// @@ -839,6 +842,8 @@ impl RpcServerArgs { /// * The `http_port` is scaled by a factor of `-instance` /// * The `ws_port` is scaled by a factor of `instance * 2` /// * The `ipcpath` is appended with the instance number: `/tmp/reth.ipc-` + /// * If `auth_ipc_path` is `None`, the default auth IPC path is appended with the instance + /// number: `/tmp/reth_engine_api.ipc-`. Explicit paths are left unchanged. /// /// # Panics /// Warning: if `instance` is zero in debug mode, this will panic. @@ -859,6 +864,9 @@ impl RpcServerArgs { self.ws_port += instance * 2 - 2; // append instance file to ipc path self.ipcpath = format!("{}-{}", self.ipcpath, instance); + if self.auth_ipc_path.is_none() { + self.auth_ipc_path = Some(format!("{}-{instance}", self.auth_ipc_path())); + } } } @@ -933,6 +941,13 @@ impl RpcServerArgs { self.rpc_force_blob_sidecar_upcasting = true; self } + + /// Returns the auth IPC endpoint to bind after instance adjustment. + /// + /// If no explicit or instance-adjusted path is set, returns the global default. + pub fn auth_ipc_path(&self) -> &str { + self.auth_ipc_path.as_deref().unwrap_or(&DefaultRpcServerArgs::get_global().auth_ipc_path) + } } impl Default for RpcServerArgs { @@ -958,7 +973,7 @@ impl Default for RpcServerArgs { auth_port, auth_jwtsecret, auth_ipc, - auth_ipc_path, + auth_ipc_path: _, disable_auth_server, rpc_jwtsecret, rpc_disable_metrics, @@ -1007,7 +1022,7 @@ impl Default for RpcServerArgs { auth_jwtsecret, auth_jwtsecret_hex: None, auth_ipc, - auth_ipc_path, + auth_ipc_path: None, disable_auth_server, rpc_jwtsecret, rpc_disable_metrics, @@ -1315,7 +1330,7 @@ mod tests { auth_jwtsecret: Some(std::path::PathBuf::from("/tmp/jwt.hex")), auth_jwtsecret_hex: None, auth_ipc: false, - auth_ipc_path: "engine.ipc".to_string(), + auth_ipc_path: Some("engine.ipc".to_string()), disable_auth_server: false, rpc_jwtsecret: Some( JwtSecret::from_hex( @@ -1488,4 +1503,44 @@ mod tests { assert!(result.is_err()); } + + #[test] + fn test_adjust_instance_ports_suffixes_ipc_paths() { + let paths: Vec<_> = (1..=3u16) + .map(|instance| { + let mut args = RpcServerArgs::default(); + let ipcpath = args.ipcpath.clone(); + let auth_ipc_path = args.auth_ipc_path().to_string(); + args.adjust_instance_ports(Some(instance)); + assert_eq!(args.ipcpath, format!("{ipcpath}-{instance}")); + assert_eq!(args.auth_ipc_path(), format!("{auth_ipc_path}-{instance}")); + args.auth_ipc_path().to_string() + }) + .collect(); + + assert_eq!( + paths, + [ + "/tmp/reth_engine_api.ipc-1", + "/tmp/reth_engine_api.ipc-2", + "/tmp/reth_engine_api.ipc-3" + ] + ); + + // Without an instance the paths are left untouched. + let mut args = RpcServerArgs::default(); + let auth_ipc_path = args.auth_ipc_path().to_string(); + args.adjust_instance_ports(None); + assert_eq!(args.auth_ipc_path(), auth_ipc_path); + } + + #[test] + fn test_adjust_instance_ports_preserves_explicit_auth_ipc_path() { + for path in ["engine.ipc", constants::DEFAULT_ENGINE_API_IPC_ENDPOINT] { + let mut args = + CommandParser::::parse_from(["reth", "--auth-ipc.path", path]).args; + args.adjust_instance_ports(Some(2)); + assert_eq!(args.auth_ipc_path(), path); + } + } } diff --git a/crates/rpc/rpc-builder/src/config.rs b/crates/rpc/rpc-builder/src/config.rs index 546cccd8c8b..a5b880234c4 100644 --- a/crates/rpc/rpc-builder/src/config.rs +++ b/crates/rpc/rpc-builder/src/config.rs @@ -253,7 +253,7 @@ impl RethRpcServerConfig for RpcServerArgs { let mut builder = AuthServerConfig::builder(jwt_secret).socket_addr(address); if self.auth_ipc { builder = builder - .ipc_endpoint(self.auth_ipc_path.clone()) + .ipc_endpoint(self.auth_ipc_path().to_string()) .with_ipc_config(self.ipc_server_builder()); } Ok(builder.build()) diff --git a/docs/vocs/docs/pages/cli/reth/node.mdx b/docs/vocs/docs/pages/cli/reth/node.mdx index ede3fb486f7..654fdcdb79c 100644 --- a/docs/vocs/docs/pages/cli/reth/node.mdx +++ b/docs/vocs/docs/pages/cli/reth/node.mdx @@ -28,7 +28,7 @@ Options: Max number of instances is 200. It is chosen in a way so that it's not possible to have port numbers that conflict with each other. - Changes to the following port numbers: - `DISCOVERY_PORT`: default + `instance` - 1 - `AUTH_PORT`: default + `instance` * 100 - 100 - `HTTP_RPC_PORT`: default - `instance` + 1 - `WS_RPC_PORT`: default + `instance` * 2 - 2 - `IPC_PATH`: default + `-instance` + Changes to the following port numbers: - `DISCOVERY_PORT`: default + `instance` - 1 - `AUTH_PORT`: default + `instance` * 100 - 100 - `HTTP_RPC_PORT`: default - `instance` + 1 - `WS_RPC_PORT`: default + `instance` * 2 - 2 - `IPC_PATH`: default + `-instance` - `AUTH_IPC_PATH`: default + `-instance`, unless `--auth-ipc.path` is set --with-unused-ports Sets all ports to unused, allowing the OS to choose random unused ports when sockets are bound. @@ -421,9 +421,9 @@ RPC: Enable auth engine API over IPC --auth-ipc.path - Filename for auth IPC socket/pipe within the datadir + Path for the auth IPC socket/pipe. Explicit paths are used unchanged. - [default: _engine_api.ipc] + If omitted, uses `/tmp/reth_engine_api.ipc`, with `-` appended when `--instance` is set. Applications can override this default via `DefaultRpcServerArgs`. --disable-auth-server Disable the auth/engine API server. From 5f46c757deda9f40f39994944f3b7adbcec3366c Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Thu, 5 Nov 2026 03:29:50 +0000 Subject: [PATCH 003/100] test(snap): stop the engine before the reorg restart (#28267) --- crates/e2e-test-utils/src/node.rs | 23 +++++++++++++++++++++++ crates/ethereum/node/tests/e2e/snap.rs | 13 +++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/crates/e2e-test-utils/src/node.rs b/crates/e2e-test-utils/src/node.rs index ec81c0265e3..3b257ad423b 100644 --- a/crates/e2e-test-utils/src/node.rs +++ b/crates/e2e-test-utils/src/node.rs @@ -1424,6 +1424,29 @@ where eyre::Ok(res) } + /// Terminates the consensus engine after it persisted its canonical chain, and waits for it. + /// + /// Call this before [`Self::stop`] while a backfill is in flight, e.g. paused at a snap gate. + /// Stopping cancels the backfill, and its dropped task can end the engine loop with a fatal + /// error before the loop sees the shutdown signal, leaving the engine thread and its database + /// handles alive. The engine loop also reports a fatal error once the terminated engine + /// exits, so the future of [`Self::take_exit_future`] resolves with an error. + /// + /// Returns an error if shutdown was already requested or the engine does not terminate within + /// [`WAIT_TIMEOUT`]. + pub async fn shutdown_engine(&self) -> eyre::Result<()> { + let done = self + .inner + .add_ons_handle + .engine_shutdown + .shutdown() + .ok_or_eyre("engine shutdown was already requested")?; + tokio::time::timeout(WAIT_TIMEOUT, done) + .await + .map_err(|_| eyre!("the engine did not shut down within {WAIT_TIMEOUT:?}"))??; + Ok(()) + } + /// Stops the node and closes its database, keeping its datadir to launch the node again with /// [`StoppedNode::start`]. /// diff --git a/crates/ethereum/node/tests/e2e/snap.rs b/crates/ethereum/node/tests/e2e/snap.rs index fa401a2375e..c81d0211b58 100644 --- a/crates/ethereum/node/tests/e2e/snap.rs +++ b/crates/ethereum/node/tests/e2e/snap.rs @@ -32,7 +32,7 @@ use reth_e2e_test_utils::{ node::Finality, snap::SnapControl, trie::assert_trie_consistency, - wait::{assert_holds_for, poll_until, WAIT_TIMEOUT}, + wait::{assert_holds_for, poll_until}, E2ETestSetupBuilder, E2ETestSetupExt, NodeHelperType, }; use reth_eth_wire_types::snap::SnapProtocolMessage; @@ -303,13 +303,8 @@ async fn partial_storage_resumes_after_restart() -> eyre::Result<()> { assert_eq!(provider.storage_progress(write, origin)?.resume_at(account), Some(resume_at)); (write, origin, account, resume_at) }; - // Stop the engine before cancelling the paused backfill, whose dropped-task event can - // otherwise race the engine's shutdown signal and leave its database handles alive. - tokio::time::timeout( - WAIT_TIMEOUT, - client.inner.add_ons_handle.engine_shutdown.shutdown().expect("engine is running"), - ) - .await??; + // The storage continuation is still paused. + client.shutdown_engine().await?; let stopped = client.stop().await?; let resumed = control.pause_on(move |request| { matches!(request, @@ -565,6 +560,8 @@ async fn a_reorged_pivot_repairs_orphaned_storage() -> eyre::Result<()> { downloaded.reached().await?; let attempt = client.snap_attempt()?; assert_eq!(attempt.pivot().number, pivot); + // The account range after the contract is still paused. + client.shutdown_engine().await?; let stopped = client.stop().await?; // Both branches change slot 0, but only the orphan changes slot 1 and only the new fork From b7a853a60e3dbb3448ef7a8fceb6b433e4f1f5d5 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 5 Nov 2026 04:47:44 +0100 Subject: [PATCH 004/100] fix(rpc): ignore zero-balance account changes (#28282) --- crates/rpc/rpc/src/reth.rs | 117 +++++++++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 4 deletions(-) diff --git a/crates/rpc/rpc/src/reth.rs b/crates/rpc/rpc/src/reth.rs index 1cbde57dc65..92e8a2216d6 100644 --- a/crates/rpc/rpc/src/reth.rs +++ b/crates/rpc/rpc/src/reth.rs @@ -79,7 +79,9 @@ where rx.await.map_err(|_| EthApiError::InternalEthError)? } - /// Returns a map of addresses to changed account balanced for a particular block. + /// Returns post-block balances for accounts whose balance changed in the block. + /// + /// Missing accounts are treated as having zero balance. pub async fn balance_changes_in_block(&self, block_id: BlockId) -> EthResult> { self.on_blocking_task(async move |this| this.try_balance_changes_in_block(block_id)).await } @@ -94,10 +96,12 @@ where let hash_map = accounts_before.iter().try_fold( AddressMap::default(), |mut hash_map, account_before| -> RethResult<_> { - let current_balance = state.account_balance(&account_before.address)?; - let prev_balance = account_before.info.as_ref().map(|info| info.balance); + let current_balance = + state.account_balance(&account_before.address)?.unwrap_or_default(); + let prev_balance = + account_before.info.as_ref().map(|info| info.balance).unwrap_or_default(); if current_balance != prev_balance { - hash_map.insert(account_before.address, current_balance.unwrap_or_default()); + hash_map.insert(account_before.address, current_balance); } Ok(hash_map) }, @@ -442,3 +446,108 @@ struct RethApiInner { /// The type that can spawn tasks which would otherwise block. task_spawner: Runtime, } + +#[cfg(test)] +mod tests { + use super::*; + use alloy_consensus::{Block, Header}; + use alloy_genesis::{Genesis, GenesisAccount}; + use alloy_primitives::Address; + use evm2::evm::AccountInfo; + use reth_chainspec::ChainSpecBuilder; + use reth_db_common::init::init_genesis; + use reth_primitives_traits::Block as _; + use reth_provider::{ + providers::BlockchainProvider, test_utils::create_test_provider_factory_with_chain_spec, + BlockWriter, + }; + use reth_trie_common::{bundle_state::BundleState, HashedPostState, KeccakKeyHasher}; + + #[test] + fn balance_changes_ignore_account_existence() { + let transitions = [ + (1, None, Some(0)), // Zero-balance creation. + (2, Some(0), None), // Zero-balance deletion. + (3, None, Some(10)), // Funded creation. + (4, Some(10), None), // Funded deletion. + (5, Some(10), Some(20)), // Balance increase. + (6, Some(10), Some(0)), // Existing account emptied. + (7, Some(10), Some(10)), // Nonce-only change. + ] + .map(|(id, before, after)| { + ( + Address::with_last_byte(id), + before.map(|balance| AccountInfo { + balance: U256::from(balance), + nonce: 1, + ..Default::default() + }), + after.map(|balance| AccountInfo { + balance: U256::from(balance), + nonce: 2, + ..Default::default() + }), + ) + }); + let genesis = Genesis::default().extend_accounts(transitions.iter().filter_map( + |(address, before, _)| { + before.as_ref().map(|account| { + ( + *address, + GenesisAccount::default() + .with_balance(account.balance) + .with_nonce(Some(account.nonce)), + ) + }) + }, + )); + let factory = create_test_provider_factory_with_chain_spec(Arc::new( + ChainSpecBuilder::mainnet().genesis(genesis).build(), + )); + let genesis_hash = init_genesis(&factory).unwrap(); + let block = Block { + header: Header { parent_hash: genesis_hash, number: 1, ..Default::default() }, + body: Default::default(), + }; + let outcome = ExecutionOutcome { + bundle: BundleState::new( + transitions.iter().map(|(address, before, after)| { + (*address, before.clone(), after.clone(), Default::default()) + }), + [transitions + .iter() + .map(|(address, before, _)| (*address, Some(before.clone()), []))], + [], + ), + first_block: 1, + receipts: vec![vec![]], + ..Default::default() + }; + let provider_rw = factory.provider_rw().unwrap(); + provider_rw + .append_blocks_with_state( + vec![block.seal_slow().try_recover().unwrap()], + &outcome, + HashedPostState::from_bundle_state::(&outcome.bundle.state) + .into_sorted(), + ) + .unwrap(); + provider_rw.commit().unwrap(); + let api = RethApi::new( + BlockchainProvider::new(factory).unwrap(), + (), + BlockingTaskGuard::new(1), + Runtime::test(), + ); + + assert_eq!( + api.try_balance_changes_in_block(1.into()).unwrap(), + AddressMap::from_iter([ + (Address::with_last_byte(3), U256::from(10)), + (Address::with_last_byte(4), U256::ZERO), + (Address::with_last_byte(5), U256::from(20)), + (Address::with_last_byte(6), U256::ZERO), + ]) + ); + } +} From 0802d10ba3343d2b9fb55bc9b4bc471145cd2110 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 5 Nov 2026 04:49:17 +0100 Subject: [PATCH 005/100] fix(net): apply netrestrict to startup peers (#28198) --- crates/net/network/src/peers.rs | 194 +++++++++++++++++++++++++++++--- 1 file changed, 178 insertions(+), 16 deletions(-) diff --git a/crates/net/network/src/peers.rs b/crates/net/network/src/peers.rs index 10747d417c6..234cbd10fc0 100644 --- a/crates/net/network/src/peers.rs +++ b/crates/net/network/src/peers.rs @@ -149,11 +149,15 @@ impl PeersManager { HashSet::with_capacity_and_hasher(trusted_nodes.len(), Default::default()); for trusted_peer in &trusted_nodes { - // Tracked even if resolution fails, otherwise the resolver's later results for this - // peer are discarded as revoked. + // Tracked even if resolution fails or the address is filtered, otherwise the resolver's + // later results for this peer are discarded as revoked. trusted_peer_ids.insert(trusted_peer.id); match trusted_peer.resolve_blocking() { Ok(NodeRecord { address, tcp_port, udp_port, id }) => { + if !ip_filter.is_allowed(&address) { + trace!(target: "net::peers", ?id, ?address, "Skipping trusted peer address not in allowed ranges"); + continue + } peers.entry(id).or_insert_with(|| { Peer::trusted(PeerAddr::new_with_ports(address, tcp_port, Some(udp_port))) }); @@ -172,10 +176,15 @@ impl PeersManager { continue } let NodeRecord { address, tcp_port, udp_port, id } = record; + // Filtering an address does not revoke the peer's trusted identity. + if kind.is_trusted() { + trusted_peer_ids.insert(id); + } + if !ip_filter.is_allowed(&address) { + trace!(target: "net::peers", ?id, ?address, "Skipping persisted peer from IP not in allowed ranges"); + continue + } peers.entry(id).or_insert_with(|| { - if kind.is_trusted() { - trusted_peer_ids.insert(id); - } let mut peer = Peer::with_kind( PeerAddr::new_with_ports(address, tcp_port, Some(udp_port)), kind, @@ -187,13 +196,17 @@ impl PeersManager { } for NodeRecord { address, tcp_port, udp_port, id } in basic_nodes { + if !ip_filter.is_allowed(&address) { + trace!(target: "net::peers", ?id, ?address, "Skipping basic peer from IP not in allowed ranges"); + continue + } peers.entry(id).or_insert_with(|| { Peer::new(PeerAddr::new_with_ports(address, tcp_port, Some(udp_port))) }); } - // A configured trusted peer that failed to resolve has no trusted entry yet, so a persisted - // or basic record for it must be promoted to keep the id set and the kind in sync. + // A trusted peer with an unresolved or filtered address has no trusted entry yet, so any + // persisted or basic fallback record must inherit its trusted kind. for id in &trusted_peer_ids { if let Some(peer) = peers.get_mut(id) { peer.kind = PeerKind::Trusted; @@ -944,7 +957,8 @@ impl PeersManager { /// Called for a newly discovered peer. /// /// If the peer already exists, then the address, kind and `fork_id` will be updated. - /// If the peer exists and a [`PeerKind`] is provided then the peer's kind is updated + /// If the peer exists and a [`PeerKind`] is provided then the peer's kind is updated. + /// New peers without an explicit kind inherit trust registered for their ID. pub(crate) fn add_peer_kind( &mut self, peer_id: PeerId, @@ -983,7 +997,14 @@ impl PeersManager { } Entry::Vacant(entry) => { trace!(target: "net::peers", ?peer_id, addr=?addr.tcp(), "discovered new node"); - let mut peer = Peer::with_kind(addr, kind.unwrap_or(PeerKind::Basic)); + let kind = kind.unwrap_or_else(|| { + if self.trusted_peer_ids.contains(&peer_id) { + PeerKind::Trusted + } else { + PeerKind::Basic + } + }); + let mut peer = Peer::with_kind(addr, kind); peer.fork_id = fork_id.map(Box::new); entry.insert(peer); self.queued_actions.push_back(PeerAction::PeerAdded(peer_id)); @@ -1282,6 +1303,11 @@ impl PeersManager { return } + if !self.ip_filter.is_allowed(&new_record.address) { + trace!(target: "net::peers", ?peer_id, address=?new_record.address, "Ignoring resolved trusted peer address not in allowed ranges"); + return + } + let new_addr = PeerAddr::new_with_ports( new_record.address, new_record.tcp_port, @@ -3722,6 +3748,42 @@ mod tests { assert!(peers.on_incoming_pending_session(ip3).is_ok()); } + #[tokio::test] + async fn test_ip_filter_skips_configured_peers() { + let allowed = NodeRecord::new("192.168.1.1:30303".parse().unwrap(), PeerId::random()); + let trusted = NodeRecord::new("10.0.0.1:30303".parse().unwrap(), PeerId::random()); + let persisted = NodeRecord::new("10.0.0.2:30303".parse().unwrap(), PeerId::random()); + let basic = NodeRecord::new("10.0.0.3:30303".parse().unwrap(), PeerId::random()); + + let mut config = PeersConfig::test() + .with_ip_filter(IpFilter::from_cidr_string("192.168.0.0/16").unwrap()) + .with_trusted_nodes(vec![trusted.into()]) + .with_basic_nodes(std::iter::once(basic).collect()); + config.persisted_peers = + [allowed, persisted].into_iter().map(PersistedPeerInfo::from_node_record).collect(); + let mut peers = PeersManager::new(config); + + assert_eq!(peers.peers.keys().collect::>(), [&allowed.id]); + assert!(peers.trusted_peer_ids.contains(&trusted.id)); + assert_eq!( + peers.persistable_peers().map(|peer| peer.record).collect::>(), + [allowed] + ); + peers.fill_outbound_slots(); + assert!( + matches!(peers.queued_actions.pop_front(), Some(PeerAction::Connect { peer_id, remote_addr }) + if peer_id == allowed.id && remote_addr == allowed.tcp_addr()) + ); + assert!(peers.queued_actions.is_empty()); + + peers.on_resolved_peer(trusted.id, trusted); + assert!(!peers.peers.contains_key(&trusted.id)); + let resolved = NodeRecord::new("192.168.1.2:30303".parse().unwrap(), trusted.id); + peers.on_resolved_peer(trusted.id, resolved); + peers.on_resolved_peer(trusted.id, trusted); + assert_eq!(peers.peers[&trusted.id].addr.tcp(), resolved.tcp_addr()); + } + #[tokio::test] async fn test_best_unconnected_prefers_fork_id_as_tiebreaker() { let mut peers = PeersManager::default(); @@ -3861,7 +3923,8 @@ mod tests { let mut manager = PeersManager::default(); manager.add_trusted_peer_node(trusted); - manager.add_peer(peer_id, PeerAddr::from_tcp(addr), None); + manager.add_peer_kind(peer_id, Some(PeerKind::Basic), PeerAddr::from_tcp(addr), None); + assert_eq!(manager.peers[&peer_id].kind, PeerKind::Basic); manager.on_resolved_peer(peer_id, NodeRecord::new(addr, peer_id)); assert!(manager.peers[&peer_id].is_trusted()); } @@ -4425,12 +4488,7 @@ mod tests { if !register_first { peers.add_trusted_peer_node(trusted); } - // A peer tracked before registration is promoted right away, one discovered afterwards - // only on resolution. - assert_eq!( - peers.peers[&peer_id].kind, - if register_first { PeerKind::Basic } else { PeerKind::Trusted } - ); + assert_eq!(peers.peers[&peer_id].kind, PeerKind::Trusted); peers.queued_actions.clear(); peers.fill_outbound_slots(); assert!( @@ -4465,4 +4523,108 @@ mod tests { assert_eq!(peers.connection_info.num_pending_out, 1); assert_eq!(peers.connection_info.num_outbound, 1); } + + #[tokio::test] + async fn test_ip_filter_preserves_trust_on_rediscovery() { + for persisted in [false, true] { + let blocked = NodeRecord::new("10.0.0.1:30303".parse().unwrap(), PeerId::random()); + let allowed = NodeRecord::new("192.168.1.1:30303".parse().unwrap(), blocked.id); + let mut config = PeersConfig::test() + .with_ip_filter(IpFilter::from_cidr_string("192.168.0.0/16").unwrap()); + if persisted { + config.persisted_peers.push(PersistedPeerInfo { + kind: PeerKind::Trusted, + ..PersistedPeerInfo::from_node_record(blocked) + }); + } else { + config.trusted_nodes.push(blocked.into()); + } + let mut peers = PeersManager::new(config); + assert!(peers.peers.is_empty()); + assert!(peers.trusted_peer_ids.contains(&blocked.id)); + peers.add_peer(blocked.id, PeerAddr::from_tcp(blocked.tcp_addr()), None); + assert!(peers.peers.is_empty()); + + peers.add_peer(allowed.id, PeerAddr::from_tcp(allowed.tcp_addr()), None); + assert_eq!(peers.peers[&allowed.id].kind, PeerKind::Trusted); + peers.apply_reputation_change(&allowed.id, ReputationChangeKind::Timeout); + assert_eq!(peers.peers[&allowed.id].reputation, DEFAULT_REPUTATION); + peers.remove_peer(allowed.id); + assert!(peers.peers.contains_key(&allowed.id)); + assert_eq!(peers.persistable_peers().next().unwrap().kind, PeerKind::Trusted); + + peers.remove_peer_from_trusted_set(allowed.id); + peers.remove_peer(allowed.id); + peers.add_peer(allowed.id, PeerAddr::from_tcp(allowed.tcp_addr()), None); + assert_eq!(peers.peers[&allowed.id].kind, PeerKind::Basic); + } + } + + #[tokio::test] + async fn test_ip_filter_preserves_trust_with_startup_fallback() { + for persisted_trust in [false, true] { + for persisted_fallback in [false, true] { + let blocked = NodeRecord::new("10.0.0.1:30303".parse().unwrap(), PeerId::random()); + let allowed = NodeRecord::new("192.168.1.1:30303".parse().unwrap(), blocked.id); + let mut config = PeersConfig::test() + .with_ip_filter(IpFilter::from_cidr_string("192.168.0.0/16").unwrap()); + if persisted_trust { + config.persisted_peers.push(PersistedPeerInfo { + kind: PeerKind::Trusted, + ..PersistedPeerInfo::from_node_record(blocked) + }); + } else { + config.trusted_nodes.push(blocked.into()); + } + if persisted_fallback { + config.persisted_peers.push(PersistedPeerInfo::from_node_record(allowed)); + } else { + config.basic_nodes.insert(allowed); + } + let peers = PeersManager::new(config); + assert_eq!(peers.peers.len(), 1); + assert!(peers.trusted_peer_ids.contains(&allowed.id)); + assert_eq!(peers.peers[&allowed.id].kind, PeerKind::Trusted); + assert_eq!(peers.peers[&allowed.id].addr.tcp(), allowed.tcp_addr()); + } + } + } + + #[tokio::test] + async fn test_ip_filter_startup_ipv6_and_allowed_metadata() { + for kind in [PeerKind::Basic, PeerKind::Static, PeerKind::Trusted] { + let allowed = NodeRecord::new("[2001:db8::1]:30303".parse().unwrap(), PeerId::random()); + let blocked = NodeRecord::new("[2001:db9::1]:30303".parse().unwrap(), PeerId::random()); + let fork_id = ForkId { hash: ForkHash([1, 2, 3, 4]), next: 0 }; + let mut config = PeersConfig::test() + .with_ip_filter(IpFilter::from_cidr_string("2001:db8::/32").unwrap()); + config.persisted_peers = [allowed, blocked] + .into_iter() + .map(|record| PersistedPeerInfo { + record, + kind, + fork_id: Some(fork_id), + reputation: 10, + }) + .collect(); + let mut peers = PeersManager::new(config); + assert_eq!(peers.peers.len(), 1); + assert_eq!(peers.trusted_peer_ids.contains(&blocked.id), kind.is_trusted()); + assert_eq!( + peers.persistable_peers().collect::>(), + [PersistedPeerInfo { + record: allowed, + kind, + fork_id: Some(fork_id), + reputation: 10, + }] + ); + peers.fill_outbound_slots(); + assert!( + matches!(peers.queued_actions.pop_front(), Some(PeerAction::Connect { peer_id, remote_addr }) + if peer_id == allowed.id && remote_addr == allowed.tcp_addr()) + ); + assert!(peers.queued_actions.is_empty()); + } + } } From aa03178bd85acc870e2ae480776692ebe88a4a16 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 5 Nov 2026 07:35:04 +0100 Subject: [PATCH 006/100] fix(rpc): report retained receipt history (#28201) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/rpc/rpc-eth-api/src/core.rs | 2 +- crates/rpc/rpc-eth-api/src/helpers/spec.rs | 117 +++++++------- .../src/providers/blockchain_provider.rs | 6 + .../provider/src/providers/consistent.rs | 6 + .../provider/src/providers/database/mod.rs | 144 +++++++++++++++++- .../src/providers/database/provider.rs | 73 +++++++++ .../storage-api/src/prune_checkpoint.rs | 12 ++ 7 files changed, 302 insertions(+), 58 deletions(-) diff --git a/crates/rpc/rpc-eth-api/src/core.rs b/crates/rpc/rpc-eth-api/src/core.rs index 97dd8676aaa..fb73505bff0 100644 --- a/crates/rpc/rpc-eth-api/src/core.rs +++ b/crates/rpc/rpc-eth-api/src/core.rs @@ -90,7 +90,7 @@ pub trait EthApi< /// /// See the `eth_capabilities` execution API proposal: /// . - #[method(name = "capabilities")] + #[method(name = "capabilities", blocking)] fn capabilities(&self) -> RpcResult; /// Returns information about a block by hash. diff --git a/crates/rpc/rpc-eth-api/src/helpers/spec.rs b/crates/rpc/rpc-eth-api/src/helpers/spec.rs index 197cfd803d4..4e162c87a82 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/spec.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/spec.rs @@ -6,7 +6,7 @@ use futures::Future; use reth_chainspec::ChainInfo; use reth_errors::{RethError, RethResult}; use reth_network_api::NetworkInfo; -use reth_prune_types::{PruneMode, PruneSegment}; +use reth_prune_types::{PruneCheckpoint, PruneMode, PruneSegment}; use reth_rpc_convert::RpcTxReq; use reth_rpc_eth_types::{EthCapabilities, EthCapabilitiesHead, EthCapabilitiesResource}; use reth_storage_api::{ @@ -53,21 +53,23 @@ pub trait EthApiSpec: RpcNodeCore + EthApiTypes { Self: EthState, { let chain_info = self.chain_info()?; - let provider = self.provider(); + let checkpoints = self.provider().get_prune_checkpoints_for_availability()?; let state = effective_resource( - provider, + &checkpoints, &[PruneSegment::AccountHistory, PruneSegment::StorageHistory], - )?; - let tx = - effective_resource(provider, &[PruneSegment::TransactionLookup, PruneSegment::Bodies])?; + ); + let tx = effective_resource( + &checkpoints, + &[PruneSegment::TransactionLookup, PruneSegment::Bodies], + ); let logs = - effective_resource(provider, &[PruneSegment::Receipts, PruneSegment::ContractLogs])?; + effective_resource(&checkpoints, &[PruneSegment::Receipts, PruneSegment::ContractLogs]); let receipts = effective_resource( - provider, + &checkpoints, &[PruneSegment::Receipts, PruneSegment::TransactionLookup, PruneSegment::Bodies], - )?; - let blocks = effective_resource(provider, &[PruneSegment::Bodies])?; + ); + let blocks = effective_resource(&checkpoints, &[PruneSegment::Bodies]); let proof_window = self.max_proof_window(); let proof_oldest = chain_info @@ -125,8 +127,8 @@ pub trait EthApiSpec: RpcNodeCore + EthApiTypes { } } -/// Derives the effective block availability for a capability resource from the prune checkpoints of -/// all storage segments needed to serve it. +/// Derives effective block availability from checkpoints adjusted for retained data by +/// [`PruneCheckpointReader::get_prune_checkpoints_for_availability`]. /// /// A resource is only available where every required segment is available, so the oldest available /// block is the maximum pruned checkpoint across the segments. If any segment is configured with a @@ -136,15 +138,15 @@ pub trait EthApiSpec: RpcNodeCore + EthApiTypes { /// /// See also: fn effective_resource( - provider: &impl PruneCheckpointReader, + checkpoints: &[(PruneSegment, PruneCheckpoint)], segments: &[PruneSegment], -) -> RethResult { +) -> EthCapabilitiesResource { let mut oldest_block = 0; let mut retention_blocks = None::; let mut disabled = false; for segment in segments { - let Some(checkpoint) = provider.get_prune_checkpoint(*segment)? else { + let Some((_, checkpoint)) = checkpoints.iter().find(|(key, _)| key == segment) else { continue; }; @@ -171,13 +173,13 @@ fn effective_resource( } } - Ok(if disabled { + if disabled { EthCapabilitiesResource::disabled() } else if let Some(retention_blocks) = retention_blocks { EthCapabilitiesResource::window(oldest_block, retention_blocks) } else { EthCapabilitiesResource::available_from(oldest_block) - }) + } } /// A handle to [`EthSigner`]s with its generics set from [`TransactionsProvider`] and @@ -189,70 +191,77 @@ pub type SignersForRpc = parking_lot::RwLock< #[cfg(test)] mod tests { use super::*; - use reth_prune_types::PruneCheckpoint; - use reth_storage_api::errors::provider::ProviderResult; - use std::collections::HashMap; - - #[derive(Default)] - struct TestPruneCheckpointReader { - checkpoints: HashMap, - } - - impl TestPruneCheckpointReader { - fn with_checkpoint(segment: PruneSegment, checkpoint: PruneCheckpoint) -> Self { - Self { checkpoints: HashMap::from([(segment, checkpoint)]) } - } - } - - impl PruneCheckpointReader for TestPruneCheckpointReader { - fn get_prune_checkpoint( - &self, - segment: PruneSegment, - ) -> ProviderResult> { - Ok(self.checkpoints.get(&segment).copied()) - } - - fn get_prune_checkpoints(&self) -> ProviderResult> { - Ok(self - .checkpoints - .iter() - .map(|(segment, checkpoint)| (*segment, *checkpoint)) - .collect()) - } - } #[test] fn full_prune_segment_without_retention_disables_resource() { - let provider = TestPruneCheckpointReader::with_checkpoint( + let checkpoints = [( PruneSegment::TransactionLookup, PruneCheckpoint { block_number: Some(10), tx_number: None, prune_mode: PruneMode::Full, }, - ); + )]; - let resource = effective_resource(&provider, &[PruneSegment::TransactionLookup]).unwrap(); + let resource = effective_resource(&checkpoints, &[PruneSegment::TransactionLookup]); assert_eq!(resource, EthCapabilitiesResource::disabled()); } #[test] fn full_prune_segment_with_minimum_retention_uses_window() { - let provider = TestPruneCheckpointReader::with_checkpoint( + let checkpoints = [( PruneSegment::Bodies, PruneCheckpoint { block_number: Some(10), tx_number: None, prune_mode: PruneMode::Full, }, - ); + )]; - let resource = effective_resource(&provider, &[PruneSegment::Bodies]).unwrap(); + let resource = effective_resource(&checkpoints, &[PruneSegment::Bodies]); assert_eq!( resource, EthCapabilitiesResource::window(11, PruneSegment::Bodies.min_blocks()) ); } + + #[test] + fn retained_receipts_preserve_resource_limits() { + let checkpoints = [ + ( + PruneSegment::Receipts, + PruneCheckpoint { + block_number: None, + tx_number: None, + prune_mode: PruneMode::Distance(100), + }, + ), + ( + PruneSegment::ContractLogs, + PruneCheckpoint { + prune_mode: PruneMode::Distance(50), + ..PruneCheckpoint::pruned_through(19) + }, + ), + (PruneSegment::TransactionLookup, PruneCheckpoint::pruned_through(39)), + (PruneSegment::Bodies, PruneCheckpoint::pruned_through(29)), + ]; + for (segments, expected) in [ + (vec![PruneSegment::Receipts], EthCapabilitiesResource::window(0, 100)), + ( + vec![PruneSegment::Receipts, PruneSegment::ContractLogs], + EthCapabilitiesResource::window(20, 50), + ), + ( + vec![PruneSegment::Receipts, PruneSegment::TransactionLookup, PruneSegment::Bodies], + EthCapabilitiesResource::window(40, 100), + ), + (vec![PruneSegment::Bodies], EthCapabilitiesResource::available_from(30)), + (vec![PruneSegment::AccountHistory], EthCapabilitiesResource::available_from(0)), + ] { + assert_eq!(effective_resource(&checkpoints, &segments), expected, "{segments:?}"); + } + } } diff --git a/crates/storage/provider/src/providers/blockchain_provider.rs b/crates/storage/provider/src/providers/blockchain_provider.rs index f8acc40a164..497386cd34a 100644 --- a/crates/storage/provider/src/providers/blockchain_provider.rs +++ b/crates/storage/provider/src/providers/blockchain_provider.rs @@ -722,6 +722,12 @@ impl PruneCheckpointReader for BlockchainProvider { fn get_prune_checkpoints(&self) -> ProviderResult> { self.consistent_provider()?.get_prune_checkpoints() } + + fn get_prune_checkpoints_for_availability( + &self, + ) -> ProviderResult> { + self.consistent_provider()?.get_prune_checkpoints_for_availability() + } } impl ChainSpecProvider for BlockchainProvider { diff --git a/crates/storage/provider/src/providers/consistent.rs b/crates/storage/provider/src/providers/consistent.rs index 1345260e268..d1e81044ad1 100644 --- a/crates/storage/provider/src/providers/consistent.rs +++ b/crates/storage/provider/src/providers/consistent.rs @@ -1013,6 +1013,12 @@ impl PruneCheckpointReader for ConsistentProvider { fn get_prune_checkpoints(&self) -> ProviderResult> { self.storage_provider.get_prune_checkpoints() } + + fn get_prune_checkpoints_for_availability( + &self, + ) -> ProviderResult> { + self.storage_provider.get_prune_checkpoints_for_availability() + } } impl ChainSpecProvider for ConsistentProvider { diff --git a/crates/storage/provider/src/providers/database/mod.rs b/crates/storage/provider/src/providers/database/mod.rs index b32d9f0e61e..0df8d8a92ae 100644 --- a/crates/storage/provider/src/providers/database/mod.rs +++ b/crates/storage/provider/src/providers/database/mod.rs @@ -938,6 +938,12 @@ impl PruneCheckpointReader for ProviderFactory { fn get_prune_checkpoints(&self) -> ProviderResult> { self.provider()?.get_prune_checkpoints() } + + fn get_prune_checkpoints_for_availability( + &self, + ) -> ProviderResult> { + self.provider()?.get_prune_checkpoints_for_availability() + } } impl MetadataProvider for ProviderFactory { @@ -1010,13 +1016,13 @@ impl Clone for ProviderFactory { mod tests { use super::*; use crate::{ - providers::{StaticFileProvider, StaticFileWriter}, + providers::{StaticFileProvider, StaticFileProviderBuilder, StaticFileWriter}, test_utils::{ blocks::TEST_BLOCK, create_test_provider_factory, create_test_provider_factory_with_genesis_block_number, MockNodeTypesWithDB, }, BlockHashReader, BlockNumReader, BlockWriter, DBProvider, HeaderSyncGapProvider, - StageCheckpointWriter, TransactionsProvider, + PruneCheckpointWriter, StageCheckpointWriter, TransactionsProvider, }; use alloy_eips::BlockNumHash; use alloy_primitives::{TxNumber, B256}; @@ -1026,7 +1032,8 @@ mod tests { mdbx::DatabaseArguments, test_utils::{create_test_rocksdb_dir, create_test_static_files_dir, ERROR_TEMPDIR}, }; - use reth_db_api::{models::SnapAttempt, tables}; + use reth_db_api::{models::SnapAttempt, tables, transaction::DbTxMut}; + use reth_ethereum_primitives::Receipt; use reth_primitives_traits::SignerRecoverable; use reth_prune_types::{PruneMode, PruneModes}; use reth_storage_api::MetadataWriter; @@ -1418,4 +1425,135 @@ mod tests { factory.set_storage_settings_cache(StorageSettings::v2()); assert!(factory.database_provider_ro().unwrap().ensure_sync_mode(true).is_ok()); } + + #[test] + fn receipt_availability_preserves_prune_checkpoints() { + let moved = PruneCheckpoint { + block_number: Some(7), + tx_number: Some(15), + prune_mode: PruneMode::Before(8), + }; + let available = PruneCheckpoint { block_number: None, tx_number: None, ..moved }; + let pruned = PruneCheckpoint { block_number: Some(4), tx_number: Some(9), ..moved }; + let covered = PruneCheckpoint { block_number: Some(2), tx_number: Some(5), ..moved }; + let anchor = PruneCheckpoint { tx_number: None, ..moved }; + + for (case, blocks_per_file, receipt_blocks, stored, expected) in [ + ("continuous", 3, vec![(0, 9)], [moved; 2], [available; 2]), + ("pruned prefix", 10, vec![(5, 9)], [pruned; 2], [pruned; 2]), + ("padded prefix", 10, vec![(5, 9)], [moved; 2], [pruned; 2]), + ("above tip", 3, vec![(0, 4)], [moved; 2], [moved; 2]), + ("gap", 3, vec![(0, 2), (4, 9)], [moved; 2], [moved; 2]), + ("empty file gap", 3, vec![(0, 2), (6, 9)], [moved; 2], [moved; 2]), + ("covered receipts", 3, vec![(0, 2), (4, 9)], [covered, moved], [available, moved]), + ("covered logs", 3, vec![(0, 2), (4, 9)], [moved, covered], [moved, available]), + ("snap anchor", 3, vec![(0, 9)], [anchor; 2], [anchor; 2]), + ("empty first file", 3, vec![(5, 9)], [moved; 2], [moved; 2]), + ("no files", 3, vec![], [moved; 2], [moved; 2]), + ] { + let factory = + receipt_availability_test_factory(blocks_per_file, &receipt_blocks, stored); + let before = factory.get_prune_checkpoints().unwrap(); + assert_eq!( + factory.get_prune_checkpoints_for_availability().unwrap(), + [(PruneSegment::Receipts, expected[0]), (PruneSegment::ContractLogs, expected[1])], + "{case}", + ); + assert_eq!(factory.get_prune_checkpoints().unwrap(), before); + } + + // Storage v1 keeps new receipts in MDBX when receipt pruning is enabled. + let factory = receipt_availability_test_factory(3, &[(0, 9)], [moved; 2]); + factory.set_storage_settings_cache(StorageSettings::v1()); + assert_eq!( + factory.get_prune_checkpoints_for_availability().unwrap(), + factory.get_prune_checkpoints().unwrap(), + ); + } + + #[test] + fn receipt_availability_requires_body_indices() { + let stored = PruneCheckpoint { + block_number: Some(7), + tx_number: Some(15), + prune_mode: PruneMode::Before(8), + }; + let factory = receipt_availability_test_factory(10, &[(5, 9)], [stored; 2]); + let unchanged = || { + assert_eq!( + factory.get_prune_checkpoints_for_availability().unwrap(), + factory.get_prune_checkpoints().unwrap(), + ); + }; + + let provider = factory.provider_rw().unwrap(); + provider.tx_ref().delete::(4, None).unwrap(); + provider.commit().unwrap(); + unchanged(); + + // A seek can land on the next block after expired history. + let provider = factory.provider_rw().unwrap(); + provider.tx_ref().delete::(9, None).unwrap(); + provider.commit().unwrap(); + unchanged(); + + let provider = factory.provider_rw().unwrap(); + provider.tx_ref().clear::().unwrap(); + provider.commit().unwrap(); + unchanged(); + } + + fn receipt_availability_test_factory( + blocks_per_file: u64, + receipt_blocks: &[(u64, u64)], + checkpoints: [PruneCheckpoint; 2], + ) -> ProviderFactory { + let mut factory = create_test_provider_factory().with_prune_modes(PruneModes { + receipts: Some(PruneMode::Distance(100)), + ..PruneModes::default() + }); + factory.set_storage_settings_cache(StorageSettings::v2()); + factory.static_file_provider = + StaticFileProviderBuilder::read_write(factory.db.path().join("receipt_files")) + .with_blocks_per_file(blocks_per_file) + .build() + .unwrap(); + assert_eq!(factory.get_prune_checkpoints_for_availability().unwrap(), Vec::new()); + + let provider = factory.provider_rw().unwrap(); + // All blocks have two transactions, including blocks whose receipts were pruned. + for block in 0..=9 { + provider + .tx_ref() + .put::( + block, + StoredBlockBodyIndices { first_tx_num: 2 * block, tx_count: 2 }, + ) + .unwrap(); + provider.tx_ref().put::(2 * block + 1, block).unwrap(); + } + for (segment, checkpoint) in + [PruneSegment::Receipts, PruneSegment::ContractLogs].into_iter().zip(checkpoints) + { + provider.save_prune_checkpoint(segment, checkpoint).unwrap(); + } + provider.commit().unwrap(); + + for &(start, end) in receipt_blocks { + let static_file_provider = factory.static_file_provider(); + let mut writer = + static_file_provider.latest_writer(StaticFileSegment::Receipts).unwrap(); + if let Some(last_pruned) = start.checked_sub(1) { + writer.ensure_at_block(last_pruned).unwrap(); + } + for block in start..=end { + writer.increment_block(block).unwrap(); + for tx in 2 * block..2 * block + 2 { + writer.append_receipt(tx, &Receipt::default()).unwrap(); + } + } + writer.commit().unwrap(); + } + factory + } } diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index 3d172c86d8f..e050d3ae17e 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -3932,6 +3932,79 @@ impl PruneCheckpointReader for DatabaseProvide }) .collect::>()?) } + + fn get_prune_checkpoints_for_availability( + &self, + ) -> ProviderResult> { + let mut checkpoints = self.get_prune_checkpoints()?; + if !EitherWriter::receipts_destination(self).is_static_file() || + !checkpoints.iter().any(|(segment, checkpoint)| { + matches!(segment, PruneSegment::Receipts | PruneSegment::ContractLogs) && + checkpoint.tx_number.is_some() + }) + { + return Ok(checkpoints) + } + + let Some(lowest_block) = + self.static_file_provider.get_lowest_range_start(StaticFileSegment::Receipts) + else { + return Ok(checkpoints) + }; + let Some(first_tx_range) = self + .static_file_provider + .get_segment_provider_for_block(StaticFileSegment::Receipts, lowest_block, None)? + .user_header() + .tx_range() + else { + return Ok(checkpoints) + }; + + // Migration can pad the first file with blocks whose receipts were already pruned. + // TransactionBlocks::seek can also land after expired history, so verify the body range. + let pruned_tx = first_tx_range.start().checked_sub(1); + let pruned_block = if let Some(tx) = pruned_tx { + if let Some((_, block)) = + self.tx.cursor_read::()?.seek(tx)? && + let Some(indices) = self.tx.get::(block)? && + indices.tx_num_range().contains(&tx) + { + Some(block).max(lowest_block.checked_sub(1)) + } else { + return Ok(checkpoints) + } + } else { + lowest_block.checked_sub(1) + }; + + // The removed StaticFileReceipts pruner checkpointed moves into static files. + // Writers enforce continuity within each file, but migration can leave gaps between files. + // Reuse the verified coverage for both receipts and logs. + let mut last_tx = first_tx_range.end(); + for (segment, checkpoint) in &mut checkpoints { + if matches!(segment, PruneSegment::Receipts | PruneSegment::ContractLogs) && + let Some(tx) = checkpoint.tx_number && + tx >= first_tx_range.start() + { + while let Some(next_tx) = last_tx.checked_add(1) && + next_tx <= tx && + let Some(next_file) = self + .static_file_provider + .get_maybe_segment_provider(StaticFileSegment::Receipts, next_tx)? && + let Some(next_range) = next_file.user_header().tx_range() && + next_range.start() == next_tx + { + last_tx = next_range.end(); + } + if tx <= last_tx { + checkpoint.block_number = pruned_block; + checkpoint.tx_number = pruned_tx; + } + } + } + + Ok(checkpoints) + } } impl PruneCheckpointWriter for DatabaseProvider { diff --git a/crates/storage/storage-api/src/prune_checkpoint.rs b/crates/storage/storage-api/src/prune_checkpoint.rs index 92cce41f0b5..574242f38bc 100644 --- a/crates/storage/storage-api/src/prune_checkpoint.rs +++ b/crates/storage/storage-api/src/prune_checkpoint.rs @@ -13,6 +13,18 @@ pub trait PruneCheckpointReader: Send { /// Fetch all the prune checkpoints. fn get_prune_checkpoints(&self) -> ProviderResult>; + + /// Fetch checkpoints for reporting data availability, accounting for data still retained in + /// other storage backends. This does not modify the stored checkpoints. + /// + /// The default returns the stored checkpoints. Implementations may lower their block and + /// transaction numbers when continuous coverage can be verified, preserving the prune mode. + /// Use [`Self::get_prune_checkpoints`] for pruning progress instead. + fn get_prune_checkpoints_for_availability( + &self, + ) -> ProviderResult> { + self.get_prune_checkpoints() + } } /// The trait for updating prune checkpoint related data. From 9580b7fc1dfa388a952af4058c9f9806501e51f4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 5 Nov 2026 10:07:16 +0100 Subject: [PATCH 007/100] test(storage): cover Zstd 0.13 compatibility (#28288) --- crates/storage/nippy-jar/src/lib.rs | 36 ++++++++++++++ .../tests/fixtures/zstd-0.13/README.md | 45 ++++++++++++++++++ .../tests/fixtures/zstd-0.13/dictionary | Bin 0 -> 5800 bytes .../tests/fixtures/zstd-0.13/dictionary.block | Bin 0 -> 20 bytes .../tests/fixtures/zstd-0.13/dictionary.conf | Bin 0 -> 1469 bytes .../tests/fixtures/zstd-0.13/dictionary.off | Bin 0 -> 1609 bytes .../nippy-jar/tests/fixtures/zstd-0.13/plain | Bin 0 -> 5800 bytes .../tests/fixtures/zstd-0.13/plain.conf | Bin 0 -> 63 bytes .../tests/fixtures/zstd-0.13/plain.off | Bin 0 -> 1609 bytes 9 files changed, 81 insertions(+) create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/README.md create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary.block create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary.conf create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary.off create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/plain create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/plain.conf create mode 100644 crates/storage/nippy-jar/tests/fixtures/zstd-0.13/plain.off diff --git a/crates/storage/nippy-jar/src/lib.rs b/crates/storage/nippy-jar/src/lib.rs index fc1a381f3ef..ee78a6286dc 100644 --- a/crates/storage/nippy-jar/src/lib.rs +++ b/crates/storage/nippy-jar/src/lib.rs @@ -1264,4 +1264,40 @@ mod tests { } assert!(cursor.row_by_number(rows).unwrap().is_none()); } + + #[test] + fn test_zstd_013_compatibility() { + // These jars and the dictionary-compressed block were written with zstd 0.13.3. + let col1 = (0..100u8).map(|i| vec![i; 32]).collect::>(); + let col2 = (0..100u8) + .map(|i| (0..32u8).map(|j| i.wrapping_add(j)).collect::>()) + .collect::>(); + let fixtures = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/zstd-0.13"); + let directory = tempfile::tempdir().unwrap(); + for name in ["dictionary", "plain"] { + let path = directory.path().join(name); + for extension in ["", CONFIG_FILE_EXTENSION, OFFSETS_FILE_EXTENSION] { + reth_fs_util::write( + path.with_extension(extension), + reth_fs_util::read(fixtures.join(name).with_extension(extension)).unwrap(), + ) + .unwrap(); + } + assert_jar_rows(&path, &col1, &col2, 100); + } + + let jar = NippyJar::load_without_header(&directory.path().join("dictionary")).unwrap(); + let Some(Compressors::Zstd(zstd)) = jar.compressor() else { + panic!("Expected Zstd compressor") + }; + let encoded = include_bytes!("../tests/fixtures/zstd-0.13/dictionary.block"); + let mut output = Vec::with_capacity(32); + compression::Zstd::decompress_with_dictionary( + encoded, + &mut output, + &mut zstd.decompressors().unwrap()[0], + ) + .unwrap(); + assert_eq!(output, col1[5]); + } } diff --git a/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/README.md b/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/README.md new file mode 100644 index 00000000000..4f9d1c91e72 --- /dev/null +++ b/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/README.md @@ -0,0 +1,45 @@ +These fixtures were generated from Reth commit +`b51bb683f8` with the unchanged lockfile dependencies: + +- `zstd 0.13.3` +- `zstd-safe 7.3.0` +- `zstd-sys 2.1.0+zstd.1.5.7` + +Both jars contain 100 rows and two 32-byte columns. Column 0 repeats the row +number; column 1 contains the row number plus each byte offset, wrapping at 256. +`dictionary.conf` also stores the trained dictionaries. The current jar writer +writes streaming frames even when dictionaries are configured, so +`dictionary.block` separately exercises a frame compressed with the first trained +dictionary. It contains column 0 of row 5. + +To reproduce, add the following temporary test to `src/lib.rs`'s existing `tests` +module at the producer revision, then run: + +```sh +cargo tree --offline --locked -p reth-nippy-jar -i zstd@0.13.3 +cargo test --offline --locked -p reth-nippy-jar generate_zstd_013_fixtures +``` + +```rust +#[test] +fn generate_zstd_013_fixtures() { + let col1 = (0..100u8).map(|i| vec![i; 32]).collect::>(); + let col2 = (0..100u8) + .map(|i| (0..32u8).map(|j| i.wrapping_add(j)).collect::>()) + .collect::>(); + let directory = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/zstd-0.13"); + reth_fs_util::create_dir_all(&directory).unwrap(); + for (name, dictionary) in [("dictionary", true), ("plain", false)] { + let path = directory.join(name); + let mut jar = NippyJar::new_without_header(2, &path).with_zstd(dictionary, 1024); + if dictionary { + jar.prepare_compression(vec![col1.clone(), col2.clone()]).unwrap(); + let Compressors::Zstd(zstd) = jar.compressor().unwrap() else { unreachable!() }; + let encoded = zstd.compressors().unwrap().unwrap()[0].compress(&col1[5]).unwrap(); + reth_fs_util::write(directory.join("dictionary.block"), encoded).unwrap(); + } + jar.freeze(vec![clone_with_result(&col1), clone_with_result(&col2)], 100).unwrap(); + assert_jar_rows(&path, &col1, &col2, 100); + } +} +``` diff --git a/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary b/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary new file mode 100644 index 0000000000000000000000000000000000000000..4db10874ad56e5ea015af05082c91ba372989792 GIT binary patch literal 5800 zcmajgRdXUi6a`@7?(W2i5?3O`-GvAdvJ!W24mO=Bu`Q&$a!r z|FgKpEtYhPCBjniH`3<&BO=24GcqbVCN?fUAu%aAB{eNQBQq;ICpRy@ps=X8q_oWc zp(Z1|U+ZNUXoZZ7WT{@!S`HZ%#ZtLdYk37^bTmuV8NIL)GA4$l;&L=t1sNO5QhuvG zSPdB$$5Q$nepmw;AJ0s%!cNG%JeHw&6vHma{Ct+d zT$R9X$btfvfk2kQ9>~H%mi{D{!d}RtB9^`pAcuXB#lH7!$1dQX(>zf zijD!uvND#+tvUtKhuHn(ZyEZS5VMUEMvsef=67 zhODSy83sBbD=S&5S9Fd*R#mZ7Zq+$53RzvvQgucz9D}T>VX3$r4UR+B*0Pk}st-;; z+H5SP&*6uYkacw|W$ze(Q;_xbEF}dHgwv1>4J^f#6M{34jg2gYB?mYQ+0?{RRI55T z2ie@rQc&c2I1g#Jvov=H!3D^c7M7;AVz>y|+RD<{j|R8|+1AF=(8xx(4B6h!k`urL zS0Fn&SW` z1iB#m`d9`6Sq8Tt`}ohFmg33@!86GDd6vSG13ZUZSYRotRUN#5 zTwG)+C~`f#gj`x;Y3>e!SCGrgEKP02@EUSug{83{4e$nXb(N)|k&W;ca&3(zCx8jw zL9VZ}r06iid&rFqmio*Qzz4|9O_sW_62V7Emy0D*P6(eMx3*Y@;!zBrA-A_#26I&c zUm$mOSOx-F245j}cUk(ATngVH-ENk?5g>=}kb8S9wb`M7ACUX|EW^N0$b$ox>J>kK zKpq~lRBrY2$4^L)ho$O_Uib_0=!m5@JH8*EoSvOuTwYz@+}_ literal 0 HcmV?d00001 diff --git a/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary.block b/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary.block new file mode 100644 index 0000000000000000000000000000000000000000..7b4ae503b499ddcbeb90ca9e131430cd5a9d1a47 GIT binary patch literal 20 bcmdPcs{dE{@rqX_3bqUk9IT8CyaG%BP$LCk literal 0 HcmV?d00001 diff --git a/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary.conf b/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/dictionary.conf new file mode 100644 index 0000000000000000000000000000000000000000..e78025307576f02e4fb7101f1986b03cb134c36c GIT binary patch literal 1469 zcmZQ%fB+^aodTs9K{S{E(<~5SMwl`NsDSwrgEx;?yfQHqSn&0*0S^Lw&^x_J2a19O zVFp1=0g@c7k9{~4TLhdsIy!7Z7C1QK0tcTj(&z%CrBi~uR<3%*n6hBi!2|;d9=2v6 z1-J2-L~_qeS&%&-mvI2G3>?U!0Bbm~ApmTlKpPHp2moCukcI=eBXBTaPUC?CUIKs* z3M}Bjk^r!R0u4COBmlIaKmraV2>>Z5;DiG%0)QI|OyR(c05FFFRX9*10MwyC6b{4) z0C6Z_g9CN~fCCDQ;J}ywFo6OkI8Y`4RG>fz4ulB+5h!4W0~P{+6$

z<>ZSG&D?u z=4?&Es-xLFd*n8Nw7#kQQOxTzd zeg4duZM-fG42(=n%v|D9QX)q3>QXX1r&NU!Re%}0M@5mNNdZ_!fC>sh!Ag}#5Fdsh z!cHzOPZ*JNJ_7FITP4o)s^9$r3v0YM>Q5if5aUqAnVz@Xre(6I1`$f#&rJ9`I5 zCubK|H+K(DOz9YF8*~+V`UZwZ#wMm_<`$M#n9{!5I=W~|C386h$=BQs}2h|CC)nHiax5h61}WM)Q)%m|SgAwpzE zh|KWf|9Rego;Sa5&#Nc3h*N@1*@=_5fCqS%Z}^jy65>*y{W*qfxr?{>oau?NFUz*< z#aUdz6THeVOiGGQEw%^qO!8Cvp?_^FCiQCoT3B zS;&5z&ow;5oBYAF^yt)M8;<5o?&NVk<7bx1h)zxRas6KaW!}F2A?uDFZQL`nmss! z%Xo~J`H2bn(W${^9LmYu%!7Qux6CaWoyzRY0bIy+JjdJo#f*aJG+;Z924mO=Bu`Q&$a!r z|FgKpEtYhPCBjniH`3<&BO=24GcqbVCN?fUAu%aAB{eNQBQq;ICpRy@ps=X8q_oWc zp(Z1|U+ZNUXoZZ7WT{@!S`HZ%#ZtLdYk37^bTmuV8NIL)GA4$l;&L=t1sNO5QhuvG zSPdB$$5Q$nepmw;AJ0s%!cNG%JeHw&6vHma{Ct+d zT$R9X$btfvfk2kQ9>~H%mi{D{!d}RtB9^`pAcuXB#lH7!$1dQX(>zf zijD!uvND#+tvUtKhuHn(ZyEZS5VMUEMvsef=67 zhODSy83sBbD=S&5S9Fd*R#mZ7Zq+$53RzvvQgucz9D}T>VX3$r4UR+B*0Pk}st-;; z+H5SP&*6uYkacw|W$ze(Q;_xbEF}dHgwv1>4J^f#6M{34jg2gYB?mYQ+0?{RRI55T z2ie@rQc&c2I1g#Jvov=H!3D^c7M7;AVz>y|+RD<{j|R8|+1AF=(8xx(4B6h!k`urL zS0Fn&SW` z1iB#m`d9`6Sq8Tt`}ohFmg33@!86GDd6vSG13ZUZSYRotRUN#5 zTwG)+C~`f#gj`x;Y3>e!SCGrgEKP02@EUSug{83{4e$nXb(N)|k&W;ca&3(zCx8jw zL9VZ}r06iid&rFqmio*Qzz4|9O_sW_62V7Emy0D*P6(eMx3*Y@;!zBrA-A_#26I&c zUm$mOSOx-F245j}cUk(ATngVH-ENk?5g>=}kb8S9wb`M7ACUX|EW^N0$b$ox>J>kK zKpq~lRBrY2$4^L)ho$O_Uib_0=!m5@JH8*EoSvOuTwYz@+}_ literal 0 HcmV?d00001 diff --git a/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/plain.conf b/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/plain.conf new file mode 100644 index 0000000000000000000000000000000000000000..b2ff531281e7d4ec6420c32395371b86c9defdb2 GIT binary patch literal 63 dcmZQ%fB+^aodTs9K{S{E3$Q?iVagn!d;k^^0I&c6 literal 0 HcmV?d00001 diff --git a/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/plain.off b/crates/storage/nippy-jar/tests/fixtures/zstd-0.13/plain.off new file mode 100644 index 0000000000000000000000000000000000000000..9eb7f096e36d8b294c0639f177b36feddada6b74 GIT binary patch literal 1609 zcmXZcXNU-39LI5Y=gv)c?#>C386h$=BQs}2h|CC)nHiax5h61}WM)Q)%m|SgAwpzE zh|KWf|9Rego;Sa5&#Nc3h*N@1*@=_5fCqS%Z}^jy65>*y{W*qfxr?{>oau?NFUz*< z#aUdz6THeVOiGGQEw%^qO!8Cvp?_^FCiQCoT3B zS;&5z&ow;5oBYAF^yt)M8;<5o?&NVk<7bx1h)zxRas6KaW!}F2A?uDFZQL`nmss! z%Xo~J`H2bn(W${^9LmYu%!7Qux6CaWoyzRY0bIy+JjdJo#f*aJG+;Z9 Date: Thu, 5 Nov 2026 10:07:30 +0100 Subject: [PATCH 008/100] chore(deps): upgrade discovery and secp256k1 (#28289) --- Cargo.lock | 248 +++++++++++------- Cargo.toml | 10 +- crates/cli/commands/Cargo.toml | 1 + crates/cli/commands/src/node.rs | 2 +- crates/cli/commands/src/p2p/bootnode.rs | 8 +- crates/cli/commands/src/p2p/rlpx.rs | 3 +- crates/cli/util/Cargo.toml | 5 +- crates/cli/util/src/load_secret_key.rs | 23 +- .../src/tree/payload_processor/bal/execute.rs | 35 +-- crates/ethereum/evm/tests/execute.rs | 17 +- crates/exex/exex/src/backfill/job.rs | 17 +- crates/exex/exex/src/backfill/stream.rs | 13 +- crates/net/discv4/Cargo.toml | 8 +- crates/net/discv4/benches/codec.rs | 5 +- crates/net/discv4/src/lib.rs | 54 ++-- crates/net/discv4/src/node.rs | 2 +- crates/net/discv4/src/proto.rs | 53 ++-- crates/net/discv4/src/test_utils.rs | 34 +-- crates/net/discv5/Cargo.toml | 3 +- crates/net/discv5/src/config.rs | 18 +- crates/net/discv5/src/enr.rs | 17 +- crates/net/discv5/src/filter.rs | 2 +- crates/net/discv5/src/lib.rs | 54 ++-- crates/net/dns/src/lib.rs | 16 +- crates/net/dns/src/sync.rs | 4 +- crates/net/ecies/Cargo.toml | 2 +- crates/net/ecies/src/algorithm.rs | 53 ++-- crates/net/ecies/src/stream.rs | 13 +- crates/net/eth-wire/Cargo.toml | 4 +- crates/net/eth-wire/src/ethstream.rs | 18 +- crates/net/eth-wire/src/hello.rs | 34 +-- crates/net/eth-wire/src/test_utils.rs | 6 +- crates/net/network-api/src/noop.rs | 2 +- crates/net/network/Cargo.toml | 3 +- crates/net/network/src/config.rs | 7 +- crates/net/network/src/discovery.rs | 23 +- crates/net/network/src/manager.rs | 6 +- crates/net/network/src/session/active.rs | 10 +- crates/net/network/src/session/tests.rs | 3 +- .../network/src/test_utils/transactions.rs | 2 +- crates/net/network/src/transactions/mod.rs | 14 +- crates/net/network/tests/it/eth72.rs | 3 +- crates/net/peers/Cargo.toml | 1 - crates/net/peers/src/lib.rs | 4 +- crates/net/peers/src/node_record.rs | 6 +- crates/net/peers/src/trusted_peer.rs | 2 +- crates/node/core/src/args/network.rs | 10 +- crates/stages/stages/tests/pipeline.rs | 4 +- crates/stages/stages/tests/preimage.rs | 19 +- examples/bsc-p2p/src/main.rs | 2 +- examples/bsc-p2p/tests/it/p2p.rs | 2 +- examples/manual-p2p/src/main.rs | 4 +- examples/polygon-p2p/src/main.rs | 2 +- testing/testing-utils/Cargo.toml | 1 - testing/testing-utils/src/generators.rs | 30 +-- .../testing-utils/src/genesis_allocator.rs | 43 ++- 56 files changed, 507 insertions(+), 478 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6aafbd936b..87a68c38f62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,12 +19,12 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +checksum = "1973cfbc1a2daf9cf550e74e1f088c28e7f7d8c1e1418fb6c9dc5184b7e84c99" dependencies = [ - "crypto-common 0.1.7", - "generic-array", + "crypto-common 0.2.2", + "inout 0.2.5", ] [[package]] @@ -34,22 +34,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher", + "cipher 0.4.4", "cpufeatures 0.2.17", ] +[[package]] +name = "aes" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fc36d7440d015b45468ba08a21e80e056ebbd014c611c6298bb7503e04bd1" +dependencies = [ + "cipher 0.5.2", + "cpubits", + "cpufeatures 0.3.1", +] + [[package]] name = "aes-gcm" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +checksum = "7f2b8006a0c83f52b62ba44a97b58bf76fe2f70a329e588f67f89691d93d498f" dependencies = [ "aead", - "aes", - "cipher", - "ctr", + "aes 0.9.4", + "cipher 0.5.2", + "ctr 0.10.1", + "ctutils", "ghash", - "subtle", ] [[package]] @@ -2305,7 +2316,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common 0.1.7", - "inout", + "inout 0.1.4", +] + +[[package]] +name = "cipher" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c" +dependencies = [ + "block-buffer 0.12.1", + "crypto-common 0.2.2", + "inout 0.2.5", ] [[package]] @@ -2877,7 +2899,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", - "rand_core 0.6.4", "typenum", ] @@ -2898,7 +2919,16 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher", + "cipher 0.4.4", +] + +[[package]] +name = "ctr" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaca1c4b237092596f64d571e9db6ce4109c4ef9742e27590f1709594461f21" +dependencies = [ + "cipher 0.5.2", ] [[package]] @@ -2913,15 +2943,16 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.3" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", + "cpufeatures 0.3.1", "curve25519-dalek-derive", - "digest 0.10.7", + "digest 0.11.3", "fiat-crypto", + "rand_core 0.10.1", "rustc_version 0.4.1", "subtle", "zeroize", @@ -3257,14 +3288,15 @@ dependencies = [ [[package]] name = "discv5" -version = "0.10.4" -source = "git+https://github.com/sigp/discv5?rev=7663c00#7663c00ee0837ea98547caaedede95d9d6736f4d" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907a0cd56341d2fa9bba3a3fce8296cfb5878d6ec314340751e79836cccdc9da" dependencies = [ - "aes", + "aes 0.9.4", "aes-gcm", "alloy-rlp", "arrayvec", - "ctr", + "ctr 0.10.1", "delay_map", "enr", "fnv", @@ -3277,7 +3309,7 @@ dependencies = [ "more-asserts", "multiaddr", "parking_lot", - "rand 0.8.8", + "rand 0.10.3", "smallvec", "socket2", "tokio", @@ -3377,25 +3409,24 @@ dependencies = [ [[package]] name = "ed25519" -version = "2.2.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +checksum = "29fcf32e6c73d1079f83ab4d782de2d81620346a5f38c6237a86a22f8368980a" dependencies = [ - "pkcs8 0.10.2", - "signature 2.2.0", + "signature 3.0.0", ] [[package]] name = "ed25519-dalek" -version = "2.2.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de" dependencies = [ "curve25519-dalek", "ed25519", - "rand_core 0.6.4", - "serde", - "sha2 0.10.9", + "rand_core 0.10.1", + "sha2 0.11.0", + "signature 3.0.0", "subtle", "zeroize", ] @@ -3522,21 +3553,20 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "enr" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "851bd664a3d3a3c175cff92b2f0df02df3c541b4895d0ae307611827aae46152" +checksum = "d7401327556f645a74cbcde3f95916ec8f989a46da39152d9cfe89d5ff036b8f" dependencies = [ "alloy-rlp", - "base64 0.22.1", + "base64 0.23.1", "bytes", "ed25519-dalek", "hex", - "k256 0.13.4", - "log", - "rand 0.8.8", - "secp256k1 0.30.0", + "k256 0.14.0", + "rand 0.10.3", + "secp256k1 0.33.1", "serde", - "sha3 0.10.9", + "sha3 0.12.0", "zeroize", ] @@ -3924,7 +3954,7 @@ dependencies = [ "reth-provider", "reth-tasks", "reth-tracing", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "serde_json", "thiserror 2.0.21", @@ -4121,7 +4151,7 @@ dependencies = [ "reth-ecies", "reth-ethereum", "reth-network-peers", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "tokio", ] @@ -4189,7 +4219,7 @@ dependencies = [ "reth-discv4", "reth-ethereum", "reth-tracing", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde_json", "tokio", "tokio-stream", @@ -4311,9 +4341,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.9" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" [[package]] name = "filetime" @@ -4637,11 +4667,10 @@ dependencies = [ [[package]] name = "ghash" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +checksum = "2eecf2d5dc9b66b732b97707a0210906b1d30523eb773193ab777c0c84b3e8d5" dependencies = [ - "opaque-debug", "polyval", ] @@ -4830,11 +4859,11 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824e001ac4f3012dd16a264bec811403a67ca9deb6c102fc5049b32c4574b35f" +checksum = "a596f1b20ed2cc5ecac41a164aaebc7258057060f06c0cf7a2ba3991ee7990fb" dependencies = [ - "hashbrown 0.16.1", + "hashbrown 0.17.1", ] [[package]] @@ -4961,11 +4990,11 @@ dependencies = [ [[package]] name = "hkdf" -version = "0.12.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +checksum = "4aaa26c720c68b866f2c96ef5c1264b3e6f473fe5d4ce61cd44bbe913e553018" dependencies = [ - "hmac 0.12.1", + "hmac 0.13.0", ] [[package]] @@ -5437,6 +5466,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "inout" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b5cf4372d022092674a83b8febf5865f7a573cc0c5baec5e49c879b6a20978f" +dependencies = [ + "hybrid-array", +] + [[package]] name = "insta" version = "1.48.0" @@ -5947,6 +5985,7 @@ dependencies = [ "primeorder", "serdect 0.4.3", "sha2 0.11.0", + "signature 3.0.0", "wnaf", ] @@ -6077,18 +6116,18 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libp2p-identity" -version = "0.2.14" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9525f3831544f7ae497bde79adf114ef127b0fbbb97edbbf692a80408636421c" +checksum = "4af6ad75465f6bf26a1001ddbf6f2b6b84a4673bf6de289f68cdbb1430098627" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", "hkdf", - "k256 0.13.4", + "k256 0.14.0", "multihash", "prost", - "sha2 0.10.9", + "sha2 0.11.0", "thiserror 2.0.21", "tracing", "zeroize", @@ -6500,12 +6539,12 @@ checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" [[package]] name = "multiaddr" -version = "0.18.2" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" +checksum = "fd707c05eadfb37577f01cbec206726feeecf0b9edea259aee6fc9bc541ee253" dependencies = [ - "arrayref", "byteorder", + "bytes", "data-encoding", "libp2p-identity", "multibase", @@ -6829,12 +6868,6 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openssl-probe" version = "0.2.1" @@ -7265,13 +7298,12 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +checksum = "f0fa31d631f2b2cb2a544d0aa321ce847a94764d701ca2becc411138b93d49cd" dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "opaque-debug", + "cpubits", + "cpufeatures 0.3.1", "universal-hash", ] @@ -8297,7 +8329,7 @@ dependencies = [ "reth-trie", "reth-trie-common", "reth-trie-db", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "serde_json", "socket2", @@ -8328,11 +8360,10 @@ dependencies = [ "alloy-primitives", "eyre", "libc", - "rand 0.8.8", "rand 0.9.5", "reth-fs-util", "reth-tracing", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "snmalloc-rs", "thiserror 2.0.21", @@ -8562,14 +8593,14 @@ dependencies = [ "enr", "itertools 0.14.0", "parking_lot", - "rand 0.8.8", + "rand 0.9.5", "reth-ethereum-forks", "reth-net-banlist", "reth-net-nat", "reth-network-peers", "reth-tracing", "schnellru", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "thiserror 2.0.21", "tokio", @@ -8588,15 +8619,16 @@ dependencies = [ "enr", "futures", "itertools 0.14.0", + "libp2p-identity", "metrics", - "rand 0.8.8", + "multiaddr", "rand 0.9.5", "reth-chainspec", "reth-ethereum-forks", "reth-metrics", "reth-network-peers", "reth-tracing", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "thiserror 2.0.21", "tokio", "tracing", @@ -8621,7 +8653,7 @@ dependencies = [ "reth-tokio-util", "reth-tracing", "schnellru", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "serde_with", "thiserror 2.0.21", @@ -8745,20 +8777,20 @@ dependencies = [ name = "reth-ecies" version = "2.9.0" dependencies = [ - "aes", + "aes 0.8.4", "alloy-primitives", "alloy-rlp", "byteorder", - "cipher", + "cipher 0.4.4", "concat-kdf", - "ctr", + "ctr 0.9.2", "digest 0.10.7", "futures", "hmac 0.12.1", "pin-project", - "rand 0.8.8", + "rand 0.9.5", "reth-network-peers", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "sha2 0.10.9", "thiserror 2.0.21", "tokio", @@ -9011,7 +9043,6 @@ dependencies = [ "pin-project", "proptest", "proptest-arbitrary-interop", - "rand 0.8.8", "rand 0.9.5", "reth-codecs", "reth-ecies", @@ -9021,7 +9052,7 @@ dependencies = [ "reth-network-peers", "reth-primitives-traits", "reth-tracing", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "snap", "test-fuzz", @@ -9278,7 +9309,7 @@ dependencies = [ "reth-storage-errors", "reth-testing-utils", "reth-trie-common", - "secp256k1 0.30.0", + "secp256k1 0.33.1", ] [[package]] @@ -9370,7 +9401,7 @@ dependencies = [ "reth-tracing", "reth-trie-common", "rmp-serde", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "tempfile", "thiserror 2.0.21", "tokio", @@ -9570,7 +9601,6 @@ dependencies = [ "metrics", "parking_lot", "pin-project", - "rand 0.8.8", "rand 0.9.5", "rayon", "reth-chainspec", @@ -9606,7 +9636,7 @@ dependencies = [ "reth-trie", "rustc-hash", "schnellru", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "smallvec", "socket2", @@ -9674,9 +9704,8 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "enr", - "rand 0.8.8", "rand 0.9.5", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde_json", "serde_with", "thiserror 2.0.21", @@ -9804,7 +9833,7 @@ dependencies = [ "reth-tokio-util", "reth-tracing", "reth-transaction-pool", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde_json", "tempfile", "tokio", @@ -9856,7 +9885,7 @@ dependencies = [ "reth-tracing", "reth-tracing-otlp", "reth-transaction-pool", - "secp256k1 0.30.0", + "secp256k1 0.33.1", "serde", "smolgen", "strum 0.27.2", @@ -10958,11 +10987,10 @@ dependencies = [ "alloy-genesis", "alloy-primitives", "alloy-rlp", - "rand 0.8.8", "rand 0.9.5", "reth-ethereum-primitives", "reth-primitives-traits", - "secp256k1 0.30.0", + "secp256k1 0.33.1", ] [[package]] @@ -11703,6 +11731,7 @@ version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7f404a8dab7a7a5a631e741d8699aa9c8e1d689fc26ccf897c7187565490b69" dependencies = [ + "arbitrary", "rand 0.9.5", "secp256k1-sys 0.14.1", "serde", @@ -11982,6 +12011,17 @@ dependencies = [ "keccak 0.2.2", ] +[[package]] +name = "sha3" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9bad02c26382724b2d2692c6f179285e4b54eeecd7968f52a50059c3c11759" +dependencies = [ + "digest 0.11.3", + "keccak 0.2.2", + "sponge-cursor", +] + [[package]] name = "sha3-asm" version = "0.1.9" @@ -12242,6 +12282,12 @@ dependencies = [ "der 0.8.2", ] +[[package]] +name = "sponge-cursor" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a0219bd7d979d58245a4f41f695e1ac9f8befdffadd7f61f1bae9e39abc6620" + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -13326,12 +13372,12 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +checksum = "f4987bdc12753382e0bec4a65c50738ffaabc998b9cdd1f952fb5f39b0048a96" dependencies = [ - "crypto-common 0.1.7", - "subtle", + "crypto-common 0.2.2", + "ctutils", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 30b19be69dd..fe29005e2ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -560,8 +560,10 @@ tower = "0.5" tower-http = "0.6" # p2p -discv5 = { git = "https://github.com/sigp/discv5", rev = "7663c00" } +discv5 = { version = "0.12", default-features = false } if-addrs = "0.14" +libp2p-identity = { version = "0.3", default-features = false } +multiaddr = { version = "0.19", default-features = false } # rpc jsonrpsee = "0.26.0" @@ -576,10 +578,8 @@ http-body-util = "0.1.2" proptest-arbitrary-interop = "0.1.0" # crypto -enr = { version = "0.13", default-features = false } -secp256k1 = { version = "0.30", default-features = false, features = ["global-context", "recovery"] } -# rand 8 for secp256k1 -rand_08 = { package = "rand", version = "0.8" } +enr = { version = "0.14", default-features = false } +secp256k1 = { version = "0.33", default-features = false, features = ["global-context", "recovery"] } # config toml = "0.9" diff --git a/crates/cli/commands/Cargo.toml b/crates/cli/commands/Cargo.toml index bf4d85edc1f..3d1f7ba6b19 100644 --- a/crates/cli/commands/Cargo.toml +++ b/crates/cli/commands/Cargo.toml @@ -113,6 +113,7 @@ tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } [features] arbitrary = [ + "secp256k1/arbitrary", "dep:proptest", "dep:arbitrary", "dep:proptest-arbitrary-interop", diff --git a/crates/cli/commands/src/node.rs b/crates/cli/commands/src/node.rs index 3f9c49d3194..e2cb7675f8d 100644 --- a/crates/cli/commands/src/node.rs +++ b/crates/cli/commands/src/node.rs @@ -255,7 +255,7 @@ where /// corresponding [`PeerId`](reth_network_peers::PeerId). pub fn peer_id(&self) -> eyre::Result { let sk = self.p2p_secret_key()?; - Ok(reth_network_peers::pk2id(&sk.public_key(secp256k1::SECP256K1))) + Ok(reth_network_peers::pk2id(&sk.public_key())) } } diff --git a/crates/cli/commands/src/p2p/bootnode.rs b/crates/cli/commands/src/p2p/bootnode.rs index 13b4af18152..026b4906984 100644 --- a/crates/cli/commands/src/p2p/bootnode.rs +++ b/crates/cli/commands/src/p2p/bootnode.rs @@ -542,7 +542,7 @@ mod tests { ]); let nat = command.resolved_nat().unwrap(); let config = command.discv5_config(&nat, &command.seed_nodes(&nat).unwrap()); - let sk = SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let sk = SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let (enr, _, _, _) = build_local_enr(&sk, &config); @@ -564,7 +564,7 @@ mod tests { ]); let nat = command.resolved_nat().unwrap(); let config = command.discv5_config(&nat, &command.seed_nodes(&nat).unwrap()); - let sk = SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let sk = SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let (enr, _, _, _) = build_local_enr(&sk, &config); @@ -586,7 +586,7 @@ mod tests { ]); let nat = command.resolved_nat().unwrap(); let config = command.discv5_config(&nat, &command.seed_nodes(&nat).unwrap()); - let sk = SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let sk = SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let (enr, _, _, _) = build_local_enr(&sk, &config); @@ -926,7 +926,7 @@ mod tests { ]); let nat = command.resolved_nat().unwrap(); let config = command.discv5_config(&nat, &command.seed_nodes(&nat).unwrap()); - let sk = SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let sk = SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let (enr, _, _, _) = build_local_enr(&sk, &config); diff --git a/crates/cli/commands/src/p2p/rlpx.rs b/crates/cli/commands/src/p2p/rlpx.rs index 712671885d8..0e2061edbe5 100644 --- a/crates/cli/commands/src/p2p/rlpx.rs +++ b/crates/cli/commands/src/p2p/rlpx.rs @@ -5,7 +5,6 @@ use reth_ecies::stream::ECIESStream; use reth_eth_wire::{HelloMessage, UnauthedP2PStream}; use reth_network::config::rng_secret_key; use reth_network_peers::{pk2id, AnyNode}; -use secp256k1::SECP256K1; use tokio::net::TcpStream; /// RLPx commands @@ -28,7 +27,7 @@ impl Command { TcpStream::connect((node_record.address, node_record.tcp_port)).await?; let ecies_stream = ECIESStream::connect(outgoing, key, node_record.id).await?; - let peer_id = pk2id(&key.public_key(SECP256K1)); + let peer_id = pk2id(&key.public_key()); let hello = HelloMessage::builder(peer_id).build(); let (_, their_hello) = diff --git a/crates/cli/util/Cargo.toml b/crates/cli/util/Cargo.toml index 880ddcfabb0..380c6ba4518 100644 --- a/crates/cli/util/Cargo.toml +++ b/crates/cli/util/Cargo.toml @@ -21,16 +21,13 @@ alloy-eips.workspace = true # misc eyre.workspace = true secp256k1 = { workspace = true, features = ["rand"] } -rand_08.workspace = true +rand.workspace = true thiserror.workspace = true serde.workspace = true tracy-client = { workspace = true, optional = true } reth-tracing = { workspace = true, optional = true } -[dev-dependencies] -rand.workspace = true - [target.'cfg(unix)'.dependencies] tikv-jemalloc-sys = { workspace = true, optional = true } tikv-jemallocator = { workspace = true, optional = true } diff --git a/crates/cli/util/src/load_secret_key.rs b/crates/cli/util/src/load_secret_key.rs index 64d756cddcd..fc9e09c85ad 100644 --- a/crates/cli/util/src/load_secret_key.rs +++ b/crates/cli/util/src/load_secret_key.rs @@ -8,7 +8,7 @@ use thiserror::Error; /// Convenience function to create a new random [`SecretKey`] pub fn rng_secret_key() -> SecretKey { - SecretKey::new(&mut rand_08::thread_rng()) + SecretKey::new(&mut rand::rng()) } /// Errors returned by loading a [`SecretKey`], including IO errors. @@ -54,7 +54,7 @@ pub fn get_secret_key(secret_key_path: &Path) -> Result Result Message { } fn codec(c: &mut Criterion) { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let _ = SECP256K1; + let secret_key = SecretKey::new(&mut rand::rng()); let mut group = c.benchmark_group("discv4_codec"); diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index b4a6eb116da..f34a9806e54 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -213,12 +213,11 @@ impl Discv4 { /// ``` /// use reth_discv4::{Discv4, Discv4Config}; /// use reth_network_peers::{pk2id, NodeRecord, PeerId}; - /// use secp256k1::SECP256K1; /// use std::{net::SocketAddr, str::FromStr}; /// # async fn t() -> std:: io::Result<()> { /// /// // generate a (random) keypair - /// let (secret_key, pk) = SECP256K1.generate_keypair(&mut rand_08::thread_rng()); + /// let (secret_key, pk) = secp256k1::generate_keypair(&mut rand::rng()); /// let id = pk2id(&pk); /// /// let socket = SocketAddr::from_str("0.0.0.0:0").unwrap(); @@ -2703,23 +2702,22 @@ mod tests { use crate::test_utils::{create_discv4, create_discv4_with_config, rng_endpoint, rng_record}; use alloy_primitives::hex; use alloy_rlp::{Decodable, Encodable}; - use rand_08::Rng; + use rand::Rng; use reth_ethereum_forks::{EnrForkIdEntry, ForkHash}; use reth_network_peers::mainnet_nodes; - use secp256k1::SECP256K1; use std::{future::poll_fn, net::Ipv6Addr}; #[tokio::test] async fn test_duplicate_packet_rejected_without_decoding() { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let local_id = pk2id(&secret_key.public_key(SECP256K1)); + let secret_key = SecretKey::new(&mut rand::rng()); + let local_id = pk2id(&secret_key.public_key()); let (tx, mut rx) = mpsc::channel(16); let mut handler = IngressHandler::new(tx, local_id); - let remote_key = SecretKey::new(&mut rand_08::thread_rng()); + let remote_key = SecretKey::new(&mut rand::rng()); let msg = Message::Ping(Ping { - from: rng_endpoint(&mut rand_08::thread_rng()), - to: rng_endpoint(&mut rand_08::thread_rng()), + from: rng_endpoint(&mut rand::rng()), + to: rng_endpoint(&mut rand::rng()), expire: u64::MAX, enr_sq: None, }); @@ -2739,15 +2737,15 @@ mod tests { #[tokio::test] async fn test_undecodable_packet_does_not_poison_cache() { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let local_id = pk2id(&secret_key.public_key(SECP256K1)); + let secret_key = SecretKey::new(&mut rand::rng()); + let local_id = pk2id(&secret_key.public_key()); let (tx, mut rx) = mpsc::channel(16); let mut handler = IngressHandler::new(tx, local_id); - let remote_key = SecretKey::new(&mut rand_08::thread_rng()); + let remote_key = SecretKey::new(&mut rand::rng()); let msg = Message::Ping(Ping { - from: rng_endpoint(&mut rand_08::thread_rng()), - to: rng_endpoint(&mut rand_08::thread_rng()), + from: rng_endpoint(&mut rand::rng()), + to: rng_endpoint(&mut rand::rng()), expire: u64::MAX, enr_sq: None, }); @@ -2794,8 +2792,8 @@ mod tests { // no IPv6 loopback on this host return; }; - let mut rng = rand_08::thread_rng(); - let (secret_key, pk) = secp256k1::SECP256K1.generate_keypair(&mut rng); + let mut rng = rand::rng(); + let (secret_key, pk) = secp256k1::generate_keypair(&mut rng); let local_enr = NodeRecord { address: Ipv4Addr::LOCALHOST.into(), tcp_port: 30303, @@ -2843,9 +2841,9 @@ mod tests { #[tokio::test] async fn test_external_ip_completes_unspecified_enr_endpoint() { - let mut rng = rand_08::thread_rng(); + let mut rng = rand::rng(); let socket: SocketAddr = "127.0.0.1:0".parse().unwrap(); - let (secret_key, pk) = secp256k1::SECP256K1.generate_keypair(&mut rng); + let (secret_key, pk) = secp256k1::generate_keypair(&mut rng); let local_enr = NodeRecord { address: Ipv4Addr::UNSPECIFIED.into(), tcp_port: 30303, @@ -2924,7 +2922,7 @@ mod tests { #[tokio::test] async fn test_request_enr_of_proven_node() { reth_tracing::init_test_tracing(); - let mut rng = rand_08::thread_rng(); + let mut rng = rand::rng(); let (_discv4, mut service) = create_discv4().await; let id = PeerId::random(); @@ -2940,7 +2938,7 @@ mod tests { }, ); service.received_pongs.on_pong(id, addr.ip()); - let ping = |service: &Discv4Service, rng: &mut rand_08::rngs::ThreadRng| Ping { + let ping = |service: &Discv4Service, rng: &mut rand::rngs::ThreadRng| Ping { from: rng_endpoint(rng), to: rng_endpoint(rng), expire: service.ping_expiration(), @@ -3143,7 +3141,7 @@ mod tests { #[tokio::test] async fn test_mapped_ipv4() { reth_tracing::init_test_tracing(); - let mut rng = rand_08::thread_rng(); + let mut rng = rand::rng(); let config = Discv4Config::builder().build(); let (_discv4, mut service) = create_discv4_with_config(config).await; @@ -3155,7 +3153,7 @@ mod tests { from: rng_endpoint(&mut rng), to: rng_endpoint(&mut rng), expire: service.ping_expiration(), - enr_sq: Some(rng.r#gen()), + enr_sq: Some(rng.random()), }; let id = PeerId::random(); @@ -3175,7 +3173,7 @@ mod tests { #[tokio::test] async fn test_respect_ping_expiration() { reth_tracing::init_test_tracing(); - let mut rng = rand_08::thread_rng(); + let mut rng = rand::rng(); let config = Discv4Config::builder().build(); let (_discv4, mut service) = create_discv4_with_config(config).await; @@ -3187,7 +3185,7 @@ mod tests { from: rng_endpoint(&mut rng), to: rng_endpoint(&mut rng), expire: SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() - 1, - enr_sq: Some(rng.r#gen()), + enr_sq: Some(rng.random()), }; let id = PeerId::random(); @@ -3582,7 +3580,7 @@ mod tests { #[test] fn test_insert() { - let local_node_record = rng_record(&mut rand_08::thread_rng()); + let local_node_record = rng_record(&mut rand::rng()); let mut kbuckets: KBucketsTable = KBucketsTable::new( NodeKey::from(&local_node_record).into(), Duration::from_secs(60), @@ -3591,7 +3589,7 @@ mod tests { None, ); - let new_record = rng_record(&mut rand_08::thread_rng()); + let new_record = rng_record(&mut rand::rng()); let key = kad_key(new_record.id); match kbuckets.entry(&key) { kbucket::Entry::Absent(entry) => { @@ -3681,7 +3679,7 @@ mod tests { fn make_pong(service: &Discv4Service, echo_hash: B256) -> Pong { Pong { - to: rng_endpoint(&mut rand_08::thread_rng()), + to: rng_endpoint(&mut rand::rng()), echo: echo_hash, expire: service.ping_expiration(), enr_sq: None, @@ -3922,7 +3920,7 @@ mod tests { #[tokio::test] async fn test_neighbours_wrong_ip_replay_does_not_poison_cache() { let (_discv4, mut service) = create_discv4().await; - let remote_key = SecretKey::new(&mut rand_08::thread_rng()); + let remote_key = SecretKey::new(&mut rand::rng()); let node_addr = SocketAddr::from(([10, 0, 0, 1], 30303)); let record = NodeRecord::from_secret_key(node_addr, &remote_key); insert_proven_node(&mut service, record); diff --git a/crates/net/discv4/src/node.rs b/crates/net/discv4/src/node.rs index 7e993ff8333..acc95382fb9 100644 --- a/crates/net/discv4/src/node.rs +++ b/crates/net/discv4/src/node.rs @@ -14,7 +14,7 @@ impl From for NodeKey { impl From for discv5::Key { fn from(value: NodeKey) -> Self { let hash = keccak256(value.0.as_slice()); - Self::new_raw(value, hash.0.into()) + Self::new_raw(value, hash.0) } } diff --git a/crates/net/discv4/src/proto.rs b/crates/net/discv4/src/proto.rs index ec1cab8eba3..0c980b7d648 100644 --- a/crates/net/discv4/src/proto.rs +++ b/crates/net/discv4/src/proto.rs @@ -14,7 +14,7 @@ use reth_ethereum_forks::{EnrForkIdEntry, ForkId}; use reth_network_peers::{pk2id, NodeRecord, PeerId}; use secp256k1::{ ecdsa::{RecoverableSignature, RecoveryId}, - SecretKey, SECP256K1, + SecretKey, }; use std::net::{IpAddr, Ipv4Addr}; @@ -114,15 +114,15 @@ impl Message { } // Sign the payload with the secret key using recoverable ECDSA - let signature: RecoverableSignature = SECP256K1.sign_ecdsa_recoverable( - &secp256k1::Message::from_digest(keccak256(&payload).0), + let signature = RecoverableSignature::sign_ecdsa_recoverable( + secp256k1::Message::from_digest(keccak256(&payload).0), secret_key, ); // Serialize the signature and append it to the signature bytes let (rec, sig) = signature.serialize_compact(); sig_bytes.extend_from_slice(&sig); - sig_bytes.put_u8(i32::from(rec) as u8); + sig_bytes.put_u8(rec.to_u8()); sig_bytes.unsplit(payload); // Calculate the hash of the signature bytes and append it to the datagram @@ -167,7 +167,7 @@ impl Message { // recover the public key let msg = secp256k1::Message::from_digest(keccak256(&packet[97..]).0); - let pk = SECP256K1.recover_ecdsa(&msg, &recoverable_sig)?; + let pk = recoverable_sig.recover_ecdsa(msg)?; let node_id = pk2id(&pk); let payload = &mut &packet[98..]; @@ -632,7 +632,7 @@ mod tests { use alloy_rlp::Decodable; use assert_matches::assert_matches; use enr::{secp256k1::SecretKey, EnrPublicKey}; - use rand_08::{thread_rng as rng, Rng, RngCore}; + use rand::{rng, Rng, RngCore}; use reth_ethereum_forks::ForkHash; use std::net::Ipv4Addr; @@ -644,8 +644,8 @@ mod tests { rng.fill_bytes(&mut ip); let msg = NodeEndpoint { address: IpAddr::V4(ip.into()), - tcp_port: rng.r#gen(), - udp_port: rng.r#gen(), + tcp_port: rng.random(), + udp_port: rng.random(), }; let decoded = NodeEndpoint::decode(&mut alloy_rlp::encode(msg).as_slice()).unwrap(); @@ -661,8 +661,8 @@ mod tests { rng.fill_bytes(&mut ip); let msg = NodeEndpoint { address: IpAddr::V6(ip.into()), - tcp_port: rng.r#gen(), - udp_port: rng.r#gen(), + tcp_port: rng.random(), + udp_port: rng.random(), }; let decoded = NodeEndpoint::decode(&mut alloy_rlp::encode(msg).as_slice()).unwrap(); @@ -702,7 +702,7 @@ mod tests { from: rng_endpoint(&mut rng), to: rng_endpoint(&mut rng), expire: 0, - enr_sq: Some(rng.r#gen()), + enr_sq: Some(rng.random()), }; let encoded = alloy_rlp::encode(&msg); @@ -723,7 +723,7 @@ mod tests { let msg = Pong { to: rng_endpoint(&mut rng), echo: B256::random(), - expire: rng.r#gen(), + expire: rng.random(), enr_sq: None, }; @@ -745,8 +745,8 @@ mod tests { let msg = Pong { to: rng_endpoint(&mut rng), echo: B256::random(), - expire: rng.r#gen(), - enr_sq: Some(rng.r#gen()), + expire: rng.random(), + enr_sq: Some(rng.random()), }; let encoded = alloy_rlp::encode(&msg); @@ -762,7 +762,7 @@ mod tests { fn test_hash_mismatch() { let mut rng = rng(); let msg = rng_message(&mut rng); - let (secret_key, _) = SECP256K1.generate_keypair(&mut rng); + let (secret_key, _) = secp256k1::generate_keypair(&mut rng); let (buf, _) = msg.encode(&secret_key); let mut buf_vec = buf.to_vec(); @@ -780,9 +780,9 @@ mod tests { let mut rng = rng(); let msg = Message::Neighbours(Neighbours { nodes: std::iter::repeat_with(|| rng_ipv4_record(&mut rng)).take(16).collect(), - expire: rng.r#gen(), + expire: rng.random(), }); - let (secret_key, _) = SECP256K1.generate_keypair(&mut rng); + let (secret_key, _) = secp256k1::generate_keypair(&mut rng); let (encoded, _) = msg.encode(&secret_key); // Assert that 16 nodes never fit into one packet @@ -797,9 +797,9 @@ mod tests { nodes: std::iter::repeat_with(|| rng_ipv6_record(&mut rng)) .take(SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS) .collect(), - expire: rng.r#gen(), + expire: rng.random(), }); - let (secret_key, _) = SECP256K1.generate_keypair(&mut rng); + let (secret_key, _) = secp256k1::generate_keypair(&mut rng); let (encoded, _) = msg.encode(&secret_key); assert!(encoded.len() <= MAX_PACKET_SIZE, "{} {msg:?}", encoded.len()); @@ -808,7 +808,7 @@ mod tests { nodes: std::iter::repeat_with(|| rng_ipv6_record(&mut rng)) .take(SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS - 1) .collect(), - expire: rng.r#gen(), + expire: rng.random(), }; neighbours.nodes.push(rng_ipv4_record(&mut rng)); let msg = Message::Neighbours(neighbours); @@ -822,7 +822,7 @@ mod tests { let mut rng = rng(); for _ in 0..100 { let msg = rng_message(&mut rng); - let (secret_key, pk) = SECP256K1.generate_keypair(&mut rng); + let (secret_key, pk) = secp256k1::generate_keypair(&mut rng); let sender_id = pk2id(&pk); let (buf, _) = msg.encode(&secret_key); @@ -849,7 +849,7 @@ mod tests { #[test] fn encode_decode_enr_msg() { - let mut rng = rand_08::rngs::OsRng; + let mut rng = rand::rng(); let key = SecretKey::new(&mut rng); let ip = Ipv4Addr::new(127, 0, 0, 1); let tcp = 3000; @@ -959,7 +959,7 @@ mod tests { // #[test] fn encode_decode_enr_rlp() { - let key = SecretKey::new(&mut rand_08::rngs::OsRng); + let key = SecretKey::new(&mut rand::rng()); let ip = Ipv4Addr::new(127, 0, 0, 1); let tcp = 3000; @@ -980,10 +980,7 @@ mod tests { assert_eq!(decoded_enr.id(), Some("v4".into())); assert_eq!(decoded_enr.ip4(), Some(ip)); assert_eq!(decoded_enr.tcp4(), Some(tcp)); - assert_eq!( - decoded_enr.public_key().encode(), - key.public_key(secp256k1::SECP256K1).encode() - ); + assert_eq!(decoded_enr.public_key().encode(), key.public_key().encode()); assert!(decoded_enr.verify()); } @@ -1090,7 +1087,7 @@ mod tests { // when the record and the junk together exceed the ENR size limit. #[test] fn eip8_decode_enr_response() { - let key = SecretKey::new(&mut rand_08::rngs::OsRng); + let key = SecretKey::new(&mut rand::rng()); let enr = Enr::builder().build(&key).unwrap(); let request_hash = B256::random(); let junk = Bytes::from(vec![0xab; 300]); diff --git a/crates/net/discv4/src/test_utils.rs b/crates/net/discv4/src/test_utils.rs index 8354db14748..11fa88987de 100644 --- a/crates/net/discv4/src/test_utils.rs +++ b/crates/net/discv4/src/test_utils.rs @@ -6,10 +6,10 @@ use crate::{ IngressReceiver, PeerId, SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS, }; use alloy_primitives::{hex, B256, B512}; -use rand_08::{thread_rng, Rng, RngCore}; +use rand::{rng, Rng, RngCore}; use reth_ethereum_forks::{ForkHash, ForkId}; use reth_network_peers::{pk2id, NodeRecord}; -use secp256k1::{SecretKey, SECP256K1}; +use secp256k1::SecretKey; use std::{ collections::{HashMap, HashSet}, io, @@ -48,9 +48,9 @@ pub struct MockDiscovery { impl MockDiscovery { /// Creates a new instance and opens a socket pub async fn new() -> io::Result<(Self, mpsc::Sender)> { - let mut rng = thread_rng(); + let mut rng = rng(); let socket = SocketAddr::from_str("127.0.0.1:0").unwrap(); - let (secret_key, pk) = SECP256K1.generate_keypair(&mut rng); + let (secret_key, pk) = secp256k1::generate_keypair(&mut rng); let id = pk2id(&pk); let socket = Arc::new(UdpSocket::bind(socket).await?); let local_addr = socket.local_addr()?; @@ -239,9 +239,9 @@ pub async fn create_discv4() -> (Discv4, Discv4Service) { /// Creates a new testing instance for [`Discv4`] and its service with the given config. pub async fn create_discv4_with_config(config: Discv4Config) -> (Discv4, Discv4Service) { - let mut rng = thread_rng(); + let mut rng = rng(); let socket = SocketAddr::from_str("127.0.0.1:0").unwrap(); - let (secret_key, pk) = SECP256K1.generate_keypair(&mut rng); + let (secret_key, pk) = secp256k1::generate_keypair(&mut rng); let id = pk2id(&pk); let local_enr = NodeRecord { address: socket.ip(), tcp_port: socket.port(), udp_port: socket.port(), id }; @@ -250,7 +250,7 @@ pub async fn create_discv4_with_config(config: Discv4Config) -> (Discv4, Discv4S /// Generates a random [`NodeEndpoint`] using the provided random number generator. pub fn rng_endpoint(rng: &mut impl Rng) -> NodeEndpoint { - let address = if rng.r#gen() { + let address = if rng.random() { let mut ip = [0u8; 4]; rng.fill_bytes(&mut ip); IpAddr::V4(ip.into()) @@ -259,7 +259,7 @@ pub fn rng_endpoint(rng: &mut impl Rng) -> NodeEndpoint { rng.fill_bytes(&mut ip); IpAddr::V6(ip.into()) }; - NodeEndpoint { address, tcp_port: rng.r#gen(), udp_port: rng.r#gen() } + NodeEndpoint { address, tcp_port: rng.random(), udp_port: rng.random() } } /// Generates a random [`NodeRecord`] using the provided random number generator. @@ -277,7 +277,7 @@ pub fn rng_ipv6_record(rng: &mut impl RngCore) -> NodeRecord { let address = IpAddr::V6(ip.into()); let mut id = B512::ZERO; rng.fill_bytes(&mut id[..]); - NodeRecord { address, tcp_port: rng.r#gen(), udp_port: rng.r#gen(), id } + NodeRecord { address, tcp_port: rng.random(), udp_port: rng.random(), id } } /// Generates a random IPv4 [`NodeRecord`] using the provided random number generator. @@ -287,33 +287,33 @@ pub fn rng_ipv4_record(rng: &mut impl RngCore) -> NodeRecord { let address = IpAddr::V4(ip.into()); let mut id = B512::ZERO; rng.fill_bytes(&mut id[..]); - NodeRecord { address, tcp_port: rng.r#gen(), udp_port: rng.r#gen(), id } + NodeRecord { address, tcp_port: rng.random(), udp_port: rng.random(), id } } /// Generates a random [`Message`] using the provided random number generator. pub fn rng_message(rng: &mut impl RngCore) -> Message { - match rng.gen_range(1..=4) { + match rng.random_range(1..=4) { 1 => Message::Ping(Ping { from: rng_endpoint(rng), to: rng_endpoint(rng), - expire: rng.r#gen(), + expire: rng.random(), enr_sq: None, }), 2 => { let mut echo = B256::ZERO; rng.fill_bytes(&mut echo[..]); - Message::Pong(Pong { to: rng_endpoint(rng), echo, expire: rng.r#gen(), enr_sq: None }) + Message::Pong(Pong { to: rng_endpoint(rng), echo, expire: rng.random(), enr_sq: None }) } 3 => { let mut id = B512::ZERO; rng.fill_bytes(&mut id[..]); - Message::FindNode(FindNode { id, expire: rng.r#gen() }) + Message::FindNode(FindNode { id, expire: rng.random() }) } 4 => { - let num: usize = rng.gen_range(1..=SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS); + let num: usize = rng.random_range(1..=SAFE_MAX_DATAGRAM_NEIGHBOUR_RECORDS); Message::Neighbours(Neighbours { nodes: std::iter::repeat_with(|| rng_record(rng)).take(num).collect(), - expire: rng.r#gen(), + expire: rng.random(), }) } _ => unreachable!(), @@ -332,7 +332,7 @@ mod tests { async fn can_mock_discovery() { reth_tracing::init_test_tracing(); - let mut rng = thread_rng(); + let mut rng = rng(); let (_, mut service) = create_discv4().await; let (mut mockv4, _cmd) = MockDiscovery::new().await.unwrap(); diff --git a/crates/net/discv5/Cargo.toml b/crates/net/discv5/Cargo.toml index f1a54f5c887..a6d3dad7d7a 100644 --- a/crates/net/discv5/Cargo.toml +++ b/crates/net/discv5/Cargo.toml @@ -23,6 +23,8 @@ alloy-primitives.workspace = true alloy-rlp.workspace = true discv5 = { workspace = true, features = ["libp2p"] } enr.workspace = true +libp2p-identity = { workspace = true, features = ["secp256k1"] } +multiaddr.workspace = true secp256k1.workspace = true # async/futures @@ -44,4 +46,3 @@ reth-tracing.workspace = true alloy-primitives = { workspace = true, features = ["rand"] } tokio = { workspace = true, features = ["rt-multi-thread"] } secp256k1 = { workspace = true, features = ["std", "rand"] } -rand_08.workspace = true diff --git a/crates/net/discv5/src/config.rs b/crates/net/discv5/src/config.rs index f5b66288945..6b40165fd82 100644 --- a/crates/net/discv5/src/config.rs +++ b/crates/net/discv5/src/config.rs @@ -8,10 +8,8 @@ use std::{ use alloy_primitives::Bytes; use derive_more::Display; -use discv5::{ - multiaddr::{Multiaddr, Protocol}, - ListenConfig, -}; +use discv5::ListenConfig; +use multiaddr::{Multiaddr, Protocol}; use reth_ethereum_forks::{EnrForkIdEntry, ForkId}; use reth_network_peers::NodeRecord; use tracing::debug; @@ -175,7 +173,7 @@ impl ConfigBuilder { self } - /// Set fork ID kv-pair to set in local [`Enr`](discv5::enr::Enr). This lets peers on discovery + /// Set fork ID kv-pair to set in local [`Enr`](enr::Enr). This lets peers on discovery /// network know which chain this node belongs to. pub const fn fork(mut self, fork_key: &'static [u8], fork_id: ForkId) -> Self { self.fork = Some((fork_key, fork_id)); @@ -190,7 +188,7 @@ impl ConfigBuilder { self } - /// Sets the tcp socket to advertise in the local [`Enr`](discv5::enr::Enr). The IP address of + /// Sets the tcp socket to advertise in the local [`Enr`](enr::Enr). The IP address of /// this socket will overwrite the discovery address of the same IP version, if one is /// configured. pub const fn tcp_socket(mut self, socket: SocketAddr) -> Self { @@ -198,7 +196,7 @@ impl ConfigBuilder { self } - /// Sets the IP address to advertise in the local [`Enr`](discv5::enr::Enr), without changing + /// Sets the IP address to advertise in the local [`Enr`](enr::Enr), without changing /// the discv5 listen socket. /// /// Routed to the matching address family, so calling this once per family yields a dual-stack @@ -211,7 +209,7 @@ impl ConfigBuilder { self } - /// Adds an additional kv-pair to include in the local [`Enr`](discv5::enr::Enr). Takes the key + /// Adds an additional kv-pair to include in the local [`Enr`](enr::Enr). Takes the key /// to use for the kv-pair and the rlp encoded value. pub fn add_enr_kv_pair(mut self, key: &'static [u8], value: Bytes) -> Self { self.other_enr_kv_pairs.push((key, value)); @@ -393,7 +391,7 @@ impl Config { /// Returns the discovery (UDP) socket contained in the [`discv5::Config`]. Returns the IPv6 /// socket, if both IPv4 and v6 are configured. This socket will be advertised to peers in the - /// local [`Enr`](discv5::enr::Enr). + /// local [`Enr`](enr::Enr). pub fn discovery_socket(&self) -> SocketAddr { // Prefer v6 when both are configured (matches original `DualStack` behavior). ipv6(&self.discv5_config.listen_config) @@ -403,7 +401,7 @@ impl Config { } /// Returns the `RLPx` (TCP) socket contained in the [`discv5::Config`]. This socket will be - /// advertised to peers in the local [`Enr`](discv5::enr::Enr). + /// advertised to peers in the local [`Enr`](enr::Enr). pub const fn rlpx_socket(&self) -> &SocketAddr { &self.tcp_socket } diff --git a/crates/net/discv5/src/enr.rs b/crates/net/discv5/src/enr.rs index 3b8c39014a3..a4d18fe15fd 100644 --- a/crates/net/discv5/src/enr.rs +++ b/crates/net/discv5/src/enr.rs @@ -1,8 +1,7 @@ //! Interface between node identification on protocol version 5 and 4. Specifically, between types -//! [`discv5::enr::NodeId`] and [`PeerId`]. +//! [`enr::NodeId`] and [`PeerId`]. -use discv5::enr::{CombinedPublicKey, EnrPublicKey, NodeId}; -use enr::Enr; +use enr::{CombinedPublicKey, Enr, EnrPublicKey, NodeId}; use reth_network_peers::{id2pk, pk2id, PeerId}; use secp256k1::{PublicKey, SecretKey}; @@ -19,18 +18,18 @@ pub fn enr_to_discv4_id(enr: &discv5::Enr) -> Option { Some(pk2id(&pk)) } -/// Converts a [`PeerId`] to a [`discv5::enr::NodeId`]. +/// Converts a [`PeerId`] to a [`enr::NodeId`]. pub fn discv4_id_to_discv5_id(peer_id: PeerId) -> Result { Ok(id2pk(peer_id)?.into()) } -/// Converts a [`PeerId`] to a [`discv5::libp2p_identity::PeerId`]. +/// Converts a [`PeerId`] to a [`libp2p_identity::PeerId`]. pub fn discv4_id_to_multiaddr_id( peer_id: PeerId, -) -> Result { +) -> Result { let pk = id2pk(peer_id)?.encode(); - let pk: discv5::libp2p_identity::PublicKey = - discv5::libp2p_identity::secp256k1::PublicKey::try_from_bytes(&pk).unwrap().into(); + let pk: libp2p_identity::PublicKey = + libp2p_identity::secp256k1::PublicKey::try_from_bytes(&pk).unwrap().into(); Ok(pk.to_peer_id()) } @@ -57,7 +56,7 @@ impl From for Enr { mod tests { use super::*; use alloy_rlp::Encodable; - use discv5::enr::{CombinedKey, EnrKey}; + use enr::{CombinedKey, EnrKey}; use reth_chainspec::{EthereumHardfork, MAINNET}; use reth_network_peers::NodeRecord; diff --git a/crates/net/discv5/src/filter.rs b/crates/net/discv5/src/filter.rs index e449b511753..969c50ed553 100644 --- a/crates/net/discv5/src/filter.rs +++ b/crates/net/discv5/src/filter.rs @@ -92,7 +92,7 @@ mod tests { use super::*; use crate::NetworkStackId; use alloy_rlp::Bytes; - use discv5::enr::{CombinedKey, Enr}; + use enr::{CombinedKey, Enr}; #[test] fn must_not_include_key_filter() { diff --git a/crates/net/discv5/src/lib.rs b/crates/net/discv5/src/lib.rs index a8e98ee3a1c..3c864aca742 100644 --- a/crates/net/discv5/src/lib.rs +++ b/crates/net/discv5/src/lib.rs @@ -16,7 +16,6 @@ use std::{ time::Duration, }; -use ::enr::Enr; use alloy_primitives::bytes::Bytes; use enr::{discv4_id_to_discv5_id, EnrCombinedKeyWrapper}; use futures::future::join_all; @@ -35,7 +34,9 @@ pub mod filter; pub mod metrics; pub mod network_stack_id; +pub use ::enr::{CombinedKey, Enr, EnrKey, NodeId}; pub use discv5::{self, IpMode}; +pub use libp2p_identity; pub use config::{ BootNode, Config, ConfigBuilder, DEFAULT_COUNT_BOOTSTRAP_LOOKUPS, DEFAULT_DISCOVERY_V5_ADDR, @@ -51,7 +52,7 @@ use metrics::{DiscoveredPeersMetrics, Discv5Metrics}; /// Max kbucket index is 255. /// -/// This is the max log2distance for 32 byte [`NodeId`](discv5::enr::NodeId) - 1. See . +/// This is the max log2distance for 32 byte [`NodeId`] - 1. See . pub const MAX_KBUCKET_INDEX: usize = 255; /// Default lowest kbucket index to attempt filling, in periodic look up query to populate kbuckets. @@ -160,7 +161,7 @@ impl Discv5 { } /// Returns the local [`Enr`] of the service. - pub fn local_enr(&self) -> Enr { + pub fn local_enr(&self) -> Enr { self.discv5.local_enr() } @@ -197,7 +198,7 @@ impl Discv5 { } = discv5_config; let EnrCombinedKeyWrapper(enr) = enr.into(); - let sk = discv5::enr::CombinedKey::secp256k1_from_bytes(&mut sk.secret_bytes()).unwrap(); + let sk = CombinedKey::secp256k1_from_bytes(&mut sk.to_secret_bytes()).unwrap(); let mut discv5 = match discv5::Discv5::new(enr, sk, discv5_config) { Ok(discv5) => discv5, Err(err) => return Err(Error::InitFailure(err)), @@ -398,10 +399,7 @@ impl Discv5 { /// Returns the [`ForkId`] of the given [`Enr`](discv5::Enr) w.r.t. the local node's network /// stack, if field is set. - pub fn get_fork_id( - &self, - enr: &discv5::enr::Enr, - ) -> Result { + pub fn get_fork_id(&self, enr: &Enr) -> Result { let Some(key) = self.fork_key else { return Err(Error::NetworkStackIdNotConfigured) }; let fork_id = enr .get_decodable::(key) @@ -473,7 +471,7 @@ pub fn build_local_enr( sk: &SecretKey, config: &Config, ) -> (Enr, NodeRecord, Option<&'static [u8]>, IpMode) { - let mut builder = discv5::enr::Enr::builder(); + let mut builder = Enr::builder(); let Config { discv5_config, @@ -613,7 +611,7 @@ pub fn spawn_populate_kbuckets_bg( // make many fast lookup queries at bootstrap, trying to fill kbuckets at furthest // log2distance from local node for i in (0..bootstrap_lookup_countdown).rev() { - let target = discv5::enr::NodeId::random(); + let target = NodeId::random(); trace!(target: "net::discv5", %target, @@ -665,10 +663,7 @@ pub fn spawn_populate_kbuckets_bg( } /// Gets the next lookup target, based on which bucket is currently being targeted. -pub fn get_lookup_target( - kbucket_index: usize, - local_node_id: discv5::enr::NodeId, -) -> discv5::enr::NodeId { +pub fn get_lookup_target(kbucket_index: usize, local_node_id: NodeId) -> NodeId { // init target let mut target = local_node_id.raw(); @@ -696,12 +691,8 @@ pub fn get_lookup_target( } /// Runs a [`discv5::Discv5`] lookup query. -pub async fn lookup( - target: discv5::enr::NodeId, - discv5: &discv5::Discv5, - metrics: &DiscoveredPeersMetrics, -) { - metrics.set_total_sessions(discv5.metrics().active_sessions); +pub async fn lookup(target: NodeId, discv5: &discv5::Discv5, metrics: &DiscoveredPeersMetrics) { + metrics.set_total_sessions(discv5::Discv5::metrics().active_sessions); metrics.set_total_kbucket_peers( discv5.with_kbuckets(|kbuckets| kbuckets.read().iter_ref().count()), ); @@ -736,7 +727,7 @@ mod test { use super::*; use ::enr::{CombinedKey, EnrKey}; use discv5::ListenConfig; - use rand_08::thread_rng; + use rand::rng; use reth_chainspec::MAINNET; use std::{ net::UdpSocket, @@ -767,7 +758,7 @@ mod test { } async fn start_discovery_node(udp_port_discv5: u16) -> (Discv5, mpsc::Receiver) { - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let discv5_addr: SocketAddr = format!("127.0.0.1:{udp_port_discv5}").parse().unwrap(); let rlpx_addr: SocketAddr = "127.0.0.1:30303".parse().unwrap(); @@ -821,7 +812,7 @@ mod test { async fn discv5_releases_port_on_drop() { reth_tracing::init_test_tracing(); - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let port = unused_udp_port(); let (node, updates) = @@ -1006,10 +997,7 @@ mod test { #[expect(unused)] mod sigp { use alloy_primitives::U256; - use enr::{ - k256::sha2::digest::generic_array::{typenum::U32, GenericArray}, - NodeId, - }; + use enr::NodeId; /// A `Key` is a cryptographic hash, identifying both the nodes participating in /// the Kademlia DHT, as well as records stored in the DHT. @@ -1023,7 +1011,7 @@ mod test { #[derive(Clone, Debug)] pub struct Key { preimage: T, - hash: GenericArray, + hash: [u8; 32], } impl PartialEq for Key { @@ -1042,7 +1030,7 @@ mod test { impl Key { /// Construct a new `Key` by providing the raw 32 byte hash. - pub const fn new_raw(preimage: T, hash: GenericArray) -> Self { + pub const fn new_raw(preimage: T, hash: [u8; 32]) -> Self { Self { preimage, hash } } @@ -1075,7 +1063,7 @@ mod test { impl From for Key { fn from(node_id: NodeId) -> Self { - Self { preimage: node_id, hash: *GenericArray::from_slice(&node_id.raw()) } + Self { preimage: node_id, hash: node_id.raw() } } } @@ -1088,7 +1076,7 @@ mod test { fn select_lookup_target() { for bucket_index in 0..=MAX_KBUCKET_INDEX { let sk = CombinedKey::generate_secp256k1(); - let local_node_id = discv5::enr::NodeId::from(sk.public()); + let local_node_id = NodeId::from(sk.public()); let target = get_lookup_target(bucket_index, local_node_id); let local_node_id = sigp::Key::from(local_node_id); @@ -1107,7 +1095,7 @@ mod test { .fork(NetworkStackId::ETH, fork_id) .build(); - let sk = SecretKey::new(&mut thread_rng()); + let sk = SecretKey::new(&mut rng()); let (enr, _, _, _) = build_local_enr(&sk, &config); let decoded_fork_id = enr @@ -1123,7 +1111,7 @@ mod test { #[test] fn get_fork_id_with_different_network_stack_ids() { let fork_id = MAINNET.latest_fork_id(); - let sk = SecretKey::new(&mut thread_rng()); + let sk = SecretKey::new(&mut rng()); // Test 1: ENR with OPEL fork ID, Discv5 configured for OPEL let enr_with_opel = Enr::builder() diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index 51e7f187ebe..5a69b8c1229 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -436,7 +436,7 @@ mod tests { use enr::EnrKey; use reth_chainspec::MAINNET; use reth_ethereum_forks::{EthereumHardfork, ForkHash}; - use secp256k1::rand::thread_rng; + use secp256k1::rand::rng; use std::{ future::poll_fn, net::{IpAddr, Ipv4Addr}, @@ -450,7 +450,7 @@ mod tests { #[test] fn test_convert_enr_node_record() { // rig - let secret_key = SecretKey::new(&mut secp256k1::rand::thread_rng()); + let secret_key = SecretKey::new(&mut secp256k1::rand::rng()); let enr = Enr::builder() .ip("127.0.0.1".parse().unwrap()) .udp4(9000) @@ -473,7 +473,7 @@ mod tests { fn test_decode_and_convert_enr_node_record() { // rig - let secret_key = SecretKey::new(&mut secp256k1::rand::thread_rng()); + let secret_key = SecretKey::new(&mut secp256k1::rand::rng()); let enr = Enr::builder() .ip("127.0.0.1".parse().unwrap()) .udp4(9000) @@ -502,7 +502,7 @@ mod tests { async fn test_start_root_sync() { reth_tracing::init_test_tracing(); - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let resolver = MapResolver::default(); let s = "enrtree-root:v1 e=QFT4PBCRX4XQCV3VUYJ6BTCEPU l=JGUFMSAGI7KZYB3P7IZW4S5Y3A seq=3 sig=3FmXuVwpa8Y7OstZTx9PIb1mt8FrW7VpDOFv4AaGCsZ2EIHmhraWhe4NxYhQDlw5MjeFXYMbJjsPeKlHzmJREQE"; let mut root: TreeRootEntry = s.parse().unwrap(); @@ -530,7 +530,7 @@ mod tests { async fn test_get_node() { reth_tracing::init_test_tracing(); - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let resolver = MapResolver::default(); let s = "enrtree-root:v1 e=QFT4PBCRX4XQCV3VUYJ6BTCEPU l=JGUFMSAGI7KZYB3P7IZW4S5Y3A seq=3 sig=3FmXuVwpa8Y7OstZTx9PIb1mt8FrW7VpDOFv4AaGCsZ2EIHmhraWhe4NxYhQDlw5MjeFXYMbJjsPeKlHzmJREQE"; let mut root: TreeRootEntry = s.parse().unwrap(); @@ -591,7 +591,7 @@ mod tests { ..Default::default() }; - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let resolver = Arc::new(MapResolver::default()); let s = "enrtree-root:v1 e=QFT4PBCRX4XQCV3VUYJ6BTCEPU l=JGUFMSAGI7KZYB3P7IZW4S5Y3A seq=3 sig=3FmXuVwpa8Y7OstZTx9PIb1mt8FrW7VpDOFv4AaGCsZ2EIHmhraWhe4NxYhQDlw5MjeFXYMbJjsPeKlHzmJREQE"; let mut root: TreeRootEntry = s.parse().unwrap(); @@ -649,7 +649,7 @@ mod tests { ..Default::default() }; - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let resolver = Arc::new(MapResolver::default()); let s = "enrtree-root:v1 e=QFT4PBCRX4XQCV3VUYJ6BTCEPU l=JGUFMSAGI7KZYB3P7IZW4S5Y3A seq=3 sig=3FmXuVwpa8Y7OstZTx9PIb1mt8FrW7VpDOFv4AaGCsZ2EIHmhraWhe4NxYhQDlw5MjeFXYMbJjsPeKlHzmJREQE"; let mut root: TreeRootEntry = s.parse().unwrap(); @@ -697,7 +697,7 @@ mod tests { #[tokio::test] async fn test_hash_mismatch_is_not_cached_and_does_not_poison_same_hash() { - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let resolver = MapResolver::default(); let invalid_entry = "enrtree-branch:AAAAAAAAAAAAAAAAAAAA".to_string(); diff --git a/crates/net/dns/src/sync.rs b/crates/net/dns/src/sync.rs index d2f2c04c071..272374107f0 100644 --- a/crates/net/dns/src/sync.rs +++ b/crates/net/dns/src/sync.rs @@ -180,7 +180,7 @@ impl ResolveKind { mod tests { use super::*; use enr::EnrKey; - use secp256k1::rand::thread_rng; + use secp256k1::rand::rng; fn base_root() -> TreeRootEntry { // taken from existing tests to ensure valid formatting @@ -189,7 +189,7 @@ mod tests { } fn make_tree() -> SyncTree { - let secret_key = SecretKey::new(&mut thread_rng()); + let secret_key = SecretKey::new(&mut rng()); let link = LinkEntry { domain: "nodes.example.org".to_string(), pubkey: secret_key.public() }; SyncTree::new(base_root(), link) diff --git a/crates/net/ecies/Cargo.toml b/crates/net/ecies/Cargo.toml index 3d2c6d81795..623efbfcfb8 100644 --- a/crates/net/ecies/Cargo.toml +++ b/crates/net/ecies/Cargo.toml @@ -31,7 +31,7 @@ byteorder.workspace = true ctr.workspace = true digest.workspace = true secp256k1 = { workspace = true, features = ["global-context", "std", "recovery", "rand"] } -rand_08.workspace = true +rand.workspace = true concat-kdf.workspace = true sha2.workspace = true aes.workspace = true diff --git a/crates/net/ecies/src/algorithm.rs b/crates/net/ecies/src/algorithm.rs index 2bbb525dfae..91eb7b7a3bd 100644 --- a/crates/net/ecies/src/algorithm.rs +++ b/crates/net/ecies/src/algorithm.rs @@ -15,11 +15,11 @@ use alloy_rlp::{Encodable, Rlp, RlpEncodable, RlpMaxEncodedLen}; use byteorder::{BigEndian, ByteOrder, ReadBytesExt}; use ctr::Ctr64BE; use digest::crypto_common::KeyIvInit; -use rand_08::{thread_rng as rng, Rng}; +use rand::{rng, Rng}; use reth_network_peers::{id2pk, pk2id}; use secp256k1::{ ecdsa::{RecoverableSignature, RecoveryId}, - PublicKey, SecretKey, SECP256K1, + PublicKey, SecretKey, }; use sha2::Sha256; @@ -281,9 +281,9 @@ impl ECIES { nonce: B256, ephemeral_secret_key: SecretKey, ) -> Result { - let public_key = PublicKey::from_secret_key(SECP256K1, &secret_key); + let public_key = PublicKey::from_secret_key(&secret_key); let remote_public_key = id2pk(remote_id)?; - let ephemeral_public_key = PublicKey::from_secret_key(SECP256K1, &ephemeral_secret_key); + let ephemeral_public_key = PublicKey::from_secret_key(&ephemeral_secret_key); Ok(Self { secret_key, @@ -324,8 +324,8 @@ impl ECIES { nonce: B256, ephemeral_secret_key: SecretKey, ) -> Result { - let public_key = PublicKey::from_secret_key(SECP256K1, &secret_key); - let ephemeral_public_key = PublicKey::from_secret_key(SECP256K1, &ephemeral_secret_key); + let public_key = PublicKey::from_secret_key(&secret_key); + let ephemeral_public_key = PublicKey::from_secret_key(&ephemeral_secret_key); Ok(Self { secret_key, @@ -370,9 +370,7 @@ impl ECIES { out.reserve(secp256k1::constants::UNCOMPRESSED_PUBLIC_KEY_SIZE + 16 + data.len() + 32); let secret_key = SecretKey::new(&mut rng); - out.extend_from_slice( - &PublicKey::from_secret_key(SECP256K1, &secret_key).serialize_uncompressed(), - ); + out.extend_from_slice(&PublicKey::from_secret_key(&secret_key).serialize_uncompressed()); let x = ecdh_x(&self.remote_public_key.unwrap(), &secret_key); let mut key = [0u8; 32]; @@ -411,16 +409,15 @@ impl ECIES { fn create_auth_unencrypted(&self) -> BytesMut { let x = ecdh_x(&self.remote_public_key.unwrap(), &self.secret_key); let msg = x ^ self.nonce; - let (rec_id, sig) = SECP256K1 - .sign_ecdsa_recoverable( - &secp256k1::Message::from_digest(msg.0), - &self.ephemeral_secret_key, - ) - .serialize_compact(); + let (rec_id, sig) = RecoverableSignature::sign_ecdsa_recoverable( + secp256k1::Message::from_digest(msg.0), + &self.ephemeral_secret_key, + ) + .serialize_compact(); let mut sig_bytes = [0u8; 65]; sig_bytes[..64].copy_from_slice(&sig); - sig_bytes[64] = i32::from(rec_id) as u8; + sig_bytes[64] = rec_id.to_u8(); let id = pk2id(&self.public_key); @@ -441,7 +438,7 @@ impl ECIES { } .encode(&mut out); - out.resize(out.len() + rng().gen_range(100..=300), 0); + out.resize(out.len() + rng().random_range(100..=300), 0); out } @@ -486,10 +483,10 @@ impl ECIES { self.remote_nonce = Some(data.get_next()?.ok_or(ECIESErrorImpl::InvalidAuthData)?); let x = ecdh_x(&self.remote_public_key.unwrap(), &self.secret_key); - self.remote_ephemeral_public_key = Some(SECP256K1.recover_ecdsa( - &secp256k1::Message::from_digest((x ^ self.remote_nonce.unwrap()).0), - &signature, - )?); + self.remote_ephemeral_public_key = + Some(signature.recover_ecdsa(secp256k1::Message::from_digest( + (x ^ self.remote_nonce.unwrap()).0, + ))?); self.ephemeral_shared_secret = Some(ecdh_x(&self.remote_ephemeral_public_key.unwrap(), &self.ephemeral_secret_key)); @@ -745,7 +742,7 @@ mod tests { #[test] fn ecdh() { - let our_secret_key = SecretKey::from_slice(&hex!( + let our_secret_key = SecretKey::from_secret_bytes(hex!( "202a36e24c3eb39513335ec99a7619bad0e7dc68d69401b016253c7d26dc92f8" )) .unwrap(); @@ -761,7 +758,7 @@ mod tests { fn communicate() { let mut rng = rng(); let server_secret_key = SecretKey::new(&mut rng); - let server_public_key = PublicKey::from_secret_key(SECP256K1, &server_secret_key); + let server_public_key = PublicKey::from_secret_key(&server_secret_key); let client_secret_key = SecretKey::new(&mut rng); let mut server_ecies = ECIES::new_server(server_secret_key).unwrap(); @@ -830,19 +827,19 @@ mod tests { } fn eip8_test_server_key() -> SecretKey { - SecretKey::from_slice(&hex!( + SecretKey::from_secret_bytes(hex!( "b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291" )) .unwrap() } fn eip8_test_client() -> ECIES { - let client_static_key = SecretKey::from_slice(&hex!( + let client_static_key = SecretKey::from_secret_bytes(hex!( "49a7b37aa6f6645917e7b807e9d1c00d4fa71f18343b0d4122a4d2df64dd6fee" )) .unwrap(); - let client_ephemeral_key = SecretKey::from_slice(&hex!( + let client_ephemeral_key = SecretKey::from_secret_bytes(hex!( "869d6ecf5211f1cc60418a13b9d870b22959d0c16f02bec714c960dd2298a32d" )) .unwrap(); @@ -850,14 +847,14 @@ mod tests { let client_nonce = b256!("0x7e968bba13b6c50e2c4cd7f241cc0d64d1ac25c7f5952df231ac6a2bda8ee5d6"); - let server_id = pk2id(&PublicKey::from_secret_key(SECP256K1, &eip8_test_server_key())); + let server_id = pk2id(&PublicKey::from_secret_key(&eip8_test_server_key())); ECIES::new_static_client(client_static_key, server_id, client_nonce, client_ephemeral_key) .unwrap() } fn eip8_test_server() -> ECIES { - let server_ephemeral_key = SecretKey::from_slice(&hex!( + let server_ephemeral_key = SecretKey::from_secret_bytes(hex!( "e238eb8e04fee6511ab04c6dd3c89ce097b11f25d584863ac2b6d5b35b1847e4" )) .unwrap(); diff --git a/crates/net/ecies/src/stream.rs b/crates/net/ecies/src/stream.rs index 306a32aabe0..7ab782103f7 100644 --- a/crates/net/ecies/src/stream.rs +++ b/crates/net/ecies/src/stream.rs @@ -195,14 +195,13 @@ where mod tests { use super::*; use reth_network_peers::pk2id; - use secp256k1::SECP256K1; use tokio::net::{TcpListener, TcpStream}; #[tokio::test] async fn can_write_and_read() { let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); let addr = listener.local_addr().unwrap(); - let server_key = SecretKey::new(&mut rand_08::thread_rng()); + let server_key = SecretKey::new(&mut rand::rng()); let handle = tokio::spawn(async move { // roughly based off of the design of tokio::net::TcpListener @@ -215,9 +214,9 @@ mod tests { }); // create the server pubkey - let server_id = pk2id(&server_key.public_key(SECP256K1)); + let server_id = pk2id(&server_key.public_key()); - let client_key = SecretKey::new(&mut rand_08::thread_rng()); + let client_key = SecretKey::new(&mut rand::rng()); let outgoing = TcpStream::connect(addr).await.unwrap(); let mut client_stream = ECIESStream::connect(outgoing, client_key, server_id).await.unwrap(); @@ -231,7 +230,7 @@ mod tests { async fn connection_should_timeout() { let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); let addr = listener.local_addr().unwrap(); - let server_key = SecretKey::new(&mut rand_08::thread_rng()); + let server_key = SecretKey::new(&mut rand::rng()); let _handle = tokio::spawn(async move { // Delay accepting the connection for longer than the client's timeout period @@ -245,9 +244,9 @@ mod tests { }); // create the server pubkey - let server_id = pk2id(&server_key.public_key(SECP256K1)); + let server_id = pk2id(&server_key.public_key()); - let client_key = SecretKey::new(&mut rand_08::thread_rng()); + let client_key = SecretKey::new(&mut rand::rng()); let outgoing = TcpStream::connect(addr).await.unwrap(); // Attempt to connect, expecting a timeout due to the server's delayed response diff --git a/crates/net/eth-wire/Cargo.toml b/crates/net/eth-wire/Cargo.toml index 47c372dba24..9fb8ae1665f 100644 --- a/crates/net/eth-wire/Cargo.toml +++ b/crates/net/eth-wire/Cargo.toml @@ -53,7 +53,6 @@ test-fuzz.workspace = true tokio = { workspace = true, features = ["rt", "rt-multi-thread"] } rand.workspace = true secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] } -rand_08.workspace = true arbitrary = { workspace = true, features = ["derive"] } proptest.workspace = true @@ -64,6 +63,7 @@ alloy-eips.workspace = true [features] arbitrary = [ + "secp256k1/arbitrary", "reth-eth-wire-types/arbitrary", "dep:arbitrary", "alloy-eips/arbitrary", @@ -87,7 +87,7 @@ serde = [ "reth-primitives-traits/serde", "reth-ethereum-forks/serde", "alloy-consensus/serde", - "rand_08/serde", + "rand/serde", ] [[test]] diff --git a/crates/net/eth-wire/src/ethstream.rs b/crates/net/eth-wire/src/ethstream.rs index b9f2d8634d5..73a4aaf1c2d 100644 --- a/crates/net/eth-wire/src/ethstream.rs +++ b/crates/net/eth-wire/src/ethstream.rs @@ -373,7 +373,7 @@ mod tests { use reth_eth_wire_types::{EthNetworkPrimitives, UnifiedStatus}; use reth_ethereum_forks::{ForkFilter, Head}; use reth_network_peers::pk2id; - use secp256k1::{SecretKey, SECP256K1}; + use secp256k1::SecretKey; use std::time::Duration; use tokio::net::{TcpListener, TcpStream}; use tokio_util::codec::Decoder; @@ -574,7 +574,7 @@ mod tests { async fn can_write_and_read_ecies() { let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); let local_addr = listener.local_addr().unwrap(); - let server_key = SecretKey::new(&mut rand_08::thread_rng()); + let server_key = SecretKey::new(&mut rand::rng()); let test_msg = EthMessage::::NewBlockHashes( vec![ BlockHashNumber { hash: B256::random(), number: 5 }, @@ -596,9 +596,9 @@ mod tests { }); // create the server pubkey - let server_id = pk2id(&server_key.public_key(SECP256K1)); + let server_id = pk2id(&server_key.public_key()); - let client_key = SecretKey::new(&mut rand_08::thread_rng()); + let client_key = SecretKey::new(&mut rand::rng()); let outgoing = TcpStream::connect(local_addr).await.unwrap(); let outgoing = ECIESStream::connect(outgoing, client_key, server_id).await.unwrap(); @@ -616,7 +616,7 @@ mod tests { // create tcpstream let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); let local_addr = listener.local_addr().unwrap(); - let server_key = SecretKey::new(&mut rand_08::thread_rng()); + let server_key = SecretKey::new(&mut rand::rng()); let test_msg = EthMessage::::NewBlockHashes( vec![ BlockHashNumber { hash: B256::random(), number: 5 }, @@ -652,7 +652,7 @@ mod tests { client_version: "bitcoind/1.0.0".to_string(), protocols: vec![EthVersion::Eth67.into()], port: DEFAULT_TCP_PORT, - id: pk2id(&server_key.public_key(SECP256K1)), + id: pk2id(&server_key.public_key()), }; let unauthed_stream = UnauthedP2PStream::new(stream); @@ -668,9 +668,9 @@ mod tests { }); // create the server pubkey - let server_id = pk2id(&server_key.public_key(SECP256K1)); + let server_id = pk2id(&server_key.public_key()); - let client_key = SecretKey::new(&mut rand_08::thread_rng()); + let client_key = SecretKey::new(&mut rand::rng()); let outgoing = TcpStream::connect(local_addr).await.unwrap(); let sink = ECIESStream::connect(outgoing, client_key, server_id).await.unwrap(); @@ -680,7 +680,7 @@ mod tests { client_version: "bitcoind/1.0.0".to_string(), protocols: vec![EthVersion::Eth67.into()], port: DEFAULT_TCP_PORT, - id: pk2id(&client_key.public_key(SECP256K1)), + id: pk2id(&client_key.public_key()), }; let unauthed_stream = UnauthedP2PStream::new(sink); diff --git a/crates/net/eth-wire/src/hello.rs b/crates/net/eth-wire/src/hello.rs index b12d0aa5334..775fb192f88 100644 --- a/crates/net/eth-wire/src/hello.rs +++ b/crates/net/eth-wire/src/hello.rs @@ -46,9 +46,9 @@ impl HelloMessageWithProtocols { /// ``` /// use reth_eth_wire::HelloMessageWithProtocols; /// use reth_network_peers::pk2id; - /// use secp256k1::{SecretKey, SECP256K1}; - /// let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - /// let id = pk2id(&secret_key.public_key(SECP256K1)); + /// use secp256k1::SecretKey; + /// let secret_key = SecretKey::new(&mut rand::rng()); + /// let id = pk2id(&secret_key.public_key()); /// let status = HelloMessageWithProtocols::builder(id).build(); /// ``` pub const fn builder(id: PeerId) -> HelloMessageBuilder { @@ -156,9 +156,9 @@ impl HelloMessage { /// ``` /// use reth_eth_wire::HelloMessage; /// use reth_network_peers::pk2id; - /// use secp256k1::{SecretKey, SECP256K1}; - /// let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - /// let id = pk2id(&secret_key.public_key(SECP256K1)); + /// use secp256k1::SecretKey; + /// let secret_key = SecretKey::new(&mut rand::rng()); + /// let id = pk2id(&secret_key.public_key()); /// let status = HelloMessage::builder(id).build(); /// ``` pub const fn builder(id: PeerId) -> HelloMessageBuilder { @@ -248,12 +248,12 @@ mod tests { }; use alloy_rlp::{Decodable, Encodable, Header, EMPTY_STRING_CODE}; use reth_network_peers::pk2id; - use secp256k1::{SecretKey, SECP256K1}; + use secp256k1::SecretKey; #[test] fn test_hello_encoding_round_trip() { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let id = pk2id(&secret_key.public_key(SECP256K1)); + let secret_key = SecretKey::new(&mut rand::rng()); + let id = pk2id(&secret_key.public_key()); let hello = P2PMessage::Hello(HelloMessage { protocol_version: ProtocolVersion::V5, client_version: "reth/0.1.0".to_string(), @@ -272,8 +272,8 @@ mod tests { #[test] fn hello_encoding_length() { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let id = pk2id(&secret_key.public_key(SECP256K1)); + let secret_key = SecretKey::new(&mut rand::rng()); + let id = pk2id(&secret_key.public_key()); let hello = P2PMessage::Hello(HelloMessage { protocol_version: ProtocolVersion::V5, client_version: "reth/0.1.0".to_string(), @@ -292,8 +292,8 @@ mod tests { #[test] fn test_default_protocols_still_include_eth69() { // ensure that older eth/69 remains advertised for compatibility - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let id = pk2id(&secret_key.public_key(SECP256K1)); + let secret_key = SecretKey::new(&mut rand::rng()); + let id = pk2id(&secret_key.public_key()); let hello = HelloMessageWithProtocols::builder(id).build(); let has_eth69 = hello @@ -306,8 +306,8 @@ mod tests { #[test] fn hello_message_id_prefix() { // ensure that the hello message id is prefixed - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let id = pk2id(&secret_key.public_key(SECP256K1)); + let secret_key = SecretKey::new(&mut rand::rng()); + let id = pk2id(&secret_key.public_key()); let hello = P2PMessage::Hello(HelloMessage { protocol_version: ProtocolVersion::V5, client_version: "reth/0.1.0".to_string(), @@ -326,13 +326,13 @@ mod tests { #[test] fn hello_decode_ignores_extra_fields() { // EIP-8: additional list elements must be ignored - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let hello = HelloMessage { protocol_version: ProtocolVersion::V5, client_version: "reth/0.1.0".to_string(), capabilities: vec![Capability::new_static("eth", EthVersion::Eth68 as usize)], port: 30303, - id: pk2id(&secret_key.public_key(SECP256K1)), + id: pk2id(&secret_key.public_key()), }; let mut payload = Vec::new(); diff --git a/crates/net/eth-wire/src/test_utils.rs b/crates/net/eth-wire/src/test_utils.rs index 5e90d864439..e9966fd1e83 100644 --- a/crates/net/eth-wire/src/test_utils.rs +++ b/crates/net/eth-wire/src/test_utils.rs @@ -10,7 +10,7 @@ use alloy_chains::Chain; use alloy_primitives::{B256, U256}; use reth_ethereum_forks::{ForkFilter, Head}; use reth_network_peers::pk2id; -use secp256k1::{SecretKey, SECP256K1}; +use secp256k1::SecretKey; use std::net::SocketAddr; use tokio::net::TcpStream; use tokio_util::codec::{Decoder, Framed, LengthDelimitedCodec}; @@ -19,14 +19,14 @@ pub type P2pPassthroughTcpStream = P2PStream (HelloMessageWithProtocols, SecretKey) { - let server_key = SecretKey::new(&mut rand_08::thread_rng()); + let server_key = SecretKey::new(&mut rand::rng()); let protocols = vec![EthVersion::Eth67.into()]; let hello = HelloMessageWithProtocols { protocol_version: ProtocolVersion::V5, client_version: "eth/1.0.0".to_string(), protocols, port: DEFAULT_TCP_PORT, - id: pk2id(&server_key.public_key(SECP256K1)), + id: pk2id(&server_key.public_key()), }; (hello, server_key) } diff --git a/crates/net/network-api/src/noop.rs b/crates/net/network-api/src/noop.rs index 85774b1690b..a23d89f719f 100644 --- a/crates/net/network-api/src/noop.rs +++ b/crates/net/network-api/src/noop.rs @@ -125,7 +125,7 @@ where } fn local_enr(&self) -> Enr { - let sk = SecretKey::from_slice(&[0xcd; 32]).unwrap(); + let sk = SecretKey::from_secret_bytes([0xcd; 32]).unwrap(); Enr::builder().build(&sk).unwrap() } } diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index bf8ba554ebf..61e82dde1cc 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -72,7 +72,6 @@ thiserror.workspace = true parking_lot.workspace = true rayon.workspace = true rand.workspace = true -rand_08.workspace = true secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] } derive_more.workspace = true schnellru.workspace = true @@ -130,7 +129,7 @@ serde = [ "reth-transaction-pool/serde", "reth-ethereum-primitives/serde", "reth-network-api/serde", - "rand_08/serde", + "rand/serde", "reth-storage-api/serde", "reth-network-types/serde", "reth-stages-types/serde", diff --git a/crates/net/network/src/config.rs b/crates/net/network/src/config.rs index 5d624f056be..992f13717c9 100644 --- a/crates/net/network/src/config.rs +++ b/crates/net/network/src/config.rs @@ -26,7 +26,6 @@ use reth_storage_api::{ StateRangeProviderFactory, }; use reth_tasks::Runtime; -use secp256k1::SECP256K1; use std::{collections::HashSet, net::SocketAddr, sync::Arc}; // re-export for convenience @@ -38,7 +37,7 @@ pub use secp256k1::SecretKey; /// Convenience function to create a new random [`SecretKey`] pub fn rng_secret_key() -> SecretKey { - SecretKey::new(&mut rand_08::thread_rng()) + SecretKey::new(&mut rand::rng()) } /// All network related initialization settings. @@ -294,7 +293,7 @@ impl NetworkConfigBuilder { /// Returns the configured [`PeerId`] pub fn get_peer_id(&self) -> PeerId { - pk2id(&self.secret_key.public_key(SECP256K1)) + pk2id(&self.secret_key.public_key()) } /// Returns the configured [`SecretKey`], from which the node's identity is derived. @@ -806,7 +805,7 @@ mod tests { use std::{net::Ipv4Addr, sync::Arc}; fn builder() -> NetworkConfigBuilder { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); NetworkConfigBuilder::new(secret_key, Runtime::test()) } diff --git a/crates/net/network/src/discovery.rs b/crates/net/network/src/discovery.rs index 5832410849d..ce52173ac28 100644 --- a/crates/net/network/src/discovery.rs +++ b/crates/net/network/src/discovery.rs @@ -567,7 +567,6 @@ impl Discovery { #[cfg(test)] mod tests { use super::*; - use secp256k1::SECP256K1; use std::{ net::{Ipv4Addr, Ipv6Addr, SocketAddrV4}, time::Duration, @@ -575,7 +574,7 @@ mod tests { #[tokio::test(flavor = "multi_thread")] async fn test_discovery_setup() { - let (secret_key, _) = SECP256K1.generate_keypair(&mut rand_08::thread_rng()); + let (secret_key, _) = secp256k1::generate_keypair(&mut rand::rng()); let discovery_addr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0)); let _discovery = Discovery::new( discovery_addr, @@ -595,7 +594,7 @@ mod tests { use tracing::trace; async fn start_discovery_node(udp_port_discv4: u16, udp_port_discv5: u16) -> Discovery { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let discv4_addr = format!("127.0.0.1:{udp_port_discv4}").parse().unwrap(); let discv5_addr: SocketAddr = format!("127.0.0.1:{udp_port_discv5}").parse().unwrap(); @@ -622,7 +621,7 @@ mod tests { } async fn start_discv5_only(config: reth_discv5::Config, nat: Option) -> Discovery { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); Discovery::new( "127.0.0.1:30303".parse().unwrap(), "127.0.0.1:0".parse().unwrap(), @@ -708,7 +707,7 @@ mod tests { #[test] fn discv5_enr_advertises_bound_rlpx_port() { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let bound_rlpx_port = 30307; let discv5_addr: SocketAddr = "127.0.0.1:0".parse().unwrap(); @@ -724,7 +723,7 @@ mod tests { #[test] fn discv5_enr_preserves_configured_rlpx_port() { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let advertised_addr: SocketAddr = "127.0.0.1:30308".parse().unwrap(); let discv5_addr: SocketAddr = "127.0.0.1:0".parse().unwrap(); @@ -822,7 +821,7 @@ mod tests { /// Starts a discovery node with discv4 and discv5 sharing the same UDP port. async fn start_shared_port_node(port: u16) -> Discovery { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let disc_addr: SocketAddr = format!("127.0.0.1:{port}").parse().unwrap(); // Use a non-zero TCP port so the node record isn't filtered out by // `on_node_record_update` (which drops peers with tcp port == 0). @@ -968,7 +967,7 @@ mod tests { let port = probe.local_addr().unwrap().port(); drop(probe); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let v4_addr: SocketAddr = format!("0.0.0.0:{port}").parse().unwrap(); let tcp_addr: SocketAddr = "0.0.0.0:30303".parse().unwrap(); @@ -1027,8 +1026,8 @@ mod tests { let port = probe.local_addr().unwrap().port(); drop(probe); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); - let node_id = reth_network_peers::pk2id(&secret_key.public_key(SECP256K1)); + let secret_key = SecretKey::new(&mut rand::rng()); + let node_id = reth_network_peers::pk2id(&secret_key.public_key()); let discovery_addr = SocketAddr::new(primary_ip, port); let tcp_addr = SocketAddr::new(tcp_ip, 30303); @@ -1058,7 +1057,7 @@ mod tests { .expect("discovery should start with shared port + dual-stack"); // Seed the discv4-only prober with the secondary endpoint. - let probe_sk = SecretKey::new(&mut rand_08::thread_rng()); + let probe_sk = SecretKey::new(&mut rand::rng()); let secondary_node = NodeRecord { address: secondary_ip, udp_port: port, tcp_port: port, id: node_id }; let probe_config = Discv4ConfigBuilder::default() @@ -1090,7 +1089,7 @@ mod tests { for peer_ip in [primary_ip, secondary_ip] { let node = NodeRecord { address: peer_ip, ..secondary_node }; let socket = UdpSocket::bind((peer_ip, 0)).await.unwrap(); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let record = NodeRecord::from_secret_key(socket.local_addr().unwrap(), &secret_key); let ping = reth_discv4::proto::Message::Ping(reth_discv4::proto::Ping { from: record.into(), diff --git a/crates/net/network/src/manager.rs b/crates/net/network/src/manager.rs index f608f553abc..7615f4c1e1c 100644 --- a/crates/net/network/src/manager.rs +++ b/crates/net/network/src/manager.rs @@ -1236,7 +1236,7 @@ mod tests { ..Default::default() }; let config = NetworkConfigBuilder::::new( - SecretKey::new(&mut rand_08::thread_rng()), + SecretKey::new(&mut rand::rng()), Runtime::test(), ) .disable_discovery() @@ -1290,7 +1290,7 @@ mod tests { async fn inbound_replacement_refreshes_pending_connection_metrics() { let config = || { NetworkConfigBuilder::::new( - SecretKey::new(&mut rand_08::thread_rng()), + SecretKey::new(&mut rand::rng()), Runtime::test(), ) .disable_discovery() @@ -1341,7 +1341,7 @@ mod tests { #[tokio::test] async fn incoming_handshake_failure_refreshes_pending_connection_metrics() { let config = NetworkConfigBuilder::::new( - SecretKey::new(&mut rand_08::thread_rng()), + SecretKey::new(&mut rand::rng()), Runtime::test(), ) .disable_discovery() diff --git a/crates/net/network/src/session/active.rs b/crates/net/network/src/session/active.rs index 2219c75ed7f..2409f99a6fd 100644 --- a/crates/net/network/src/session/active.rs +++ b/crates/net/network/src/session/active.rs @@ -1346,7 +1346,7 @@ mod tests { use reth_network_p2p::error::RequestResult; use reth_network_peers::pk2id; use reth_network_types::session::config::PROTOCOL_BREACH_REQUEST_TIMEOUT; - use secp256k1::{SecretKey, SECP256K1}; + use secp256k1::SecretKey; use tokio::{ net::{TcpListener, TcpStream}, sync::mpsc, @@ -1354,7 +1354,7 @@ mod tests { /// Returns a testing `HelloMessage` and new secretkey fn eth_hello(server_key: &SecretKey) -> HelloMessageWithProtocols { - HelloMessageWithProtocols::builder(pk2id(&server_key.public_key(SECP256K1))).build() + HelloMessageWithProtocols::builder(pk2id(&server_key.public_key())).build() } struct SessionBuilder { @@ -1391,8 +1391,8 @@ mod tests { let fork_filter = self.fork_filter.clone(); let local_peer_id = self.local_peer_id; let mut hello = self.hello.clone(); - let key = SecretKey::new(&mut rand_08::thread_rng()); - hello.id = pk2id(&key.public_key(SECP256K1)); + let key = SecretKey::new(&mut rand::rng()); + hello.id = pk2id(&key.public_key()); Box::pin(async move { let outgoing = TcpStream::connect(local_addr).await.unwrap(); let sink = ECIESStream::connect(outgoing, key, local_peer_id).await.unwrap(); @@ -1500,7 +1500,7 @@ mod tests { fn default() -> Self { let (active_session_tx, active_session_rx) = mpsc::channel(100); - let (secret_key, pk) = SECP256K1.generate_keypair(&mut rand_08::thread_rng()); + let (secret_key, pk) = secp256k1::generate_keypair(&mut rand::rng()); let local_peer_id = pk2id(&pk); Self { diff --git a/crates/net/network/src/session/tests.rs b/crates/net/network/src/session/tests.rs index 039aa3517b3..6c68cf8858d 100644 --- a/crates/net/network/src/session/tests.rs +++ b/crates/net/network/src/session/tests.rs @@ -19,7 +19,6 @@ use reth_eth_wire::{ use reth_eth_wire_types::message::MAX_MESSAGE_SIZE; use reth_ethereum_forks::EthereumHardfork; use reth_network_peers::pk2id; -use secp256k1::SECP256K1; use std::{sync::Mutex, task::Waker}; use tokio::{net::TcpListener, sync::Notify}; @@ -95,7 +94,7 @@ impl ConnectionHandler for ProtocolSpy { } fn new_peer() -> (SecretKey, PeerId) { - let (key, pk) = SECP256K1.generate_keypair(&mut rand_08::thread_rng()); + let (key, pk) = secp256k1::generate_keypair(&mut rand::rng()); (key, pk2id(&pk)) } diff --git a/crates/net/network/src/test_utils/transactions.rs b/crates/net/network/src/test_utils/transactions.rs index 50b7266486c..0e74317152f 100644 --- a/crates/net/network/src/test_utils/transactions.rs +++ b/crates/net/network/src/test_utils/transactions.rs @@ -33,7 +33,7 @@ pub async fn new_tx_manager( pub async fn new_tx_manager_with_config( transactions_manager_config: TransactionsManagerConfig, ) -> (TransactionsManager, NetworkManager) { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let config = NetworkConfigBuilder::new(secret_key, Runtime::test()) diff --git a/crates/net/network/src/transactions/mod.rs b/crates/net/network/src/transactions/mod.rs index 5a2e8bdbaff..d30f2d27c43 100644 --- a/crates/net/network/src/transactions/mod.rs +++ b/crates/net/network/src/transactions/mod.rs @@ -2447,7 +2447,7 @@ mod tests { TransactionsManager, NetworkManager, ) { - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let config = NetworkConfigBuilder::new(secret_key, Runtime::test()) @@ -2508,7 +2508,7 @@ mod tests { let listener0 = peer0.event_listener(); peer0.add_peer(peer1); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let pool = testing_pool(); @@ -2571,7 +2571,7 @@ mod tests { let listener0 = peer0.event_listener(); peer0.add_peer(peer1); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let pool = testing_pool(); @@ -2637,7 +2637,7 @@ mod tests { async fn test_handle_incoming_transactions_hashes() { reth_tracing::init_test_tracing(); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let config = NetworkConfigBuilder::new(secret_key, Runtime::test()) @@ -2745,7 +2745,7 @@ mod tests { let listener0 = peer0.event_listener(); peer0.add_peer(peer1); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let pool = testing_pool(); @@ -2915,7 +2915,7 @@ mod tests { let listener0 = peer0.event_listener(); peer0.add_peer(peer1); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let pool = testing_pool(); @@ -3441,7 +3441,7 @@ mod tests { let policy_bundle = NetworkPolicies::new(propagation_policy, announcement_policy); let pool = testing_pool(); - let secret_key = SecretKey::new(&mut rand_08::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let client = NoopProvider::default(); let network_config = NetworkConfigBuilder::new(secret_key, Runtime::test()) diff --git a/crates/net/network/tests/it/eth72.rs b/crates/net/network/tests/it/eth72.rs index 8483a48bd31..16f07fcbdb7 100644 --- a/crates/net/network/tests/it/eth72.rs +++ b/crates/net/network/tests/it/eth72.rs @@ -35,7 +35,6 @@ use reth_network_peers::pk2id; use reth_primitives_traits::{crypto::secp256k1::sign_message, SignerRecoverable}; use reth_provider::test_utils::{ExtendedAccount, MockEthProvider}; use reth_transaction_pool::TransactionPool; -use secp256k1::SECP256K1; use std::time::Duration; use tokio::net::TcpStream; @@ -127,7 +126,7 @@ async fn test_eth72_blob_announcements_and_elided_pooled_response() { // connect a raw eth/72 peer let raw_key = rng_secret_key(); - let raw_id = pk2id(&raw_key.public_key(SECP256K1)); + let raw_id = pk2id(&raw_key.public_key()); let tcp = TcpStream::connect(node.local_addr()).await.unwrap(); let ecies = ECIESStream::connect(tcp, raw_key, node_id).await.unwrap(); diff --git a/crates/net/peers/Cargo.toml b/crates/net/peers/Cargo.toml index 5e4259fb62b..31729bd0cc2 100644 --- a/crates/net/peers/Cargo.toml +++ b/crates/net/peers/Cargo.toml @@ -33,7 +33,6 @@ secp256k1 = { workspace = true, features = ["rand"] } serde_json.workspace = true enr.workspace = true tokio = { workspace = true, features = ["net", "macros", "rt"] } -rand_08.workspace = true [features] default = ["std"] diff --git a/crates/net/peers/src/lib.rs b/crates/net/peers/src/lib.rs index 51bce7f7cef..d9d41a6e1fe 100644 --- a/crates/net/peers/src/lib.rs +++ b/crates/net/peers/src/lib.rs @@ -367,8 +367,8 @@ mod tests { #[test] #[cfg(feature = "secp256k1")] fn pk2id2pk() { - let prikey = secp256k1::SecretKey::new(&mut rand_08::thread_rng()); - let pubkey = secp256k1::PublicKey::from_secret_key(secp256k1::SECP256K1, &prikey); + let prikey = secp256k1::SecretKey::new(&mut rand::rng()); + let pubkey = secp256k1::PublicKey::from_secret_key(&prikey); assert_eq!(pubkey, id2pk(pk2id(&pubkey)).unwrap()); } } diff --git a/crates/net/peers/src/node_record.rs b/crates/net/peers/src/node_record.rs index 2d148169732..28c5326f300 100644 --- a/crates/net/peers/src/node_record.rs +++ b/crates/net/peers/src/node_record.rs @@ -51,7 +51,7 @@ impl NodeRecord { /// Note: this will set both the TCP and UDP ports to the port of the addr. #[cfg(feature = "secp256k1")] pub fn from_secret_key(addr: SocketAddr, sk: &secp256k1::SecretKey) -> Self { - let pk = secp256k1::PublicKey::from_secret_key(secp256k1::SECP256K1, sk); + let pk = secp256k1::PublicKey::from_secret_key(sk); let id = PeerId::from_slice(&pk.serialize_uncompressed()[1..]); Self::new(addr, id) } @@ -423,7 +423,7 @@ mod tests { #[cfg(feature = "secp256k1")] fn tcp_less_enr_converts_with_port_zero() { // A discovery-only ENR (no tcp key, e.g. a devp2p bootnode) must convert with tcp port 0. - let sk = secp256k1::SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let sk = secp256k1::SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let enr = Enr::builder().ip4("1.2.3.4".parse().unwrap()).udp4(30301).build(&sk).unwrap(); let record = NodeRecord::try_from(&enr).unwrap(); @@ -435,7 +435,7 @@ mod tests { #[test] #[cfg(feature = "secp256k1")] fn enr_endpoint_keeps_ip_and_ports_together() { - let sk = secp256k1::SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let sk = secp256k1::SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let mut builder = Enr::builder(); builder.ip4("10.0.0.1".parse().unwrap()).ip6("::1".parse().unwrap()); builder.udp6(30401).tcp6(30403); diff --git a/crates/net/peers/src/trusted_peer.rs b/crates/net/peers/src/trusted_peer.rs index ef73df90b38..44e6af3cc6b 100644 --- a/crates/net/peers/src/trusted_peer.rs +++ b/crates/net/peers/src/trusted_peer.rs @@ -34,7 +34,7 @@ impl TrustedPeer { /// Derive the [`NodeRecord`] from the secret key and addr #[cfg(feature = "secp256k1")] pub fn from_secret_key(host: Host, port: u16, sk: &secp256k1::SecretKey) -> Self { - let pk = secp256k1::PublicKey::from_secret_key(secp256k1::SECP256K1, sk); + let pk = secp256k1::PublicKey::from_secret_key(sk); let id = PeerId::from_slice(&pk.serialize_uncompressed()[1..]); Self::new(host, port, id) } diff --git a/crates/node/core/src/args/network.rs b/crates/node/core/src/args/network.rs index 9a1377057ab..cc0368d863f 100644 --- a/crates/node/core/src/args/network.rs +++ b/crates/node/core/src/args/network.rs @@ -690,7 +690,7 @@ impl NetworkArgs { ) -> Result { if let Some(b256) = &self.p2p_secret_key_hex { // Use the B256 value directly (already validated as 32 bytes) - SecretKey::from_slice(b256.as_slice()).map_err(SecretKeyError::SecretKeyDecodeError) + SecretKey::from_secret_bytes(b256.0).map_err(SecretKeyError::SecretKeyDecodeError) } else { // Load from file (either provided path or default) let secret_key_path = self.p2p_secret_key.clone().unwrap_or(default_secret_key_path); @@ -1533,7 +1533,7 @@ mod tests { let secret_key = args.secret_key(default_path).unwrap(); // Verify the secret key matches the hex input - assert_eq!(alloy_primitives::hex::encode(secret_key.secret_bytes()), hex); + assert_eq!(alloy_primitives::hex::encode(secret_key.to_secret_bytes()), hex); } #[test] @@ -1609,7 +1609,7 @@ mod tests { .network_config::( &Config::default(), MAINNET.clone(), - SecretKey::from_byte_array(&[1u8; 32]).unwrap(), + SecretKey::from_secret_bytes([1u8; 32]).unwrap(), PathBuf::new(), Runtime::test(), ) @@ -1641,7 +1641,7 @@ mod tests { }; // Build the network config using a deterministic secret key - let secret_key = SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let secret_key = SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let builder = args.network_config::( &Config::default(), MAINNET.clone(), @@ -1665,7 +1665,7 @@ mod tests { let enr = "enr:-IS4QHCYrYZbAKWCBRlAy5zzaDZXJBGkcnh4MHcBFZntXNFrdvJjX04jRzjzCBOonrkTfj499SZuOh8R33Ls8RRcy5wBgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPKY0yuDUmstAHYpMa2_oxVtw0RW_QAdpzBQA8yWM0xOIN1ZHCCdl8"; let enode = "enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@10.3.58.6:30303"; let config = Config { bootnodes: vec![enr.parse().unwrap()], ..Default::default() }; - let secret_key = SecretKey::from_byte_array(&[1u8; 32]).unwrap(); + let secret_key = SecretKey::from_secret_bytes([1u8; 32]).unwrap(); let boot_nodes = |args: &NetworkArgs| { args.network_config::( diff --git a/crates/stages/stages/tests/pipeline.rs b/crates/stages/stages/tests/pipeline.rs index 3bc46923c9c..faa77fd6979 100644 --- a/crates/stages/stages/tests/pipeline.rs +++ b/crates/stages/stages/tests/pipeline.rs @@ -21,7 +21,6 @@ use reth_network_p2p::{ headers::downloader::{HeaderDownloader, SyncTarget}, }; use reth_primitives_traits::{ - crypto::secp256k1::public_key_to_address, proofs::{calculate_receipt_root, calculate_transaction_root}, RecoveredBlock, SealedBlock, }; @@ -237,7 +236,8 @@ async fn run_pipeline_forward_and_unwind( // Generate a keypair for signing transactions let mut rng = generators::rng(); let key_pair = generate_key(&mut rng); - let signer_address = public_key_to_address(key_pair.public_key()); + let signer_address = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); // Recipient address for ETH transfers let recipient_address = Address::repeat_byte(0x11); diff --git a/crates/stages/stages/tests/preimage.rs b/crates/stages/stages/tests/preimage.rs index 3b6dd49d83b..f87fcc72b51 100644 --- a/crates/stages/stages/tests/preimage.rs +++ b/crates/stages/stages/tests/preimage.rs @@ -31,7 +31,6 @@ use reth_network_p2p::{ headers::downloader::{HeaderDownloader, SyncTarget}, }; use reth_primitives_traits::{ - crypto::secp256k1::public_key_to_address, proofs::{calculate_receipt_root, calculate_transaction_root}, RecoveredBlock, SealedBlock, }; @@ -403,7 +402,8 @@ struct Create2SelfdestructScenario { fn setup_selfdestruct_scenario() -> eyre::Result { let mut rng = generators::rng(); let key_pair = generate_key(&mut rng); - let signer_address = public_key_to_address(key_pair.public_key()); + let signer_address = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); let selfdestruct_contract = Address::repeat_byte(0x66); let chain_spec = build_selfdestruct_chain_spec(signer_address, selfdestruct_contract); let blocks = { @@ -492,7 +492,8 @@ fn setup_selfdestruct_scenario() -> eyre::Result { fn setup_create2_selfdestruct_scenario() -> eyre::Result { let mut rng = generators::rng(); let key_pair = generate_key(&mut rng); - let signer_address = public_key_to_address(key_pair.public_key()); + let signer_address = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); let factory_contract = Address::repeat_byte(0xaa); let child_init = CREATE2_SELFDESTRUCT_INIT_CODE; let child_contract = factory_contract.create2_from_code(TEST_CREATE2_SALT, &child_init); @@ -612,7 +613,8 @@ struct IntraBlockAndIntraTxSelfdestructScenario { fn setup_reverted_slot_selfdestruct_scenario() -> eyre::Result { let mut rng = generators::rng(); let key_pair = generate_key(&mut rng); - let signer_address = public_key_to_address(key_pair.public_key()); + let signer_address = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); let selfdestruct_contract = Address::repeat_byte(0x33); let slot = B256::with_last_byte(0x03); let original_value = B256::with_last_byte(0x07); @@ -702,7 +704,8 @@ fn setup_reverted_slot_selfdestruct_scenario() -> eyre::Result eyre::Result { let mut rng = generators::rng(); let key_pair = generate_key(&mut rng); - let signer_address = public_key_to_address(key_pair.public_key()); + let signer_address = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); let factory_contract = Address::repeat_byte(0xaa); let child_init = init_code_for_runtime(&WRITE_OR_SELFDESTRUCT_RUNTIME_CODE); let child_contract = factory_contract.create2_from_code(TEST_CREATE2_SALT, &child_init); @@ -798,7 +801,8 @@ fn setup_same_address_recreate_and_write_same_block_then_wipe_scenario( ) -> eyre::Result { let mut rng = generators::rng(); let key_pair = generate_key(&mut rng); - let signer_address = public_key_to_address(key_pair.public_key()); + let signer_address = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); let factory_contract = Address::repeat_byte(0xaa); let child_init = init_code_for_runtime(&WRITE_TWO_SLOT_SETS_OR_SELFDESTRUCT_RUNTIME_CODE); let child_contract = factory_contract.create2_from_code(TEST_CREATE2_SALT, &child_init); @@ -943,7 +947,8 @@ fn setup_intra_block_and_intra_tx_selfdestruct_scenario( ) -> eyre::Result { let mut rng = generators::rng(); let key_pair = generate_key(&mut rng); - let signer_address = public_key_to_address(key_pair.public_key()); + let signer_address = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); let multi_tx_contract = Address::repeat_byte(0x44); let intra_tx_contract = Address::repeat_byte(0x55); diff --git a/examples/bsc-p2p/src/main.rs b/examples/bsc-p2p/src/main.rs index 2267b112ff8..e29a091e6ce 100644 --- a/examples/bsc-p2p/src/main.rs +++ b/examples/bsc-p2p/src/main.rs @@ -50,7 +50,7 @@ async fn main() { let local_addr = SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 30303); - let secret_key = SecretKey::new(&mut rand::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let bsc_boot_nodes = boot_nodes(); diff --git a/examples/bsc-p2p/tests/it/p2p.rs b/examples/bsc-p2p/tests/it/p2p.rs index 98faa7321a4..e5b77887ca5 100644 --- a/examples/bsc-p2p/tests/it/p2p.rs +++ b/examples/bsc-p2p/tests/it/p2p.rs @@ -24,7 +24,7 @@ async fn can_connect() { reth_tracing::init_test_tracing(); let local_addr = SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 30303); - let secret_key = SecretKey::new(&mut rand::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let net_cfg = NetworkConfig::<_, EthNetworkPrimitives>::builder(secret_key, Runtime::test()) .boot_nodes(boot_nodes()) diff --git a/examples/manual-p2p/src/main.rs b/examples/manual-p2p/src/main.rs index a3da30c7ec2..91d556b0326 100644 --- a/examples/manual-p2p/src/main.rs +++ b/examples/manual-p2p/src/main.rs @@ -26,7 +26,7 @@ use reth_ethereum::{ }, }; use reth_network_peers::{mainnet_nodes, pk2id, NodeRecord}; -use secp256k1::{SecretKey, SECP256K1}; +use secp256k1::SecretKey; use std::sync::LazyLock; use tokio::net::TcpStream; @@ -94,7 +94,7 @@ async fn handshake_p2p( let outgoing = TcpStream::connect((peer.address, peer.tcp_port)).await?; let ecies_stream = ECIESStream::connect(outgoing, key, peer.id).await?; - let our_peer_id = pk2id(&key.public_key(SECP256K1)); + let our_peer_id = pk2id(&key.public_key()); let our_hello = HelloMessage::builder(our_peer_id).build(); Ok(UnauthedP2PStream::new(ecies_stream).handshake(our_hello).await?) diff --git a/examples/polygon-p2p/src/main.rs b/examples/polygon-p2p/src/main.rs index e345340413c..4f1c4c807ba 100644 --- a/examples/polygon-p2p/src/main.rs +++ b/examples/polygon-p2p/src/main.rs @@ -37,7 +37,7 @@ pub mod chain_cfg; #[tokio::main] async fn main() { // The ECDSA private key used to create our enode identifier. - let secret_key = SecretKey::new(&mut rand::thread_rng()); + let secret_key = SecretKey::new(&mut rand::rng()); let _ = RethTracer::new() .with_stdout(LayerInfo::new( diff --git a/testing/testing-utils/Cargo.toml b/testing/testing-utils/Cargo.toml index 35b40424276..cea7618751f 100644 --- a/testing/testing-utils/Cargo.toml +++ b/testing/testing-utils/Cargo.toml @@ -21,7 +21,6 @@ alloy-eips.workspace = true rand.workspace = true secp256k1 = { workspace = true, features = ["rand"] } -rand_08.workspace = true [dev-dependencies] alloy-rlp.workspace = true diff --git a/testing/testing-utils/src/generators.rs b/testing/testing-utils/src/generators.rs index b3e56388692..6ba581eba6c 100644 --- a/testing/testing-utils/src/generators.rs +++ b/testing/testing-utils/src/generators.rs @@ -16,7 +16,7 @@ use reth_primitives_traits::{ crypto::secp256k1::sign_message, proofs, Account, Block as _, Log, SealedBlock, SealedHeader, StorageEntry, }; -use secp256k1::{Keypair, Secp256k1}; +use secp256k1::Keypair; use std::{ cmp::{max, min}, collections::BTreeMap, @@ -160,31 +160,27 @@ pub fn random_signed_tx(rng: &mut R) -> TransactionSigned { /// Signs the [Transaction] with a random key pair. pub fn sign_tx_with_random_key_pair(_rng: &mut R, tx: Transaction) -> TransactionSigned { - let secp = Secp256k1::new(); - // TODO: rand08 - let key_pair = Keypair::new(&secp, &mut rand_08::thread_rng()); + let key_pair = Keypair::new(&mut rand::rng()); sign_tx_with_key_pair(key_pair, tx) } /// Signs the [Transaction] with the given key pair. pub fn sign_tx_with_key_pair(key_pair: Keypair, tx: Transaction) -> TransactionSigned { let signature = - sign_message(B256::from_slice(&key_pair.secret_bytes()[..]), tx.signature_hash()).unwrap(); + sign_message(B256::from_slice(&key_pair.to_secret_bytes()[..]), tx.signature_hash()) + .unwrap(); tx.into_signed(signature).into() } /// Generates a new random [Keypair]. pub fn generate_key(_rng: &mut R) -> Keypair { - let secp = Secp256k1::new(); - Keypair::new(&secp, &mut rand_08::thread_rng()) + Keypair::new(&mut rand::rng()) } /// Generates a set of [Keypair]s based on the desired count. pub fn generate_keys(_rng: &mut R, count: usize) -> Vec { - let secp = Secp256k1::new(); - // TODO: rand08 - (0..count).map(|_| Keypair::new(&secp, &mut rand_08::thread_rng())).collect() + (0..count).map(|_| Keypair::new(&mut rand::rng())).collect() } /// Generate a random block filled with signed transactions (generated using @@ -487,16 +483,11 @@ mod tests { use alloy_consensus::TxEip1559; use alloy_eips::eip2930::AccessList; use alloy_primitives::{address, b256, bytes, hex, Signature}; - use reth_primitives_traits::{ - crypto::secp256k1::{public_key_to_address, sign_message}, - SignerRecoverable, - }; + use reth_primitives_traits::{crypto::secp256k1::sign_message, SignerRecoverable}; use std::str::FromStr; #[test] fn test_sign_message() { - let secp = Secp256k1::new(); - let tx = Transaction::Eip1559(TxEip1559 { chain_id: 1, nonce: 0x42, @@ -511,16 +502,17 @@ mod tests { let signature_hash = tx.signature_hash(); for _ in 0..100 { - let key_pair = Keypair::new(&secp, &mut rand_08::thread_rng()); + let key_pair = Keypair::new(&mut rand::rng()); let signature = - sign_message(B256::from_slice(&key_pair.secret_bytes()[..]), signature_hash) + sign_message(B256::from_slice(&key_pair.to_secret_bytes()[..]), signature_hash) .unwrap(); let signed: TransactionSigned = tx.clone().into_signed(signature).into(); let recovered = signed.recover_signer().unwrap(); - let expected = public_key_to_address(key_pair.public_key()); + let expected = + Address::from_raw_public_key(&key_pair.public_key().serialize_uncompressed()[1..]); assert_eq!(recovered, expected); } } diff --git a/testing/testing-utils/src/genesis_allocator.rs b/testing/testing-utils/src/genesis_allocator.rs index 14dbb7332c8..6e4423ebb21 100644 --- a/testing/testing-utils/src/genesis_allocator.rs +++ b/testing/testing-utils/src/genesis_allocator.rs @@ -6,10 +6,9 @@ use alloy_primitives::{ map::{AddressMap, Entry}, Address, Bytes, B256, U256, }; -use reth_primitives_traits::crypto::secp256k1::public_key_to_address; use secp256k1::{ - rand::{thread_rng, RngCore}, - Keypair, Secp256k1, + rand::{rng, RngCore}, + Keypair, }; use std::{collections::BTreeMap, fmt}; @@ -70,9 +69,9 @@ impl<'a> GenesisAllocator<'a> { /// /// Returns the key pair for the account and the account's address. pub fn new_funded_account(&mut self, balance: U256) -> (Keypair, Address) { - let secp = Secp256k1::new(); - let pair = Keypair::new(&secp, &mut self.rng); - let address = public_key_to_address(pair.public_key()); + let pair = Keypair::new(&mut self.rng); + let address = + Address::from_raw_public_key(&pair.public_key().serialize_uncompressed()[1..]); self.alloc.insert(address, GenesisAccount::default().with_balance(balance)); @@ -87,9 +86,9 @@ impl<'a> GenesisAllocator<'a> { balance: U256, code: Bytes, ) -> (Keypair, Address) { - let secp = Secp256k1::new(); - let pair = Keypair::new(&secp, &mut self.rng); - let address = public_key_to_address(pair.public_key()); + let pair = Keypair::new(&mut self.rng); + let address = + Address::from_raw_public_key(&pair.public_key().serialize_uncompressed()[1..]); self.alloc .insert(address, GenesisAccount::default().with_balance(balance).with_code(Some(code))); @@ -105,9 +104,9 @@ impl<'a> GenesisAllocator<'a> { balance: U256, storage: BTreeMap, ) -> (Keypair, Address) { - let secp = Secp256k1::new(); - let pair = Keypair::new(&secp, &mut self.rng); - let address = public_key_to_address(pair.public_key()); + let pair = Keypair::new(&mut self.rng); + let address = + Address::from_raw_public_key(&pair.public_key().serialize_uncompressed()[1..]); self.alloc.insert( address, @@ -125,9 +124,9 @@ impl<'a> GenesisAllocator<'a> { code: Bytes, storage: BTreeMap, ) -> (Keypair, Address) { - let secp = Secp256k1::new(); - let pair = Keypair::new(&secp, &mut self.rng); - let address = public_key_to_address(pair.public_key()); + let pair = Keypair::new(&mut self.rng); + let address = + Address::from_raw_public_key(&pair.public_key().serialize_uncompressed()[1..]); self.alloc.insert( address, @@ -141,9 +140,9 @@ impl<'a> GenesisAllocator<'a> { /// /// Returns the key pair for the account and the account's address. pub fn new_account_with_code(&mut self, code: Bytes) -> (Keypair, Address) { - let secp = Secp256k1::new(); - let pair = Keypair::new(&secp, &mut self.rng); - let address = public_key_to_address(pair.public_key()); + let pair = Keypair::new(&mut self.rng); + let address = + Address::from_raw_public_key(&pair.public_key().serialize_uncompressed()[1..]); self.alloc.insert(address, GenesisAccount::default().with_code(Some(code))); @@ -162,9 +161,9 @@ impl<'a> GenesisAllocator<'a> { /// /// Returns the key pair for the account and the account's address. pub fn add_account(&mut self, account: GenesisAccount) -> Address { - let secp = Secp256k1::new(); - let pair = Keypair::new(&secp, &mut self.rng); - let address = public_key_to_address(pair.public_key()); + let pair = Keypair::new(&mut self.rng); + let address = + Address::from_raw_public_key(&pair.public_key().serialize_uncompressed()[1..]); self.alloc.insert(address, account); @@ -196,7 +195,7 @@ impl<'a> GenesisAllocator<'a> { impl Default for GenesisAllocator<'_> { fn default() -> Self { - Self { alloc: AddressMap::default(), rng: Box::new(thread_rng()) } + Self { alloc: AddressMap::default(), rng: Box::new(rng()) } } } From 16989fd056d4f449ef73403796e8b99051773f69 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 5 Nov 2026 10:59:44 +0100 Subject: [PATCH 009/100] chore(deps): ignore pin-utils unmaintained advisory (#28292) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- deny.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deny.toml b/deny.toml index 65af78edbb5..4bcca6f680e 100644 --- a/deny.toml +++ b/deny.toml @@ -14,6 +14,8 @@ ignore = [ "RUSTSEC-2026-0173", # https://rustsec.org/advisories/RUSTSEC-2026-0387 crypto-bigint 0.5.5 timing variability, only patched in 0.7.6 and pinned by elliptic-curve 0.13 (k256/p256) "RUSTSEC-2026-0387", + # https://rustsec.org/advisories/RUSTSEC-2026-0441 pin-utils is unmaintained, transitive dep via wasmtimer (alloy-contract) + "RUSTSEC-2026-0441", ] # This section is considered when running `cargo deny check bans`. From 3e240a9576f5bc4a8191c8f51e1e3ec7c4b71020 Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Thu, 5 Nov 2026 15:39:29 +0000 Subject: [PATCH 010/100] chore: release 2.10.0 (#28299) --- Cargo.lock | 230 +++++++++++++++++++-------------------- Cargo.toml | 2 +- docs/vocs/vocs.config.ts | 2 +- 3 files changed, 117 insertions(+), 117 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 87a68c38f62..e4d56206493 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3445,7 +3445,7 @@ dependencies = [ [[package]] name = "ef-test-runner" -version = "2.9.0" +version = "2.10.0" dependencies = [ "clap", "ef-tests", @@ -3453,7 +3453,7 @@ dependencies = [ [[package]] name = "ef-tests" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -4133,7 +4133,7 @@ dependencies = [ [[package]] name = "example-full-contract-state" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "eyre", @@ -4251,7 +4251,7 @@ dependencies = [ [[package]] name = "exex-subscription" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "eyre", @@ -8081,7 +8081,7 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-node-bindings", "alloy-primitives", @@ -8134,7 +8134,7 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8160,7 +8160,7 @@ dependencies = [ [[package]] name = "reth-bb" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8195,7 +8195,7 @@ dependencies = [ [[package]] name = "reth-chain-state" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8224,7 +8224,7 @@ dependencies = [ [[package]] name = "reth-chainspec" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -8243,7 +8243,7 @@ dependencies = [ [[package]] name = "reth-cli" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-genesis", "clap", @@ -8255,7 +8255,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -8345,7 +8345,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" -version = "2.9.0" +version = "2.10.0" dependencies = [ "reth-tasks", "tokio", @@ -8354,7 +8354,7 @@ dependencies = [ [[package]] name = "reth-cli-util" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8404,7 +8404,7 @@ dependencies = [ [[package]] name = "reth-config" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "eyre", @@ -8422,7 +8422,7 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -8435,7 +8435,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8449,7 +8449,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8473,7 +8473,7 @@ dependencies = [ [[package]] name = "reth-db" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8507,7 +8507,7 @@ dependencies = [ [[package]] name = "reth-db-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8536,7 +8536,7 @@ dependencies = [ [[package]] name = "reth-db-common" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -8567,7 +8567,7 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8583,7 +8583,7 @@ dependencies = [ [[package]] name = "reth-discv4" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8610,7 +8610,7 @@ dependencies = [ [[package]] name = "reth-discv5" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8636,7 +8636,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-chains", "alloy-primitives", @@ -8664,7 +8664,7 @@ dependencies = [ [[package]] name = "reth-downloaders" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8704,7 +8704,7 @@ dependencies = [ [[package]] name = "reth-dst" -version = "2.9.0" +version = "2.10.0" dependencies = [ "bedrock-assertions", "serde", @@ -8713,7 +8713,7 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8775,7 +8775,7 @@ dependencies = [ [[package]] name = "reth-ecies" -version = "2.9.0" +version = "2.10.0" dependencies = [ "aes 0.8.4", "alloy-primitives", @@ -8801,7 +8801,7 @@ dependencies = [ [[package]] name = "reth-engine-local" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8823,7 +8823,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8851,7 +8851,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -8919,7 +8919,7 @@ dependencies = [ [[package]] name = "reth-engine-util" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8946,7 +8946,7 @@ dependencies = [ [[package]] name = "reth-era" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8970,7 +8970,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "bytes", @@ -8988,7 +8988,7 @@ dependencies = [ [[package]] name = "reth-era-utils" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9018,7 +9018,7 @@ dependencies = [ [[package]] name = "reth-errors" -version = "2.9.0" +version = "2.10.0" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -9028,7 +9028,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9065,7 +9065,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9093,7 +9093,7 @@ dependencies = [ [[package]] name = "reth-ethereum" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth", @@ -9132,7 +9132,7 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" -version = "2.9.0" +version = "2.10.0" dependencies = [ "clap", "eyre", @@ -9155,7 +9155,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9171,7 +9171,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9187,7 +9187,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eip2124", "alloy-hardforks 0.4.11", @@ -9200,7 +9200,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9228,7 +9228,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9249,7 +9249,7 @@ dependencies = [ [[package]] name = "reth-etl" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "rayon", @@ -9259,7 +9259,7 @@ dependencies = [ [[package]] name = "reth-evm" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9287,7 +9287,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9314,7 +9314,7 @@ dependencies = [ [[package]] name = "reth-execution-cache" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "evm2", @@ -9333,7 +9333,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9344,7 +9344,7 @@ dependencies = [ [[package]] name = "reth-execution-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9365,7 +9365,7 @@ dependencies = [ [[package]] name = "reth-exex" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9411,7 +9411,7 @@ dependencies = [ [[package]] name = "reth-exex-test-utils" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "eyre", @@ -9442,7 +9442,7 @@ dependencies = [ [[package]] name = "reth-exex-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9459,7 +9459,7 @@ dependencies = [ [[package]] name = "reth-fs-util" -version = "2.9.0" +version = "2.10.0" dependencies = [ "serde", "serde_json", @@ -9468,7 +9468,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9499,7 +9499,7 @@ dependencies = [ [[package]] name = "reth-ipc" -version = "2.9.0" +version = "2.10.0" dependencies = [ "bytes", "futures", @@ -9521,7 +9521,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" -version = "2.9.0" +version = "2.10.0" dependencies = [ "bitflags 2.13.2", "byteorder", @@ -9538,7 +9538,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" -version = "2.9.0" +version = "2.10.0" dependencies = [ "bindgen", "cc", @@ -9546,7 +9546,7 @@ dependencies = [ [[package]] name = "reth-metrics" -version = "2.9.0" +version = "2.10.0" dependencies = [ "futures", "libc", @@ -9559,7 +9559,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "ipnet", @@ -9567,7 +9567,7 @@ dependencies = [ [[package]] name = "reth-net-nat" -version = "2.9.0" +version = "2.10.0" dependencies = [ "futures-util", "if-addrs", @@ -9581,7 +9581,7 @@ dependencies = [ [[package]] name = "reth-network" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9651,7 +9651,7 @@ dependencies = [ [[package]] name = "reth-network-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9675,7 +9675,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9699,7 +9699,7 @@ dependencies = [ [[package]] name = "reth-network-peers" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9715,7 +9715,7 @@ dependencies = [ [[package]] name = "reth-network-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -9728,7 +9728,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" -version = "2.9.0" +version = "2.10.0" dependencies = [ "anyhow", "bincode", @@ -9747,7 +9747,7 @@ dependencies = [ [[package]] name = "reth-node-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -9770,7 +9770,7 @@ dependencies = [ [[package]] name = "reth-node-builder" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9843,7 +9843,7 @@ dependencies = [ [[package]] name = "reth-node-core" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9898,7 +9898,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-contract", @@ -9982,7 +9982,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10005,7 +10005,7 @@ dependencies = [ [[package]] name = "reth-node-events" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10028,7 +10028,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" -version = "2.9.0" +version = "2.10.0" dependencies = [ "bytes", "eyre", @@ -10060,7 +10060,7 @@ dependencies = [ [[package]] name = "reth-node-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "reth-chainspec", "reth-db-api", @@ -10071,7 +10071,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10094,7 +10094,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" -version = "2.9.0" +version = "2.10.0" dependencies = [ "pin-project", "reth-payload-primitives", @@ -10105,7 +10105,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10129,7 +10129,7 @@ dependencies = [ [[package]] name = "reth-payload-util" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10138,7 +10138,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -10178,7 +10178,7 @@ dependencies = [ [[package]] name = "reth-provider" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10230,7 +10230,7 @@ dependencies = [ [[package]] name = "reth-prune" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10260,7 +10260,7 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "arbitrary", @@ -10280,7 +10280,7 @@ dependencies = [ [[package]] name = "reth-rpc" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -10360,7 +10360,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-genesis", @@ -10389,7 +10389,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-network", @@ -10447,7 +10447,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-json-rpc", @@ -10466,7 +10466,7 @@ dependencies = [ [[package]] name = "reth-rpc-e2e-tests" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-genesis", "eyre", @@ -10485,7 +10485,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10521,7 +10521,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -10565,7 +10565,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -10615,7 +10615,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-rpc-types-engine", "brotli", @@ -10637,7 +10637,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -10665,7 +10665,7 @@ dependencies = [ [[package]] name = "reth-snap-sync" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10706,7 +10706,7 @@ dependencies = [ [[package]] name = "reth-stages" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10768,7 +10768,7 @@ dependencies = [ [[package]] name = "reth-stages-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10802,7 +10802,7 @@ dependencies = [ [[package]] name = "reth-stages-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "arbitrary", @@ -10819,7 +10819,7 @@ dependencies = [ [[package]] name = "reth-static-file" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "assert_matches", @@ -10842,7 +10842,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "clap", @@ -10860,7 +10860,7 @@ dependencies = [ [[package]] name = "reth-storage-api" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10885,7 +10885,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10900,7 +10900,7 @@ dependencies = [ [[package]] name = "reth-storage-overlay" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10930,7 +10930,7 @@ dependencies = [ [[package]] name = "reth-storage-rpc-provider" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10960,7 +10960,7 @@ dependencies = [ [[package]] name = "reth-tasks" -version = "2.9.0" +version = "2.10.0" dependencies = [ "crossbeam-utils", "dashmap", @@ -10980,7 +10980,7 @@ dependencies = [ [[package]] name = "reth-testing-utils" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10995,7 +10995,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" -version = "2.9.0" +version = "2.10.0" dependencies = [ "tokio", "tokio-stream", @@ -11004,7 +11004,7 @@ dependencies = [ [[package]] name = "reth-tracing" -version = "2.9.0" +version = "2.10.0" dependencies = [ "clap", "eyre", @@ -11023,7 +11023,7 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" -version = "2.9.0" +version = "2.10.0" dependencies = [ "base64 0.23.1", "clap", @@ -11044,7 +11044,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11095,7 +11095,7 @@ dependencies = [ [[package]] name = "reth-trie" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11128,7 +11128,7 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11161,7 +11161,7 @@ dependencies = [ [[package]] name = "reth-trie-db" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -11188,7 +11188,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -11212,7 +11212,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" -version = "2.9.0" +version = "2.10.0" dependencies = [ "alloy-primitives", "alloy-rlp", diff --git a/Cargo.toml b/Cargo.toml index fe29005e2ea..5ad061fe854 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "2.9.0" +version = "2.10.0" edition = "2024" rust-version = "1.96" license = "MIT OR Apache-2.0" diff --git a/docs/vocs/vocs.config.ts b/docs/vocs/vocs.config.ts index df2051eb973..b53d91bd759 100644 --- a/docs/vocs/vocs.config.ts +++ b/docs/vocs/vocs.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ { text: 'Rustdocs', link: '/docs' }, { text: 'GitHub', link: 'https://github.com/paradigmxyz/reth' }, { - text: 'v2.9.0', + text: 'v2.10.0', items: [ { text: 'Releases', From 2a343e40f9dda25b8fbc91ff47e30780523201cc Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 5 Nov 2026 19:40:18 +0000 Subject: [PATCH 011/100] refactor(evm): run Ethereum blocks on evm2::block (#28238) --- Cargo.lock | 61 +- Cargo.toml | 15 +- crates/chainspec/res/genesis/dev.json | 2 +- crates/chainspec/src/spec.rs | 2 +- .../src/testsuite/assets/genesis.json | 2 +- crates/engine/primitives/src/error.rs | 6 +- .../src/tree/payload_processor/bal/execute.rs | 26 +- .../payload_processor/bal/ordered_outputs.rs | 2 +- .../src/tree/payload_processor/bal/worker.rs | 10 +- crates/ethereum/evm/Cargo.toml | 6 +- crates/ethereum/evm/src/dao_fork.rs | 129 +- crates/ethereum/evm/src/execution.rs | 589 +------- crates/ethereum/evm/src/executor.rs | 580 ++------ crates/ethereum/evm/src/factory.rs | 4 + crates/ethereum/evm/src/lib.rs | 1 + crates/ethereum/evm/tests/execute.rs | 38 +- crates/evm/evm/Cargo.toml | 2 +- crates/evm/evm/src/execute.rs | 132 +- crates/evm/execution-errors/Cargo.toml | 3 + crates/evm/execution-errors/src/lib.rs | 243 +-- crates/evm/execution-types/Cargo.toml | 2 +- crates/evm/execution-types/src/compat.rs | 603 +------- crates/evm/execution-types/src/execute.rs | 33 +- crates/rpc/rpc-eth-types/src/error/mod.rs | 50 +- crates/rpc/rpc-eth-types/src/simulate.rs | 13 + crates/rpc/rpc/src/debug.rs | 57 +- crates/snap-sync/src/catch_up/apply.rs | 14 +- crates/trie/common/Cargo.toml | 3 +- .../common/src/bundle_state/account_status.rs | 388 ----- .../common/src/bundle_state/bundle_account.rs | 379 ----- .../common/src/bundle_state/bundle_state.rs | 1313 ----------------- .../trie/common/src/bundle_state/changes.rs | 75 - crates/trie/common/src/bundle_state/mod.rs | 44 - .../common/src/bundle_state/plain_account.rs | 82 - .../trie/common/src/bundle_state/reverts.rs | 374 ----- .../src/bundle_state/transition_account.rs | 112 -- .../src/bundle_state/transition_state.rs | 34 - crates/trie/common/src/lib.rs | 2 +- testing/ef-tests/src/cases/blockchain_test.rs | 21 +- 39 files changed, 442 insertions(+), 5010 deletions(-) delete mode 100644 crates/trie/common/src/bundle_state/account_status.rs delete mode 100644 crates/trie/common/src/bundle_state/bundle_account.rs delete mode 100644 crates/trie/common/src/bundle_state/bundle_state.rs delete mode 100644 crates/trie/common/src/bundle_state/changes.rs delete mode 100644 crates/trie/common/src/bundle_state/mod.rs delete mode 100644 crates/trie/common/src/bundle_state/plain_account.rs delete mode 100644 crates/trie/common/src/bundle_state/reverts.rs delete mode 100644 crates/trie/common/src/bundle_state/transition_account.rs delete mode 100644 crates/trie/common/src/bundle_state/transition_state.rs diff --git a/Cargo.lock b/Cargo.lock index e4d56206493..ceef17193df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2338,7 +2338,7 @@ checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" dependencies = [ "glob", "libc", - "libloading 0.8.9", + "libloading", ] [[package]] @@ -3700,11 +3700,12 @@ dependencies = [ [[package]] name = "evm2" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "alloy-consensus", "alloy-eip7928", "alloy-eips", + "alloy-hardforks 0.4.11", "alloy-primitives", "ark-bls12-381", "ark-bn254", @@ -3740,7 +3741,7 @@ dependencies = [ [[package]] name = "evm2-inspectors" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "alloy-consensus", "alloy-eip2930", @@ -3763,7 +3764,7 @@ dependencies = [ [[package]] name = "evm2-jit" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "evm2", "evm2-jit-backend", @@ -3778,7 +3779,7 @@ dependencies = [ [[package]] name = "evm2-jit-backend" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "eyre", "ruint", @@ -3787,12 +3788,12 @@ dependencies = [ [[package]] name = "evm2-jit-build" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" [[package]] name = "evm2-jit-builtins" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "alloy-primitives", "evm2", @@ -3805,7 +3806,7 @@ dependencies = [ [[package]] name = "evm2-jit-codegen" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "alloy-primitives", "bitflags 2.13.2", @@ -3828,7 +3829,7 @@ dependencies = [ [[package]] name = "evm2-jit-context" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "alloy-primitives", "evm2", @@ -3838,12 +3839,12 @@ dependencies = [ [[package]] name = "evm2-jit-llvm" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "alloy-primitives", "cc", "evm2-jit-backend", - "inkwell", + "llvm-sys", "object 0.40.0", "tracing", ] @@ -3851,7 +3852,7 @@ dependencies = [ [[package]] name = "evm2-jit-runtime" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -3866,7 +3867,6 @@ dependencies = [ "evm2-jit-llvm", "eyre", "libc", - "libloading 0.9.0", "quanta 0.13.0", "rayon", "tempfile", @@ -3878,7 +3878,7 @@ dependencies = [ [[package]] name = "evm2-macros" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=592bf18c4e22fff54ac9b4db606c4ee276e345cb#592bf18c4e22fff54ac9b4db606c4ee276e345cb" +source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" dependencies = [ "proc-macro2", "quote", @@ -5415,28 +5415,6 @@ dependencies = [ "rustversion", ] -[[package]] -name = "inkwell" -version = "0.10.0" -source = "git+https://github.com/TheDan64/inkwell?rev=c9d9734ae17dbaf1d9902dab3b8ee9d2041781ff#c9d9734ae17dbaf1d9902dab3b8ee9d2041781ff" -dependencies = [ - "bitflags 2.13.2", - "inkwell_internals", - "libc", - "llvm-sys", - "thiserror 2.0.21", -] - -[[package]] -name = "inkwell_internals" -version = "0.15.0" -source = "git+https://github.com/TheDan64/inkwell?rev=c9d9734ae17dbaf1d9902dab3b8ee9d2041781ff#c9d9734ae17dbaf1d9902dab3b8ee9d2041781ff" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.6", -] - [[package]] name = "inotify" version = "0.11.5" @@ -6098,16 +6076,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "libloading" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" -dependencies = [ - "cfg-if", - "windows-link", -] - [[package]] name = "libm" version = "0.2.16" @@ -9337,6 +9305,7 @@ version = "2.10.0" dependencies = [ "alloy-primitives", "alloy-rlp", + "evm2", "nybbles", "reth-storage-errors", "thiserror 2.0.21", diff --git a/Cargo.toml b/Cargo.toml index 5ad061fe854..afa4e02165a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -432,9 +432,9 @@ reth-trie-sparse = { path = "crates/trie/sparse", default-features = false } reth-zstd-compressors = { version = "0.8.2", default-features = false } # evm2 -evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "592bf18c4e22fff54ac9b4db606c4ee276e345cb", default-features = false } -evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "592bf18c4e22fff54ac9b4db606c4ee276e345cb", default-features = false } -evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "592bf18c4e22fff54ac9b4db606c4ee276e345cb", default-features = false } +evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3", default-features = false } +evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3", default-features = false } +evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3", default-features = false } # eth alloy-dyn-abi = "1.6.1" @@ -670,14 +670,11 @@ ipnet = "2.11" # evm2 is patched through its pre-transfer URL, which redirects to alloy-rs/evm2, because Cargo # rejects a patch from the same source. [patch."https://github.com/alloy-rs/evm2"] -evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "592bf18c4e22fff54ac9b4db606c4ee276e345cb" } -evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "592bf18c4e22fff54ac9b4db606c4ee276e345cb" } -evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "592bf18c4e22fff54ac9b4db606c4ee276e345cb" } +evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3" } +evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3" } +evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3" } [patch.crates-io] -# LLVM 23 support is not released yet. -inkwell = { git = "https://github.com/TheDan64/inkwell", rev = "c9d9734ae17dbaf1d9902dab3b8ee9d2041781ff" } - # reth-core reth-codecs = { git = "https://github.com/paradigmxyz/reth-core", rev = "275ce4cf5befeb9f1e8acd935ff2882d2d25fc61" } reth-codecs-derive = { git = "https://github.com/paradigmxyz/reth-core", rev = "275ce4cf5befeb9f1e8acd935ff2882d2d25fc61" } diff --git a/crates/chainspec/res/genesis/dev.json b/crates/chainspec/res/genesis/dev.json index ed0522167b0..2a6f6d817d1 100644 --- a/crates/chainspec/res/genesis/dev.json +++ b/crates/chainspec/res/genesis/dev.json @@ -1 +1 @@ -{"nonce":"0x0","timestamp":"0x6490fdd2","extraData":"0x","gasLimit":"0x1c9c380","difficulty":"0x0","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","coinbase":"0x0000000000000000000000000000000000000000","stateRoot":"0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494","alloc":{"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266":{"balance":"0xD3C21BCECCEDA1000000"},"0x70997970C51812dc3A010C7d01b50e0d17dc79C8":{"balance":"0xD3C21BCECCEDA1000000"},"0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC":{"balance":"0xD3C21BCECCEDA1000000"},"0x90F79bf6EB2c4f870365E785982E1f101E93b906":{"balance":"0xD3C21BCECCEDA1000000"},"0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65":{"balance":"0xD3C21BCECCEDA1000000"},"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc":{"balance":"0xD3C21BCECCEDA1000000"},"0x976EA74026E726554dB657fA54763abd0C3a0aa9":{"balance":"0xD3C21BCECCEDA1000000"},"0x14dC79964da2C08b23698B3D3cc7Ca32193d9955":{"balance":"0xD3C21BCECCEDA1000000"},"0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f":{"balance":"0xD3C21BCECCEDA1000000"},"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720":{"balance":"0xD3C21BCECCEDA1000000"},"0xBcd4042DE499D14e55001CcbB24a551F3b954096":{"balance":"0xD3C21BCECCEDA1000000"},"0x71bE63f3384f5fb98995898A86B02Fb2426c5788":{"balance":"0xD3C21BCECCEDA1000000"},"0xFABB0ac9d68B0B445fB7357272Ff202C5651694a":{"balance":"0xD3C21BCECCEDA1000000"},"0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec":{"balance":"0xD3C21BCECCEDA1000000"},"0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097":{"balance":"0xD3C21BCECCEDA1000000"},"0xcd3B766CCDd6AE721141F452C550Ca635964ce71":{"balance":"0xD3C21BCECCEDA1000000"},"0x2546BcD3c84621e976D8185a91A922aE77ECEc30":{"balance":"0xD3C21BCECCEDA1000000"},"0xbDA5747bFD65F08deb54cb465eB87D40e51B197E":{"balance":"0xD3C21BCECCEDA1000000"},"0xdD2FD4581271e230360230F9337D5c0430Bf44C0":{"balance":"0xD3C21BCECCEDA1000000"},"0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199":{"balance":"0xD3C21BCECCEDA1000000"}},"number":"0x0","gasUsed":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000"} \ No newline at end of file +{"nonce":"0x0","timestamp":"0x6490fdd2","extraData":"0x","gasLimit":"0x1c9c380","difficulty":"0x0","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","coinbase":"0x0000000000000000000000000000000000000000","stateRoot":"0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494","alloc":{"0x000f3df6d732807ef1319fb7b8bb8522d0beac02":{"nonce":"0x1","balance":"0x0","code":"0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500"},"0x0000f90827f1c53a10cb7a02335b175320002935":{"nonce":"0x1","balance":"0x0","code":"0x3373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500"},"0x00000961ef480eb55e80d19ad83579a64c007002":{"nonce":"0x1","balance":"0x0","code":"0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd"},"0x0000bbddc7ce488642fb579f8b00f3a590007251":{"nonce":"0x1","balance":"0x0","code":"0x3373fffffffffffffffffffffffffffffffffffffffe1460d35760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461019a57600182026001905f5b5f82111560685781019083028483029004916001019190604d565b9093900492505050366060146088573661019a573461019a575f5260205ff35b341061019a57600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060021160e7575060025b5f5b8181146101295782810160040260040181607402815460601b815260140181600101548152602001816002015481526020019060030154905260010160e9565b910180921461013b5790600255610146565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561017357505f5b6001546001828201116101885750505f61018e565b01600190035b5f555f6001556074025ff35b5f5ffd0000"},"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266":{"balance":"0xD3C21BCECCEDA1000000"},"0x70997970C51812dc3A010C7d01b50e0d17dc79C8":{"balance":"0xD3C21BCECCEDA1000000"},"0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC":{"balance":"0xD3C21BCECCEDA1000000"},"0x90F79bf6EB2c4f870365E785982E1f101E93b906":{"balance":"0xD3C21BCECCEDA1000000"},"0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65":{"balance":"0xD3C21BCECCEDA1000000"},"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc":{"balance":"0xD3C21BCECCEDA1000000"},"0x976EA74026E726554dB657fA54763abd0C3a0aa9":{"balance":"0xD3C21BCECCEDA1000000"},"0x14dC79964da2C08b23698B3D3cc7Ca32193d9955":{"balance":"0xD3C21BCECCEDA1000000"},"0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f":{"balance":"0xD3C21BCECCEDA1000000"},"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720":{"balance":"0xD3C21BCECCEDA1000000"},"0xBcd4042DE499D14e55001CcbB24a551F3b954096":{"balance":"0xD3C21BCECCEDA1000000"},"0x71bE63f3384f5fb98995898A86B02Fb2426c5788":{"balance":"0xD3C21BCECCEDA1000000"},"0xFABB0ac9d68B0B445fB7357272Ff202C5651694a":{"balance":"0xD3C21BCECCEDA1000000"},"0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec":{"balance":"0xD3C21BCECCEDA1000000"},"0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097":{"balance":"0xD3C21BCECCEDA1000000"},"0xcd3B766CCDd6AE721141F452C550Ca635964ce71":{"balance":"0xD3C21BCECCEDA1000000"},"0x2546BcD3c84621e976D8185a91A922aE77ECEc30":{"balance":"0xD3C21BCECCEDA1000000"},"0xbDA5747bFD65F08deb54cb465eB87D40e51B197E":{"balance":"0xD3C21BCECCEDA1000000"},"0xdD2FD4581271e230360230F9337D5c0430Bf44C0":{"balance":"0xD3C21BCECCEDA1000000"},"0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199":{"balance":"0xD3C21BCECCEDA1000000"}},"number":"0x0","gasUsed":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000"} \ No newline at end of file diff --git a/crates/chainspec/src/spec.rs b/crates/chainspec/src/spec.rs index f4571135ed1..b373f059ef5 100644 --- a/crates/chainspec/src/spec.rs +++ b/crates/chainspec/src/spec.rs @@ -2031,7 +2031,7 @@ Post-merge hard forks (timestamp based): &DEV, &[( Head { number: 0, ..Default::default() }, - ForkId { hash: ForkHash(hex!("0x0b1a4ef7")), next: 0 }, + ForkId { hash: ForkHash(hex!("0xd2be4e0a")), next: 0 }, )], ) } diff --git a/crates/e2e-test-utils/src/testsuite/assets/genesis.json b/crates/e2e-test-utils/src/testsuite/assets/genesis.json index 671bf85e423..f336e2883d5 100644 --- a/crates/e2e-test-utils/src/testsuite/assets/genesis.json +++ b/crates/e2e-test-utils/src/testsuite/assets/genesis.json @@ -1 +1 @@ -{"config":{"chainId":1,"homesteadBlock":0,"daoForkSupport":true,"eip150Block":0,"eip155Block":0,"eip158Block":0,"byzantiumBlock":0,"constantinopleBlock":0,"petersburgBlock":0,"istanbulBlock":0,"muirGlacierBlock":0,"berlinBlock":0,"londonBlock":0,"arrowGlacierBlock":0,"grayGlacierBlock":0,"shanghaiTime":0,"cancunTime":0,"terminalTotalDifficulty":"0x0","terminalTotalDifficultyPassed":true},"nonce":"0x0","timestamp":"0x0","extraData":"0x00","gasLimit":"0x1c9c380","difficulty":"0x0","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","coinbase":"0x0000000000000000000000000000000000000000","alloc":{"0x14dc79964da2c08b23698b3d3cc7ca32193d9955":{"balance":"0xd3c21bcecceda1000000"},"0x15d34aaf54267db7d7c367839aaf71a00a2c6a65":{"balance":"0xd3c21bcecceda1000000"},"0x1cbd3b2770909d4e10f157cabc84c7264073c9ec":{"balance":"0xd3c21bcecceda1000000"},"0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f":{"balance":"0xd3c21bcecceda1000000"},"0x2546bcd3c84621e976d8185a91a922ae77ecec30":{"balance":"0xd3c21bcecceda1000000"},"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc":{"balance":"0xd3c21bcecceda1000000"},"0x70997970c51812dc3a010c7d01b50e0d17dc79c8":{"balance":"0xd3c21bcecceda1000000"},"0x71be63f3384f5fb98995898a86b02fb2426c5788":{"balance":"0xd3c21bcecceda1000000"},"0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199":{"balance":"0xd3c21bcecceda1000000"},"0x90f79bf6eb2c4f870365e785982e1f101e93b906":{"balance":"0xd3c21bcecceda1000000"},"0x976ea74026e726554db657fa54763abd0c3a0aa9":{"balance":"0xd3c21bcecceda1000000"},"0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc":{"balance":"0xd3c21bcecceda1000000"},"0x9c41de96b2088cdc640c6182dfcf5491dc574a57":{"balance":"0xd3c21bcecceda1000000"},"0xa0ee7a142d267c1f36714e4a8f75612f20a79720":{"balance":"0xd3c21bcecceda1000000"},"0xbcd4042de499d14e55001ccbb24a551f3b954096":{"balance":"0xd3c21bcecceda1000000"},"0xbda5747bfd65f08deb54cb465eb87d40e51b197e":{"balance":"0xd3c21bcecceda1000000"},"0xcd3b766ccdd6ae721141f452c550ca635964ce71":{"balance":"0xd3c21bcecceda1000000"},"0xdd2fd4581271e230360230f9337d5c0430bf44c0":{"balance":"0xd3c21bcecceda1000000"},"0xdf3e18d64bc6a983f673ab319ccae4f1a57c7097":{"balance":"0xd3c21bcecceda1000000"},"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266":{"balance":"0xd3c21bcecceda1000000"},"0xfabb0ac9d68b0b445fb7357272ff202c5651694a":{"balance":"0xd3c21bcecceda1000000"}},"number":"0x0"} \ No newline at end of file +{"config":{"chainId":1,"homesteadBlock":0,"daoForkSupport":true,"eip150Block":0,"eip155Block":0,"eip158Block":0,"byzantiumBlock":0,"constantinopleBlock":0,"petersburgBlock":0,"istanbulBlock":0,"muirGlacierBlock":0,"berlinBlock":0,"londonBlock":0,"arrowGlacierBlock":0,"grayGlacierBlock":0,"shanghaiTime":0,"cancunTime":0,"terminalTotalDifficulty":"0x0","terminalTotalDifficultyPassed":true},"nonce":"0x0","timestamp":"0x0","extraData":"0x00","gasLimit":"0x1c9c380","difficulty":"0x0","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","coinbase":"0x0000000000000000000000000000000000000000","alloc":{"0x14dc79964da2c08b23698b3d3cc7ca32193d9955":{"balance":"0xd3c21bcecceda1000000"},"0x15d34aaf54267db7d7c367839aaf71a00a2c6a65":{"balance":"0xd3c21bcecceda1000000"},"0x1cbd3b2770909d4e10f157cabc84c7264073c9ec":{"balance":"0xd3c21bcecceda1000000"},"0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f":{"balance":"0xd3c21bcecceda1000000"},"0x2546bcd3c84621e976d8185a91a922ae77ecec30":{"balance":"0xd3c21bcecceda1000000"},"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc":{"balance":"0xd3c21bcecceda1000000"},"0x70997970c51812dc3a010c7d01b50e0d17dc79c8":{"balance":"0xd3c21bcecceda1000000"},"0x71be63f3384f5fb98995898a86b02fb2426c5788":{"balance":"0xd3c21bcecceda1000000"},"0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199":{"balance":"0xd3c21bcecceda1000000"},"0x90f79bf6eb2c4f870365e785982e1f101e93b906":{"balance":"0xd3c21bcecceda1000000"},"0x976ea74026e726554db657fa54763abd0c3a0aa9":{"balance":"0xd3c21bcecceda1000000"},"0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc":{"balance":"0xd3c21bcecceda1000000"},"0x9c41de96b2088cdc640c6182dfcf5491dc574a57":{"balance":"0xd3c21bcecceda1000000"},"0xa0ee7a142d267c1f36714e4a8f75612f20a79720":{"balance":"0xd3c21bcecceda1000000"},"0xbcd4042de499d14e55001ccbb24a551f3b954096":{"balance":"0xd3c21bcecceda1000000"},"0xbda5747bfd65f08deb54cb465eb87d40e51b197e":{"balance":"0xd3c21bcecceda1000000"},"0xcd3b766ccdd6ae721141f452c550ca635964ce71":{"balance":"0xd3c21bcecceda1000000"},"0xdd2fd4581271e230360230f9337d5c0430bf44c0":{"balance":"0xd3c21bcecceda1000000"},"0xdf3e18d64bc6a983f673ab319ccae4f1a57c7097":{"balance":"0xd3c21bcecceda1000000"},"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266":{"balance":"0xd3c21bcecceda1000000"},"0xfabb0ac9d68b0b445fb7357272ff202c5651694a":{"balance":"0xd3c21bcecceda1000000"},"0x00000961ef480eb55e80d19ad83579a64c007002":{"balance":"0x0","nonce":"0x1","code":"0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd"},"0x0000bbddc7ce488642fb579f8b00f3a590007251":{"balance":"0x0","nonce":"0x1","code":"0x3373fffffffffffffffffffffffffffffffffffffffe1460d35760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1461019a57600182026001905f5b5f82111560685781019083028483029004916001019190604d565b9093900492505050366060146088573661019a573461019a575f5260205ff35b341061019a57600154600101600155600354806004026004013381556001015f358155600101602035815560010160403590553360601b5f5260605f60143760745fa0600101600355005b6003546002548082038060021160e7575060025b5f5b8181146101295782810160040260040181607402815460601b815260140181600101548152602001816002015481526020019060030154905260010160e9565b910180921461013b5790600255610146565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff141561017357505f5b6001546001828201116101885750505f61018e565b01600190035b5f555f6001556074025ff35b5f5ffd0000"},"0x0000bff46984e3725691fa540a8c7589300d8282":{"balance":"0x0","nonce":"0x1","code":"0x00"},"0x000064d678505ad48f8ccb093bc65613800e8282":{"balance":"0x0","nonce":"0x1","code":"0x00"}},"number":"0x0"} diff --git a/crates/engine/primitives/src/error.rs b/crates/engine/primitives/src/error.rs index 692d7e225e0..91912a48920 100644 --- a/crates/engine/primitives/src/error.rs +++ b/crates/engine/primitives/src/error.rs @@ -130,9 +130,9 @@ impl InsertBlockErrorKind { Self::Provider(err) => { Err(InsertBlockProcessingError::Fatal(InsertBlockFatalError::Provider(err))) } - Self::Other(err) => Err(InsertBlockProcessingError::Fatal( - InternalBlockExecutionError::Other(err).into(), - )), + Self::Other(err) => { + Err(InsertBlockProcessingError::Fatal(InternalBlockExecutionError::msg(err).into())) + } } } } diff --git a/crates/engine/tree/src/tree/payload_processor/bal/execute.rs b/crates/engine/tree/src/tree/payload_processor/bal/execute.rs index 5b909505b3c..2d78736af97 100644 --- a/crates/engine/tree/src/tree/payload_processor/bal/execute.rs +++ b/crates/engine/tree/src/tree/payload_processor/bal/execute.rs @@ -237,9 +237,12 @@ mod tests { eip2935::{HISTORY_STORAGE_ADDRESS, HISTORY_STORAGE_CODE}, eip4788::{BEACON_ROOTS_ADDRESS, BEACON_ROOTS_CODE}, eip7002::{WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE}, + eip7251::{CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, CONSOLIDATION_REQUEST_PREDEPLOY_CODE}, }; use alloy_primitives::{Bytes, B256, U256}; - use evm2::evm::{CacheDB, EmptyDB}; + use evm2::evm::{ + CacheDB, EmptyDB, BUILDER_DEPOSIT_REQUEST_ADDRESS, BUILDER_EXIT_REQUEST_ADDRESS, + }; use reth_chainspec::{ChainSpecBuilder, MAINNET}; use reth_engine_primitives::{InsertBlockErrorKind, InsertBlockValidationError}; use reth_ethereum_primitives::{Block, BlockBody, Receipt, Transaction, TransactionSigned}; @@ -270,9 +273,10 @@ mod tests { Arc::new(DecodedBal::new(alloy_bal, raw)) } - /// Builds an in-memory canonical DB pre-populated with the post-Cancun system contracts - /// that `apply_pre_execution_changes` calls: beacon roots (EIP-4788), withdrawal requests - /// (EIP-7002), and historical block hashes (EIP-2935). + /// Builds an in-memory canonical DB pre-populated with the system contracts that block + /// execution calls: beacon roots (EIP-4788), historical block hashes (EIP-2935), the + /// withdrawal (EIP-7002) and consolidation (EIP-7251) request contracts, and no-op builder + /// request contracts (EIP-8282). fn system_contracts_db() -> CacheDB { let mut db = CacheDB::::default(); db.insert_account_info( @@ -287,6 +291,20 @@ mod tests { .with_nonce(1) .with_code(Bytecode::new_raw(WITHDRAWAL_REQUEST_PREDEPLOY_CODE.clone())), ); + db.insert_account_info( + &CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, + AccountInfo::default() + .with_nonce(1) + .with_code(Bytecode::new_raw(CONSOLIDATION_REQUEST_PREDEPLOY_CODE.clone())), + ); + for address in [BUILDER_DEPOSIT_REQUEST_ADDRESS, BUILDER_EXIT_REQUEST_ADDRESS] { + db.insert_account_info( + &address, + AccountInfo::default() + .with_nonce(1) + .with_code(Bytecode::new_legacy(Bytes::from_static(&[0x00]))), + ); + } db.insert_account_info( &HISTORY_STORAGE_ADDRESS, AccountInfo::default() diff --git a/crates/engine/tree/src/tree/payload_processor/bal/ordered_outputs.rs b/crates/engine/tree/src/tree/payload_processor/bal/ordered_outputs.rs index 76391a30503..32bb1d03625 100644 --- a/crates/engine/tree/src/tree/payload_processor/bal/ordered_outputs.rs +++ b/crates/engine/tree/src/tree/payload_processor/bal/ordered_outputs.rs @@ -187,7 +187,7 @@ mod tests { .unwrap(); tx.send(Err(BalWorkerError::Transaction { tx_index: 1, - source: std::io::Error::other("sig fail").into(), + source: evm2::AnyError::new(std::io::Error::other("sig fail")), })) .unwrap(); tx.send(Ok(output(0, 0))).unwrap(); diff --git a/crates/engine/tree/src/tree/payload_processor/bal/worker.rs b/crates/engine/tree/src/tree/payload_processor/bal/worker.rs index e2618dfc009..5a7354636c6 100644 --- a/crates/engine/tree/src/tree/payload_processor/bal/worker.rs +++ b/crates/engine/tree/src/tree/payload_processor/bal/worker.rs @@ -3,7 +3,7 @@ use alloy_consensus::Transaction; use alloy_eip7928::BlockAccessIndex; use alloy_primitives::{Address, B256, U256}; use crossbeam_channel::{Receiver, Sender}; -use evm2::{bytecode::Bytecode, evm::AccountInfo}; +use evm2::{bytecode::Bytecode, evm::AccountInfo, AnyError}; use reth_evm::{ BlockExecutionError, BlockExecutor, BlockExecutorFactory, BlockExecutorFor, BlockValidationError, ConfigureEvm, Database, EvmEnvFor, ExecutableTxFor, ExecutionCtxFor, @@ -22,7 +22,7 @@ pub(super) enum BalWorkerError { tx_index: usize, /// The underlying recovery or conversion error. #[source] - source: Box, + source: AnyError, }, /// EVM transaction execution failed. #[error("BAL worker EVM execution failed for transaction {tx_index}: {source}")] @@ -103,8 +103,10 @@ pub(super) fn spawn_worker<'scope, Evm, Tx, Err, DB, MakeDb>( let tx = match tx { Ok(tx) => tx, Err(source) => { - let error = - BalWorkerError::Transaction { tx_index, source: Box::new(source) }; + let error = BalWorkerError::Transaction { + tx_index, + source: AnyError::new(source), + }; if result_tx.send(Err(error)).is_err() { break 'worker; } diff --git a/crates/ethereum/evm/Cargo.toml b/crates/ethereum/evm/Cargo.toml index b26ab411010..0600bff114a 100644 --- a/crates/ethereum/evm/Cargo.toml +++ b/crates/ethereum/evm/Cargo.toml @@ -19,7 +19,7 @@ reth-primitives-traits.workspace = true reth-ethereum-primitives.workspace = true reth-evm.workspace = true reth-storage-errors = { workspace = true, optional = true } -evm2.workspace = true +evm2 = { workspace = true, features = ["block"] } evm2-jit = { workspace = true, optional = true, features = ["llvm"] } # Alloy @@ -28,13 +28,13 @@ alloy-eips.workspace = true alloy-eip7928.workspace = true alloy-consensus.workspace = true alloy-rpc-types-engine.workspace = true -alloy-sol-types.workspace = true # misc metrics = { workspace = true, optional = true } reth-metrics = { workspace = true, optional = true } [dev-dependencies] +alloy-sol-types.workspace = true reth-testing-utils.workspace = true reth-trie-common.workspace = true reth-evm = { workspace = true, features = ["test-utils"] } @@ -89,8 +89,8 @@ std = [ "alloy-rpc-types-engine/std", "dep:reth-storage-errors", "reth-storage-errors/std", - "alloy-sol-types/std", "alloy-eip7928/std", + "alloy-sol-types/std", ] test-utils = [ "std", diff --git a/crates/ethereum/evm/src/dao_fork.rs b/crates/ethereum/evm/src/dao_fork.rs index f2a8808d1ed..ec448958486 100644 --- a/crates/ethereum/evm/src/dao_fork.rs +++ b/crates/ethereum/evm/src/dao_fork.rs @@ -1,128 +1,3 @@ -//! DAO Fork related constants from [EIP-779](https://eips.ethereum.org/EIPS/eip-779). -//! It happened on Ethereum block `1_920_000`. +//! DAO fork constants, defined in evm2. -use alloy_primitives::{address, Address}; - -/// Dao hardfork beneficiary that received ether from accounts from DAO and DAO creator children. -pub(crate) static DAO_HARDFORK_BENEFICIARY: Address = - address!("0xbf4ed7b27f1d666546e30d74d50d173d20bca754"); - -/// Accounts drained into the beneficiary at the DAO hardfork. -pub(crate) static DAO_HARDFORK_ACCOUNTS: [Address; 116] = [ - address!("0xd4fe7bc31cedb7bfb8a345f31e668033056b2728"), - address!("0xb3fb0e5aba0e20e5c49d252dfd30e102b171a425"), - address!("0x2c19c7f9ae8b751e37aeb2d93a699722395ae18f"), - address!("0xecd135fa4f61a655311e86238c92adcd779555d2"), - address!("0x1975bd06d486162d5dc297798dfc41edd5d160a7"), - address!("0xa3acf3a1e16b1d7c315e23510fdd7847b48234f6"), - address!("0x319f70bab6845585f412ec7724b744fec6095c85"), - address!("0x06706dd3f2c9abf0a21ddcc6941d9b86f0596936"), - address!("0x5c8536898fbb74fc7445814902fd08422eac56d0"), - address!("0x6966ab0d485353095148a2155858910e0965b6f9"), - address!("0x779543a0491a837ca36ce8c635d6154e3c4911a6"), - address!("0x2a5ed960395e2a49b1c758cef4aa15213cfd874c"), - address!("0x5c6e67ccd5849c0d29219c4f95f1a7a93b3f5dc5"), - address!("0x9c50426be05db97f5d64fc54bf89eff947f0a321"), - address!("0x200450f06520bdd6c527622a273333384d870efb"), - address!("0xbe8539bfe837b67d1282b2b1d61c3f723966f049"), - address!("0x6b0c4d41ba9ab8d8cfb5d379c69a612f2ced8ecb"), - address!("0xf1385fb24aad0cd7432824085e42aff90886fef5"), - address!("0xd1ac8b1ef1b69ff51d1d401a476e7e612414f091"), - address!("0x8163e7fb499e90f8544ea62bbf80d21cd26d9efd"), - address!("0x51e0ddd9998364a2eb38588679f0d2c42653e4a6"), - address!("0x627a0a960c079c21c34f7612d5d230e01b4ad4c7"), - address!("0xf0b1aa0eb660754448a7937c022e30aa692fe0c5"), - address!("0x24c4d950dfd4dd1902bbed3508144a54542bba94"), - address!("0x9f27daea7aca0aa0446220b98d028715e3bc803d"), - address!("0xa5dc5acd6a7968a4554d89d65e59b7fd3bff0f90"), - address!("0xd9aef3a1e38a39c16b31d1ace71bca8ef58d315b"), - address!("0x63ed5a272de2f6d968408b4acb9024f4cc208ebf"), - address!("0x6f6704e5a10332af6672e50b3d9754dc460dfa4d"), - address!("0x77ca7b50b6cd7e2f3fa008e24ab793fd56cb15f6"), - address!("0x492ea3bb0f3315521c31f273e565b868fc090f17"), - address!("0x0ff30d6de14a8224aa97b78aea5388d1c51c1f00"), - address!("0x9ea779f907f0b315b364b0cfc39a0fde5b02a416"), - address!("0xceaeb481747ca6c540a000c1f3641f8cef161fa7"), - address!("0xcc34673c6c40e791051898567a1222daf90be287"), - address!("0x579a80d909f346fbfb1189493f521d7f48d52238"), - address!("0xe308bd1ac5fda103967359b2712dd89deffb7973"), - address!("0x4cb31628079fb14e4bc3cd5e30c2f7489b00960c"), - address!("0xac1ecab32727358dba8962a0f3b261731aad9723"), - address!("0x4fd6ace747f06ece9c49699c7cabc62d02211f75"), - address!("0x440c59b325d2997a134c2c7c60a8c61611212bad"), - address!("0x4486a3d68fac6967006d7a517b889fd3f98c102b"), - address!("0x9c15b54878ba618f494b38f0ae7443db6af648ba"), - address!("0x27b137a85656544b1ccb5a0f2e561a5703c6a68f"), - address!("0x21c7fdb9ed8d291d79ffd82eb2c4356ec0d81241"), - address!("0x23b75c2f6791eef49c69684db4c6c1f93bf49a50"), - address!("0x1ca6abd14d30affe533b24d7a21bff4c2d5e1f3b"), - address!("0xb9637156d330c0d605a791f1c31ba5890582fe1c"), - address!("0x6131c42fa982e56929107413a9d526fd99405560"), - address!("0x1591fc0f688c81fbeb17f5426a162a7024d430c2"), - address!("0x542a9515200d14b68e934e9830d91645a980dd7a"), - address!("0xc4bbd073882dd2add2424cf47d35213405b01324"), - address!("0x782495b7b3355efb2833d56ecb34dc22ad7dfcc4"), - address!("0x58b95c9a9d5d26825e70a82b6adb139d3fd829eb"), - address!("0x3ba4d81db016dc2890c81f3acec2454bff5aada5"), - address!("0xb52042c8ca3f8aa246fa79c3feaa3d959347c0ab"), - address!("0xe4ae1efdfc53b73893af49113d8694a057b9c0d1"), - address!("0x3c02a7bc0391e86d91b7d144e61c2c01a25a79c5"), - address!("0x0737a6b837f97f46ebade41b9bc3e1c509c85c53"), - address!("0x97f43a37f595ab5dd318fb46e7a155eae057317a"), - address!("0x52c5317c848ba20c7504cb2c8052abd1fde29d03"), - address!("0x4863226780fe7c0356454236d3b1c8792785748d"), - address!("0x5d2b2e6fcbe3b11d26b525e085ff818dae332479"), - address!("0x5f9f3392e9f62f63b8eac0beb55541fc8627f42c"), - address!("0x057b56736d32b86616a10f619859c6cd6f59092a"), - address!("0x9aa008f65de0b923a2a4f02012ad034a5e2e2192"), - address!("0x304a554a310c7e546dfe434669c62820b7d83490"), - address!("0x914d1b8b43e92723e64fd0a06f5bdb8dd9b10c79"), - address!("0x4deb0033bb26bc534b197e61d19e0733e5679784"), - address!("0x07f5c1e1bc2c93e0402f23341973a0e043f7bf8a"), - address!("0x35a051a0010aba705c9008d7a7eff6fb88f6ea7b"), - address!("0x4fa802324e929786dbda3b8820dc7834e9134a2a"), - address!("0x9da397b9e80755301a3b32173283a91c0ef6c87e"), - address!("0x8d9edb3054ce5c5774a420ac37ebae0ac02343c6"), - address!("0x0101f3be8ebb4bbd39a2e3b9a3639d4259832fd9"), - address!("0x5dc28b15dffed94048d73806ce4b7a4612a1d48f"), - address!("0xbcf899e6c7d9d5a215ab1e3444c86806fa854c76"), - address!("0x12e626b0eebfe86a56d633b9864e389b45dcb260"), - address!("0xa2f1ccba9395d7fcb155bba8bc92db9bafaeade7"), - address!("0xec8e57756626fdc07c63ad2eafbd28d08e7b0ca5"), - address!("0xd164b088bd9108b60d0ca3751da4bceb207b0782"), - address!("0x6231b6d0d5e77fe001c2a460bd9584fee60d409b"), - address!("0x1cba23d343a983e9b5cfd19496b9a9701ada385f"), - address!("0xa82f360a8d3455c5c41366975bde739c37bfeb8a"), - address!("0x9fcd2deaff372a39cc679d5c5e4de7bafb0b1339"), - address!("0x005f5cee7a43331d5a3d3eec71305925a62f34b6"), - address!("0x0e0da70933f4c7849fc0d203f5d1d43b9ae4532d"), - address!("0xd131637d5275fd1a68a3200f4ad25c71a2a9522e"), - address!("0xbc07118b9ac290e4622f5e77a0853539789effbe"), - address!("0x47e7aa56d6bdf3f36be34619660de61275420af8"), - address!("0xacd87e28b0c9d1254e868b81cba4cc20d9a32225"), - address!("0xadf80daec7ba8dcf15392f1ac611fff65d94f880"), - address!("0x5524c55fb03cf21f549444ccbecb664d0acad706"), - address!("0x40b803a9abce16f50f36a77ba41180eb90023925"), - address!("0xfe24cdd8648121a43a7c86d289be4dd2951ed49f"), - address!("0x17802f43a0137c506ba92291391a8a8f207f487d"), - address!("0x253488078a4edf4d6f42f113d1e62836a942cf1a"), - address!("0x86af3e9626fce1957c82e88cbf04ddf3a2ed7915"), - address!("0xb136707642a4ea12fb4bae820f03d2562ebff487"), - address!("0xdbe9b615a3ae8709af8b93336ce9b477e4ac0940"), - address!("0xf14c14075d6c4ed84b86798af0956deef67365b5"), - address!("0xca544e5c4687d109611d0f8f928b53a25af72448"), - address!("0xaeeb8ff27288bdabc0fa5ebb731b6f409507516c"), - address!("0xcbb9d3703e651b0d496cdefb8b92c25aeb2171f7"), - address!("0x6d87578288b6cb5549d5076a207456a1f6a63dc0"), - address!("0xb2c6f0dfbb716ac562e2d85d6cb2f8d5ee87603e"), - address!("0xaccc230e8a6e5be9160b8cdf2864dd2a001c28b6"), - address!("0x2b3455ec7fedf16e646268bf88846bd7a2319bb2"), - address!("0x4613f3bca5c44ea06337a9e439fbc6d42e501d0a"), - address!("0xd343b217de44030afaa275f54d31a9317c7f441e"), - address!("0x84ef4b2357079cd7a7c69fd7a37cd0609a679106"), - address!("0xda2fef9e4a3230988ff17df2165440f37e8b1708"), - address!("0xf4c64518ea10f995918a454158c6b61407ea345c"), - address!("0x7602b46df5390e432ef1c307d4f2c9ff6d65cc97"), - address!("0xbb9bc244d798123fde783fcc1c72d3bb8c189413"), - address!("0x807640a13483f8ac783c557fcdf27be11ea4ac7a"), -]; +pub(crate) use evm2::block::ethereum::dao_fork::{DAO_HARDFORK_ACCOUNTS, DAO_HARDFORK_BENEFICIARY}; diff --git a/crates/ethereum/evm/src/execution.rs b/crates/ethereum/evm/src/execution.rs index d4f0030282c..90d1658fe64 100644 --- a/crates/ethereum/evm/src/execution.rs +++ b/crates/ethereum/evm/src/execution.rs @@ -1,4 +1,7 @@ -//! EVM-backed Ethereum execution helpers. +//! Tests of the Ethereum execution helpers, which evm2 implements. + +#![cfg(test)] +#![allow(unused_imports)] use crate::dao_fork; use alloc::{boxed::Box, string::ToString, vec::Vec}; @@ -17,6 +20,7 @@ use alloy_primitives::{map::AddressMap, Address, Bytes, Log, B256, U256}; use alloy_sol_types::{sol, SolEvent}; use core::any::Any; use evm2::{ + block::ethereum::execution::*, evm::{ AccountChangeRef, AccountInfo, StateChangeSink, SystemTx, BEACON_ROOTS_ADDRESS, BUILDER_DEPOSIT_REQUEST_ADDRESS, BUILDER_EXIT_REQUEST_ADDRESS, @@ -33,569 +37,6 @@ use reth_evm::{ }; use reth_execution_types::{BlockState, StateUpdate}; -const DEPOSIT_BYTES_SIZE: usize = 48 + 32 + 8 + 96 + 8; -const BUILDER_DEPOSIT_REQUEST_TYPE: u8 = 0x03; -const BUILDER_EXIT_REQUEST_TYPE: u8 = 0x04; - -sol! { - #[allow(missing_docs)] - event DepositEvent( - bytes pubkey, - bytes withdrawal_credentials, - bytes amount, - bytes signature, - bytes index - ); -} - -/// Ethereum transaction validation error returned by evm2 handlers. -#[derive(Debug, Clone, PartialEq, Eq)] -struct EthInvalidTxError(HandlerError); - -impl core::fmt::Display for EthInvalidTxError { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - self.0.fmt(f) - } -} - -impl core::error::Error for EthInvalidTxError {} - -impl InvalidTxError for EthInvalidTxError { - fn is_nonce_too_low(&self) -> bool { - matches!(self.0, HandlerError::InvalidNonce { expected, got } if got < expected) - } - - fn is_gas_limit_too_high(&self) -> bool { - matches!( - self.0, - HandlerError::GasLimitMoreThanBlock { .. } | - HandlerError::TxGasLimitGreaterThanCap { .. } - ) - } - - fn is_gas_limit_too_low(&self) -> bool { - matches!(self.0, HandlerError::IntrinsicGasTooLow { .. }) - } - - /// Exposes the wrapped [`HandlerError`] so RPC layers can recover the structured error. - fn as_any(&self) -> &(dyn Any + 'static) { - &self.0 - } -} - -impl TryFrom for EthInvalidTxError { - type Error = HandlerError; - - fn try_from(error: HandlerError) -> Result { - match error { - HandlerError::Database(_) | - HandlerError::Fatal(_) | - HandlerError::WrongTransactionType { .. } => Err(error), - HandlerError::External(_) | - HandlerError::UnsupportedTransactionType(_) | - HandlerError::InvalidNonce { .. } | - HandlerError::InvalidChainId { .. } | - HandlerError::MissingChainId | - HandlerError::IntrinsicGasTooLow { .. } | - HandlerError::InsufficientFunds { .. } | - HandlerError::RejectCallerWithCode | - HandlerError::NonceOverflow | - HandlerError::GasLimitMoreThanBlock { .. } | - HandlerError::TxGasLimitGreaterThanCap { .. } | - HandlerError::CreateInitCodeSizeLimit { .. } | - HandlerError::FeeCapLessThanBaseFee { .. } | - HandlerError::EmptyAuthorizationList | - HandlerError::BlobFeeCapLessThanBlobBaseFee { .. } | - HandlerError::EmptyBlobs | - HandlerError::TooManyBlobs { .. } | - HandlerError::BlobVersionNotSupported | - HandlerError::PriorityFeeGreaterThanMaxFee => Ok(Self(error)), - } - } -} - -/// Additional block-level execution context. -#[derive(Debug, Clone, Copy, Default)] -pub(crate) struct BlockExecutionContext<'a> { - /// Pre-block system calls to run before transaction execution. - pub system_calls: Option, - /// Pre-merge ommer headers included in the block. - pub ommers: Option<&'a [Header]>, - /// Post-block withdrawals to apply after transaction execution. - pub withdrawals: Option<&'a [Withdrawal]>, - /// Deposit contract address used to derive EIP-6110 deposit requests from receipts. - pub deposit_contract_address: Option

, -} - -/// Inputs required by Ethereum pre-block system calls. -#[derive(Debug, Clone, Copy)] -pub(crate) struct BlockSystemCalls { - /// Parent block hash for EIP-2935 history storage. - pub parent_hash: B256, - /// Parent beacon block root for EIP-4788 beacon roots. - pub parent_beacon_block_root: Option, -} - -pub(crate) fn map_transaction_error(error: HandlerError, hash: B256) -> BlockExecutionError { - let error = match EthInvalidTxError::try_from(error) { - Ok(error) => { - return BlockValidationError::InvalidTx { hash, error: Box::new(error) }.into(); - } - Err(error) => error, - }; - if let HandlerError::Database(database_error) = &error && - !database_error.is_fatal() - { - BlockValidationError::EVM { hash, error: Box::new(error) }.into() - } else { - InternalBlockExecutionError::EVM { hash, error: Box::new(error) }.into() - } -} - -fn send_state_update(state: StateUpdate, on_state_update: &mut impl FnMut(StateUpdate)) { - if !state.is_empty() { - on_state_update(state); - } -} - -pub(crate) fn execute_transaction_with_condition( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - transaction: &Recovered, - commit: impl FnOnce(&TxResult, evm2::TxStateChanges<'_>) -> reth_evm::CommitChanges, -) -> Result>, HandlerError> -where - T::Tx: Typed2718, -{ - let mut update = StateUpdate::default(); - let result = match evm.transact(transaction) { - Ok(executed) => { - if commit(executed.result(), executed.changes()).should_commit() { - for changes in executed.account_changes() { - block_state - .commit_account_changes(changes, stream_state.then_some(&mut update)); - } - Ok(Some(executed.commit())) - } else { - let _ = executed.discard(); - Ok(None) - } - } - Err(error) => Err(error), - }; - if stream_state { - send_state_update(update, on_state_update); - } - result -} - -pub(crate) fn execute_transaction_without_commit( - evm: &mut Evm<'_, T>, - transaction: &Recovered, -) -> Result, HandlerError> -where - T::Tx: Typed2718, -{ - evm.transact(transaction).map(|executed| executed.detach()) -} - -pub(crate) fn commit_detached_transaction( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - output: TxResultWithState, -) -> TxResult { - let TxResultWithState { result, pending_state, .. } = output; - accumulate_pending_state(block_state, stream_state, on_state_update, &pending_state); - // Reattach the finalized transaction so evm2 retains its account capacity and recycles - // storage maps for the next transaction instead of dropping the detached allocations. - evm.state_mut().set_pending_state(pending_state); - evm.state_mut().commit_transaction(); - result -} - -pub(crate) fn commit_pending_state( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - pending_state: &evm2::evm::PendingState, -) { - accumulate_pending_state(block_state, stream_state, on_state_update, pending_state); - evm.overlay_db_mut().commit_pending(pending_state); -} - -fn accumulate_pending_state( - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - pending_state: &evm2::evm::PendingState, -) { - let mut update = StateUpdate::default(); - for changes in pending_state.account_changes() { - block_state.commit_account_changes(changes, stream_state.then_some(&mut update)); - } - if stream_state { - send_state_update(update, on_state_update); - } -} - -pub(crate) fn pre_execution_system_call_state_changes( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - spec_id: SpecId, - block_number: u64, - context: BlockExecutionContext<'_>, -) -> Result<(), BlockExecutionError> { - let Some(system_calls) = context.system_calls else { - return Ok(()); - }; - - if spec_id.enables(SpecId::PRAGUE) && block_number != 0 { - let _ = execute_system_call( - evm, - block_state, - stream_state, - on_state_update, - HISTORY_STORAGE_ADDRESS, - system_calls.parent_hash.0.into(), - )?; - } - - if spec_id.enables(SpecId::CANCUN) { - let parent_beacon_block_root = system_calls - .parent_beacon_block_root - .ok_or(BlockValidationError::MissingParentBeaconBlockRoot)?; - - if block_number == 0 { - if parent_beacon_block_root != B256::ZERO { - return Err(BlockValidationError::CancunGenesisParentBeaconBlockRootNotZero { - parent_beacon_block_root, - } - .into()); - } - } else { - let _ = execute_system_call( - evm, - block_state, - stream_state, - on_state_update, - BEACON_ROOTS_ADDRESS, - parent_beacon_block_root.0.into(), - )?; - } - } - - Ok(()) -} - -pub(crate) fn block_requests_from_receipts( - spec_id: SpecId, - context: BlockExecutionContext<'_>, - receipts: &[R], -) -> Result -where - R: TxReceipt, -{ - let mut requests = Requests::default(); - if context.system_calls.is_none() || !spec_id.enables(SpecId::PRAGUE) { - return Ok(requests) - } - - let deposit_requests = parse_deposit_requests_from_receipts( - context.deposit_contract_address.unwrap_or(MAINNET_DEPOSIT_CONTRACT_ADDRESS), - receipts, - )?; - requests.push_request_with_type(DEPOSIT_REQUEST_TYPE, deposit_requests); - - Ok(requests) -} - -// TODO: Replace the local deposit event and encoding with alloy-eips helpers once -// https://github.com/alloy-rs/alloy/pull/4244 is released. -fn parse_deposit_requests_from_receipts( - deposit_contract_address: Address, - receipts: &[R], -) -> Result, BlockExecutionError> -where - R: TxReceipt, -{ - let mut out = Vec::new(); - for receipt in receipts { - for log in receipt.logs() { - if log.address != deposit_contract_address || - log.topics().first() != Some(&DepositEvent::SIGNATURE_HASH) - { - continue - } - - let decoded = DepositEvent::decode_log(log) - .map_err(|err| BlockValidationError::DepositRequestDecode(err.to_string()))?; - out.reserve(DEPOSIT_BYTES_SIZE); - out.extend_from_slice(decoded.pubkey.as_ref()); - out.extend_from_slice(decoded.withdrawal_credentials.as_ref()); - out.extend_from_slice(decoded.amount.as_ref()); - out.extend_from_slice(decoded.signature.as_ref()); - out.extend_from_slice(decoded.index.as_ref()); - } - } - - Ok(out) -} - -pub(crate) fn post_execution_system_call_state_changes( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - spec_id: SpecId, - context: BlockExecutionContext<'_>, - requests: &mut Requests, -) -> Result<(), BlockExecutionError> { - if context.system_calls.is_none() || !spec_id.enables(SpecId::PRAGUE) { - return Ok(()); - } - - let withdrawal_requests = execute_system_call( - evm, - block_state, - stream_state, - on_state_update, - WITHDRAWAL_REQUEST_ADDRESS, - Bytes::new(), - )?; - requests.push_request_with_type( - WITHDRAWAL_REQUEST_TYPE, - withdrawal_requests.output.iter().copied(), - ); - - let consolidation_requests = execute_system_call( - evm, - block_state, - stream_state, - on_state_update, - CONSOLIDATION_REQUEST_ADDRESS, - Bytes::new(), - )?; - requests.push_request_with_type( - CONSOLIDATION_REQUEST_TYPE, - consolidation_requests.output.iter().copied(), - ); - - if spec_id.enables(SpecId::AMSTERDAM) { - let builder_deposit_requests = execute_system_call( - evm, - block_state, - stream_state, - on_state_update, - BUILDER_DEPOSIT_REQUEST_ADDRESS, - Bytes::new(), - )?; - requests.push_request_with_type( - BUILDER_DEPOSIT_REQUEST_TYPE, - builder_deposit_requests.output.iter().copied(), - ); - - let builder_exit_requests = execute_system_call( - evm, - block_state, - stream_state, - on_state_update, - BUILDER_EXIT_REQUEST_ADDRESS, - Bytes::new(), - )?; - requests.push_request_with_type( - BUILDER_EXIT_REQUEST_TYPE, - builder_exit_requests.output.iter().copied(), - ); - } - - Ok(()) -} - -fn execute_system_call( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - address: Address, - data: Bytes, -) -> Result, BlockExecutionError> { - let executed = evm.system_call(SystemTx::new(address, data)).map_err(map_handler_error)?; - // History and beacon-root calls accept reverts and halts, unlike request-producing calls. - if !executed.result().status && - !matches!(address, BEACON_ROOTS_ADDRESS | HISTORY_STORAGE_ADDRESS) - { - let reason = executed.result().stop; - let _ = executed.discard(); - return Err(match address { - WITHDRAWAL_REQUEST_ADDRESS => BlockValidationError::WithdrawalRequestsContractCall { - message: alloc::format!("{reason:?}"), - }, - CONSOLIDATION_REQUEST_ADDRESS => { - BlockValidationError::ConsolidationRequestsContractCall { - message: alloc::format!("{reason:?}"), - } - } - _ => BlockValidationError::Other(Box::new(SystemCallFailed { address, reason })), - } - .into()); - } - let outcome = executed.detach(); - Ok(commit_detached_transaction(evm, block_state, stream_state, on_state_update, outcome)) -} - -fn commit_state_changes( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - changes: &[(Address, Option, Option)], -) { - let mut pending_state = evm2::evm::PendingState::default(); - for (address, original, current) in changes { - let change = AccountChangeRef { - address: *address, - original: original.as_ref(), - current: current.as_ref(), - created: false, - selfdestructed: false, - }; - let Ok(()) = evm.overlay_db_mut().account(change); - pending_state.insert_account(*address, original.clone(), current.clone()); - } - accumulate_pending_state(block_state, stream_state, on_state_update, &pending_state); -} - -#[expect(clippy::too_many_arguments)] -pub(crate) fn post_block_balance_state_changes( - evm: &mut Evm<'_, T>, - block_state: &mut BlockState, - stream_state: bool, - on_state_update: &mut impl FnMut(StateUpdate), - base_block_reward: Option, - dao_fork_transition: bool, - block_number: u64, - block_beneficiary: Address, - ommers: Option<&[Header]>, - withdrawals: Option<&[Withdrawal]>, -) -> Result<(), BlockExecutionError> { - let mut balance_increments = AddressMap::::default(); - - if let Some(base_block_reward) = base_block_reward { - let ommers = ommers.unwrap_or_default(); - for ommer in ommers { - *balance_increments.entry(ommer.beneficiary()).or_default() += - U256::from(ommer_reward(base_block_reward, block_number, ommer.number())); - } - *balance_increments.entry(block_beneficiary).or_default() += - U256::from(block_reward(base_block_reward, ommers.len())); - } - - for withdrawal in withdrawals.into_iter().flatten() { - *balance_increments.entry(withdrawal.address).or_default() += withdrawal.amount_wei(); - } - - let mut changes = Vec::new(); - - if dao_fork_transition { - core::hint::cold_path(); - let mut drained_balance = U256::ZERO; - // Absent accounts stay absent, and an account that is empty once drained is removed, even - // before EIP-161. - for address in dao_fork::DAO_HARDFORK_ACCOUNTS { - let original = evm.read_account_info(&address).map_err(map_database_error)?; - let Some(original) = original else { continue }; - - drained_balance = drained_balance.saturating_add(original.balance); - let mut current = original.clone(); - current.balance = U256::ZERO; - let current = (!current.is_empty()).then_some(current); - if current.as_ref() == Some(&original) { - continue - } - changes.push((address, Some(original), current)); - } - - *balance_increments.entry(dao_fork::DAO_HARDFORK_BENEFICIARY).or_default() += - drained_balance; - // Reward recipients may also be drained accounts. Read their balances after the drain. - commit_state_changes(evm, block_state, stream_state, on_state_update, &changes); - changes.clear(); - } - - if balance_increments.is_empty() { - return Ok(()); - } - - for (address, increment) in balance_increments { - let original = evm.read_account_info(&address).map_err(map_database_error)?; - let current = if increment.is_zero() && original.as_ref().is_none_or(AccountInfo::is_empty) - { - None - } else { - let mut current = original.clone().unwrap_or_else(AccountInfo::empty); - current.balance = current.balance.saturating_add(increment); - Some(current) - }; - if original == current { - // Zero-value withdrawals still count as account accesses in the BAL. - let Ok(()) = evm.overlay_db_mut().account_read(address, original.as_ref()); - continue - } - changes.push((address, original, current)); - } - - commit_state_changes(evm, block_state, stream_state, on_state_update, &changes); - - Ok(()) -} - -pub(crate) fn base_block_reward(chain_spec: &C, block_number: u64) -> Option -where - C: EthereumHardforks + ?Sized, -{ - if chain_spec.is_paris_active_at_block(block_number) { - None - } else if chain_spec.is_constantinople_active_at_block(block_number) { - Some(ETH_TO_WEI * 2) - } else if chain_spec.is_byzantium_active_at_block(block_number) { - Some(ETH_TO_WEI * 3) - } else { - Some(ETH_TO_WEI * 5) - } -} - -const fn block_reward(base_block_reward: u128, ommers: usize) -> u128 { - base_block_reward + (base_block_reward >> 5) * ommers as u128 -} - -fn ommer_reward(base_block_reward: u128, block_number: u64, ommer_block_number: u64) -> u128 { - let distance = 8u64.saturating_add(ommer_block_number).saturating_sub(block_number); - (u128::from(distance) * base_block_reward) >> 3 -} - -/// A system contract reverted or halted without producing a successful result. -#[derive(Debug)] -struct SystemCallFailed { - address: Address, - reason: InstrStop, -} - -impl core::fmt::Display for SystemCallFailed { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - write!(f, "EVM system call to {} failed: {:?}", self.address, self.reason) - } -} - -impl core::error::Error for SystemCallFailed {} - -#[cfg(test)] mod tests { use super::*; use alloy_consensus::{SignableTransaction, TxLegacy, TxType}; @@ -613,6 +54,16 @@ mod tests { use reth_trie_common::{HashedPostState, KeccakKeyHasher}; use std::sync::{mpsc, Arc}; + sol! { + event DepositEvent( + bytes pubkey, + bytes withdrawal_credentials, + bytes amount, + bytes signature, + bytes index + ); + } + type BlockEnv = EvmBlockEnv; #[test] @@ -889,8 +340,8 @@ mod tests { &mut BlockState::new(), false, &mut |_| {}, + SpecId::AMSTERDAM, None, - false, 1, Address::ZERO, None, @@ -1037,6 +488,14 @@ mod tests { Bytes::from_static(&[op::INVALID]), ] { let mut database = InMemoryDB::default(); + for request_contract in [WITHDRAWAL_REQUEST_ADDRESS, CONSOLIDATION_REQUEST_ADDRESS] + { + database.insert_account_info( + &request_contract, + AccountInfo::default() + .with_code(Bytecode::new_legacy(Bytes::from_static(&[op::STOP]))), + ); + } database.insert_account_info( &address, AccountInfo::default().with_code(Bytecode::new_legacy(code)), diff --git a/crates/ethereum/evm/src/executor.rs b/crates/ethereum/evm/src/executor.rs index adc86abdb6f..b11ac65ffe5 100644 --- a/crates/ethereum/evm/src/executor.rs +++ b/crates/ethereum/evm/src/executor.rs @@ -1,36 +1,54 @@ //! EVM-backed Ethereum executor. +//! +//! [`EthBlockExecutor`] wraps evm2's [`evm2::block::ethereum::EthBlockExecutor`], which implements +//! Ethereum block execution, and adapts it to reth's [`BlockExecutor`] trait. + use reth_execution_types::{BlockState, StateUpdate}; use crate::{ - execution::{ - base_block_reward, block_requests_from_receipts, commit_detached_transaction, - commit_pending_state, execute_transaction_without_commit, map_transaction_error, - post_block_balance_state_changes, post_execution_system_call_state_changes, - pre_execution_system_call_state_changes, BlockExecutionContext, BlockSystemCalls, - }, factory::{EthBlockExecutorFactory, EvmFactory}, EthBlockExecutionCtx, EthEvmEnv, RethReceiptBuilder, }; -use alloc::{boxed::Box, sync::Arc, vec::Vec}; -use alloy_consensus::{ - transaction::{TransactionEnvelope, TxHashRef}, - Header, Transaction, TxType as EthTxType, -}; +use alloc::{borrow::Cow, sync::Arc, vec::Vec}; +use alloy_consensus::transaction::TransactionEnvelope; use alloy_eip7928::{BlockAccessIndex, BlockAccessList}; -use alloy_eips::{eip2718::Typed2718, eip4895::Withdrawal, eip7685::Requests}; -use alloy_primitives::{Address, B256}; +use alloy_eips::{eip2718::Typed2718, eip7685::Requests}; +use alloy_primitives::B256; use evm2::{ - ethereum::TxEnvelope, evm::Bal, interpreter::Host, BaseEvmTypes, Evm, EvmTypes, - TxResultWithState, + block::{ + ethereum::{self as evm2_eth, EthBlockRules, EthPostExecutionOutput}, + BlockExecutor as _, + }, + ethereum::TxEnvelope, + evm::Bal, + interpreter::Host, + BaseEvmTypes, Evm, EvmTypes, }; use reth_chainspec::EthChainSpec; -use reth_ethereum_forks::{EthereumHardfork, EthereumHardforks}; +use reth_ethereum_forks::EthereumHardforks; use reth_ethereum_primitives::{Receipt, TransactionSigned}; use reth_evm::{ - BlockExecutionError, BlockExecutionOutput, BlockExecutor, BlockTransactionResult, - BlockValidationError, ExecutorTx, GasOutput, ReceiptBuilder, ReceiptBuilderCtx, RecoveredTx, + BlockExecutionError, BlockExecutionOutput, BlockExecutor, ExecutorTx, GasOutput, + ReceiptBuilder, ReceiptBuilderCtx, RecoveredTx, }; -use reth_execution_types::BlockExecutionResult; + +pub use evm2::block::ethereum::EthTransactionResultWithState; + +/// Adapts a reth [`ReceiptBuilder`] to evm2's receipt builder. +#[derive(Debug, Clone, Copy, Default)] +pub struct ReceiptBuilderAdapter(pub R); + +impl evm2::block::ReceiptBuilder for ReceiptBuilderAdapter { + type Transaction = R::Transaction; + type Receipt = R::Receipt; + + fn build_receipt( + &self, + ctx: ReceiptBuilderCtx<::TxType, evm2::TxResult>, + ) -> R::Receipt { + self.0.build_receipt::(ctx) + } +} /// Configured Ethereum block executor backed by evm2. #[expect(missing_debug_implementations)] @@ -39,60 +57,22 @@ where T: EvmTypes, R: ReceiptBuilder, { - /// EVM containing the execution overlay and optional block access list builder. - pub evm: Evm<'a, T>, + /// evm2 executor that runs the block. + pub inner: evm2_eth::EthBlockExecutor<'a, T, ReceiptBuilderAdapter>, ctx: EthBlockExecutionCtx<'a>, - receipt_builder: R, - spec_id: evm2::SpecId, - base_block_reward: Option, - dao_fork_transition: bool, - deposit_contract_address: Option
, - /// Accumulated state changes, including state committed through the executor's hooks. - pub block_state: BlockState, - state_update_hook: StateUpdateHook, - /// Transaction receipts in execution order. - pub receipts: Vec, - /// Total receipt gas used. - pub cumulative_gas_used: u64, - block_regular_gas_used: u64, - block_state_gas_used: u64, - separate_block_gas: bool, - /// Total blob gas used. - pub blob_gas_used: u64, - bal_index_offset: u64, -} - -/// Detached Ethereum transaction result with the metadata needed for canonical receipt commit. -#[derive(Debug)] -pub struct EthTransactionResultWithState -where - T: EvmTypes, -{ - result: TxResultWithState, - tx_type: TxType, - blob_gas_used: u64, } -impl BlockTransactionResult for EthTransactionResultWithState { - fn result(&self) -> &TxResultWithState { - &self.result - } -} - -impl EthTransactionResultWithState { - /// Creates a detached transaction result with its receipt metadata. - pub const fn new(result: TxResultWithState, tx_type: TxType, blob_gas_used: u64) -> Self { - Self { result, tx_type, blob_gas_used } - } - - /// Returns the detached EVM transaction result. - pub const fn result(&self) -> &TxResultWithState { - &self.result +/// Converts reth's execution context into evm2's. +fn evm2_ctx<'a>(ctx: &EthBlockExecutionCtx<'a>) -> evm2_eth::EthBlockExecutionCtx<'a> { + evm2_eth::EthBlockExecutionCtx { + tx_count_hint: ctx.tx_count_hint, + parent_hash: ctx.parent_hash, + parent_beacon_block_root: ctx.parent_beacon_block_root, + ommers: Cow::Borrowed(ctx.ommers), + withdrawals: ctx.withdrawals.clone(), } } -type StateUpdateHook = Option>; - impl<'a, T, R> EthBlockExecutor<'a, T, R> where T: EvmTypes, @@ -108,56 +88,19 @@ where where C: EthChainSpec + EthereumHardforks + ?Sized, { - // The executor stores evm2's base spec ID, while custom type families may expose a - // richer host spec ID that converts into it. - #[allow(clippy::useless_conversion)] - let spec_id = evm.spec_id().into(); let block_number = evm.block_env().number.to::(); - let separate_block_gas = evm.version().feature(evm2::EvmFeatures::EIP8037); - let dao_fork_transition = chain_spec - .ethereum_fork_activation(EthereumHardfork::Dao) - .transitions_at_block(block_number); - let receipts = Vec::with_capacity(ctx.tx_count_hint.unwrap_or_default()); - - Self { + let rules = EthBlockRules::new( + chain_spec, + block_number, + chain_spec.deposit_contract().map(|contract| contract.address), + ); + let inner = evm2_eth::EthBlockExecutor::new( evm, - ctx, - receipt_builder, - spec_id, - base_block_reward: base_block_reward(chain_spec, block_number), - dao_fork_transition, - deposit_contract_address: chain_spec - .deposit_contract() - .map(|contract| contract.address), - block_state: BlockState::new(), - state_update_hook: None, - receipts, - cumulative_gas_used: 0, - block_regular_gas_used: 0, - block_state_gas_used: 0, - separate_block_gas, - blob_gas_used: 0, - bal_index_offset: 0, - } - } - - const fn block_context<'ctx>( - deposit_contract_address: Option
, - parent_hash: B256, - parent_beacon_block_root: Option, - ommers: &'ctx [Header], - withdrawals: Option<&'ctx [Withdrawal]>, - ) -> BlockExecutionContext<'ctx> { - BlockExecutionContext { - system_calls: Some(BlockSystemCalls { parent_hash, parent_beacon_block_root }), - ommers: Some(ommers), - withdrawals, - deposit_contract_address, - } - } - - const fn block_access_list_builder_enabled(&self) -> bool { - self.evm.state().bal_builder().is_some() + evm2_ctx(&ctx), + rules, + ReceiptBuilderAdapter(receipt_builder), + ); + Self { inner, ctx } } /// Returns the block execution context. @@ -167,32 +110,17 @@ where /// Returns the accumulated block state. pub const fn block_state(&self) -> &BlockState { - &self.block_state + self.inner.block_state() } /// Commits detached state without recording a transaction receipt or gas usage. pub fn commit_pending_state(&mut self, state: &evm2::evm::PendingState) { - let stream_state = self.state_update_hook.is_some(); - commit_pending_state( - &mut self.evm, - &mut self.block_state, - stream_state, - &mut |state| emit_state(&mut self.state_update_hook, state), - state, - ); + self.inner.commit_pending_state(state); } /// Sets the Ethereum fork used for block system calls and deposit request processing. pub const fn set_spec_id(&mut self, spec_id: evm2::SpecId) { - self.spec_id = spec_id; - } - - #[inline] - const fn set_transaction_block_access_index(&mut self) { - if self.block_access_list_builder_enabled() { - let index = self.receipts.len() as u64 + 1 + self.bal_index_offset; - self.evm.state_mut().set_bal_index(BlockAccessIndex::new(index)); - } + self.inner.set_spec_id(spec_id); } } @@ -209,16 +137,15 @@ where type BlockAccessList = Bal; fn evm(&self) -> &Self::Evm { - &self.evm + &self.inner.evm } fn evm_mut(&mut self) -> &mut Self::Evm { - &mut self.evm + &mut self.inner.evm } fn set_state_hook(&mut self, hook: impl FnMut(StateUpdate) + Send + 'static) -> bool { - self.state_update_hook = Some(Box::new(hook)); - true + self.inner.set_state_hook(hook) } fn convert_block_access_list( @@ -227,80 +154,35 @@ where Bal::try_from(block_access_list.as_slice()).map_err(BlockExecutionError::other) } - fn set_block_access_list( - &mut self, - block_access_list: alloc::sync::Arc, - ) { - self.evm.state_mut().set_bal(block_access_list); + fn set_block_access_list(&mut self, block_access_list: Arc) { + self.inner.set_block_access_list(block_access_list); } fn set_block_access_index(&mut self, index: BlockAccessIndex) { - self.evm.state_mut().set_bal_index(index); + self.inner.set_block_access_index(index); } fn enable_block_access_list_builder(&mut self) { - self.evm.state_mut().enable_bal_builder(); - self.evm.state_mut().reset_bal_index(); + self.inner.enable_block_access_list_builder(); } fn take_block_access_list(&mut self) -> Option { - self.evm.state_mut().take_bal_builder().map(Into::into) + self.inner.take_block_access_list().map(Into::into) } fn apply_pre_execution_changes(&mut self) -> Result<(), BlockExecutionError> { - let context = Self::block_context( - self.deposit_contract_address, - self.ctx.parent_hash, - self.ctx.parent_beacon_block_root, - self.ctx.ommers, - None, - ); - let block_number = self.evm.block_env().number.to::(); - let stream_state = self.state_update_hook.is_some(); - pre_execution_system_call_state_changes( - &mut self.evm, - &mut self.block_state, - stream_state, - &mut |state| emit_state(&mut self.state_update_hook, state), - self.spec_id, - block_number, - context, - ) + self.inner.apply_pre_execution_changes() } fn into_state(self) -> reth_evm::BundleState { - self.block_state.into_bundle() + self.inner.into_state() } fn validate_transaction_gas_limit( &mut self, transaction_gas_limit: u64, ) -> Result<(), BlockExecutionError> { - let block_gas_limit = self.evm.block_env().gas_limit.to::(); - let unavailable = if self.separate_block_gas { - let regular_available = block_gas_limit.saturating_sub(self.block_regular_gas_used); - let state_available = block_gas_limit.saturating_sub(self.block_state_gas_used); - let regular_limit = transaction_gas_limit.min(self.evm.version().tx_gas_limit_cap); - if regular_limit > regular_available { - Some((transaction_gas_limit, regular_available)) - } else if transaction_gas_limit > state_available { - Some((transaction_gas_limit, state_available)) - } else { - None - } - } else { - let available = block_gas_limit.saturating_sub(self.cumulative_gas_used); - let regular_limit = transaction_gas_limit.min(self.evm.version().tx_gas_limit_cap); - (regular_limit > available).then_some((transaction_gas_limit, available)) - }; - if let Some((transaction_gas_limit, block_available_gas)) = unavailable { - return Err(BlockValidationError::TransactionGasLimitMoreThanAvailableBlockGas { - transaction_gas_limit, - block_available_gas, - } - .into()) - } - Ok(()) + self.inner.validate_transaction_gas_limit(transaction_gas_limit) } fn execute_transaction_with_commit_condition( @@ -309,35 +191,7 @@ where commit: impl FnOnce(&evm2::TxResult, evm2::TxStateChanges<'_>) -> reth_evm::CommitChanges, ) -> Result, BlockExecutionError> { let (transaction, tx) = transaction.into_parts(); - self.set_transaction_block_access_index(); - self.validate_transaction_gas_limit(tx.tx().gas_limit())?; - let blob_gas_used = tx.tx().blob_gas_used().unwrap_or_default(); - let tx_type = tx.tx().tx_type(); - let Some(outcome) = crate::execution::execute_transaction_with_condition( - &mut self.evm, - &mut self.block_state, - self.state_update_hook.is_some(), - &mut |state| emit_state(&mut self.state_update_hook, state), - &transaction, - commit, - ) - .map_err(|error| map_transaction_error(error, *tx.tx().tx_hash()))? - else { - return Ok(None); - }; - let tx_gas_used = outcome.tx_gas_used(); - let regular_gas_used = outcome.execution_gas_spent(); - let state_gas_used = outcome.state_gas_spent(); - self.block_regular_gas_used = self.block_regular_gas_used.saturating_add(regular_gas_used); - self.block_state_gas_used = self.block_state_gas_used.saturating_add(state_gas_used); - self.cumulative_gas_used += tx_gas_used; - self.blob_gas_used += blob_gas_used; - self.receipts.push(self.receipt_builder.build_receipt::(ReceiptBuilderCtx { - tx_type, - result: outcome, - cumulative_gas_used: self.cumulative_gas_used, - })); - Ok(Some(GasOutput::new_with_regular(tx_gas_used, regular_gas_used, state_gas_used))) + self.inner.execute_transaction_with_commit_condition((transaction, tx.tx()), commit) } fn execute_transaction_without_commit( @@ -345,47 +199,18 @@ where transaction: impl ExecutorTx, ) -> Result { let (transaction, tx) = transaction.into_parts(); - self.set_transaction_block_access_index(); - let transaction_gas_limit = tx.tx().gas_limit(); - self.validate_transaction_gas_limit(transaction_gas_limit)?; - let blob_gas_used = tx.tx().blob_gas_used().unwrap_or_default(); - let tx_type = tx.tx().tx_type(); - let result = execute_transaction_without_commit(&mut self.evm, &transaction) - .map_err(|err| map_transaction_error(err, *tx.tx().tx_hash()))?; - Ok(EthTransactionResultWithState::new(result, tx_type, blob_gas_used)) + self.inner.execute_transaction_without_commit((transaction, tx.tx())) } fn commit_transaction( &mut self, output: Self::TransactionResultWithState, ) -> Result { - let EthTransactionResultWithState { result, tx_type, blob_gas_used } = output; - self.set_transaction_block_access_index(); - let stream_state = self.state_update_hook.is_some(); - let outcome = commit_detached_transaction( - &mut self.evm, - &mut self.block_state, - stream_state, - &mut |state| emit_state(&mut self.state_update_hook, state), - result, - ); - let tx_gas_used = outcome.tx_gas_used(); - let regular_gas_used = outcome.execution_gas_spent(); - let state_gas_used = outcome.state_gas_spent(); - self.block_regular_gas_used = self.block_regular_gas_used.saturating_add(regular_gas_used); - self.block_state_gas_used = self.block_state_gas_used.saturating_add(state_gas_used); - self.cumulative_gas_used += tx_gas_used; - self.blob_gas_used += blob_gas_used; - self.receipts.push(self.receipt_builder.build_receipt::(ReceiptBuilderCtx { - tx_type, - result: outcome, - cumulative_gas_used: self.cumulative_gas_used, - })); - Ok(GasOutput::new_with_regular(tx_gas_used, regular_gas_used, state_gas_used)) + self.inner.commit_transaction(output) } fn receipts(&self) -> &[Self::Receipt] { - &self.receipts + &self.inner.receipts } fn finish_with_block_access_list( @@ -397,70 +222,10 @@ where } fn finish_with_prepared_block_access_list( - mut self, + self, ) -> Result<(BlockExecutionOutput, Option), BlockExecutionError> { - self.set_transaction_block_access_index(); - let context = Self::block_context( - self.deposit_contract_address, - self.ctx.parent_hash, - self.ctx.parent_beacon_block_root, - self.ctx.ommers, - None, - ); - let mut requests = block_requests_from_receipts(self.spec_id, context, &self.receipts)?; - let stream_state = self.state_update_hook.is_some(); - post_execution_system_call_state_changes( - &mut self.evm, - &mut self.block_state, - stream_state, - &mut |state| emit_state(&mut self.state_update_hook, state), - self.spec_id, - context, - &mut requests, - )?; - - let withdrawals = - self.ctx.withdrawals.clone().filter(|_| self.spec_id.enables(evm2::SpecId::SHANGHAI)); - let context = Self::block_context( - self.deposit_contract_address, - self.ctx.parent_hash, - self.ctx.parent_beacon_block_root, - self.ctx.ommers, - withdrawals.as_deref(), - ); - let block_number = self.evm.block_env().number.to::(); - let block_beneficiary = self.evm.block_env().beneficiary; - post_block_balance_state_changes( - &mut self.evm, - &mut self.block_state, - stream_state, - &mut |state| emit_state(&mut self.state_update_hook, state), - self.base_block_reward, - self.dao_fork_transition, - block_number, - block_beneficiary, - context.ommers, - context.withdrawals, - )?; - - let block_access_list = self.evm.state_mut().take_bal_builder(); - let block_gas_used = final_block_gas_used( - self.separate_block_gas, - self.cumulative_gas_used, - self.block_regular_gas_used, - self.block_state_gas_used, - ); - let output = BlockExecutionOutput::new( - BlockExecutionResult { - receipts: self.receipts, - requests, - gas_used: block_gas_used, - blob_gas_used: self.blob_gas_used, - }, - self.block_state.into_bundle(), - ); - - Ok((output, block_access_list)) + let (output, bal) = self.inner.finish_with_block_access_list()?; + Ok((output.into(), bal)) } } @@ -645,28 +410,22 @@ where let env = &segment.evm_env; // The version carries more than the spec and features (blob cap, gas caps, code limits), so // install the whole segment config. - self.factory.reconfigure_evm(&mut self.inner.evm, env); + self.factory.reconfigure_evm(&mut self.inner.inner.evm, env); let block_number = env.block.number.to::(); - self.inner.spec_id = env.spec.into(); - self.inner.base_block_reward = base_block_reward(self.chain_spec.as_ref(), block_number); - self.inner.dao_fork_transition = self - .chain_spec - .ethereum_fork_activation(EthereumHardfork::Dao) - .transitions_at_block(block_number); + let rules = EthBlockRules::new( + self.chain_spec.as_ref(), + block_number, + self.inner.inner.rules().deposit_contract_address, + ); self.inner.ctx = segment.ctx.clone(); - self.inner.separate_block_gas = env.version.feature(evm2::EvmFeatures::EIP8037); - self.inner.bal_index_offset = segment_idx as u64 * 2; - self.inner.cumulative_gas_used = 0; - self.inner.block_regular_gas_used = 0; - self.inner.block_state_gas_used = 0; - self.inner.blob_gas_used = 0; + self.inner.inner.start_block(evm2_ctx(&segment.ctx), rules, segment_idx as u64 * 2); } fn reseed_block_hashes(&mut self, block_number: u64) { for (number, hash) in self.plan.hashes_for_block(block_number) { let number = evm2::interpreter::Word::from(number); - self.inner.evm.overlay_db_mut().insert_block_hash(&number, &hash); + self.inner.inner.evm.overlay_db_mut().insert_block_hash(&number, &hash); } } @@ -675,7 +434,7 @@ where return Ok(()) } - let raw_index = self.inner.evm.state().bal_index().get(); + let raw_index = self.inner.inner.evm.state().bal_index().get(); let segment_idx = if raw_index == 0 { 0 } else { @@ -686,6 +445,7 @@ where let segment_idx = self.plan.segment_index_for_tx(tx_index); self.worker_segment = Some(segment_idx); self.inner + .inner .evm .state_mut() .set_bal_index(BlockAccessIndex::new(raw_index + segment_idx as u64 * 2)); @@ -700,80 +460,21 @@ where } fn finish_segment(&mut self) -> Result { - self.inner.set_transaction_block_access_index(); - let context = EthBlockExecutor::::block_context( - self.inner.deposit_contract_address, - self.inner.ctx.parent_hash, - self.inner.ctx.parent_beacon_block_root, - self.inner.ctx.ommers, - None, - ); - let receipts = &self.inner.receipts[self.segment_receipt_start..]; - let mut requests = block_requests_from_receipts(self.inner.spec_id, context, receipts)?; - let stream_state = self.inner.state_update_hook.is_some(); - post_execution_system_call_state_changes( - &mut self.inner.evm, - &mut self.inner.block_state, - stream_state, - &mut |state| emit_state(&mut self.inner.state_update_hook, state), - self.inner.spec_id, - context, - &mut requests, - )?; - - let withdrawals = self - .inner - .ctx - .withdrawals - .clone() - .filter(|_| self.inner.spec_id.enables(evm2::SpecId::SHANGHAI)); - let context = EthBlockExecutor::::block_context( - self.inner.deposit_contract_address, - self.inner.ctx.parent_hash, - self.inner.ctx.parent_beacon_block_root, - self.inner.ctx.ommers, - withdrawals.as_deref(), - ); - let block_number = self.inner.evm.block_env().number.to::(); - let block_beneficiary = self.inner.evm.block_env().beneficiary; - post_block_balance_state_changes( - &mut self.inner.evm, - &mut self.inner.block_state, - stream_state, - &mut |state| emit_state(&mut self.inner.state_update_hook, state), - self.inner.base_block_reward, - self.inner.dao_fork_transition, - block_number, - block_beneficiary, - context.ommers, - context.withdrawals, - )?; - - Ok(FinishedBigBlockSegment { - requests, - gas_used: final_block_gas_used( - self.inner.separate_block_gas, - self.inner.cumulative_gas_used, - self.inner.block_regular_gas_used, - self.inner.block_state_gas_used, - ), - blob_gas_used: self.inner.blob_gas_used, - }) + let EthPostExecutionOutput { requests, gas_used, blob_gas_used } = + self.inner.inner.apply_post_execution_changes(self.segment_receipt_start)?; + Ok(FinishedBigBlockSegment { requests, gas_used, blob_gas_used }) } fn merge_segment(&mut self, segment: FinishedBigBlockSegment) { self.requests.extend(segment.requests); self.gas_used_offset += segment.gas_used; - self.receipt_gas_used_offset += self.inner.cumulative_gas_used; + self.receipt_gas_used_offset += self.inner.inner.cumulative_gas_used; self.blob_gas_used_offset += segment.blob_gas_used; - self.inner.cumulative_gas_used = 0; - self.inner.block_regular_gas_used = 0; - self.inner.block_state_gas_used = 0; - self.inner.blob_gas_used = 0; + self.inner.inner.reset_gas_used(); } fn after_committed_transaction(&mut self) -> Result<(), BlockExecutionError> { - if let Some(receipt) = self.inner.receipts.last_mut() { + if let Some(receipt) = self.inner.inner.receipts.last_mut() { receipt.cumulative_gas_used += self.receipt_gas_used_offset; } self.tx_counter += 1; @@ -789,11 +490,11 @@ where fn apply_segment_boundary(&mut self) -> Result<(), BlockExecutionError> { let segment = self.finish_segment()?; self.merge_segment(segment); - self.inner.evm.state_mut().bump_bal_index(); + self.inner.inner.evm.state_mut().bump_bal_index(); let segment_idx = self.next_segment; self.next_segment += 1; - self.segment_receipt_start = self.inner.receipts.len(); + self.segment_receipt_start = self.inner.inner.receipts.len(); self.configure_segment(segment_idx); self.reseed_block_hashes(self.plan.segments[segment_idx].evm_env.block.number.to::()); self.inner.apply_pre_execution_changes() @@ -928,7 +629,7 @@ where } fn receipts(&self) -> &[Receipt] { - self.inner.receipts() + self.inner.inner.receipts() } fn finish_with_block_access_list( @@ -944,43 +645,20 @@ where self.initialize()?; let segment = self.finish_segment()?; self.merge_segment(segment); - let block_access_list = self.inner.evm.state_mut().take_bal_builder(); + let block_access_list = self.inner.inner.evm.state_mut().take_bal_builder(); let result = reth_execution_types::BlockExecutionResult { - receipts: core::mem::take(&mut self.inner.receipts), + receipts: core::mem::take(&mut self.inner.inner.receipts), requests: self.requests, gas_used: self.gas_used_offset, blob_gas_used: self.blob_gas_used_offset, }; Ok(( - BlockExecutionOutput::new(result, self.inner.block_state.into_bundle()), + BlockExecutionOutput::new(result, self.inner.inner.block_state.into_bundle()), block_access_list, )) } } -const fn final_block_gas_used( - separate_block_gas: bool, - cumulative_gas_used: u64, - block_regular_gas_used: u64, - block_state_gas_used: u64, -) -> u64 { - if separate_block_gas { - if block_regular_gas_used > block_state_gas_used { - block_regular_gas_used - } else { - block_state_gas_used - } - } else { - cumulative_gas_used - } -} - -fn emit_state(hook: &mut StateUpdateHook, state: StateUpdate) { - if let Some(hook) = hook.as_mut() { - hook(state); - } -} - #[cfg(test)] mod tests { use super::*; @@ -989,9 +667,14 @@ mod tests { use alloy_eip7928::BlockAccessIndex; use alloy_primitives::{address, Address, Bytes, Signature, TxKind, B256, U256}; use evm2::{ + block::ethereum::final_block_gas_used, bytecode::Bytecode, env::BlockEnv, - evm::{AccountInfo, Database, Db}, + evm::{ + AccountInfo, Database, Db, BUILDER_DEPOSIT_REQUEST_ADDRESS, + BUILDER_EXIT_REQUEST_ADDRESS, CONSOLIDATION_REQUEST_ADDRESS, + WITHDRAWAL_REQUEST_ADDRESS, + }, interpreter::Word, BaseEvmTypes, SpecId, }; @@ -1070,6 +753,19 @@ mod tests { } } + /// Deploys no-op request contracts, which blocks from Prague on call. + fn insert_request_contracts(database: &mut TestDatabase) { + let code = Bytecode::new_legacy(Bytes::from_static(&[0x00])); + for address in [ + WITHDRAWAL_REQUEST_ADDRESS, + CONSOLIDATION_REQUEST_ADDRESS, + BUILDER_DEPOSIT_REQUEST_ADDRESS, + BUILDER_EXIT_REQUEST_ADDRESS, + ] { + database.accounts.insert(address, AccountInfo::default().with_code(code.clone())); + } + } + fn transfer(from: Address, to: Address, nonce: u64) -> Recovered { let tx = TransactionSigned::Legacy( TxLegacy { @@ -1169,8 +865,8 @@ mod tests { env.version.tx_gas_limit_cap = cap; let evm = factory.evm_with_env(Db::new(TestDatabase::default()), env); let mut executor = factory.create_executor(evm, ctx.clone()); - executor.block_state_gas_used = 600_000; - executor.block_regular_gas_used = 0; + executor.inner.block_state_gas_used = 600_000; + executor.inner.block_regular_gas_used = 0; assert!(executor.validate_transaction_gas_limit(500_000).is_err()); assert!(executor.validate_transaction_gas_limit(400_000).is_ok()); } @@ -1260,7 +956,7 @@ mod tests { } #[test] - fn dao_fork_drain_removes_empty_accounts() { + fn dao_fork_drain_keeps_empty_accounts() { let [absent, empty, empty_with_balance, nonce_only, ..] = dao_fork::DAO_HARDFORK_ACCOUNTS; let beneficiary = dao_fork::DAO_HARDFORK_BENEFICIARY; @@ -1283,28 +979,38 @@ mod tests { ); let evm = factory.evm_with_env(Db::new(database), env); let mut executor = factory.create_executor(evm, segment(0, 1, B256::ZERO).ctx); + let (tx, rx) = std::sync::mpsc::channel(); + executor.set_state_hook(move |update| tx.send(update).unwrap()); executor.apply_pre_execution_changes().unwrap(); - executor.finish_with_block_access_list().unwrap().0 + let output = executor.finish_with_block_access_list().unwrap().0; + // The streamed updates hash to the same state as the finished bundle. + let mut streamed = reth_trie_common::HashedPostState::default(); + for update in rx.try_iter() { + streamed.extend(reth_execution_types::state_update_to_hashed_post_state(&update)); + } + let bundled = reth_trie_common::HashedPostState::from_bundle_state::< + reth_trie_common::KeccakKeyHasher, + >(&output.state.state); + assert_eq!(streamed.into_sorted(), bundled.into_sorted()); + output }; - // Absent accounts stay absent, and accounts that are empty after the drain are removed, - // even before EIP-161. + // The fork predates EIP-161, so drained accounts stay, absent and empty ones included. let output = execute(&[ (empty, AccountInfo::default()), (empty_with_balance, AccountInfo::default().with_balance(U256::from(7))), (nonce_only, AccountInfo { nonce: 1, balance: U256::from(3), ..Default::default() }), ]); - assert_eq!(output.account(&absent), None); - assert_eq!(output.account(&empty), Some(None)); - assert_eq!(output.account(&empty_with_balance), Some(None)); + assert_eq!(output.account(&absent).unwrap().unwrap().balance, U256::ZERO); + assert_eq!(output.account(&empty), None); + assert_eq!(output.account(&empty_with_balance).unwrap().unwrap().balance, U256::ZERO); let nonce_only_account = output.account(&nonce_only).unwrap().unwrap(); assert_eq!((nonce_only_account.nonce, nonce_only_account.balance), (1, U256::ZERO)); assert_eq!(output.account(&beneficiary).unwrap().unwrap().balance, U256::from(10)); - // Nothing is drained, but the zero increment is still applied to the beneficiary, which - // removes it because it is empty. + // Nothing is drained, and the empty beneficiary stays unchanged. let output = execute(&[(beneficiary, AccountInfo::default())]); - assert_eq!(output.account(&beneficiary), Some(None)); + assert_eq!(output.account(&beneficiary), None); } #[test] @@ -1357,6 +1063,7 @@ mod tests { sender, AccountInfo::default().with_balance(U256::from(1_000_000_000_000_000_000u64)), ); + insert_request_contracts(&mut database); let segments = (0..2) .map(|index| { let mut segment = segment(index, index as u64 + 1, B256::ZERO); @@ -1419,6 +1126,7 @@ mod tests { sender, AccountInfo::default().with_balance(U256::from(1_000_000_000_000_000_000u64)), ); + insert_request_contracts(&mut database); let segments = [9, 6] .into_iter() .enumerate() diff --git a/crates/ethereum/evm/src/factory.rs b/crates/ethereum/evm/src/factory.rs index 345d3cb6d05..123f9f4d9cc 100644 --- a/crates/ethereum/evm/src/factory.rs +++ b/crates/ethereum/evm/src/factory.rs @@ -547,6 +547,8 @@ pub struct JitMetrics { pub compilations_succeeded: metrics::Gauge, /// Total number of failed compilations. pub compilations_failed: metrics::Gauge, + /// Total number of frames or hosts that fell back to the interpreter. + pub interpreter_fallbacks: metrics::Gauge, /// Total number of JIT helper processes spawned. pub jit_helper_spawns: metrics::Gauge, /// Total number of JIT helper process spawn failures. @@ -608,6 +610,7 @@ impl JitMetrics { compilations_dispatched, compilations_succeeded, compilations_failed, + interpreter_fallbacks, jit_helper_spawns, jit_helper_spawn_failures, jit_helper_restarts, @@ -634,6 +637,7 @@ impl JitMetrics { self.compilations_dispatched.set(compilations_dispatched as f64); self.compilations_succeeded.set(compilations_succeeded as f64); self.compilations_failed.set(compilations_failed as f64); + self.interpreter_fallbacks.set(interpreter_fallbacks as f64); self.jit_helper_spawns.set(jit_helper_spawns as f64); self.jit_helper_spawn_failures.set(jit_helper_spawn_failures as f64); self.jit_helper_restarts.set(jit_helper_restarts as f64); diff --git a/crates/ethereum/evm/src/lib.rs b/crates/ethereum/evm/src/lib.rs index 601c67850dc..548558fedaf 100644 --- a/crates/ethereum/evm/src/lib.rs +++ b/crates/ethereum/evm/src/lib.rs @@ -248,6 +248,7 @@ pub use convert::ExecutableRecoveredTx; mod execution; +#[cfg(test)] mod dao_fork; mod receipt; diff --git a/crates/ethereum/evm/tests/execute.rs b/crates/ethereum/evm/tests/execute.rs index 658a82343cc..f120deaee38 100644 --- a/crates/ethereum/evm/tests/execute.rs +++ b/crates/ethereum/evm/tests/execute.rs @@ -7,6 +7,7 @@ use alloy_eips::{ eip4788::{BEACON_ROOTS_ADDRESS, BEACON_ROOTS_CODE, SYSTEM_ADDRESS}, eip4895::Withdrawal, eip7002::{WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE}, + eip7251::{CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, CONSOLIDATION_REQUEST_PREDEPLOY_CODE}, eip7685::EMPTY_REQUESTS_HASH, }; use alloy_primitives::{ @@ -44,22 +45,26 @@ fn create_database_with_beacon_root_contract() -> InMemoryDB { db } +/// Deploys the EIP-7002 and EIP-7251 request contracts, which Prague blocks call. +fn insert_request_contracts(db: &mut InMemoryDB) { + for (address, code) in [ + (WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE.clone()), + (CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, CONSOLIDATION_REQUEST_PREDEPLOY_CODE.clone()), + ] { + let account = AccountInfo { + nonce: 1, + balance: U256::ZERO, + code_hash: keccak256(&code), + code: Some(Bytecode::new_raw(code)), + ..AccountInfo::empty() + }; + db.insert_account_info(&address, account); + } +} + fn create_database_with_withdrawal_requests_contract() -> InMemoryDB { let mut db = InMemoryDB::default(); - - let withdrawal_requests_contract_account = AccountInfo { - nonce: 1, - balance: U256::ZERO, - code_hash: keccak256(WITHDRAWAL_REQUEST_PREDEPLOY_CODE.clone()), - code: Some(Bytecode::new_raw(WITHDRAWAL_REQUEST_PREDEPLOY_CODE.clone())), - ..AccountInfo::empty() - }; - - db.insert_account_info( - &WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, - withdrawal_requests_contract_account, - ); - + insert_request_contracts(&mut db); db } @@ -226,6 +231,8 @@ fn eip_4788_genesis_call() { ChainSpecBuilder::from(&*MAINNET) .shanghai_activated() .with_fork(EthereumHardfork::Cancun, ForkCondition::Timestamp(0)) + // The DAO drain would create its accounts at block 0. + .with_fork(EthereumHardfork::Dao, ForkCondition::Never) .build(), ); @@ -334,6 +341,7 @@ fn create_database_with_block_hashes(latest_block: u64) -> InMemoryDB { }; db.insert_account_info(&HISTORY_STORAGE_ADDRESS, blockhashes_contract_account); + insert_request_contracts(&mut db); db } @@ -704,7 +712,7 @@ fn test_balance_increment_not_duplicated() { let withdrawal_recipient = address!("0x1000000000000000000000000000000000000000"); - let mut db = InMemoryDB::default(); + let mut db = create_database_with_withdrawal_requests_contract(); let initial_balance = 100; db.insert_account_info( &withdrawal_recipient, diff --git a/crates/evm/evm/Cargo.toml b/crates/evm/evm/Cargo.toml index 615c27a91b5..18b30b14627 100644 --- a/crates/evm/evm/Cargo.toml +++ b/crates/evm/evm/Cargo.toml @@ -20,7 +20,7 @@ reth-storage-api.workspace = true reth-storage-errors = { workspace = true, optional = true } reth-trie-common.workspace = true -evm2.workspace = true +evm2 = { workspace = true, features = ["block"] } # alloy alloy-primitives.workspace = true diff --git a/crates/evm/evm/src/execute.rs b/crates/evm/evm/src/execute.rs index 3b2136e7a6d..dee730c5708 100644 --- a/crates/evm/evm/src/execute.rs +++ b/crates/evm/evm/src/execute.rs @@ -15,7 +15,6 @@ use alloy_eips::{ }; use alloy_primitives::{Address, B256}; use core::fmt::Debug; -use evm2::{registry::HandlerError, DatabaseError}; use reth_execution_types::{BlockExecutionResult, StateUpdate}; use reth_primitives_traits::{ Block, HeaderTy, NodePrimitives, ReceiptTy, RecoveredBlock, SealedHeader, SignedTransaction, @@ -31,70 +30,15 @@ use reth_execution_types::BundleSource; #[cfg(feature = "std")] use reth_primitives_traits::BlockTy; +pub use evm2::block::{ + map_database_error, map_handler_error, BlockTransactionResult, CommitChanges, GasOutput, + ReceiptBuilderCtx, +}; pub use reth_execution_errors::{ BlockExecutionError, BlockValidationError, InternalBlockExecutionError, InvalidTxError, }; pub use reth_execution_types::{BlockExecutionOutput, ExecutionOutcome}; -/// Gas used by a successfully executed transaction. -#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] -pub struct GasOutput { - /// Gas used for receipt accounting. - tx_gas_used: u64, - /// Regular gas used for Amsterdam block-capacity accounting. - regular_gas_used: u64, - /// Gas used for state-capacity accounting. - state_gas_used: u64, -} - -impl GasOutput { - /// Creates a new gas output. - pub const fn new(tx_gas_used: u64, state_gas_used: u64) -> Self { - Self { tx_gas_used, regular_gas_used: tx_gas_used, state_gas_used } - } - - /// Creates a gas output with independent receipt, regular, and state gas accounting. - pub const fn new_with_regular( - tx_gas_used: u64, - regular_gas_used: u64, - state_gas_used: u64, - ) -> Self { - Self { tx_gas_used, regular_gas_used, state_gas_used } - } - - /// Returns transaction gas used for receipt accounting. - pub const fn tx_gas_used(&self) -> u64 { - self.tx_gas_used - } - - /// Returns regular gas used for Amsterdam block-capacity accounting. - pub const fn regular_gas_used(&self) -> u64 { - self.regular_gas_used - } - - /// Returns state gas used for state-capacity accounting. - pub const fn state_gas_used(&self) -> u64 { - self.state_gas_used - } -} - -impl From for GasOutput { - fn from(gas_used: u64) -> Self { - Self::new(gas_used, gas_used) - } -} - -/// Context for building a transaction receipt from an execution result. -#[derive(Debug, Clone)] -pub struct ReceiptBuilderCtx { - /// Transaction type used by the receipt. - pub tx_type: TxType, - /// Raw transaction execution result. - pub result: TransactionResult, - /// Cumulative gas used by this transaction and all prior transactions in the block. - pub cumulative_gas_used: u64, -} - /// Builds chain-specific receipts from raw transaction execution results. #[auto_impl::auto_impl(&, Arc)] pub trait ReceiptBuilder { @@ -113,12 +57,6 @@ pub trait ReceiptBuilder { ) -> Self::Receipt; } -/// A detached block transaction output containing its raw execution result. -pub trait BlockTransactionResult { - /// Returns the raw transaction execution result. - fn result(&self) -> &evm2::TxResultWithState; -} - /// A configured EVM instance. pub trait Evm { /// Runtime EVM type family. @@ -158,6 +96,17 @@ pub trait Evm { where I: evm2::Inspector + 'static; + /// Runs `f` on the inspector set by [`Self::set_inspector`] if it has type `I`. + /// + /// # Safety + /// + /// `I` must have no lifetime parameters. The type check cannot tell an inspector that borrows + /// data from an `I` that borrows `'static` data, so `f` could then keep a `'static` reference + /// to borrowed data. + unsafe fn with_inspector(&mut self, f: impl FnOnce(&mut I) -> R) -> Option + where + I: evm2::Inspector + 'static; + /// Returns the accepted state overlay, including earlier committed transactions. fn state_db_mut(&mut self) -> &mut dyn DynDatabase; @@ -241,6 +190,19 @@ impl<'a, T: evm2::EvmTypes> Evm for evm2::Evm<'a, T> { evm2::Evm::set_inspector(self, inspector); } + unsafe fn with_inspector(&mut self, f: impl FnOnce(&mut I) -> R) -> Option + where + I: evm2::Inspector + 'static, + { + let inspector: &mut (dyn evm2::evm::NonStaticAny + 'a) = &mut **self.inspector_mut()?; + if evm2::evm::NonStaticAny::type_id(inspector) != core::any::TypeId::of::() { + return None + } + // SAFETY: the type ID check shows that the inspector is an `I`, and the caller guarantees + // that `I` has no lifetime parameters, so no lifetime is erased. + Some(f(unsafe { inspector.downcast_mut_unchecked::() })) + } + fn state_db_mut(&mut self) -> &mut dyn DynDatabase { self.overlay_db_mut() } @@ -296,27 +258,6 @@ fn execute_result>( Ok(if commit { executed.commit() } else { executed.discard() }) } -/// Converts a handler error into a block error without transaction hash context. -/// Validation errors retain the original handler error for downstream classification. -pub fn map_handler_error(error: HandlerError) -> BlockExecutionError { - match error { - HandlerError::Database(error) => map_database_error(error), - HandlerError::Fatal(_) | HandlerError::WrongTransactionType { .. } => { - BlockExecutionError::other(error) - } - error => BlockValidationError::Other(Box::new(error)).into(), - } -} - -/// Converts an owned database error using its internal-failure classification. -pub fn map_database_error(error: DatabaseError) -> BlockExecutionError { - if error.is_fatal() { - BlockExecutionError::other(error) - } else { - BlockValidationError::Other(Box::new(error)).into() - } -} - /// A configured block executor. pub trait BlockExecutor: Sized { /// Consensus transaction type executed by this executor. @@ -1257,23 +1198,6 @@ where } } -/// Marks whether transaction should be committed into block executor's state. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -#[must_use] -pub enum CommitChanges { - /// Transaction should be committed into block executor's state. - Yes, - /// Transaction should not be committed. - No, -} - -impl CommitChanges { - /// Returns `true` if transaction should be committed into block executor's state. - pub const fn should_commit(self) -> bool { - matches!(self, Self::Yes) - } -} - /// Helper trait to abstract over different [`Recovered`] implementations. /// /// Supports owned, borrowed, and shared transactions, including encoded and either wrappers. diff --git a/crates/evm/execution-errors/Cargo.toml b/crates/evm/execution-errors/Cargo.toml index 857f9dff964..82960152795 100644 --- a/crates/evm/execution-errors/Cargo.toml +++ b/crates/evm/execution-errors/Cargo.toml @@ -14,6 +14,8 @@ workspace = true # reth reth-storage-errors.workspace = true +evm2 = { workspace = true, features = ["block"] } + alloy-primitives.workspace = true alloy-rlp.workspace = true nybbles.workspace = true @@ -23,6 +25,7 @@ thiserror.workspace = true [features] default = ["std"] std = [ + "evm2/std", "alloy-primitives/std", "alloy-rlp/std", "thiserror/std", diff --git a/crates/evm/execution-errors/src/lib.rs b/crates/evm/execution-errors/src/lib.rs index 5034496fd1c..5d21aa5e395 100644 --- a/crates/evm/execution-errors/src/lib.rs +++ b/crates/evm/execution-errors/src/lib.rs @@ -11,246 +11,9 @@ extern crate alloc; -use alloc::{ - boxed::Box, - string::{String, ToString}, -}; -use alloy_primitives::B256; -use core::{any::Any, error::Error}; - pub mod trie; pub use trie::*; -/// Abstraction over transaction validation errors. -pub trait InvalidTxError: Error + Send + Sync + Any + 'static { - /// Returns whether the transaction nonce is lower than expected. - fn is_nonce_too_low(&self) -> bool { - false - } - - /// Returns whether the transaction gas limit is higher than allowed. - fn is_gas_limit_too_high(&self) -> bool { - false - } - - /// Returns whether the transaction gas limit is lower than required. - fn is_gas_limit_too_low(&self) -> bool { - false - } - - /// Returns the error as [`Any`] for consumers that need engine-specific downcasts. - fn as_any(&self) -> &(dyn Any + 'static); -} - -/// Block validation error. -#[derive(Debug, thiserror::Error)] -pub enum BlockValidationError { - /// EVM error with transaction hash and message. - #[error("EVM reported invalid transaction ({hash}): {error}")] - InvalidTx { - /// The hash of the transaction. - hash: B256, - /// The EVM error. - error: Box, - }, - /// EVM error that is not a transaction validation error. - #[error("EVM execution failed: {error}")] - EVM { - /// The hash of the transaction. - hash: B256, - /// The EVM error. - error: Box, - }, - /// Error when incrementing balance in post execution. - #[error("incrementing balance in post execution failed")] - IncrementBalanceFailed, - /// Error when transaction gas limit exceeds available block gas. - #[error( - "transaction gas limit {transaction_gas_limit} is more than blocks available gas {block_available_gas}" - )] - TransactionGasLimitMoreThanAvailableBlockGas { - /// The transaction's gas limit. - transaction_gas_limit: u64, - /// The available block gas. - block_available_gas: u64, - }, - /// Error for EIP-4788 when parent beacon block root is missing. - #[error("EIP-4788 parent beacon block root missing for active Cancun block")] - MissingParentBeaconBlockRoot, - /// Error for Cancun genesis block when parent beacon block root is not zero. - #[error( - "the parent beacon block root is not zero for Cancun genesis block: {parent_beacon_block_root}" - )] - CancunGenesisParentBeaconBlockRootNotZero { - /// The beacon block root. - parent_beacon_block_root: B256, - }, - /// EVM error during EIP-4788 beacon root contract call. - #[error("failed to apply beacon root contract call at {parent_beacon_block_root}: {message}")] - BeaconRootContractCall { - /// The beacon block root. - parent_beacon_block_root: Box, - /// The error message. - message: String, - }, - /// EVM error during EIP-2935 blockhash contract call. - #[error("failed to apply blockhash contract call: {message}")] - BlockHashContractCall { - /// The error message. - message: String, - }, - /// EVM error during withdrawal requests contract call. - #[error("failed to apply withdrawal requests contract call: {message}")] - WithdrawalRequestsContractCall { - /// The error message. - message: String, - }, - /// EVM error during consolidation requests contract call. - #[error("failed to apply consolidation requests contract call: {message}")] - ConsolidationRequestsContractCall { - /// The error message. - message: String, - }, - /// Error when decoding deposit requests from receipts. - #[error("failed to decode deposit requests from receipts: {_0}")] - DepositRequestDecode(String), - /// Error when block's total gas used exceeds the block gas limit. - #[error("block gas used exceeds block gas limit")] - BlockGasExceeded, - /// Arbitrary block validation error. - #[error(transparent)] - Other(Box), -} - -impl BlockValidationError { - /// Create a new [`BlockValidationError::Other`] variant. - pub fn other(error: E) -> Self - where - E: Error + Send + Sync + 'static, - { - Self::Other(Box::new(error)) - } - - /// Create a new [`BlockValidationError::Other`] variant from a message. - pub fn msg(msg: impl core::fmt::Display) -> Self { - Self::Other(msg.to_string().into()) - } -} - -/// Block executor errors. -#[derive(Debug, thiserror::Error)] -pub enum BlockExecutionError { - /// Validation error. - #[error(transparent)] - Validation(#[from] BlockValidationError), - /// Internal, i.e. non consensus or validation related block executor error. - #[error(transparent)] - Internal(#[from] InternalBlockExecutionError), -} - -impl BlockExecutionError { - /// Create a new [`BlockExecutionError::Internal`] variant. - pub fn other(error: E) -> Self - where - E: Error + Send + Sync + 'static, - { - Self::Internal(InternalBlockExecutionError::other(error)) - } - - /// Create a new [`BlockExecutionError::Internal`] variant from a message. - pub fn msg(msg: impl core::fmt::Display) -> Self { - Self::Internal(InternalBlockExecutionError::msg(msg)) - } - - /// Returns the inner [`BlockValidationError`] if this is a validation error. - pub const fn as_validation(&self) -> Option<&BlockValidationError> { - match self { - Self::Validation(err) => Some(err), - _ => None, - } - } - - /// Returns the inner [`InternalBlockExecutionError`] if this is an internal error. - pub const fn as_internal(&self) -> Option<&InternalBlockExecutionError> { - match self { - Self::Internal(err) => Some(err), - _ => None, - } - } -} - -/// Internal, i.e. not validation or consensus related, block executor errors. -#[derive(Debug, thiserror::Error)] -pub enum InternalBlockExecutionError { - /// EVM error occurred when executing a transaction. - #[error("internal EVM error occurred when executing transaction {hash}: {error}")] - EVM { - /// The hash of the transaction. - hash: B256, - /// The EVM error. - error: Box, - }, - /// Arbitrary block executor error. - #[error(transparent)] - Other(Box), -} - -impl InternalBlockExecutionError { - /// Create a new [`InternalBlockExecutionError::Other`] variant. - pub fn other(error: E) -> Self - where - E: Error + Send + Sync + 'static, - { - Self::Other(Box::new(error)) - } - - /// Create a new [`InternalBlockExecutionError::Other`] from a message. - pub fn msg(msg: impl core::fmt::Display) -> Self { - Self::Other(msg.to_string().into()) - } - - /// Returns the arbitrary error if this is [`InternalBlockExecutionError::Other`]. - pub fn as_other(&self) -> Option<&(dyn Error + Send + Sync + 'static)> { - match self { - Self::Other(err) => Some(&**err), - _ => None, - } - } - - /// Attempts to downcast the [`InternalBlockExecutionError::Other`] variant to a concrete type. - pub fn downcast(self) -> Result, Self> { - match self { - Self::Other(err) => err.downcast().map_err(Self::Other), - err => Err(err), - } - } - - /// Returns a reference to the [`InternalBlockExecutionError::Other`] value if it has type `T`. - pub fn downcast_other(&self) -> Option<&T> { - self.as_other()?.downcast_ref() - } - - /// Returns true if this is an [`InternalBlockExecutionError::Other`] of type `T`. - pub fn is_other(&self) -> bool { - self.as_other().is_some_and(|err| err.is::()) - } - - /// Returns the EVM error and transaction hash if this is [`InternalBlockExecutionError::EVM`]. - pub fn as_evm(&self) -> Option<(&B256, &(dyn Error + Send + Sync + 'static))> { - match self { - Self::EVM { hash, error } => Some((hash, &**error)), - _ => None, - } - } - - /// Returns a reference to the inner EVM error if it is of type `T`. - pub fn downcast_evm(&self) -> Option<&T> { - let (_, err) = self.as_evm()?; - err.downcast_ref() - } - - /// Returns true if this is an [`InternalBlockExecutionError::EVM`] error of type `T`. - pub fn is_evm(&self) -> bool { - self.as_evm().is_some_and(|(_, err)| err.is::()) - } -} +pub use evm2::block::{ + BlockExecutionError, BlockValidationError, InternalBlockExecutionError, InvalidTxError, +}; diff --git a/crates/evm/execution-types/Cargo.toml b/crates/evm/execution-types/Cargo.toml index 6596dd69e05..35f6fa63605 100644 --- a/crates/evm/execution-types/Cargo.toml +++ b/crates/evm/execution-types/Cargo.toml @@ -15,7 +15,7 @@ reth-ethereum-primitives.workspace = true reth-primitives-traits.workspace = true reth-trie-common.workspace = true -evm2.workspace = true +evm2 = { workspace = true, features = ["block"] } # alloy alloy-consensus.workspace = true diff --git a/crates/evm/execution-types/src/compat.rs b/crates/evm/execution-types/src/compat.rs index 624670e4ad9..f3a56f2f4be 100644 --- a/crates/evm/execution-types/src/compat.rs +++ b/crates/evm/execution-types/src/compat.rs @@ -1,292 +1,10 @@ //! State conversion at the evm2 execution boundary. -use alloc::vec::Vec; -use alloy_primitives::{ - keccak256, - map::{hash_map::Entry, AddressMap, B256Map, U256Map}, - Address, B256, U256, -}; -use evm2::{bytecode::Bytecode, evm::AccountInfo}; +use alloy_primitives::{keccak256, B256}; use reth_primitives_traits::Account; -use reth_trie_common::{ - bundle_state::{ - AccountStatus, BundleRetention, BundleState, StorageSlot, TransitionAccount, - TransitionState, - }, - HashedPostState, HashedStorage, -}; +use reth_trie_common::{HashedPostState, HashedStorage}; -/// One block's account transitions, finalized into a [`BundleState`] with their reverts. -#[derive(Debug, Default)] -pub struct BlockState { - transitions: AddressMap, - contracts: B256Map, -} - -impl BlockState { - /// Creates an empty block accumulator. - pub fn new() -> Self { - Self::default() - } - - /// Applies a collected transaction to the block's transitions. - pub fn commit(&mut self, changes: &TransactionChanges) { - self.contracts.extend(changes.contracts.iter().map(|(hash, code)| (*hash, code.clone()))); - for (address, account) in &changes.accounts { - self.commit_account( - *address, - account.original.clone(), - (!account.selfdestructed).then(|| account.info.clone()), - account.created, - account.wiped, - account - .storage - .iter() - .filter_map(|(key, slot)| slot.is_changed().then_some((*key, *slot))), - ); - } - } - - /// Commits one account's finalized evm2 transaction changes into the block without - /// materializing EVM state. Accounts that were only loaded are skipped. - /// - /// When `update` is set, the committed account is also recorded into it for execution state - /// hooks. - pub fn commit_account_changes( - &mut self, - changes: evm2::evm::AccountChanges<'_>, - update: Option<&mut StateUpdate>, - ) { - if !changes.is_changed() { - return; - } - if let Some((hash, code)) = changes.code { - self.contracts.entry(hash).or_insert_with(|| code.clone()); - } - let address = changes.address; - let created = changes.created; - let wiped = changes.storage.wiped; - let original = changes.original.map(without_code); - let current = changes.current.map(without_code); - let slots = changes - .storage - .changed_slots() - .map(|(&key, value)| (key, StorageSlot::new_changed(value.original, value.current))); - let Some(update) = update else { - self.commit_account(address, original, current, created, wiped, slots); - return; - }; - let storage: Vec<_> = slots.collect(); - self.commit_account( - address, - original.clone(), - current.clone(), - created, - wiped, - storage.iter().copied(), - ); - update.accounts.push(AccountUpdate { address, original, current, created, wiped, storage }); - } - - fn commit_account( - &mut self, - address: Address, - original: Option, - current: Option, - created: bool, - wiped: bool, - storage: impl Iterator, - ) { - let entry = self.transitions.entry(address); - let previous_status = match &entry { - Entry::Occupied(entry) => entry.get().status, - Entry::Vacant(_) => loaded_status(original.as_ref()), - }; - let status = if current.is_none() { - previous_status.on_selfdestructed() - } else if wiped && !created { - AccountStatus::DestroyedChanged - } else if created { - previous_status.on_created() - } else { - previous_status.on_changed( - original.as_ref().is_none_or(|i| i.nonce == 0 && i.is_empty_code_hash()), - ) - }; - match entry { - Entry::Vacant(entry) => { - entry.insert(TransitionAccount { - info: current, - status, - previous_info: original, - previous_status, - storage: storage.collect(), - storage_was_destroyed: wiped, - }); - } - Entry::Occupied(mut entry) => { - let account = entry.get_mut(); - account.info = current; - account.status = status; - // Deletion starts a new storage lifetime. - if matches!(status, AccountStatus::Destroyed | AccountStatus::DestroyedAgain) { - account.storage.clear(); - account.storage.extend(storage); - account.storage_was_destroyed = true; - } else { - for (key, slot) in storage { - match account.storage.entry(key) { - Entry::Vacant(entry) => { - entry.insert(slot); - } - Entry::Occupied(mut entry) => { - if entry.get().original_value() == slot.present_value() { - entry.remove(); - } else { - entry.get_mut().present_value = slot.present_value(); - } - } - } - } - } - } - } - } - - /// Finalizes one block's transitions and reverts. - pub fn into_bundle(self) -> BundleState { - let mut bundle = BundleState::default(); - bundle.apply_transitions_and_create_reverts( - TransitionState { transitions: self.transitions }, - BundleRetention::Reverts, - ); - bundle.contracts.extend(self.contracts); - bundle - } -} - -/// Transaction changes collected from an evm2 change stream for [`BlockState::commit`]. -#[derive(Debug, Default)] -pub struct TransactionChanges { - accounts: AddressMap, - contracts: B256Map, -} - -/// One account's changes within a [`TransactionChanges`]. -#[derive(Debug)] -struct TransactionAccount { - /// Account at the start of the transaction, without code. `None` means it did not exist. - original: Option, - /// Account after the transaction, without code. - info: AccountInfo, - created: bool, - selfdestructed: bool, - wiped: bool, - storage: U256Map, -} - -impl Default for TransactionAccount { - fn default() -> Self { - Self { - original: Some(AccountInfo::empty()), - info: AccountInfo::empty(), - created: false, - selfdestructed: false, - wiped: false, - storage: U256Map::default(), - } - } -} - -impl TransactionAccount { - fn update(&mut self, change: evm2::evm::AccountChangeRef<'_>) { - self.original = change.original.map(without_code); - self.info = change.current.map(without_code).unwrap_or_else(AccountInfo::empty); - self.created |= change.created; - self.selfdestructed |= change.current.is_none(); - } -} - -impl evm2::evm::StateChangeSink for TransactionChanges { - type Error = core::convert::Infallible; - fn bytecode(&mut self, hash: B256, code: &Bytecode) -> Result<(), Self::Error> { - self.contracts.entry(hash).or_insert_with(|| code.clone()); - Ok(()) - } - fn storage_wipe(&mut self, address: Address) -> Result<(), Self::Error> { - let account = self.accounts.entry(address).or_default(); - account.wiped = true; - account.storage.clear(); - Ok(()) - } - fn storage(&mut self, change: evm2::evm::StorageChange) -> Result<(), Self::Error> { - self.accounts - .entry(change.address) - .or_default() - .storage - .insert(change.key, StorageSlot::new_changed(change.original, change.current)); - Ok(()) - } - fn account(&mut self, change: evm2::evm::AccountChangeRef<'_>) -> Result<(), Self::Error> { - self.accounts.entry(change.address).or_default().update(change); - Ok(()) - } - fn account_read( - &mut self, - address: Address, - info: Option<&AccountInfo>, - ) -> Result<(), Self::Error> { - if let Some(account) = self.accounts.get_mut(&address) { - account.update(evm2::evm::AccountChangeRef { - address, - original: info, - current: info, - created: false, - selfdestructed: false, - }); - } - Ok(()) - } -} - -/// Per-transaction state changes streamed to execution state hooks. -/// -/// Holds only the accounts a transaction committed, with account info but without bytecode, so -/// building it does not copy the transaction's state maps. -#[derive(Clone, Debug, Default, PartialEq, Eq)] -pub struct StateUpdate { - /// Committed accounts in stream order. - pub accounts: Vec, -} - -impl StateUpdate { - /// Returns whether the update commits no accounts. - pub const fn is_empty(&self) -> bool { - self.accounts.is_empty() - } - - /// Returns the update for `address`, if the transaction committed it. - pub fn account(&self, address: &Address) -> Option<&AccountUpdate> { - self.accounts.iter().find(|account| account.address == *address) - } -} - -/// One committed account in a [`StateUpdate`]. -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct AccountUpdate { - /// Account address. - pub address: Address, - /// Account at the start of the transaction, without code. `None` means it did not exist. - pub original: Option, - /// Account after the transaction, without code. `None` is a deletion. - pub current: Option, - /// Whether the account was created during the transaction. - pub created: bool, - /// Whether the account's prior storage was wiped. - pub wiped: bool, - /// Storage slots whose value changed. - pub storage: Vec<(U256, StorageSlot)>, -} +pub use evm2::block::{AccountUpdate, BlockState, BundleSource, StateUpdate, TransactionChanges}; /// Hashes a transaction's state update into the trie update consumed by state root tasks. pub fn state_update_to_hashed_post_state(update: &StateUpdate) -> HashedPostState { @@ -295,12 +13,10 @@ pub fn state_update_to_hashed_post_state(update: &StateUpdate) -> HashedPostStat let hashed_address = keccak256(account.address); let destroyed = account.current.is_none(); let info = account.current.clone().unwrap_or_default(); - let unchanged = account - .original - .as_ref() - .map_or_else(|| info == AccountInfo::default(), |original| info == *original); - // EIP-161: a touched account that ends up empty is deleted, unless it never existed. - if destroyed || (info.is_empty() && account.original.is_some()) { + let unchanged = account.original.as_ref() == Some(&info); + // A deletion is explicit: an account that ends up empty is still present unless the + // producer removed it, as EIP-161 does from Spurious Dragon on. + if destroyed { hashed_state.accounts.insert(hashed_address, None); } else if !unchanged { hashed_state.accounts.insert(hashed_address, Some(Account::from(&info))); @@ -319,308 +35,3 @@ pub fn state_update_to_hashed_post_state(update: &StateUpdate) -> HashedPostStat } hashed_state } - -fn without_code(info: &AccountInfo) -> AccountInfo { - AccountInfo { code: None, ..info.clone() } -} - -/// Visits a persisted bundle as native changes when seeding an execution cache. -#[derive(Debug)] -pub struct BundleSource<'a>(pub &'a BundleState); - -impl evm2::evm::StateChangeSource for BundleSource<'_> { - fn visit(&self, sink: &mut S) -> Result<(), S::Error> { - for (hash, code) in &self.0.contracts { - sink.bytecode(*hash, code)?; - } - for (address, account) in &self.0.state { - let current = account.info.as_ref(); - if account.status.was_destroyed() { - sink.storage_wipe(*address)?; - } - sink.account(evm2::evm::AccountChangeRef { - address: *address, - original: account.original_info.as_ref(), - current, - created: account.status.is_storage_known() && current.is_some(), - selfdestructed: current.is_none(), - })?; - for (key, value) in &account.storage { - sink.storage(evm2::evm::StorageChange { - address: *address, - key: *key, - original: value.original_value(), - current: value.present_value(), - })?; - } - } - Ok(()) - } -} - -fn loaded_status(info: Option<&AccountInfo>) -> AccountStatus { - match info { - None => AccountStatus::LoadedNotExisting, - Some(info) if info.is_empty() => AccountStatus::LoadedEmptyEIP161, - Some(_) => AccountStatus::Loaded, - } -} - -#[cfg(test)] -mod tests { - use super::*; - use evm2::evm::{ - AccountChangeRef, AccountChanges, StateChangeSink, StorageChange, StorageOverlay, - StorageSlot as NativeSlot, Tracked, - }; - - /// Builds a storage overlay from `(key, original, current)` slots. - fn overlay(wiped: bool, slots: &[(U256, U256, U256)]) -> StorageOverlay { - let mut storage = StorageOverlay { wiped, ..Default::default() }; - for &(key, original, current) in slots { - let slot = - NativeSlot { value: Tracked::from_parts(original, current), ..Default::default() }; - storage.slots.insert(key, slot); - } - storage - } - - #[cfg(feature = "account-ext")] - #[test] - fn account_extensions_survive_native_updates_and_reverts() { - let address = Address::with_last_byte(1); - let original = AccountInfo { - balance: U256::from(10), - extension: evm2::evm::AccountExtension::copy_from_slice(b"original extension"), - ..Default::default() - }; - let mut updated = original.clone(); - updated.balance = U256::from(20); - updated.extension = evm2::evm::AccountExtension::copy_from_slice(b"updated extension"); - let mut state = BlockState::new(); - state.commit_account_changes( - AccountChanges { - address, - original: Some(&original), - current: Some(&updated), - created: false, - selfdestructed: false, - touched: false, - code: None, - storage: &StorageOverlay::default(), - }, - None, - ); - let mut bundle = state.into_bundle(); - let account = bundle.state.get(&address).unwrap(); - assert_eq!( - account.original_info.as_ref().unwrap().extension.as_ref(), - b"original extension" - ); - assert_eq!(account.info.as_ref().unwrap().extension.as_ref(), b"updated extension"); - assert!(bundle.revert_latest()); - assert_eq!( - bundle.state.get(&address).unwrap().info.as_ref().unwrap().extension.as_ref(), - b"original extension" - ); - } - - #[test] - fn native_sink_preserves_storage_lifetimes_and_reverts() { - let address = Address::with_last_byte(1); - let code = evm2::bytecode::Bytecode::new_raw(alloy_primitives::bytes!("60015b00")); - let info = AccountInfo::default().with_nonce(1).with_code(code.clone()); - let mut converted = BlockState::new(); - let mut native = BlockState::new(); - // Storage-only writes, restoration, deletion, recreation, a surviving storage wipe, - // and another deletion exercise both occupied and vacant transition entries. - for step in 0..7 { - let slots: &[_] = if step < 2 || step == 3 || step == 4 { - let (original, current) = if step == 1 { (8, 7) } else { (7, 8) }; - &[(U256::from(3), U256::from(original), U256::from(current))] - } else { - &[] - }; - let storage = overlay(step >= 2, slots); - let changes = if step < 2 { - AccountChanges { - address, - original: Some(&info), - current: Some(&info), - created: false, - selfdestructed: false, - touched: false, - code: None, - storage: &storage, - } - } else { - AccountChanges { - address, - original: (step != 3 && step != 6).then_some(&info), - current: (step == 3 || step == 4).then_some(&info), - created: step == 3, - selfdestructed: step != 3, - touched: false, - code: (step == 3).then(|| (code.hash_slow(), &code)), - storage: &storage, - } - }; - let empty = StorageOverlay::default(); - // Reads alone must never introduce an account transition. - let read = AccountChanges { - address: Address::with_last_byte(2), - original: Some(&info), - current: Some(&info), - created: false, - selfdestructed: false, - touched: false, - code: None, - storage: &empty, - }; - let mut transaction = TransactionChanges::default(); - let Ok(()) = changes.visit(&mut transaction); - let Ok(()) = read.visit(&mut transaction); - converted.commit(&transaction); - native.commit_account_changes(changes, None); - native.commit_account_changes(read, None); - assert_eq!(native.transitions, converted.transitions, "step {step}"); - assert_eq!(native.contracts, converted.contracts); - } - let mut native = native.into_bundle(); - let mut converted = converted.into_bundle(); - assert_eq!(native, converted); - assert!(native.revert_latest()); - assert!(converted.revert_latest()); - assert_eq!(native, converted); - } - - #[test] - fn cached_bytecode_does_not_change_bundle_output() { - let address = Address::with_last_byte(1); - let code = evm2::bytecode::Bytecode::new_raw(alloy_primitives::bytes!("60015b00")); - let info = AccountInfo { - balance: U256::from(5), - code_hash: code.hash_slow(), - ..Default::default() - }; - let bundle = |info: &AccountInfo| { - let mut changes = TransactionChanges::default(); - changes - .account(AccountChangeRef { - address, - original: None, - current: Some(info), - created: false, - selfdestructed: false, - }) - .unwrap(); - let mut block = BlockState::new(); - block.commit(&changes); - block.into_bundle() - }; - let uncached = bundle(&info); - let cached = bundle(&AccountInfo { code: Some(code), ..info }); - assert_eq!(uncached, cached); - assert!(cached.contracts.is_empty()); - } - - #[test] - fn deployed_bytecode_is_retained_separately_from_account_metadata() { - let address = Address::with_last_byte(1); - let code = evm2::bytecode::Bytecode::new_raw(alloy_primitives::bytes!("60015b00")); - let hash = code.hash_slow(); - let info = AccountInfo { - nonce: 1, - code_hash: hash, - code: Some(code.clone()), - ..Default::default() - }; - let mut changes = TransactionChanges::default(); - changes.bytecode(hash, &code).unwrap(); - changes - .account(AccountChangeRef { - address, - original: None, - current: Some(&info), - created: true, - selfdestructed: false, - }) - .unwrap(); - let mut block = BlockState::new(); - block.commit(&changes); - let bundle = block.into_bundle(); - assert_eq!(bundle.contracts[&hash].original_bytes(), code.original_bytes()); - assert_eq!(bundle.account(&address).unwrap().info.as_ref().unwrap().code_hash, hash); - } - - #[test] - fn storage_only_change_retains_account_and_reverts() { - let address = Address::with_last_byte(1); - let info = AccountInfo { nonce: 1, ..Default::default() }; - let mut changes = TransactionChanges::default(); - changes - .storage(StorageChange { - address, - key: U256::from(3), - original: U256::from(7), - current: U256::from(8), - }) - .unwrap(); - changes.account_read(address, Some(&info)).unwrap(); - let mut block = BlockState::new(); - block.commit(&changes); - let mut bundle = block.into_bundle(); - assert_eq!(bundle.account(&address).unwrap().info.as_ref().unwrap().nonce, 1); - assert_eq!(bundle.storage(&address, U256::from(3)), Some(U256::from(8))); - assert_eq!(bundle.reverts.len(), 1); - assert!(bundle.revert_latest()); - assert_eq!(bundle.storage(&address, U256::from(3)), Some(U256::from(7))); - } - - #[test] - fn destroy_then_recreate_retains_parent_storage_wipe() { - let address = Address::with_last_byte(1); - let original = AccountInfo { nonce: 1, balance: U256::from(7), ..Default::default() }; - let recreated = AccountInfo { nonce: 1, balance: U256::from(9), ..Default::default() }; - let mut block = BlockState::new(); - let mut destroyed = TransactionChanges::default(); - destroyed - .account(AccountChangeRef { - address, - original: Some(&original), - current: None, - created: false, - selfdestructed: true, - }) - .unwrap(); - block.commit(&destroyed); - let mut created = TransactionChanges::default(); - created.storage_wipe(address).unwrap(); - created - .storage(StorageChange { - address, - key: U256::from(3), - original: U256::ZERO, - current: U256::from(8), - }) - .unwrap(); - created - .account(AccountChangeRef { - address, - original: None, - current: Some(&recreated), - created: true, - selfdestructed: false, - }) - .unwrap(); - block.commit(&created); - let bundle = block.into_bundle(); - let account = bundle.account(&address).unwrap(); - assert!(account.was_destroyed()); - assert_eq!(account.original_info.as_ref().unwrap().balance, U256::from(7)); - assert_eq!(account.info.as_ref().unwrap().balance, U256::from(9)); - assert_eq!(account.storage_slot(U256::from(4)), Some(U256::ZERO)); - assert_eq!(account.storage_slot(U256::from(3)), Some(U256::from(8))); - assert!(bundle.reverts[0][0].1.wipe_storage); - } -} diff --git a/crates/evm/execution-types/src/execute.rs b/crates/evm/execution-types/src/execute.rs index 680698ffa78..70d5b464c93 100644 --- a/crates/evm/execution-types/src/execute.rs +++ b/crates/evm/execution-types/src/execute.rs @@ -1,32 +1,9 @@ -use alloc::{sync::Arc, vec::Vec}; -use alloy_eips::eip7685::Requests; +use alloc::sync::Arc; use alloy_primitives::{Address, B256, U256}; use reth_primitives_traits::{Account, Block, Bytecode, RecoveredBlock}; use reth_trie_common::bundle_state::{BundleAccount, BundleState}; -/// The result of executing a block. -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct BlockExecutionResult { - /// All the receipts of the transactions in the block. - pub receipts: Vec, - /// All the EIP-7685 requests in the block. - pub requests: Requests, - /// The total gas used by the block. - pub gas_used: u64, - /// Blob gas used by the block. - pub blob_gas_used: u64, -} - -impl Default for BlockExecutionResult { - fn default() -> Self { - Self { - receipts: Default::default(), - requests: Default::default(), - gas_used: 0, - blob_gas_used: 0, - } - } -} +pub use evm2::block::BlockExecutionResult; /// [`BlockExecutionResult`] combined with state. #[derive( @@ -50,6 +27,12 @@ pub struct BlockExecutionOutput { pub state: BundleState, } +impl From> for BlockExecutionOutput { + fn from(output: evm2::block::BlockExecutionOutput) -> Self { + Self { result: output.result, state: output.state } + } +} + impl BlockExecutionOutput { /// Combines execution results with their persistent state. pub const fn new(result: BlockExecutionResult, state: BundleState) -> Self { diff --git a/crates/rpc/rpc-eth-types/src/error/mod.rs b/crates/rpc/rpc-eth-types/src/error/mod.rs index 9afcea8ee18..5049162595f 100644 --- a/crates/rpc/rpc-eth-types/src/error/mod.rs +++ b/crates/rpc/rpc-eth-types/src/error/mod.rs @@ -186,8 +186,8 @@ pub enum EthApiError { #[error(transparent)] TransactionConversionError(#[from] TransactionConversionError), /// Error thrown when tracing with a muxTracer fails - #[error(transparent)] - MuxTracerError(#[from] MuxError), + #[error("{0}")] + MuxTracerError(String), /// Error thrown when waiting for transaction confirmation times out #[error( "Transaction {hash} was added to the mempool but wasn't confirmed within {duration:?}." @@ -379,7 +379,9 @@ impl From for jsonrpsee_types::error::ErrorObject<'static> { err.to_string(), ), EthApiError::Unsupported(msg) => internal_rpc_err(msg), - EthApiError::InternalJsTracerError(msg) => internal_rpc_err(msg), + EthApiError::InternalJsTracerError(msg) | EthApiError::MuxTracerError(msg) => { + internal_rpc_err(msg) + } EthApiError::InvalidParams(msg) => invalid_params_rpc_err(msg), err @ EthApiError::ExecutionTimedOut(_) => rpc_error_with_code( jsonrpsee_types::error::CALL_EXECUTION_FAILED_CODE, @@ -393,7 +395,6 @@ impl From for jsonrpsee_types::error::ErrorObject<'static> { rpc_error_with_code(EthRpcErrorCode::PrunedHistory.code(), error.to_string()) } EthApiError::Other(err) => err.to_rpc_error(), - EthApiError::MuxTracerError(msg) => internal_rpc_err(msg.to_string()), EthApiError::BatchTxRecvError(err) => internal_rpc_err(err.to_string()), EthApiError::BatchTxSendError => { internal_rpc_err("Batch transaction sender channel closed".to_string()) @@ -489,6 +490,12 @@ impl From for EthApiError { } } +impl From for EthApiError { + fn from(error: MuxError) -> Self { + Self::MuxTracerError(error.to_string()) + } +} + impl From for EthApiError { fn from(error: DebugInspectorError) -> Self { match error { @@ -540,11 +547,11 @@ impl From for EthApiError { )) } } - BlockValidationError::Other(error) => match error.downcast::() { - Ok(error) => Self::InvalidTransaction((*error).into()), - Err(error) => Self::Internal(RethError::Execution( - BlockExecutionError::Validation(BlockValidationError::Other(error)), - )), + BlockValidationError::Other(error) => match error.downcast_ref::() { + Some(error) => Self::InvalidTransaction(error.clone().into()), + None => Self::Internal(RethError::Execution(BlockExecutionError::Validation( + BlockValidationError::Other(error), + ))), }, _ => Self::Internal(RethError::Execution(BlockExecutionError::Validation( validation_error, @@ -876,14 +883,17 @@ impl From for RpcInvalidTransactionError { HandlerError::InvalidChainId { .. } | HandlerError::MissingChainId => { Self::InvalidChainId } - HandlerError::IntrinsicGasTooLow { .. } => Self::GasTooLow, + HandlerError::IntrinsicGasTooLow { .. } | HandlerError::GasLimitBelowFloor { .. } => { + Self::GasTooLow + } HandlerError::InsufficientFunds { fee, balance } => { Self::InsufficientFunds { cost: fee, balance } } HandlerError::RejectCallerWithCode => Self::SenderNoEOA, HandlerError::NonceOverflow => Self::NonceMaxValue, HandlerError::GasLimitMoreThanBlock { .. } | - HandlerError::TxGasLimitGreaterThanCap { .. } => Self::GasTooHigh, + HandlerError::TxGasLimitGreaterThanCap { .. } | + HandlerError::IntrinsicGasGreaterThanCap { .. } => Self::GasTooHigh, HandlerError::CreateInitCodeSizeLimit { .. } => Self::MaxInitCodeSizeExceeded, HandlerError::UnsupportedTransactionType(_) | HandlerError::WrongTransactionType { .. } => Self::TxTypeNotSupported, @@ -1129,6 +1139,24 @@ mod tests { use alloy_sol_types::{Revert, SolError}; use reth_errors::ProviderError; + #[test] + fn gas_limit_handler_errors_map_to_gas_errors() { + assert!(matches!( + RpcInvalidTransactionError::from(HandlerError::GasLimitBelowFloor { + required: 2, + got: 1 + }), + RpcInvalidTransactionError::GasTooLow + )); + assert!(matches!( + RpcInvalidTransactionError::from(HandlerError::IntrinsicGasGreaterThanCap { + required: 2, + cap: 1 + }), + RpcInvalidTransactionError::GasTooHigh + )); + } + #[test] fn timed_out_error() { let err = EthApiError::ExecutionTimedOut(Duration::from_secs(10)); diff --git a/crates/rpc/rpc-eth-types/src/simulate.rs b/crates/rpc/rpc-eth-types/src/simulate.rs index d5dd4b559d3..e1853e2da99 100644 --- a/crates/rpc/rpc-eth-types/src/simulate.rs +++ b/crates/rpc/rpc-eth-types/src/simulate.rs @@ -15,6 +15,7 @@ use alloy_rpc_types_eth::{ BlockId, BlockOverrides, BlockTransactionsKind, }; use evm2::{interpreter::InstrStop, precompiles::MovePrecompileError, EvmFeatures, TxResult}; +use evm2_inspectors::transfer::TransferInspector; use jsonrpsee_types::{error::INTERNAL_ERROR_CODE, ErrorObject}; use reth_errors::ProviderResult; use reth_evm::{ @@ -385,6 +386,18 @@ where results.push(output.clone()) })?; + // The transfer tracer keeps the transaction's logs, with the synthetic transfer logs + // among them, outside the EVM's own logs. + // SAFETY: `TransferInspector` has no lifetime parameters. + if let Some(logs) = unsafe { + builder + .evm_mut() + .with_inspector(|inspector: &mut TransferInspector| inspector.take_logs()) + } && let Some(result) = results.last_mut() + { + result.logs = logs; + } + let gas_used = gas_output.tx_gas_used(); if let Some(remaining_call_gas_limit) = remaining_call_gas_limit.as_mut() { if gas_used > *remaining_call_gas_limit { diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index c3b2021a8c4..c4d0eea50d6 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -53,7 +53,9 @@ use tokio::sync::{AcquireError, OwnedSemaphorePermit}; use tokio_stream::StreamExt; #[cfg(feature = "js-tracer")] -use alloy_rpc_types_trace::geth::GethDebugTracerType; +use alloy_rpc_types_trace::geth::{ + GethDebugBuiltInTracerType, GethDebugTracerConfig, GethDebugTracerType, +}; #[cfg(feature = "js-tracer")] use evm2_inspectors::tracing::js::JsInspectorInterrupt; #[cfg(feature = "js-tracer")] @@ -1509,6 +1511,22 @@ impl Default for BadBlockStore { #[cfg(feature = "js-tracer")] const DEFAULT_JS_TRACER_TIMEOUT: Duration = Duration::from_secs(5); +/// Returns whether `tracer` is a JS tracer or a mux tracer that holds one, at any depth. +#[cfg(feature = "js-tracer")] +fn runs_js_tracer(tracer: &GethDebugTracerType, config: &GethDebugTracerConfig) -> bool { + match tracer { + GethDebugTracerType::JsTracer(_) => true, + GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::MuxTracer) => { + config.clone().into_mux_config().is_ok_and(|mux| { + mux.0.iter().any(|(tracer, config)| { + runs_js_tracer(tracer, &config.clone().unwrap_or_default()) + }) + }) + } + GethDebugTracerType::BuiltInTracer(_) => false, + } +} + /// Interrupts a JS tracer once its request is dropped or its timeout expires. /// /// Built-in tracers can't be interrupted, so for them this does nothing. @@ -1526,7 +1544,9 @@ impl JsTraceInterrupt { )] fn new(opts: &GethDebugTracingOptions) -> Result { #[cfg(feature = "js-tracer")] - if let Some(GethDebugTracerType::JsTracer(_)) = &opts.tracer { + if let Some(tracer) = &opts.tracer && + runs_js_tracer(tracer, &opts.tracer_config) + { let timeout = match &opts.timeout { Some(timeout) => humantime::parse_duration(timeout).map_err(|err| { EthApiError::InvalidParams(format!("invalid tracer timeout {timeout:?}: {err}")) @@ -1538,20 +1558,15 @@ impl JsTraceInterrupt { Ok(Self::default()) } - /// Lets this interrupt stop `inspector` if it's a JS tracer. + /// Lets this interrupt stop the JS tracers of `inspector`, including those in a mux tracer. #[cfg_attr( not(feature = "js-tracer"), expect(clippy::missing_const_for_fn, reason = "only JS tracers can be interrupted") )] - fn attach(&self, inspector: DebugInspector) -> DebugInspector { + fn attach(&self, mut inspector: DebugInspector) -> DebugInspector { #[cfg(feature = "js-tracer")] if let Some((interrupt, _)) = &self.js { - return match inspector { - DebugInspector::Js(js) => { - DebugInspector::Js(Box::new(js.with_interrupt(interrupt.clone()))) - } - inspector => inspector, - } + inspector.set_js_interrupt(interrupt); } inspector } @@ -1681,6 +1696,28 @@ mod tests { assert_eq!(err.to_string(), "fatal error: JavaScript tracing interrupted"); } + #[cfg(feature = "js-tracer")] + #[test] + fn js_trace_interrupt_covers_mux_tracers_with_js_children() { + let mux = |config: serde_json::Value| GethDebugTracingOptions { + tracer: Some(GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::MuxTracer)), + tracer_config: serde_json::from_value(config).unwrap(), + ..Default::default() + }; + let js = "{ fault: function() {}, result: function() { return null; } }"; + let nested = mux(serde_json::json!({ "muxTracer": { (js): {} } })); + let nested = serde_json::json!({ "muxTracer": nested.tracer_config }); + for (config, interrupted) in [ + (serde_json::json!({ (js): {} }), true), + (nested, true), + (serde_json::json!({ "callTracer": {} }), false), + ] { + let opts = mux(config); + let interrupt = JsTraceInterrupt::new(&opts).unwrap(); + assert_eq!(interrupt.js.is_some(), interrupted); + } + } + #[cfg(feature = "js-tracer")] #[tokio::test] async fn js_trace_interrupt_times_out_and_interrupts_tracer() { diff --git a/crates/snap-sync/src/catch_up/apply.rs b/crates/snap-sync/src/catch_up/apply.rs index 696cce0a8a1..51ad30d6843 100644 --- a/crates/snap-sync/src/catch_up/apply.rs +++ b/crates/snap-sync/src/catch_up/apply.rs @@ -77,11 +77,14 @@ mod tests { eip4788::{BEACON_ROOTS_ADDRESS, BEACON_ROOTS_CODE}, eip4895::Withdrawal, eip7002::{WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE}, + eip7251::{CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, CONSOLIDATION_REQUEST_PREDEPLOY_CODE}, }; use alloy_primitives::{bytes, keccak256, Address, Signature, TxKind, U256}; use evm2::{ bytecode::Bytecode, - evm::{AccountInfo, InMemoryDB}, + evm::{ + AccountInfo, InMemoryDB, BUILDER_DEPOSIT_REQUEST_ADDRESS, BUILDER_EXIT_REQUEST_ADDRESS, + }, }; use reth_chainspec::ChainSpecBuilder; use reth_db_api::{tables, transaction::DbTxMut}; @@ -272,6 +275,15 @@ mod tests { 1, WITHDRAWAL_REQUEST_PREDEPLOY_CODE.clone(), ); + insert( + &mut db, + CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, + 1, + CONSOLIDATION_REQUEST_PREDEPLOY_CODE.clone(), + ); + for address in [BUILDER_DEPOSIT_REQUEST_ADDRESS, BUILDER_EXIT_REQUEST_ADDRESS] { + insert(&mut db, address, 1, bytes!("00")); + } db.insert_account_info( &SENDER, AccountInfo { balance: U256::from(u64::MAX), ..Default::default() }, diff --git a/crates/trie/common/Cargo.toml b/crates/trie/common/Cargo.toml index c70ffa9cf97..8450f86e6d8 100644 --- a/crates/trie/common/Cargo.toml +++ b/crates/trie/common/Cargo.toml @@ -31,7 +31,7 @@ nybbles = { workspace = true, features = ["rlp"] } thiserror.workspace = true # evm -evm2.workspace = true +evm2 = { workspace = true, features = ["block"] } # `serde` feature serde = { workspace = true, optional = true } @@ -100,6 +100,7 @@ account-ext = [ eip1186 = ["alloy-rpc-types-eth/serde", "dep:alloy-serde"] serde = [ "dep:serde", + "evm2/serde", "arrayvec?/serde", "bytes?/serde", "nybbles/serde", diff --git a/crates/trie/common/src/bundle_state/account_status.rs b/crates/trie/common/src/bundle_state/account_status.rs deleted file mode 100644 index ac6dd4763b0..00000000000 --- a/crates/trie/common/src/bundle_state/account_status.rs +++ /dev/null @@ -1,388 +0,0 @@ -/// AccountStatus represents the various states an account can be in after being loaded from the -/// database. -/// -/// After account get loaded from database it can be in a lot of different states -/// while we execute multiple transaction and even blocks over account that is in memory. -/// This structure models all possible states that account can be in. -/// -/// # Variants -/// -/// - `LoadedNotExisting`: the account has been loaded but does not exist. -/// - `Loaded`: the account has been loaded and exists. -/// - `LoadedEmptyEIP161`: the account is loaded and empty, as per EIP-161. -/// - `InMemoryChange`: there are changes in the account that exist only in memory. -/// - `Changed`: the account has been modified. -/// - `Destroyed`: the account has been destroyed. -/// - `DestroyedChanged`: the account has been destroyed and then modified. -/// - `DestroyedAgain`: the account has been destroyed again. -#[derive(Clone, Copy, Default, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub enum AccountStatus { - /// The account has been loaded but does not exist. - #[default] - LoadedNotExisting, - /// The account has been loaded and exists. - Loaded, - /// The account is loaded and empty, as per EIP-161. - LoadedEmptyEIP161, - /// There are changes in the account that exist only in memory. - InMemoryChange, - /// The account has been modified. - Changed, - /// The account has been destroyed. - Destroyed, - /// The account has been destroyed and then modified. - DestroyedChanged, - /// The account has been destroyed again. - DestroyedAgain, -} - -impl AccountStatus { - /// Account is not modified and just loaded from database. - pub const fn is_not_modified(&self) -> bool { - matches!(self, Self::LoadedNotExisting | Self::Loaded | Self::LoadedEmptyEIP161) - } - - /// Account was destroyed by calling SELFDESTRUCT. - /// This means that full account and storage are inside memory. - pub const fn was_destroyed(&self) -> bool { - matches!(self, Self::Destroyed | Self::DestroyedChanged | Self::DestroyedAgain) - } - - /// This means storage is known, it can be newly created or storage got destroyed. - pub const fn is_storage_known(&self) -> bool { - matches!( - self, - Self::LoadedNotExisting | - Self::InMemoryChange | - Self::Destroyed | - Self::DestroyedChanged | - Self::DestroyedAgain - ) - } - - /// Account is modified but not destroyed. - /// This means that some storage values can be found in both - /// memory and database. - pub const fn is_modified_and_not_destroyed(&self) -> bool { - matches!(self, Self::Changed | Self::InMemoryChange) - } - - /// Returns the next account status on creation. - pub const fn on_created(&self) -> Self { - match self { - // If account was destroyed previously just copy new info to it. - Self::DestroyedAgain - | Self::Destroyed - | Self::DestroyedChanged => Self::DestroyedChanged, - // If account is loaded from db. - Self::LoadedNotExisting - // Loaded empty eip161 to creates is not possible as CREATE2 was added after EIP-161 - | Self::LoadedEmptyEIP161 - | Self::Loaded - | Self::Changed - | Self::InMemoryChange => { - // If account is loaded and not empty this means that account has some balance. - // This means that account cannot be created. - // We are assuming that EVM did necessary checks before allowing account to be created. - Self::InMemoryChange - } - } - } - - /// Returns the next account status on touched empty account post state clear EIP (EIP-161). - pub const fn on_touched_empty_post_eip161(&self) -> Self { - match self { - // Account can be touched but not existing. The status should remain the same. - Self::LoadedNotExisting => Self::LoadedNotExisting, - // Account can be created empty and only then touched. - Self::InMemoryChange | Self::Destroyed | Self::LoadedEmptyEIP161 => Self::Destroyed, - // Transition to destroy the account. - Self::DestroyedAgain | Self::DestroyedChanged => Self::DestroyedAgain, - // Account can become empty. - Self::Changed | Self::Loaded => Self::Destroyed, - } - } - - /// Returns the next account status on change. - pub const fn on_changed(&self, had_no_nonce_and_code: bool) -> Self { - match self { - // If the account was loaded as not existing, promote it to changed. - // This account was likely created by a balance transfer. - Self::LoadedNotExisting => Self::InMemoryChange, - // Change on empty account, should transfer storage if there is any. - // There is possibility that there are storage entries inside db. - // That storage is used in merkle tree calculation before state clear EIP. - Self::LoadedEmptyEIP161 => Self::InMemoryChange, - // The account was loaded as existing. - Self::Loaded => { - if had_no_nonce_and_code { - // Account is fully in memory - Self::InMemoryChange - } else { - // Can be contract and some of storage slots can be present inside db. - Self::Changed - } - } - - // On change, the "changed" type account statuses are preserved. - // Any checks for empty accounts are done outside of this fn. - Self::Changed => Self::Changed, - Self::InMemoryChange => Self::InMemoryChange, - Self::DestroyedChanged => Self::DestroyedChanged, - - // If account is destroyed and then changed this means this is - // balance transfer. - Self::Destroyed | Self::DestroyedAgain => Self::DestroyedChanged, - } - } - - /// Returns the next account status on selfdestruct. - pub const fn on_selfdestructed(&self) -> Self { - match self { - // Non existing account can't be destroyed. - Self::LoadedNotExisting => Self::LoadedNotExisting, - // If account is created and selfdestructed in the same block, mark it as destroyed - // again. Note: There is no big difference between Destroyed and - // DestroyedAgain in this case, but was added for clarity. - Self::DestroyedChanged | Self::DestroyedAgain | Self::Destroyed => Self::DestroyedAgain, - - // Transition to destroyed status. - _ => Self::Destroyed, - } - } - - /// Transition to other state while preserving invariance of this state. - /// - /// It this account was Destroyed and other account is not: - /// - We should mark extended account as destroyed too. - /// - And as other account had some changes, extended account should be marked as - /// DestroyedChanged. - /// - /// If both account are not destroyed and if this account is in memory: - /// - This means that extended account is in memory too. - /// - /// Otherwise, if both are destroyed or other is destroyed: - /// - Sets other status to extended account. - pub fn transition(&mut self, other: Self) { - *self = match (self.was_destroyed(), other.was_destroyed()) { - (true, false) => Self::DestroyedChanged, - (false, false) if *self == Self::InMemoryChange => Self::InMemoryChange, - _ => other, - }; - } -} - -#[cfg(test)] -mod test { - - use super::*; - - #[test] - fn test_account_status() { - // Account not modified - assert!(AccountStatus::Loaded.is_not_modified()); - assert!(AccountStatus::LoadedEmptyEIP161.is_not_modified()); - assert!(AccountStatus::LoadedNotExisting.is_not_modified()); - assert!(!AccountStatus::Changed.is_not_modified()); - assert!(!AccountStatus::InMemoryChange.is_not_modified()); - assert!(!AccountStatus::Destroyed.is_not_modified()); - assert!(!AccountStatus::DestroyedChanged.is_not_modified()); - assert!(!AccountStatus::DestroyedAgain.is_not_modified()); - - // We know full storage - assert!(!AccountStatus::LoadedEmptyEIP161.is_storage_known()); - assert!(AccountStatus::LoadedNotExisting.is_storage_known()); - assert!(AccountStatus::InMemoryChange.is_storage_known()); - assert!(AccountStatus::Destroyed.is_storage_known()); - assert!(AccountStatus::DestroyedChanged.is_storage_known()); - assert!(AccountStatus::DestroyedAgain.is_storage_known()); - assert!(!AccountStatus::Loaded.is_storage_known()); - assert!(!AccountStatus::Changed.is_storage_known()); - - // Account was destroyed - assert!(!AccountStatus::LoadedEmptyEIP161.was_destroyed()); - assert!(!AccountStatus::LoadedNotExisting.was_destroyed()); - assert!(!AccountStatus::InMemoryChange.was_destroyed()); - assert!(AccountStatus::Destroyed.was_destroyed()); - assert!(AccountStatus::DestroyedChanged.was_destroyed()); - assert!(AccountStatus::DestroyedAgain.was_destroyed()); - assert!(!AccountStatus::Loaded.was_destroyed()); - assert!(!AccountStatus::Changed.was_destroyed()); - - // Account modified but not destroyed - assert!(AccountStatus::Changed.is_modified_and_not_destroyed()); - assert!(AccountStatus::InMemoryChange.is_modified_and_not_destroyed()); - assert!(!AccountStatus::Loaded.is_modified_and_not_destroyed()); - assert!(!AccountStatus::LoadedEmptyEIP161.is_modified_and_not_destroyed()); - assert!(!AccountStatus::LoadedNotExisting.is_modified_and_not_destroyed()); - assert!(!AccountStatus::Destroyed.is_modified_and_not_destroyed()); - assert!(!AccountStatus::DestroyedChanged.is_modified_and_not_destroyed()); - assert!(!AccountStatus::DestroyedAgain.is_modified_and_not_destroyed()); - } - - #[test] - fn test_on_created() { - assert_eq!(AccountStatus::Destroyed.on_created(), AccountStatus::DestroyedChanged); - assert_eq!(AccountStatus::DestroyedAgain.on_created(), AccountStatus::DestroyedChanged); - assert_eq!(AccountStatus::DestroyedChanged.on_created(), AccountStatus::DestroyedChanged); - - assert_eq!(AccountStatus::LoadedNotExisting.on_created(), AccountStatus::InMemoryChange); - assert_eq!(AccountStatus::Loaded.on_created(), AccountStatus::InMemoryChange); - assert_eq!(AccountStatus::LoadedEmptyEIP161.on_created(), AccountStatus::InMemoryChange); - assert_eq!(AccountStatus::Changed.on_created(), AccountStatus::InMemoryChange); - assert_eq!(AccountStatus::InMemoryChange.on_created(), AccountStatus::InMemoryChange); - } - - #[test] - fn test_on_touched_empty_post_eip161() { - assert_eq!( - AccountStatus::LoadedNotExisting.on_touched_empty_post_eip161(), - AccountStatus::LoadedNotExisting - ); - assert_eq!( - AccountStatus::InMemoryChange.on_touched_empty_post_eip161(), - AccountStatus::Destroyed - ); - assert_eq!( - AccountStatus::Destroyed.on_touched_empty_post_eip161(), - AccountStatus::Destroyed - ); - assert_eq!( - AccountStatus::LoadedEmptyEIP161.on_touched_empty_post_eip161(), - AccountStatus::Destroyed - ); - assert_eq!( - AccountStatus::DestroyedAgain.on_touched_empty_post_eip161(), - AccountStatus::DestroyedAgain - ); - assert_eq!( - AccountStatus::DestroyedChanged.on_touched_empty_post_eip161(), - AccountStatus::DestroyedAgain - ); - assert_eq!(AccountStatus::Loaded.on_touched_empty_post_eip161(), AccountStatus::Destroyed); - assert_eq!(AccountStatus::Changed.on_touched_empty_post_eip161(), AccountStatus::Destroyed); - } - - #[test] - fn test_on_changed() { - assert_eq!( - AccountStatus::LoadedNotExisting.on_changed(true), - AccountStatus::InMemoryChange - ); - assert_eq!( - AccountStatus::LoadedNotExisting.on_changed(false), - AccountStatus::InMemoryChange - ); - - assert_eq!( - AccountStatus::LoadedEmptyEIP161.on_changed(true), - AccountStatus::InMemoryChange - ); - assert_eq!( - AccountStatus::LoadedEmptyEIP161.on_changed(false), - AccountStatus::InMemoryChange - ); - - assert_eq!(AccountStatus::Loaded.on_changed(true), AccountStatus::InMemoryChange); - assert_eq!(AccountStatus::Loaded.on_changed(false), AccountStatus::Changed); - - assert_eq!(AccountStatus::Changed.on_changed(true), AccountStatus::Changed); - assert_eq!(AccountStatus::Changed.on_changed(false), AccountStatus::Changed); - - assert_eq!(AccountStatus::InMemoryChange.on_changed(true), AccountStatus::InMemoryChange); - assert_eq!(AccountStatus::InMemoryChange.on_changed(false), AccountStatus::InMemoryChange); - - assert_eq!( - AccountStatus::DestroyedChanged.on_changed(true), - AccountStatus::DestroyedChanged - ); - assert_eq!( - AccountStatus::DestroyedChanged.on_changed(false), - AccountStatus::DestroyedChanged - ); - - assert_eq!(AccountStatus::Destroyed.on_changed(true), AccountStatus::DestroyedChanged); - assert_eq!(AccountStatus::Destroyed.on_changed(false), AccountStatus::DestroyedChanged); - - assert_eq!(AccountStatus::DestroyedAgain.on_changed(true), AccountStatus::DestroyedChanged); - assert_eq!( - AccountStatus::DestroyedAgain.on_changed(false), - AccountStatus::DestroyedChanged - ); - } - - #[test] - fn test_on_selfdestructed() { - assert_eq!( - AccountStatus::LoadedNotExisting.on_selfdestructed(), - AccountStatus::LoadedNotExisting - ); - - assert_eq!( - AccountStatus::DestroyedChanged.on_selfdestructed(), - AccountStatus::DestroyedAgain - ); - assert_eq!( - AccountStatus::DestroyedAgain.on_selfdestructed(), - AccountStatus::DestroyedAgain - ); - assert_eq!(AccountStatus::Destroyed.on_selfdestructed(), AccountStatus::DestroyedAgain); - - assert_eq!(AccountStatus::Loaded.on_selfdestructed(), AccountStatus::Destroyed); - assert_eq!(AccountStatus::LoadedEmptyEIP161.on_selfdestructed(), AccountStatus::Destroyed); - assert_eq!(AccountStatus::InMemoryChange.on_selfdestructed(), AccountStatus::Destroyed); - assert_eq!(AccountStatus::Changed.on_selfdestructed(), AccountStatus::Destroyed); - } - - #[test] - fn test_transition() { - let mut status = AccountStatus::Destroyed; - status.transition(AccountStatus::Loaded); - assert_eq!(status, AccountStatus::DestroyedChanged); - - let mut status = AccountStatus::DestroyedChanged; - status.transition(AccountStatus::InMemoryChange); - assert_eq!(status, AccountStatus::DestroyedChanged); - - let mut status = AccountStatus::DestroyedAgain; - status.transition(AccountStatus::Changed); - assert_eq!(status, AccountStatus::DestroyedChanged); - - let mut status = AccountStatus::InMemoryChange; - status.transition(AccountStatus::Loaded); - assert_eq!(status, AccountStatus::InMemoryChange); - - let mut status = AccountStatus::InMemoryChange; - status.transition(AccountStatus::Changed); - assert_eq!(status, AccountStatus::InMemoryChange); - - let mut status = AccountStatus::Loaded; - status.transition(AccountStatus::Changed); - assert_eq!(status, AccountStatus::Changed); - - let mut status = AccountStatus::LoadedNotExisting; - status.transition(AccountStatus::InMemoryChange); - assert_eq!(status, AccountStatus::InMemoryChange); - - let mut status = AccountStatus::LoadedEmptyEIP161; - status.transition(AccountStatus::Loaded); - assert_eq!(status, AccountStatus::Loaded); - - let mut status = AccountStatus::Destroyed; - status.transition(AccountStatus::DestroyedChanged); - assert_eq!(status, AccountStatus::DestroyedChanged); - - let mut status = AccountStatus::DestroyedAgain; - status.transition(AccountStatus::Destroyed); - assert_eq!(status, AccountStatus::Destroyed); - - let mut status = AccountStatus::Loaded; - status.transition(AccountStatus::Destroyed); - assert_eq!(status, AccountStatus::Destroyed); - - let mut status = AccountStatus::Changed; - status.transition(AccountStatus::DestroyedAgain); - assert_eq!(status, AccountStatus::DestroyedAgain); - } -} diff --git a/crates/trie/common/src/bundle_state/bundle_account.rs b/crates/trie/common/src/bundle_state/bundle_account.rs deleted file mode 100644 index 317ebea7393..00000000000 --- a/crates/trie/common/src/bundle_state/bundle_account.rs +++ /dev/null @@ -1,379 +0,0 @@ -use super::{ - reverts::AccountInfoRevert, AccountRevert, AccountStatus, RevertToSlot, StorageSlot, - StorageWithOriginalValues, TransitionAccount, -}; -use alloy_primitives::{ - map::{HashMap, U256Map}, - U256, -}; -use evm2::evm::AccountInfo; - -/// Account information focused on creating of database changesets -/// and Reverts. -/// -/// Status is needed as to know from what state we are applying the TransitionAccount. -/// -/// Original account info is needed to know if there was a change. -/// -/// Same thing for storage with original value. -/// -/// On selfdestruct storage original value is ignored. -#[derive(Clone, Debug, PartialEq, Eq)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BundleAccount { - /// Current account information. - pub info: Option, - /// Original account information before modifications. - pub original_info: Option, - /// Contains both original and present state. - /// When extracting changeset we compare if original value is different from present value. - /// If it is different we add it to changeset. - /// - /// If Account was destroyed we ignore original value and compare present state with - /// U256::ZERO. - pub storage: StorageWithOriginalValues, - /// Account status. - pub status: AccountStatus, -} - -impl BundleAccount { - /// Create new BundleAccount. - pub const fn new( - original_info: Option, - present_info: Option, - storage: StorageWithOriginalValues, - status: AccountStatus, - ) -> Self { - Self { info: present_info, original_info, storage, status } - } - - /// The approximate size of changes needed to store this account. - /// - /// `1 + storage_len` - pub fn size_hint(&self) -> usize { - 1 + self.storage.len() - } - - /// Return storage slot if it exists. - /// - /// In case we know that account is newly created or destroyed, return - /// `Some(U256::ZERO)` - pub fn storage_slot(&self, slot: U256) -> Option { - let slot = self.storage.get(&slot).map(|s| s.present_value); - if slot.is_some() { - slot - } else if self.status.is_storage_known() { - Some(U256::ZERO) - } else { - None - } - } - - /// Fetch account info if it exists. - pub fn account_info(&self) -> Option { - self.info.clone() - } - - /// Was this account destroyed. - pub const fn was_destroyed(&self) -> bool { - self.status.was_destroyed() - } - - /// Return true of account info was changed. - pub fn is_info_changed(&self) -> bool { - self.info != self.original_info - } - - /// Return true if contract was changed - pub fn is_contract_changed(&self) -> bool { - self.info.as_ref().map(|a| a.code_hash) != self.original_info.as_ref().map(|a| a.code_hash) - } - - /// Revert account to previous state and return true if account can be removed. - pub fn revert(&mut self, revert: AccountRevert) -> bool { - self.status = revert.previous_status; - - match revert.account { - AccountInfoRevert::DoNothing => (), - AccountInfoRevert::DeleteIt => { - self.info = None; - if self.original_info.is_none() { - self.storage = HashMap::default(); - return true; - } else { - // Set all storage to zero but preserve original values. - self.storage.iter_mut().for_each(|(_, v)| { - v.present_value = U256::ZERO; - }); - return false; - } - } - AccountInfoRevert::RevertTo(info) => self.info = Some(info), - }; - // Revert storage - for (key, slot) in revert.storage { - match slot { - RevertToSlot::Some(value) => { - // Don't overwrite original values if present - // if storage is not present set original value as current value. - self.storage - .entry(key) - .or_insert_with(|| StorageSlot::new(value)) - .present_value = value; - } - RevertToSlot::Destroyed => { - // If it was destroyed this means that storage was created and we need to remove - // it. - self.storage.remove(&key); - } - } - } - false - } - - /// Update to new state and generate AccountRevert that if applied to new state will - /// revert it to previous state. - /// - /// If no revert is present, update is noop. - pub fn update_and_create_revert( - &mut self, - transition: TransitionAccount, - ) -> Option { - let updated_info = transition.info; - let updated_storage = transition.storage; - let updated_status = transition.status; - - // The helper that extends this storage but preserves original value. - let extend_storage = - |this_storage: &mut StorageWithOriginalValues, - storage_update: StorageWithOriginalValues| { - this_storage.reserve(storage_update.len()); - for (key, value) in storage_update { - this_storage.entry(key).or_insert(value).present_value = value.present_value; - } - }; - - let previous_storage_from_update = - |updated_storage: &StorageWithOriginalValues| -> U256Map { - updated_storage - .iter() - .filter(|s| s.1.is_changed()) - .map(|(key, value)| { - (*key, RevertToSlot::Some(value.previous_or_original_value)) - }) - .collect() - }; - - // Needed for some reverts. - let info_revert = if self.info != updated_info { - AccountInfoRevert::RevertTo(self.info.clone().unwrap_or_default()) - } else { - AccountInfoRevert::DoNothing - }; - - let account_revert = match updated_status { - AccountStatus::Changed => { - let previous_storage = previous_storage_from_update(&updated_storage); - match self.status { - AccountStatus::Changed | AccountStatus::Loaded => { - // Extend the storage. original values is not used inside bundle. - extend_storage(&mut self.storage, updated_storage); - } - AccountStatus::LoadedEmptyEIP161 => { - // Do nothing. - // Only change that can happen from LoadedEmpty to Changed is if balance - // is send to account. So we are only checking account change here. - } - _ => unreachable!("Invalid state transfer to Changed from {self:?}"), - }; - let previous_status = self.status; - self.status = AccountStatus::Changed; - self.info = updated_info; - Some(AccountRevert { - account: info_revert, - storage: previous_storage, - previous_status, - wipe_storage: false, - }) - } - AccountStatus::InMemoryChange => { - let previous_storage = previous_storage_from_update(&updated_storage); - let in_memory_info_revert = match self.status { - AccountStatus::Loaded | AccountStatus::InMemoryChange => { - // From loaded (Or LoadedEmpty) to InMemoryChange can happen if there is - // balance change or new created account but Loaded - // didn't have contract. - extend_storage(&mut self.storage, updated_storage); - info_revert - } - AccountStatus::LoadedEmptyEIP161 => { - self.storage = updated_storage; - info_revert - } - AccountStatus::LoadedNotExisting => { - self.storage = updated_storage; - AccountInfoRevert::DeleteIt - } - _ => unreachable!("Invalid change to InMemoryChange from {self:?}"), - }; - let previous_status = self.status; - self.status = AccountStatus::InMemoryChange; - self.info = updated_info; - Some(AccountRevert { - account: in_memory_info_revert, - storage: previous_storage, - previous_status, - wipe_storage: false, - }) - } - AccountStatus::Loaded | - AccountStatus::LoadedNotExisting | - AccountStatus::LoadedEmptyEIP161 => { - // No changeset, maybe just update data - // Do nothing for now. - None - } - AccountStatus::Destroyed => { - // Clear this storage and move it to the Revert. - let this_storage = core::mem::take(&mut self.storage); - let ret = match self.status { - AccountStatus::InMemoryChange | AccountStatus::Changed | AccountStatus::Loaded | AccountStatus::LoadedEmptyEIP161 => { - Some(AccountRevert::new_selfdestructed(self.status, info_revert, this_storage)) - } - AccountStatus::LoadedNotExisting => { - // Do nothing as we have LoadedNotExisting -> Destroyed (It is noop) - None - } - _ => unreachable!("Invalid transition to Destroyed account from: {self:?} to {updated_info:?} {updated_status:?}"), - }; - - if ret.is_some() { - self.status = AccountStatus::Destroyed; - self.info = None; - } - - // Set present to destroyed. - ret - } - AccountStatus::DestroyedChanged => { - // Previous block created account or changed. - // (It was destroyed on previous block or one before). - - // Check common pre destroy paths. - // If common path is there it will drain the storage. - if let Some(revert_state) = AccountRevert::new_selfdestructed_from_bundle( - info_revert.clone(), - self, - &updated_storage, - ) { - // Set to destroyed and revert state. - self.status = AccountStatus::DestroyedChanged; - self.info = updated_info; - self.storage = updated_storage; - - Some(revert_state) - } else { - let ret = match self.status { - AccountStatus::Destroyed | AccountStatus::LoadedNotExisting => { - // From destroyed state new account is made - Some(AccountRevert { - account: AccountInfoRevert::DeleteIt, - storage: previous_storage_from_update(&updated_storage), - previous_status: self.status, - wipe_storage: false, - }) - } - AccountStatus::DestroyedChanged => { - // Account was destroyed in this transition. So we should clear present - // storage and insert it inside revert. - - let previous_storage = if transition.storage_was_destroyed { - let mut storage = core::mem::take(&mut self.storage) - .into_iter() - .map(|t| (t.0, RevertToSlot::Some(t.1.present_value))) - .collect::>(); - for key in updated_storage.keys() { - // As it is not existing inside Destroyed storage this means - // that previous values must be zero - storage.entry(*key).or_insert(RevertToSlot::Destroyed); - } - storage - } else { - previous_storage_from_update(&updated_storage) - }; - - Some(AccountRevert { - account: info_revert, - storage: previous_storage, - previous_status: AccountStatus::DestroyedChanged, - wipe_storage: false, - }) - } - AccountStatus::DestroyedAgain => { - Some(AccountRevert::new_selfdestructed_again( - // Destroyed again will set empty account. - AccountStatus::DestroyedAgain, - AccountInfoRevert::DeleteIt, - HashMap::default(), - updated_storage.clone(), - )) - } - _ => unreachable!("Invalid state transfer to DestroyedNew from {self:?}"), - }; - self.status = AccountStatus::DestroyedChanged; - self.info = updated_info; - // Extends current storage. - extend_storage(&mut self.storage, updated_storage); - - ret - } - } - AccountStatus::DestroyedAgain => { - // Previous block created account - // (It was destroyed on previous block or one before). - - // Check common pre destroy paths. - // This will drain the storage if it is common transition. - let ret = if let Some(revert_state) = AccountRevert::new_selfdestructed_from_bundle( - info_revert, - self, - &HashMap::default(), - ) { - Some(revert_state) - } else { - match self.status { - AccountStatus::Destroyed | - AccountStatus::DestroyedAgain | - AccountStatus::LoadedNotExisting => { - // From destroyed to destroyed again is noop - // - // From DestroyedAgain to DestroyedAgain is noop - // - // From LoadedNotExisting to DestroyedAgain is noop - // as account is destroyed again - None - } - AccountStatus::DestroyedChanged => { - // From destroyed changed to destroyed again. - Some(AccountRevert::new_selfdestructed_again( - // Destroyed again will set empty account. - AccountStatus::DestroyedChanged, - AccountInfoRevert::RevertTo(self.info.clone().unwrap_or_default()), - core::mem::take(&mut self.storage), - HashMap::default(), - )) - } - _ => unreachable!("Invalid state to DestroyedAgain from {self:?}"), - } - }; - // Set to destroyed and revert state. - self.status = AccountStatus::DestroyedAgain; - self.info = None; - self.storage.clear(); - ret - } - }; - - account_revert.filter(|acc| !acc.is_empty()) - } -} diff --git a/crates/trie/common/src/bundle_state/bundle_state.rs b/crates/trie/common/src/bundle_state/bundle_state.rs deleted file mode 100644 index f37c8ceda9f..00000000000 --- a/crates/trie/common/src/bundle_state/bundle_state.rs +++ /dev/null @@ -1,1313 +0,0 @@ -use super::{ - changes::{PlainStorageChangeset, StateChangeset}, - reverts::{AccountInfoRevert, Reverts}, - AccountRevert, AccountStatus, BundleAccount, PlainStateReverts, RevertToSlot, StorageSlot, - TransitionState, -}; -use alloc::{ - collections::{BTreeMap, BTreeSet}, - vec::Vec, -}; -use alloy_primitives::{ - map::{hash_map::Entry, AddressMap, AddressSet, B256Map, HashMap, U256Map}, - Address, B256, KECCAK256_EMPTY, U256, -}; -use core::{mem, ops::RangeInclusive}; -use evm2::{bytecode::Bytecode, evm::AccountInfo}; - -/// This builder is used to help to facilitate the initialization of `BundleState` struct -#[derive(Debug)] -pub struct BundleBuilder { - states: AddressSet, - state_original: AddressMap, - state_present: AddressMap, - state_storage: AddressMap>, - - reverts: BTreeSet<(u64, Address)>, - revert_range: RangeInclusive, - revert_account: HashMap<(u64, Address), Option>>, - revert_storage: HashMap<(u64, Address), Vec<(U256, U256)>>, - - contracts: B256Map, -} - -/// Option for [`BundleState`] when converting it to the plain state. -#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub enum OriginalValuesKnown { - /// Checks changed with original values that [`BundleState`] has. - /// - /// If we don't expect parent blocks to be committed or unwinded from database, this option - /// should be used. - Yes, - /// Doesn't check original values, see the implementation of [`BundleState::to_plain_state`] - /// for more info. - /// - /// If the Bundle can be split or extended, we would not be sure about original values, in that - /// case this option should be used. - No, -} -impl OriginalValuesKnown { - /// Original value is not known for sure. - pub const fn is_not_known(&self) -> bool { - matches!(self, Self::No) - } -} - -impl Default for BundleBuilder { - fn default() -> Self { - BundleBuilder { - states: AddressSet::default(), - state_original: AddressMap::default(), - state_present: AddressMap::default(), - state_storage: AddressMap::default(), - reverts: BTreeSet::new(), - revert_range: 0..=0, - revert_account: HashMap::default(), - revert_storage: HashMap::default(), - contracts: B256Map::default(), - } - } -} - -impl BundleBuilder { - /// Creates builder instance. - /// - /// `revert_range` indicates the size of BundleState `reverts` field. - pub fn new(revert_range: RangeInclusive) -> Self { - BundleBuilder { revert_range, ..Default::default() } - } - - /// Applies a transformation to the builder. - pub fn apply(self, f: F) -> Self - where - F: FnOnce(Self) -> Self, - { - f(self) - } - - /// Applies a mutable transformation to the builder. - pub fn apply_mut(&mut self, f: F) -> &mut Self - where - F: FnOnce(&mut Self), - { - f(self); - self - } - - /// Collects address info of BundleState state. - pub fn state_address(mut self, address: Address) -> Self { - self.set_state_address(address); - self - } - - /// Collects account info of BundleState state. - pub fn state_original_account_info(mut self, address: Address, original: AccountInfo) -> Self { - self.set_state_original_account_info(address, original); - self - } - - /// Collects account info of BundleState state. - pub fn state_present_account_info(mut self, address: Address, present: AccountInfo) -> Self { - self.set_state_present_account_info(address, present); - self - } - - /// Collects storage info of BundleState state. - pub fn state_storage(mut self, address: Address, storage: U256Map<(U256, U256)>) -> Self { - self.set_state_storage(address, storage); - self - } - - /// Collects address info of BundleState reverts. - /// - /// `block_number` must respect `revert_range`, or the input - /// will be ignored during the final build process. - pub fn revert_address(mut self, block_number: u64, address: Address) -> Self { - self.set_revert_address(block_number, address); - self - } - - /// Collects account info of BundleState reverts. - /// - /// `block_number` must respect `revert_range`, or the input - /// will be ignored during the final build process. - pub fn revert_account_info( - mut self, - block_number: u64, - address: Address, - account: Option>, - ) -> Self { - self.set_revert_account_info(block_number, address, account); - self - } - - /// Collects storage info of BundleState reverts. - /// - /// `block_number` must respect `revert_range`, or the input - /// will be ignored during the final build process. - pub fn revert_storage( - mut self, - block_number: u64, - address: Address, - storage: Vec<(U256, U256)>, - ) -> Self { - self.set_revert_storage(block_number, address, storage); - self - } - - /// Collects contracts info. - pub fn contract(mut self, address: B256, bytecode: Bytecode) -> Self { - self.set_contract(address, bytecode); - self - } - - /// Sets address info of BundleState state. - pub fn set_state_address(&mut self, address: Address) -> &mut Self { - self.states.insert(address); - self - } - - /// Sets original account info of BundleState state. - pub fn set_state_original_account_info( - &mut self, - address: Address, - original: AccountInfo, - ) -> &mut Self { - self.states.insert(address); - self.state_original.insert(address, original); - self - } - - /// Sets present account info of BundleState state. - pub fn set_state_present_account_info( - &mut self, - address: Address, - present: AccountInfo, - ) -> &mut Self { - self.states.insert(address); - self.state_present.insert(address, present); - self - } - - /// Sets storage info of BundleState state. - pub fn set_state_storage( - &mut self, - address: Address, - storage: U256Map<(U256, U256)>, - ) -> &mut Self { - self.states.insert(address); - self.state_storage.insert(address, storage); - self - } - - /// Sets address info of BundleState reverts. - pub fn set_revert_address(&mut self, block_number: u64, address: Address) -> &mut Self { - self.reverts.insert((block_number, address)); - self - } - - /// Sets account info of BundleState reverts. - pub fn set_revert_account_info( - &mut self, - block_number: u64, - address: Address, - account: Option>, - ) -> &mut Self { - self.reverts.insert((block_number, address)); - self.revert_account.insert((block_number, address), account); - self - } - - /// Sets storage info of BundleState reverts. - pub fn set_revert_storage( - &mut self, - block_number: u64, - address: Address, - storage: Vec<(U256, U256)>, - ) -> &mut Self { - self.reverts.insert((block_number, address)); - self.revert_storage.insert((block_number, address), storage); - self - } - - /// Sets contracts info. - pub fn set_contract(&mut self, address: B256, bytecode: Bytecode) -> &mut Self { - self.contracts.insert(address, bytecode); - self - } - - /// Creates `BundleState` instance based on collected information. - pub fn build(mut self) -> BundleState { - let mut state_size = 0; - let state = self - .states - .into_iter() - .map(|address| { - let storage = self - .state_storage - .remove(&address) - .map(|s| { - s.into_iter() - .map(|(k, (o_val, p_val))| (k, StorageSlot::new_changed(o_val, p_val))) - .collect() - }) - .unwrap_or_default(); - let bundle_account = BundleAccount::new( - self.state_original.remove(&address), - self.state_present.remove(&address), - storage, - AccountStatus::Changed, - ); - state_size += bundle_account.size_hint(); - (address, bundle_account) - }) - .collect(); - - let mut reverts_size = 0; - let mut reverts_map = BTreeMap::new(); - for block_number in self.revert_range { - reverts_map.insert(block_number, Vec::new()); - } - self.reverts.into_iter().for_each(|(block_number, address)| { - let account = - match self.revert_account.remove(&(block_number, address)).unwrap_or_default() { - Some(Some(account)) => AccountInfoRevert::RevertTo(account), - Some(None) => AccountInfoRevert::DeleteIt, - None => AccountInfoRevert::DoNothing, - }; - let storage = self - .revert_storage - .remove(&(block_number, address)) - .map(|s| s.into_iter().map(|(k, v)| (k, RevertToSlot::Some(v))).collect()) - .unwrap_or_default(); - let account_revert = AccountRevert { - account, - storage, - previous_status: AccountStatus::Changed, - wipe_storage: false, - }; - - if let Some(vec) = reverts_map.get_mut(&block_number) { - reverts_size += account_revert.size_hint(); - vec.push((address, account_revert)); - } - }); - - BundleState { - state, - contracts: self.contracts, - reverts: Reverts::new(reverts_map.into_values().collect()), - state_size, - reverts_size, - } - } - - /// Getter for `states` field - pub const fn get_states(&self) -> &AddressSet { - &self.states - } - - /// Mutable getter for `states` field - pub const fn get_states_mut(&mut self) -> &mut AddressSet { - &mut self.states - } - - /// Mutable getter for `state_original` field - pub const fn get_state_original_mut(&mut self) -> &mut AddressMap { - &mut self.state_original - } - - /// Mutable getter for `state_present` field - pub const fn get_state_present_mut(&mut self) -> &mut AddressMap { - &mut self.state_present - } - - /// Mutable getter for `state_storage` field - pub const fn get_state_storage_mut(&mut self) -> &mut AddressMap> { - &mut self.state_storage - } - - /// Mutable getter for `reverts` field - pub const fn get_reverts_mut(&mut self) -> &mut BTreeSet<(u64, Address)> { - &mut self.reverts - } - - /// Mutable getter for `revert_range` field - pub const fn get_revert_range_mut(&mut self) -> &mut RangeInclusive { - &mut self.revert_range - } - - /// Mutable getter for `revert_account` field - pub const fn get_revert_account_mut( - &mut self, - ) -> &mut HashMap<(u64, Address), Option>> { - &mut self.revert_account - } - - /// Mutable getter for `revert_storage` field - pub const fn get_revert_storage_mut( - &mut self, - ) -> &mut HashMap<(u64, Address), Vec<(U256, U256)>> { - &mut self.revert_storage - } - - /// Mutable getter for `contracts` field - pub const fn get_contracts_mut(&mut self) -> &mut B256Map { - &mut self.contracts - } -} - -/// Bundle retention policy for applying substate to the bundle. -#[derive(Debug)] -pub enum BundleRetention { - /// Only plain state is updated. - PlainState, - /// Both, plain state and reverts, are retained - Reverts, -} - -impl BundleRetention { - /// Returns `true` if reverts should be retained. - pub const fn includes_reverts(&self) -> bool { - matches!(self, Self::Reverts) - } -} - -/// Bundle state contain only values that got changed -/// -/// For every account it contains both original and present state. -/// -/// This is needed to decide if there were any changes to the account. -/// -/// Changes are applied and reverts are created when TransitionState is applied to BundleState. -/// -/// And can be used to revert BundleState to the state before transition. -#[derive(Default, Clone, Debug, PartialEq, Eq)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct BundleState { - /// Account state - pub state: AddressMap, - /// All created contracts in this block. - pub contracts: B256Map, - /// Changes to revert - /// - /// **Note**: Inside vector is *not* sorted by address. - /// - /// But it is unique by address. - pub reverts: Reverts, - /// The size of the plain state in the bundle state - pub state_size: usize, - /// The size of reverts in the bundle state - pub reverts_size: usize, -} - -impl BundleState { - /// Returns builder instance for further manipulation. - pub fn builder(revert_range: RangeInclusive) -> BundleBuilder { - BundleBuilder::new(revert_range) - } - - /// Creates it with new and old values of both Storage and AccountInfo. - pub fn new( - state: impl IntoIterator< - Item = (Address, Option, Option, HashMap), - >, - reverts: impl IntoIterator< - Item = impl IntoIterator< - Item = ( - Address, - Option>, - impl IntoIterator, - ), - >, - >, - contracts: impl IntoIterator, - ) -> Self { - // Create state from iterator. - let mut state_size = 0; - let state = state - .into_iter() - .map(|(address, original, present, storage)| { - let account = BundleAccount::new( - original, - present, - storage - .into_iter() - .map(|(k, (o_val, p_val))| (k, StorageSlot::new_changed(o_val, p_val))) - .collect(), - AccountStatus::Changed, - ); - state_size += account.size_hint(); - (address, account) - }) - .collect(); - - // Create reverts from iterator. - let mut reverts_size = 0; - let reverts = reverts - .into_iter() - .map(|block_reverts| { - block_reverts - .into_iter() - .map(|(address, account, storage)| { - let account = match account { - Some(Some(account)) => AccountInfoRevert::RevertTo(account), - Some(None) => AccountInfoRevert::DeleteIt, - None => AccountInfoRevert::DoNothing, - }; - let revert = AccountRevert { - account, - storage: storage - .into_iter() - .map(|(k, v)| (k, RevertToSlot::Some(v))) - .collect(), - previous_status: AccountStatus::Changed, - wipe_storage: false, - }; - reverts_size += revert.size_hint(); - (address, revert) - }) - .collect::>() - }) - .collect::>(); - - Self { - state, - contracts: contracts.into_iter().collect(), - reverts: Reverts::new(reverts), - state_size, - reverts_size, - } - } - - /// Returns the approximate size of changes in the bundle state. - /// - /// The estimation is not precise, because the information about the number of - /// destroyed entries that need to be removed is not accessible to the bundle state. - pub fn size_hint(&self) -> usize { - self.state_size + self.reverts_size + self.contracts.len() - } - - /// Returns reference to the state. - pub const fn state(&self) -> &AddressMap { - &self.state - } - - /// Checks whether bundle state is empty. - pub fn is_empty(&self) -> bool { - self.len() == 0 - } - - /// Return number of changed accounts. - pub fn len(&self) -> usize { - self.state.len() - } - - /// Gets account from state. - pub fn account(&self, address: &Address) -> Option<&BundleAccount> { - self.state.get(address) - } - - /// Gets bytecode from state. - pub fn bytecode(&self, hash: &B256) -> Option { - self.contracts.get(hash).cloned() - } - - /// Gets storage value from state. - /// - /// Returns `None` if the account is not present in the bundle state or the slot is not known. - pub fn storage(&self, address: &Address, storage_key: U256) -> Option { - self.account(address).and_then(|account| account.storage_slot(storage_key)) - } - - /// Consumes [`TransitionState`] by applying the changes and creating the - /// reverts. - /// - /// If [`BundleRetention::includes_reverts`] is `true`, then the reverts will - /// be retained. - pub fn apply_transitions_and_create_reverts( - &mut self, - transitions: TransitionState, - retention: BundleRetention, - ) { - let include_reverts = retention.includes_reverts(); - // Pessimistically pre-allocate assuming _all_ accounts changed. - let reverts_capacity = if include_reverts { transitions.transitions.len() } else { 0 }; - let mut reverts = Vec::with_capacity(reverts_capacity); - - self.state.reserve(transitions.transitions.len()); - for (address, transition) in transitions.transitions.into_iter() { - // Add new contract if it was created/changed. - if let Some((hash, new_bytecode)) = transition.has_new_contract() { - self.contracts.insert(hash, new_bytecode.clone()); - } - // Update state and create revert. - let revert = match self.state.entry(address) { - Entry::Occupied(mut entry) => { - let entry = entry.get_mut(); - self.state_size -= entry.size_hint(); - // Update and create revert if it is present - let revert = entry.update_and_create_revert(transition); - // Update the state size - self.state_size += entry.size_hint(); - revert - } - Entry::Vacant(entry) => { - // Make revert from transition account - let present_bundle = transition.present_bundle_account(); - let revert = transition.create_revert(); - if revert.is_some() { - self.state_size += present_bundle.size_hint(); - entry.insert(present_bundle); - } - revert - } - }; - - // Append revert if present. - if let Some(revert) = revert.filter(|_| include_reverts) { - self.reverts_size += revert.size_hint(); - reverts.push((address, revert)); - } - } - - self.reverts.push(reverts); - } - - /// Generate a [`StateChangeset`] from the bundle state without consuming - /// it. - pub fn to_plain_state(&self, is_value_known: OriginalValuesKnown) -> StateChangeset { - // Pessimistically pre-allocate assuming _all_ accounts changed. - let state_len = self.state.len(); - let mut accounts = Vec::with_capacity(state_len); - let mut storage = Vec::with_capacity(state_len); - - for (address, account) in &self.state { - // Append account info if it is changed. - let was_destroyed = account.was_destroyed(); - if is_value_known.is_not_known() || account.is_info_changed() { - let info = - account.info.as_ref().map(|info| AccountInfo { code: None, ..info.clone() }); - accounts.push((*address, info)); - } - - // Append storage changes - - // Note: Assumption is that revert is going to remove whole plain storage from - // database so we can check if plain state was wiped or not. - let mut account_storage_changed = Vec::with_capacity(account.storage.len()); - - for (&key, &slot) in account.storage.iter() { - // If storage was destroyed that means that storage was wiped. - // In that case we need to check if present storage value is different then ZERO. - let destroyed_and_not_zero = was_destroyed && !slot.present_value.is_zero(); - - // If account is not destroyed check if original values was changed, - // so we can update it. - let not_destroyed_and_changed = !was_destroyed && slot.is_changed(); - - if is_value_known.is_not_known() || - destroyed_and_not_zero || - not_destroyed_and_changed - { - account_storage_changed.push((key, slot.present_value)); - } - } - - if !account_storage_changed.is_empty() || was_destroyed { - // Append storage changes to account. - storage.push(PlainStorageChangeset { - address: *address, - wipe_storage: was_destroyed, - storage: account_storage_changed, - }); - } - } - - let contracts = self - .contracts - .iter() - // Remove empty bytecodes - .filter(|(b, _)| **b != KECCAK256_EMPTY) - .map(|(b, code)| (*b, code.clone())) - .collect::>(); - StateChangeset { accounts, storage, contracts } - } - - /// Generates a [`StateChangeset`] and [`PlainStateReverts`] from the bundle - /// state. - pub fn to_plain_state_and_reverts( - &self, - is_value_known: OriginalValuesKnown, - ) -> (StateChangeset, PlainStateReverts) { - (self.to_plain_state(is_value_known), self.reverts.to_plain_state_reverts()) - } - - /// Consumes the bundle state and split it into a [`StateChangeset`] and a - /// [`PlainStateReverts`]. - #[deprecated = "Use `to_plain_state_and_reverts` instead"] - pub fn into_plain_state_and_reverts( - self, - is_value_known: OriginalValuesKnown, - ) -> (StateChangeset, PlainStateReverts) { - self.to_plain_state_and_reverts(is_value_known) - } - - /// Extends the bundle with other state. - /// - /// Updates the `other` state only if `other` is not flagged as destroyed. - pub fn extend_state(&mut self, other_state: AddressMap) { - self.state.reserve(other_state.len()); - for (address, other_account) in other_state { - match self.state.entry(address) { - Entry::Occupied(mut entry) => { - let this = entry.get_mut(); - self.state_size -= this.size_hint(); - - // If other was destroyed. replace `this` storage with - // the `other one. - if other_account.was_destroyed() { - this.storage = other_account.storage; - } else { - // Otherwise extend this storage with other - this.storage.reserve(other_account.storage.len()); - for (key, storage_slot) in other_account.storage { - // Update present value or insert storage slot. - this.storage.entry(key).or_insert(storage_slot).present_value = - storage_slot.present_value; - } - } - this.info = other_account.info; - this.status.transition(other_account.status); - - // Update the state size - self.state_size += this.size_hint(); - } - Entry::Vacant(entry) => { - // Just insert if empty - self.state_size += other_account.size_hint(); - entry.insert(other_account); - } - } - } - } - /// Extends the state with state that is build on top of it. - /// - /// If storage was wiped in `other` state, copy `this` plain state - /// and put it inside `other` revert (if there is no duplicates of course). - /// - /// If `this` and `other` accounts were both destroyed invalidate second - /// wipe flag (from `other`). - /// - /// As wiping from database should be done only once - /// and we already transferred all potentially missing storages to the `other` revert. - pub fn extend(&mut self, mut other: Self) { - // Iterate over reverts and if its storage is wiped try to add previous bundle - // state as there is potential missing slots. - let mut seen = AddressSet::default(); - for (address, revert) in other.reverts.iter_mut().flatten() { - // `other` was built on a fresh bundle, so its first revert for an account records the - // account as freshly loaded. Revert to the status this bundle accumulated instead. - if seen.insert(*address) && - let Some(this_account) = self.state.get(address) - { - revert.previous_status = this_account.status; - } - - if revert.wipe_storage { - // If there is wipe storage in `other` revert - // we need to move storage from present state. - if let Some(this_account) = self.state.get_mut(address) { - // As this account was destroyed inside `other` bundle. - // We are fine to wipe/drain this storage and put it inside revert. - // A `Destroyed` slot in `other` means the value before the wipe, which is - // this bundle's present value, not the database value. - for (key, value) in this_account.storage.drain() { - let previous = RevertToSlot::Some(value.present_value); - revert - .storage - .entry(key) - .and_modify(|slot| { - if *slot == RevertToSlot::Destroyed { - *slot = previous; - } - }) - .or_insert(previous); - } - - // Nullify `other` wipe as primary database wipe is done in `this`. - if this_account.was_destroyed() { - revert.wipe_storage = false; - } - } - } - - // Increment reverts size for each of the updated reverts. - self.reverts_size += revert.size_hint(); - } - // Extension of state - self.extend_state(other.state); - // Contract can be just extended, when counter is introduced we will take into account that. - self.contracts.extend(other.contracts); - // Reverts can be just extended - self.reverts.extend(other.reverts); - } - - /// Takes first N raw reverts from the [`BundleState`]. - pub fn take_n_reverts(&mut self, reverts_to_take: usize) -> Reverts { - // Split is done as [0, num) and [num, len]. - if reverts_to_take > self.reverts.len() { - return self.take_all_reverts(); - } - let this = self.reverts.split_off(reverts_to_take); - self.reverts_size = - this.iter().flatten().fold(0, |acc, (_, revert)| acc + revert.size_hint()); - mem::replace(&mut self.reverts, Reverts::new(this)) - } - - /// Returns and clears all reverts from [`BundleState`]. - pub fn take_all_reverts(&mut self) -> Reverts { - self.reverts_size = 0; - mem::take(&mut self.reverts) - } - - /// Reverts the state changes of the latest transition. - /// - /// **Note**: This is the same as `BundleState::revert(1)` - /// - /// Returns true if the state was reverted. - pub fn revert_latest(&mut self) -> bool { - // Revert the latest recorded state - if let Some(reverts) = self.reverts.pop() { - for (address, revert_account) in reverts.into_iter() { - self.reverts_size -= revert_account.size_hint(); - match self.state.entry(address) { - Entry::Occupied(mut entry) => { - let account = entry.get_mut(); - self.state_size -= account.size_hint(); - if account.revert(revert_account) { - entry.remove(); - } else { - self.state_size += account.size_hint(); - } - } - Entry::Vacant(entry) => { - // Create empty account that we will revert on. - // Only place where this account is not existing is if revert is DeleteIt. - let mut account = BundleAccount::new( - None, - None, - HashMap::default(), - AccountStatus::LoadedNotExisting, - ); - if !account.revert(revert_account) { - self.state_size += account.size_hint(); - entry.insert(account); - } - } - } - } - return true; - } - - false - } - - /// Reverts the state changes by N transitions back. - /// - /// See also [`Self::revert_latest`] - pub fn revert(&mut self, mut num_transitions: usize) { - if num_transitions == 0 { - return; - } - - while self.revert_latest() { - num_transitions -= 1; - if num_transitions == 0 { - // Break the loop. - break; - } - } - } - - /// Prepends present the state with the given [`BundleState`]. - /// - /// It adds changes from the given state but does not override any existing changes. - /// - /// Reverts are not updated. - pub fn prepend_state(&mut self, mut other: BundleState) { - // Take this bundle - let this_bundle = mem::take(self); - // Extend other bundle state with this - other.extend_state(this_bundle.state); - // Extend other contracts - other.contracts.extend(this_bundle.contracts); - // Swap bundles - mem::swap(self, &mut other) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use crate::bundle_state::{StorageWithOriginalValues, TransitionAccount}; - - #[test] - fn transition_states() { - // Dummy data - let address = Address::new([0x01; 20]); - let acc1 = AccountInfo { balance: U256::from(10), nonce: 1, ..Default::default() }; - - let mut bundle_state = BundleState::default(); - - // Have transition from loaded to all other states - - let transition = TransitionAccount { - info: Some(acc1), - status: AccountStatus::InMemoryChange, - previous_info: None, - previous_status: AccountStatus::LoadedNotExisting, - storage: StorageWithOriginalValues::default(), - storage_was_destroyed: false, - }; - - // Apply first transition - bundle_state.apply_transitions_and_create_reverts( - TransitionState::single(address, transition.clone()), - BundleRetention::Reverts, - ); - } - - const fn account1() -> Address { - Address::new([0x60; 20]) - } - - const fn account2() -> Address { - Address::new([0x61; 20]) - } - - fn slot1() -> U256 { - U256::from(5) - } - - fn slot2() -> U256 { - U256::from(7) - } - - /// Tests bundle one. - fn test_bundle1() -> BundleState { - // Block changes - BundleState::new( - vec![ - ( - account1(), - None, - Some(AccountInfo { nonce: 1, balance: U256::from(10), ..Default::default() }), - HashMap::from_iter([ - (slot1(), (U256::from(0), U256::from(10))), - (slot2(), (U256::from(0), U256::from(15))), - ]), - ), - ( - account2(), - None, - Some(AccountInfo { nonce: 1, balance: U256::from(10), ..Default::default() }), - HashMap::default(), - ), - ], - vec![vec![ - (account1(), Some(None), vec![(slot1(), U256::from(0)), (slot2(), U256::from(0))]), - (account2(), Some(None), vec![]), - ]], - vec![], - ) - } - - /// Tests bundle two. - fn test_bundle2() -> BundleState { - // Block changes - BundleState::new( - vec![( - account1(), - None, - Some(AccountInfo { nonce: 3, balance: U256::from(20), ..Default::default() }), - HashMap::from_iter([(slot1(), (U256::from(0), U256::from(15)))]), - )], - vec![vec![( - account1(), - Some(Some(AccountInfo { nonce: 1, balance: U256::from(10), ..Default::default() })), - vec![(slot1(), U256::from(10))], - )]], - vec![], - ) - } - - /// Tests bundle three. - fn test_bundle3() -> BundleState { - BundleState::builder(0..=0) - .state_present_account_info( - account1(), - AccountInfo { nonce: 1, balance: U256::from(10), ..Default::default() }, - ) - .state_storage( - account1(), - HashMap::from_iter([(slot1(), (U256::from(0), U256::from(10)))]), - ) - .state_address(account2()) - .state_present_account_info( - account2(), - AccountInfo { nonce: 1, balance: U256::from(10), ..Default::default() }, - ) - .revert_address(0, account1()) - .revert_account_info(0, account1(), Some(None)) - .revert_storage(0, account1(), vec![(slot1(), U256::from(0))]) - .revert_account_info(0, account2(), Some(None)) - .build() - } - - /// Tests bundle four. - fn test_bundle4() -> BundleState { - BundleState::builder(0..=0) - .state_present_account_info( - account1(), - AccountInfo { nonce: 3, balance: U256::from(20), ..Default::default() }, - ) - .state_storage( - account1(), - HashMap::from_iter([(slot1(), (U256::from(0), U256::from(15)))]), - ) - .revert_address(0, account1()) - .revert_account_info( - 0, - account1(), - Some(Some(AccountInfo { nonce: 1, balance: U256::from(10), ..Default::default() })), - ) - .revert_storage(0, account1(), vec![(slot1(), U256::from(10))]) - .build() - } - - /// Per-block bundles are built on a fresh bundle, so merging them must still revert an account - /// to the status accumulated over the earlier blocks. - #[test] - fn extend_reverts_to_accumulated_status() { - let address = Address::new([0x70; 20]); - let info = AccountInfo { nonce: 1, balance: U256::from(10), ..Default::default() }; - let destroy = TransitionAccount { - info: None, - status: AccountStatus::Destroyed, - previous_info: Some(info.clone()), - previous_status: AccountStatus::Loaded, - storage: HashMap::from_iter([( - slot1(), - StorageSlot::new_changed(U256::from(3), U256::ZERO), - )]), - storage_was_destroyed: true, - }; - let recreate = TransitionAccount { - info: Some(info), - status: AccountStatus::InMemoryChange, - previous_info: None, - previous_status: AccountStatus::LoadedNotExisting, - storage: HashMap::from_iter([( - slot2(), - StorageSlot::new_changed(U256::ZERO, U256::from(5)), - )]), - storage_was_destroyed: false, - }; - let block_bundle = |transition| { - let mut bundle = BundleState::default(); - bundle.apply_transitions_and_create_reverts( - TransitionState::single(address, transition), - BundleRetention::Reverts, - ); - bundle - }; - - let first = block_bundle(destroy); - let mut merged = first.clone(); - merged.extend(block_bundle(recreate.clone())); - - // A single bundle built over both blocks tracks the status across them. - let mut cumulative = first.clone(); - cumulative.apply_transitions_and_create_reverts( - TransitionState::single( - address, - TransitionAccount { - status: AccountStatus::DestroyedChanged, - previous_status: AccountStatus::Destroyed, - ..recreate - }, - ), - BundleRetention::Reverts, - ); - assert_eq!(merged.state[&address].status, AccountStatus::DestroyedChanged); - assert_eq!(merged.reverts, cumulative.reverts); - - merged.revert(1); - cumulative.revert(1); - let account = &merged.state[&address]; - assert_eq!(account.status, AccountStatus::Destroyed); - assert!(account.was_destroyed()); - assert_eq!(merged, cumulative); - } - - fn sanity_path(bundle1: BundleState, bundle2: BundleState) { - let mut extended = bundle1.clone(); - extended.extend(bundle2.clone()); - - let mut reverted = extended.clone(); - // Revert zero does nothing. - reverted.revert(0); - assert_eq!(reverted, extended); - - // Revert by one gives us bundle one. - reverted.revert(1); - assert_eq!(reverted, bundle1); - - // Reverted by additional one gives us empty bundle. - reverted.revert(1); - assert_eq!(reverted, BundleState::default()); - - let mut reverted = extended.clone(); - - // Reverted by bigger number gives us empty bundle - reverted.revert(10); - assert_eq!(reverted, BundleState::default()); - } - - #[test] - fn extend_on_destroyed_values() { - let base_bundle1 = test_bundle1(); - let base_bundle2 = test_bundle2(); - - // test1 - // bundle1 has Destroyed - // bundle2 has Changed - // end should be DestroyedChanged. - let mut b1 = base_bundle1.clone(); - let mut b2 = base_bundle2.clone(); - b1.state.get_mut(&account1()).unwrap().status = AccountStatus::Destroyed; - b2.state.get_mut(&account1()).unwrap().status = AccountStatus::Changed; - b1.extend(b2); - assert_eq!(b1.state.get_mut(&account1()).unwrap().status, AccountStatus::DestroyedChanged); - - // test2 - // bundle1 has Changed - // bundle2 has Destroyed - // end should be Destroyed - let mut b1 = base_bundle1.clone(); - let mut b2 = base_bundle2.clone(); - b1.state.get_mut(&account1()).unwrap().status = AccountStatus::Changed; - b2.state.get_mut(&account1()).unwrap().status = AccountStatus::Destroyed; - b2.reverts[0][0].1.wipe_storage = true; - b1.extend(b2); - assert_eq!(b1.state.get_mut(&account1()).unwrap().status, AccountStatus::Destroyed); - - // test2 extension - // revert of b2 should contains plain state of b1. - let mut revert1 = base_bundle2.reverts[0][0].clone(); - revert1.1.wipe_storage = true; - revert1.1.storage.insert(slot2(), RevertToSlot::Some(U256::from(15))); - - assert_eq!(b1.reverts.as_ref(), vec![base_bundle1.reverts[0].clone(), vec![revert1]],); - - // test3 - // bundle1 has InMemoryChange - // bundle2 has Change - // end should be InMemoryChange. - - let mut b1 = base_bundle1.clone(); - let mut b2 = base_bundle2.clone(); - b1.state.get_mut(&account1()).unwrap().status = AccountStatus::InMemoryChange; - b2.state.get_mut(&account1()).unwrap().status = AccountStatus::Changed; - b1.extend(b2); - assert_eq!(b1.state.get_mut(&account1()).unwrap().status, AccountStatus::InMemoryChange); - } - - #[test] - fn extend_replaces_destroyed_revert_with_previous_value() { - // bundle1 writes slot1 = 10 and slot2 = 15; bundle2 selfdestructs and re-creates - // account1, so its revert wipes storage and marks slot1 as destroyed. - let mut b1 = test_bundle1(); - let mut b2 = test_bundle2(); - b2.state.get_mut(&account1()).unwrap().status = AccountStatus::DestroyedChanged; - let revert = &mut b2.reverts[0][0].1; - revert.wipe_storage = true; - revert.storage.insert(slot1(), RevertToSlot::Destroyed); - - b1.extend(b2); - let revert = &b1.reverts[1][0].1; - assert!(revert.wipe_storage); - assert_eq!(revert.storage.get(&slot1()), Some(&RevertToSlot::Some(U256::from(10)))); - assert_eq!(revert.storage.get(&slot2()), Some(&RevertToSlot::Some(U256::from(15)))); - } - - #[test] - fn test_sanity_path() { - sanity_path(test_bundle1(), test_bundle2()); - sanity_path(test_bundle3(), test_bundle4()); - } - - #[test] - fn test_multi_reverts_with_delete() { - let mut state = BundleBuilder::new(0..=3) - .revert_address(0, account1()) - .revert_account_info(2, account1(), Some(Some(AccountInfo::default()))) - .revert_account_info(3, account1(), Some(None)) - .build(); - - state.revert_latest(); - // State for account one was deleted - assert_eq!(state.state.get(&account1()), None); - - state.revert_latest(); - // State is set to - assert_eq!( - state.state.get(&account1()), - Some(&BundleAccount::new( - None, - Some(AccountInfo::default()), - HashMap::default(), - AccountStatus::Changed - )) - ); - } - - #[test] - fn test_revert_capacity() { - let state = BundleState::builder(0..=3) - .revert_address(0, account1()) - .revert_address(2, account2()) - .revert_account_info(0, account1(), Some(None)) - .revert_account_info(2, account2(), None) - .revert_storage(0, account1(), vec![(slot1(), U256::from(10))]) - .build(); - - assert_eq!(state.reverts.len(), 4); - assert_eq!(state.reverts[1], vec![]); - assert_eq!(state.reverts[3], vec![]); - assert_eq!(state.reverts[0].len(), 1); - assert_eq!(state.reverts[2].len(), 1); - - let (addr1, revert1) = &state.reverts[0][0]; - assert_eq!(addr1, &account1()); - assert_eq!(revert1.account, AccountInfoRevert::DeleteIt); - - let (addr2, revert2) = &state.reverts[2][0]; - assert_eq!(addr2, &account2()); - assert_eq!(revert2.account, AccountInfoRevert::DoNothing); - } - - #[test] - fn take_reverts() { - let bundle1 = test_bundle1(); - let bundle2 = test_bundle2(); - - let mut extended = bundle1.clone(); - extended.extend(bundle2.clone()); - - // Check that we have two reverts - assert_eq!(extended.reverts.len(), 2); - - // Take all by big N - let mut extended2 = extended.clone(); - assert_eq!(extended2.take_n_reverts(100), extended.reverts); - - // Take all reverts - let mut extended2 = extended.clone(); - assert_eq!(extended2.take_all_reverts(), extended.reverts); - - // Take zero revert - let taken_reverts = extended.take_n_reverts(0); - assert_eq!(taken_reverts, Reverts::default()); - assert_eq!(extended.reverts.len(), 2); - - // Take one revert - let taken_reverts = extended.take_n_reverts(1); - assert_eq!(taken_reverts, bundle1.reverts); - - // Take last revert - let taken_reverts = extended.take_n_reverts(1); - assert_eq!(taken_reverts, bundle2.reverts); - } - - #[test] - fn prepend_state() { - let address1 = account1(); - let address2 = account2(); - - let account1 = AccountInfo { nonce: 1, ..Default::default() }; - let account1_changed = AccountInfo { nonce: 1, ..Default::default() }; - let account2 = AccountInfo { nonce: 1, ..Default::default() }; - - let present_state = BundleState::builder(2..=2) - .state_present_account_info(address1, account1_changed.clone()) - .build(); - assert_eq!(present_state.reverts.len(), 1); - let previous_state = BundleState::builder(1..=1) - .state_present_account_info(address1, account1) - .state_present_account_info(address2, account2.clone()) - .build(); - assert_eq!(previous_state.reverts.len(), 1); - - let mut test = present_state; - - test.prepend_state(previous_state); - - assert_eq!(test.state.len(), 2); - // Reverts num should stay the same. - assert_eq!(test.reverts.len(), 1); - // Account1 is not overwritten. - assert_eq!(test.state.get(&address1).unwrap().info, Some(account1_changed)); - // Account2 got inserted - assert_eq!(test.state.get(&address2).unwrap().info, Some(account2)); - } - - #[test] - fn test_getters() { - let mut builder = BundleBuilder::new(0..=3); - - // Test get_states and get_states_mut - assert!(builder.get_states().is_empty()); - builder.get_states_mut().insert(account1()); - assert!(builder.get_states().contains(&account1())); - - // Test get_state_original_mut - assert!(builder.get_state_original_mut().is_empty()); - builder.get_state_original_mut().insert(account1(), AccountInfo::default()); - assert!(builder.get_state_original_mut().contains_key(&account1())); - - // Test get_state_present_mut - assert!(builder.get_state_present_mut().is_empty()); - builder.get_state_present_mut().insert(account1(), AccountInfo::default()); - assert!(builder.get_state_present_mut().contains_key(&account1())); - - // Test get_state_storage_mut - assert!(builder.get_state_storage_mut().is_empty()); - builder.get_state_storage_mut().insert(account1(), HashMap::default()); - assert!(builder.get_state_storage_mut().contains_key(&account1())); - - // Test get_reverts_mut - assert!(builder.get_reverts_mut().is_empty()); - builder.get_reverts_mut().insert((0, account1())); - assert!(builder.get_reverts_mut().contains(&(0, account1()))); - - // Test get_revert_range_mut - assert_eq!(builder.get_revert_range_mut().clone(), 0..=3); - - // Test get_revert_account_mut - assert!(builder.get_revert_account_mut().is_empty()); - builder.get_revert_account_mut().insert((0, account1()), Some(None)); - assert!(builder.get_revert_account_mut().contains_key(&(0, account1()))); - - // Test get_revert_storage_mut - assert!(builder.get_revert_storage_mut().is_empty()); - builder.get_revert_storage_mut().insert((0, account1()), vec![(slot1(), U256::from(0))]); - assert!(builder.get_revert_storage_mut().contains_key(&(0, account1()))); - - // Test get_contracts_mut - assert!(builder.get_contracts_mut().is_empty()); - builder.get_contracts_mut().insert(B256::default(), Bytecode::default()); - assert!(builder.get_contracts_mut().contains_key(&B256::default())); - } -} diff --git a/crates/trie/common/src/bundle_state/changes.rs b/crates/trie/common/src/bundle_state/changes.rs deleted file mode 100644 index 5f49edb55d6..00000000000 --- a/crates/trie/common/src/bundle_state/changes.rs +++ /dev/null @@ -1,75 +0,0 @@ -use super::RevertToSlot; -use alloc::vec::Vec; -use alloy_primitives::{Address, B256, U256}; -use evm2::{bytecode::Bytecode, evm::AccountInfo}; - -/// `accounts`/`storages`/`contracts` for inclusion into database. -/// -/// Structure is made so it is easier to apply directly to database -/// that mostly have separate tables to store `accounts`/`storages`/`contracts` data. -/// -/// **Note**: That data is **not** sorted. Some database benefit of faster inclusion -/// and smaller footprint if data is inserted in sorted order. -#[derive(Clone, Debug, Default)] -pub struct StateChangeset { - /// Vector of **not** sorted accounts information. - pub accounts: Vec<(Address, Option)>, - /// Vector of **not** sorted storage. - pub storage: Vec, - /// Vector of contracts by bytecode hash. **not** sorted. - pub contracts: Vec<(B256, Bytecode)>, -} - -/// Plain storage changeset. -/// -/// Used to apply storage changes of plain state to the database. -#[derive(Clone, Debug, PartialEq, Eq, Default)] -pub struct PlainStorageChangeset { - /// Address of account - pub address: Address, - /// Wipe storage - pub wipe_storage: bool, - /// Storage key value pairs - pub storage: Vec<(U256, U256)>, -} - -/// Plain Storage Revert. -/// -/// [`PlainStorageRevert`] contains old values of changed storage. -#[derive(Clone, Debug, PartialEq, Eq, Default)] -pub struct PlainStorageRevert { - /// Address of account - pub address: Address, - /// Whether storage is wiped in this revert - /// - /// **Note**: Wiped flag is set on first known selfdestruct and would require clearing the - /// state of this storage from database (And moving it to revert). - pub wiped: bool, - /// Contains the storage key and old values of that storage - /// - /// **Note**: Reverts are **not** sorted. - pub storage_revert: Vec<(U256, RevertToSlot)>, -} - -/// Plain state reverts are used to easily store reverts into database. -/// -/// Note that accounts are assumed **not** sorted. -#[derive(Clone, Debug, Default)] -pub struct PlainStateReverts { - /// Vector of account with removed contracts bytecode. - /// - /// **Note**: If AccountInfo is None means that account needs to be removed. - pub accounts: Vec)>>, - /// Vector of storage with its address. - pub storage: Vec>, -} - -impl PlainStateReverts { - /// Constructs new [`PlainStateReverts`] with pre-allocated capacity. - pub fn with_capacity(capacity: usize) -> Self { - Self { accounts: Vec::with_capacity(capacity), storage: Vec::with_capacity(capacity) } - } -} - -/// Storage reverts -pub type StorageRevert = Vec)>>; diff --git a/crates/trie/common/src/bundle_state/mod.rs b/crates/trie/common/src/bundle_state/mod.rs deleted file mode 100644 index e8c2909eb2c..00000000000 --- a/crates/trie/common/src/bundle_state/mod.rs +++ /dev/null @@ -1,44 +0,0 @@ -//! Block execution changes with the reverts needed to persist and unwind them. -//! -//! Ported from the `revm-database` crate of revm (), -//! Copyright (c) 2021-2026 draganrakita, licensed under the MIT License (see `LICENSES/MIT.txt`). -//! The code is kept close to upstream, so upstream style is allowed below. - -#![allow( - clippy::collapsible_if, - clippy::doc_markdown, - clippy::explicit_into_iter_loop, - clippy::explicit_iter_loop, - clippy::if_not_else, - clippy::match_same_arms, - clippy::module_inception, - clippy::redundant_clone, - clippy::redundant_else, - clippy::use_self -)] - -mod account_status; -pub use account_status::AccountStatus; - -mod bundle_account; -pub use bundle_account::BundleAccount; - -mod bundle_state; -pub use bundle_state::{BundleBuilder, BundleRetention, BundleState, OriginalValuesKnown}; - -mod changes; -pub use changes::{ - PlainStateReverts, PlainStorageChangeset, PlainStorageRevert, StateChangeset, StorageRevert, -}; - -mod plain_account; -pub use plain_account::{PlainAccount, PlainStorage, StorageSlot, StorageWithOriginalValues}; - -mod reverts; -pub use reverts::{AccountInfoRevert, AccountRevert, RevertToSlot, Reverts}; - -mod transition_account; -pub use transition_account::TransitionAccount; - -mod transition_state; -pub use transition_state::TransitionState; diff --git a/crates/trie/common/src/bundle_state/plain_account.rs b/crates/trie/common/src/bundle_state/plain_account.rs deleted file mode 100644 index b2b12fe027e..00000000000 --- a/crates/trie/common/src/bundle_state/plain_account.rs +++ /dev/null @@ -1,82 +0,0 @@ -use alloy_primitives::{ - map::{HashMap, U256Map}, - U256, -}; -use evm2::evm::AccountInfo; - -/// Plain account of StateDatabase. -#[derive(Clone, Debug, Default, PartialEq, Eq)] -pub struct PlainAccount { - /// Account information. - pub info: AccountInfo, - /// Account storage. - pub storage: PlainStorage, -} - -impl PlainAccount { - /// Creates a new empty account with the given storage. - pub fn new_empty_with_storage(storage: PlainStorage) -> Self { - Self { info: AccountInfo::default(), storage } - } - - /// Consumes the account and returns its components. - pub fn into_components(self) -> (AccountInfo, PlainStorage) { - (self.info, self.storage) - } -} - -/// This type keeps track of the current value of a storage slot. -#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, Hash)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct StorageSlot { - /// The value of the storage slot before it was changed. - /// - /// When the slot is first loaded, this is the original value. - /// - /// If the slot was not changed, this is equal to the present value. - pub previous_or_original_value: U256, - /// When loaded with sload present value is set to original value - pub present_value: U256, -} - -impl StorageSlot { - /// Creates a new _unchanged_ `StorageSlot` for the given value. - pub const fn new(original: U256) -> Self { - Self { previous_or_original_value: original, present_value: original } - } - - /// Creates a new _changed_ `StorageSlot`. - pub const fn new_changed(previous_or_original_value: U256, present_value: U256) -> Self { - Self { previous_or_original_value, present_value } - } - - /// Returns true if the present value differs from the original value - pub fn is_changed(&self) -> bool { - self.previous_or_original_value != self.present_value - } - - /// Returns the original value of the storage slot. - pub const fn original_value(&self) -> U256 { - self.previous_or_original_value - } - - /// Returns the current value of the storage slot. - pub const fn present_value(&self) -> U256 { - self.present_value - } -} - -/// This storage represent values that are before block changed. -/// -/// Note: Storage that we get EVM contains original values before block changed. -pub type StorageWithOriginalValues = U256Map; - -/// Simple plain storage that does not have previous value. -/// This is used for loading from database, cache and for bundle state. -pub type PlainStorage = U256Map; - -impl From for PlainAccount { - fn from(info: AccountInfo) -> Self { - Self { info, storage: HashMap::default() } - } -} diff --git a/crates/trie/common/src/bundle_state/reverts.rs b/crates/trie/common/src/bundle_state/reverts.rs deleted file mode 100644 index 449afc89f62..00000000000 --- a/crates/trie/common/src/bundle_state/reverts.rs +++ /dev/null @@ -1,374 +0,0 @@ -use super::{ - changes::PlainStorageRevert, AccountStatus, BundleAccount, PlainStateReverts, - StorageWithOriginalValues, -}; -use alloc::vec::Vec; -use alloy_primitives::{map::U256Map, Address, U256}; -use core::{ - cmp::Ordering, - ops::{Deref, DerefMut}, -}; -use evm2::evm::AccountInfo; - -/// Contains reverts of multiple account in multiple transitions (Transitions as a block). -#[derive(Clone, Debug, Default, Eq)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct Reverts(Vec>); - -impl Deref for Reverts { - type Target = Vec>; - - fn deref(&self) -> &Self::Target { - &self.0 - } -} - -impl DerefMut for Reverts { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.0 - } -} - -impl Reverts { - /// Creates new reverts. - pub const fn new(reverts: Vec>) -> Self { - Self(reverts) - } - - /// Sorts account inside transition by their address. - pub fn sort(&mut self) { - for revert in &mut self.0 { - revert.sort_by_key(|(address, _)| *address); - } - } - - /// Extends reverts with other reverts. - pub fn extend(&mut self, other: Reverts) { - self.0.extend(other.0); - } - - /// Generates a [`PlainStateReverts`]. - /// - /// Note that account are sorted by address. - pub fn to_plain_state_reverts(&self) -> PlainStateReverts { - let mut state_reverts = PlainStateReverts::with_capacity(self.0.len()); - for reverts in &self.0 { - // Pessimistically pre-allocate assuming _all_ accounts changed. - let mut accounts = Vec::with_capacity(reverts.len()); - let mut storage = Vec::with_capacity(reverts.len()); - for (address, revert_account) in reverts { - match &revert_account.account { - AccountInfoRevert::RevertTo(acc) => { - // Cloning is cheap, because account info has 3 small - // fields and a Bytes - accounts.push((*address, Some(acc.clone()))) - } - AccountInfoRevert::DeleteIt => accounts.push((*address, None)), - AccountInfoRevert::DoNothing => (), - } - if revert_account.wipe_storage || !revert_account.storage.is_empty() { - storage.push(PlainStorageRevert { - address: *address, - wiped: revert_account.wipe_storage, - storage_revert: revert_account - .storage - .iter() - .map(|(k, v)| (*k, *v)) - .collect::>(), - }); - } - } - state_reverts.accounts.push(accounts); - state_reverts.storage.push(storage); - } - state_reverts - } - - /// Compare two Reverts instances, ignoring the order of elements - pub fn content_eq(&self, other: &Self) -> bool { - if self.0.len() != other.0.len() { - return false; - } - - for (self_transition, other_transition) in self.0.iter().zip(other.0.iter()) { - if self_transition.len() != other_transition.len() { - return false; - } - - let mut self_transition = self_transition.clone(); - let mut other_transition = other_transition.clone(); - // Sort both transitions - self_transition.sort_by(|(addr1, revert1), (addr2, revert2)| { - addr1.cmp(addr2).then_with(|| revert1.cmp(revert2)) - }); - other_transition.sort_by(|(addr1, revert1), (addr2, revert2)| { - addr1.cmp(addr2).then_with(|| revert1.cmp(revert2)) - }); - - // Compare sorted transitions - if self_transition != other_transition { - return false; - } - } - - true - } - - /// Consume reverts and create [`PlainStateReverts`]. - /// - /// Note that account are sorted by address. - #[deprecated = "Use `to_plain_state_reverts` instead"] - pub fn into_plain_state_reverts(self) -> PlainStateReverts { - self.to_plain_state_reverts() - } -} - -impl PartialEq for Reverts { - fn eq(&self, other: &Self) -> bool { - self.content_eq(other) - } -} - -/// Assumption is that Revert can return full state from any future state to any past state. -/// -/// # Note -/// It is created when new account state is applied to old account state. -/// -/// And it is used to revert new account state to the old account state. -/// -/// [`AccountRevert`] is structured in this way as we need to save it inside database. -/// -/// And we need to be able to read it from database. -#[derive(Clone, Default, Debug, PartialEq, Eq)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub struct AccountRevert { - /// Account information revert. - pub account: AccountInfoRevert, - /// Storage slots to revert. - pub storage: U256Map, - /// Previous account status before the change. - pub previous_status: AccountStatus, - /// Whether to wipe the storage. - pub wipe_storage: bool, -} - -impl AccountRevert { - /// The approximate size of changes needed to store this account revert. - /// - /// `1 + storage_reverts_len` - pub fn size_hint(&self) -> usize { - 1 + self.storage.len() - } - - /// Very similar to new_selfdestructed but it will add additional zeros - /// ([`RevertToSlot::Destroyed`]) for the storage that are set if account is again created. - pub fn new_selfdestructed_again( - status: AccountStatus, - account: AccountInfoRevert, - mut previous_storage: StorageWithOriginalValues, - updated_storage: StorageWithOriginalValues, - ) -> Self { - // Take present storage values as the storages that we are going to revert to. - // As those values got destroyed. - let mut previous_storage: U256Map = previous_storage - .drain() - .map(|(key, value)| (key, RevertToSlot::Some(value.present_value))) - .collect(); - for (key, _) in updated_storage { - previous_storage.entry(key).or_insert(RevertToSlot::Destroyed); - } - AccountRevert { - account, - storage: previous_storage, - previous_status: status, - wipe_storage: false, - } - } - - /// Creates revert for states that were before selfdestruct. - pub fn new_selfdestructed_from_bundle( - account_info_revert: AccountInfoRevert, - bundle_account: &mut BundleAccount, - updated_storage: &StorageWithOriginalValues, - ) -> Option { - match bundle_account.status { - AccountStatus::InMemoryChange | - AccountStatus::Changed | - AccountStatus::LoadedEmptyEIP161 | - AccountStatus::Loaded => { - let mut ret = AccountRevert::new_selfdestructed_again( - bundle_account.status, - account_info_revert, - core::mem::take(&mut bundle_account.storage), - updated_storage.clone(), - ); - ret.wipe_storage = true; - Some(ret) - } - _ => None, - } - } - - /// Create new selfdestruct revert. - pub fn new_selfdestructed( - status: AccountStatus, - account: AccountInfoRevert, - mut storage: StorageWithOriginalValues, - ) -> Self { - // Zero all present storage values and save present values to AccountRevert. - let previous_storage = storage - .iter_mut() - .map(|(key, value)| { - // Take previous value and set ZERO as storage got destroyed. - (*key, RevertToSlot::Some(value.present_value)) - }) - .collect(); - - Self { account, storage: previous_storage, previous_status: status, wipe_storage: true } - } - - /// Returns `true` if there is nothing to revert, - /// by checking that: - /// * both account info and storage have been left untouched - /// * we don't need to wipe storage - pub fn is_empty(&self) -> bool { - self.account == AccountInfoRevert::DoNothing && - self.storage.is_empty() && - !self.wipe_storage - } -} - -/// Implements partial ordering for AccountRevert -impl PartialOrd for AccountRevert { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -/// Implements total ordering for AccountRevert -impl Ord for AccountRevert { - fn cmp(&self, other: &Self) -> Ordering { - // First compare accounts - if let Some(ord) = self.account.partial_cmp(&other.account) { - if ord != Ordering::Equal { - return ord; - } - } - - // Convert HashMaps to sorted vectors for comparison - let mut self_storage: Vec<_> = self.storage.iter().collect(); - let mut other_storage: Vec<_> = other.storage.iter().collect(); - - // Sort by key and then by value - self_storage.sort_by(|(k1, v1), (k2, v2)| k1.cmp(k2).then_with(|| v1.cmp(v2))); - other_storage.sort_by(|(k1, v1), (k2, v2)| k1.cmp(k2).then_with(|| v1.cmp(v2))); - - // Compare each element - for (self_entry, other_entry) in self_storage.iter().zip(other_storage.iter()) { - let key_ord = self_entry.0.cmp(other_entry.0); - if key_ord != Ordering::Equal { - return key_ord; - } - let value_ord = self_entry.1.cmp(other_entry.1); - if value_ord != Ordering::Equal { - return value_ord; - } - } - - // If one vector is longer than the other, or if all elements are equal - self_storage - .len() - .cmp(&other_storage.len()) - .then_with(|| self.previous_status.cmp(&other.previous_status)) - .then_with(|| self.wipe_storage.cmp(&other.wipe_storage)) - } -} - -/// Depending on previous state of account info this -/// will tell us what to do on revert. -#[derive(Clone, Default, Debug, PartialEq, Eq, Hash)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub enum AccountInfoRevert { - #[default] - /// Nothing changed - DoNothing, - /// Account was created and on revert we need to remove it with all storage. - DeleteIt, - /// Account was changed and on revert we need to put old state. - RevertTo(AccountInfo), -} - -impl PartialOrd for AccountInfoRevert { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -/// Orders by variant (`DoNothing`, `DeleteIt`, `RevertTo`), then by the [`AccountInfo`] fields that -/// its `Eq` compares. -impl Ord for AccountInfoRevert { - fn cmp(&self, other: &Self) -> Ordering { - match (self, other) { - (Self::RevertTo(a), Self::RevertTo(b)) => { - let order = a - .balance - .cmp(&b.balance) - .then_with(|| a.nonce.cmp(&b.nonce)) - .then_with(|| a.code_hash.cmp(&b.code_hash)); - #[cfg(feature = "account-ext")] - let order = order.then_with(|| a.extension.as_ref().cmp(b.extension.as_ref())); - order - } - (Self::DoNothing, Self::DoNothing) | (Self::DeleteIt, Self::DeleteIt) => { - Ordering::Equal - } - (Self::DoNothing, _) | (Self::DeleteIt, Self::RevertTo(_)) => Ordering::Less, - (_, Self::DoNothing) | (Self::RevertTo(_), Self::DeleteIt) => Ordering::Greater, - } - } -} - -/// So storage can have multiple types: -/// * Zero, on revert remove plain state. -/// * Value, on revert set this value -/// * Destroyed, should be removed on revert but on Revert set it as zero. -/// -/// **Note**: It is completely different state if Storage is Zero or Some or if Storage was -/// Destroyed. -/// -/// Because if it is destroyed, previous values can be found in database or it can be zero. -#[derive(Clone, Debug, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -pub enum RevertToSlot { - /// Revert to this value. - Some(U256), - /// Storage was destroyed. - Destroyed, -} - -impl RevertToSlot { - /// Returns the previous value to set on revert. - pub const fn to_previous_value(self) -> U256 { - match self { - RevertToSlot::Some(value) => value, - RevertToSlot::Destroyed => U256::ZERO, - } - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn content_eq_ignores_order_of_same_address() { - let address = Address::with_last_byte(1); - let do_nothing = AccountRevert::default(); - let delete_it = - AccountRevert { account: AccountInfoRevert::DeleteIt, ..Default::default() }; - let a = - Reverts::new(vec![vec![(address, do_nothing.clone()), (address, delete_it.clone())]]); - let b = Reverts::new(vec![vec![(address, delete_it), (address, do_nothing)]]); - assert_eq!(a, b); - } -} diff --git a/crates/trie/common/src/bundle_state/transition_account.rs b/crates/trie/common/src/bundle_state/transition_account.rs deleted file mode 100644 index 272e821977f..00000000000 --- a/crates/trie/common/src/bundle_state/transition_account.rs +++ /dev/null @@ -1,112 +0,0 @@ -use super::{AccountRevert, AccountStatus, BundleAccount, StorageWithOriginalValues}; -use alloy_primitives::{B256, U256}; -use evm2::{bytecode::Bytecode, evm::AccountInfo}; - -/// Account Created when EVM state is merged to cache state. -/// And it is sent to Block state. -/// -/// It is used when block state gets merged to bundle state to -/// create needed Reverts. -#[derive(Clone, Debug, PartialEq, Eq, Default)] -pub struct TransitionAccount { - /// Account information, if account exists. - pub info: Option, - /// Current account status. - pub status: AccountStatus, - /// Previous account info is needed for account that got initially loaded. - /// Initially loaded account are not present inside bundle and are needed - /// to generate Reverts. - pub previous_info: Option, - /// Mostly needed when previous status Loaded/LoadedEmpty. - pub previous_status: AccountStatus, - /// Storage contains both old and new account - pub storage: S, - /// If there is transition that clears the storage we should mark it here and - /// delete all storages in BundleState. This flag is needed if we have transition - /// between Destroyed states from DestroyedChanged-> DestroyedAgain-> DestroyedChanged - /// in the end transition that we would have would be `DestroyedChanged->DestroyedChanged` - /// and with only that info we couldn't decide what to do. - pub storage_was_destroyed: bool, -} - -impl TransitionAccount { - /// Create new LoadedEmpty account. - pub fn new_empty_eip161(storage: StorageWithOriginalValues) -> Self { - Self { - info: Some(AccountInfo::default()), - status: AccountStatus::InMemoryChange, - previous_info: None, - previous_status: AccountStatus::LoadedNotExisting, - storage, - storage_was_destroyed: false, - } - } - - /// Return new contract bytecode if it is changed or newly created. - pub fn has_new_contract(&self) -> Option<(B256, &Bytecode)> { - let present_new_codehash = self.info.as_ref().map(|info| &info.code_hash); - let previous_codehash = self.previous_info.as_ref().map(|info| &info.code_hash); - if present_new_codehash != previous_codehash { - return self - .info - .as_ref() - .and_then(|info| info.code.as_ref().map(|c| (info.code_hash, c))); - } - None - } - - /// Return the balance of account before transition. - pub fn previous_balance(&self) -> U256 { - self.previous_info.as_ref().map(|info| info.balance).unwrap_or_default() - } - - /// Return the balance of account after transition. - pub fn current_balance(&self) -> U256 { - self.info.as_ref().map(|info| info.balance).unwrap_or_default() - } - - /// Consume Self and create account revert from it. - pub fn create_revert(self) -> Option { - let mut previous_account = self.original_bundle_account(); - previous_account.update_and_create_revert(self) - } - - /// Present bundle account - pub fn present_bundle_account(&self) -> BundleAccount { - BundleAccount { - info: self.info.clone(), - original_info: self.previous_info.clone(), - storage: self.storage.clone(), - status: self.status, - } - } - - /// Original bundle account - fn original_bundle_account(&self) -> BundleAccount { - BundleAccount { - info: self.previous_info.clone(), - original_info: self.previous_info.clone(), - storage: StorageWithOriginalValues::default(), - status: self.previous_status, - } - } -} - -impl TransitionAccount { - /// Map the storage of the transition account. - pub fn map_storage(self, f: F) -> TransitionAccount - where - F: FnOnce(S) -> N, - { - let Self { info, status, previous_info, previous_status, storage, storage_was_destroyed } = - self; - TransitionAccount { - info, - status, - previous_info, - previous_status, - storage: f(storage), - storage_was_destroyed, - } - } -} diff --git a/crates/trie/common/src/bundle_state/transition_state.rs b/crates/trie/common/src/bundle_state/transition_state.rs deleted file mode 100644 index d41c02a0be0..00000000000 --- a/crates/trie/common/src/bundle_state/transition_state.rs +++ /dev/null @@ -1,34 +0,0 @@ -use super::TransitionAccount; -use alloy_primitives::{ - map::{AddressMap, HashMap}, - Address, -}; - -/// State of accounts in transition between transaction executions. -#[derive(Clone, Default, Debug, PartialEq, Eq)] -pub struct TransitionState { - /// Block state account with account state - pub transitions: AddressMap, -} - -impl TransitionState { - /// Create new transition state containing one [`TransitionAccount`]. - pub fn single(address: Address, transition: TransitionAccount) -> Self { - let mut transitions = HashMap::default(); - transitions.insert(address, transition); - TransitionState { transitions } - } - - /// Take the contents of this [`TransitionState`] and replace it with an - /// empty one. - /// - /// See [core::mem::take]. - pub fn take(&mut self) -> TransitionState { - core::mem::take(self) - } - - /// Clear the transition state. - pub fn clear(&mut self) { - self.transitions.clear(); - } -} diff --git a/crates/trie/common/src/lib.rs b/crates/trie/common/src/lib.rs index d0cc34ea270..ec7ef56405e 100644 --- a/crates/trie/common/src/lib.rs +++ b/crates/trie/common/src/lib.rs @@ -39,7 +39,7 @@ pub use constants::*; mod account; pub use account::TrieAccount; -pub mod bundle_state; +pub use evm2::block::bundle_state; /// V2 proof targets and chunking. pub mod target_v2; diff --git a/testing/ef-tests/src/cases/blockchain_test.rs b/testing/ef-tests/src/cases/blockchain_test.rs index 5bdc29b1d96..6f93caae703 100644 --- a/testing/ef-tests/src/cases/blockchain_test.rs +++ b/testing/ef-tests/src/cases/blockchain_test.rs @@ -5,9 +5,12 @@ use crate::{ Case, Error, Suite, }; use alloy_eip7928::bal::Bal; +use alloy_eips::{ + eip7002::WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, eip7251::CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS, +}; use alloy_rlp::Decodable; use rayon::iter::{IndexedParallelIterator, ParallelIterator}; -use reth_chainspec::ChainSpec; +use reth_chainspec::{ChainSpec, EthereumHardforks}; use reth_consensus::{Consensus, HeaderValidator}; use reth_db_common::init::{insert_genesis_hashes, insert_genesis_history, insert_genesis_state}; use reth_ethereum_consensus::{validate_block_post_execution, EthBeaconConsensus}; @@ -81,6 +84,18 @@ impl BlockchainTestCase { ) } + /// Returns `true` if the case runs Prague blocks without the EIP-7002 and EIP-7251 request + /// contracts, which makes them invalid. Legacy fixtures predate those predeploys, and their + /// state roots rule out adding them. + fn lacks_request_contracts(case: &BlockchainTest) -> bool { + case.network.to_chain_spec().is_prague_active_at_timestamp(u64::MAX) && + [WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, CONSOLIDATION_REQUEST_PREDEPLOY_ADDRESS] + .into_iter() + .any(|address| { + case.pre.get(&address).is_none_or(|account| account.code.is_empty()) + }) + } + /// Checks if the test case is a particular test called `UncleFromSideChain` /// /// This fixture fails as expected, however it fails at the wrong block number. @@ -179,7 +194,9 @@ impl Case for BlockchainTestCase { // Iterate through test cases, filtering by the network type to exclude specific forks. self.tests .into_iter() - .filter(|(_, case)| !Self::excluded_fork(case.network)) + .filter(|(_, case)| { + !Self::excluded_fork(case.network) && !Self::lacks_request_contracts(case) + }) .par_bridge_buffered() .with_min_len(64) .try_for_each(|(name, case)| Self::run_single_case(&name, &case).map(|_| ())) From 6a8732fc4fe1dbdd58ca3d01eeaa6e561edd8081 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Fri, 6 Nov 2026 08:18:40 +0000 Subject: [PATCH 012/100] ci(bench): build bench binaries with Rust beta (#28306) --- .github/scripts/bench-txgen-build-test.sh | 8 ++++---- .github/scripts/bench-txgen-build.sh | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/scripts/bench-txgen-build-test.sh b/.github/scripts/bench-txgen-build-test.sh index 2221e40809f..4c0c4219da8 100644 --- a/.github/scripts/bench-txgen-build-test.sh +++ b/.github/scripts/bench-txgen-build-test.sh @@ -7,7 +7,7 @@ trap 'rm -rf "$scratch"' EXIT export BUILD_TEST_LOG="$scratch/build-args" cargo() { - printf '%s\n' "$*" > "$BUILD_TEST_LOG" + printf '%s %s\n' "${RUSTUP_TOOLCHAIN:-}" "$*" > "$BUILD_TEST_LOG" } rustup() { :; } export -f cargo rustup @@ -18,12 +18,12 @@ for arm in baseline feature; do BENCH_BAL="$bal" BENCH_BIG_BLOCKS="$big_blocks" BENCH_TRACY=off \ bash "$script" "$arm" "$scratch" test-ref > /dev/null 2>&1 if [ "$big_blocks" = true ]; then - expected='build --locked --profile profiling -p reth-bb' + expected='beta build --locked --profile profiling -p reth-bb' else - expected='build --locked --profile profiling --bin reth' + expected='beta build --locked --profile profiling --bin reth' fi [[ "$(cat "$BUILD_TEST_LOG")" == "$expected" ]] done done done -echo 'PASS: both arms build the selected node for all BAL modes' +echo 'PASS: both arms build the selected node with the beta toolchain for all BAL modes' diff --git a/.github/scripts/bench-txgen-build.sh b/.github/scripts/bench-txgen-build.sh index 8803641548c..b1e1df3e4f6 100755 --- a/.github/scripts/bench-txgen-build.sh +++ b/.github/scripts/bench-txgen-build.sh @@ -24,11 +24,24 @@ else NODE_PKG="--bin reth" fi +# rustc 1.99.1 (LLVM 23.1.1) crashes with SIGILL in X86 combineConcatVectorOps +# when building reth with -C target-cpu=native on Zen 5 runners. The fix +# (llvm/llvm-project#228522) ships in Rust 1.100; build with beta until then. +BENCH_RUST_TOOLCHAIN="${BENCH_RUST_TOOLCHAIN:-beta}" + EXTRA_FEATURES="" if [ "${BENCH_TRACY:-off}" != "off" ]; then EXTRA_FEATURES="tracy,tracy-client/ondemand" fi +install_toolchain() { + # Both arms run in parallel; serialize the install so rustup doesn't race. + ( + flock 9 + rustup toolchain install "$BENCH_RUST_TOOLCHAIN" --profile minimal + ) 9>"${TMPDIR:-/tmp}/reth-bench-rustup.lock" +} + build_node_binary() { local features_arg="" local workspace_arg="" @@ -40,19 +53,22 @@ build_node_binary() { fi # shellcheck disable=SC2086 - RUSTFLAGS="-C target-cpu=native -C force-frame-pointers=yes" \ + RUSTUP_TOOLCHAIN="$BENCH_RUST_TOOLCHAIN" \ + RUSTFLAGS="-C target-cpu=native -C force-frame-pointers=yes" \ cargo build --locked --profile profiling $NODE_PKG $workspace_arg $features_arg } case "$MODE" in baseline|main) echo "Building baseline ${NODE_BIN} (${COMMIT}) from source for txgen benchmark..." + install_toolchain build_node_binary ;; feature|branch) echo "Building feature ${NODE_BIN} (${COMMIT}) from source for txgen benchmark..." rustup show active-toolchain || rustup default stable + install_toolchain build_node_binary ;; From e38e870c18d2763c6c7665b660adc7a729640fd7 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Nov 2026 09:32:06 +0100 Subject: [PATCH 013/100] chore(prune): use alloy HashMap in history segments (#28308) --- Cargo.lock | 1 - crates/prune/prune/Cargo.toml | 1 - crates/prune/prune/src/segments/user/account_history.rs | 9 ++++----- crates/prune/prune/src/segments/user/history.rs | 5 ++--- crates/prune/prune/src/segments/user/storage_history.rs | 9 ++++----- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ceef17193df..34ae4d8ea84 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10221,7 +10221,6 @@ dependencies = [ "reth-testing-utils", "reth-tokio-util", "reth-tracing", - "rustc-hash", "thiserror 2.0.21", "tokio", "tracing", diff --git a/crates/prune/prune/Cargo.toml b/crates/prune/prune/Cargo.toml index 1acc58f1168..63cde8281cb 100644 --- a/crates/prune/prune/Cargo.toml +++ b/crates/prune/prune/Cargo.toml @@ -38,7 +38,6 @@ tracing.workspace = true thiserror.workspace = true itertools.workspace = true tokio.workspace = true -rustc-hash.workspace = true [dev-dependencies] # reth diff --git a/crates/prune/prune/src/segments/user/account_history.rs b/crates/prune/prune/src/segments/user/account_history.rs index 32c9fa3c956..b79286a7171 100644 --- a/crates/prune/prune/src/segments/user/account_history.rs +++ b/crates/prune/prune/src/segments/user/account_history.rs @@ -6,7 +6,7 @@ use crate::{ }, PrunerError, }; -use alloy_primitives::BlockNumber; +use alloy_primitives::{map::HashMap, BlockNumber}; use reth_db_api::{models::ShardedKey, tables, transaction::DbTxMut}; use reth_provider::{ changeset_walker::StaticFileAccountChangesetWalker, DBProvider, EitherWriter, @@ -17,7 +17,6 @@ use reth_prune_types::{ }; use reth_static_file_types::StaticFileSegment; use reth_storage_api::{ChangeSetReader, StorageSettingsCache}; -use rustc_hash::FxHashMap; use tracing::{instrument, trace}; /// Number of account history tables to prune in one step. @@ -122,7 +121,7 @@ impl AccountHistory { // / 2`, so 8750 entries. Each entry is `160 bit + 64 bit`, so the total // size should be up to ~0.25MB + some hashmap overhead. `blocks_since_last_run` is // additionally limited by the `max_reorg_depth`, so no OOM is expected here. - let mut highest_deleted_accounts = FxHashMap::default(); + let mut highest_deleted_accounts = HashMap::default(); let mut last_changeset_pruned_block = None; let mut pruned_changesets = 0; let mut done = true; @@ -203,7 +202,7 @@ impl AccountHistory { // ~0.25MB + some hashmap overhead. `blocks_since_last_run` is additionally limited by the // `max_reorg_depth`, so no OOM is expected here. let mut last_changeset_pruned_block = None; - let mut highest_deleted_accounts = FxHashMap::default(); + let mut highest_deleted_accounts = HashMap::default(); let (pruned_changesets, done) = provider.tx_ref().prune_table_with_range::( range, @@ -269,7 +268,7 @@ impl AccountHistory { )) } - let mut highest_deleted_accounts = FxHashMap::default(); + let mut highest_deleted_accounts = HashMap::<_, _>::default(); let mut last_changeset_pruned_block = None; let mut changesets_processed = 0usize; let mut done = true; diff --git a/crates/prune/prune/src/segments/user/history.rs b/crates/prune/prune/src/segments/user/history.rs index 3211d082700..0185c6013de 100644 --- a/crates/prune/prune/src/segments/user/history.rs +++ b/crates/prune/prune/src/segments/user/history.rs @@ -1,5 +1,5 @@ use crate::PruneLimiter; -use alloy_primitives::BlockNumber; +use alloy_primitives::{map::HashMap, BlockNumber}; use itertools::Itertools; use reth_db_api::{ cursor::{DbCursorRO, DbCursorRW}, @@ -10,7 +10,6 @@ use reth_db_api::{ }; use reth_provider::DBProvider; use reth_prune_types::{SegmentOutput, SegmentOutputCheckpoint}; -use rustc_hash::FxHashMap; enum PruneShardOutcome { Deleted, @@ -28,7 +27,7 @@ pub(crate) struct PrunedIndices { /// Result of pruning history changesets, used to build the final output. pub(crate) struct HistoryPruneResult { /// Map of the highest deleted changeset keys to their block numbers. - pub(crate) highest_deleted: FxHashMap, + pub(crate) highest_deleted: HashMap, /// The highest block number whose changesets are fully pruned, becoming the checkpoint. /// /// Checkpoints have block granularity, so a caller that can stop in the middle of a block diff --git a/crates/prune/prune/src/segments/user/storage_history.rs b/crates/prune/prune/src/segments/user/storage_history.rs index 7dc8915b685..6ce47ed6b6b 100644 --- a/crates/prune/prune/src/segments/user/storage_history.rs +++ b/crates/prune/prune/src/segments/user/storage_history.rs @@ -6,7 +6,7 @@ use crate::{ }, PrunerError, }; -use alloy_primitives::{Address, BlockNumber, B256}; +use alloy_primitives::{map::HashMap, Address, BlockNumber, B256}; use reth_db_api::{ models::{storage_sharded_key::StorageShardedKey, BlockNumberAddress}, tables, @@ -18,7 +18,6 @@ use reth_prune_types::{ }; use reth_static_file_types::StaticFileSegment; use reth_storage_api::{StorageChangeSetReader, StorageSettingsCache}; -use rustc_hash::FxHashMap; use tracing::{instrument, trace}; /// Number of storage history tables to prune in one step. @@ -120,7 +119,7 @@ impl StorageHistory { // / 2`, so 8750 entries. Each entry is `160 bit + 256 bit + 64 bit`, so the total // size should be up to ~0.5MB + some hashmap overhead. `blocks_since_last_run` is // additionally limited by the `max_reorg_depth`, so no OOM is expected here. - let mut highest_deleted_storages = FxHashMap::default(); + let mut highest_deleted_storages = HashMap::default(); let mut last_changeset_pruned_block = None; let mut pruned_changesets = 0; let mut done = true; @@ -205,7 +204,7 @@ impl StorageHistory { // size should be up to ~0.5MB + some hashmap overhead. `blocks_since_last_run` is // additionally limited by the `max_reorg_depth`, so no OOM is expected here. let mut last_changeset_pruned_block = None; - let mut highest_deleted_storages = FxHashMap::default(); + let mut highest_deleted_storages = HashMap::default(); let (pruned_changesets, done) = provider.tx_ref().prune_table_with_range::( BlockNumberAddress::range(range), @@ -270,7 +269,7 @@ impl StorageHistory { )) } - let mut highest_deleted_storages: FxHashMap<_, _> = FxHashMap::default(); + let mut highest_deleted_storages = HashMap::<_, _>::default(); let mut last_changeset_pruned_block = None; let mut changesets_processed = 0usize; let mut done = true; From 4658a1ca2e3a7b21c9ed7b0db3560bffb7066cad Mon Sep 17 00:00:00 2001 From: Snan09 <21377146+Snan0M@users.noreply.github.com> Date: Fri, 6 Nov 2026 08:57:22 +0000 Subject: [PATCH 014/100] fix(cli): re-execute the --to block (#28269) Co-authored-by: Matthias Seitz --- crates/cli/commands/src/re_execute.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cli/commands/src/re_execute.rs b/crates/cli/commands/src/re_execute.rs index 2664bccfa38..202e78e1fd8 100644 --- a/crates/cli/commands/src/re_execute.rs +++ b/crates/cli/commands/src/re_execute.rs @@ -172,10 +172,10 @@ impl // Atomically grab the next chunk of blocks. let chunk_start = next_block.fetch_add(blocks_per_chunk, Ordering::Relaxed); - if chunk_start >= max_block { + if chunk_start > max_block { break; } - let chunk_end = (chunk_start + blocks_per_chunk).min(max_block); + let chunk_end = (chunk_start + blocks_per_chunk).min(max_block + 1); let mut executor = evm_config.batch_executor(db_at(chunk_start - 1)?); let mut executor_created = Instant::now(); From 8f3cfd117243baff2fc38fa4977e209459aec571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Fri, 6 Nov 2026 08:59:44 +0000 Subject: [PATCH 015/100] perf(rpc): borrow JWT bearer tokens (#28294) --- crates/rpc/rpc-layer/src/auth_client_layer.rs | 2 +- crates/rpc/rpc-layer/src/jwt_validator.rs | 21 +++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/crates/rpc/rpc-layer/src/auth_client_layer.rs b/crates/rpc/rpc-layer/src/auth_client_layer.rs index 5eda04aa0f3..60190312595 100644 --- a/crates/rpc/rpc-layer/src/auth_client_layer.rs +++ b/crates/rpc/rpc-layer/src/auth_client_layer.rs @@ -73,6 +73,6 @@ pub fn secret_to_bearer_header(secret: &JwtSecret) -> HeaderValue { }) .unwrap() ) - .parse() + .try_into() .unwrap() } diff --git a/crates/rpc/rpc-layer/src/jwt_validator.rs b/crates/rpc/rpc-layer/src/jwt_validator.rs index 8804ab398ac..0d3887d8abf 100644 --- a/crates/rpc/rpc-layer/src/jwt_validator.rs +++ b/crates/rpc/rpc-layer/src/jwt_validator.rs @@ -23,7 +23,7 @@ impl JwtAuthValidator { impl AuthValidator for JwtAuthValidator { fn validate(&self, headers: &HeaderMap) -> Result<(), HttpResponse> { match get_bearer(headers) { - Some(jwt) => match self.secret.validate(&jwt) { + Some(jwt) => match self.secret.validate(jwt) { Ok(_) => Ok(()), Err(e) => { error!(target: "engine::jwt-validator", "Invalid JWT: {e}"); @@ -42,18 +42,9 @@ impl AuthValidator for JwtAuthValidator { } /// This is an utility function that retrieves a bearer -/// token from an authorization Http header. -fn get_bearer(headers: &HeaderMap) -> Option { - let header = headers.get(header::AUTHORIZATION)?; - let auth: &str = header.to_str().ok()?; - let prefix = "Bearer "; - - if !auth.starts_with(prefix) { - return None; - } - - let token: &str = &auth[prefix.len()..]; - Some(token.into()) +/// token from the Authorization header. +fn get_bearer(headers: &HeaderMap) -> Option<&str> { + headers.get(header::AUTHORIZATION)?.to_str().ok()?.strip_prefix("Bearer ") } fn err_response(err: JwtError) -> HttpResponse { @@ -79,6 +70,10 @@ mod tests { headers.insert(header::AUTHORIZATION, bearer.parse().unwrap()); let token = get_bearer(&headers).unwrap(); assert_eq!(token, jwt); + assert_eq!( + token.as_ptr(), + headers[header::AUTHORIZATION].as_bytes()[bearer.len() - jwt.len()..].as_ptr() + ); } #[test] From 965ba8cb5d1635493401c26f03a170d8196de414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Fri, 6 Nov 2026 09:00:18 +0000 Subject: [PATCH 016/100] perf(rpc): avoid redundant error data serialization (#28295) --- crates/rpc/rpc-server-types/src/result.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/crates/rpc/rpc-server-types/src/result.rs b/crates/rpc/rpc-server-types/src/result.rs index 7c518a5213f..1c9dc3f7220 100644 --- a/crates/rpc/rpc-server-types/src/result.rs +++ b/crates/rpc/rpc-server-types/src/result.rs @@ -144,10 +144,7 @@ pub fn rpc_err( jsonrpsee_types::error::ErrorObject::owned( code, msg.into(), - data.map(|data| { - jsonrpsee_core::to_json_raw_value(&alloy_primitives::hex::encode_prefixed(data)) - .expect("serializing String can't fail") - }), + data.map(alloy_primitives::hex::encode_prefixed), ) } @@ -167,4 +164,16 @@ mod tests { let val = rpc_res.unwrap(); assert_eq!(val, 100); } + + #[test] + fn rpc_error_data_is_a_hex_string() { + for (data, expected) in [ + (None, None), + (Some(&[][..]), Some(r#""0x""#)), + (Some(&[0, 1, 255][..]), Some(r#""0x0001ff""#)), + ] { + let err = rpc_err(jsonrpsee_types::error::INTERNAL_ERROR_CODE, "test error", data); + assert_eq!(err.data().map(|data| data.get()), expected); + } + } } From 32d01073f1705181a9f5b48a9905b64cd0da8bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Fri, 6 Nov 2026 09:00:58 +0000 Subject: [PATCH 017/100] chore(rpc): use Tower Stack for auth middleware (#28296) --- crates/rpc/rpc-builder/src/auth.rs | 37 +++--------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/crates/rpc/rpc-builder/src/auth.rs b/crates/rpc/rpc-builder/src/auth.rs index f4a71187114..577da7fcfd8 100644 --- a/crates/rpc/rpc-builder/src/auth.rs +++ b/crates/rpc/rpc-builder/src/auth.rs @@ -17,7 +17,7 @@ use reth_rpc_layer::{ }; use reth_rpc_server_types::constants; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; -use tower::layer::util::Identity; +use tower::layer::util::{Identity, Stack}; pub use jsonrpsee::server::ServerBuilder; pub use reth_ipc::server::Builder as IpcServerBuilder; @@ -124,8 +124,8 @@ impl AuthServerConfig AuthServerConfig` around a user-provided `HttpMiddleware` into a -/// single `tower::Layer`. Requests first pass through JWT validation and only authenticated -/// requests are forwarded into the custom middleware. -struct AuthHttpLayer { - auth_layer: AuthLayer, - http_middleware: HttpMiddleware, -} - -impl AuthHttpLayer { - const fn new(secret: JwtSecret, http_middleware: HttpMiddleware) -> Self { - Self { auth_layer: AuthLayer::new(JwtAuthValidator::new(secret)), http_middleware } - } -} - -impl tower::Layer for AuthHttpLayer -where - HttpMiddleware: tower::Layer + Clone, - AuthLayer: tower::Layer<>::Service>, -{ - type Service = as tower::Layer< - >::Service, - >>::Service; - - fn layer(&self, inner: S) -> Self::Service { - let http_service = self.http_middleware.layer(inner); - self.auth_layer.layer(http_service) - } -} - /// Builder type for configuring an `AuthServerConfig`. #[derive(Debug)] pub struct AuthServerConfigBuilder { From b9c801a49b765693f32ea599f405409c676c047b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Nov 2026 10:23:34 +0100 Subject: [PATCH 018/100] fix(net): handle DNS entry whitespace (#28310) Make DNS entry parsing more consistent and extend coverage for edge cases. --- crates/net/dns/src/tree.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crates/net/dns/src/tree.rs b/crates/net/dns/src/tree.rs index 45936804d12..7be3caaf24b 100644 --- a/crates/net/dns/src/tree.rs +++ b/crates/net/dns/src/tree.rs @@ -354,6 +354,8 @@ where F: Fn(&str) -> ParseEntryResult, { ensure_strip_key(input, key, err)?; + // Advance from the same trimmed input used to find the token. + *input = input.trim_start(); let val = input.split_whitespace().next().ok_or(FieldNotFound(err))?; *input = &input[val.len()..]; @@ -458,4 +460,17 @@ mod tests { _ => unreachable!(), } } + + #[test] + fn parse_root_entry_whitespace() { + for (whitespace, value) in [(" ", "ä"), ("\u{a0}", "a")] { + let input = format!( + "enrtree-root:v1 e={whitespace}{value} l={whitespace}{value} seq={whitespace}1 sig={whitespace}AA" + ); + assert_eq!( + input.parse::().unwrap().to_string(), + format!("enrtree-root:v1 e={value} l={value} seq=1 sig=AA") + ); + } + } } From b2f6dc91040beb1a60d5fcd3675ed5efc2aa4124 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 6 Nov 2026 11:07:28 +0100 Subject: [PATCH 019/100] fix(evm): bump evm2 to run request system calls without a code check (#28311) --- Cargo.lock | 44 +++++++++++------------ Cargo.toml | 12 +++---- crates/ethereum/evm/src/factory.rs | 4 +++ crates/rpc/rpc-eth-types/src/error/mod.rs | 2 +- testing/ef-tests/src/case.rs | 26 +++++++++++--- 5 files changed, 54 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34ae4d8ea84..c2ddfd2e993 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1043,7 +1043,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1054,7 +1054,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3623,7 +3623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -3700,7 +3700,7 @@ dependencies = [ [[package]] name = "evm2" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -3741,7 +3741,7 @@ dependencies = [ [[package]] name = "evm2-inspectors" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "alloy-consensus", "alloy-eip2930", @@ -3764,7 +3764,7 @@ dependencies = [ [[package]] name = "evm2-jit" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "evm2", "evm2-jit-backend", @@ -3779,7 +3779,7 @@ dependencies = [ [[package]] name = "evm2-jit-backend" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "eyre", "ruint", @@ -3788,12 +3788,12 @@ dependencies = [ [[package]] name = "evm2-jit-build" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" [[package]] name = "evm2-jit-builtins" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "alloy-primitives", "evm2", @@ -3806,7 +3806,7 @@ dependencies = [ [[package]] name = "evm2-jit-codegen" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "alloy-primitives", "bitflags 2.13.2", @@ -3829,7 +3829,7 @@ dependencies = [ [[package]] name = "evm2-jit-context" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "alloy-primitives", "evm2", @@ -3839,7 +3839,7 @@ dependencies = [ [[package]] name = "evm2-jit-llvm" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "alloy-primitives", "cc", @@ -3852,7 +3852,7 @@ dependencies = [ [[package]] name = "evm2-jit-runtime" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -3878,7 +3878,7 @@ dependencies = [ [[package]] name = "evm2-macros" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=b0aba885e923b0fcdde202e56d284630dc1aeef3#b0aba885e923b0fcdde202e56d284630dc1aeef3" +source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" dependencies = [ "proc-macro2", "quote", @@ -5529,7 +5529,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -6622,7 +6622,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] @@ -7668,7 +7668,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -11429,7 +11429,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -11509,7 +11509,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 1.0.10", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -12202,7 +12202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -12488,7 +12488,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -13663,7 +13663,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index afa4e02165a..f9ef148a9cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -432,9 +432,9 @@ reth-trie-sparse = { path = "crates/trie/sparse", default-features = false } reth-zstd-compressors = { version = "0.8.2", default-features = false } # evm2 -evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3", default-features = false } -evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3", default-features = false } -evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3", default-features = false } +evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3", default-features = false } +evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3", default-features = false } +evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3", default-features = false } # eth alloy-dyn-abi = "1.6.1" @@ -670,9 +670,9 @@ ipnet = "2.11" # evm2 is patched through its pre-transfer URL, which redirects to alloy-rs/evm2, because Cargo # rejects a patch from the same source. [patch."https://github.com/alloy-rs/evm2"] -evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3" } -evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3" } -evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "b0aba885e923b0fcdde202e56d284630dc1aeef3" } +evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3" } +evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3" } +evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3" } [patch.crates-io] # reth-core diff --git a/crates/ethereum/evm/src/factory.rs b/crates/ethereum/evm/src/factory.rs index 123f9f4d9cc..e86e9fda2a0 100644 --- a/crates/ethereum/evm/src/factory.rs +++ b/crates/ethereum/evm/src/factory.rs @@ -547,6 +547,8 @@ pub struct JitMetrics { pub compilations_succeeded: metrics::Gauge, /// Total number of failed compilations. pub compilations_failed: metrics::Gauge, + /// Total compilation results discarded because the resident cache was cleared while they ran. + pub compilations_discarded: metrics::Gauge, /// Total number of frames or hosts that fell back to the interpreter. pub interpreter_fallbacks: metrics::Gauge, /// Total number of JIT helper processes spawned. @@ -610,6 +612,7 @@ impl JitMetrics { compilations_dispatched, compilations_succeeded, compilations_failed, + compilations_discarded, interpreter_fallbacks, jit_helper_spawns, jit_helper_spawn_failures, @@ -637,6 +640,7 @@ impl JitMetrics { self.compilations_dispatched.set(compilations_dispatched as f64); self.compilations_succeeded.set(compilations_succeeded as f64); self.compilations_failed.set(compilations_failed as f64); + self.compilations_discarded.set(compilations_discarded as f64); self.interpreter_fallbacks.set(interpreter_fallbacks as f64); self.jit_helper_spawns.set(jit_helper_spawns as f64); self.jit_helper_spawn_failures.set(jit_helper_spawn_failures as f64); diff --git a/crates/rpc/rpc-eth-types/src/error/mod.rs b/crates/rpc/rpc-eth-types/src/error/mod.rs index 5049162595f..11f4c1b8b27 100644 --- a/crates/rpc/rpc-eth-types/src/error/mod.rs +++ b/crates/rpc/rpc-eth-types/src/error/mod.rs @@ -499,7 +499,7 @@ impl From for EthApiError { impl From for EthApiError { fn from(error: DebugInspectorError) -> Self { match error { - DebugInspectorError::InvalidTracerConfig => Self::InvalidTracerConfig, + DebugInspectorError::InvalidTracerConfig(_) => Self::InvalidTracerConfig, DebugInspectorError::UnsupportedTracer => Self::Unsupported("unsupported tracer"), DebugInspectorError::JsTracerNotEnabled => { Self::Unsupported("JS Tracer is not enabled") diff --git a/testing/ef-tests/src/case.rs b/testing/ef-tests/src/case.rs index fdbe5509bce..175d8733f6b 100644 --- a/testing/ef-tests/src/case.rs +++ b/testing/ef-tests/src/case.rs @@ -1,12 +1,26 @@ //! Test case definitions use crate::result::{CaseResult, Error}; -use rayon::prelude::*; +use rayon::{prelude::*, ThreadPool, ThreadPoolBuilder}; use std::{ fmt::Debug, path::{Path, PathBuf}, + sync::LazyLock, }; +/// Stack size of the worker threads that run test cases. +/// +/// The EVM recurses natively per call frame, so a 1024-deep call chain needs more than the 2 MiB +/// default. +const WORKER_STACK_SIZE: usize = 8 * 1024 * 1024; + +static POOL: LazyLock = LazyLock::new(|| { + ThreadPoolBuilder::new() + .stack_size(WORKER_STACK_SIZE) + .build() + .expect("failed to build the test case thread pool") +}); + /// A single test case, capable of loading a JSON description of itself and running it. /// /// See for test specs. @@ -35,9 +49,11 @@ pub struct Cases { impl Cases { /// Run the contained test cases. pub fn run(self) -> Vec { - self.test_cases - .into_par_iter() - .map(|(path, case)| CaseResult::new(&path, case.description(), case.run())) - .collect() + POOL.install(|| { + self.test_cases + .into_par_iter() + .map(|(path, case)| CaseResult::new(&path, case.description(), case.run())) + .collect() + }) } } From 0973a1387278b39faced2996273eed85c8c9188e Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Nov 2026 14:10:39 +0100 Subject: [PATCH 020/100] fix(rpc): stop eth_simulateV1 once its request is dropped (#28312) Checks for cancellation between calls in `eth_simulateV1`, as `eth_callMany` and the trace methods already do since #27462. --- crates/rpc/rpc-eth-types/src/simulate.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/rpc/rpc-eth-types/src/simulate.rs b/crates/rpc/rpc-eth-types/src/simulate.rs index e1853e2da99..8b9422bcc14 100644 --- a/crates/rpc/rpc-eth-types/src/simulate.rs +++ b/crates/rpc/rpc-eth-types/src/simulate.rs @@ -28,6 +28,7 @@ use reth_primitives_traits::{ use reth_rpc_convert::{RpcBlock, RpcConvert, RpcTxReq}; use reth_rpc_server_types::result::rpc_err; use reth_storage_api::{noop::NoopProvider, HashedPostStateProvider, StateProvider}; +use reth_tasks::cancel::is_cancelled; use reth_trie_common::{HashedPostState, KeccakKeyHasher}; use std::mem; @@ -334,6 +335,9 @@ where let is_amsterdam = builder.evm_env().version().feature(EvmFeatures::EIP8037); let tx_gas_limit_cap = builder.evm_env().version().tx_gas_limit_cap; for mut call in calls { + if is_cancelled() { + return Err(EthApiError::InternalEthError) + } let block_gas_remaining = if is_amsterdam { let regular_available_gas = block_gas_limit.saturating_sub(block_regular_gas_used); let state_available_gas = block_gas_limit.saturating_sub(block_state_gas_used); From 6f7896f9cb30c1fcb1b2710872e8c464df1c510b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Nov 2026 18:17:38 +0000 Subject: [PATCH 021/100] chore(deps): bump evm2 to baf0d38 (#28318) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- Cargo.lock | 44 +++++++++++++------------- Cargo.toml | 12 +++---- crates/evm/evm/src/precompile_cache.rs | 6 ++-- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c2ddfd2e993..e14cf4a371b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1043,7 +1043,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -1054,7 +1054,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -3623,7 +3623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -3700,7 +3700,7 @@ dependencies = [ [[package]] name = "evm2" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -3741,7 +3741,7 @@ dependencies = [ [[package]] name = "evm2-inspectors" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "alloy-consensus", "alloy-eip2930", @@ -3764,7 +3764,7 @@ dependencies = [ [[package]] name = "evm2-jit" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "evm2", "evm2-jit-backend", @@ -3779,7 +3779,7 @@ dependencies = [ [[package]] name = "evm2-jit-backend" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "eyre", "ruint", @@ -3788,12 +3788,12 @@ dependencies = [ [[package]] name = "evm2-jit-build" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" [[package]] name = "evm2-jit-builtins" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "alloy-primitives", "evm2", @@ -3806,7 +3806,7 @@ dependencies = [ [[package]] name = "evm2-jit-codegen" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "alloy-primitives", "bitflags 2.13.2", @@ -3829,7 +3829,7 @@ dependencies = [ [[package]] name = "evm2-jit-context" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "alloy-primitives", "evm2", @@ -3839,7 +3839,7 @@ dependencies = [ [[package]] name = "evm2-jit-llvm" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "alloy-primitives", "cc", @@ -3852,7 +3852,7 @@ dependencies = [ [[package]] name = "evm2-jit-runtime" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -3878,7 +3878,7 @@ dependencies = [ [[package]] name = "evm2-macros" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=41fd72242e88e4e9e02dd89434c560e8d79242f3#41fd72242e88e4e9e02dd89434c560e8d79242f3" +source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" dependencies = [ "proc-macro2", "quote", @@ -5529,7 +5529,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -6622,7 +6622,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -7668,7 +7668,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -11429,7 +11429,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -11509,7 +11509,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 1.0.10", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -12202,7 +12202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -12488,7 +12488,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -13663,7 +13663,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f9ef148a9cf..ab1d2367224 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -432,9 +432,9 @@ reth-trie-sparse = { path = "crates/trie/sparse", default-features = false } reth-zstd-compressors = { version = "0.8.2", default-features = false } # evm2 -evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3", default-features = false } -evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3", default-features = false } -evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3", default-features = false } +evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703", default-features = false } +evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703", default-features = false } +evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703", default-features = false } # eth alloy-dyn-abi = "1.6.1" @@ -670,9 +670,9 @@ ipnet = "2.11" # evm2 is patched through its pre-transfer URL, which redirects to alloy-rs/evm2, because Cargo # rejects a patch from the same source. [patch."https://github.com/alloy-rs/evm2"] -evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3" } -evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3" } -evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "41fd72242e88e4e9e02dd89434c560e8d79242f3" } +evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703" } +evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703" } +evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703" } [patch.crates-io] # reth-core diff --git a/crates/evm/evm/src/precompile_cache.rs b/crates/evm/evm/src/precompile_cache.rs index f8b0fac0869..383e6ed683d 100644 --- a/crates/evm/evm/src/precompile_cache.rs +++ b/crates/evm/evm/src/precompile_cache.rs @@ -477,7 +477,7 @@ mod tests { destination, code_address: destination, call_target: destination, - input: input.clone(), + input: input.clone().into(), ..Default::default() }; for _ in 0..2 { @@ -526,7 +526,7 @@ mod tests { gas_limit: 30_000, destination: address, caller: Address::ZERO, - input: Bytes::copy_from_slice(b"cached-input"), + input: Bytes::copy_from_slice(b"cached-input").into(), value: U256::ZERO, code_address: address, call_target: address, @@ -579,7 +579,7 @@ mod tests { destination: address, code_address: address, call_target: address, - input: Bytes::from(vec![1; len]), + input: Bytes::from(vec![1; len]).into(), ..Default::default() }; let output = provider From d95d391ae5e3864eccf2fa8e9ad8b37bbe80b4d7 Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Fri, 6 Nov 2026 18:33:15 +0000 Subject: [PATCH 022/100] chore: bump version to 2.10.1 (#28319) --- Cargo.lock | 230 +++++++++++++++++++-------------------- Cargo.toml | 2 +- docs/vocs/vocs.config.ts | 2 +- 3 files changed, 117 insertions(+), 117 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e14cf4a371b..014b0315fe1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3445,7 +3445,7 @@ dependencies = [ [[package]] name = "ef-test-runner" -version = "2.10.0" +version = "2.10.1" dependencies = [ "clap", "ef-tests", @@ -3453,7 +3453,7 @@ dependencies = [ [[package]] name = "ef-tests" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -4133,7 +4133,7 @@ dependencies = [ [[package]] name = "example-full-contract-state" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "eyre", @@ -4251,7 +4251,7 @@ dependencies = [ [[package]] name = "exex-subscription" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "eyre", @@ -8049,7 +8049,7 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-node-bindings", "alloy-primitives", @@ -8102,7 +8102,7 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8128,7 +8128,7 @@ dependencies = [ [[package]] name = "reth-bb" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8163,7 +8163,7 @@ dependencies = [ [[package]] name = "reth-chain-state" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8192,7 +8192,7 @@ dependencies = [ [[package]] name = "reth-chainspec" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-chains", "alloy-consensus", @@ -8211,7 +8211,7 @@ dependencies = [ [[package]] name = "reth-cli" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-genesis", "clap", @@ -8223,7 +8223,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-chains", "alloy-consensus", @@ -8313,7 +8313,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" -version = "2.10.0" +version = "2.10.1" dependencies = [ "reth-tasks", "tokio", @@ -8322,7 +8322,7 @@ dependencies = [ [[package]] name = "reth-cli-util" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8372,7 +8372,7 @@ dependencies = [ [[package]] name = "reth-config" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "eyre", @@ -8390,7 +8390,7 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -8403,7 +8403,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8417,7 +8417,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8441,7 +8441,7 @@ dependencies = [ [[package]] name = "reth-db" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8475,7 +8475,7 @@ dependencies = [ [[package]] name = "reth-db-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8504,7 +8504,7 @@ dependencies = [ [[package]] name = "reth-db-common" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -8535,7 +8535,7 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8551,7 +8551,7 @@ dependencies = [ [[package]] name = "reth-discv4" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8578,7 +8578,7 @@ dependencies = [ [[package]] name = "reth-discv5" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8604,7 +8604,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-chains", "alloy-primitives", @@ -8632,7 +8632,7 @@ dependencies = [ [[package]] name = "reth-downloaders" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8672,7 +8672,7 @@ dependencies = [ [[package]] name = "reth-dst" -version = "2.10.0" +version = "2.10.1" dependencies = [ "bedrock-assertions", "serde", @@ -8681,7 +8681,7 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8743,7 +8743,7 @@ dependencies = [ [[package]] name = "reth-ecies" -version = "2.10.0" +version = "2.10.1" dependencies = [ "aes 0.8.4", "alloy-primitives", @@ -8769,7 +8769,7 @@ dependencies = [ [[package]] name = "reth-engine-local" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8791,7 +8791,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8819,7 +8819,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -8887,7 +8887,7 @@ dependencies = [ [[package]] name = "reth-engine-util" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8914,7 +8914,7 @@ dependencies = [ [[package]] name = "reth-era" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8938,7 +8938,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "bytes", @@ -8956,7 +8956,7 @@ dependencies = [ [[package]] name = "reth-era-utils" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8986,7 +8986,7 @@ dependencies = [ [[package]] name = "reth-errors" -version = "2.10.0" +version = "2.10.1" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -8996,7 +8996,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9033,7 +9033,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9061,7 +9061,7 @@ dependencies = [ [[package]] name = "reth-ethereum" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth", @@ -9100,7 +9100,7 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" -version = "2.10.0" +version = "2.10.1" dependencies = [ "clap", "eyre", @@ -9123,7 +9123,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9139,7 +9139,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9155,7 +9155,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eip2124", "alloy-hardforks 0.4.11", @@ -9168,7 +9168,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9196,7 +9196,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9217,7 +9217,7 @@ dependencies = [ [[package]] name = "reth-etl" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "rayon", @@ -9227,7 +9227,7 @@ dependencies = [ [[package]] name = "reth-evm" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9255,7 +9255,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9282,7 +9282,7 @@ dependencies = [ [[package]] name = "reth-execution-cache" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "evm2", @@ -9301,7 +9301,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9313,7 +9313,7 @@ dependencies = [ [[package]] name = "reth-execution-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9334,7 +9334,7 @@ dependencies = [ [[package]] name = "reth-exex" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9380,7 +9380,7 @@ dependencies = [ [[package]] name = "reth-exex-test-utils" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "eyre", @@ -9411,7 +9411,7 @@ dependencies = [ [[package]] name = "reth-exex-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9428,7 +9428,7 @@ dependencies = [ [[package]] name = "reth-fs-util" -version = "2.10.0" +version = "2.10.1" dependencies = [ "serde", "serde_json", @@ -9437,7 +9437,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9468,7 +9468,7 @@ dependencies = [ [[package]] name = "reth-ipc" -version = "2.10.0" +version = "2.10.1" dependencies = [ "bytes", "futures", @@ -9490,7 +9490,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" -version = "2.10.0" +version = "2.10.1" dependencies = [ "bitflags 2.13.2", "byteorder", @@ -9507,7 +9507,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" -version = "2.10.0" +version = "2.10.1" dependencies = [ "bindgen", "cc", @@ -9515,7 +9515,7 @@ dependencies = [ [[package]] name = "reth-metrics" -version = "2.10.0" +version = "2.10.1" dependencies = [ "futures", "libc", @@ -9528,7 +9528,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "ipnet", @@ -9536,7 +9536,7 @@ dependencies = [ [[package]] name = "reth-net-nat" -version = "2.10.0" +version = "2.10.1" dependencies = [ "futures-util", "if-addrs", @@ -9550,7 +9550,7 @@ dependencies = [ [[package]] name = "reth-network" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9620,7 +9620,7 @@ dependencies = [ [[package]] name = "reth-network-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9644,7 +9644,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9668,7 +9668,7 @@ dependencies = [ [[package]] name = "reth-network-peers" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9684,7 +9684,7 @@ dependencies = [ [[package]] name = "reth-network-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -9697,7 +9697,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" -version = "2.10.0" +version = "2.10.1" dependencies = [ "anyhow", "bincode", @@ -9716,7 +9716,7 @@ dependencies = [ [[package]] name = "reth-node-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -9739,7 +9739,7 @@ dependencies = [ [[package]] name = "reth-node-builder" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9812,7 +9812,7 @@ dependencies = [ [[package]] name = "reth-node-core" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9867,7 +9867,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-contract", @@ -9951,7 +9951,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9974,7 +9974,7 @@ dependencies = [ [[package]] name = "reth-node-events" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9997,7 +9997,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" -version = "2.10.0" +version = "2.10.1" dependencies = [ "bytes", "eyre", @@ -10029,7 +10029,7 @@ dependencies = [ [[package]] name = "reth-node-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "reth-chainspec", "reth-db-api", @@ -10040,7 +10040,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10063,7 +10063,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" -version = "2.10.0" +version = "2.10.1" dependencies = [ "pin-project", "reth-payload-primitives", @@ -10074,7 +10074,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10098,7 +10098,7 @@ dependencies = [ [[package]] name = "reth-payload-util" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10107,7 +10107,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -10147,7 +10147,7 @@ dependencies = [ [[package]] name = "reth-provider" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10199,7 +10199,7 @@ dependencies = [ [[package]] name = "reth-prune" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10228,7 +10228,7 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "arbitrary", @@ -10248,7 +10248,7 @@ dependencies = [ [[package]] name = "reth-rpc" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -10328,7 +10328,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-genesis", @@ -10357,7 +10357,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-network", @@ -10415,7 +10415,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-json-rpc", @@ -10434,7 +10434,7 @@ dependencies = [ [[package]] name = "reth-rpc-e2e-tests" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-genesis", "eyre", @@ -10453,7 +10453,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10489,7 +10489,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -10533,7 +10533,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-chains", "alloy-consensus", @@ -10583,7 +10583,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-rpc-types-engine", "brotli", @@ -10605,7 +10605,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -10633,7 +10633,7 @@ dependencies = [ [[package]] name = "reth-snap-sync" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10674,7 +10674,7 @@ dependencies = [ [[package]] name = "reth-stages" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10736,7 +10736,7 @@ dependencies = [ [[package]] name = "reth-stages-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10770,7 +10770,7 @@ dependencies = [ [[package]] name = "reth-stages-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "arbitrary", @@ -10787,7 +10787,7 @@ dependencies = [ [[package]] name = "reth-static-file" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "assert_matches", @@ -10810,7 +10810,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "clap", @@ -10828,7 +10828,7 @@ dependencies = [ [[package]] name = "reth-storage-api" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10853,7 +10853,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10868,7 +10868,7 @@ dependencies = [ [[package]] name = "reth-storage-overlay" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10898,7 +10898,7 @@ dependencies = [ [[package]] name = "reth-storage-rpc-provider" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10928,7 +10928,7 @@ dependencies = [ [[package]] name = "reth-tasks" -version = "2.10.0" +version = "2.10.1" dependencies = [ "crossbeam-utils", "dashmap", @@ -10948,7 +10948,7 @@ dependencies = [ [[package]] name = "reth-testing-utils" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10963,7 +10963,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" -version = "2.10.0" +version = "2.10.1" dependencies = [ "tokio", "tokio-stream", @@ -10972,7 +10972,7 @@ dependencies = [ [[package]] name = "reth-tracing" -version = "2.10.0" +version = "2.10.1" dependencies = [ "clap", "eyre", @@ -10991,7 +10991,7 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" -version = "2.10.0" +version = "2.10.1" dependencies = [ "base64 0.23.1", "clap", @@ -11012,7 +11012,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11063,7 +11063,7 @@ dependencies = [ [[package]] name = "reth-trie" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11096,7 +11096,7 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11129,7 +11129,7 @@ dependencies = [ [[package]] name = "reth-trie-db" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -11156,7 +11156,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -11180,7 +11180,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" -version = "2.10.0" +version = "2.10.1" dependencies = [ "alloy-primitives", "alloy-rlp", diff --git a/Cargo.toml b/Cargo.toml index ab1d2367224..9cd8b275dfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "2.10.0" +version = "2.10.1" edition = "2024" rust-version = "1.96" license = "MIT OR Apache-2.0" diff --git a/docs/vocs/vocs.config.ts b/docs/vocs/vocs.config.ts index b53d91bd759..e574ccc6888 100644 --- a/docs/vocs/vocs.config.ts +++ b/docs/vocs/vocs.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ { text: 'Rustdocs', link: '/docs' }, { text: 'GitHub', link: 'https://github.com/paradigmxyz/reth' }, { - text: 'v2.10.0', + text: 'v2.10.1', items: [ { text: 'Releases', From 6624ff8a9b88a2417f5070e7db933a6d858c3394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Fri, 6 Nov 2026 19:11:45 +0000 Subject: [PATCH 023/100] fix(rpc): cap default eth_call gas limit (#28315) --- crates/ethereum/node/tests/e2e/rpc.rs | 18 ++++++++++++++++++ crates/rpc/rpc-eth-api/src/helpers/call.rs | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/crates/ethereum/node/tests/e2e/rpc.rs b/crates/ethereum/node/tests/e2e/rpc.rs index 66bef3a2d7b..ef0ef86e7fe 100644 --- a/crates/ethereum/node/tests/e2e/rpc.rs +++ b/crates/ethereum/node/tests/e2e/rpc.rs @@ -1113,6 +1113,24 @@ async fn eth_call_caps_execution_gas_under_amsterdam() -> eyre::Result<()> { Ok(()) } +#[tokio::test] +async fn eth_call_without_gas_with_max_rpc_gas_cap() -> eyre::Result<()> { + let (node, _) = EthereumNode::test_setup_for(EthereumHardfork::Amsterdam) + .with_rpc_modifier(|mut rpc| { + rpc.rpc_gas_cap = u64::MAX; + rpc + }) + .build_single() + .await?; + + let result = node + .rpc_provider() + .call(TransactionRequest::default().to(Address::with_last_byte(0x42))) + .await?; + assert_eq!(result, Bytes::new()); + Ok(()) +} + #[tokio::test] async fn test_test_account_tx_builder() -> eyre::Result<()> { reth_tracing::init_test_tracing(); diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 07cd09cf04d..3cfb90a6e3a 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -943,7 +943,9 @@ pub trait Call: } } else { // cap request's gas limit to call gas limit - tx_env.inner_mut().set_gas_limit(self.call_gas_limit()); + tx_env + .inner_mut() + .set_gas_limit(self.call_gas_limit().min(evm_env.version().tx_gas_caps().0)); } // lower the basefee to 0 to avoid breaking EVM invariants (basefee < gasprice): From 76c88b4f3eee1632d50824ebe0ccaeae0a65ec49 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Nov 2026 21:14:48 +0100 Subject: [PATCH 024/100] fix(eth-wire): truncate status payload in handshake decode log (#28322) --- crates/net/eth-wire/src/handshake.rs | 9 ++++++++- crates/net/eth-wire/src/p2pstream.rs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/net/eth-wire/src/handshake.rs b/crates/net/eth-wire/src/handshake.rs index 45fb2ac5439..332776d5b12 100644 --- a/crates/net/eth-wire/src/handshake.rs +++ b/crates/net/eth-wire/src/handshake.rs @@ -1,8 +1,10 @@ use crate::{ errors::{EthHandshakeError, EthStreamError, P2PStreamError}, message::MAX_MESSAGE_SIZE, + p2pstream::log_prefix, CanDisconnect, }; +use alloy_primitives::hex; use bytes::{Bytes, BytesMut}; use futures::{Sink, SinkExt, Stream}; use reth_eth_wire_types::{ @@ -117,7 +119,12 @@ where ) { Ok(status) => status, Err(err) => { - debug!("decode error in eth handshake: msg={their_msg:x}"); + debug!( + %err, + len = their_msg.len(), + msg = %hex::encode(log_prefix(&their_msg)), + "decode error in eth handshake" + ); unauth.disconnect(DisconnectReason::ProtocolBreach).await?; return Err(EthStreamError::InvalidMessage(err)); } diff --git a/crates/net/eth-wire/src/p2pstream.rs b/crates/net/eth-wire/src/p2pstream.rs index a8a72cf977c..23f2e954f61 100644 --- a/crates/net/eth-wire/src/p2pstream.rs +++ b/crates/net/eth-wire/src/p2pstream.rs @@ -739,7 +739,7 @@ where } /// Returns the prefix of a peer message that is included in debug logs. -fn log_prefix(bytes: &[u8]) -> &[u8] { +pub(crate) fn log_prefix(bytes: &[u8]) -> &[u8] { &bytes[..bytes.len().min(MAX_LOGGED_PAYLOAD_SIZE)] } From 5c797b723359450b16ae225dbf6007e44b486aa4 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Fri, 6 Nov 2026 20:05:57 +0000 Subject: [PATCH 025/100] fix(trie): send an error when a proof job panics (#28313) --- crates/trie/parallel/src/proof_task/mod.rs | 65 +++++++++++++++------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/crates/trie/parallel/src/proof_task/mod.rs b/crates/trie/parallel/src/proof_task/mod.rs index e86a25d5a3a..1b8945d59b8 100644 --- a/crates/trie/parallel/src/proof_task/mod.rs +++ b/crates/trie/parallel/src/proof_task/mod.rs @@ -34,6 +34,7 @@ use reth_provider::{DatabaseProviderROFactory, ProviderError, ProviderResult, St use reth_tasks::{Runtime, WorkerPool}; use reth_trie::{DecodedMultiProofV2, MultiProofTargetsV2, ProofV2Target}; use std::{ + panic::{catch_unwind, AssertUnwindSafe}, sync::{ atomic::{AtomicBool, AtomicUsize, Ordering}, Arc, @@ -94,9 +95,9 @@ impl AvailabilitySheet { /// Owns the storage and account proof worker pools and the channel their results arrive on. /// /// Every job queued by [`Self::dispatch`] sends exactly one [`ProofWorkerResult`] to -/// [`Self::results`]. A worker that fails to start sends an error that belongs to no job instead, -/// and jobs left queued when every worker of a pool has failed get no result. Workers shut down -/// once the handle is dropped. +/// [`Self::results`]. A worker that fails to open its provider, at start or after a panicking +/// job, sends an error that belongs to no job instead, and jobs left queued when every worker of a +/// pool has failed get no result. Workers shut down once the handle is dropped. #[derive(Debug)] pub struct ProofWorkerHandle { /// Sender shared with the workers, kept so that [`Self::results`] never disconnects while the @@ -383,7 +384,8 @@ impl ProofWorkerKind { /// Runs `run` as `worker_count` workers of the given kind on a blocking task. /// -/// A worker that fails to start sends a [`ProofWorkerError`] to the result channel. +/// A worker that fails to open its provider, at start or after a panicking job, sends a +/// [`ProofWorkerError`] to the result channel and stops. fn spawn_workers( runtime: &Runtime, kind: ProofWorkerKind, @@ -437,10 +439,21 @@ struct ProofWorker { metrics: ProofWorkerIdleMetrics, } -impl ProofWorker { - /// Runs `process` for every job until the handle is dropped, advertising the worker as busy - /// while a job runs. Returns the total time spent waiting for jobs. - fn process_jobs(&self, worker_id: usize, mut process: impl FnMut(J)) -> Duration { +impl ProofWorker { + /// Runs `process` with `provider` for every job until the handle is dropped and sends each + /// job's result, advertising the worker as busy while a job runs. Returns the total time spent + /// waiting for jobs. + /// + /// A job that panics sends [`ProofJobError::Panicked`] instead of its result, so the job's + /// receiver fails instead of waiting for a result that never arrives. The worker then replaces + /// its provider, whose cached proof state must not be reused after a panic, and moves on to the + /// next job. Fails if the new provider cannot be opened. + fn process_jobs( + &self, + worker_id: usize, + mut provider: Factory::Provider, + mut process: impl FnMut(&Factory::Provider, J) -> ProofWorkerResult, + ) -> ProviderResult { // Count this worker as available only after successful initialization. self.availability.mark_idle(worker_id); @@ -464,13 +477,26 @@ impl ProofWorker { std::thread::sleep(jitter); } - process(job); + match catch_unwind(AssertUnwindSafe(|| process(&provider, job))) { + Ok(result) => self.send_result(worker_id, result), + Err(panic) => { + let message = panic + .downcast_ref::<&str>() + .copied() + .or_else(|| panic.downcast_ref::().map(String::as_str)) + .unwrap_or("unknown panic") + .to_string(); + error!(target: "trie::proof_task", worker_id, %message, "Proof job panicked"); + self.send_result(worker_id, Err(ProofJobError::Panicked { message }.into())); + provider = self.task_ctx.factory.database_provider_ro()?; + } + } self.availability.mark_idle(worker_id); idle_start = Instant::now(); } - total_idle_time + Ok(total_idle_time) } /// Sends a job result. The send fails only once the handle is dropped, when the result is no @@ -497,7 +523,7 @@ where trace!(target: "trie::proof_task", worker_id, "Storage worker started"); let mut storage_proofs_processed = 0u64; - let total_idle_time = self.process_jobs(worker_id, |job| { + let total_idle_time = self.process_jobs(worker_id, provider, |provider, job| { let StorageProofJob { hashed_address, targets, dispatched_at } = job; let _span = debug_span!( target: "trie::proof_task", @@ -525,11 +551,9 @@ where "Storage proof completed" ); - let result = - proof.map_err(|source| ProofJobError::Storage { hashed_address, source }.into()); - self.send_result(worker_id, result); storage_proofs_processed += 1; - }); + proof.map_err(|source| ProofJobError::Storage { hashed_address, source }.into()) + })?; trace!( target: "trie::proof_task", @@ -557,7 +581,7 @@ where trace!(target: "trie::proof_task", worker_id, "Account worker started"); let mut account_proofs_processed = 0u64; - let total_idle_time = self.process_jobs(worker_id, |job| { + let total_idle_time = self.process_jobs(worker_id, provider, |provider, job| { let AccountProofJob { targets, dispatched_at } = job; let _span = debug_span!( target: "trie::proof_task", @@ -583,10 +607,9 @@ where "Account proof completed" ); - let result = proof.map_err(|source| ProofJobError::Account { source }.into()); - self.send_result(worker_id, result); account_proofs_processed += 1; - }); + proof.map_err(|source| ProofJobError::Account { source }.into()) + })?; trace!( target: "trie::proof_task", @@ -618,7 +641,7 @@ struct AccountProofJob { dispatched_at: Instant, } -/// Context for a provider failure that prevents a proof worker from starting. +/// Context for a provider failure that stops a proof worker, at start or after a panicking job. #[derive(Debug, thiserror::Error)] #[error("{} worker {worker_id}: {source}", kind.name())] struct ProofWorkerError { @@ -642,6 +665,8 @@ enum ProofJobError { #[source] source: ProviderError, }, + #[error("proof job panicked: {message}")] + Panicked { message: String }, } impl From for StateRootTaskError { From 19d390ad978877518f8fe40e3255733ed755d8a5 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Fri, 6 Nov 2026 20:21:23 +0000 Subject: [PATCH 026/100] feat(rpc): replay block transactions through the block executor (#28266) --- crates/ethereum/evm/tests/execute.rs | 62 ++- .../node/tests/e2e/executor_replay.rs | 445 ++++++++++++++++++ crates/ethereum/node/tests/e2e/main.rs | 1 + crates/evm/evm/src/execute.rs | 138 ++++++ crates/rpc/rpc-eth-api/src/helpers/call.rs | 83 ++-- crates/rpc/rpc-eth-api/src/helpers/trace.rs | 87 ++-- crates/rpc/rpc/src/debug.rs | 73 ++- 7 files changed, 797 insertions(+), 92 deletions(-) create mode 100644 crates/ethereum/node/tests/e2e/executor_replay.rs diff --git a/crates/ethereum/evm/tests/execute.rs b/crates/ethereum/evm/tests/execute.rs index f120deaee38..f1959eb11f2 100644 --- a/crates/ethereum/evm/tests/execute.rs +++ b/crates/ethereum/evm/tests/execute.rs @@ -21,7 +21,7 @@ use reth_chainspec::{ChainSpecBuilder, EthereumHardfork, ForkCondition, MAINNET} use reth_ethereum_primitives::{Block, BlockBody, Transaction}; use reth_evm::{ execute::{BasicBlockExecutor, Executor}, - BlockExecutor, BlockValidationError, ConfigureEvm, + BlockExecutor, BlockValidationError, ConfigureEvm, Evm, }; use reth_evm_ethereum::EthEvmConfig; use reth_execution_types::{BlockExecutionResult, BundleSource, StateUpdate}; @@ -818,3 +818,63 @@ fn prepared_block_access_list_keeps_legacy_ef01_code() { // Reparsing the canonical BAL into evm2's representation rejects the same code. assert!(evm2::evm::Bal::try_from(alloy_bal).is_err()); } + +#[test] +fn inspect_transaction_without_commit_returns_inspector() { + #[derive(Debug, Default)] + struct CallCounter(usize); + + impl evm2::Inspector for CallCounter { + fn call( + &mut self, + _interp: &mut evm2::interpreter::Interpreter<'_, '_, T>, + _message: &mut evm2::interpreter::Message, + ) -> Option> { + self.0 += 1; + None + } + } + + let chain_spec = Arc::new(ChainSpecBuilder::from(&*MAINNET).cancun_activated().build()); + + let sender_key_pair = generators::generate_key(&mut generators::rng()); + let sender_address = + Address::from_raw_public_key(&sender_key_pair.public_key().serialize_uncompressed()[1..]); + let mut db = InMemoryDB::default(); + db.insert_account_info( + &sender_address, + AccountInfo { balance: U256::from(ETH_TO_WEI), ..Default::default() }, + ); + + let mut header = chain_spec.genesis_header().clone(); + header.gas_limit = 1_000_000; + let tx = sign_tx_with_key_pair( + sender_key_pair, + Transaction::Legacy(TxLegacy { + chain_id: Some(chain_spec.chain.id()), + nonce: 0, + gas_price: header.base_fee_per_gas.unwrap().into(), + gas_limit: 21_000, + to: TxKind::Call(address!("0x000000000000000000000000000000000000beef")), + value: U256::ONE, + input: Bytes::new(), + }), + ); + let block = Block { header, body: BlockBody { transactions: vec![tx], ..Default::default() } } + .try_into_recovered() + .unwrap(); + + let evm_config = EthEvmConfig::new(chain_spec); + let mut executor = evm_config.executor_for_block(&mut db, block.sealed_block()).unwrap(); + + let (inspector, output) = executor + .inspect_transaction_without_commit( + block.transactions_recovered().next().unwrap(), + CallCounter::default(), + ) + .unwrap(); + assert_eq!(inspector.0, 1); + assert_eq!(output.result().result.tx_gas_used(), 21_000); + // the inspector is removed once the transaction is executed + assert!(executor.evm_mut().take_inspector().is_none()); +} diff --git a/crates/ethereum/node/tests/e2e/executor_replay.rs b/crates/ethereum/node/tests/e2e/executor_replay.rs new file mode 100644 index 00000000000..22063fcb9e5 --- /dev/null +++ b/crates/ethereum/node/tests/e2e/executor_replay.rs @@ -0,0 +1,445 @@ +//! Replays of a block's transactions run through the chain's block executor. + +use alloy_consensus::{Header, Transaction}; +use alloy_eips::BlockNumberOrTag; +use alloy_primitives::{Address, B256, U256}; +use alloy_provider::{ext::DebugApi, Provider}; +use alloy_rpc_types_engine::ExecutionData; +use alloy_rpc_types_eth::TransactionReceipt; +use alloy_rpc_types_trace::{ + geth::{ + DiffMode, GethDebugTracingOptions, GethTrace, PreStateConfig, PreStateFrame, TraceResult, + }, + parity::{Delta, TraceResultsWithTransactionHash}, +}; +use evm2::BaseEvmTypes; +use jsonrpsee::core::client::ClientT; +use reth_chainspec::{ChainSpec, EthereumHardfork}; +use reth_e2e_test_utils::E2ETestSetupExt; +use reth_ethereum_primitives::{Block, EthPrimitives, Receipt, TransactionSigned}; +use reth_evm::{ + precompile_cache::PrecompileCacheMap, BlockExecutionError, BlockExecutionOutput, BlockExecutor, + BlockExecutorFactory, BundleState, ConfigureEngineEvm, ConfigureEvm, DynDatabase, EvmEnvFor, + EvmFor, ExecutableTxIterator, ExecutionCtxFor, ExecutorTx, GasOutput, NextBlockEnvAttributes, + RecoveredTx, SpecFor, StateUpdate, +}; +use reth_evm_ethereum::{ + EthBlockAssembler, EthBlockExecutionCtx, EthBlockExecutor, EthBlockExecutorFactory, + EthEvmConfig, EthEvmEnv, EthTransactionResultWithState, RethEvmFactory, RethReceiptBuilder, +}; +use reth_node_builder::{ + components::{BasicPayloadServiceBuilder, ComponentsBuilder, ExecutorBuilder}, + node::{FullNodeTypes, NodeTypes}, + BuilderContext, Node, NodeAdapter, +}; +use reth_node_ethereum::{ + EthEngineTypes, EthereumAddOns, EthereumConsensusBuilder, EthereumEngineValidatorBuilder, + EthereumEthApiBuilder, EthereumNetworkBuilder, EthereumNode, EthereumPayloadBuilder, + EthereumPoolBuilder, +}; +use reth_primitives_traits::{SealedBlock, SealedHeader}; +use reth_provider::EthStorage; +use std::sync::Arc; + +/// Amount the test executor credits to the sender of every transaction. +const SETTLEMENT: U256 = U256::from_limbs([1_000_000_000, 0, 0, 0]); + +/// Traces and intermediate roots of a block's transactions include the changes the block executor +/// applies on top of the EVM result, so they agree with the committed state, both when the replay +/// executes the transactions before the target and when it positions the state with the block's +/// BAL. +#[tokio::test] +async fn replays_include_block_executor_settlement() -> eyre::Result<()> { + reth_tracing::init_test_tracing(); + + let (mut node, wallet) = SettlingNode::test_setup_for(EthereumHardfork::Prague) + .with_node_config_modifier(|mut config| { + config.rpc.rpc_state_cache.cache_computed_bals = true; + config + }) + .build_single() + .await?; + let provider = node.rpc_provider(); + let client = node.rpc_client().expect("the HTTP RPC server is enabled"); + let mut account = wallet.account(0); + let sender = account.address(); + let recipient = Address::with_last_byte(0x77); + let values = [U256::from(1), U256::from(2)]; + + let first = account.transfer(recipient, values[0]).await; + let second = account.transfer(recipient, values[1]).await; + let mined = node.mine([first, second]).await?.ensure_success()?; + let block_hash = mined.block().hash(); + let state_root = mined.block().state_root; + + // The executor's settlement is part of the committed state. + let mut balance = provider.get_balance(sender).number(0).await?; + let mut expected = Vec::new(); + for (receipt, value) in mined.receipts.iter().zip(values) { + let pre = balance; + balance = pre - value - fee(receipt) + SETTLEMENT; + expected.push((receipt.transaction_hash, pre, balance)); + } + assert_eq!(provider.get_balance(sender).number(1).await?, balance); + + let opts = GethDebugTracingOptions::prestate_tracer(PreStateConfig { + diff_mode: Some(true), + ..Default::default() + }); + let trace_transactions = async || -> eyre::Result> { + let mut diffs = Vec::new(); + for &(tx_hash, pre, post) in &expected { + let diff = + prestate_diff(provider.debug_trace_transaction(tx_hash, opts.clone()).await?)?; + assert_eq!(diff.pre[&sender].balance, Some(pre)); + assert_eq!(diff.post[&sender].balance, Some(post)); + diffs.push(diff); + } + Ok(diffs) + }; + + // Without a cached BAL, the transactions before the target are replayed. + let cache = node.rpc.inner.eth_api().cache(); + assert!(cache.get_recovered_block_and_maybe_bal(block_hash).await?.unwrap().1.is_none()); + let diffs = trace_transactions().await?; + + let block_diffs = provider + .debug_trace_block_by_number(BlockNumberOrTag::Number(1), opts.clone()) + .await? + .into_iter() + .map(|result| match result { + TraceResult::Success { result, .. } => prestate_diff(result), + TraceResult::Error { error, .. } => Err(eyre::eyre!("trace failed: {error}")), + }) + .collect::>>()?; + assert_eq!(block_diffs, diffs); + + let replays: Vec = client + .request("trace_replayBlockTransactions", (BlockNumberOrTag::Number(1), ["stateDiff"])) + .await?; + assert_eq!(replays.len(), expected.len()); + for (replay, &(tx_hash, pre, post)) in replays.iter().zip(&expected) { + assert_eq!(replay.transaction_hash, tx_hash); + let state_diff = replay.full_trace.state_diff.as_ref().expect("stateDiff was requested"); + assert_eq!(state_diff.0[&sender].balance, Delta::changed(pre, post)); + } + + let roots = + client.request::, _>("debug_intermediateRoots", (block_hash, None::<()>)).await?; + assert_eq!(roots.len(), 2); + assert_eq!(roots.last(), Some(&state_root)); + + // With the block's BAL cached, only the target transaction is executed. + let _: serde_json::Value = client.request("eth_getBlockAccessList", (block_hash,)).await?; + assert!(cache.get_recovered_block_and_maybe_bal(block_hash).await?.unwrap().1.is_some()); + assert_eq!(trace_transactions().await?, diffs); + + Ok(()) +} + +fn fee(receipt: &TransactionReceipt) -> U256 { + U256::from(receipt.gas_used) * U256::from(receipt.effective_gas_price) +} + +fn prestate_diff(trace: GethTrace) -> eyre::Result { + match trace { + GethTrace::PreStateTracer(PreStateFrame::Diff(diff)) => Ok(diff), + trace => Err(eyre::eyre!("expected a prestate diff, got {trace:?}")), + } +} + +/// Ethereum node whose block executor credits `SETTLEMENT` to every transaction's sender. +#[derive(Debug, Default, Clone, Copy)] +struct SettlingNode; + +impl NodeTypes for SettlingNode { + type Primitives = EthPrimitives; + type ChainSpec = ChainSpec; + type Storage = EthStorage; + type Payload = EthEngineTypes; +} + +impl Node for SettlingNode +where + N: FullNodeTypes, +{ + type ComponentsBuilder = ComponentsBuilder< + N, + EthereumPoolBuilder, + BasicPayloadServiceBuilder, + EthereumNetworkBuilder, + SettlingExecutorBuilder, + EthereumConsensusBuilder, + >; + + type AddOns = + EthereumAddOns, EthereumEthApiBuilder, EthereumEngineValidatorBuilder>; + + fn components_builder(&self) -> Self::ComponentsBuilder { + EthereumNode::components().executor(SettlingExecutorBuilder) + } + + fn add_ons(&self) -> Self::AddOns { + EthereumAddOns::default() + } +} + +#[derive(Debug, Default, Clone, Copy)] +struct SettlingExecutorBuilder; + +impl ExecutorBuilder for SettlingExecutorBuilder +where + N: FullNodeTypes, +{ + type EVM = SettlingEvmConfig; + + async fn build_evm(self, ctx: &BuilderContext) -> eyre::Result { + let inner = EthEvmConfig::new(ctx.chain_spec()); + let executor_factory = SettlingExecutorFactory { inner: inner.executor_factory.clone() }; + Ok(SettlingEvmConfig { inner, executor_factory }) + } +} + +#[derive(Debug, Clone)] +struct SettlingEvmConfig { + inner: EthEvmConfig, + executor_factory: SettlingExecutorFactory, +} + +impl ConfigureEvm for SettlingEvmConfig { + type Primitives = EthPrimitives; + type Error = ::Error; + type NextBlockEnvCtx = NextBlockEnvAttributes; + type BlockExecutorFactory = SettlingExecutorFactory; + type BlockAssembler = EthBlockAssembler; + + fn block_executor_factory(&self) -> &Self::BlockExecutorFactory { + &self.executor_factory + } + + fn block_assembler(&self) -> &Self::BlockAssembler { + self.inner.block_assembler() + } + + fn evm_env(&self, header: &Header) -> Result, Self::Error> { + self.inner.evm_env(header) + } + + fn next_evm_env( + &self, + parent: &Header, + attributes: &NextBlockEnvAttributes, + ) -> Result, Self::Error> { + self.inner.next_evm_env(parent, attributes) + } + + fn context_for_block<'a>( + &self, + block: &'a SealedBlock, + ) -> Result, Self::Error> + where + Self: 'a, + { + self.inner.context_for_block(block) + } + + fn context_for_next_block( + &self, + parent: &SealedHeader, + attributes: Self::NextBlockEnvCtx, + ) -> Result, Self::Error> { + self.inner.context_for_next_block(parent, attributes) + } + + fn evm_with_precompile_cache<'a, DB>( + &self, + db: DB, + evm_env: EvmEnvFor, + cache_map: PrecompileCacheMap>, + metrics_enabled: bool, + ) -> EvmFor<'a, Self> + where + DB: evm2::evm::Database + 'a, + { + self.inner.evm_with_precompile_cache(db, evm_env, cache_map, metrics_enabled) + } +} + +impl ConfigureEngineEvm for SettlingEvmConfig { + fn evm_env_for_payload(&self, payload: &ExecutionData) -> Result, Self::Error> { + self.inner.evm_env_for_payload(payload) + } + + fn context_for_payload<'a>( + &self, + payload: &'a ExecutionData, + ) -> Result, Self::Error> { + self.inner.context_for_payload(payload) + } + + fn tx_iterator_for_payload( + &self, + payload: &ExecutionData, + ) -> Result, Self::Error> { + self.inner.tx_iterator_for_payload(payload) + } +} + +#[derive(Debug, Clone)] +struct SettlingExecutorFactory { + inner: EthBlockExecutorFactory, +} + +impl BlockExecutorFactory for SettlingExecutorFactory { + type EvmFactory = RethEvmFactory; + type EvmTypes = BaseEvmTypes; + type Transaction = TransactionSigned; + type Receipt = Receipt; + type Evm<'a> = evm2::Evm<'a, BaseEvmTypes>; + type EvmEnv = EthEvmEnv; + type ExecutionCtx<'a> + = EthBlockExecutionCtx<'a> + where + Self: 'a; + type Executor<'a> + = SettlingExecutor<'a> + where + Self: 'a; + + fn create_executor<'a>( + &'a self, + evm: Self::Evm<'a>, + ctx: Self::ExecutionCtx<'a>, + ) -> Self::Executor<'a> + where + Self: 'a, + { + SettlingExecutor { + inner: EthBlockExecutor::new( + evm, + ctx, + self.inner.chain_spec().as_ref(), + self.inner.receipt_builder(), + ), + } + } + + fn evm_factory(&self) -> &Self::EvmFactory { + self.inner.evm_factory() + } + + fn evm_with_env<'a, DB>(&self, db: DB, evm_env: Self::EvmEnv) -> Self::Evm<'a> + where + DB: DynDatabase + 'a, + { + self.inner.evm_with_env(db, evm_env) + } +} + +type InnerExecutor<'a> = EthBlockExecutor<'a, BaseEvmTypes, &'a RethReceiptBuilder>; + +/// Ethereum block executor that credits `SETTLEMENT` to the sender in each transaction's detached +/// state, like a chain settling a per-transaction refund outside the EVM. +struct SettlingExecutor<'a> { + inner: InnerExecutor<'a>, +} + +impl<'a> BlockExecutor for SettlingExecutor<'a> { + type Transaction = TransactionSigned; + type Receipt = Receipt; + type Evm = evm2::Evm<'a, BaseEvmTypes>; + type TransactionResultWithState = EthTransactionResultWithState; + type BlockAccessList = as BlockExecutor>::BlockAccessList; + + fn evm(&self) -> &Self::Evm { + self.inner.evm() + } + + fn evm_mut(&mut self) -> &mut Self::Evm { + self.inner.evm_mut() + } + + fn set_state_hook(&mut self, hook: impl FnMut(StateUpdate) + Send + 'static) -> bool { + self.inner.set_state_hook(hook) + } + + fn convert_block_access_list( + block_access_list: &alloy_eips::eip7928::BlockAccessList, + ) -> Result { + InnerExecutor::convert_block_access_list(block_access_list) + } + + fn set_block_access_list(&mut self, block_access_list: Arc) { + self.inner.set_block_access_list(block_access_list); + } + + fn set_block_access_index(&mut self, index: alloy_eips::eip7928::BlockAccessIndex) { + self.inner.set_block_access_index(index); + } + + fn enable_block_access_list_builder(&mut self) { + self.inner.enable_block_access_list_builder(); + } + + fn take_block_access_list(&mut self) -> Option { + self.inner.take_block_access_list() + } + + fn apply_pre_execution_changes(&mut self) -> Result<(), BlockExecutionError> { + self.inner.apply_pre_execution_changes() + } + + fn into_state(self) -> BundleState { + self.inner.into_state() + } + + fn validate_transaction_gas_limit( + &mut self, + gas_limit: u64, + ) -> Result<(), BlockExecutionError> { + self.inner.validate_transaction_gas_limit(gas_limit) + } + + fn execute_transaction_without_commit( + &mut self, + transaction: impl ExecutorTx, + ) -> Result { + let (tx_env, tx) = transaction.into_parts(); + let sender = *tx.signer(); + let tx_type = tx.tx().tx_type(); + let blob_gas_used = tx.tx().blob_gas_used().unwrap_or_default(); + + let (mut result, ..) = + self.inner.execute_transaction_without_commit((tx_env, tx))?.into_parts(); + let account = result + .pending_state + .account_changes_for(&sender) + .expect("every transaction loads its sender"); + let original = account.original.cloned(); + let mut settled = account.current.cloned().expect("the sender exists after paying fees"); + settled.balance += SETTLEMENT; + result.pending_state.insert_account(sender, original, Some(settled)); + + Ok(EthTransactionResultWithState::new(result, tx_type, blob_gas_used)) + } + + fn commit_transaction( + &mut self, + output: Self::TransactionResultWithState, + ) -> Result { + self.inner.commit_transaction(output) + } + + fn receipts(&self) -> &[Self::Receipt] { + self.inner.receipts() + } + + fn finish_with_block_access_list( + self, + ) -> Result< + (BlockExecutionOutput, Option), + BlockExecutionError, + > { + self.inner.finish_with_block_access_list() + } +} diff --git a/crates/ethereum/node/tests/e2e/main.rs b/crates/ethereum/node/tests/e2e/main.rs index 4511c67665d..4bc51b04eba 100644 --- a/crates/ethereum/node/tests/e2e/main.rs +++ b/crates/ethereum/node/tests/e2e/main.rs @@ -5,6 +5,7 @@ mod custom_genesis; mod dev; mod eip6780; mod eth; +mod executor_replay; mod exex; mod finality; mod forkchoice; diff --git a/crates/evm/evm/src/execute.rs b/crates/evm/evm/src/execute.rs index dee730c5708..1539975094f 100644 --- a/crates/evm/evm/src/execute.rs +++ b/crates/evm/evm/src/execute.rs @@ -15,6 +15,7 @@ use alloy_eips::{ }; use alloy_primitives::{Address, B256}; use core::fmt::Debug; +use evm2::interpreter::{Interpreter, Message, MessageResult}; use reth_execution_types::{BlockExecutionResult, StateUpdate}; use reth_primitives_traits::{ Block, HeaderTy, NodePrimitives, ReceiptTy, RecoveredBlock, SealedHeader, SignedTransaction, @@ -107,6 +108,9 @@ pub trait Evm { where I: evm2::Inspector + 'static; + /// Removes and returns the active inspector, if any. + fn take_inspector(&mut self) -> Option + '_>>; + /// Returns the accepted state overlay, including earlier committed transactions. fn state_db_mut(&mut self) -> &mut dyn DynDatabase; @@ -203,6 +207,10 @@ impl<'a, T: evm2::EvmTypes> Evm for evm2::Evm<'a, T> { Some(f(unsafe { inspector.downcast_mut_unchecked::() })) } + fn take_inspector(&mut self) -> Option + '_>> { + self.clear_inspector() + } + fn state_db_mut(&mut self) -> &mut dyn DynDatabase { self.overlay_db_mut() } @@ -258,6 +266,95 @@ fn execute_result>( Ok(if commit { executed.commit() } else { executed.discard() }) } +/// Inspector installed by [`BlockExecutor::inspect_transaction_without_commit`]. +/// +/// Only this module constructs it, and only around a `'static` inspector, which is what lets +/// [`TracedInspector::downcast`] cast a matching inspector soundly: evm2's type IDs ignore +/// lifetimes, so a downcast to an arbitrary inspector type could extend a borrow. +#[derive(Debug)] +struct TracedInspector(I); + +impl TracedInspector { + /// Returns the wrapped inspector if `inspector` is a `TracedInspector`. + fn downcast(inspector: Box + '_>) -> Option { + let erased: &dyn evm2::evm::NonStaticAny = &*inspector; + if erased.type_id() != core::any::TypeId::of::() { + return None + } + // SAFETY: the erased type IDs match, and only this module constructs a `TracedInspector`, + // always around a `'static` inspector, so the boxed value is a `TracedInspector` and no + // lifetime is extended. + let traced = unsafe { Box::from_raw(Box::into_raw(inspector).cast::()) }; + Some(traced.0) + } +} + +impl> evm2::Inspector for TracedInspector { + fn initialize_interp(&mut self, interp: &mut Interpreter<'_, '_, T>) { + self.0.initialize_interp(interp); + } + + fn inspector_config(&self) -> evm2::InspectorConfig { + self.0.inspector_config() + } + + fn step(&mut self, interp: &mut Interpreter<'_, '_, T>) { + self.0.step(interp); + } + + fn step_end(&mut self, interp: &mut Interpreter<'_, '_, T>) { + self.0.step_end(interp); + } + + fn log(&mut self, log: &alloy_primitives::Log, host: &mut T::Host<'_>) { + self.0.log(log, host); + } + + fn call( + &mut self, + interp: &mut Interpreter<'_, '_, T>, + message: &mut Message, + ) -> Option> { + self.0.call(interp, message) + } + + fn call_end( + &mut self, + interp: &mut Interpreter<'_, '_, T>, + message: &Message, + result: &mut MessageResult, + ) { + self.0.call_end(interp, message, result); + } + + fn create( + &mut self, + interp: &mut Interpreter<'_, '_, T>, + message: &mut Message, + ) -> Option> { + self.0.create(interp, message) + } + + fn create_end( + &mut self, + interp: &mut Interpreter<'_, '_, T>, + message: &Message, + result: &mut MessageResult, + ) { + self.0.create_end(interp, message, result); + } + + fn selfdestruct( + &mut self, + contract: &Address, + target: &Address, + value: &alloy_primitives::U256, + host: &mut T::Host<'_>, + ) { + self.0.selfdestruct(contract, target, value, host); + } +} + /// A configured block executor. pub trait BlockExecutor: Sized { /// Consensus transaction type executed by this executor. @@ -343,6 +440,31 @@ pub trait BlockExecutor: Sized { transaction: impl ExecutorTx, ) -> Result; + /// Executes a transaction with `inspector` and detaches its state changes without committing + /// them. + /// + /// Returns the inspector together with the output, so a tracer observes the transaction exactly + /// as the executor runs it, including any changes the executor applies on top of the EVM + /// result. Replaces any inspector already set on the executor's EVM. Returns an error if the + /// executor removed or replaced the inspector while executing the transaction. + fn inspect_transaction_without_commit( + &mut self, + transaction: impl ExecutorTx, + inspector: I, + ) -> Result<(I, Self::TransactionResultWithState), BlockExecutionError> + where + I: evm2::Inspector<::EvmTypes> + 'static, + { + self.evm_mut().set_inspector(TracedInspector(inspector)); + let output = self.execute_transaction_without_commit(transaction); + let inspector = + self.evm_mut().take_inspector().and_then(TracedInspector::downcast).ok_or_else(|| { + BlockExecutionError::msg("block executor replaced the tracing inspector") + }); + let (inspector, output) = (inspector?, output?); + Ok((inspector, output)) + } + /// Commits detached transaction state and records its receipt and gas accounting. fn commit_transaction( &mut self, @@ -1552,6 +1674,22 @@ mod tests { use alloy_eips::eip2930::AccessListItem; use alloy_primitives::{Bytes, TxKind, U256}; + #[test] + fn traced_inspector_forwards_inspector_config() { + struct NoSteps; + impl evm2::Inspector for NoSteps { + fn inspector_config(&self) -> evm2::InspectorConfig { + evm2::InspectorConfig::without_steps() + } + } + + // a tracer that skips step hooks must not run every opcode through the inspected table + assert_eq!( + evm2::Inspector::::inspector_config(&TracedInspector(NoSteps)), + evm2::InspectorConfig::without_steps(), + ); + } + #[test] fn transaction_env_mut_upgrades_legacy_with_access_list() { let mut tx = evm2::ethereum::TxEnvelope::Legacy(TxLegacy { diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 3cfb90a6e3a..00f76253451 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -2,10 +2,9 @@ //! methods. use super::{LoadBlock, LoadPendingBlock, LoadState, LoadTransaction, SpawnBlocking, Trace}; -use crate::{ - helpers::estimate::EstimateCall, FromEvmError, FullEthApiTypes, RpcBlock, RpcNodeCore, -}; +use crate::{helpers::estimate::EstimateCall, FromEvmError, FullEthApiTypes, RpcBlock}; use alloy_consensus::{transaction::Transaction, BlockHeader}; +use alloy_eip7928::BlockAccessIndex; use alloy_eips::{ eip1559::calc_effective_gas_price, eip2718::Typed2718, eip2930::AccessListResult, }; @@ -23,12 +22,12 @@ use reth_chainspec::{ChainSpecProvider, EthChainSpec, EthereumHardforks}; use reth_errors::{ProviderError, RethError}; use reth_evm::{ database::StateProviderDatabase, - execute::{BlockBuilder, BlockExecutor}, - BundleState, ConfigureEvm, Database, Evm, EvmEnv, EvmEnvFor, EvmTypesFor, TransactionEnvMut, - TxEnvFor, TxResultWithStateFor, + execute::{BlockBuilder, BlockExecutor, BlockExecutorFactory, BlockTransactionResult}, + BlockExecutorFor, BundleState, ConfigureEvm, Database, Evm, EvmEnv, EvmEnvFor, EvmTypesFor, + TransactionEnvMut, TxEnvFor, TxResultWithStateFor, }; use reth_execution_types::BundleSource; -use reth_primitives_traits::{BlockBody, Recovered}; +use reth_primitives_traits::{BlockBody, BlockTy, Recovered, RecoveredBlock}; use reth_rpc_convert::{RpcConvert, RpcTxReq}; use reth_rpc_eth_types::{ cache::db::{ @@ -717,7 +716,7 @@ pub trait Call: /// /// Before the transaction is executed, the state is positioned right before the transaction, /// either by attaching the block's cached BAL or by executing all previous transactions in the - /// block. + /// block. The transaction is executed through the block executor, see [`Call::block_executor`]. /// The callback `f` is invoked with the [`TxResultWithStateFor`] after the transaction was /// executed and the database that points to the beginning of the transaction. The database /// may have the block's BAL attached and must only be used for reads, because an attached @@ -758,9 +757,15 @@ pub trait Call: if let Some((bal, tx_index)) = bal.zip(tx_info.index) { attach_bal_before_tx(&mut db, &bal, tx_index as usize); - let evm_env = this.evm_env_for_header(block.sealed_block().sealed_header())?; - let tx_env = RpcNodeCore::evm_config(&this).tx_env(tx); - let res = this.transact(&mut db, evm_env, tx_env)?; + let mut executor = this.block_executor(&block, &mut db, evm_env)?; + executor.set_block_access_index(BlockAccessIndex::from_tx_index(tx_index)); + let res = executor + .execute_transaction_without_commit(tx) + .map_err(Self::Error::from_evm_err)? + .into_result(); + let cache = executor.evm_mut().take_state_cache(); + drop(executor); + db.cache.merge(cache); return f(tx_info, res, db) } @@ -778,16 +783,18 @@ pub trait Call: .map_err(Self::Error::from_eth_err)?; db.commit_source(&reth_execution_types::BundleSource(&changes)); - let mut evm = this.evm_config().evm_with_env(&mut db, evm_env); - this.replay_transactions_until_with_evm( - &mut evm, + let mut executor = this.block_executor(&block, &mut db, evm_env)?; + this.replay_transactions_until_with_executor( + &mut executor, block_txs, tx_info.index.expect("included transaction has an index") as usize, )?; - let tx_env = RpcNodeCore::evm_config(&this).tx_env(tx); - let res = evm.transact(&tx_env).map_err(Self::Error::from_evm_err)?; - let cache = evm.take_state_cache(); - drop(evm); + let res = executor + .execute_transaction_without_commit(tx) + .map_err(Self::Error::from_evm_err)? + .into_result(); + let cache = executor.evm_mut().take_state_cache(); + drop(executor); db.cache.merge(cache); f(tx_info, res, db) }) @@ -796,26 +803,17 @@ pub trait Call: } } - /// Replays all transactions before the target transaction index on the given EVM. - /// - /// This executes on a caller provided EVM, so the target transaction can then be run on the - /// same EVM, keeping any block-scoped EVM state intact. The EVM's inspector configuration is - /// left untouched; see - /// [`Trace::inspect_transaction_in_block`] to replay without inspection and trace the target. + /// Replays all transactions before the target transaction index through the given executor. /// /// If the target index is greater than or equal to the iterator length, all transactions are /// replayed. - fn replay_transactions_until_with_evm<'a, E, Txs>( + fn replay_transactions_until_with_executor<'a, Txs>( &self, - evm: &mut E, + executor: &mut BlockExecutorFor<'_, Self::Evm>, transactions: Txs, target_tx_index: usize, ) -> Result<(), Self::Error> where - E: Evm< - EvmTypes = EvmTypesFor, - Transaction = as evm2::EvmTypesHost>::Tx, - >, Txs: IntoIterator>>, { for (index, tx) in transactions.into_iter().enumerate() { @@ -827,12 +825,33 @@ pub trait Call: return Err(EthApiError::InternalEthError.into()) } - let tx_env = self.evm_config().tx_env(tx.cloned()); - let _ = evm.transact_commit(&tx_env).map_err(Self::Error::from_evm_err)?; + executor.execute_transaction(tx).map_err(Self::Error::from_evm_err)?; } Ok(()) } + /// Creates a block executor for `block` on `db` with the given EVM environment. + /// + /// Replaying a block's own transactions through the executor rather than a bare EVM includes + /// the changes the executor applies on top of each EVM result, so replayed results agree with + /// the block's receipts and state. The executor does not apply the block's pre-execution + /// changes: callers apply them to `db` first or position `db` with the block's BAL, see + /// [`attach_bal_before_tx`]. + fn block_executor<'a>( + &'a self, + block: &'a RecoveredBlock>, + db: &'a mut StateCacheDb, + evm_env: EvmEnvFor, + ) -> Result, Self::Error> { + let ctx = self + .evm_config() + .context_for_block(block.sealed_block()) + .map_err(RethError::other) + .map_err(Self::Error::from_eth_err)?; + let evm = self.evm_config().evm_with_env(db, evm_env); + Ok(self.evm_config().block_executor_factory().create_executor(evm, ctx)) + } + /// /// All `TxEnv` fields are derived from the given [`RpcTxReq`], if fields are /// `None`, they fall back to the [`reth_evm::EvmEnv`]'s settings. diff --git a/crates/rpc/rpc-eth-api/src/helpers/trace.rs b/crates/rpc/rpc-eth-api/src/helpers/trace.rs index d45e893ae31..0fc9786383b 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/trace.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/trace.rs @@ -3,7 +3,7 @@ use super::{Call, LoadBlock, LoadState, LoadTransaction}; use crate::{FromEthApiError, FromEvmError}; use alloy_consensus::{transaction::TxHashRef, BlockHeader}; -use alloy_eip7928::bal::DecodedBal; +use alloy_eip7928::{bal::DecodedBal, BlockAccessIndex}; use alloy_primitives::B256; use alloy_rpc_types_eth::{BlockId, TransactionInfo}; use evm2::evm::Bal as EvmBal; @@ -11,6 +11,7 @@ use evm2_inspectors::tracing::{TracingInspector, TracingInspectorConfig}; use futures::Future; use reth_errors::RethError; use reth_evm::{ + execute::{BlockExecutor, BlockTransactionResult}, ConfigureEvm, Database, Evm, EvmEnvFor, EvmTypesFor, TxEnvFor, TxResultWithStateFor, }; use reth_primitives_traits::{BlockBody, BlockTy, RecoveredBlock}; @@ -157,12 +158,11 @@ pub trait Trace: LoadState> + Call { else { return Ok(None); }; - let (target_tx, tx_info) = transaction.split(); + let (_, tx_info) = transaction.split(); // we need to get the state of the parent block because we're essentially replaying the // block the transaction is included in self.spawn_with_state_at_block(block.parent_hash(), move |this, mut db| { - let tx_env = this.evm_config().tx_env(target_tx); let (inspector, result, _) = this.inspect_transaction_in_block( &block, &mut db, @@ -171,7 +171,6 @@ pub trait Trace: LoadState> + Call { // returns transactions included in a block tx_info.index.expect("transaction_and_block only returns block transactions") as usize, - &tx_env, bal.as_deref(), )?; f(tx_info, inspector, result, db) @@ -185,8 +184,9 @@ pub trait Trace: LoadState> + Call { /// /// If the block's cached BAL is given, it is attached to the database at the target index and /// no transactions are executed, see [`attach_bal_before_tx`]. Otherwise all transactions - /// before the target transaction are executed and their changes are written to the - /// _runtime_ db ([`StateCacheDb`]). + /// before the target transaction are executed through the block executor, see + /// [`Call::block_executor`], and their changes are written to the _runtime_ db + /// ([`StateCacheDb`]). /// /// If the target index is greater than or equal to the block's transaction count, all /// transactions are replayed. @@ -205,24 +205,28 @@ pub trait Trace: LoadState> + Call { self.apply_pre_execution_changes(block, db)?; let evm_env = self.evm_env_for_header(block.sealed_block().sealed_header())?; - let mut evm = self.evm_config().evm_with_env(&mut *db, evm_env); - self.replay_transactions_until_with_evm( - &mut evm, + let mut executor = self.block_executor(block, db, evm_env)?; + self.replay_transactions_until_with_executor( + &mut executor, block.transactions_recovered(), target_tx_index, )?; - let cache = evm.take_state_cache(); - drop(evm); + let cache = executor.evm_mut().take_state_cache(); + drop(executor); db.cache.merge(cache); Ok(()) } - /// Executes the target transaction with the configured inspector on the state right before - /// the transaction. + /// Executes the block's transaction at the target index with the configured inspector on the + /// state right before the transaction. /// - /// If the block's cached BAL is given, the state is positioned by attaching the BAL at the - /// target index, see [`attach_bal_before_tx`]. Otherwise all transactions before the target - /// transaction are replayed without inspection first. + /// The transaction is executed through the block executor, see [`Call::block_executor`]. If + /// the block's cached BAL is given, the state is positioned by attaching the BAL at the target + /// index, see [`attach_bal_before_tx`], and the executor is told the transaction's position + /// with [`BlockExecutor::set_block_access_index`]. Otherwise all transactions before the + /// target transaction are replayed through the executor without inspection first. + /// + /// Returns [`EthApiError::InvalidParams`] if the block has no transaction at that index. #[expect(clippy::type_complexity)] fn inspect_transaction_in_block( &self, @@ -230,12 +234,19 @@ pub trait Trace: LoadState> + Call { db: &mut StateCacheDb, inspector: I, target_tx_index: usize, - target_tx_env: &TxEnvFor, bal: Option<&DecodedBal>>, ) -> Result<(I, TxResultWithStateFor, EvmEnvFor), Self::Error> where I: evm2::Inspector> + 'static, { + let Some(target_tx) = block.transactions_recovered().nth(target_tx_index) else { + return Err(EthApiError::InvalidParams(format!( + "tx_index {target_tx_index} out of bounds for block with {} transactions", + block.transaction_count() + )) + .into()) + }; + if let Some(bal) = bal { // the BAL also covers the block's pre-execution changes attach_bal_before_tx(db, bal, target_tx_index); @@ -244,21 +255,24 @@ pub trait Trace: LoadState> + Call { } let evm_env = self.evm_env_for_header(block.sealed_block().sealed_header())?; - let mut evm = self.evm_config().evm_with_env(&mut *db, evm_env.clone()); + let mut executor = self.block_executor(block, db, evm_env.clone())?; - if bal.is_none() { - self.replay_transactions_until_with_evm( - &mut evm, + if bal.is_some() { + executor + .set_block_access_index(BlockAccessIndex::from_tx_index(target_tx_index as u64)); + } else { + self.replay_transactions_until_with_executor( + &mut executor, block.transactions_recovered(), target_tx_index, )?; } - - let (inspector, result) = evm - .transact_with_inspector(target_tx_env, inspector) + let (inspector, result) = executor + .inspect_transaction_without_commit(target_tx, inspector) + .map(|(inspector, output)| (inspector, output.into_result())) .map_err(Self::Error::from_evm_err)?; - let cache = evm.take_state_cache(); - drop(evm); + let cache = executor.evm_mut().take_state_cache(); + drop(executor); db.cache.merge(cache); Ok((inspector, result, evm_env)) } @@ -362,18 +376,18 @@ pub trait Trace: LoadState> + Call { let tx_count = max_transactions.min(block.body().transaction_count()); let mut results = Vec::new(); - let mut evm = this.evm_config().evm_with_env(&mut db, evm_env); + let mut executor = this.block_executor(&block, &mut db, evm_env)?; for (idx, tx) in block.transactions_recovered().take(max_transactions).enumerate() { if is_cancelled() { return Err(EthApiError::InternalEthError.into()) } - let tx_env = this.evm_config().tx_env(tx.cloned()); - let (inspector, result) = evm - .transact_with_inspector(&tx_env, inspector_setup()) + let tx_hash = *tx.tx_hash(); + let (inspector, output) = executor + .inspect_transaction_without_commit(tx, inspector_setup()) .map_err(Self::Error::from_evm_err)?; let tx_info = TransactionInfo { - hash: Some(*tx.tx_hash()), + hash: Some(tx_hash), index: Some(idx as u64), block_hash: Some(block_hash), block_number: Some(block_number), @@ -382,11 +396,16 @@ pub trait Trace: LoadState> + Call { }; let item = f( tx_info, - TracingCtx { result: &result, db: evm.state_db_mut(), inspector }, + TracingCtx { + result: output.result(), + db: executor.evm_mut().state_db_mut(), + inspector, + }, )?; - // the EVM is dropped after the last transaction, so its state needs no commit + // the executor is dropped after the last transaction, so its state needs no + // commit if idx + 1 < tx_count { - evm.commit_state(&result.pending_state); + executor.commit_transaction(output).map_err(Self::Error::from_evm_err)?; } results.push(item); } diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index c4d0eea50d6..c09572c4224 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -22,8 +22,9 @@ use reth_chainspec::{ChainSpecProvider, EthereumHardforks}; use reth_engine_primitives::ConsensusEngineEvent; use reth_errors::RethError; use reth_evm::{ - execute::Executor, witness::ExecutionWitnessRecord, ConfigureEvm, DynDatabase, Evm, EvmEnv, - EvmEnvFor, + execute::{BlockExecutor, BlockTransactionResult, Executor}, + witness::ExecutionWitnessRecord, + ConfigureEvm, DynDatabase, Evm, EvmEnv, EvmEnvFor, }; use reth_primitives_traits::{ Block as BlockTrait, BlockBody, BlockTy, ReceiptWithBloom, RecoveredBlock, @@ -123,7 +124,8 @@ where self.inner.blocking_task_guard.clone().acquire_owned().await } - /// Trace the entire block asynchronously + /// Traces every transaction of a block through the block executor, see + /// [`Call::block_executor`](reth_rpc_eth_api::helpers::Call::block_executor). async fn trace_block( &self, block: Arc>>, @@ -140,37 +142,38 @@ where let mut transactions = block.transactions_recovered().enumerate().peekable(); let mut inspector = DebugInspector::new(opts).map_err(Eth::Error::from_eth_err)?; - let mut evm = eth_api.evm_config().evm_with_env(&mut db, evm_env); + let mut executor = eth_api.block_executor(&block, &mut db, evm_env)?; while let Some((index, tx)) = transactions.next() { if is_cancelled() { return Err(EthApiError::InternalEthError.into()) } + let tx_hash = *tx.tx_hash(); let tx_env = eth_api.evm_config().tx_env(tx.cloned()); - let (next_inspector, res) = evm - .transact_with_inspector(&tx_env, inspector) + let (next_inspector, output) = executor + .inspect_transaction_without_commit(tx, inspector) .map_err(Eth::Error::from_evm_err)?; inspector = next_inspector; let result = inspector .get_result( Some(TransactionContext { block_hash: Some(block.hash()), - tx_hash: Some(*tx.tx_hash()), + tx_hash: Some(tx_hash), tx_index: Some(index), }), &tx_env, &block_env, - &res, - evm.state_db_mut(), + output.result(), + executor.evm_mut().state_db_mut(), ) .map_err(Eth::Error::from_eth_err)?; - results.push(TraceResult::Success { result, tx_hash: Some(*tx.tx_hash()) }); + results.push(TraceResult::Success { result, tx_hash: Some(tx_hash) }); if transactions.peek().is_some() { inspector.fuse().map_err(Eth::Error::from_eth_err)?; // need to apply the state changes of this transaction before executing the // next transaction - evm.commit_state(&res.pending_state) + executor.commit_transaction(output).map_err(Eth::Error::from_evm_err)?; } } @@ -210,15 +213,15 @@ where return Ok(results) } }; - let mut evm = eth_api.evm_config().evm_with_env(&mut db, evm_env); + let mut executor = eth_api.block_executor(&block, &mut db, evm_env)?; while let Some((index, tx)) = transactions.next() { let tx_hash = *tx.tx_hash(); let tx_env = eth_api.evm_config().tx_env(tx.cloned()); - let res = match evm.transact_with_inspector(&tx_env, inspector) { - Ok((next_inspector, res)) => { + let output = match executor.inspect_transaction_without_commit(tx, inspector) { + Ok((next_inspector, output)) => { inspector = next_inspector; - res + output } Err(err) => { results.push(Some(TraceResult::Error { @@ -237,8 +240,8 @@ where }), &tx_env, &block_env, - &res, - evm.state_db_mut(), + output.result(), + executor.evm_mut().state_db_mut(), ) { Ok(result) => result, Err(err) => { @@ -259,7 +262,13 @@ where })); break } - evm.commit_state(&res.pending_state); + if let Err(err) = executor.commit_transaction(output) { + results.push(Some(TraceResult::Error { + error: err.to_string(), + tx_hash: Some(*next_tx.tx_hash()), + })); + break + } } } @@ -359,7 +368,6 @@ where &mut db, inspector, index, - &tx_env, bal.as_deref(), )?; let trace = inspector @@ -822,20 +830,35 @@ where self.eth_api() .spawn_with_state_at_block(block.parent_hash(), move |eth_api, mut db| { - let mut roots = Vec::with_capacity(block.body().transactions().len()); + let tx_count = block.body().transactions().len(); let mut state = eth_api.apply_pre_execution_changes(&block, &mut db)?; + + // the executor borrows the database, so collect each transaction's changes first + // and compute the roots once it is dropped + let mut transaction_states = Vec::with_capacity(tx_count); + let mut executor = eth_api.block_executor(&block, &mut db, evm_env)?; for tx in block.transactions_recovered() { if is_cancelled() { return Err(EthApiError::InternalEthError.into()) } - let tx_env = eth_api.evm_config().tx_env(tx.cloned()); - let result = eth_api.transact(&mut db, evm_env.clone(), tx_env)?; + let output = executor + .execute_transaction_without_commit(tx) + .map_err(Eth::Error::from_evm_err)?; let mut changes = reth_execution_types::TransactionChanges::default(); - let Ok(()) = result.pending_state.visit(&mut changes); + let Ok(()) = output.result().pending_state.visit(&mut changes); let mut transaction_state = reth_execution_types::BlockState::default(); transaction_state.commit(&changes); - state.extend(transaction_state.into_bundle()); - db.commit_source(&result.pending_state); + transaction_states.push(transaction_state.into_bundle()); + executor.commit_transaction(output).map_err(Eth::Error::from_evm_err)?; + } + drop(executor); + + let mut roots = Vec::with_capacity(tx_count); + for transaction_state in transaction_states { + if is_cancelled() { + return Err(EthApiError::InternalEthError.into()) + } + state.extend(transaction_state); let hashed_state = db .db .inner() From c0e8be419899b34d51a8055e84ec0287226d7a78 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Nov 2026 22:23:20 +0000 Subject: [PATCH 027/100] perf(evm): parallelize EIP-7702 authorization recovery (#28307) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- Cargo.lock | 1 + crates/ethereum/evm/Cargo.toml | 2 ++ crates/ethereum/evm/src/convert.rs | 28 +++++++++++++++++++++++++++- crates/ethereum/evm/src/lib.rs | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 014b0315fe1..bbbea9c1f1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9267,6 +9267,7 @@ dependencies = [ "evm2", "evm2-jit", "metrics", + "rayon", "reth-chainspec", "reth-ethereum-forks", "reth-ethereum-primitives", diff --git a/crates/ethereum/evm/Cargo.toml b/crates/ethereum/evm/Cargo.toml index 0600bff114a..f21d4d20556 100644 --- a/crates/ethereum/evm/Cargo.toml +++ b/crates/ethereum/evm/Cargo.toml @@ -32,6 +32,7 @@ alloy-rpc-types-engine.workspace = true # misc metrics = { workspace = true, optional = true } reth-metrics = { workspace = true, optional = true } +rayon = { workspace = true, optional = true } [dev-dependencies] alloy-sol-types.workspace = true @@ -73,6 +74,7 @@ p256-aws-lc-rs = [ "reth-evm/p256-aws-lc-rs", ] std = [ + "dep:rayon", "alloy-consensus/std", "alloy-eips/std", "alloy-genesis/std", diff --git a/crates/ethereum/evm/src/convert.rs b/crates/ethereum/evm/src/convert.rs index f9ddb2f3845..79aab540cdf 100644 --- a/crates/ethereum/evm/src/convert.rs +++ b/crates/ethereum/evm/src/convert.rs @@ -13,6 +13,9 @@ use reth_chainspec::EthereumHardforks; use reth_ethereum_primitives::TransactionSigned; use reth_evm::{ExecutableTxParts, RecoveredTx}; +#[cfg(feature = "std")] +const PARALLEL_AUTHORIZATION_THRESHOLD: usize = 16; + /// Map the latest active Ethereum hardfork at `timestamp` or `block_number` to a [`SpecId`]. pub fn spec_id_by_timestamp_and_block_number( chain_spec: &C, @@ -131,11 +134,34 @@ impl ExecutableRecoveredTx { pub fn new(tx: Recovered) -> Self { // Cache the hash before cloning so neither envelope hashes on the execution thread. tx.inner().tx_hash(); - let tx_env = tx.clone().convert(); + let tx_env = tx.clone().map(|signed| match signed { + TransactionSigned::Eip7702(signed) => { + let body = signed.strip_signature(); + evm2::ethereum::TxEnvelope::Eip7702(recover_authorizations(body)) + } + signed => signed.into(), + }); Self { tx_env, tx } } } +/// Recovers EIP-7702 authorizations, using parallel recovery for large lists. +pub fn recover_authorizations(tx: alloy_consensus::TxEip7702) -> evm2::ethereum::LazyTxEip7702 { + #[cfg(feature = "std")] + if tx.authorization_list.len() >= PARALLEL_AUTHORIZATION_THRESHOLD { + use rayon::prelude::*; + + let authorities = tx + .authorization_list + .par_iter() + .map(|auth| evm2::ethereum::LazyAuthorization::Signed(auth).authority()) + .collect(); + return evm2::ethereum::LazyTxEip7702::from_cached_recovered_authorizations(tx, authorities); + } + + evm2::ethereum::LazyTxEip7702::from_recovered_authorizations(tx) +} + impl RecoveredTx for ExecutableRecoveredTx { fn tx(&self) -> &TransactionSigned { self.tx.inner() diff --git a/crates/ethereum/evm/src/lib.rs b/crates/ethereum/evm/src/lib.rs index 548558fedaf..eff121a1ece 100644 --- a/crates/ethereum/evm/src/lib.rs +++ b/crates/ethereum/evm/src/lib.rs @@ -244,7 +244,7 @@ pub use factory::{ pub use factory::{EthBigBlockExecutorFactory, EthBlockExecutorFactory, EvmFactory}; mod convert; -pub use convert::ExecutableRecoveredTx; +pub use convert::{recover_authorizations, ExecutableRecoveredTx}; mod execution; From 75da4e21c2d3f8c0d57a79965139482d020dfd41 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 6 Nov 2026 23:38:45 +0100 Subject: [PATCH 028/100] fix(ci): make stage smoke test deterministic (#28323) --- .github/scripts/stage-test.py | 156 ++++++++++++++++++++++++++++++++++ .github/workflows/stage.yml | 34 +------- 2 files changed, 158 insertions(+), 32 deletions(-) create mode 100644 .github/scripts/stage-test.py diff --git a/.github/scripts/stage-test.py b/.github/scripts/stage-test.py new file mode 100644 index 00000000000..bcc6c2b3b2c --- /dev/null +++ b/.github/scripts/stage-test.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python3 +"""Smoke-test stages against a local peer using the RPC compatibility fixture.""" + +import json +import os +from pathlib import Path +import socket +import subprocess +import sys +import tempfile +import time + + +RETH = sys.argv[1] if len(sys.argv) > 1 else "reth" +FIXTURE = ( + Path(__file__).resolve().parents[2] + / "crates/rpc/rpc-e2e-tests/testdata/rpc-compat" +) +TIP = 45 +STAGES = { + "headers": "Headers", + "bodies": "Bodies", + "senders": "SenderRecovery", + "execution": "Execution", + "merkle": "MerkleExecute", + "tx-lookup": "TransactionLookup", + "account-history": "IndexAccountHistory", + "storage-history": "IndexStorageHistory", +} + + +def run(*args, quiet=False): + command = [RETH, *map(str, args)] + print("+", " ".join(command), flush=True) + try: + result = subprocess.run( + command, + env={**os.environ, "RUST_LOG": "off" if quiet else "info,sync=error"}, + capture_output=True, + text=True, + timeout=120, + ) + except subprocess.TimeoutExpired as error: + print((error.stdout or b"").decode(errors="replace"), end="", flush=True) + print( + (error.stderr or b"").decode(errors="replace"), + end="", file=sys.stderr, flush=True, + ) + raise + if not quiet or result.returncode: + print(result.stdout, end="", flush=True) + print(result.stderr, end="", file=sys.stderr, flush=True) + result.check_returncode() + return result.stdout + + +def rpc(ipc, method, params=()): + with socket.socket(socket.AF_UNIX) as connection: + connection.settimeout(2) + connection.connect(str(ipc)) + request = {"jsonrpc": "2.0", "id": 1, "method": method, "params": list(params)} + connection.sendall(json.dumps(request).encode() + b"\n") + with connection.makefile("r") as response: + result = json.loads(response.readline()) + if "error" in result: + raise RuntimeError(f"{method}: {result['error']}") + return result["result"] + + +def smoke_test(root): + source = ["--chain", FIXTURE / "genesis.json", "--datadir", root / "source"] + target = ["--chain", FIXTURE / "genesis.json", "--datadir", root / "target"] + # Both download stages, including tip retrieval, must use only the seeded peer. + network = [ + "--disable-discovery", "--no-persist-peers", "--nat", "none", + "--addr", "127.0.0.1", "--port", "0", + ] + run("import", *source, "--fail-on-invalid-block", FIXTURE / "chain.rlp") + ipc = root / "peer.ipc" + with (root / "peer.log").open("w") as log: + peer = subprocess.Popen( + [RETH, "node", *map(str, source), *network, "--max-outbound-peers", "0", + "--log.file.directory", str(root / "logs"), + "--authrpc.port", "0", "--ipcpath", str(ipc)], + stdout=log, + stderr=subprocess.STDOUT, + env={**os.environ, "RUST_LOG": "info,sync=error"}, + ) + try: + deadline = time.monotonic() + 30 + while True: + if peer.poll() is not None: + raise RuntimeError(f"Fixture peer exited with {peer.returncode}") + try: + info = rpc(ipc, "admin_nodeInfo") + break + except (FileNotFoundError, ConnectionRefusedError, TimeoutError): + if time.monotonic() >= deadline: + raise TimeoutError( + "Fixture peer did not become ready within 30 seconds" + ) + time.sleep(0.1) + + head = rpc(ipc, "eth_getBlockByNumber", [hex(TIP), False]) + forkchoice = json.loads((FIXTURE / "headfcu.json").read_text())["params"][0] + expected_hash = forkchoice["headBlockHash"] + assert head is not None and head["hash"] == expected_hash, head + assert int(rpc(ipc, "eth_blockNumber"), 16) == TIP + + config = root / "target.toml" + config.write_text( + "[peers]\nconnect_trusted_nodes_only = true\n" + f"trusted_nodes = [{json.dumps(info['enode'])}]\n" + ) + # With storage v2, execution writes hashed state directly. Running the no-op + # hashing stages would unwind that state without restoring it. + for stage, checkpoint in STAGES.items(): + # The target is fresh: do not unwind stages that have never executed, + # especially across the fixture's Cancun boundary. + run( + "stage", "run", stage, *target, "--config", config, *network, + "--from", "0", "--to", TIP, "--batch-size", "8", + "--commit", "--checkpoints", "--skip-unwind", + ) + saved = json.loads(run( + "db", *target, "get", "mdbx", "StageCheckpoints", checkpoint, + quiet=True, + )) + assert saved["block_number"] == TIP, (stage, saved) + + # Downloaded canonical headers live in static files, not MDBX. + _, block_hash = run( + "db", *target, "get", "static-file", "headers", TIP, quiet=True, + ).split("\nBlockHash\n") + actual_hash = json.loads(block_hash) + assert actual_hash == expected_hash, actual_hash + print( + f"All {len(STAGES)} stages reached fixture block {TIP} " + f"({expected_hash})." + ) + finally: + if peer.poll() is None: + peer.terminate() + try: + peer.wait(timeout=10) + except subprocess.TimeoutExpired: + peer.kill() + peer.wait(timeout=10) + if sys.exc_info()[0] is not None: + log.flush() + print((root / "peer.log").read_text(), end="", flush=True) + + +if __name__ == "__main__": + with tempfile.TemporaryDirectory(prefix="reth-stage-") as directory: + smoke_test(Path(directory)) diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index 4991029ba80..adb9ce8a541 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -10,8 +10,6 @@ on: env: CARGO_TERM_COLOR: always - FROM_BLOCK: 0 - TO_BLOCK: 50000 RUSTC_WRAPPER: "sccache" # Pin vergen output so reth-node-core compiles identically across commits; otherwise it and # every crate depending on it miss sccache/rust-cache on every run. The installed binary reports a fake SHA. @@ -59,33 +57,5 @@ jobs: - name: Build reth run: | cargo install --locked --path bin/reth - - name: Run headers stage - run: | - reth stage run headers --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints - - name: Run bodies stage - run: | - reth stage run bodies --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints - - name: Run senders stage - run: | - reth stage run senders --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints - - name: Run execution stage - run: | - reth stage run execution --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints - # NOTE: account-hashing, storage-hashing, and hashing stages are omitted. - # With storage v2 (now default), these stages are no-ops because the - # execution stage writes directly to HashedAccounts/HashedStorages. - # Running them here is harmful: `stage run` unwinds before executing, - # and the unwind reverts the hashed state that execution wrote, but - # the no-op execute never restores it — causing merkle to fail. - - name: Run merkle stage - run: | - reth stage run merkle --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints - - name: Run transaction lookup stage - run: | - reth stage run tx-lookup --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints - - name: Run account history stage - run: | - reth stage run account-history --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints - - name: Run storage history stage - run: | - reth stage run storage-history --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run stages against a local fixture peer + run: python3 .github/scripts/stage-test.py From edbcd6ba3fbe637e764c87b75307552a3a80b30c Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Fri, 6 Nov 2026 22:40:22 +0000 Subject: [PATCH 029/100] ci: build macOS release binaries on macos-15 (#28321) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b63705f426..72540d2dba8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,7 +108,7 @@ jobs: rustflags: "" native: true - target: aarch64-apple-darwin - os: macos-14 + os: macos-15 profile: maxperf allow_fail: false rustflags: "" From 44a74f9eaeeddee6b9e0bc874dcde910fbbb0582 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 7 Nov 2026 00:45:49 +0100 Subject: [PATCH 030/100] fix(rpc): reject conflicting transaction fees (#28324) --- .../rpc-eth-api/src/helpers/transaction.rs | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs index f191a7fd9ea..f1f7c336565 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs @@ -16,7 +16,7 @@ use alloy_eip7928::bal::DecodedBal; use alloy_eips::{eip2718::Encodable2718, BlockId}; use alloy_network::{TransactionBuilder, TransactionBuilder4844}; use alloy_primitives::{Address, Bytes, TxHash, B256, U256}; -use alloy_rpc_types_eth::{state::EvmOverrides, TransactionInfo}; +use alloy_rpc_types_eth::{state::EvmOverrides, TransactionInfo, TransactionRequest}; use evm2::evm::Bal as EvmBal; use futures::{Future, StreamExt}; use reth_chain_state::CanonStateSubscriptions; @@ -498,6 +498,8 @@ pub trait EthTransactions: LoadTransaction { /// Signs transaction with a matching signer, if any and submits the transaction to the pool. /// Returns the hash of the signed transaction. + /// + /// Rejects requests that mix legacy and EIP-1559 fee fields. fn send_transaction_request( &self, mut request: RpcTxReq, @@ -506,6 +508,8 @@ pub trait EthTransactions: LoadTransaction { Self: EthApiSpec + EstimateCall + LoadFee, { async move { + ensure_no_conflicting_fee_fields(request.as_ref())?; + let from = match request.as_ref().from() { Some(from) => from, None => return Err(SignError::NoAccount.into_eth_err()), @@ -582,6 +586,8 @@ pub trait EthTransactions: LoadTransaction { } /// Fills the defaults on a given unsigned transaction. + /// + /// Rejects requests that mix legacy and EIP-1559 fee fields. fn fill_transaction( &self, mut request: RpcTxReq, @@ -590,6 +596,8 @@ pub trait EthTransactions: LoadTransaction { Self: EthApiSpec + EstimateCall + LoadFee, { async move { + ensure_no_conflicting_fee_fields(request.as_ref())?; + if request.as_ref().value().is_none() { request.as_mut().set_value(U256::ZERO); } @@ -699,11 +707,15 @@ pub trait EthTransactions: LoadTransaction { /// Signs a transaction request using the given account in request /// Returns the EIP-2718 encoded signed transaction. + /// + /// Rejects requests that mix legacy and EIP-1559 fee fields. fn sign_transaction( &self, request: RpcTxReq, ) -> impl Future> + Send { async move { + ensure_no_conflicting_fee_fields(request.as_ref())?; + let from = match request.as_ref().from() { Some(from) => from, None => return Err(SignError::NoAccount.into_eth_err()), @@ -923,3 +935,11 @@ pub trait LoadTransaction: SpawnBlocking + FullEthApiTypes + RpcNodeCoreExt { } } } + +/// Rejects legacy gas prices combined with EIP-1559 fee fields before transaction construction. +const fn ensure_no_conflicting_fee_fields(request: &TransactionRequest) -> EthResult<()> { + if request.gas_price.is_some() && request.has_eip1559_fields() { + return Err(EthApiError::ConflictingFeeFieldsInRequest) + } + Ok(()) +} From adf5f076ad65812624afcb56018017611a106267 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 7 Nov 2026 02:47:22 +0100 Subject: [PATCH 031/100] fix(cli): reject zero blocks per archive (#28328) --- crates/cli/commands/src/download/manifest.rs | 16 +++++++++++++++- crates/cli/commands/src/download/source.rs | 5 +++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/crates/cli/commands/src/download/manifest.rs b/crates/cli/commands/src/download/manifest.rs index 865fc16ccfe..e446600c4a4 100644 --- a/crates/cli/commands/src/download/manifest.rs +++ b/crates/cli/commands/src/download/manifest.rs @@ -492,6 +492,19 @@ impl SnapshotManifest { } first_block / chunked.blocks_per_file } + + /// Fails if any chunked component declares zero blocks per archive. + pub(crate) fn validate_blocks_per_file(&self) -> Result<()> { + for (key, component) in &self.components { + if let ComponentManifest::Chunked(chunked) = component { + eyre::ensure!( + chunked.blocks_per_file > 0, + "Invalid modular manifest: {key} blocks_per_file must be greater than zero" + ); + } + } + Ok(()) + } } impl ComponentManifest { @@ -615,11 +628,12 @@ impl SingleArchive { } } -/// Fetch a snapshot manifest from a URL. +/// Fetches a snapshot manifest from a URL, rejecting zero blocks per archive. pub async fn fetch_manifest(manifest_url: &str) -> Result { let client = Client::new(); let manifest: SnapshotManifest = client.get(manifest_url).send().await?.error_for_status()?.json().await?; + manifest.validate_blocks_per_file()?; Ok(manifest) } diff --git a/crates/cli/commands/src/download/source.rs b/crates/cli/commands/src/download/source.rs index d462404738f..f0d47654c68 100644 --- a/crates/cli/commands/src/download/source.rs +++ b/crates/cli/commands/src/download/source.rs @@ -135,10 +135,11 @@ pub(crate) fn print_snapshot_listing(entries: &[SnapshotApiEntry], chain_id: u64 ); } -/// Loads a manifest from an HTTP(S) URL, `file://` URL, or local path, and checks that its -/// output file paths stay inside the datadir. +/// Loads a manifest from an HTTP(S) URL, `file://` URL, or local path, rejecting zero +/// `blocks_per_file` and output file paths outside the datadir. pub(crate) async fn fetch_manifest_from_source(source: &str) -> Result { let manifest = read_manifest_source(source).await?; + manifest.validate_blocks_per_file()?; manifest.validate_output_paths()?; Ok(manifest) } From 06ece0d774853f46b0b001d520b21c2d39d790e7 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 7 Nov 2026 14:22:16 +0100 Subject: [PATCH 032/100] fix(ipc): enforce socket permissions (#28326) --- crates/node/core/src/args/rpc_server.rs | 6 +- crates/rpc/ipc/src/server/mod.rs | 202 ++++++++++++++++++------ docs/vocs/docs/pages/cli/reth/node.mdx | 4 +- 3 files changed, 165 insertions(+), 47 deletions(-) diff --git a/crates/node/core/src/args/rpc_server.rs b/crates/node/core/src/args/rpc_server.rs index ba797527652..ba2a3f9d669 100644 --- a/crates/node/core/src/args/rpc_server.rs +++ b/crates/node/core/src/args/rpc_server.rs @@ -531,7 +531,11 @@ pub struct RpcServerArgs { /// Set the permissions for the IPC socket file, in octal format. /// - /// If not specified, the permissions will be set by the system's umask. + /// Accepts modes up to `0o7777`, with an optional `0o` prefix. If not specified, the + /// permissions will be set by the system's umask. + /// + /// Startup fails if the mode is invalid or the platform cannot apply it before binding the + /// socket, which includes macOS. #[arg(long = "ipc.permissions", default_value = Resettable::from(DefaultRpcServerArgs::get_global().ipc_socket_permissions.as_ref().map(|v| v.to_string().into())))] pub ipc_socket_permissions: Option, diff --git a/crates/rpc/ipc/src/server/mod.rs b/crates/rpc/ipc/src/server/mod.rs index c102ddc94dc..ec4d342c233 100644 --- a/crates/rpc/ipc/src/server/mod.rs +++ b/crates/rpc/ipc/src/server/mod.rs @@ -31,7 +31,7 @@ use tokio::{ sync::oneshot, }; use tower::{layer::util::Identity, Layer, Service}; -use tracing::{debug, instrument, trace, warn, Instrument}; +use tracing::{instrument, trace, warn, Instrument}; // re-export so can be used during builder setup use crate::{ server::{connection::IpcConnDriver, rpc_service::RpcServiceCfg}, @@ -42,6 +42,11 @@ use tokio_stream::wrappers::ReceiverStream; use tokio_util::task::AbortOnDropHandle; use tower::layer::{util::Stack, LayerFn}; +#[cfg(unix)] +use interprocess::os::unix::local_socket::ListenerOptionsExt; +#[cfg(unix)] +use std::os::unix::fs::PermissionsExt; + mod connection; mod ipc; mod rpc_service; @@ -86,6 +91,9 @@ where /// This will run on the tokio runtime until the server is stopped or the `ServerHandle` is /// dropped. /// + /// Returns an error if the endpoint cannot be opened or the requested Unix socket permissions + /// cannot be parsed or applied before serving requests. + /// /// ``` /// use jsonrpsee::RpcModule; /// use reth_ipc::server::Builder; @@ -130,40 +138,66 @@ where ) { trace!(endpoint = ?self.endpoint, "starting ipc server"); - if cfg!(unix) { - // ensure the file does not exist - if std::fs::remove_file(&self.endpoint).is_ok() { - debug!(endpoint = ?self.endpoint, "removed existing IPC endpoint file"); - } - } + let listener = + match self.endpoint.as_str().to_fs_name::().and_then(|name| { + // Unlinks an existing endpoint only after binding to it fails, so earlier errors + // such as an unsupported mode leave it in place. + let options = ListenerOptions::new().name(name).try_overwrite(true); - let listener = match self - .endpoint - .as_str() - .to_fs_name::() - .and_then(|name| ListenerOptions::new().name(name).create_tokio()) - { - Ok(listener) => { #[cfg(unix)] - { - // set permissions only on unix - use std::os::unix::fs::PermissionsExt; - if let Some(perms_str) = &self.cfg.ipc_socket_permissions && - let Ok(mode) = u32::from_str_radix(&perms_str.replace("0o", ""), 8) - { - let perms = std::fs::Permissions::from_mode(mode); - let _ = std::fs::set_permissions(&self.endpoint, perms); - } + let mode = self + .cfg + .ipc_socket_permissions + .as_deref() + .map(|permissions| { + let mode = u32::from_str_radix( + permissions.strip_prefix("0o").unwrap_or(permissions), + 8, + ) + .map_err(|err| io::Error::new(io::ErrorKind::InvalidInput, err))?; + if mode > 0o7777 { + return Err(io::Error::new( + io::ErrorKind::InvalidInput, + format!("IPC socket permissions `{permissions}` exceed 0o7777"), + )); + } + Ok(mode) + }) + .transpose()?; + + #[cfg(unix)] + let options = if let Some(mode) = mode { + // Set the mode before bind/listen so connections cannot bypass it during + // startup. The range check keeps the cast lossless where `mode_t` is `u16`. + options.mode(mode as _) + } else { + options + }; + + let listener = options.create_tokio()?; + + #[cfg(unix)] + if let Some(mode) = mode { + // Binding can further restrict the requested mode through the process umask. + std::fs::set_permissions( + &self.endpoint, + std::fs::Permissions::from_mode(mode), + )?; } - listener - } - Err(err) => { - on_ready - .send(Err(IpcServerStartError { endpoint: self.endpoint.clone(), source: err })) - .ok(); - return; - } - }; + + Ok(listener) + }) { + Ok(listener) => listener, + Err(err) => { + on_ready + .send(Err(IpcServerStartError { + endpoint: self.endpoint.clone(), + source: err, + })) + .ok(); + return; + } + }; // signal that we're ready to accept connections on_ready.send(Ok(())).ok(); @@ -676,6 +710,11 @@ impl Builder { } /// Sets the permissions for the IPC socket file. + /// + /// On Unix, accepts an octal mode up to `0o7777` with an optional `0o` prefix. Invalid modes or + /// failures to apply them cause [`IpcServer::start`] to return an error. This includes + /// platforms that do not support setting socket permissions before binding. `None` uses the + /// system's umask. Ignored on non-Unix platforms. pub fn set_ipc_socket_permissions(mut self, permissions: Option) -> Self { self.settings.ipc_socket_permissions = permissions; self @@ -797,22 +836,40 @@ mod tests { use tokio::sync::broadcast; use tokio_stream::wrappers::BroadcastStream; + #[cfg(unix)] + use std::{os::unix::net::UnixListener, path::Path, time::Duration}; + #[tokio::test] #[cfg(unix)] async fn test_ipc_socket_permissions() { - use std::os::unix::fs::PermissionsExt; - let endpoint = &dummy_name(); - let perms = "0777"; - let server = Builder::default() - .set_ipc_socket_permissions(Some(perms.to_string())) - .build(endpoint.clone()); - let module = RpcModule::new(()); - let handle = server.start(module).await.unwrap(); - tokio::spawn(handle.stopped()); - - let meta = std::fs::metadata(endpoint).unwrap(); - let perms = meta.permissions(); - assert_eq!(perms.mode() & 0o777, 0o777); + for (permissions, mode) in + [("0777", 0o777), ("600", 0o600), ("0600", 0o600), ("0o600", 0o600)] + { + let endpoint = dummy_name(); + let server = Builder::default() + .set_ipc_socket_permissions(Some(permissions.to_string())) + .build(endpoint.clone()); + match server.start(RpcModule::new(())).await { + Ok(handle) if !cfg!(target_os = "macos") => { + let actual = std::fs::metadata(&endpoint).unwrap().permissions().mode(); + assert_eq!(actual & 0o777, mode); + handle.stop().unwrap(); + tokio::time::timeout(Duration::from_secs(5), handle.stopped()).await.unwrap(); + } + Err(error) + if !cfg!(any( + target_os = "linux", + target_os = "android", + target_os = "openbsd" + )) => + { + assert_eq!(error.source.kind(), io::ErrorKind::Unsupported, "{mode:o}"); + assert_eq!(error.endpoint, endpoint); + assert!(!Path::new(&endpoint).exists()); + } + result => panic!("Unexpected IPC startup result: {result:?}"), + } + } } async fn pipe_from_stream_with_bounded_buffer( @@ -1215,4 +1272,59 @@ mod tests { assert_eq!(say_hello_response, goodbye_msg); assert_eq!(say_goodbye_response, hello_msg); } + + #[tokio::test] + #[cfg(unix)] + async fn invalid_ipc_socket_permissions() { + for permissions in + ["not-octal", "", "0o", "888", "0o0o600", "60o00", "100000000000", "10000"] + { + let endpoint = dummy_name(); + let server = Builder::default() + .set_ipc_socket_permissions(Some(permissions.to_string())) + .build(endpoint.clone()); + + let error = server.start(RpcModule::new(())).await.unwrap_err(); + assert_eq!(error.source.kind(), io::ErrorKind::InvalidInput, "{permissions}"); + assert_eq!(error.endpoint, endpoint); + assert!(!Path::new(&endpoint).exists()); + } + } + + #[tokio::test] + #[cfg(unix)] + async fn invalid_ipc_permissions_preserve_existing_endpoint() { + for (permissions, kind) in [ + ("not-octal", io::ErrorKind::InvalidInput), + #[cfg(target_os = "macos")] + ("0600", io::ErrorKind::Unsupported), + ] { + let endpoint = dummy_name(); + let _listener = ListenerOptions::new() + .name(endpoint.as_str().to_fs_name::().unwrap()) + .create_tokio() + .unwrap(); + let server = Builder::default() + .set_ipc_socket_permissions(Some(permissions.to_string())) + .build(endpoint.clone()); + + let error = server.start(RpcModule::new(())).await.unwrap_err(); + assert_eq!(error.source.kind(), kind, "{permissions}"); + assert_eq!(error.endpoint, endpoint); + assert!(Path::new(&endpoint).exists()); + } + } + + #[tokio::test] + #[cfg(unix)] + async fn replaces_stale_ipc_endpoint() { + let endpoint = dummy_name(); + drop(UnixListener::bind(&endpoint).unwrap()); + assert!(Path::new(&endpoint).exists()); + + let handle = + Builder::default().build(endpoint.clone()).start(RpcModule::new(())).await.unwrap(); + handle.stop().unwrap(); + tokio::time::timeout(Duration::from_secs(5), handle.stopped()).await.unwrap(); + } } diff --git a/docs/vocs/docs/pages/cli/reth/node.mdx b/docs/vocs/docs/pages/cli/reth/node.mdx index 654fdcdb79c..b1b0038cfea 100644 --- a/docs/vocs/docs/pages/cli/reth/node.mdx +++ b/docs/vocs/docs/pages/cli/reth/node.mdx @@ -393,7 +393,9 @@ RPC: --ipc.permissions Set the permissions for the IPC socket file, in octal format. - If not specified, the permissions will be set by the system's umask. + Accepts modes up to `0o7777`, with an optional `0o` prefix. If not specified, the permissions will be set by the system's umask. + + Startup fails if the mode is invalid or the platform cannot apply it before binding the socket, which includes macOS. --authrpc.addr Auth server address to listen on From d40c2cdd98900a67c903f3dc1a09c95d5710241c Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 7 Nov 2026 14:22:31 +0100 Subject: [PATCH 033/100] fix(rpc): respect namespace selection defaults (#28327) --- crates/node/core/src/args/rpc_server.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/node/core/src/args/rpc_server.rs b/crates/node/core/src/args/rpc_server.rs index ba2a3f9d669..a6dda0458f0 100644 --- a/crates/node/core/src/args/rpc_server.rs +++ b/crates/node/core/src/args/rpc_server.rs @@ -930,14 +930,15 @@ impl RpcServerArgs { /// Returns `true` if the given RPC namespace is enabled on any transport. pub fn is_namespace_enabled(&self, ns: RethRpcModule) -> bool { - if self.http && self.http_api.as_ref().is_some_and(|api| api.contains(&ns)) { + if self.http && + self.http_api.as_ref().unwrap_or(&RpcModuleSelection::Standard).contains(&ns) + { return true; } - if self.ws && self.ws_api.as_ref().is_some_and(|api| api.contains(&ns)) { + if self.ws && self.ws_api.as_ref().unwrap_or(&RpcModuleSelection::Standard).contains(&ns) { return true; } - // IPC exposes all modules when enabled - !self.ipcdisable + !self.ipcdisable && RpcModuleSelection::default_ipc_modules().contains(&ns) } /// Enables forced blob sidecar upcasting from EIP-4844 to EIP-7594 format. From ed3229edf72f16f7cecea7e6921da9c0ddbe9a54 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Sat, 7 Nov 2026 14:05:22 +0000 Subject: [PATCH 034/100] chore: upgrade dependencies (#28329) --- docs/vocs/bun.lock | 758 +++++++++---------- docs/vocs/package.json | 14 +- docs/vocs/scripts/fix-rustdocs-navigation.ts | 18 +- scripts/bench-reth-charts/pyproject.toml | 4 +- scripts/bench-reth-charts/uv.lock | 441 +++-------- 5 files changed, 459 insertions(+), 776 deletions(-) diff --git a/docs/vocs/bun.lock b/docs/vocs/bun.lock index 88fd4f0762b..6738f9ff630 100644 --- a/docs/vocs/bun.lock +++ b/docs/vocs/bun.lock @@ -1,88 +1,90 @@ { - "lockfileVersion": 1, - "configVersion": 0, + "lockfileVersion": 2, + "configVersion": 1, "workspaces": { "": { "name": "vocs", "dependencies": { "mermaid": "^11", - "react": "19.2.4", - "react-dom": "19.2.4", - "react-server-dom-webpack": "19.2.4", - "vocs": "^2.0.11", - "waku": "1.0.0-beta.0", + "react": "19.2.9", + "react-dom": "19.2.9", + "react-server-dom-webpack": "19.2.9", + "vocs": "2.0.11", + "waku": "1.0.0-beta.1", }, "devDependencies": { "@types/node": "^24.12.2", "@types/react": "^19.2.14", - "glob": "^11.1.0", + "glob": "^14.0.2", "typescript": "^5.9.3", - "vite": "^8.0.16", + "vite": "^8.1.6", }, }, }, "packages": { - "@antfu/install-pkg": ["@antfu/install-pkg@1.1.0", "", { "dependencies": { "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" } }, "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ=="], + "@antfu/install-pkg": ["@antfu/install-pkg@2.1.0", "", { "dependencies": { "package-manager-detector": "^1.8.0", "tinyexec": "^1.3.1" } }, "sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw=="], - "@babel/code-frame": ["@babel/code-frame@7.29.0", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw=="], + "@babel/code-frame": ["@babel/code-frame@7.29.7", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw=="], - "@babel/compat-data": ["@babel/compat-data@7.29.0", "", {}, "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg=="], + "@babel/compat-data": ["@babel/compat-data@7.29.7", "", {}, "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg=="], - "@babel/core": ["@babel/core@7.29.0", "", { "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", "@babel/helper-compilation-targets": "^7.28.6", "@babel/helper-module-transforms": "^7.28.6", "@babel/helpers": "^7.28.6", "@babel/parser": "^7.29.0", "@babel/template": "^7.28.6", "@babel/traverse": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA=="], + "@babel/core": ["@babel/core@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.7", "@babel/helper-compilation-targets": "^7.29.7", "@babel/helper-module-transforms": "^7.29.7", "@babel/helpers": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/template": "^7.29.7", "@babel/traverse": "^7.29.7", "@babel/types": "^7.29.7", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA=="], - "@babel/generator": ["@babel/generator@7.29.1", "", { "dependencies": { "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw=="], + "@babel/generator": ["@babel/generator@7.29.12", "", { "dependencies": { "@babel/parser": "^7.29.12", "@babel/types": "^7.29.11", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-2W76mhjrpQFO1lK5e8IvGYB2D0YZ7S2R1Z2BjO2ZUYuW+amcpK/z60U6ZZmzskwoa7sJ6XohP/Wg8H5KxXI/IA=="], - "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.28.6", "", { "dependencies": { "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA=="], + "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.29.7", "", { "dependencies": { "@babel/compat-data": "^7.29.7", "@babel/helper-validator-option": "^7.29.7", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g=="], - "@babel/helper-globals": ["@babel/helper-globals@7.28.0", "", {}, "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw=="], + "@babel/helper-globals": ["@babel/helper-globals@7.29.7", "", {}, "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA=="], - "@babel/helper-module-imports": ["@babel/helper-module-imports@7.28.6", "", { "dependencies": { "@babel/traverse": "^7.28.6", "@babel/types": "^7.28.6" } }, "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw=="], + "@babel/helper-module-imports": ["@babel/helper-module-imports@7.29.7", "", { "dependencies": { "@babel/traverse": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g=="], - "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.28.6", "", { "dependencies": { "@babel/helper-module-imports": "^7.28.6", "@babel/helper-validator-identifier": "^7.28.5", "@babel/traverse": "^7.28.6" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA=="], + "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.29.7", "", { "dependencies": { "@babel/helper-module-imports": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7", "@babel/traverse": "^7.29.7" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg=="], - "@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="], + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.11", "", {}, "sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g=="], - "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], - "@babel/helper-validator-option": ["@babel/helper-validator-option@7.27.1", "", {}, "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg=="], + "@babel/helper-validator-option": ["@babel/helper-validator-option@7.29.7", "", {}, "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw=="], - "@babel/helpers": ["@babel/helpers@7.29.2", "", { "dependencies": { "@babel/template": "^7.28.6", "@babel/types": "^7.29.0" } }, "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw=="], + "@babel/helpers": ["@babel/helpers@7.29.10", "", { "dependencies": { "@babel/template": "^7.29.7", "@babel/types": "^7.29.8" } }, "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg=="], - "@babel/parser": ["@babel/parser@7.29.2", "", { "dependencies": { "@babel/types": "^7.29.0" }, "bin": "./bin/babel-parser.js" }, "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA=="], + "@babel/parser": ["@babel/parser@7.29.12", "", { "dependencies": { "@babel/types": "^7.29.11" }, "bin": "./bin/babel-parser.js" }, "sha512-WJ7JBp/Q4+z/ImydtI7jS6NVco5++632ExBemSX+Ysb+G1lCwQ5BVo3SY+jGGOcZXI4ZccbZSUSJLNBW6eEpJg=="], - "@babel/runtime": ["@babel/runtime@7.29.7", "", {}, "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw=="], + "@babel/runtime": ["@babel/runtime@8.0.10", "", {}, "sha512-0QyWQOIhl2onOgg96BuOYV+oCgLINVDPC8RkVPCiQhLILVqpefDUmcY+aAsW6vp7fcuTZL6SXXlFrSDCTFIu1w=="], - "@babel/template": ["@babel/template@7.28.6", "", { "dependencies": { "@babel/code-frame": "^7.28.6", "@babel/parser": "^7.28.6", "@babel/types": "^7.28.6" } }, "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ=="], + "@babel/template": ["@babel/template@7.29.7", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/parser": "^7.29.7", "@babel/types": "^7.29.7" } }, "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg=="], - "@babel/traverse": ["@babel/traverse@7.29.0", "", { "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.29.0", "@babel/template": "^7.28.6", "@babel/types": "^7.29.0", "debug": "^4.3.1" } }, "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA=="], + "@babel/traverse": ["@babel/traverse@7.29.12", "", { "dependencies": { "@babel/code-frame": "^7.29.7", "@babel/generator": "^7.29.12", "@babel/helper-globals": "^7.29.7", "@babel/parser": "^7.29.12", "@babel/template": "^7.29.7", "@babel/types": "^7.29.11", "debug": "^4.3.1" } }, "sha512-MscXe/NAZcOkYEsRajHZFt3ynsb22PUi6CTrp5U7+RYycR9By84mn9mFN54YgfITiqK4hFx3Ju3tZSyzfpS5ew=="], - "@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], + "@babel/types": ["@babel/types@7.29.11", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.11", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ=="], - "@base-ui/react": ["@base-ui/react@1.5.0", "", { "dependencies": { "@babel/runtime": "^7.29.2", "@base-ui/utils": "0.2.9", "@floating-ui/react-dom": "^2.1.8", "@floating-ui/utils": "^0.2.11", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@date-fns/tz": "^1.2.0", "@types/react": "^17 || ^18 || ^19", "date-fns": "^4.0.0", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@date-fns/tz", "@types/react", "date-fns"] }, "sha512-z1gSAlced1yY+iM+mHDEtIkD8UI3Ebs52MuBPxvV6f5hRutk+xvCH/wuB7hDqDzK9JG5FoMz5nhrqtSs1wjt1A=="], + "@base-ui/react": ["@base-ui/react@1.9.0", "", { "dependencies": { "@babel/runtime": "^7.29.7 || ^8.0.0", "@base-ui/utils": "0.5.0", "@floating-ui/react-dom": "^2.1.9", "@floating-ui/utils": "^0.2.12", "use-sync-external-store": "^1.7.0" }, "peerDependencies": { "@date-fns/tz": "^1.2.0", "@types/react": "^17 || ^18 || ^19", "date-fns": "^4.0.0", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@date-fns/tz", "@types/react", "date-fns"] }, "sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ=="], - "@base-ui/utils": ["@base-ui/utils@0.2.9", "", { "dependencies": { "@babel/runtime": "^7.29.2", "@floating-ui/utils": "^0.2.11", "reselect": "^5.1.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-x/PDDCYzoqPpjrdyb3VcyylTI2IjUXEtYDGi5foh7KsnmNJIIaVwA2GLgDH1dps1GgXiJbA60hM+AyuTfQzIvw=="], + "@base-ui/utils": ["@base-ui/utils@0.5.0", "", { "dependencies": { "@babel/runtime": "^7.29.7 || ^8.0.0", "@floating-ui/utils": "^0.2.12", "reselect": "^5.3.0", "use-sync-external-store": "^1.7.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A=="], "@braintree/sanitize-url": ["@braintree/sanitize-url@7.1.2", "", {}, "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA=="], "@chevrotain/types": ["@chevrotain/types@11.1.2", "", {}, "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw=="], - "@codemirror/autocomplete": ["@codemirror/autocomplete@6.20.3", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0" } }, "sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g=="], + "@codemirror/autocomplete": ["@codemirror/autocomplete@6.20.4", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0" } }, "sha512-yF8RhOf2SXlg00+qtupzLhrglcas61boqaONiNcbPIebHCpJocpqTBA6dyrtUrQO47hqyTdeob/3XnYilT7TaQ=="], - "@codemirror/commands": ["@codemirror/commands@6.10.3", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.6.0", "@codemirror/view": "^6.27.0", "@lezer/common": "^1.1.0" } }, "sha512-JFRiqhKu+bvSkDLI+rUhJwSxQxYb759W5GBezE8Uc8mHLqC9aV/9aTC7yJSqCtB3F00pylrLCwnyS91Ap5ej4Q=="], + "@codemirror/commands": ["@codemirror/commands@6.11.1", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.7.0", "@codemirror/view": "^6.27.0", "@lezer/common": "^1.1.0" } }, "sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg=="], "@codemirror/lang-css": ["@codemirror/lang-css@6.3.1", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@lezer/common": "^1.0.2", "@lezer/css": "^1.1.7" } }, "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg=="], - "@codemirror/lang-html": ["@codemirror/lang-html@6.4.11", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/lang-css": "^6.0.0", "@codemirror/lang-javascript": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/css": "^1.1.0", "@lezer/html": "^1.3.12" } }, "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw=="], + "@codemirror/lang-html": ["@codemirror/lang-html@6.4.12", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/lang-css": "^6.0.0", "@codemirror/lang-javascript": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/css": "^1.1.0", "@lezer/html": "^1.3.12" } }, "sha512-pw2ReWKUqSkbvh76RAT4NYxiogRu+PWkR2ukAwO9uOgrm8uipkzjtKKtNpyeAQwHOqxEeSvAXZ6vr3AfyB9y/w=="], "@codemirror/lang-javascript": ["@codemirror/lang-javascript@6.2.5", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.6.0", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/javascript": "^1.0.0" } }, "sha512-zD4e5mS+50htS7F+TYjBPsiIFGanfVqg4HyUz6WNFikgOPf2BgKlx+TQedI1w6n/IqRBVBbBWmGFdLB/7uxO4A=="], - "@codemirror/language": ["@codemirror/language@6.12.3", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.23.0", "@lezer/common": "^1.5.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0", "style-mod": "^4.0.0" } }, "sha512-QwCZW6Tt1siP37Jet9Tb02Zs81TQt6qQrZR2H+eGMcFsL1zMrk2/b9CLC7/9ieP1fjIUMgviLWMmgiHoJrj+ZA=="], + "@codemirror/language": ["@codemirror/language@6.13.1", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/streamparser": "^6.0.0", "@codemirror/view": "^6.23.0", "@lezer/common": "^1.5.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0", "style-mod": "^4.0.0" } }, "sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw=="], - "@codemirror/lint": ["@codemirror/lint@6.9.6", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.42.0", "crelt": "^1.0.5" } }, "sha512-6Kp7r6XfCi/D/5sdXieMfg9pJU1bUEx96WITuLU6ESaKizCz0QHFMjY/TaFSbigDdEAIgi93itLBIUETP4oK+A=="], + "@codemirror/lint": ["@codemirror/lint@6.9.7", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.42.0", "crelt": "^1.0.5" } }, "sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg=="], - "@codemirror/state": ["@codemirror/state@6.6.0", "", { "dependencies": { "@marijn/find-cluster-break": "^1.0.0" } }, "sha512-4nbvra5R5EtiCzr9BTHiTLc+MLXK2QGiAVYMyi8PkQd3SR+6ixar/Q/01Fa21TBIDOZXgeWV4WppsQolSreAPQ=="], + "@codemirror/state": ["@codemirror/state@6.7.6", "", { "dependencies": { "@marijn/find-cluster-break": "^1.0.0" } }, "sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w=="], - "@codemirror/view": ["@codemirror/view@6.43.0", "", { "dependencies": { "@codemirror/state": "^6.6.0", "crelt": "^1.0.6", "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, "sha512-V7ZCLQO3Jus9hzh2jVCCPW3mO4IBMr43O37PqSUYautJSnnJF41YlgLw21x0fLJTYvJ+Vkm6Gp+qKGH9pltgXA=="], + "@codemirror/streamparser": ["@codemirror/streamparser@6.0.0", "", {}, "sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w=="], + + "@codemirror/view": ["@codemirror/view@6.43.15", "", { "dependencies": { "@codemirror/state": "^6.7.0", "crelt": "^1.0.6", "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, "sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw=="], "@codesandbox/nodebox": ["@codesandbox/nodebox@0.1.8", "", { "dependencies": { "outvariant": "^1.4.0", "strict-event-emitter": "^0.4.3" } }, "sha512-2VRS6JDSk+M+pg56GA6CryyUSGPjBEe8Pnae0QL3jJF1mJZJVMDKr93gJRtBbLkfZN6LD/DwMtf+2L0bpWrjqg=="], @@ -90,87 +92,81 @@ "@codesandbox/sandpack-react": ["@codesandbox/sandpack-react@2.20.0", "", { "dependencies": { "@codemirror/autocomplete": "^6.4.0", "@codemirror/commands": "^6.1.3", "@codemirror/lang-css": "^6.0.1", "@codemirror/lang-html": "^6.4.0", "@codemirror/lang-javascript": "^6.1.2", "@codemirror/language": "^6.3.2", "@codemirror/state": "^6.2.0", "@codemirror/view": "^6.7.1", "@codesandbox/sandpack-client": "^2.19.8", "@lezer/highlight": "^1.1.3", "@react-hook/intersection-observer": "^3.1.1", "@stitches/core": "^1.2.6", "anser": "^2.1.1", "clean-set": "^1.1.2", "dequal": "^2.0.2", "escape-carriage": "^1.3.1", "lz-string": "^1.4.4", "react-devtools-inline": "4.4.0", "react-is": "^17.0.2" }, "peerDependencies": { "react": "^16.8.0 || ^17 || ^18 || ^19", "react-dom": "^16.8.0 || ^17 || ^18 || ^19" } }, "sha512-takd1YpW/PMQ6KPQfvseWLHWklJovGY8QYj8MtWnskGKbjOGJ6uZfyZbcJ6aCFLQMpNyjTqz9AKNbvhCOZ1TUQ=="], - "@emnapi/core": ["@emnapi/core@1.10.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw=="], - - "@emnapi/runtime": ["@emnapi/runtime@1.10.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA=="], - - "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ=="], - "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.0", "", { "os": "aix", "cpu": "ppc64" }, "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA=="], + "@esbuild/android-arm": ["@esbuild/android-arm@0.28.2", "", { "os": "android", "cpu": "arm" }, "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg=="], - "@esbuild/android-arm": ["@esbuild/android-arm@0.28.0", "", { "os": "android", "cpu": "arm" }, "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ=="], + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.2", "", { "os": "android", "cpu": "arm64" }, "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A=="], - "@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.0", "", { "os": "android", "cpu": "arm64" }, "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw=="], + "@esbuild/android-x64": ["@esbuild/android-x64@0.28.2", "", { "os": "android", "cpu": "x64" }, "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q=="], - "@esbuild/android-x64": ["@esbuild/android-x64@0.28.0", "", { "os": "android", "cpu": "x64" }, "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA=="], + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw=="], - "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q=="], + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw=="], - "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ=="], + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw=="], - "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q=="], + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg=="], - "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw=="], + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.2", "", { "os": "linux", "cpu": "arm" }, "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w=="], - "@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.0", "", { "os": "linux", "cpu": "arm" }, "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw=="], + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug=="], - "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A=="], + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.2", "", { "os": "linux", "cpu": "ia32" }, "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ=="], - "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.0", "", { "os": "linux", "cpu": "ia32" }, "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ=="], + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ=="], - "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.0", "", { "os": "linux", "cpu": "none" }, "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg=="], + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA=="], - "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.0", "", { "os": "linux", "cpu": "none" }, "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w=="], + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ=="], - "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg=="], + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.2", "", { "os": "linux", "cpu": "none" }, "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA=="], - "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.0", "", { "os": "linux", "cpu": "none" }, "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ=="], + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg=="], - "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q=="], + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.2", "", { "os": "linux", "cpu": "x64" }, "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ=="], - "@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.0", "", { "os": "linux", "cpu": "x64" }, "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ=="], + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw=="], - "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.0", "", { "os": "none", "cpu": "arm64" }, "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw=="], + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.2", "", { "os": "none", "cpu": "x64" }, "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw=="], - "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.0", "", { "os": "none", "cpu": "x64" }, "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw=="], + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ=="], - "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.0", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g=="], + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw=="], - "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.0", "", { "os": "openbsd", "cpu": "x64" }, "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA=="], + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.2", "", { "os": "none", "cpu": "arm64" }, "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q=="], - "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.0", "", { "os": "none", "cpu": "arm64" }, "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w=="], + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g=="], - "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.0", "", { "os": "sunos", "cpu": "x64" }, "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw=="], + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ=="], - "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA=="], + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA=="], - "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA=="], + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.2", "", { "os": "win32", "cpu": "x64" }, "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g=="], - "@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.0", "", { "os": "win32", "cpu": "x64" }, "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw=="], + "@floating-ui/core": ["@floating-ui/core@1.8.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="], - "@floating-ui/core": ["@floating-ui/core@1.7.5", "", { "dependencies": { "@floating-ui/utils": "^0.2.11" } }, "sha512-1Ih4WTWyw0+lKyFMcBHGbb5U5FtuHJuujoyyr5zTaWS5EYMeT6Jb2AuDeftsCsEuchO+mM2ij5+q9crhydzLhQ=="], + "@floating-ui/dom": ["@floating-ui/dom@1.8.0", "", { "dependencies": { "@floating-ui/core": "^1.8.0", "@floating-ui/utils": "^0.2.12" } }, "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg=="], - "@floating-ui/dom": ["@floating-ui/dom@1.7.6", "", { "dependencies": { "@floating-ui/core": "^1.7.5", "@floating-ui/utils": "^0.2.11" } }, "sha512-9gZSAI5XM36880PPMm//9dfiEngYoC6Am2izES1FF406YFsjvyBMmeJ2g4SAju3xWwtuynNRFL2s9hgxpLI5SQ=="], + "@floating-ui/react-dom": ["@floating-ui/react-dom@2.1.9", "", { "dependencies": { "@floating-ui/dom": "^1.8.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-JDjEFGCpImxDCA7JJKviA0M9+RtmJdj0m/NVU5IMgBK+AmZouAQQ7/+2GLH0GXXY0YMw9oXPB8hKdbPYg5QLYg=="], - "@floating-ui/react-dom": ["@floating-ui/react-dom@2.1.8", "", { "dependencies": { "@floating-ui/dom": "^1.7.6" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-cC52bHwM/n/CxS87FH0yWdngEZrjdtLW/qVruo68qg+prK7ZQ4YGdut2GyDVpoGeAYe/h899rVeOVm6Oi40k2A=="], + "@floating-ui/utils": ["@floating-ui/utils@0.2.12", "", {}, "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww=="], - "@floating-ui/utils": ["@floating-ui/utils@0.2.11", "", {}, "sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg=="], + "@hono/node-server": ["@hono/node-server@2.1.5", "", { "peerDependencies": { "hono": "^4 || ^5.0.0-0" } }, "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q=="], - "@hono/node-server": ["@hono/node-server@2.0.4", "", { "peerDependencies": { "hono": "^4" } }, "sha512-Ut3y0dMMPWy6bZ2kVfx25EOVbZlm15dhF4mOsezMlhpNHy+4MkU1qN9Y6lnruYi4wPmFzimGX2X7LF/FwHli4A=="], + "@iconify-json/lucide": ["@iconify-json/lucide@1.2.149", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-5NG9YdbtRS03hG1A+EIE6nLhhdAYsf0mKu1ZRi6kLMlCG8DxmDsRM6DAhwlNMLiSiQKFbHpKTJ2VddZdwUkUyw=="], - "@iconify-json/lucide": ["@iconify-json/lucide@1.2.111", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-S6oXom2YOKuXFxWofhHa2oq++Z3WeZ78dRFDA7aEEJqyNCJlQd1UGAfN8u2gD2NzvYotmm+j5kH678viWfZbGQ=="], + "@iconify-json/simple-icons": ["@iconify-json/simple-icons@1.2.101", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-MXJkMZDancJ/9I+Bgdthi9kXvn3AwWStxoTHwEPwAFQ9kMLBASO1BSstg52fNtjXeizm1Wi91R+QnWxNGkWHPQ=="], - "@iconify-json/simple-icons": ["@iconify-json/simple-icons@1.2.85", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-Hp5LXvd3LRk+e+1558wtonA7c1Z0/Phmi7xCqpgtb8bs8cuyGnP34GDbt5uhhUXxKlzacnnhAcXgcDxe9bUa1w=="], - - "@iconify-json/vscode-icons": ["@iconify-json/vscode-icons@1.2.54", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-WxGA+FE5AP7mbKuy7lMClIKc/iY9hCKgafZsrCeQjyO2G3MvP/2cZev1W1QPn3tAbXDmVak5K3HB3rxvi+066g=="], + "@iconify-json/vscode-icons": ["@iconify-json/vscode-icons@1.2.94", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-xn64Tfi1b+MYTcL3XSsAv3gWxrBesCnA0I442xJGgoSg76X2GhojXACnZjJu7FaNB5PCxaDVaZmULHKut4VNvw=="], "@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="], - "@iconify/utils": ["@iconify/utils@3.1.3", "", { "dependencies": { "@antfu/install-pkg": "^1.1.0", "@iconify/types": "^2.0.0", "import-meta-resolve": "^4.2.0" } }, "sha512-LPKOXPn/zV+zis1oOfGWogaXVpqUybF3ZS6SCZIsz8vg0ivVp9+fVqyYB7xq0aiST/VhUQYGO1qo6uoYSiEJqw=="], + "@iconify/utils": ["@iconify/utils@3.1.7", "", { "dependencies": { "@antfu/install-pkg": "^2.0.1", "@iconify/types": "^2.0.0", "import-meta-resolve": "^4.2.0" } }, "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w=="], - "@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="], + "@isaacs/nonrecursive-glob-match": ["@isaacs/nonrecursive-glob-match@1.0.3", "", {}, "sha512-SI7kyKHq4XXDRozw+r9GlRZkia1ZkFrpLW98r2IC2Bpr8YkFGE3fvjzmxCG0x78A++69HmDNrDvSMYBZmHGpKA=="], - "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.12", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg=="], + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="], @@ -178,23 +174,23 @@ "@jridgewell/source-map": ["@jridgewell/source-map@0.3.11", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" } }, "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA=="], - "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="], + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.6.0", "", {}, "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw=="], - "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.29", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ=="], + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], - "@lezer/common": ["@lezer/common@1.5.2", "", {}, "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ=="], + "@lezer/common": ["@lezer/common@1.5.5", "", {}, "sha512-Pw7PVCndruF1pb3ebCxpSVpkMHSDjwRCLcTRw+RizUKco5QbWylwq2g4lnG/RYN7yTTQDXE9F77MwtkAyphrjg=="], - "@lezer/css": ["@lezer/css@1.3.3", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.3.0" } }, "sha512-RzBo8r+/6QJeow7aPHIpGVIH59xTcJXp399820gZoMo9noQDRVpJLheIBUicYwKcsbOYoBRoLZlf2720dG/4Tg=="], + "@lezer/css": ["@lezer/css@1.3.9", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.3.0" } }, "sha512-ZmzgvTOBdJWGIsY/ItAfN7UW8DV802oZG+jeG6E508SwEzz5YhuAajptpWPICvIyqYAD2+VjMdOS40GgGkyEOQ=="], - "@lezer/highlight": ["@lezer/highlight@1.2.3", "", { "dependencies": { "@lezer/common": "^1.3.0" } }, "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g=="], + "@lezer/highlight": ["@lezer/highlight@1.2.5", "", { "dependencies": { "@lezer/common": "^1.3.0" } }, "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w=="], "@lezer/html": ["@lezer/html@1.3.13", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg=="], - "@lezer/javascript": ["@lezer/javascript@1.5.4", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.1.3", "@lezer/lr": "^1.3.0" } }, "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA=="], + "@lezer/javascript": ["@lezer/javascript@1.5.6", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.1.3", "@lezer/lr": "^1.3.0" } }, "sha512-sEvOqpl4vJQca0NugSQK02vQPbc5KrvoojnYGoqqFgFO0MtcYhwGiHKVEB+LuXYJnfyXo4QPA8ztbrEa4Fw5NA=="], - "@lezer/lr": ["@lezer/lr@1.4.10", "", { "dependencies": { "@lezer/common": "^1.0.0" } }, "sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A=="], + "@lezer/lr": ["@lezer/lr@1.4.12", "", { "dependencies": { "@lezer/common": "^1.0.0" } }, "sha512-On9HU4oMMiHPMkQDgoTnGahjgG5n/MkN38CgG77sMraKLL+3JBbeQNi1FcCXV9QRqwF9/BUXP3caHyJC1fBOTQ=="], - "@marijn/find-cluster-break": ["@marijn/find-cluster-break@1.0.2", "", {}, "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g=="], + "@marijn/find-cluster-break": ["@marijn/find-cluster-break@1.0.4", "", {}, "sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ=="], "@mdx-js/mdx": ["@mdx-js/mdx@3.1.1", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdx": "^2.0.0", "acorn": "^8.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", "recma-build-jsx": "^1.0.0", "recma-jsx": "^1.0.0", "recma-stringify": "^1.0.0", "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "source-map": "^0.7.0", "unified": "^11.0.0", "unist-util-position-from-estree": "^2.0.0", "unist-util-stringify-position": "^4.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ=="], @@ -202,15 +198,15 @@ "@mdx-js/rollup": ["@mdx-js/rollup@3.1.1", "", { "dependencies": { "@mdx-js/mdx": "^3.0.0", "@rollup/pluginutils": "^5.0.0", "source-map": "^0.7.0", "vfile": "^6.0.0" }, "peerDependencies": { "rollup": ">=2" } }, "sha512-v8satFmBB+DqDzYohnm1u2JOvxx6Hl3pUvqzJvfs2Zk/ngZ1aRUhsWpXvwPkNeGN9c2NCm/38H29ZqXQUjf8dw=="], - "@mermaid-js/parser": ["@mermaid-js/parser@1.1.1", "", { "dependencies": { "@chevrotain/types": "~11.1.1" } }, "sha512-VuHdsYMK1bT6X2JbcAaWAhugTRvRBRyuZgd+c22swUeI9g/ntaxF7CY7dYarhZovofCbUNO0G7JesfmNtjYOCw=="], + "@mermaid-js/parser": ["@mermaid-js/parser@1.2.1", "", { "dependencies": { "@chevrotain/types": "~11.1.2" } }, "sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw=="], - "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.29.0", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ=="], + "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.32.2", "", { "dependencies": { "@hono/node-server": "^1.19.9 || ^2.0.5", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-SWsVtH/0vULSQStoZ6xxH2K09Li8fXYTMC64ZeogCdpZ3XSi1eCPOByV1OpuJxuI3OcmHhosDWYyii07tpPsLw=="], - "@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.4", "", { "dependencies": { "@tybys/wasm-util": "^0.10.1" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" } }, "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow=="], + "@napi-rs/lzma-linux-x64-gnu": ["@napi-rs/lzma-linux-x64-gnu@1.5.1", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ=="], "@open-draft/deferred-promise": ["@open-draft/deferred-promise@2.2.0", "", {}, "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA=="], - "@oxc-project/types": ["@oxc-project/types@0.133.0", "", {}, "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA=="], + "@oxc-project/types": ["@oxc-project/types@0.156.0", "", {}, "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw=="], "@react-hook/intersection-observer": ["@react-hook/intersection-observer@3.1.2", "", { "dependencies": { "@react-hook/passive-layout-effect": "^1.2.0", "intersection-observer": "^0.10.0" }, "peerDependencies": { "react": ">=16.8" } }, "sha512-mWU3BMkmmzyYMSuhO9wu3eJVP21N8TcgYm9bZnTrMwuM818bEk+0NRM3hP+c/TqA9Ln5C7qE53p1H0QMtzYdvQ=="], @@ -218,79 +214,91 @@ "@remix-run/node-fetch-server": ["@remix-run/node-fetch-server@0.13.3", "", {}, "sha512-UfjOXed/DQteaM5VyTfqTeGpHwyL2J5aoRGY6cydip4tt1ehNNeSwuXCC7AEGE0RWBs/7bgKxYkL/B/+UDe4AA=="], - "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.0.3", "", { "os": "android", "cpu": "arm64" }, "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw=="], + "@rolldown/binding-android-arm-eabi": ["@rolldown/binding-android-arm-eabi@1.2.16", "", { "os": "android", "cpu": "arm" }, "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA=="], - "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.0.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA=="], + "@rolldown/binding-android-arm64": ["@rolldown/binding-android-arm64@1.2.16", "", { "os": "android", "cpu": "arm64" }, "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg=="], - "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.0.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg=="], + "@rolldown/binding-darwin-arm64": ["@rolldown/binding-darwin-arm64@1.2.16", "", { "os": "darwin", "cpu": "arm64" }, "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ=="], - "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.0.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g=="], + "@rolldown/binding-darwin-x64": ["@rolldown/binding-darwin-x64@1.2.16", "", { "os": "darwin", "cpu": "x64" }, "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ=="], - "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.0.3", "", { "os": "linux", "cpu": "arm" }, "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw=="], + "@rolldown/binding-freebsd-x64": ["@rolldown/binding-freebsd-x64@1.2.16", "", { "os": "freebsd", "cpu": "x64" }, "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q=="], - "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.0.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw=="], + "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/binding-linux-arm-gnueabihf@1.2.16", "", { "os": "linux", "cpu": "arm" }, "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA=="], - "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.0.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q=="], + "@rolldown/binding-linux-arm64-gnu": ["@rolldown/binding-linux-arm64-gnu@1.2.16", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w=="], - "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.0.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg=="], + "@rolldown/binding-linux-arm64-musl": ["@rolldown/binding-linux-arm64-musl@1.2.16", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg=="], - "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.0.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg=="], + "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/binding-linux-ppc64-gnu@1.2.16", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA=="], - "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.0.3", "", { "os": "linux", "cpu": "x64" }, "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg=="], + "@rolldown/binding-linux-s390x-gnu": ["@rolldown/binding-linux-s390x-gnu@1.2.16", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg=="], - "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.0.3", "", { "os": "linux", "cpu": "x64" }, "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow=="], + "@rolldown/binding-linux-x64-gnu": ["@rolldown/binding-linux-x64-gnu@1.2.16", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w=="], - "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.0.3", "", { "os": "none", "cpu": "arm64" }, "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg=="], + "@rolldown/binding-linux-x64-musl": ["@rolldown/binding-linux-x64-musl@1.2.16", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA=="], - "@rolldown/binding-wasm32-wasi": ["@rolldown/binding-wasm32-wasi@1.0.3", "", { "dependencies": { "@emnapi/core": "1.10.0", "@emnapi/runtime": "1.10.0", "@napi-rs/wasm-runtime": "^1.1.4" }, "cpu": "none" }, "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg=="], + "@rolldown/binding-openharmony-arm64": ["@rolldown/binding-openharmony-arm64@1.2.16", "", { "os": "none", "cpu": "arm64" }, "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ=="], - "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.0.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g=="], + "@rolldown/binding-win32-arm64-msvc": ["@rolldown/binding-win32-arm64-msvc@1.2.16", "", { "os": "win32", "cpu": "arm64" }, "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw=="], - "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.0.3", "", { "os": "win32", "cpu": "x64" }, "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA=="], + "@rolldown/binding-win32-x64-msvc": ["@rolldown/binding-win32-x64-msvc@1.2.16", "", { "os": "win32", "cpu": "x64" }, "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw=="], "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.1", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="], - "@rollup/pluginutils": ["@rollup/pluginutils@5.2.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw=="], + "@rollup/pluginutils": ["@rollup/pluginutils@5.5.1", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-P9ZvnfouRu4MSC+ilERaw6FmZs8zqKhpHxEs4aGDGWQAMzQGXnhvCSvoNwokfNvdt7t3Y5Y4p6gStQgezeIqug=="], + + "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.67.2", "", { "os": "android", "cpu": "arm" }, "sha512-qB7Gzl1QI45zP1zXgqLKzjFmOBGQw2s2MLtdw0eB4xdFGPNE8LhmOnItFgyYJXXNSW8Go9c2ovvXrUUzw5sAMQ=="], + + "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.67.2", "", { "os": "android", "cpu": "arm64" }, "sha512-8+hXNO1J+GsYCGHwyJuBlnhyozivEvIEm/P6NkJeuoVUN+60TDvYYXk38UTm5bKRTLhIpqEQYx4d9CeN6kjh0Q=="], + + "@rollup/rollup-android-x64": ["@rollup/rollup-android-x64@4.67.2", "", { "os": "android", "cpu": "x64" }, "sha512-/uEZY+tcWDE8DXa/rajU3Bwv6IfvQavvzjmbkn39GgQenT+UYtAxfEMdB7VKr74y8aonncm0eQa1EbiNfg+Cjg=="], + + "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.67.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-3tCLEgakEvb5M3/KyYdhPjoteyWYziMTeznoXfcs/31eeFu+Vgs0VNRlb6Zc+YC07/sLa84OwTDF5zHOMFk92Q=="], + + "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.67.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-z31ODzkdkX7OOJCssvpz++hhtkQKWKw2L0eO2HAxFP7RMSXXedzkrTjesqCUxs4XLckRShjNfxsNxjGY5DQCGg=="], - "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.45.1", "", { "os": "android", "cpu": "arm" }, "sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA=="], + "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.67.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-CTvrb0KTAQqcrpcj7rg8FgAI0+jRWnCl+En6exqXDZztCo7vspxlRUX8z9Hp/J/ja2XRnQ1JDbexkBtRyD9jSw=="], - "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.45.1", "", { "os": "android", "cpu": "arm64" }, "sha512-ujQ+sMXJkg4LRJaYreaVx7Z/VMgBBd89wGS4qMrdtfUFZ+TSY5Rs9asgjitLwzeIbhwdEhyj29zhst3L1lKsRQ=="], + "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.67.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-SJdblZpBkbOh1e4JwMM5pJJ2PdVmD3WWbMTXvncMSRLA3DdZuwU+P93RaSChOAXN4Mu53tBoFp1ADPzi3dIVAA=="], - "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.45.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-FSncqHvqTm3lC6Y13xncsdOYfxGSLnP+73k815EfNmpewPs+EyM49haPS105Rh4aF5mJKywk9X0ogzLXZzN9lA=="], + "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.67.2", "", { "os": "linux", "cpu": "arm", "libc": "glibc" }, "sha512-pUBEd7uI9dAu3TpbPcvi9eU2aJslsjIomormeTaQHmzWNhyqNx3mmq+ekC6blGNZu8F3uTHngTibKp7tbblF0A=="], - "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.45.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-2/vVn/husP5XI7Fsf/RlhDaQJ7x9zjvC81anIVbr4b/f0xtSmXQTFcGIQ/B1cXIYM6h2nAhJkdMHTnD7OtQ9Og=="], + "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.67.2", "", { "os": "linux", "cpu": "arm", "libc": "musl" }, "sha512-wW6ARw2Ah0/teOBTgTeSJIpVdPKaxQmEgZ/irkUfr3F9sgimqpApCv/NbQzjm0Nfi5EFilHh1H8kz01uQLaq5Q=="], - "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.45.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-4g1kaDxQItZsrkVTdYQ0bxu4ZIQ32cotoQbmsAnW1jAE4XCMbcBPDirX5fyUzdhVCKgPcrwWuucI8yrVRBw2+g=="], + "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.67.2", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-xcFYMHNL42fRu2MFipvxznr+zd+DRqwL98bhNvDWbMPRcFtMYf34NAz4xVOlnEhzgpNRE5htSemcqAsAxf2eQg=="], - "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.45.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-L/6JsfiL74i3uK1Ti2ZFSNsp5NMiM4/kbbGEcOCps99aZx3g8SJMO1/9Y0n/qKlWZfn6sScf98lEOUe2mBvW9A=="], + "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.67.2", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-U9HrnJ9PFXqA//P/oEGaXBIJraEqzYMS9yuQOdOcPCvHZIC1FFOlnd8ocAaeDDPDpY8xOrhfxMRtr6KqKi3gyg=="], - "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.45.1", "", { "os": "linux", "cpu": "arm" }, "sha512-RkdOTu2jK7brlu+ZwjMIZfdV2sSYHK2qR08FUWcIoqJC2eywHbXr0L8T/pONFwkGukQqERDheaGTeedG+rra6Q=="], + "@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.67.2", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-2hZN8CFGfsbDw+DNtImkPRitpLNjVM2XEbi4ZQ5igLxMFD4gI/P6Zo9czGxuvQXtRyZtZyZp8Kr4ERsAipplBw=="], - "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.45.1", "", { "os": "linux", "cpu": "arm" }, "sha512-3kJ8pgfBt6CIIr1o+HQA7OZ9mp/zDk3ctekGl9qn/pRBgrRgfwiffaUmqioUGN9hv0OHv2gxmvdKOkARCtRb8Q=="], + "@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.67.2", "", { "os": "linux", "cpu": "none", "libc": "musl" }, "sha512-HZO7UfWEsReAnkdVByyQaFsNXJCtvdfun/LFb2Xd4qnhgF1ZfhikpbgqrTRtNMmB5OgNnSwFLiPobOT8oNT9iw=="], - "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.45.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-k3dOKCfIVixWjG7OXTCOmDfJj3vbdhN0QYEqB+OuGArOChek22hn7Uy5A/gTDNAcCy5v2YcXRJ/Qcnm4/ma1xw=="], + "@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.67.2", "", { "os": "linux", "cpu": "ppc64", "libc": "glibc" }, "sha512-AdYIihuLkJ2TScy9BpSPiDex3zOMjkNJLsFlk9NeJ0U3WEtOx4W8z0nOkPEhDS2S4gwsRWBa6ZZexJ9e6OxyzQ=="], - "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.45.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-PmI1vxQetnM58ZmDFl9/Uk2lpBBby6B6rF4muJc65uZbxCs0EA7hhKCk2PKlmZKuyVSHAyIw3+/SiuMLxKxWog=="], + "@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.67.2", "", { "os": "linux", "cpu": "ppc64", "libc": "musl" }, "sha512-iZE0NXcAGqLoCWeHRPkBxJe93JT4Q981z1ZqR+y7qAiIksdRlWhw8hmqHFo1B4ZnU66He31NUb52Iyv+vwMEBQ=="], - "@rollup/rollup-linux-loongarch64-gnu": ["@rollup/rollup-linux-loongarch64-gnu@4.45.1", "", { "os": "linux", "cpu": "none" }, "sha512-9UmI0VzGmNJ28ibHW2GpE2nF0PBQqsyiS4kcJ5vK+wuwGnV5RlqdczVocDSUfGX/Na7/XINRVoUgJyFIgipoRg=="], + "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.67.2", "", { "os": "linux", "cpu": "none", "libc": "glibc" }, "sha512-vC7EAtJpSqSrrbg8huMfgxtwlR8fUsFCe5rStDk1WA8POky/6EEp52dxENMmqLKjSfdM3TT1WWPcZ01hiYZcdw=="], - "@rollup/rollup-linux-powerpc64le-gnu": ["@rollup/rollup-linux-powerpc64le-gnu@4.45.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-7nR2KY8oEOUTD3pBAxIBBbZr0U7U+R9HDTPNy+5nVVHDXI4ikYniH1oxQz9VoB5PbBU1CZuDGHkLJkd3zLMWsg=="], + "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.67.2", "", { "os": "linux", "cpu": "none", "libc": "musl" }, "sha512-DdqG6x72MHpQOlkK/cqrru9b2QMJHLkNojCB3bteB5fmkE/7XEAkReJMANp8wgef8eiEC99SvdP/BH7Ho/BpLA=="], - "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.45.1", "", { "os": "linux", "cpu": "none" }, "sha512-nlcl3jgUultKROfZijKjRQLUu9Ma0PeNv/VFHkZiKbXTBQXhpytS8CIj5/NfBeECZtY2FJQubm6ltIxm/ftxpw=="], + "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.67.2", "", { "os": "linux", "cpu": "s390x", "libc": "glibc" }, "sha512-F10mjdnRmGg9K+LGdqQVeUYFr08f3fVBOh7YNE5p1KIpTzhtKKOLqcQEsqZG6yEM2eouXaMo2AZzeDAcseVTrQ=="], - "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.45.1", "", { "os": "linux", "cpu": "none" }, "sha512-HJV65KLS51rW0VY6rvZkiieiBnurSzpzore1bMKAhunQiECPuxsROvyeaot/tcK3A3aGnI+qTHqisrpSgQrpgA=="], + "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.67.2", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-ChzK9f3iE4N5GInBquiZtzWOqh+CYS5nlLlXGJxeG3d2T9rk8L1Hxg0s+v2Eh6vmAc/1T6IhOVkQU0ORP2eV7g=="], - "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.45.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-NITBOCv3Qqc6hhwFt7jLV78VEO/il4YcBzoMGGNxznLgRQf43VQDae0aAzKiBeEPIxnDrACiMgbqjuihx08OOw=="], + "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.67.2", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-95WwzC+KH9hPHtbgwvwwW6MkKME6vMAdAQLS2diCvoi/iUiYdC0Y1RIPYVESx0iWqkN5ZaZq6qD1BflLcyTMEQ=="], - "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.45.1", "", { "os": "linux", "cpu": "x64" }, "sha512-+E/lYl6qu1zqgPEnTrs4WysQtvc/Sh4fC2nByfFExqgYrqkKWp1tWIbe+ELhixnenSpBbLXNi6vbEEJ8M7fiHw=="], + "@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.67.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-eKbpwlolQmDKd/dbFjvqB1+2qdYQLrgxi3Mtbijp7/3yBBvO9OoHtQ3ecYIaCdW46ijSjy5/yydyrrxHI416/g=="], - "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.45.1", "", { "os": "linux", "cpu": "x64" }, "sha512-a6WIAp89p3kpNoYStITT9RbTbTnqarU7D8N8F2CV+4Cl9fwCOZraLVuVFvlpsW0SbIiYtEnhCZBPLoNdRkjQFw=="], + "@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.67.2", "", { "os": "none", "cpu": "arm64" }, "sha512-is9lnlv6khapl+H9Hjp0gIVsUVtDxQga2nwMHpQbhDXMCMGcNmlel4/q9ihf/3FvvbL4GdGOPOGvWoei2RCggg=="], - "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.45.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-T5Bi/NS3fQiJeYdGvRpTAP5P02kqSOpqiopwhj0uaXB6nzs5JVi2XMJb18JUSKhCOX8+UE1UKQufyD6Or48dJg=="], + "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.67.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-yTq+7YjsgbBcMdlk7Wq+VoJilGQtdtRc4PyTvN7vhO958atCO2nQeIjCF/YANSD/Z/fnrCr27fYsGgC6PFTndQ=="], - "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.45.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-lxV2Pako3ujjuUe9jiU3/s7KSrDfH6IgTSQOnDWr9aJ92YsFd7EurmClK0ly/t8dzMkDtd04g60WX6yl0sGfdw=="], + "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.67.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-nAvZib4Xz1zx8OKhtRuyCsSmCmbfegv1AGbfpG+CowQKxCBW1pLlfYWjcr1+GI3BzRKQbBl7l9640GwWAwOF7g=="], - "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.45.1", "", { "os": "win32", "cpu": "x64" }, "sha512-M/fKi4sasCdM8i0aWJjCSFm2qEnYRR8AMLG2kxp6wD13+tMGA4Z1tVAuHkNRjud5SW2EM3naLuK35w9twvf6aA=="], + "@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.67.2", "", { "os": "win32", "cpu": "x64" }, "sha512-R3CVbEbNa1OXjpldD1tOLarb5rB08xjQiRMpe7PZKtT8eHCZhrV4ClSPfLLbSgRMM1RfLtmAfouBRf14f47lMA=="], + + "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.67.2", "", { "os": "win32", "cpu": "x64" }, "sha512-DeuVFilvaGtoS9TFIbTIQ0Kt4CBqP3xnjJ8SFqWWbXlFbrpmCdivEW7Rm38trRA8rZzQQ8lhs73nEetWotJpTg=="], "@shikijs/core": ["@shikijs/core@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA=="], @@ -310,9 +318,9 @@ "@shikijs/types": ["@shikijs/types@3.23.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ=="], - "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.0.2", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="], + "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.1.0", "", {}, "sha512-cVBuhDQjBZaNMTwBquYfPydrUP+E3hE6oYGasx8h6ZrODIM7/r+gxLDXdd66oszbrggZHEntdE6j+5gYIVyMWQ=="], - "@standard-schema/spec": ["@standard-schema/spec@1.0.0", "", {}, "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA=="], + "@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="], "@stitches/core": ["@stitches/core@1.2.8", "", {}, "sha512-Gfkvwk9o9kE9r9XNBmJRfV8zONvXThnm1tcuojL04Uy5uRyqg93DC83lDebl0rocZCfKSjUv+fWYtMQmEDJldg=="], @@ -340,35 +348,35 @@ "@svgr/plugin-jsx": ["@svgr/plugin-jsx@8.1.0", "", { "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", "@svgr/hast-util-to-babel-ast": "8.0.0", "svg-parser": "^2.0.4" }, "peerDependencies": { "@svgr/core": "*" } }, "sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA=="], - "@tailwindcss/node": ["@tailwindcss/node@4.3.0", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.21.0", "jiti": "^2.6.1", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.3.0" } }, "sha512-aFb4gUhFOgdh9AXo4IzBEOzBkkAxm9VigwDJnMIYv3lcfXCJVesNfbEaBl4BNgVRyid92AmdviqwBUBRKSeY3g=="], + "@tailwindcss/node": ["@tailwindcss/node@4.3.3", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.24.1", "jiti": "^2.7.0", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.3.3" } }, "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg=="], - "@tailwindcss/oxide": ["@tailwindcss/oxide@4.3.0", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.0", "@tailwindcss/oxide-darwin-arm64": "4.3.0", "@tailwindcss/oxide-darwin-x64": "4.3.0", "@tailwindcss/oxide-freebsd-x64": "4.3.0", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.0", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.0", "@tailwindcss/oxide-linux-arm64-musl": "4.3.0", "@tailwindcss/oxide-linux-x64-gnu": "4.3.0", "@tailwindcss/oxide-linux-x64-musl": "4.3.0", "@tailwindcss/oxide-wasm32-wasi": "4.3.0", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.0", "@tailwindcss/oxide-win32-x64-msvc": "4.3.0" } }, "sha512-F7HZGBeN9I0/AuuJS5PwcD8xayx5ri5GhjYUDBEVYUkexyA/giwbDNjRVrxSezE3T250OU2K/wp/ltWx3UOefg=="], + "@tailwindcss/oxide": ["@tailwindcss/oxide@4.3.3", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.3", "@tailwindcss/oxide-darwin-arm64": "4.3.3", "@tailwindcss/oxide-darwin-x64": "4.3.3", "@tailwindcss/oxide-freebsd-x64": "4.3.3", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3", "@tailwindcss/oxide-linux-arm64-musl": "4.3.3", "@tailwindcss/oxide-linux-x64-gnu": "4.3.3", "@tailwindcss/oxide-linux-x64-musl": "4.3.3", "@tailwindcss/oxide-wasm32-wasi": "4.3.3", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3", "@tailwindcss/oxide-win32-x64-msvc": "4.3.3" } }, "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA=="], - "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.3.0", "", { "os": "android", "cpu": "arm64" }, "sha512-TJPiq67tKlLuObP6RkwvVGDoxCMBVtDgKkLfa/uyj7/FyxvQwHS+UOnVrXXgbEsfUaMgiVvC4KbJnRr26ho4Ng=="], + "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.3.3", "", { "os": "android", "cpu": "arm64" }, "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw=="], - "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.3.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-oMN/WZRb+SO37BmUElEgeEWuU8E/HXRkiODxJxLe1UTHVXLrdVSgfaJV7pSlhRGMSOiXLuxTIjfsF3wYvz8cgQ=="], + "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.3.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw=="], - "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.3.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-N6CUmu4a6bKVADfw77p+iw6Yd9Q3OBhe0veaDX+QazfuVYlQsHfDgxBrsjQ/IW+zywL8mTrNd0SdJT/zgtvMdA=="], + "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.3.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw=="], - "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.3.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-zDL5hBkQdH5C6MpqbK3gQAgP80tsMwSI26vjOzjJtNCMUo0lFgOItzHKBIupOZNQxt3ouPH7RPhvNhiTfCe5CQ=="], + "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.3.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw=="], - "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.3.0", "", { "os": "linux", "cpu": "arm" }, "sha512-R06HdNi7A7OEoMsf6d4tjZ71RCWnZQPHj2mnotSFURjNLdBC+cIgXQ7l81CqeoiQftjf6OOblxXMInMgN2VzMA=="], + "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3", "", { "os": "linux", "cpu": "arm" }, "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ=="], - "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.3.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-qTJHELX8jetjhRQHCLilkVLmybpzNQAtaI/gaoVoidn/ufbNDbAo8KlK2J+yPoc8wQxvDxCmh/5lr8nC1+lTbg=="], + "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.3.3", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w=="], - "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.3.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ=="], + "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.3.3", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA=="], - "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.3.0", "", { "os": "linux", "cpu": "x64" }, "sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ=="], + "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.3.3", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w=="], - "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.3.0", "", { "os": "linux", "cpu": "x64" }, "sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg=="], + "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.3.3", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img=="], - "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.3.0", "", { "dependencies": { "@emnapi/core": "^1.10.0", "@emnapi/runtime": "^1.10.0", "@emnapi/wasi-threads": "^1.2.1", "@napi-rs/wasm-runtime": "^1.1.4", "@tybys/wasm-util": "^0.10.1", "tslib": "^2.8.1" }, "cpu": "none" }, "sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA=="], + "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.3.3", "", { "dependencies": { "@emnapi/core": "^1.11.1", "@emnapi/runtime": "^1.11.1", "@emnapi/wasi-threads": "^1.2.2", "@napi-rs/wasm-runtime": "^1.1.4", "@tybys/wasm-util": "^0.10.2", "tslib": "^2.8.1" }, "cpu": "none" }, "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ=="], - "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.3.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Pe+RPVTi1T+qymuuRpcdvwSVZjnll/f7n8gBxMMh3xLTctMDKqpdfGimbMyioqtLhUYZxdJ9wGNhV7MKHvgZsQ=="], + "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.3.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ=="], - "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Mvrf2kXW/yeW/OTezZlCGOirXRcUuLIBx/5Y12BaPM7wJoryG6dfS/NJL8aBPqtTEx/Vm4T4vKzFUcKDT+TKUA=="], + "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.3.3", "", { "os": "win32", "cpu": "x64" }, "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw=="], - "@tailwindcss/vite": ["@tailwindcss/vite@4.3.0", "", { "dependencies": { "@tailwindcss/node": "4.3.0", "@tailwindcss/oxide": "4.3.0", "tailwindcss": "4.3.0" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-t6J3OrB5Fc0ExuhohouH0fWUGMYL6PTLhW+E7zIk/pdbnJARZDCwjBznFnkh5ynRnIRSI4YjtTH0t6USjJISrw=="], + "@tailwindcss/vite": ["@tailwindcss/vite@4.3.3", "", { "dependencies": { "@tailwindcss/node": "4.3.3", "@tailwindcss/oxide": "4.3.3", "tailwindcss": "4.3.3" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7 || ^8" } }, "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw=="], "@takumi-rs/core": ["@takumi-rs/core@0.62.8", "", { "optionalDependencies": { "@takumi-rs/core-darwin-arm64": "0.62.8", "@takumi-rs/core-darwin-x64": "0.62.8", "@takumi-rs/core-linux-arm64-gnu": "0.62.8", "@takumi-rs/core-linux-arm64-musl": "0.62.8", "@takumi-rs/core-linux-x64-gnu": "0.62.8", "@takumi-rs/core-linux-x64-musl": "0.62.8", "@takumi-rs/core-win32-arm64-msvc": "0.62.8", "@takumi-rs/core-win32-x64-msvc": "0.62.8" } }, "sha512-1KNknsY0r9+fhvMD4gijFuJ2qx63JIVII1dZLiz8/YuZ3mFd9IFW90RTeeAdsP83lNCn6nWCrR8W2hLQgjjCCg=="], @@ -376,13 +384,13 @@ "@takumi-rs/core-darwin-x64": ["@takumi-rs/core-darwin-x64@0.62.8", "", { "os": "darwin", "cpu": "x64" }, "sha512-2a9TzXpPkpUUBc3dSU3BZAriBuLTPpVc0LzIvI72sp9qyYAVn5Itry+z1Xl+nt5As/xkFdOJccqQxe7tLLBtpQ=="], - "@takumi-rs/core-linux-arm64-gnu": ["@takumi-rs/core-linux-arm64-gnu@0.62.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-e8Oe1aOFew+1rbu9y5JRaDvLqw4FqGJx1uPLo5mfdYQKWZ3ltdFseRUCCQI3rOXMXKz6uIWRuHd3Qw5sBp+wJg=="], + "@takumi-rs/core-linux-arm64-gnu": ["@takumi-rs/core-linux-arm64-gnu@0.62.8", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-e8Oe1aOFew+1rbu9y5JRaDvLqw4FqGJx1uPLo5mfdYQKWZ3ltdFseRUCCQI3rOXMXKz6uIWRuHd3Qw5sBp+wJg=="], - "@takumi-rs/core-linux-arm64-musl": ["@takumi-rs/core-linux-arm64-musl@0.62.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-qR04H4DQfFsKmkl2kq/fh48zTC3QqBdvHjmHzJUckIktvJPKk1aK+jERIXeARkH6pfQuq+NI5Kbl1t9//qb8nQ=="], + "@takumi-rs/core-linux-arm64-musl": ["@takumi-rs/core-linux-arm64-musl@0.62.8", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-qR04H4DQfFsKmkl2kq/fh48zTC3QqBdvHjmHzJUckIktvJPKk1aK+jERIXeARkH6pfQuq+NI5Kbl1t9//qb8nQ=="], - "@takumi-rs/core-linux-x64-gnu": ["@takumi-rs/core-linux-x64-gnu@0.62.8", "", { "os": "linux", "cpu": "x64" }, "sha512-/LouBAUVqK5/H3pwzOnitRz4JEJNrGJEN/L3TU0375M+uXFewWAl2iSwFqgMt9vCtKPrKa/oK+Iy3pdvFAnX2w=="], + "@takumi-rs/core-linux-x64-gnu": ["@takumi-rs/core-linux-x64-gnu@0.62.8", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-/LouBAUVqK5/H3pwzOnitRz4JEJNrGJEN/L3TU0375M+uXFewWAl2iSwFqgMt9vCtKPrKa/oK+Iy3pdvFAnX2w=="], - "@takumi-rs/core-linux-x64-musl": ["@takumi-rs/core-linux-x64-musl@0.62.8", "", { "os": "linux", "cpu": "x64" }, "sha512-FIt0fpowyh9dse8F29cYBPVhrdc7Zzjz1pEyJunNzIzCIpC0yG3eUwFnK0wsoYoyzbgVZkbLRFRRAFmUORLvDg=="], + "@takumi-rs/core-linux-x64-musl": ["@takumi-rs/core-linux-x64-musl@0.62.8", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-FIt0fpowyh9dse8F29cYBPVhrdc7Zzjz1pEyJunNzIzCIpC0yG3eUwFnK0wsoYoyzbgVZkbLRFRRAFmUORLvDg=="], "@takumi-rs/core-win32-arm64-msvc": ["@takumi-rs/core-win32-arm64-msvc@0.62.8", "", { "os": "win32", "cpu": "arm64" }, "sha512-ucQmG2bp6yH+7oNQUev+0re+6FBHUOUcee4mwpQa+BKCtUSgkgQuw3ZAGdyXBQEfr3NrNsMqfc47b3Ljv3bIWA=="], @@ -394,8 +402,6 @@ "@takumi-rs/wasm": ["@takumi-rs/wasm@0.62.8", "", {}, "sha512-V3L4LMoa1hqUxYel+j2oaIYhx7TdfSI/5iStU+7sTDru3o0gwJxw923jG66/F+lLSPGeY4rmYejcJCJN5VfpBA=="], - "@tybys/wasm-util": ["@tybys/wasm-util@0.10.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg=="], - "@types/d3": ["@types/d3@7.4.3", "", { "dependencies": { "@types/d3-array": "*", "@types/d3-axis": "*", "@types/d3-brush": "*", "@types/d3-chord": "*", "@types/d3-color": "*", "@types/d3-contour": "*", "@types/d3-delaunay": "*", "@types/d3-dispatch": "*", "@types/d3-drag": "*", "@types/d3-dsv": "*", "@types/d3-ease": "*", "@types/d3-fetch": "*", "@types/d3-force": "*", "@types/d3-format": "*", "@types/d3-geo": "*", "@types/d3-hierarchy": "*", "@types/d3-interpolate": "*", "@types/d3-path": "*", "@types/d3-polygon": "*", "@types/d3-quadtree": "*", "@types/d3-random": "*", "@types/d3-scale": "*", "@types/d3-scale-chromatic": "*", "@types/d3-selection": "*", "@types/d3-shape": "*", "@types/d3-time": "*", "@types/d3-time-format": "*", "@types/d3-timer": "*", "@types/d3-transition": "*", "@types/d3-zoom": "*" } }, "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww=="], "@types/d3-array": ["@types/d3-array@3.2.2", "", {}, "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw=="], @@ -426,7 +432,7 @@ "@types/d3-format": ["@types/d3-format@3.0.4", "", {}, "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g=="], - "@types/d3-geo": ["@types/d3-geo@3.1.0", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ=="], + "@types/d3-geo": ["@types/d3-geo@3.1.1", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w=="], "@types/d3-hierarchy": ["@types/d3-hierarchy@3.1.7", "", {}, "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg=="], @@ -438,15 +444,15 @@ "@types/d3-quadtree": ["@types/d3-quadtree@3.0.6", "", {}, "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg=="], - "@types/d3-random": ["@types/d3-random@3.0.3", "", {}, "sha512-Imagg1vJ3y76Y2ea0871wpabqp613+8/r0mCLEBfdtqC7xMSfj9idOnmBYyMoULfHePJyxMAw3nWhJxzc+LFwQ=="], + "@types/d3-random": ["@types/d3-random@3.0.4", "", {}, "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA=="], "@types/d3-scale": ["@types/d3-scale@4.0.9", "", { "dependencies": { "@types/d3-time": "*" } }, "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw=="], "@types/d3-scale-chromatic": ["@types/d3-scale-chromatic@3.1.0", "", {}, "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ=="], - "@types/d3-selection": ["@types/d3-selection@3.0.11", "", {}, "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w=="], + "@types/d3-selection": ["@types/d3-selection@3.0.12", "", {}, "sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw=="], - "@types/d3-shape": ["@types/d3-shape@3.1.8", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w=="], + "@types/d3-shape": ["@types/d3-shape@3.2.0", "", { "dependencies": { "@types/d3-path": "*" } }, "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw=="], "@types/d3-time": ["@types/d3-time@3.0.4", "", {}, "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g=="], @@ -456,43 +462,43 @@ "@types/d3-transition": ["@types/d3-transition@3.0.9", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg=="], - "@types/d3-zoom": ["@types/d3-zoom@3.0.8", "", { "dependencies": { "@types/d3-interpolate": "*", "@types/d3-selection": "*" } }, "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw=="], + "@types/d3-zoom": ["@types/d3-zoom@3.0.9", "", { "dependencies": { "@types/d3-interpolate": "*", "@types/d3-selection": "*" } }, "sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA=="], - "@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="], + "@types/debug": ["@types/debug@4.1.13", "", { "dependencies": { "@types/ms": "*" } }, "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw=="], - "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + "@types/estree": ["@types/estree@1.0.10", "", {}, "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g=="], "@types/estree-jsx": ["@types/estree-jsx@1.0.5", "", { "dependencies": { "@types/estree": "*" } }, "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg=="], "@types/geojson": ["@types/geojson@7946.0.16", "", {}, "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg=="], - "@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="], + "@types/hast": ["@types/hast@3.0.5", "", { "dependencies": { "@types/unist": "*" } }, "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g=="], "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], - "@types/mdx": ["@types/mdx@2.0.13", "", {}, "sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw=="], + "@types/mdx": ["@types/mdx@2.0.14", "", {}, "sha512-T48PeuJtvLosNTPVhfnIp3i/n3a4g4Bad7YCq5k64D4u7NwDrAotikQ+5+sjtUvBmxCMlbo3dVL+C2dP0rWHzg=="], "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="], - "@types/node": ["@types/node@24.12.2", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g=="], + "@types/node": ["@types/node@24.19.2", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ=="], - "@types/react": ["@types/react@19.2.14", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w=="], + "@types/react": ["@types/react@19.3.0", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg=="], "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], - "@typescript/vfs": ["@typescript/vfs@1.6.4", "", { "dependencies": { "debug": "^4.4.3" }, "peerDependencies": { "typescript": "*" } }, "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ=="], + "@typescript/vfs": ["@typescript/vfs@1.6.5", "", { "dependencies": { "debug": "^4.4.3" }, "peerDependencies": { "typescript": "*" } }, "sha512-gobLHQLmvQGJInFk31NvgMd1uYzRXsd8qgnOssyLD055R2QPnw1ubRbBQ4+T+5qC7IQVuYXdvNDE2G7tMDVHgw=="], - "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="], + "@ungap/structured-clone": ["@ungap/structured-clone@1.4.0", "", {}, "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ=="], "@upsetjs/venn.js": ["@upsetjs/venn.js@2.0.0", "", { "optionalDependencies": { "d3-selection": "^3.0.0", "d3-transition": "^3.0.1" } }, "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw=="], - "@vitejs/plugin-react": ["@vitejs/plugin-react@6.0.2", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.0" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler"] }, "sha512-DlSMqo4WhThw4vB8Mpn0Woe9J+Jfq1geJ61AKW0QEgLzGMNwtIMdxbDUzLxcun8W7NbJO0e2Jg/Nxm3cCSVzzg=="], + "@vitejs/plugin-react": ["@vitejs/plugin-react@6.1.2", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "oxc-transform-react": "^0.152.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler", "oxc-transform-react"] }, "sha512-fhJNGUdscQa4HkI0xFxwonWyhnVReCPDbXI7FH7jmzpnVCrFQI7PRrhWecO263610vOrs9tr2Y4xcf8uAdFxbw=="], - "@vitejs/plugin-rsc": ["@vitejs/plugin-rsc@0.5.27", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1", "es-module-lexer": "^2.1.0", "estree-walker": "^3.0.3", "magic-string": "^0.30.21", "srvx": "^0.11.15", "strip-literal": "^3.1.0", "turbo-stream": "^3.2.0", "vitefu": "^1.1.3" }, "peerDependencies": { "react": "*", "react-dom": "*", "react-server-dom-webpack": "*", "vite": "*" }, "optionalPeers": ["react-server-dom-webpack"] }, "sha512-s1fd5DUkPXk86DDHPM/kP93WrvI0MoA8klxdDZmD1fMSaA9xujfgunsm8ZoUH0FemR+63vNalFsIDR0AJH4ktg=="], + "@vitejs/plugin-rsc": ["@vitejs/plugin-rsc@0.5.38", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1", "es-module-lexer": "^3.0.3", "estree-walker": "^3.0.3", "magic-string": "^1.4.3", "obug": "^3.0.0", "srvx": "^1.0.5", "strip-literal": "^4.0.0", "turbo-stream": "^3.2.1", "vitefu": "^1.1.3" }, "peerDependencies": { "react": "*", "react-dom": "*", "react-server-dom-webpack": "*", "vite": "*" }, "optionalPeers": ["react-server-dom-webpack"] }, "sha512-SoiRBJBVd3Qg6Frnvdk6LwugJYlQKgee+uqySxKz5T/KsCZUgdw529Klzg4IDJuP/EOfsIJ2YiOKAFY8tnr1kg=="], "@webassemblyjs/ast": ["@webassemblyjs/ast@1.14.1", "", { "dependencies": { "@webassemblyjs/helper-numbers": "1.13.2", "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ=="], @@ -530,9 +536,7 @@ "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], - "acorn": ["acorn@8.16.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw=="], - - "acorn-import-phases": ["acorn-import-phases@1.0.4", "", { "peerDependencies": { "acorn": "^8.14.0" } }, "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ=="], + "acorn": ["acorn@8.19.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw=="], "acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="], @@ -546,10 +550,6 @@ "anser": ["anser@2.3.5", "", {}, "sha512-vcZjxvvVoxTeR5XBNJB38oTu/7eDCZlwdz32N1eNgpyPF7j/Z7Idf+CUwQOkKKpJ7RJyjxgLHCM7vdIK0iCNMQ=="], - "ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], - - "ansi-styles": ["ansi-styles@6.2.1", "", {}, "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug=="], - "any-promise": ["any-promise@1.3.0", "", {}, "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A=="], "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], @@ -562,13 +562,13 @@ "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], - "baseline-browser-mapping": ["baseline-browser-mapping@2.10.33", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-bA6+tcSLpz2tIEdDXZPpPTIuxBcC4+w6SieaYyfigIa4h8GlFxbA17v22Vx3JUtuZQj9SgOsnbK+aTBzyDyEuw=="], + "baseline-browser-mapping": ["baseline-browser-mapping@2.11.34", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-Aqr8mA1kIvyJ3UY5YAY7ib8LSo1DmDMbMnVqGPtsKW1LxaFQFwn9Eb3yvq2fUKJsRvaXjnAV7R5osqETapzNiA=="], - "body-parser": ["body-parser@2.2.2", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^1.0.5", "debug": "^4.4.3", "http-errors": "^2.0.0", "iconv-lite": "^0.7.0", "on-finished": "^2.4.1", "qs": "^6.14.1", "raw-body": "^3.0.1", "type-is": "^2.0.1" } }, "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA=="], + "body-parser": ["body-parser@2.4.0", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^2.1.0", "debug": "^4.4.3", "http-errors": "^2.0.1", "iconv-lite": "^0.7.3", "on-finished": "^2.4.1", "qs": "^6.16.1", "raw-body": "^3.0.2", "type-is": "^2.1.0" } }, "sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ=="], - "brace-expansion": ["brace-expansion@5.0.5", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ=="], + "brace-expansion": ["brace-expansion@5.0.12", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ=="], - "browserslist": ["browserslist@4.28.2", "", { "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", "electron-to-chromium": "^1.5.328", "node-releases": "^2.0.36", "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg=="], + "browserslist": ["browserslist@4.29.5", "", { "dependencies": { "baseline-browser-mapping": "^2.11.33", "caniuse-lite": "^1.0.30001819", "electron-to-chromium": "^1.5.464", "node-releases": "^2.0.60", "update-browserslist-db": "^1.3.4" }, "bin": { "browserslist": "cli.js" } }, "sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ=="], "buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="], @@ -586,7 +586,7 @@ "camelcase": ["camelcase@6.3.0", "", {}, "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA=="], - "caniuse-lite": ["caniuse-lite@1.0.30001793", "", {}, "sha512-iwSsYWaCOoh26cV8NwNRViHlrfUvYsHDfRVcbtmw0Kg6PJIZZXwMkj1442FYLBGkeUf1juAsU3DTfxW579mrPA=="], + "caniuse-lite": ["caniuse-lite@1.0.30001820", "", {}, "sha512-gfWD6MxqVCqAOwmODfZf7DchWvlrA+SRdNX7ceLfg3xRqe5ssjjpF7EgslC/0tiLiNTajdaNN/q8c/5u/7Gz8w=="], "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], @@ -606,17 +606,13 @@ "collapse-white-space": ["collapse-white-space@2.1.0", "", {}, "sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw=="], - "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], - - "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], - "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], "commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], - "confbox": ["confbox@0.2.4", "", {}, "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ=="], + "confbox": ["confbox@0.3.2", "", {}, "sha512-ZUAKhKlkCOrIGKc8cj7zek9s9z1mveHif/25nUshI2BzCRzF7KH7KHa+Lnh2ubq+e1tIlaFuP763mzW4qVoehg=="], - "content-disposition": ["content-disposition@1.1.0", "", {}, "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g=="], + "content-disposition": ["content-disposition@2.0.1", "", {}, "sha512-e+H0ZXHSWYrENhQzw1LPuP4oF5MzVKmDU6d3hxlvaPEYLLg62MxtQNPRx4SYSuYJSBUgnQIG4HIN2tEtNv7Dog=="], "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], @@ -632,7 +628,7 @@ "cosmiconfig": ["cosmiconfig@8.3.6", "", { "dependencies": { "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0", "path-type": "^4.0.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA=="], - "crelt": ["crelt@1.0.6", "", {}, "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g=="], + "crelt": ["crelt@1.0.7", "", {}, "sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA=="], "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], @@ -640,7 +636,7 @@ "cva": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], - "cytoscape": ["cytoscape@3.34.0", "", {}, "sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg=="], + "cytoscape": ["cytoscape@3.34.4", "", {}, "sha512-msY99tMY8iWTg+sIPGfSqDcPNOt4xcj+v/K/7qUFaCUxxlqnMkUYLBjRUzn9W5CU/R2hrmtJa5+UtovrEM2ctg=="], "cytoscape-cose-bilkent": ["cytoscape-cose-bilkent@4.1.0", "", { "dependencies": { "cose-base": "^1.0.0" }, "peerDependencies": { "cytoscape": "^3.2.0" } }, "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ=="], @@ -668,7 +664,7 @@ "d3-drag": ["d3-drag@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-selection": "3" } }, "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg=="], - "d3-dsv": ["d3-dsv@3.0.1", "", { "dependencies": { "commander": "7", "iconv-lite": "0.6", "rw": "1" }, "bin": { "csv2json": "bin/dsv2json.js", "csv2tsv": "bin/dsv2dsv.js", "dsv2dsv": "bin/dsv2dsv.js", "dsv2json": "bin/dsv2json.js", "json2csv": "bin/json2dsv.js", "json2dsv": "bin/json2dsv.js", "json2tsv": "bin/json2dsv.js", "tsv2csv": "bin/dsv2dsv.js", "tsv2json": "bin/dsv2json.js" } }, "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q=="], + "d3-dsv": ["d3-dsv@3.0.1", "", { "dependencies": { "commander": "7", "iconv-lite": "0.6", "rw": "1" }, "bin": { "csv2tsv": "bin/dsv2dsv.js", "dsv2dsv": "bin/dsv2dsv.js", "tsv2csv": "bin/dsv2dsv.js", "csv2json": "bin/dsv2json.js", "dsv2json": "bin/dsv2json.js", "json2csv": "bin/json2dsv.js", "json2dsv": "bin/json2dsv.js", "json2tsv": "bin/json2dsv.js", "tsv2json": "bin/dsv2json.js" } }, "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q=="], "d3-ease": ["d3-ease@3.0.1", "", {}, "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w=="], @@ -714,11 +710,11 @@ "dagre-d3-es": ["dagre-d3-es@7.0.14", "", { "dependencies": { "d3": "^7.9.0", "lodash-es": "^4.17.21" } }, "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg=="], - "dayjs": ["dayjs@1.11.21", "", {}, "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA=="], + "dayjs": ["dayjs@1.11.23", "", {}, "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ=="], - "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" }, "peerDependencies": { "supports-color": "*" }, "optionalPeers": ["supports-color"] }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], - "decode-named-character-reference": ["decode-named-character-reference@1.2.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q=="], + "decode-named-character-reference": ["decode-named-character-reference@1.3.0", "", { "dependencies": { "character-entities": "^2.0.0" } }, "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q=="], "delaunator": ["delaunator@5.1.0", "", { "dependencies": { "robust-predicates": "^3.0.2" } }, "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ=="], @@ -726,11 +722,11 @@ "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], - "detect-libc": ["detect-libc@2.0.4", "", {}, "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA=="], + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], - "dompurify": ["dompurify@3.4.8", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-yb1cEmaOum7wFvOCSQxyfgVlv5D47Rc30iZWoMpbDIWTnJ6grDDQyu2KFJzB2k7u0pMuJcQ1zphH//fFnw2tjQ=="], + "dompurify": ["dompurify@3.4.17", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-B/pSlYVHQ58kqISD/yDjuJ1yfzI34m1gF4lAod2bwSRhiN4K5Cl3H8Af7hqB2PmTL911tdEudnnXn5FnhRoz0w=="], "dot-case": ["dot-case@3.0.4", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w=="], @@ -738,17 +734,13 @@ "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], - "eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="], - "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], - "electron-to-chromium": ["electron-to-chromium@1.5.367", "", {}, "sha512-4Mk/mrynCNQ+atY40D3UpmhLWB6AHMbYMlIrPhHcMF6x0L7O0b052FCAsxw1LlaR++UFuNg3D/A6XCuGDa0guQ=="], + "electron-to-chromium": ["electron-to-chromium@1.5.471", "", {}, "sha512-Lo7jyyneHRYUQYM3WZ2rBEei9FcUIwValFPLifTbr4NTpc6oyUB+nN2rrOtbn3CE5pgz930mYxRJeD+glR7d6Q=="], - "emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], + "encodeurl": ["encodeurl@2.0.1", "", {}, "sha512-Ev/hIyePLZtpL98x562lvPtenrUfGr0lfaf44HFZ+hDEwso7ccV9QAZrEVLg0hxNAzygaAFxy2dYaAKKM0G06A=="], - "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], - - "enhanced-resolve": ["enhanced-resolve@5.22.2", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-0rxICaFZ7NQho/sHely2bvOPRP0Eu2B0NZ9zM54YvRvWMn7jfz3DmnOZDR9LlXDdDcqntAVc6Hfy4gr/tdH/Ag=="], + "enhanced-resolve": ["enhanced-resolve@5.26.0", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-9vhedylFonb2YGogzUKX6+Ja72gOJbN1QHAqdrvqLwhdl/QWbKopzoUC9EbQNVsAns/bx/4uyqalrQAoy1IByw=="], "entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="], @@ -758,13 +750,13 @@ "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], - "es-module-lexer": ["es-module-lexer@2.1.0", "", {}, "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ=="], + "es-module-lexer": ["es-module-lexer@2.3.2", "", {}, "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw=="], "es-object-atoms": ["es-object-atoms@1.1.2", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw=="], - "es-toolkit": ["es-toolkit@1.47.0", "", {}, "sha512-n1GuoD0WEQZMBk5tttoZSqwgyLx01oqa5XsBmCHwPyNe1S9jPBEmtR2pSgp2kJuWE3ciFZ6yRHmY4pM4C3OOkw=="], + "es-toolkit": ["es-toolkit@1.53.1", "", {}, "sha512-VhMc6IXmexu8iYFfL2aaAww6IvJTdHlqBLruLoEUs33YD4IcP5DdZcLOybMsMmmLsiy1c8PsiLsrM0DdIuuRUA=="], - "es5-ext": ["es5-ext@0.10.64", "", { "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", "esniff": "^2.0.1", "next-tick": "^1.1.0" } }, "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg=="], + "es5-ext": ["es5-ext@0.10.64", "", { "dependencies": { "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.3", "esniff": "^2.0.1", "next-tick": "^1.1.0" }, "hasInstallScript": true }, "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg=="], "es6-iterator": ["es6-iterator@2.0.3", "", { "dependencies": { "d": "1", "es5-ext": "^0.10.35", "es6-symbol": "^3.1.1" } }, "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g=="], @@ -774,7 +766,7 @@ "esast-util-from-js": ["esast-util-from-js@2.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "acorn": "^8.0.0", "esast-util-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw=="], - "esbuild": ["esbuild@0.28.0", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.0", "@esbuild/android-arm": "0.28.0", "@esbuild/android-arm64": "0.28.0", "@esbuild/android-x64": "0.28.0", "@esbuild/darwin-arm64": "0.28.0", "@esbuild/darwin-x64": "0.28.0", "@esbuild/freebsd-arm64": "0.28.0", "@esbuild/freebsd-x64": "0.28.0", "@esbuild/linux-arm": "0.28.0", "@esbuild/linux-arm64": "0.28.0", "@esbuild/linux-ia32": "0.28.0", "@esbuild/linux-loong64": "0.28.0", "@esbuild/linux-mips64el": "0.28.0", "@esbuild/linux-ppc64": "0.28.0", "@esbuild/linux-riscv64": "0.28.0", "@esbuild/linux-s390x": "0.28.0", "@esbuild/linux-x64": "0.28.0", "@esbuild/netbsd-arm64": "0.28.0", "@esbuild/netbsd-x64": "0.28.0", "@esbuild/openbsd-arm64": "0.28.0", "@esbuild/openbsd-x64": "0.28.0", "@esbuild/openharmony-arm64": "0.28.0", "@esbuild/sunos-x64": "0.28.0", "@esbuild/win32-arm64": "0.28.0", "@esbuild/win32-ia32": "0.28.0", "@esbuild/win32-x64": "0.28.0" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw=="], + "esbuild": ["esbuild@0.28.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.2", "@esbuild/android-arm": "0.28.2", "@esbuild/android-arm64": "0.28.2", "@esbuild/android-x64": "0.28.2", "@esbuild/darwin-arm64": "0.28.2", "@esbuild/darwin-x64": "0.28.2", "@esbuild/freebsd-arm64": "0.28.2", "@esbuild/freebsd-x64": "0.28.2", "@esbuild/linux-arm": "0.28.2", "@esbuild/linux-arm64": "0.28.2", "@esbuild/linux-ia32": "0.28.2", "@esbuild/linux-loong64": "0.28.2", "@esbuild/linux-mips64el": "0.28.2", "@esbuild/linux-ppc64": "0.28.2", "@esbuild/linux-riscv64": "0.28.2", "@esbuild/linux-s390x": "0.28.2", "@esbuild/linux-x64": "0.28.2", "@esbuild/netbsd-arm64": "0.28.2", "@esbuild/netbsd-x64": "0.28.2", "@esbuild/openbsd-arm64": "0.28.2", "@esbuild/openbsd-x64": "0.28.2", "@esbuild/openharmony-arm64": "0.28.2", "@esbuild/sunos-x64": "0.28.2", "@esbuild/win32-arm64": "0.28.2", "@esbuild/win32-ia32": "0.28.2", "@esbuild/win32-x64": "0.28.2" }, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA=="], "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], @@ -784,21 +776,15 @@ "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], - "eslint-scope": ["eslint-scope@5.1.1", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw=="], - "esniff": ["esniff@2.0.1", "", { "dependencies": { "d": "^1.0.1", "es5-ext": "^0.10.62", "event-emitter": "^0.3.5", "type": "^2.7.2" } }, "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg=="], - "esrecurse": ["esrecurse@4.3.0", "", { "dependencies": { "estraverse": "^5.2.0" } }, "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag=="], - - "estraverse": ["estraverse@4.3.0", "", {}, "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="], - "estree-util-attach-comments": ["estree-util-attach-comments@3.0.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw=="], "estree-util-build-jsx": ["estree-util-build-jsx@3.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-walker": "^3.0.0" } }, "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ=="], "estree-util-is-identifier-name": ["estree-util-is-identifier-name@3.0.0", "", {}, "sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg=="], - "estree-util-scope": ["estree-util-scope@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0" } }, "sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ=="], + "estree-util-scope": ["estree-util-scope@1.0.1", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0" } }, "sha512-B0np3dcdxqILX5e9nEi5/Fr4K7gL4oYFVPV1zRa2e9wRCbQoZZNWOZFYyoInvXUPJXBXjss+QXlWLJChDEHDkA=="], "estree-util-to-js": ["estree-util-to-js@2.0.0", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "astring": "^1.8.0", "source-map": "^0.7.0" } }, "sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg=="], @@ -816,13 +802,13 @@ "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], - "eventsource-parser": ["eventsource-parser@3.1.0", "", {}, "sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg=="], + "eventsource-parser": ["eventsource-parser@3.1.1", "", {}, "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ=="], - "express": ["express@5.2.1", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw=="], + "express": ["express@5.3.0", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.3.0", "content-disposition": "^2.0.1", "content-type": "^2.0.0", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.8", "qs": "^6.16.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.1.0", "vary": "^1.1.2" } }, "sha512-qCqy1xSoaugxOD4IVHb1ZWdkvCF2W3aE2okKouWj8VwJ+ztskSiXoBnCSJqfKT+cVPJhuJqe9YLbY425+Zh00g=="], - "express-rate-limit": ["express-rate-limit@8.5.2", "", { "dependencies": { "ip-address": "^10.2.0" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-5Kb34ipNX694DH48vN9irak1Qx30nb0PLYHXfJgw4YEjiC3ZEmZJhwOp+VfiCYwFzvFTdB9QkArYS5kXa2cx2A=="], + "express-rate-limit": ["express-rate-limit@8.7.2", "", { "dependencies": { "debug": "^4.4.3", "ip-address": "^10.2.0" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-U1ScocxDD9WI09LaBVypvNkOtNR5yWAmZLkuKJdAzIchA4YKFYF6GT5IKER7epG58oXtjvGlV0/6ii0F83EyZg=="], - "exsolve": ["exsolve@1.0.8", "", {}, "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA=="], + "exsolve": ["exsolve@1.2.0", "", {}, "sha512-h1pQPR9XoeSMdntRNCjyTznaume4UpfXrULBnlkZ2CUM/G5eSa+pBByGldO5uR8dxbPC+OuJXsPPNf+JZ81ADg=="], "ext": ["ext@1.7.0", "", { "dependencies": { "type": "^2.7.2" } }, "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw=="], @@ -830,7 +816,9 @@ "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], - "fast-uri": ["fast-uri@3.1.2", "", {}, "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ=="], + "fast-uri": ["fast-uri@3.1.9", "", {}, "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ=="], + + "fastdom": ["fastdom@1.0.12", "", { "dependencies": { "strictdom": "^1.0.1" } }, "sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg=="], "fault": ["fault@2.0.1", "", { "dependencies": { "format": "^0.2.0" } }, "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ=="], @@ -838,15 +826,13 @@ "finalhandler": ["finalhandler@2.1.1", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA=="], - "foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="], - "format": ["format@0.2.2", "", {}, "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww=="], "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], - "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin", "hasInstallScript": true }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], @@ -858,9 +844,7 @@ "github-slugger": ["github-slugger@2.0.0", "", {}, "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw=="], - "glob": ["glob@11.1.0", "", { "dependencies": { "foreground-child": "^3.3.1", "jackspeak": "^4.1.1", "minimatch": "^10.1.1", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^2.0.0" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw=="], - - "glob-to-regexp": ["glob-to-regexp@0.4.1", "", {}, "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="], + "glob": ["glob@14.0.3", "", { "dependencies": { "minimatch": "^11.0.2", "minipass": "^7.1.3", "path-scurry": "^3.0.0" } }, "sha512-A1vjIwC3qpdCso45Iw127gnp7sPhqgY8lUQhDrArIs+GbmfaaVPFuoyy7WyLT9EPZCRZ7j7aLdwUhQmHWesEow=="], "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], @@ -880,25 +864,25 @@ "hast-util-to-estree": ["hast-util-to-estree@3.1.3", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-attach-comments": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w=="], - "hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="], + "hast-util-to-html": ["hast-util-to-html@9.0.6", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-1SZUxCN3TtJAE7e2BQN2MBHsoZ1gnmi9GoCP5Di59CSWptIezSAW09yDZyVbanb78V9eCwrKqdQsjtfVTxYHWA=="], - "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.6", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-js": "^1.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg=="], + "hast-util-to-jsx-runtime": ["hast-util-to-jsx-runtime@2.3.7", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "comma-separated-tokens": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "hast-util-whitespace": "^3.0.0", "mdast-util-mdx-expression": "^2.0.0", "mdast-util-mdx-jsx": "^3.0.0", "mdast-util-mdxjs-esm": "^2.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "style-to-object": "^2.0.0", "unist-util-position": "^5.0.0", "vfile-message": "^4.0.0" } }, "sha512-F7DNV2NMcTxA4GqPVHnXzX+mpoPHAIY9rJAVH3CZ1FdBZOcBUEjUuvMkMpHVs/sicEtznh9tMGj5WUR9S4E2rg=="], "hast-util-to-string": ["hast-util-to-string@3.0.1", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A=="], "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], - "hono": ["hono@4.12.14", "", {}, "sha512-am5zfg3yu6sqn5yjKBNqhnTX7Cv+m00ox+7jbaKkrLMRJ4rAdldd1xPd/JzbBWspqaQv6RSTrgFN95EsfhC+7w=="], + "hono": ["hono@4.13.14", "", {}, "sha512-yhRLQ21U6qa9Hsu2N7Qcbh8tE+WKEcoErjIo56LeSGiGXGp9sA7UpE86Ui9uexb61KakiGwuHMn2QdV7w6i6kQ=="], "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], - "http-errors": ["http-errors@2.0.0", "", { "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", "statuses": "2.0.1", "toidentifier": "1.0.1" } }, "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ=="], + "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], "ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="], - "image-size": ["image-size@2.0.2", "", { "bin": { "image-size": "bin/image-size.js" } }, "sha512-IRqXKlaXwgSMAMtpNzZa1ZAe8m+Sa1770Dhk8VkSsP9LS+iHD62Zd8FQKs8fbPiagBE7BzoFX23cxFnwshpV6w=="], + "image-size": ["image-size@2.0.4", "", { "bin": { "image-size": "bin/image-size.js" } }, "sha512-QRUkFFsRV/6fuESxb9Vkq+a0LkSrgKXuc2NEqfikiXxxN/G3tjWt5EVUlMaImRBZRZK/jRBEbYvpPYZL8t08Zw=="], "import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="], @@ -906,13 +890,13 @@ "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - "inline-style-parser": ["inline-style-parser@0.2.4", "", {}, "sha512-0aO8FkhNZlj/ZIbNi7Lxxr12obT7cL1moPfE4tg1LkX7LlLfC6DeX4l2ZEud1ukP9jNQyNnfzQVqwbwmAATY4Q=="], + "inline-style-parser": ["inline-style-parser@0.2.9", "", {}, "sha512-IttN8BqKLxzUrnTqHI+/hwAJQItBAUjdoHERCDv+oOuX48VP6bzW8+QjOXSfoevzq3YrYAwX1uLHp8TqO9yIeg=="], - "internmap": ["internmap@2.0.3", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="], + "internmap": ["internmap@1.0.1", "", {}, "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="], "intersection-observer": ["intersection-observer@0.10.0", "", {}, "sha512-fn4bQ0Xq8FTej09YC/jqKZwtijpvARlRp6wxL5WTA6yPe2YWSJ5RJh7Nm79rK2qB0wr6iDQzH60XGq5V/7u8YQ=="], - "ip-address": ["ip-address@10.2.0", "", {}, "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA=="], + "ip-address": ["ip-address@10.7.5", "", {}, "sha512-t2v0rkILYv9WXmSL7TpAaU3HXgaFYOPUcH3QHgwQ++gpJuH3bqyMy4Fvt/DJCTKwzH3Cf+bAp5W/mFL39KPLzA=="], "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], @@ -924,8 +908,6 @@ "is-decimal": ["is-decimal@2.0.1", "", {}, "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A=="], - "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], - "is-hexadecimal": ["is-hexadecimal@2.0.1", "", {}, "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg=="], "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], @@ -934,17 +916,15 @@ "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], - "jackspeak": ["jackspeak@4.1.1", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" } }, "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ=="], - "jest-worker": ["jest-worker@27.5.1", "", { "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" } }, "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg=="], - "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], - "jose": ["jose@6.2.3", "", {}, "sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw=="], + "jose": ["jose@6.2.14", "", {}, "sha512-3JasLuki1NRLQvY4wCoC37KZk4qxoBx2k2aFqLxT84IezqW0bkJKnNtxnZj/Fu1xsQivoc/lytxaRHJoGLjJ1A=="], - "js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="], + "js-tokens": ["js-tokens@10.0.0", "", {}, "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q=="], - "js-yaml": ["js-yaml@4.2.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw=="], + "js-yaml": ["js-yaml@4.3.2", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA=="], "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], @@ -962,34 +942,32 @@ "layout-base": ["layout-base@1.0.2", "", {}, "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg=="], - "lightningcss": ["lightningcss@1.32.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="], + "lightningcss": ["lightningcss@1.33.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="], - "lightningcss-android-arm64": ["lightningcss-android-arm64@1.32.0", "", { "os": "android", "cpu": "arm64" }, "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg=="], + "lightningcss-android-arm64": ["lightningcss-android-arm64@1.33.0", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="], - "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.32.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ=="], + "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.33.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="], - "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.32.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w=="], + "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.33.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="], - "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.32.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig=="], + "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.33.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="], - "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.32.0", "", { "os": "linux", "cpu": "arm" }, "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw=="], + "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.33.0", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="], - "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ=="], + "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="], - "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.32.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg=="], + "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.33.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="], - "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA=="], + "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="], - "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.32.0", "", { "os": "linux", "cpu": "x64" }, "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg=="], + "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.33.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="], - "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.32.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw=="], + "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.33.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="], - "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.32.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q=="], + "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.33.0", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="], "lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="], - "loader-runner": ["loader-runner@4.3.2", "", {}, "sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w=="], - "local-pkg": ["local-pkg@1.2.1", "", { "dependencies": { "mlly": "^1.7.4", "pkg-types": "^2.3.0", "quansync": "^0.2.11" } }, "sha512-++gUqRDEvcnN6Zhqrr+y/CkVEHhlrR96vZn3nZZPYzMcBUyBtTKzB9NadClFIsIVSsu+3i9tfk/erqy9kAmt7Q=="], "lodash-es": ["lodash-es@4.18.1", "", {}, "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A=="], @@ -998,7 +976,7 @@ "lower-case": ["lower-case@2.0.2", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg=="], - "lru-cache": ["lru-cache@11.1.0", "", {}, "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A=="], + "lru-cache": ["lru-cache@11.5.3", "", {}, "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg=="], "lz-string": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="], @@ -1012,11 +990,11 @@ "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], - "mdast-util-directive": ["mdast-util-directive@3.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-I3fNFt+DHmpWCYAT7quoM6lHf9wuqtI+oCOfvILnoicNIqjh5E3dEJWiXuYME2gNe8vl1iMQwyUHa7bgFmak6Q=="], + "mdast-util-directive": ["mdast-util-directive@3.2.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "devlop": "^1.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.2.0", "micromark-util-character": "^2.0.0", "parse-entities": "^4.0.0", "stringify-entities": "^4.0.0" } }, "sha512-Yxq+hH4pBEmtaLIJyMVcNbtBiCIKzdOK3HvDeM+JAqC8XVAT1e5PUYbHBpwFvQLIJuJfO2zCu7aNUXWoyZLmhw=="], - "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg=="], + "mdast-util-find-and-replace": ["mdast-util-find-and-replace@3.0.4", "", { "dependencies": { "@types/mdast": "^4.0.0", "escape-string-regexp": "^5.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.1.0" } }, "sha512-z4B5c6jrnJ1ltOQemhWYPBSAo6y42Z8Gt2yEgfgNTMcLSU59B8bfj8Z8AnAlJrBGLnqkdAUZ7jdDEqQw3KuipQ=="], - "mdast-util-from-markdown": ["mdast-util-from-markdown@2.0.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA=="], + "mdast-util-from-markdown": ["mdast-util-from-markdown@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "mdast-util-to-string": "^4.0.0", "micromark": "^4.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-KRLgmPaP2H1ul2bpoJkOS+9pAcDAAj9Nu1mqLnh8NLeJG5tlvj42TH80PIGBpROWlRXLk0lDrWNuZCFy/tsB4A=="], "mdast-util-frontmatter": ["mdast-util-frontmatter@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "escape-string-regexp": "^5.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-extension-frontmatter": "^2.0.0" } }, "sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA=="], @@ -1026,7 +1004,7 @@ "mdast-util-gfm-footnote": ["mdast-util-gfm-footnote@2.1.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.1.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0" } }, "sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ=="], - "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg=="], + "mdast-util-gfm-strikethrough": ["mdast-util-gfm-strikethrough@2.0.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-OuJHqvr455pwu2OaOrir7dbzqs4jlWKOtlu9L6GjcIjjQwNyw02VntQsr/Ek6/A13vgnXfUhBekWRUP1OkNivw=="], "mdast-util-gfm-table": ["mdast-util-gfm-table@2.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "markdown-table": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.0.0" } }, "sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg=="], @@ -1044,21 +1022,21 @@ "mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="], - "mdast-util-to-markdown": ["mdast-util-to-markdown@2.1.2", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA=="], + "mdast-util-to-markdown": ["mdast-util-to-markdown@2.2.1", "", { "dependencies": { "@types/mdast": "^4.0.0", "@types/unist": "^3.0.0", "longest-streak": "^3.0.0", "mdast-util-phrasing": "^4.0.0", "mdast-util-to-string": "^4.0.0", "micromark-util-character": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-decode-string": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "unist-util-visit": "^5.0.0", "zwitch": "^2.0.0" } }, "sha512-ThatlCBxG2GE+mljhNSfZPv56d3QrGiRh97jjYgIk80IzS4uU6d7cHAaexCYSAmUCCcOs3grJ07kX3oTGsFUOw=="], "mdast-util-to-string": ["mdast-util-to-string@4.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0" } }, "sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg=="], - "media-typer": ["media-typer@1.1.0", "", {}, "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="], + "media-typer": ["media-typer@1.1.1", "", {}, "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ=="], "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], - "mermaid": ["mermaid@11.15.0", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.1", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^1.1.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "cytoscape": "^3.33.1", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.19", "dompurify": "^3.3.1", "es-toolkit": "^1.45.1", "katex": "^0.16.25", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0", "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, "sha512-pTMbcf3rWdtLiYGpmoTjHEpeY8seiy6sR+9nD7LOs8KfUbHE4lOUAprTRqRAcWSQ6MQpdX+YEsxShtGsINtPtw=="], + "mermaid": ["mermaid@11.17.2", "", { "dependencies": { "@braintree/sanitize-url": "^7.1.2", "@iconify/utils": "^3.0.2", "@mermaid-js/parser": "^1.2.1", "@types/d3": "^7.4.3", "@upsetjs/venn.js": "^2.0.0", "cytoscape": "^3.34.0", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", "d3": "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.14", "dayjs": "^1.11.21", "dompurify": "^3.3.3", "es-toolkit": "^1.45.1", "fastdom": "1.0.12", "katex": "^0.16.47", "khroma": "^2.1.0", "marked": "^16.3.0", "roughjs": "^4.6.6", "stylis": "^4.3.6", "ts-dedent": "^2.2.0", "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" } }, "sha512-V6K3C8EBdEsPFZXSKMJe6ppQOENxuHARr9GvHX4hh47lAbhMRD9qf4oEK7LoaRQxULMa80/qt5gHO73aCleBBg=="], - "micromark": ["micromark@4.0.2", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA=="], + "micromark": ["micromark@4.0.3", "", { "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0", "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-core-commonmark": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-sanitize-uri": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw=="], - "micromark-core-commonmark": ["micromark-core-commonmark@2.0.3", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.0.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg=="], + "micromark-core-commonmark": ["micromark-core-commonmark@2.0.4", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", "micromark-factory-space": "^2.1.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-edit-map": "^1.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.3" } }, "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w=="], "micromark-extension-directive": ["micromark-extension-directive@4.0.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "parse-entities": "^4.0.0" } }, "sha512-/C2nqVmXXmiseSSuCdItCMho7ybwwop6RrrRPk0KbOHW21JKoCldC+8rFOaundDoRBUWBnJJcxeA/Kvi34WQXg=="], @@ -1072,7 +1050,7 @@ "micromark-extension-gfm-strikethrough": ["micromark-extension-gfm-strikethrough@2.1.0", "", { "dependencies": { "devlop": "^1.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw=="], - "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.1", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg=="], + "micromark-extension-gfm-table": ["micromark-extension-gfm-table@2.1.2", "", { "dependencies": { "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA=="], "micromark-extension-gfm-tagfilter": ["micromark-extension-gfm-tagfilter@2.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg=="], @@ -1094,7 +1072,7 @@ "micromark-factory-mdx-expression": ["micromark-factory-mdx-expression@2.0.3", "", { "dependencies": { "@types/estree": "^1.0.0", "devlop": "^1.0.0", "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-events-to-acorn": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "unist-util-position-from-estree": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ=="], - "micromark-factory-space": ["micromark-factory-space@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg=="], + "micromark-factory-space": ["micromark-factory-space@2.1.0", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-fS8hnLIjnjvdQIj39Geug8wWsR0HrYZ43KShKxNfwT7t2LOHo/LbWZEzEaSOjwtjdCsjoE6syHhonEzW0zv0+Q=="], "micromark-factory-title": ["micromark-factory-title@2.0.1", "", { "dependencies": { "micromark-factory-space": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw=="], @@ -1112,6 +1090,8 @@ "micromark-util-decode-string": ["micromark-util-decode-string@2.0.1", "", { "dependencies": { "decode-named-character-reference": "^1.0.0", "micromark-util-character": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ=="], + "micromark-util-edit-map": ["micromark-util-edit-map@1.0.0", "", { "dependencies": { "micromark-util-types": "^2.0.0" } }, "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q=="], + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], "micromark-util-events-to-acorn": ["micromark-util-events-to-acorn@2.0.3", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", "estree-util-visit": "^2.0.0", "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0", "vfile-message": "^4.0.0" } }, "sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg=="], @@ -1128,27 +1108,29 @@ "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], - "micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="], + "micromark-util-types": ["micromark-util-types@2.0.3", "", {}, "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg=="], "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="], - "minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="], + "minimatch": ["minimatch@11.0.3", "", { "dependencies": { "@isaacs/nonrecursive-glob-match": "^1.0.3", "brace-expansion": "^5.0.12" } }, "sha512-iny/40PEGkNJQ5/Pv6z3nm6FbRAby32GeZRjCUJk2WnNDbgPSTcdI+DDvLqsgBdD4cD5sMtMheqPPnehCCa8Nw=="], - "minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + "minimizer-webpack-plugin": ["minimizer-webpack-plugin@5.14.0", "", { "dependencies": { "jest-worker": "^27.4.5", "schema-utils": "^4.6.0", "terser": "^5.51.0" }, "peerDependencies": { "@minify-html/node": "*", "@napi-rs/image": "*", "@swc/core": "*", "@swc/css": "*", "@swc/html": "*", "clean-css": "*", "cssnano": "*", "csso": "*", "esbuild": "*", "html-minifier-terser": "*", "imagemin": "*", "lightningcss": "*", "postcss": "*", "sharp": "*", "svgo": "*", "uglify-js": "*", "webpack": "^5.1.0" }, "optionalPeers": ["@minify-html/node", "@napi-rs/image", "@swc/core", "@swc/css", "@swc/html", "clean-css", "cssnano", "csso", "esbuild", "html-minifier-terser", "imagemin", "lightningcss", "postcss", "sharp", "svgo", "uglify-js"] }, "sha512-PnvQXCJxhgH2ZVVO7Lj0sM6q8L1XGxnUvd8wVQIRwi8khMCLq5wg0Ngxe44bcuZL2FSN81RdVE7YHEVzTKsQDQ=="], + + "minipass": ["minipass@7.1.3", "", {}, "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A=="], "minisearch": ["minisearch@7.2.0", "", {}, "sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg=="], - "mlly": ["mlly@1.7.4", "", { "dependencies": { "acorn": "^8.14.0", "pathe": "^2.0.1", "pkg-types": "^1.3.0", "ufo": "^1.5.4" } }, "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw=="], + "mlly": ["mlly@1.8.2", "", { "dependencies": { "acorn": "^8.16.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.3" } }, "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA=="], "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], "mz": ["mz@2.7.0", "", { "dependencies": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q=="], - "nanoid": ["nanoid@3.3.12", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ=="], + "nanoid": ["nanoid@3.3.20", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ=="], - "negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="], + "negotiator": ["negotiator@1.1.0", "", { "dependencies": { "content-type": "^2.1.0" } }, "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg=="], "neo-async": ["neo-async@2.6.2", "", {}, "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="], @@ -1156,15 +1138,17 @@ "no-case": ["no-case@3.0.4", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="], - "node-releases": ["node-releases@2.0.47", "", {}, "sha512-Uzmd6LXpouKo8EUK68IjH4+E01w/hXyV3R3g/geCJo+rXLNfh1xucB+LOzYEOQPSiUK3h/xZf0cQGcSsmyL2Og=="], + "node-releases": ["node-releases@2.0.63", "", {}, "sha512-6li2QanLsAXpIH2R6j77MzRyvOyrvdTqlKtO4CgBdHGNvN99ZZfyxszHc5o5+IZBWD5u6Hzwg83JoGXmqZNG9Q=="], - "nuqs": ["nuqs@2.8.9", "", { "dependencies": { "@standard-schema/spec": "1.0.0" }, "peerDependencies": { "@remix-run/react": ">=2", "@tanstack/react-router": "^1", "next": ">=14.2.0", "react": ">=18.2.0 || ^19.0.0-0", "react-router": "^5 || ^6 || ^7", "react-router-dom": "^5 || ^6 || ^7" }, "optionalPeers": ["@remix-run/react", "@tanstack/react-router", "next", "react-router", "react-router-dom"] }, "sha512-8ou6AEwsxMWSYo2qkfZtYFVzngwbKmg4c00HVxC1fF6CEJv3Fwm6eoZmfVPALB+vw8Udo7KL5uy96PFcYe1BIQ=="], + "nuqs": ["nuqs@2.10.2", "", { "dependencies": { "@standard-schema/spec": "1.1.0" }, "peerDependencies": { "@remix-run/react": ">=2", "@tanstack/react-router": "^1", "next": ">=14.2.0", "react": ">=18.2.0 || ^19.0.0-0", "react-router": "^5 || ^6 || ^7 || ^8", "react-router-dom": "^5 || ^6 || ^7" }, "optionalPeers": ["@remix-run/react", "@tanstack/react-router", "next", "react-router", "react-router-dom"] }, "sha512-HaLMCr9H2wywEnTu3j+QW98EteDT3Kfmx3SJJ6JfcvCvkFi/g/fKd/oCXa5DF0x1s1l4zcFtzsq9bflj6RcM6A=="], "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], - "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], + "obug": ["obug@3.0.0", "", {}, "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw=="], + + "on-finished": ["on-finished@2.4.2", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ=="], "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], @@ -1174,9 +1158,7 @@ "outvariant": ["outvariant@1.4.0", "", {}, "sha512-AlWY719RF02ujitly7Kk/0QlV+pXGFDHrHf9O2OKqyqgBieaPOIeuSkL8sRK6j2WK+/ZAURq2kZsY0d8JapUiw=="], - "package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="], - - "package-manager-detector": ["package-manager-detector@1.3.0", "", {}, "sha512-ZsEbbZORsyHuO00lY1kV3/t72yp6Ysay6Pd17ZAlNGuGwmWDLCJxFpRs0IzfXfj1o4icJOkUEioexFHzyPurSQ=="], + "package-manager-detector": ["package-manager-detector@1.9.0", "", {}, "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA=="], "parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="], @@ -1190,7 +1172,7 @@ "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], - "path-scurry": ["path-scurry@2.0.0", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg=="], + "path-scurry": ["path-scurry@3.0.0", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg=="], "path-to-regexp": ["path-to-regexp@8.4.2", "", {}, "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA=="], @@ -1200,49 +1182,47 @@ "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], - "picomatch": ["picomatch@4.0.4", "", {}, "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A=="], + "picomatch": ["picomatch@4.0.7", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="], "pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="], "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="], - "pkg-types": ["pkg-types@2.3.1", "", { "dependencies": { "confbox": "^0.2.4", "exsolve": "^1.0.8", "pathe": "^2.0.3" } }, "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg=="], + "pkg-types": ["pkg-types@2.4.0", "", { "dependencies": { "confbox": "^0.3.1", "exsolve": "^1.1.3", "pathe": "^2.0.3" } }, "sha512-07Fys7iVx0X6TcviMOgogM1Lk33ZyqOezMnU79S+kffWqwolG/5W9V8EgQSeYCIfFTYVgssRbnH630Oa2+soBA=="], "points-on-curve": ["points-on-curve@0.2.0", "", {}, "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A=="], "points-on-path": ["points-on-path@0.2.1", "", { "dependencies": { "path-data-parser": "0.1.0", "points-on-curve": "0.2.0" } }, "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g=="], - "postcss": ["postcss@8.5.15", "", { "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A=="], + "postcss": ["postcss@8.5.32", "", { "dependencies": { "nanoid": "^3.3.20", "picocolors": "^1.1.1", "source-map-js": "^1.2.2" } }, "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g=="], - "property-information": ["property-information@7.1.0", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="], + "property-information": ["property-information@7.2.0", "", {}, "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg=="], "proxy-addr": ["proxy-addr@2.0.8", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ=="], - "qs": ["qs@6.15.2", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw=="], + "qs": ["qs@6.17.1", "", { "dependencies": { "es-define-property": "^1.0.1", "side-channel": "^1.1.1" } }, "sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA=="], "quansync": ["quansync@0.2.11", "", {}, "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA=="], - "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="], + "range-parser": ["range-parser@1.3.0", "", {}, "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw=="], "raw-body": ["raw-body@3.0.2", "", { "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", "iconv-lite": "~0.7.0", "unpipe": "~1.0.0" } }, "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA=="], - "react": ["react@19.2.4", "", {}, "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ=="], + "react": ["react@19.2.9", "", {}, "sha512-RuLdAokXv3sRmZa2/N8QH0KmTBIgDKC+buRUikGqow31+mGSGidLCX2o4XFq8OV+xBFWfhM9DVgTq1PPHADH4w=="], "react-devtools-inline": ["react-devtools-inline@4.4.0", "", { "dependencies": { "es6-symbol": "^3" } }, "sha512-ES0GolSrKO8wsKbsEkVeiR/ZAaHQTY4zDh1UW8DImVmm8oaGLl3ijJDvSGe+qDRKPZdPRnDtWWnSvvrgxXdThQ=="], - "react-dom": ["react-dom@19.2.4", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.4" } }, "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ=="], + "react-dom": ["react-dom@19.2.9", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.9" } }, "sha512-YceU74W21fXEHszKBLj16MY0CmvpFKOs60iVrIyW/cCgOPsZJNaB6GVJEtIUqt6AG6EjzKLui5lPRrxAeS328Q=="], - "react-error-boundary": ["react-error-boundary@6.1.2", "", { "peerDependencies": { "react": "^18.0.0 || ^19.0.0" } }, "sha512-3DpCr5HVdZ0caUjYE/kIHBEJN0mNP3ZCgf16c48uJ5TbWjorKVp+YG8W3XqlJ7vJAVNw6wNIImyPXmFydwmyng=="], + "react-error-boundary": ["react-error-boundary@6.1.6", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-CDXPnXDGyFIbkwaaJ6u+xgsRmJhSi6YdgUDW1vnyKHfXp1a9pfAlM+ZET2CDu80/A+8iRcmXN0NSY9BCCoWP5A=="], "react-is": ["react-is@17.0.2", "", {}, "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="], - "react-router": ["react-router@7.14.1", "", { "dependencies": { "cookie": "^1.0.1", "set-cookie-parser": "^2.6.0" }, "peerDependencies": { "react": ">=18", "react-dom": ">=18" }, "optionalPeers": ["react-dom"] }, "sha512-5BCvFskyAAVumqhEKh/iPhLOIkfxcEUz8WqFIARCkMg8hZZzDYX9CtwxXA0e+qT8zAxmMC0x3Ckb9iMONwc5jg=="], - - "react-server-dom-webpack": ["react-server-dom-webpack@19.2.4", "", { "dependencies": { "acorn-loose": "^8.3.0", "neo-async": "^2.6.1", "webpack-sources": "^3.2.0" }, "peerDependencies": { "react": "^19.2.4", "react-dom": "^19.2.4", "webpack": "^5.59.0" } }, "sha512-zEhkWv6RhXDctC2N7yEUHg3751nvFg81ydHj8LTTZuukF/IF1gcOKqqAL6Ds+kS5HtDVACYPik0IvzkgYXPhlQ=="], + "react-server-dom-webpack": ["react-server-dom-webpack@19.2.9", "", { "dependencies": { "acorn-loose": "^8.3.0", "neo-async": "^2.6.1", "webpack-sources": "^3.2.0" }, "peerDependencies": { "react": "^19.2.9", "react-dom": "^19.2.9", "webpack": "^5.59.0" } }, "sha512-7vhLc+COcttZsIsZa5qbT4Qn3Flp2fCadhuGRKpwE3ahmbu21hOnPFKwziNHZj8Fqtfcbs7pTJV69QA5GcUpbw=="], "recma-build-jsx": ["recma-build-jsx@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-util-build-jsx": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew=="], - "recma-jsx": ["recma-jsx@1.0.0", "", { "dependencies": { "acorn-jsx": "^5.0.0", "estree-util-to-js": "^2.0.0", "recma-parse": "^1.0.0", "recma-stringify": "^1.0.0", "unified": "^11.0.0" } }, "sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q=="], + "recma-jsx": ["recma-jsx@1.0.1", "", { "dependencies": { "acorn-jsx": "^5.0.0", "estree-util-to-js": "^2.0.0", "recma-parse": "^1.0.0", "recma-stringify": "^1.0.0", "unified": "^11.0.0" }, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-huSIy7VU2Z5OLv6oFLosQGGDqPqdO1iq6bWNAdhzMxSJP7RAso4fCZ1cKu8j9YHCZf3TPrq4dw3okhrylgcd7w=="], "recma-parse": ["recma-parse@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "esast-util-from-js": "^2.0.0", "unified": "^11.0.0", "vfile": "^6.0.0" } }, "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ=="], @@ -1280,15 +1260,15 @@ "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], - "reselect": ["reselect@5.2.0", "", {}, "sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw=="], + "reselect": ["reselect@5.3.0", "", {}, "sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg=="], "resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], "robust-predicates": ["robust-predicates@3.0.3", "", {}, "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA=="], - "rolldown": ["rolldown@1.0.3", "", { "dependencies": { "@oxc-project/types": "=0.133.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm64": "1.0.3", "@rolldown/binding-darwin-arm64": "1.0.3", "@rolldown/binding-darwin-x64": "1.0.3", "@rolldown/binding-freebsd-x64": "1.0.3", "@rolldown/binding-linux-arm-gnueabihf": "1.0.3", "@rolldown/binding-linux-arm64-gnu": "1.0.3", "@rolldown/binding-linux-arm64-musl": "1.0.3", "@rolldown/binding-linux-ppc64-gnu": "1.0.3", "@rolldown/binding-linux-s390x-gnu": "1.0.3", "@rolldown/binding-linux-x64-gnu": "1.0.3", "@rolldown/binding-linux-x64-musl": "1.0.3", "@rolldown/binding-openharmony-arm64": "1.0.3", "@rolldown/binding-wasm32-wasi": "1.0.3", "@rolldown/binding-win32-arm64-msvc": "1.0.3", "@rolldown/binding-win32-x64-msvc": "1.0.3" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g=="], + "rolldown": ["rolldown@1.2.16", "", { "dependencies": { "@oxc-project/types": "=0.156.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.16", "@rolldown/binding-android-arm64": "1.2.16", "@rolldown/binding-darwin-arm64": "1.2.16", "@rolldown/binding-darwin-x64": "1.2.16", "@rolldown/binding-freebsd-x64": "1.2.16", "@rolldown/binding-linux-arm-gnueabihf": "1.2.16", "@rolldown/binding-linux-arm64-gnu": "1.2.16", "@rolldown/binding-linux-arm64-musl": "1.2.16", "@rolldown/binding-linux-ppc64-gnu": "1.2.16", "@rolldown/binding-linux-s390x-gnu": "1.2.16", "@rolldown/binding-linux-x64-gnu": "1.2.16", "@rolldown/binding-linux-x64-musl": "1.2.16", "@rolldown/binding-openharmony-arm64": "1.2.16", "@rolldown/binding-win32-arm64-msvc": "1.2.16", "@rolldown/binding-win32-x64-msvc": "1.2.16" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw=="], - "rollup": ["rollup@4.45.1", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.45.1", "@rollup/rollup-android-arm64": "4.45.1", "@rollup/rollup-darwin-arm64": "4.45.1", "@rollup/rollup-darwin-x64": "4.45.1", "@rollup/rollup-freebsd-arm64": "4.45.1", "@rollup/rollup-freebsd-x64": "4.45.1", "@rollup/rollup-linux-arm-gnueabihf": "4.45.1", "@rollup/rollup-linux-arm-musleabihf": "4.45.1", "@rollup/rollup-linux-arm64-gnu": "4.45.1", "@rollup/rollup-linux-arm64-musl": "4.45.1", "@rollup/rollup-linux-loongarch64-gnu": "4.45.1", "@rollup/rollup-linux-powerpc64le-gnu": "4.45.1", "@rollup/rollup-linux-riscv64-gnu": "4.45.1", "@rollup/rollup-linux-riscv64-musl": "4.45.1", "@rollup/rollup-linux-s390x-gnu": "4.45.1", "@rollup/rollup-linux-x64-gnu": "4.45.1", "@rollup/rollup-linux-x64-musl": "4.45.1", "@rollup/rollup-win32-arm64-msvc": "4.45.1", "@rollup/rollup-win32-ia32-msvc": "4.45.1", "@rollup/rollup-win32-x64-msvc": "4.45.1", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw=="], + "rollup": ["rollup@4.67.2", "", { "dependencies": { "@types/estree": "^1.0.10" }, "optionalDependencies": { "@napi-rs/lzma-linux-x64-gnu": "1.5.1", "@rollup/rollup-android-arm-eabi": "4.67.2", "@rollup/rollup-android-arm64": "4.67.2", "@rollup/rollup-android-x64": "4.67.2", "@rollup/rollup-darwin-arm64": "4.67.2", "@rollup/rollup-darwin-x64": "4.67.2", "@rollup/rollup-freebsd-arm64": "4.67.2", "@rollup/rollup-freebsd-x64": "4.67.2", "@rollup/rollup-linux-arm-gnueabihf": "4.67.2", "@rollup/rollup-linux-arm-musleabihf": "4.67.2", "@rollup/rollup-linux-arm64-gnu": "4.67.2", "@rollup/rollup-linux-arm64-musl": "4.67.2", "@rollup/rollup-linux-loong64-gnu": "4.67.2", "@rollup/rollup-linux-loong64-musl": "4.67.2", "@rollup/rollup-linux-ppc64-gnu": "4.67.2", "@rollup/rollup-linux-ppc64-musl": "4.67.2", "@rollup/rollup-linux-riscv64-gnu": "4.67.2", "@rollup/rollup-linux-riscv64-musl": "4.67.2", "@rollup/rollup-linux-s390x-gnu": "4.67.2", "@rollup/rollup-linux-x64-gnu": "4.67.2", "@rollup/rollup-linux-x64-musl": "4.67.2", "@rollup/rollup-openbsd-x64": "4.67.2", "@rollup/rollup-openharmony-arm64": "4.67.2", "@rollup/rollup-win32-arm64-msvc": "4.67.2", "@rollup/rollup-win32-ia32-msvc": "4.67.2", "@rollup/rollup-win32-x64-gnu": "4.67.2", "@rollup/rollup-win32-x64-msvc": "4.67.2", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-sFZk5BeRUQzkjmuClrJI41BowIP4yv/40d5gM9vtjxVLEt+8JG9FGlBps6cliTP2KhFiw22oqNGo0G9pVpPZlw=="], "roughjs": ["roughjs@4.6.6", "", { "dependencies": { "hachure-fill": "^0.5.2", "path-data-parser": "^0.1.0", "points-on-curve": "^0.2.0", "points-on-path": "^0.2.1" } }, "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ=="], @@ -1302,7 +1282,7 @@ "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], - "schema-utils": ["schema-utils@4.3.3", "", { "dependencies": { "@types/json-schema": "^7.0.9", "ajv": "^8.9.0", "ajv-formats": "^2.1.1", "ajv-keywords": "^5.1.0" } }, "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA=="], + "schema-utils": ["schema-utils@4.8.1", "", { "dependencies": { "@types/json-schema": "^7.0.15", "ajv": "^8.20.0", "ajv-formats": "^3.0.1", "ajv-keywords": "^5.1.0" }, "peerDependencies": { "webpack": "^5.112.0" }, "optionalPeers": ["webpack"], "bin": { "schema-utils": "bin/schema-utils.js" } }, "sha512-x39pYlJPyH7Uge5QO64B9XGP9zLDc9WNmiQZc+CE3IzZPvMu3lHOuAMGpYNoPixEL7MSWlGhYTg5UlLSL8G6iw=="], "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], @@ -1310,8 +1290,6 @@ "serve-static": ["serve-static@2.2.1", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw=="], - "set-cookie-parser": ["set-cookie-parser@2.7.1", "", {}, "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ=="], - "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], @@ -1320,7 +1298,7 @@ "shiki": ["shiki@3.23.0", "", { "dependencies": { "@shikijs/core": "3.23.0", "@shikijs/engine-javascript": "3.23.0", "@shikijs/engine-oniguruma": "3.23.0", "@shikijs/langs": "3.23.0", "@shikijs/themes": "3.23.0", "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA=="], - "side-channel": ["side-channel@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw=="], + "side-channel": ["side-channel@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.4", "side-channel-list": "^1.0.1", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ=="], "side-channel-list": ["side-channel-list@1.0.1", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.4" } }, "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w=="], @@ -1328,43 +1306,35 @@ "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], - "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], - "snake-case": ["snake-case@3.0.4", "", { "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg=="], - "source-map": ["source-map@0.7.4", "", {}, "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA=="], + "source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], - "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + "source-map-js": ["source-map-js@1.2.2", "", {}, "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw=="], "source-map-support": ["source-map-support@0.5.21", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="], "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], - "srvx": ["srvx@0.11.16", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-bp07zRuycfTY43IjAvvTFnmnJi8ikW0VFiHwOhhYcVW/L4xQ1XY4PAd4Nuum1rsA17C39zL7x+CDhrn5AL32Rw=="], + "srvx": ["srvx@1.0.8", "", { "bin": { "srvx": "./bin/srvx.mjs" } }, "sha512-ngFS/J6St4PJfHRHGjr78xkPPtbyXtdMOLNE4x/XZunEK3OhV7aGUWMHf9WTUEy6wm1U0W4okkd82ZFFWRVQTw=="], "static-browser-server": ["static-browser-server@1.0.3", "", { "dependencies": { "@open-draft/deferred-promise": "^2.1.0", "dotenv": "^16.0.3", "mime-db": "^1.52.0", "outvariant": "^1.3.0" } }, "sha512-ZUyfgGDdFRbZGGJQ1YhiM930Yczz5VlbJObrQLlk24+qNHVQx4OlLcYswEUo3bIyNAbQUIUR9Yr5/Hqjzqb4zA=="], - "statuses": ["statuses@2.0.1", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="], + "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], "strict-event-emitter": ["strict-event-emitter@0.4.6", "", {}, "sha512-12KWeb+wixJohmnwNFerbyiBrAlq5qJLwIt38etRtKtmmHyDSoGlIqFE9wx+4IwG0aDjI7GV8tc8ZccjWZZtTg=="], - "string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], - - "string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + "strictdom": ["strictdom@1.0.1", "", {}, "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg=="], "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], - "strip-ansi": ["strip-ansi@7.1.0", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ=="], - - "strip-ansi-cjs": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], - - "strip-literal": ["strip-literal@3.1.0", "", { "dependencies": { "js-tokens": "^9.0.1" } }, "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg=="], + "strip-literal": ["strip-literal@4.0.0", "", { "dependencies": { "js-tokens": "^10.0.0" } }, "sha512-PaqAvfUZKBwc/SLmNZtHmzK+v19Z4O4eS3cKPeGvbIv/U3pnyEq4Tuw3/4v/FwfM8VQaEawsyCcOQ0P+kpwWWw=="], - "style-mod": ["style-mod@4.1.3", "", {}, "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ=="], + "style-mod": ["style-mod@4.1.4", "", {}, "sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw=="], - "style-to-js": ["style-to-js@1.1.17", "", { "dependencies": { "style-to-object": "1.0.9" } }, "sha512-xQcBGDxJb6jjFCTzvQtfiPn6YvvP2O8U1MDIPNfJQlWMYfktPy+iGsHE7cssjs7y84d9fQaK4UF3RIJaAHSoYA=="], + "style-to-js": ["style-to-js@1.1.21", "", { "dependencies": { "style-to-object": "1.0.14" } }, "sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ=="], - "style-to-object": ["style-to-object@1.0.9", "", { "dependencies": { "inline-style-parser": "0.2.4" } }, "sha512-G4qppLgKu/k6FwRpHiGiKPaPTFcG3g4wNVX/Qsfu+RqQM30E7Tyu/TEgxcL9PNLF5pdRLwQdE3YKKf+KF2Dzlw=="], + "style-to-object": ["style-to-object@2.0.2", "", { "dependencies": { "inline-style-parser": "0.2.9" } }, "sha512-QmbXPUylqU80HAgTOJeEOdbA40W9KtxmjMhQy+tq+b8F2aoh3aQLuy82hh2jm2qsC9hR9eI0+eQidTMydKcqRA=="], "stylis": ["stylis@4.4.0", "", {}, "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA=="], @@ -1372,23 +1342,21 @@ "supports-color": ["supports-color@8.1.1", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q=="], - "svg-parser": ["svg-parser@2.0.4", "", {}, "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ=="], + "svg-parser": ["svg-parser@2.1.0", "", {}, "sha512-bwLf38YmY+TDYHJw1Ex0Co8c4yeXuJAo8YnXGZrscxrvYoVVIvLeniEkV1Ks/54VteMnL4FtyN1+P+TZJdUPmQ=="], - "tailwindcss": ["tailwindcss@4.3.0", "", {}, "sha512-y6nxMGB1nMW9R6k96e5gdIFzcfL/gTJRNaqGes1YvkLnPVXzWgbqFF2yLC0T8G774n24cx3Pe8XrKoniCOAH+Q=="], + "tailwindcss": ["tailwindcss@4.3.3", "", {}, "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ=="], "tailwindcss-logical": ["tailwindcss-logical@4.2.0", "", { "peerDependencies": { "tailwindcss": ">=4.0.0" } }, "sha512-G+7NFU8xiMczeaykFRvaDbfbpqvFWv05YG6RtS2klW1wvTRkUs96P/e+Zy/Qse6y0HL8tLQ+da8M7trDfu12sw=="], "tapable": ["tapable@2.3.3", "", {}, "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A=="], - "terser": ["terser@5.48.0", "", { "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" } }, "sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q=="], - - "terser-webpack-plugin": ["terser-webpack-plugin@5.6.1", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", "schema-utils": "^4.3.0", "terser": "^5.31.1" }, "peerDependencies": { "webpack": "^5.1.0" } }, "sha512-201R5j+sJpK8nFWwKVyNfZot8FaJbLZDq5evriVzbV1wDtSXDjRUDRfJzHpAaxFDMEhsZL1QkeqM61wgsS3KaQ=="], + "terser": ["terser@5.51.2", "", { "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" } }, "sha512-bWnjSNscmuI+GJze6ZupnHP8G/cTcsJF+bXCeQknk2SHQsgbNJnLrqiH9jZ2W4STPVXH2mDKKRX3iwPhc9Cn/Q=="], "thenify": ["thenify@3.3.1", "", { "dependencies": { "any-promise": "^1.0.0" } }, "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw=="], "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="], - "tinyexec": ["tinyexec@1.0.1", "", {}, "sha512-5uC6DDlmeqiOwCPmK9jMSdOuZTh8bU39Ys6yidB+UTt5hfZUPGAypSgFRiEp+jbi9qH40BLDvy85jIU88wKSqw=="], + "tinyexec": ["tinyexec@1.3.1", "", {}, "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA=="], "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], @@ -1400,19 +1368,19 @@ "trough": ["trough@2.2.0", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="], - "ts-dedent": ["ts-dedent@2.2.0", "", {}, "sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ=="], + "ts-dedent": ["ts-dedent@2.3.0", "", {}, "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg=="], "ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="], - "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + "tslib": ["tslib@2.9.1", "", {}, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], - "tsx": ["tsx@4.22.4", "", { "dependencies": { "esbuild": "~0.28.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "bin": { "tsx": "dist/cli.mjs" } }, "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg=="], + "tsx": ["tsx@4.23.15", "", { "dependencies": { "esbuild": "~0.28.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "bin": { "tsx": "dist/cli.mjs" } }, "sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw=="], - "turbo-stream": ["turbo-stream@3.2.0", "", {}, "sha512-EK+bZ9UVrVh7JLslVFOV0GEMsociOqVOvEMTAd4ixMyffN5YNIEdLZWXUx5PJqDbTxSIBWw04HS9gCY4frYQDQ=="], + "turbo-stream": ["turbo-stream@3.2.1", "", {}, "sha512-BaX0eWz3IrypOVDFqPv3VGD6uZZW8y3oFAOJqZQ+oopmOyQ8/xNm7IMwAJFvxax2DBa8zSk+/AeqA6D6b1PXGg=="], - "twoslash": ["twoslash@0.3.8", "", { "dependencies": { "@typescript/vfs": "^1.6.4", "twoslash-protocol": "0.3.8" }, "peerDependencies": { "typescript": "^5.5.0 || ^6.0.0" } }, "sha512-OeDz0kDl8sqPUN3nr7gqcvOs70f5lZsdhKYTX3/SgB9OvdadzzoYJI/4SBXhXV1HG8E9fLc+e17itoRYTxmoig=="], + "twoslash": ["twoslash@0.3.9", "", { "dependencies": { "@typescript/vfs": "^1.6.4", "twoslash-protocol": "0.3.9" }, "peerDependencies": { "typescript": "^5.5.0 || ^6.0.0" } }, "sha512-rDclk+OtzuTX+tnea7DYLCkqGQ3eP0IyfD+kzUJ7t46X/NzlaxwrhecmEBNuSCuEn3V+n1PhcjUUQQ7gUJzX5Q=="], - "twoslash-protocol": ["twoslash-protocol@0.3.8", "", {}, "sha512-HmvAHoiEviK8LqvAQyc9/irkdvwTUiR1fHmNwH/0gq8EHxyBt4PWVPixjEXg6wJu1u6yBrILEWXGK9Kw58/8yQ=="], + "twoslash-protocol": ["twoslash-protocol@0.3.9", "", {}, "sha512-9/iwp+CXOnjFMPQuPL5PkuRbZnDoNpBvtJCLs9t8kDYkL3YHujbvnHfZA1i5fApDftVEdBw+T/4F+dH5kIzpYQ=="], "type": ["type@2.7.3", "", {}, "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ=="], @@ -1420,13 +1388,13 @@ "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], - "ufo": ["ufo@1.6.1", "", {}, "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA=="], + "ufo": ["ufo@1.6.4", "", {}, "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA=="], - "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + "undici-types": ["undici-types@7.24.6", "", {}, "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg=="], "unified": ["unified@11.0.5", "", { "dependencies": { "@types/unist": "^3.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" } }, "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA=="], - "unist-util-is": ["unist-util-is@6.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw=="], + "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], "unist-util-mdx-define": ["unist-util-mdx-define@1.1.2", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-9ncH7i7TN5Xn7/tzX5bE3rXgz1X/u877gYVAUB3mLeTKYJmQHmqKTDBi6BTGXV7AeolBCI9ErcVsOt2qryoD0g=="], @@ -1436,9 +1404,9 @@ "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], - "unist-util-visit": ["unist-util-visit@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg=="], + "unist-util-visit": ["unist-util-visit@5.2.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.1.0" } }, "sha512-fpsYs/VVoZxfGY9/j3FQpZmN8wdLJaV1Pt38AaJNZu9uKIHcFU3halCdBveEq1HGKO1OEfJY65w1zvoFV1b3qQ=="], - "unist-util-visit-parents": ["unist-util-visit-parents@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw=="], + "unist-util-visit-parents": ["unist-util-visit-parents@6.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-vKXxz6O38sKDj1mtx/k2cWvkkFBuYGx6uGrlzBkVeWCRF/F8sdI0j3Wbkz/5rVNRRuVc8UrgRdbCxNhmYXgP3w=="], "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], @@ -1446,21 +1414,21 @@ "unplugin-icons": ["unplugin-icons@22.5.0", "", { "dependencies": { "@antfu/install-pkg": "^1.1.0", "@iconify/utils": "^3.0.2", "debug": "^4.4.3", "local-pkg": "^1.1.2", "unplugin": "^2.3.10" }, "peerDependencies": { "@svgr/core": ">=7.0.0", "@svgx/core": "^1.0.1", "@vue/compiler-sfc": "^3.0.2 || ^2.7.0", "svelte": "^3.0.0 || ^4.0.0 || ^5.0.0", "vue-template-compiler": "^2.6.12", "vue-template-es2015-compiler": "^1.9.0" }, "optionalPeers": ["@svgr/core", "@svgx/core", "@vue/compiler-sfc", "svelte", "vue-template-compiler", "vue-template-es2015-compiler"] }, "sha512-MBlMtT5RuMYZy4TZgqUL2OTtOdTUVsS1Mhj6G1pEzMlFJlEnq6mhUfoIt45gBWxHcsOdXJDWLg3pRZ+YmvAVWQ=="], - "update-browserslist-db": ["update-browserslist-db@1.2.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w=="], + "update-browserslist-db": ["update-browserslist-db@1.3.4", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A=="], "urlpattern-polyfill": ["urlpattern-polyfill@10.1.0", "", {}, "sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw=="], - "use-sync-external-store": ["use-sync-external-store@1.6.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="], + "use-sync-external-store": ["use-sync-external-store@1.7.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A=="], - "uuid": ["uuid@14.0.0", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg=="], + "uuid": ["uuid@14.0.3", "", { "bin": { "uuid": "dist-node/bin/uuid" } }, "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw=="], "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], - "vfile-message": ["vfile-message@4.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw=="], + "vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="], - "vite": ["vite@8.0.16", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.15", "rolldown": "1.0.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.1.18", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw=="], + "vite": ["vite@8.3.5", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.7", "postcss": "^8.5.30", "rolldown": "~1.2.14", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ=="], "vite-plugin-arraybuffer": ["vite-plugin-arraybuffer@0.1.4", "", {}, "sha512-Ubfsw/g4PhdjlgsKYDm2Hlc0qmNJheX8VCeOMayq1k9fMVB1nNuqtWjDH1fj9hSlhlSnlndz/ehMKIuXpB0SeA=="], @@ -1472,29 +1440,25 @@ "w3c-keyname": ["w3c-keyname@2.2.8", "", {}, "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ=="], - "waku": ["waku@1.0.0-beta.0", "", { "dependencies": { "@hono/node-server": "^2.0.2", "@vitejs/plugin-react": "^6.0.1", "@vitejs/plugin-rsc": "^0.5.26", "dotenv": "^17.4.2", "hono": "^4.12.14", "magic-string": "^0.30.21", "picocolors": "^1.1.1", "rsc-html-stream": "^0.0.7", "vite": "^8.0.0" }, "peerDependencies": { "react": "~19.2.4", "react-dom": "~19.2.4", "react-server-dom-webpack": "~19.2.4" }, "bin": { "waku": "cli.js" } }, "sha512-6UhIsxrN70g1nsACoEAmCriT15pnyH3CunhrckFZuARBkaFXUvN22dIQWdCTiA8JVeNXAnhFV85Tuko8uEqZKQ=="], + "waku": ["waku@1.0.0-beta.1", "", { "dependencies": { "@hono/node-server": "^2.0.2", "@vitejs/plugin-react": "^6.0.1", "@vitejs/plugin-rsc": "^0.5.26", "dotenv": "^17.4.2", "hono": "^4.12.14", "magic-string": "^0.30.21", "picocolors": "^1.1.1", "rsc-html-stream": "^0.0.7", "vite": "^8.0.0" }, "peerDependencies": { "react": "~19.2.4", "react-dom": "~19.2.4", "react-server-dom-webpack": "~19.2.4" }, "bin": { "waku": "./cli.js" } }, "sha512-fsDHpz4K+h7K7Umyoweclrvxdk+jZD5lzg4dByuIh7sctiEe8YTu4DhRAxel+cRp9LvLRB8hcWgwkjCBLiqxVg=="], - "watchpack": ["watchpack@2.5.1", "", { "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" } }, "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg=="], + "watchpack": ["watchpack@2.6.3", "", { "dependencies": { "graceful-fs": "^4.1.2" } }, "sha512-s3NZy0QpTY9qGqzc0wtz4qI28z3+5qKbbAec4MV4G9N3CfgZ9wgvQRr0cl2jh/tqkWG1NWHkmVMHZpCamev5Wg=="], - "webpack": ["webpack@5.107.2", "", { "dependencies": { "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", "@webassemblyjs/wasm-edit": "^1.14.1", "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.16.0", "acorn-import-phases": "^1.0.3", "browserslist": "^4.28.1", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.22.0", "es-module-lexer": "^2.1.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", "loader-runner": "^4.3.2", "mime-db": "^1.54.0", "neo-async": "^2.6.2", "schema-utils": "^4.3.3", "tapable": "^2.3.0", "terser-webpack-plugin": "^5.5.0", "watchpack": "^2.5.1", "webpack-sources": "^3.5.0" }, "bin": { "webpack": "bin/webpack.js" } }, "sha512-v7RhXaJbpMlV0D7hC7lb2EbnxkoeUqf9qhKr6lozx3Q48pmFrqqNRmZFUEGmi7pSwm6fCQ2H1IjvCkHqdpVdjQ=="], + "webpack": ["webpack@5.112.2", "", { "dependencies": { "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", "@webassemblyjs/wasm-edit": "^1.14.1", "@webassemblyjs/wasm-parser": "^1.14.1", "browserslist": "^4.28.1", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.26.0", "es-module-lexer": "^2.1.0", "events": "^3.2.0", "graceful-fs": "^4.2.11", "mime-db": "^1.54.0", "minimizer-webpack-plugin": "^5.13.0", "schema-utils": "^4.8.1", "tapable": "^2.3.0", "watchpack": "^2.6.3", "webpack-sources": "^3.6.0" }, "peerDependencies": { "webpack-cli": "*" }, "optionalPeers": ["webpack-cli"], "bin": { "webpack": "bin/webpack.js" } }, "sha512-B2tp1LI9D8GVpPDqprdt12ukTkXXahj9MzqSWJq4faSPgOUM7CdZaGAB6HrL/8E6UwbBpdj4vzWDbKoFnVoU6g=="], - "webpack-sources": ["webpack-sources@3.5.0", "", {}, "sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ=="], + "webpack-sources": ["webpack-sources@3.7.0", "", {}, "sha512-PdUhbCycwEgiS1hB/FBDksWKg/ashAIuJKqwdbPn8/dFVgU5LxQiBvG0js6VRRIzPujMrStYCczywp82P0KWng=="], "webpack-virtual-modules": ["webpack-virtual-modules@0.6.2", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="], "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], - "wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], - - "wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], - "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], - "yaml": ["yaml@2.9.0", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA=="], + "yaml": ["yaml@2.9.1", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw=="], - "zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="], + "zod": ["zod@4.6.7", "", {}, "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg=="], "zod-to-json-schema": ["zod-to-json-schema@3.25.2", "", { "peerDependencies": { "zod": "^3.25.28 || ^4" } }, "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA=="], @@ -1502,41 +1466,31 @@ "@babel/code-frame/js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], - "@babel/helper-compilation-targets/browserslist": ["browserslist@4.25.1", "", { "dependencies": { "caniuse-lite": "^1.0.30001726", "electron-to-chromium": "^1.5.173", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw=="], - "@babel/helper-compilation-targets/lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], - "@jridgewell/gen-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.4", "", {}, "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw=="], - - "@jridgewell/trace-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.4", "", {}, "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw=="], - - "@mdx-js/mdx/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], - - "@modelcontextprotocol/sdk/@hono/node-server": ["@hono/node-server@1.19.14", "", { "peerDependencies": { "hono": "^4" } }, "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw=="], - "@rollup/pluginutils/estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], - "@rollup/pluginutils/picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + "@tailwindcss/node/lightningcss": ["lightningcss@1.32.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="], - "@shikijs/rehype/unist-util-visit": ["unist-util-visit@5.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg=="], + "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="], - "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.10.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" }, "bundled": true }, "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw=="], + "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], - "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.10.0", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA=="], + "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.3", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g=="], - "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], + "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.2.6", "", { "dependencies": { "@tybys/wasm-util": "^0.10.3" }, "peerDependencies": { "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" }, "bundled": true }, "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw=="], - "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.4", "", { "dependencies": { "@tybys/wasm-util": "^0.10.1" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" }, "bundled": true }, "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow=="], + "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.4", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A=="], - "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.2", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg=="], + "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.9.1", "", { "bundled": true }, "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA=="], - "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + "@vitejs/plugin-rsc/es-module-lexer": ["es-module-lexer@3.0.4", "", {}, "sha512-BldNY5mwkVu+cQ5Ymn3e6hB9Sx8XHx4ZevWbiUyZbfKxJxYO27Hf0wfzkxIaD5CAJMaGl3YspKELj0ff/7nCMA=="], - "acorn-loose/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], + "@vitejs/plugin-rsc/magic-string": ["magic-string@1.4.5", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.6.0" } }, "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w=="], - "body-parser/http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], + "body-parser/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], - "body-parser/iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="], + "body-parser/iconv-lite": ["iconv-lite@0.7.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="], "cytoscape-fcose/cose-base": ["cose-base@2.2.0", "", { "dependencies": { "layout-base": "^2.0.0" } }, "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g=="], @@ -1546,90 +1500,58 @@ "d3-sankey/d3-shape": ["d3-shape@1.3.7", "", { "dependencies": { "d3-path": "1" } }, "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw=="], - "esast-util-from-js/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], - - "esrecurse/estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], - - "finalhandler/statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], - - "hast-util-to-html/mdast-util-to-hast": ["mdast-util-to-hast@13.2.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA=="], + "express/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], "katex/commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="], - "micromark/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], - - "micromark-extension-mdxjs/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], - - "mlly/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], - "mlly/pkg-types": ["pkg-types@1.3.1", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.4", "pathe": "^2.0.1" } }, "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ=="], - "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], - - "raw-body/http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], - - "raw-body/iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="], - - "react-router/cookie": ["cookie@1.0.2", "", {}, "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA=="], - - "remark-mdx-frontmatter/estree-util-value-to-estree": ["estree-util-value-to-estree@3.4.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-Zlp+gxis+gCfK12d3Srl2PdX2ybsEA8ZYy6vQGVQTNNYLEGRQQ56XB64bjemN8kxIKXP1nC9ip4Z+ILy9LGzvQ=="], - - "remark-mdx-frontmatter/yaml": ["yaml@2.8.0", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ=="], - - "remark-rehype/mdast-util-to-hast": ["mdast-util-to-hast@13.2.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA=="], - - "schema-utils/ajv-formats": ["ajv-formats@2.1.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA=="], + "negotiator/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], - "send/http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], + "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="], - "send/statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + "raw-body/iconv-lite": ["iconv-lite@0.7.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="], "source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], "static-browser-server/dotenv": ["dotenv@16.6.1", "", {}, "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="], - "string-width-cjs/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + "style-to-js/style-to-object": ["style-to-object@1.0.14", "", { "dependencies": { "inline-style-parser": "0.2.7" } }, "sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw=="], - "string-width-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + "sucrase/commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="], - "strip-ansi-cjs/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + "type-is/content-type": ["content-type@2.1.0", "", {}, "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag=="], - "sucrase/commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="], + "unplugin-icons/@antfu/install-pkg": ["@antfu/install-pkg@1.1.0", "", { "dependencies": { "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" } }, "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ=="], - "type-is/content-type": ["content-type@2.0.0", "", {}, "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ=="], + "@tailwindcss/node/lightningcss/lightningcss-android-arm64": ["lightningcss-android-arm64@1.32.0", "", { "os": "android", "cpu": "arm64" }, "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg=="], - "unplugin/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], + "@tailwindcss/node/lightningcss/lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.32.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ=="], - "wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + "@tailwindcss/node/lightningcss/lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.32.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w=="], - "wrap-ansi-cjs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + "@tailwindcss/node/lightningcss/lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.32.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig=="], - "wrap-ansi-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + "@tailwindcss/node/lightningcss/lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.32.0", "", { "os": "linux", "cpu": "arm" }, "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw=="], - "@babel/helper-compilation-targets/browserslist/caniuse-lite": ["caniuse-lite@1.0.30001727", "", {}, "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q=="], + "@tailwindcss/node/lightningcss/lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.32.0", "", { "os": "linux", "cpu": "arm64", "libc": "glibc" }, "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ=="], - "@babel/helper-compilation-targets/browserslist/electron-to-chromium": ["electron-to-chromium@1.5.186", "", {}, "sha512-lur7L4BFklgepaJxj4DqPk7vKbTEl0pajNlg2QjE5shefmlmBLm2HvQ7PMf1R/GvlevT/581cop33/quQcfX3A=="], + "@tailwindcss/node/lightningcss/lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.32.0", "", { "os": "linux", "cpu": "arm64", "libc": "musl" }, "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg=="], - "@babel/helper-compilation-targets/browserslist/node-releases": ["node-releases@2.0.19", "", {}, "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw=="], + "@tailwindcss/node/lightningcss/lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.32.0", "", { "os": "linux", "cpu": "x64", "libc": "glibc" }, "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA=="], - "@babel/helper-compilation-targets/browserslist/update-browserslist-db": ["update-browserslist-db@1.1.3", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw=="], + "@tailwindcss/node/lightningcss/lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.32.0", "", { "os": "linux", "cpu": "x64", "libc": "musl" }, "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg=="], - "body-parser/http-errors/statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + "@tailwindcss/node/lightningcss/lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.32.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw=="], - "cytoscape-fcose/cose-base/layout-base": ["layout-base@2.0.1", "", {}, "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg=="], + "@tailwindcss/node/lightningcss/lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.32.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q=="], - "d3-sankey/d3-array/internmap": ["internmap@1.0.1", "", {}, "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw=="], + "cytoscape-fcose/cose-base/layout-base": ["layout-base@2.0.1", "", {}, "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg=="], "d3-sankey/d3-shape/d3-path": ["d3-path@1.0.9", "", {}, "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="], "mlly/pkg-types/confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="], - "raw-body/http-errors/statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], - - "string-width-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], - - "wrap-ansi-cjs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], - - "wrap-ansi-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + "style-to-js/style-to-object/inline-style-parser": ["inline-style-parser@0.2.7", "", {}, "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA=="], } } diff --git a/docs/vocs/package.json b/docs/vocs/package.json index b5988877ea2..0219c58858e 100644 --- a/docs/vocs/package.json +++ b/docs/vocs/package.json @@ -15,17 +15,17 @@ }, "dependencies": { "mermaid": "^11", - "react": "19.2.4", - "react-dom": "19.2.4", - "react-server-dom-webpack": "19.2.4", - "vocs": "^2.0.11", - "waku": "1.0.0-beta.0" + "react": "19.2.9", + "react-dom": "19.2.9", + "react-server-dom-webpack": "19.2.9", + "vocs": "2.0.11", + "waku": "1.0.0-beta.1" }, "devDependencies": { "@types/node": "^24.12.2", "@types/react": "^19.2.14", - "glob": "^11.1.0", + "glob": "^14.0.2", "typescript": "^5.9.3", - "vite": "^8.0.16" + "vite": "^8.1.6" } } diff --git a/docs/vocs/scripts/fix-rustdocs-navigation.ts b/docs/vocs/scripts/fix-rustdocs-navigation.ts index 9b994c00381..51c844d0782 100644 --- a/docs/vocs/scripts/fix-rustdocs-navigation.ts +++ b/docs/vocs/scripts/fix-rustdocs-navigation.ts @@ -3,9 +3,10 @@ import { readdir, readFile, writeFile } from 'fs/promises' import { join } from 'path' const ASSETS_DIR = './docs/dist/public/assets' -const LINK_MARKER = 'c=Yd(!!i);if(Hd(e.to))' -const RUSTDOCS_NAVIGATION_GUARD = - 'c=Yd(!!i);if(t==="/docs"||t?.startsWith("/docs/"))return(0,v.jsx)(`a`,{...o,href:t});if(Hd(e.to))' +// Vocs's Link component, minified: `c=(!!i);if((e.to))return(0,.jsx)`. +// Minified names change between builds, so they are captured rather than hardcoded. +const LINK_MARKER = /c=([\w$]+)\(!!i\);if\(([\w$]+)\(e\.to\)\)return\(0,([\w$]+)\.jsx\)/ +const RUSTDOCS_NAVIGATION_GUARD = 'if(t==="/docs"||t?.startsWith("/docs/"))return(0,' async function fixRustdocsNavigation() { const files = await readdir(ASSETS_DIR) @@ -22,9 +23,16 @@ async function fixRustdocsNavigation() { continue } - if (!code.includes(LINK_MARKER)) continue + if (!LINK_MARKER.test(code)) continue - await writeFile(path, code.replace(LINK_MARKER, RUSTDOCS_NAVIGATION_GUARD)) + await writeFile( + path, + code.replace( + LINK_MARKER, + (_, prefetch, isExternal, jsx) => + `c=${prefetch}(!!i);${RUSTDOCS_NAVIGATION_GUARD}${jsx}.jsx)(\`a\`,{...o,href:t});if(${isExternal}(e.to))return(0,${jsx}.jsx)`, + ), + ) patchedFiles++ console.log(`Patched Rustdocs navigation in ${path}`) } diff --git a/scripts/bench-reth-charts/pyproject.toml b/scripts/bench-reth-charts/pyproject.toml index 2f483eb9961..f3dc9500081 100644 --- a/scripts/bench-reth-charts/pyproject.toml +++ b/scripts/bench-reth-charts/pyproject.toml @@ -3,5 +3,5 @@ [project] name = "bench-reth-charts" version = "0.0.0" -requires-python = ">=3.10" -dependencies = ["matplotlib==3.10.9", "numpy", "pillow==12.3.0"] +requires-python = ">=3.11" +dependencies = ["matplotlib==3.10.9", "numpy", "pillow==13.0.0"] diff --git a/scripts/bench-reth-charts/uv.lock b/scripts/bench-reth-charts/uv.lock index df59189f66e..92b6e3da7ec 100644 --- a/scripts/bench-reth-charts/uv.lock +++ b/scripts/bench-reth-charts/uv.lock @@ -1,20 +1,22 @@ version = 1 revision = 5 -requires-python = ">=3.10" +requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '3.12'", - "python_full_version == '3.11.*'", - "python_full_version < '3.11'", + "python_full_version < '3.12'", + "python_version < '0'", ] +[options] +exclude-newer = "2026-10-31T00:00:00Z" + [[package]] name = "bench-reth-charts" version = "0.0.0" source = { virtual = "." } dependencies = [ { name = "matplotlib" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, { name = "numpy", version = "2.5.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, { name = "pillow" }, ] @@ -23,77 +25,7 @@ dependencies = [ requires-dist = [ { name = "matplotlib", specifier = "==3.10.9" }, { name = "numpy" }, - { name = "pillow", specifier = "==12.3.0" }, -] - -[[package]] -name = "contourpy" -version = "1.3.2" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11'", -] -dependencies = [ - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" } }, -] -sdist = { url = "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz", hash = "sha256:b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54", size = 13466130, upload-time = "2025-04-15T17:47:53.79Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/12/a3/da4153ec8fe25d263aa48c1a4cbde7f49b59af86f0b6f7862788c60da737/contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934", size = 268551, upload-time = "2025-04-15T17:34:46.581Z" }, - { url = "https://files.pythonhosted.org/packages/2f/6c/330de89ae1087eb622bfca0177d32a7ece50c3ef07b28002de4757d9d875/contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989", size = 253399, upload-time = "2025-04-15T17:34:51.427Z" }, - { url = "https://files.pythonhosted.org/packages/c1/bd/20c6726b1b7f81a8bee5271bed5c165f0a8e1f572578a9d27e2ccb763cb2/contourpy-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9be002b31c558d1ddf1b9b415b162c603405414bacd6932d031c5b5a8b757f0d", size = 312061, upload-time = "2025-04-15T17:34:55.961Z" }, - { url = "https://files.pythonhosted.org/packages/22/fc/a9665c88f8a2473f823cf1ec601de9e5375050f1958cbb356cdf06ef1ab6/contourpy-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8d2e74acbcba3bfdb6d9d8384cdc4f9260cae86ed9beee8bd5f54fee49a430b9", size = 351956, upload-time = "2025-04-15T17:35:00.992Z" }, - { url = "https://files.pythonhosted.org/packages/25/eb/9f0a0238f305ad8fb7ef42481020d6e20cf15e46be99a1fcf939546a177e/contourpy-1.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e259bced5549ac64410162adc973c5e2fb77f04df4a439d00b478e57a0e65512", size = 320872, upload-time = "2025-04-15T17:35:06.177Z" }, - { url = "https://files.pythonhosted.org/packages/32/5c/1ee32d1c7956923202f00cf8d2a14a62ed7517bdc0ee1e55301227fc273c/contourpy-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad687a04bc802cbe8b9c399c07162a3c35e227e2daccf1668eb1f278cb698631", size = 325027, upload-time = "2025-04-15T17:35:11.244Z" }, - { url = "https://files.pythonhosted.org/packages/83/bf/9baed89785ba743ef329c2b07fd0611d12bfecbedbdd3eeecf929d8d3b52/contourpy-1.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cdd22595308f53ef2f891040ab2b93d79192513ffccbd7fe19be7aa773a5e09f", size = 1306641, upload-time = "2025-04-15T17:35:26.701Z" }, - { url = "https://files.pythonhosted.org/packages/d4/cc/74e5e83d1e35de2d28bd97033426b450bc4fd96e092a1f7a63dc7369b55d/contourpy-1.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4f54d6a2defe9f257327b0f243612dd051cc43825587520b1bf74a31e2f6ef2", size = 1374075, upload-time = "2025-04-15T17:35:43.204Z" }, - { url = "https://files.pythonhosted.org/packages/0c/42/17f3b798fd5e033b46a16f8d9fcb39f1aba051307f5ebf441bad1ecf78f8/contourpy-1.3.2-cp310-cp310-win32.whl", hash = "sha256:f939a054192ddc596e031e50bb13b657ce318cf13d264f095ce9db7dc6ae81c0", size = 177534, upload-time = "2025-04-15T17:35:46.554Z" }, - { url = "https://files.pythonhosted.org/packages/54/ec/5162b8582f2c994721018d0c9ece9dc6ff769d298a8ac6b6a652c307e7df/contourpy-1.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c440093bbc8fc21c637c03bafcbef95ccd963bc6e0514ad887932c18ca2a759a", size = 221188, upload-time = "2025-04-15T17:35:50.064Z" }, - { url = "https://files.pythonhosted.org/packages/b3/b9/ede788a0b56fc5b071639d06c33cb893f68b1178938f3425debebe2dab78/contourpy-1.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6a37a2fb93d4df3fc4c0e363ea4d16f83195fc09c891bc8ce072b9d084853445", size = 269636, upload-time = "2025-04-15T17:35:54.473Z" }, - { url = "https://files.pythonhosted.org/packages/e6/75/3469f011d64b8bbfa04f709bfc23e1dd71be54d05b1b083be9f5b22750d1/contourpy-1.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b7cd50c38f500bbcc9b6a46643a40e0913673f869315d8e70de0438817cb7773", size = 254636, upload-time = "2025-04-15T17:35:58.283Z" }, - { url = "https://files.pythonhosted.org/packages/8d/2f/95adb8dae08ce0ebca4fd8e7ad653159565d9739128b2d5977806656fcd2/contourpy-1.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6658ccc7251a4433eebd89ed2672c2ed96fba367fd25ca9512aa92a4b46c4f1", size = 313053, upload-time = "2025-04-15T17:36:03.235Z" }, - { url = "https://files.pythonhosted.org/packages/c3/a6/8ccf97a50f31adfa36917707fe39c9a0cbc24b3bbb58185577f119736cc9/contourpy-1.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:70771a461aaeb335df14deb6c97439973d253ae70660ca085eec25241137ef43", size = 352985, upload-time = "2025-04-15T17:36:08.275Z" }, - { url = "https://files.pythonhosted.org/packages/1d/b6/7925ab9b77386143f39d9c3243fdd101621b4532eb126743201160ffa7e6/contourpy-1.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65a887a6e8c4cd0897507d814b14c54a8c2e2aa4ac9f7686292f9769fcf9a6ab", size = 323750, upload-time = "2025-04-15T17:36:13.29Z" }, - { url = "https://files.pythonhosted.org/packages/c2/f3/20c5d1ef4f4748e52d60771b8560cf00b69d5c6368b5c2e9311bcfa2a08b/contourpy-1.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3859783aefa2b8355697f16642695a5b9792e7a46ab86da1118a4a23a51a33d7", size = 326246, upload-time = "2025-04-15T17:36:18.329Z" }, - { url = "https://files.pythonhosted.org/packages/8c/e5/9dae809e7e0b2d9d70c52b3d24cba134dd3dad979eb3e5e71f5df22ed1f5/contourpy-1.3.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:eab0f6db315fa4d70f1d8ab514e527f0366ec021ff853d7ed6a2d33605cf4b83", size = 1308728, upload-time = "2025-04-15T17:36:33.878Z" }, - { url = "https://files.pythonhosted.org/packages/e2/4a/0058ba34aeea35c0b442ae61a4f4d4ca84d6df8f91309bc2d43bb8dd248f/contourpy-1.3.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d91a3ccc7fea94ca0acab82ceb77f396d50a1f67412efe4c526f5d20264e6ecd", size = 1375762, upload-time = "2025-04-15T17:36:51.295Z" }, - { url = "https://files.pythonhosted.org/packages/09/33/7174bdfc8b7767ef2c08ed81244762d93d5c579336fc0b51ca57b33d1b80/contourpy-1.3.2-cp311-cp311-win32.whl", hash = "sha256:1c48188778d4d2f3d48e4643fb15d8608b1d01e4b4d6b0548d9b336c28fc9b6f", size = 178196, upload-time = "2025-04-15T17:36:55.002Z" }, - { url = "https://files.pythonhosted.org/packages/5e/fe/4029038b4e1c4485cef18e480b0e2cd2d755448bb071eb9977caac80b77b/contourpy-1.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:5ebac872ba09cb8f2131c46b8739a7ff71de28a24c869bcad554477eb089a878", size = 222017, upload-time = "2025-04-15T17:36:58.576Z" }, - { url = "https://files.pythonhosted.org/packages/34/f7/44785876384eff370c251d58fd65f6ad7f39adce4a093c934d4a67a7c6b6/contourpy-1.3.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4caf2bcd2969402bf77edc4cb6034c7dd7c0803213b3523f111eb7460a51b8d2", size = 271580, upload-time = "2025-04-15T17:37:03.105Z" }, - { url = "https://files.pythonhosted.org/packages/93/3b/0004767622a9826ea3d95f0e9d98cd8729015768075d61f9fea8eeca42a8/contourpy-1.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:82199cb78276249796419fe36b7386bd8d2cc3f28b3bc19fe2454fe2e26c4c15", size = 255530, upload-time = "2025-04-15T17:37:07.026Z" }, - { url = "https://files.pythonhosted.org/packages/e7/bb/7bd49e1f4fa805772d9fd130e0d375554ebc771ed7172f48dfcd4ca61549/contourpy-1.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:106fab697af11456fcba3e352ad50effe493a90f893fca6c2ca5c033820cea92", size = 307688, upload-time = "2025-04-15T17:37:11.481Z" }, - { url = "https://files.pythonhosted.org/packages/fc/97/e1d5dbbfa170725ef78357a9a0edc996b09ae4af170927ba8ce977e60a5f/contourpy-1.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d14f12932a8d620e307f715857107b1d1845cc44fdb5da2bc8e850f5ceba9f87", size = 347331, upload-time = "2025-04-15T17:37:18.212Z" }, - { url = "https://files.pythonhosted.org/packages/6f/66/e69e6e904f5ecf6901be3dd16e7e54d41b6ec6ae3405a535286d4418ffb4/contourpy-1.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:532fd26e715560721bb0d5fc7610fce279b3699b018600ab999d1be895b09415", size = 318963, upload-time = "2025-04-15T17:37:22.76Z" }, - { url = "https://files.pythonhosted.org/packages/a8/32/b8a1c8965e4f72482ff2d1ac2cd670ce0b542f203c8e1d34e7c3e6925da7/contourpy-1.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26b383144cf2d2c29f01a1e8170f50dacf0eac02d64139dcd709a8ac4eb3cfe", size = 323681, upload-time = "2025-04-15T17:37:33.001Z" }, - { url = "https://files.pythonhosted.org/packages/30/c6/12a7e6811d08757c7162a541ca4c5c6a34c0f4e98ef2b338791093518e40/contourpy-1.3.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c49f73e61f1f774650a55d221803b101d966ca0c5a2d6d5e4320ec3997489441", size = 1308674, upload-time = "2025-04-15T17:37:48.64Z" }, - { url = "https://files.pythonhosted.org/packages/2a/8a/bebe5a3f68b484d3a2b8ffaf84704b3e343ef1addea528132ef148e22b3b/contourpy-1.3.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3d80b2c0300583228ac98d0a927a1ba6a2ba6b8a742463c564f1d419ee5b211e", size = 1380480, upload-time = "2025-04-15T17:38:06.7Z" }, - { url = "https://files.pythonhosted.org/packages/34/db/fcd325f19b5978fb509a7d55e06d99f5f856294c1991097534360b307cf1/contourpy-1.3.2-cp312-cp312-win32.whl", hash = "sha256:90df94c89a91b7362e1142cbee7568f86514412ab8a2c0d0fca72d7e91b62912", size = 178489, upload-time = "2025-04-15T17:38:10.338Z" }, - { url = "https://files.pythonhosted.org/packages/01/c8/fadd0b92ffa7b5eb5949bf340a63a4a496a6930a6c37a7ba0f12acb076d6/contourpy-1.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:8c942a01d9163e2e5cfb05cb66110121b8d07ad438a17f9e766317bcb62abf73", size = 223042, upload-time = "2025-04-15T17:38:14.239Z" }, - { url = "https://files.pythonhosted.org/packages/2e/61/5673f7e364b31e4e7ef6f61a4b5121c5f170f941895912f773d95270f3a2/contourpy-1.3.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:de39db2604ae755316cb5967728f4bea92685884b1e767b7c24e983ef5f771cb", size = 271630, upload-time = "2025-04-15T17:38:19.142Z" }, - { url = "https://files.pythonhosted.org/packages/ff/66/a40badddd1223822c95798c55292844b7e871e50f6bfd9f158cb25e0bd39/contourpy-1.3.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3f9e896f447c5c8618f1edb2bafa9a4030f22a575ec418ad70611450720b5b08", size = 255670, upload-time = "2025-04-15T17:38:23.688Z" }, - { url = "https://files.pythonhosted.org/packages/1e/c7/cf9fdee8200805c9bc3b148f49cb9482a4e3ea2719e772602a425c9b09f8/contourpy-1.3.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:71e2bd4a1c4188f5c2b8d274da78faab884b59df20df63c34f74aa1813c4427c", size = 306694, upload-time = "2025-04-15T17:38:28.238Z" }, - { url = "https://files.pythonhosted.org/packages/dd/e7/ccb9bec80e1ba121efbffad7f38021021cda5be87532ec16fd96533bb2e0/contourpy-1.3.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de425af81b6cea33101ae95ece1f696af39446db9682a0b56daaa48cfc29f38f", size = 345986, upload-time = "2025-04-15T17:38:33.502Z" }, - { url = "https://files.pythonhosted.org/packages/dc/49/ca13bb2da90391fa4219fdb23b078d6065ada886658ac7818e5441448b78/contourpy-1.3.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:977e98a0e0480d3fe292246417239d2d45435904afd6d7332d8455981c408b85", size = 318060, upload-time = "2025-04-15T17:38:38.672Z" }, - { url = "https://files.pythonhosted.org/packages/c8/65/5245ce8c548a8422236c13ffcdcdada6a2a812c361e9e0c70548bb40b661/contourpy-1.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:434f0adf84911c924519d2b08fc10491dd282b20bdd3fa8f60fd816ea0b48841", size = 322747, upload-time = "2025-04-15T17:38:43.712Z" }, - { url = "https://files.pythonhosted.org/packages/72/30/669b8eb48e0a01c660ead3752a25b44fdb2e5ebc13a55782f639170772f9/contourpy-1.3.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c66c4906cdbc50e9cba65978823e6e00b45682eb09adbb78c9775b74eb222422", size = 1308895, upload-time = "2025-04-15T17:39:00.224Z" }, - { url = "https://files.pythonhosted.org/packages/05/5a/b569f4250decee6e8d54498be7bdf29021a4c256e77fe8138c8319ef8eb3/contourpy-1.3.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8b7fc0cd78ba2f4695fd0a6ad81a19e7e3ab825c31b577f384aa9d7817dc3bef", size = 1379098, upload-time = "2025-04-15T17:43:29.649Z" }, - { url = "https://files.pythonhosted.org/packages/19/ba/b227c3886d120e60e41b28740ac3617b2f2b971b9f601c835661194579f1/contourpy-1.3.2-cp313-cp313-win32.whl", hash = "sha256:15ce6ab60957ca74cff444fe66d9045c1fd3e92c8936894ebd1f3eef2fff075f", size = 178535, upload-time = "2025-04-15T17:44:44.532Z" }, - { url = "https://files.pythonhosted.org/packages/12/6e/2fed56cd47ca739b43e892707ae9a13790a486a3173be063681ca67d2262/contourpy-1.3.2-cp313-cp313-win_amd64.whl", hash = "sha256:e1578f7eafce927b168752ed7e22646dad6cd9bca673c60bff55889fa236ebf9", size = 223096, upload-time = "2025-04-15T17:44:48.194Z" }, - { url = "https://files.pythonhosted.org/packages/54/4c/e76fe2a03014a7c767d79ea35c86a747e9325537a8b7627e0e5b3ba266b4/contourpy-1.3.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0475b1f6604896bc7c53bb070e355e9321e1bc0d381735421a2d2068ec56531f", size = 285090, upload-time = "2025-04-15T17:43:34.084Z" }, - { url = "https://files.pythonhosted.org/packages/7b/e2/5aba47debd55d668e00baf9651b721e7733975dc9fc27264a62b0dd26eb8/contourpy-1.3.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c85bb486e9be652314bb5b9e2e3b0d1b2e643d5eec4992c0fbe8ac71775da739", size = 268643, upload-time = "2025-04-15T17:43:38.626Z" }, - { url = "https://files.pythonhosted.org/packages/a1/37/cd45f1f051fe6230f751cc5cdd2728bb3a203f5619510ef11e732109593c/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:745b57db7758f3ffc05a10254edd3182a2a83402a89c00957a8e8a22f5582823", size = 310443, upload-time = "2025-04-15T17:43:44.522Z" }, - { url = "https://files.pythonhosted.org/packages/8b/a2/36ea6140c306c9ff6dd38e3bcec80b3b018474ef4d17eb68ceecd26675f4/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:970e9173dbd7eba9b4e01aab19215a48ee5dd3f43cef736eebde064a171f89a5", size = 349865, upload-time = "2025-04-15T17:43:49.545Z" }, - { url = "https://files.pythonhosted.org/packages/95/b7/2fc76bc539693180488f7b6cc518da7acbbb9e3b931fd9280504128bf956/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c6c4639a9c22230276b7bffb6a850dfc8258a2521305e1faefe804d006b2e532", size = 321162, upload-time = "2025-04-15T17:43:54.203Z" }, - { url = "https://files.pythonhosted.org/packages/f4/10/76d4f778458b0aa83f96e59d65ece72a060bacb20cfbee46cf6cd5ceba41/contourpy-1.3.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc829960f34ba36aad4302e78eabf3ef16a3a100863f0d4eeddf30e8a485a03b", size = 327355, upload-time = "2025-04-15T17:44:01.025Z" }, - { url = "https://files.pythonhosted.org/packages/43/a3/10cf483ea683f9f8ab096c24bad3cce20e0d1dd9a4baa0e2093c1c962d9d/contourpy-1.3.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d32530b534e986374fc19eaa77fcb87e8a99e5431499949b828312bdcd20ac52", size = 1307935, upload-time = "2025-04-15T17:44:17.322Z" }, - { url = "https://files.pythonhosted.org/packages/78/73/69dd9a024444489e22d86108e7b913f3528f56cfc312b5c5727a44188471/contourpy-1.3.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e298e7e70cf4eb179cc1077be1c725b5fd131ebc81181bf0c03525c8abc297fd", size = 1372168, upload-time = "2025-04-15T17:44:33.43Z" }, - { url = "https://files.pythonhosted.org/packages/0f/1b/96d586ccf1b1a9d2004dd519b25fbf104a11589abfd05484ff12199cca21/contourpy-1.3.2-cp313-cp313t-win32.whl", hash = "sha256:d0e589ae0d55204991450bb5c23f571c64fe43adaa53f93fc902a84c96f52fe1", size = 189550, upload-time = "2025-04-15T17:44:37.092Z" }, - { url = "https://files.pythonhosted.org/packages/b0/e6/6000d0094e8a5e32ad62591c8609e269febb6e4db83a1c75ff8868b42731/contourpy-1.3.2-cp313-cp313t-win_amd64.whl", hash = "sha256:78e9253c3de756b3f6a5174d024c4835acd59eb3f8e2ca13e775dbffe1558f69", size = 238214, upload-time = "2025-04-15T17:44:40.827Z" }, - { url = "https://files.pythonhosted.org/packages/33/05/b26e3c6ecc05f349ee0013f0bb850a761016d89cec528a98193a48c34033/contourpy-1.3.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fd93cc7f3139b6dd7aab2f26a90dde0aa9fc264dbf70f6740d498a70b860b82c", size = 265681, upload-time = "2025-04-15T17:44:59.314Z" }, - { url = "https://files.pythonhosted.org/packages/2b/25/ac07d6ad12affa7d1ffed11b77417d0a6308170f44ff20fa1d5aa6333f03/contourpy-1.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:107ba8a6a7eec58bb475329e6d3b95deba9440667c4d62b9b6063942b61d7f16", size = 315101, upload-time = "2025-04-15T17:45:04.165Z" }, - { url = "https://files.pythonhosted.org/packages/8f/4d/5bb3192bbe9d3f27e3061a6a8e7733c9120e203cb8515767d30973f71030/contourpy-1.3.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ded1706ed0c1049224531b81128efbd5084598f18d8a2d9efae833edbd2b40ad", size = 220599, upload-time = "2025-04-15T17:45:08.456Z" }, - { url = "https://files.pythonhosted.org/packages/ff/c0/91f1215d0d9f9f343e4773ba6c9b89e8c0cc7a64a6263f21139da639d848/contourpy-1.3.2-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5f5964cdad279256c084b69c3f412b7801e15356b16efa9d78aa974041903da0", size = 266807, upload-time = "2025-04-15T17:45:15.535Z" }, - { url = "https://files.pythonhosted.org/packages/d4/79/6be7e90c955c0487e7712660d6cead01fa17bff98e0ea275737cc2bc8e71/contourpy-1.3.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49b65a95d642d4efa8f64ba12558fcb83407e58a2dfba9d796d77b63ccfcaff5", size = 318729, upload-time = "2025-04-15T17:45:20.166Z" }, - { url = "https://files.pythonhosted.org/packages/87/68/7f46fb537958e87427d98a4074bcde4b67a70b04900cfc5ce29bc2f556c1/contourpy-1.3.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:8c5acb8dddb0752bf252e01a3035b21443158910ac16a3b0d20e7fed7d534ce5", size = 221791, upload-time = "2025-04-15T17:45:24.794Z" }, + { name = "pillow", specifier = "==13.0.0" }, ] [[package]] @@ -101,7 +33,7 @@ name = "contourpy" version = "1.3.3" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*'", + "python_full_version < '3.12'", ] dependencies = [ { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" } }, @@ -273,90 +205,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" }, ] -[[package]] -name = "fonttools" -version = "4.65.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11'", -] -sdist = { url = "https://files.pythonhosted.org/packages/77/51/d63c7e52163ac14393a35bd14bd7c0da95f8f74be5d7cc988092f9965129/fonttools-4.65.0.tar.gz", hash = "sha256:762ba5431358d0dbd4a01982484a1d494fb267e91f974cdcf20b80eab8560f6f", size = 3674467, upload-time = "2026-09-10T15:35:54.955Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/53/d9/1caaa015dd207da7ccd3feba87289997bd88334ea3e74a367cdc7b0e50a3/fonttools-4.65.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:93a73af2075036d36d7fbf856779c56a1b3b86ffcdae6abede7596604c42c156", size = 3095449, upload-time = "2026-09-10T15:33:04.814Z" }, - { url = "https://files.pythonhosted.org/packages/20/d6/988cd9b33ae2d92b15a51d73eb77c991f7a0fe90a7bc74526e9669247789/fonttools-4.65.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c130be2232e3caf8d2b476854ea78421ec1642917ff5ab695284bac31bbb072b", size = 2587697, upload-time = "2026-09-10T15:33:07.653Z" }, - { url = "https://files.pythonhosted.org/packages/f8/6a/36f465a1c277131f9569f6a56fe99cf135391b4860b9c4f4b23e5b1cd5df/fonttools-4.65.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3944e0bdba42effb71959e43d91b599326b02b59c78310d5675e8a75525e7d8", size = 5313308, upload-time = "2026-09-10T15:33:09.975Z" }, - { url = "https://files.pythonhosted.org/packages/ee/56/151b5e81d20c63834f48ad37a0cbbbe2f9b248e38f8d10387f0cf5219244/fonttools-4.65.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fb53892b570f7f1f0055e75fc4de32673e32f749c4c8a606b63d5c436650e634", size = 5253649, upload-time = "2026-09-10T15:33:12.225Z" }, - { url = "https://files.pythonhosted.org/packages/c8/22/6389215da9d4f98623aacdca9479c1030bbd516cb658e893bc54b61098ce/fonttools-4.65.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a6c8d184e523580a7c55d21cde37176a3c91cb539cf06c2aa36ffc634fd75296", size = 5277745, upload-time = "2026-09-10T15:33:14.783Z" }, - { url = "https://files.pythonhosted.org/packages/89/e3/c1037a1dfb7c8efe6f2a7d1951ebdde40cbbf82e9c5d796fcb03077e4790/fonttools-4.65.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e5ceccaf2e57d83b753a2b5db5d94aa0a8071886d4afebd2d520c9683e6bef0e", size = 5413259, upload-time = "2026-09-10T15:33:17.619Z" }, - { url = "https://files.pythonhosted.org/packages/44/b9/7dd72330168d39635c329f23a98279393b1e825e42a6db362e09897aad7b/fonttools-4.65.0-cp310-cp310-win32.whl", hash = "sha256:aff640a4fcb021fa83f9879d5bfa115b6931522dae991a24faa75888bd6aeff6", size = 1577124, upload-time = "2026-09-10T15:33:19.864Z" }, - { url = "https://files.pythonhosted.org/packages/aa/c2/e959385b4626989b25b82b9f4f99e7c3ac68377d6846b376239b6f126966/fonttools-4.65.0-cp310-cp310-win_amd64.whl", hash = "sha256:5c1700a60e4ff23a0425d5a64abf43d092e6b55071354825781faf255904dcb4", size = 1633354, upload-time = "2026-09-10T15:33:21.963Z" }, - { url = "https://files.pythonhosted.org/packages/62/9e/58250cdc54d96fcfacb544e12997a6390fa4e6b71ae2241cfcfe5b341803/fonttools-4.65.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:06273c71e692caf5989c0437ca50875a5e49e216ddf653228fe9bb35bdc82c0f", size = 3089141, upload-time = "2026-09-10T15:33:24.509Z" }, - { url = "https://files.pythonhosted.org/packages/3e/67/0f0416069e38da0a1327a847a2e8dd1edb425d0043d8a3e63eb940070209/fonttools-4.65.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ca2b02d74e9ad7e21a1d11e4701425800a4b0c63cf90486e60258262feccbcbf", size = 2584298, upload-time = "2026-09-10T15:33:26.598Z" }, - { url = "https://files.pythonhosted.org/packages/99/0d/7e40e9957359afc0bab081131c215370a6d2d203361bb6f945ab595e924c/fonttools-4.65.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7830e9fa3bebc44dbc27ff44d8201def30ea5c48a773696d58e69e6bcd9cd5d4", size = 5498163, upload-time = "2026-09-10T15:33:29.071Z" }, - { url = "https://files.pythonhosted.org/packages/a1/e6/e48cf0a272a5d4d17a09d44f92727e67f975ddfa94acc8464763d19a654d/fonttools-4.65.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a3991732c87b3f054a2a8cf86dd0d602833fa8cb37c911503173771646e1013d", size = 5457456, upload-time = "2026-09-10T15:33:31.918Z" }, - { url = "https://files.pythonhosted.org/packages/e4/8a/a5c67ddeda82ee5e4ec3bc52ac1cbb685f0bb7a0516badc55643b454ab0d/fonttools-4.65.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6031e77b3fb8c765055ba2b8bd8dcb17030f3bf2484c448b472fdedf4460ba80", size = 5464334, upload-time = "2026-09-10T15:33:34.605Z" }, - { url = "https://files.pythonhosted.org/packages/d7/16/294e77383b2d39c9f8f25144a7ba23fe1cbbc05227cc72545097785ff07c/fonttools-4.65.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6813cc1e2e883bd6c15b3e04f72c78dc65fdc4ca861063adf5f341fbaec2ca62", size = 5595597, upload-time = "2026-09-10T15:33:37.591Z" }, - { url = "https://files.pythonhosted.org/packages/80/01/8e74ce8626c734959c782f2d89af8e9f14d078fd3d4ddf8b5a51401ae475/fonttools-4.65.0-cp311-cp311-win32.whl", hash = "sha256:4a5db8442453da4b6f43ad325879381b726bf2238a2253efd9584be21a2cefc2", size = 2441114, upload-time = "2026-09-10T15:33:40.592Z" }, - { url = "https://files.pythonhosted.org/packages/37/3e/835dc6c658426e2670b7f38c38295492fcbaeb06080e9dce89ce8105993c/fonttools-4.65.0-cp311-cp311-win_amd64.whl", hash = "sha256:9f201796c8e24e657be77c16fa664e798a46122144217f90838982937a964f0a", size = 2498823, upload-time = "2026-09-10T15:33:43.402Z" }, - { url = "https://files.pythonhosted.org/packages/58/db/242fa4fce7f632c5f7ab15585343393b25792510c0c32bd218ad24d59f1c/fonttools-4.65.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e844a45c9e5ced6536f184cf1a65b5d65e8f7e711993b413e10500a8223622e5", size = 3097120, upload-time = "2026-09-10T15:33:46Z" }, - { url = "https://files.pythonhosted.org/packages/a0/b6/42fa4d373416675f74446421cf0b2badb82a4245c60745f05f424f75c649/fonttools-4.65.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b30e953de049bf43fc0a63c7d0c44d205c923e4bbf24716aae1518c0e65f977c", size = 2584658, upload-time = "2026-09-10T15:33:48.473Z" }, - { url = "https://files.pythonhosted.org/packages/75/6f/d589b9d62280a846c77a2c383d852c6dcb79ae8aa02bf0fa46c8577af145/fonttools-4.65.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09c34bdeed8915bfb53bee0c8ed2254dbd8ec69c0014b7f3702f347c049bf358", size = 5425737, upload-time = "2026-09-10T15:33:51.473Z" }, - { url = "https://files.pythonhosted.org/packages/b5/09/de2c0c20a42c18e565a2617932beb08c06697bbdd0d3f62b108262e11583/fonttools-4.65.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:05595385ae99f4b9626cebb973bf171b8fe38a8f40708e6e42abba0ed7537778", size = 5402463, upload-time = "2026-09-10T15:33:54.907Z" }, - { url = "https://files.pythonhosted.org/packages/79/2e/bc0f5c9dce21821454bb5812d3b23410bca33c8bbd5468386d0327aa0cff/fonttools-4.65.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d95b34dd68fbfc0e4a1740c421597656117f979ed8dc85de66e08f9f9981806e", size = 5362168, upload-time = "2026-09-10T15:33:57.481Z" }, - { url = "https://files.pythonhosted.org/packages/1f/0d/2116763ade7e71e0e5d421babe1785d745be9b3d605bf914792ce1c97f79/fonttools-4.65.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:924d06e6130429168318db71c40174a765ad016fc4b56ca811287e3d7373b3a6", size = 5524117, upload-time = "2026-09-10T15:34:00.021Z" }, - { url = "https://files.pythonhosted.org/packages/e2/5e/f9600553b9f645e3068553831685ff1dab6259536a23b38d2e048de38f17/fonttools-4.65.0-cp312-cp312-win32.whl", hash = "sha256:04f73dd01005752a6e75cf4a8dc6b70dc724d1d4bc34cc89522153f4a2f07680", size = 2432089, upload-time = "2026-09-10T15:34:02.803Z" }, - { url = "https://files.pythonhosted.org/packages/3a/02/e436a6a1863b9862bab9f82d6da33055dd7aa3738017edd902a163525dc2/fonttools-4.65.0-cp312-cp312-win_amd64.whl", hash = "sha256:3b5d9ba89edf778b376e669b879ae33a198bf45cf5a23c3f6514f935cf9d0d9d", size = 2483475, upload-time = "2026-09-10T15:34:05.09Z" }, - { url = "https://files.pythonhosted.org/packages/c4/5c/343a4225e83eb06f82c1d8bf41fc5e5f71eab2f62bc7ca215c764722c0a9/fonttools-4.65.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8b7bb52817a24731d2e4f4df0e71fdde05e6c806c8f8f1517b015d142fdacfa5", size = 3094663, upload-time = "2026-09-10T15:34:07.235Z" }, - { url = "https://files.pythonhosted.org/packages/9b/c9/49b2401be932741d9218181c08948c96db32eab21ecaaf79283b752e13e7/fonttools-4.65.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e2c21772fcf70325189707b19f346812690bb1b0bd7e207e6ac205244806b303", size = 2584521, upload-time = "2026-09-10T15:34:09.648Z" }, - { url = "https://files.pythonhosted.org/packages/51/c9/48b07e6c5cf44fa56f758a04c3772a66c0e9ba82bbe22077e4076746a62b/fonttools-4.65.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c9b26816415b5e3d899e9077109d327b22140fe3c4066644d8cdbad5bb1569", size = 5395399, upload-time = "2026-09-10T15:34:12.38Z" }, - { url = "https://files.pythonhosted.org/packages/fa/2d/5cc5a10c8ed56079d6c2e9e3e5920622529a2ae045c9f47a6055ccb1a319/fonttools-4.65.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6dd6243f60e2d6160c2966e1e14020dc261ffd741b69a2e4ca8bfd051592e4b7", size = 5376659, upload-time = "2026-09-10T15:34:15.239Z" }, - { url = "https://files.pythonhosted.org/packages/ab/6f/ccf33739d936bb3afa1655a225be7ee5d63d6d3c8b7d0e570bc5a2a7b899/fonttools-4.65.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:834962fd7cf21c58e81ac50a59e6ed2306f9df5e3dd481dad1cd7d2c4c60b773", size = 5336795, upload-time = "2026-09-10T15:34:17.817Z" }, - { url = "https://files.pythonhosted.org/packages/7e/c1/ffd17483f2094f0f4118974295b514b5b82afd4f6e3c80c23f01684e97a6/fonttools-4.65.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:580eb68ff7bd6954a7a76afddd864bfc66eaaf5f5c20dd6ead9186d0055a4ffe", size = 5496530, upload-time = "2026-09-10T15:34:20.241Z" }, - { url = "https://files.pythonhosted.org/packages/b1/19/9aca7712d0676ba5f8d1530ce20478a9bb09cccd0153d56693337379cdcf/fonttools-4.65.0-cp313-cp313-win32.whl", hash = "sha256:7a18b2ffd44249fe84289253197aa65ad4f2de554c0d381f18b1f5939bc6bc60", size = 2430392, upload-time = "2026-09-10T15:34:22.906Z" }, - { url = "https://files.pythonhosted.org/packages/1f/6f/f015dea0f4354e0798751b657cea2dee482914737f88bf1a078349ce92cf/fonttools-4.65.0-cp313-cp313-win_amd64.whl", hash = "sha256:8ae1846b0f192fd485d26a455af19b8f5cf05aff08f9836f533913d8fcea133c", size = 2481620, upload-time = "2026-09-10T15:34:25.816Z" }, - { url = "https://files.pythonhosted.org/packages/64/29/606365ef601668bfebed14cfe3dc72bb7fcd1e23011bbb2833f17fea3065/fonttools-4.65.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:dc87a9f846bec83c3795804f62b4632716d46e3522869a3dd9cd44a5d245b006", size = 3098393, upload-time = "2026-09-10T15:34:28.472Z" }, - { url = "https://files.pythonhosted.org/packages/c7/61/11412939d6b7abf5ac7ce0d61d7f94a0a4fbabc9f1ab0a04fa622e0fc11c/fonttools-4.65.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:aa50dd7b9baf75e2bbd43401fc0d237f7a94a8ad2e0c57ea97160fc631af5eb0", size = 2585766, upload-time = "2026-09-10T15:34:31.207Z" }, - { url = "https://files.pythonhosted.org/packages/db/17/734921d8aee8309801da42590375d32d4d46f771b73373ec9520d5d4220b/fonttools-4.65.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0d2a9892fdb3b7e2d0f4174e3b907d226ff83698249762eeefce08ec5b2de1dd", size = 5380679, upload-time = "2026-09-10T15:34:33.933Z" }, - { url = "https://files.pythonhosted.org/packages/cf/eb/2a4d78d60d978e694cfa04c98e4d8ddbf7f028fd768ddef470bb9da5d69e/fonttools-4.65.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6d815734e7fede0ad1f233f23f0f191cbe8fc64762ff041e589bc0f78e0b2397", size = 5321833, upload-time = "2026-09-10T15:34:36.295Z" }, - { url = "https://files.pythonhosted.org/packages/d9/ca/1cd48b5c11ef9658732787bf2362e1bf3871dad5945d2f6cc8f675ca769c/fonttools-4.65.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:71e4c67b6196a2f447f46476fd2302604721617f5e0a21b0988bdd87b6bb9687", size = 5320938, upload-time = "2026-09-10T15:34:38.992Z" }, - { url = "https://files.pythonhosted.org/packages/c6/0d/90e6051bded926cccabe9dd0bce3b6ca012f4d5779d61167afbf4989ceb6/fonttools-4.65.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b11d8a4a0c3ca74bbd4c105b7ef82501945c939e6096d9934ec7d288cdf5aaa9", size = 5451747, upload-time = "2026-09-10T15:34:41.387Z" }, - { url = "https://files.pythonhosted.org/packages/18/74/23e0268e48029ff0752083f69312c49b738163d5af919add9dc4ac81e907/fonttools-4.65.0-cp314-cp314-win32.whl", hash = "sha256:8e44a34d91b3c793879767eb115867ced74d2eb94974e64e72fe9e2eea71cf1a", size = 2434246, upload-time = "2026-09-10T15:34:44.385Z" }, - { url = "https://files.pythonhosted.org/packages/a1/2d/ee69affecd4bc81cb932a213438d4199fb48bf8ca6d664438ccc7f623c2a/fonttools-4.65.0-cp314-cp314-win_amd64.whl", hash = "sha256:0aa8901db22875c831d6a91796549590d7e747da37438f38b69d771b668be445", size = 2486706, upload-time = "2026-09-10T15:34:46.842Z" }, - { url = "https://files.pythonhosted.org/packages/8e/9c/edee5f785198ce3327e1ddeace91c773122d47f086a67e0a84b800f4a940/fonttools-4.65.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:2e4a380ca40d3a5372e31b340f0da0d53b4583aadbb8e41f6a516afa69c509a4", size = 3172027, upload-time = "2026-09-10T15:34:49.269Z" }, - { url = "https://files.pythonhosted.org/packages/9c/c6/252ec9884381089bc30da75978b072593920249de60219817f16cbc9145f/fonttools-4.65.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:661bd91c4be13721408b2d4b67a9b3fa7736713adc9a6c9780c9c60fc7959f90", size = 2619020, upload-time = "2026-09-10T15:34:51.453Z" }, - { url = "https://files.pythonhosted.org/packages/42/79/f71b0d202b8473bb45b07876c08a474de9fe560ed2c0cde642812a81e22a/fonttools-4.65.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:62c5e42c79449def957adf8a9a65a43018efa7e2a6bc6baa3afe955e0d5fb2ab", size = 5545942, upload-time = "2026-09-10T15:34:54.804Z" }, - { url = "https://files.pythonhosted.org/packages/4a/bd/52e1bf33e0aebfe22ecc9a85c634db707c1dd9f6b1b438efeed98c55b959/fonttools-4.65.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:36fca8efc46b5adfca327c666e739fc05b7a7a6ef17840230f81b22f53230f61", size = 5351477, upload-time = "2026-09-10T15:34:57.514Z" }, - { url = "https://files.pythonhosted.org/packages/5c/76/8c6b2ad20beec95cd446f3a8bdc753c7e4a4fd69ef3e66704c0f7c8cb0b5/fonttools-4.65.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8aa1291e4c767abf1b0b79ca2d6895f7c0b661d9d95d03b5791c883a9d1e1f08", size = 5412271, upload-time = "2026-09-10T15:35:00.895Z" }, - { url = "https://files.pythonhosted.org/packages/79/49/fadbf11bbbd2d699d88a5498a0634280206e01e3bd5da9a4e0c504953ce9/fonttools-4.65.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:fcf39949f56911348514b466714efa9118bec3d2be249e1c487263f7cda6edab", size = 5446450, upload-time = "2026-09-10T15:35:03.369Z" }, - { url = "https://files.pythonhosted.org/packages/df/77/5fda646d3a6d5ee26465865c00319cc0925cf484a3b42dd8232d5b39f973/fonttools-4.65.0-cp314-cp314t-win32.whl", hash = "sha256:ffc918702661f1d74d2fbb2f5551036b64f6d2d743139e105289b694bcd16f54", size = 2467858, upload-time = "2026-09-10T15:35:05.744Z" }, - { url = "https://files.pythonhosted.org/packages/ae/0f/afa0f3de70ebe02bba46b32cccb30b1de52624472b14ac2e7cd403d08db9/fonttools-4.65.0-cp314-cp314t-win_amd64.whl", hash = "sha256:5a977e3645dbffaee924209828aa702a215f7ff68bc08010740c10c723787e62", size = 2518248, upload-time = "2026-09-10T15:35:07.846Z" }, - { url = "https://files.pythonhosted.org/packages/86/54/b273cf5712b36a381c13284fbf244e811e1e1d7081aed20f200f0a191ffa/fonttools-4.65.0-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:7aa0518b45ff5286ad56f063938db3add3816e899aab58d782b3f9a252523caa", size = 3092770, upload-time = "2026-09-10T15:35:10.868Z" }, - { url = "https://files.pythonhosted.org/packages/36/1d/d3e4511475954d4ec4f3c254e81f0fcc1ade504cb7381eeca48b8c44b8a6/fonttools-4.65.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:673e2b3ac4ac8e4f3607d390ecc5a606e5db5c4e88fb4cb2999593efb65afea2", size = 2584364, upload-time = "2026-09-10T15:35:13.54Z" }, - { url = "https://files.pythonhosted.org/packages/e5/3f/7cfaba467bdd1d3d04be21ba7b5bd75c6ca58ba280e0519707ca96a43c4d/fonttools-4.65.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a03cff943b204a90bf3d1c04c97b9509a8aa0ee99e2e544084ca43ad995975b", size = 5377819, upload-time = "2026-09-10T15:35:15.839Z" }, - { url = "https://files.pythonhosted.org/packages/25/17/a68d9b19a97bb2ee37e8098fea50657073df97c7e5392afbe1b9d7c0c581/fonttools-4.65.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:41f684ee6212e411196ab054f8308faf6605f154950e6f4686fb8f2103d624b0", size = 5341296, upload-time = "2026-09-10T15:35:18.527Z" }, - { url = "https://files.pythonhosted.org/packages/ad/8d/d744653ed607a241339015d4af6743ca3d85a74a2045a02cc06ea0383c71/fonttools-4.65.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:52ea9d2a8385075770db74d5e5718fa80b2222bb4fc62856a377dd2865ca8848", size = 5315310, upload-time = "2026-09-10T15:35:20.853Z" }, - { url = "https://files.pythonhosted.org/packages/f0/c8/1ca6dc69cbaa0e394ff70d9e266777124d3ce3c6433026a6b4de50b890ae/fonttools-4.65.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:d0d25027ade65ec46b13c0436e51bcb7c5171a4ea255a5e7a8d0d1d3ab4cffd7", size = 5463840, upload-time = "2026-09-10T15:35:24.022Z" }, - { url = "https://files.pythonhosted.org/packages/07/97/d374df38a14f2ac04ba9ed96bca89d4988e7d63aa5ed85c54fd8f2badd7d/fonttools-4.65.0-cp315-cp315-win32.whl", hash = "sha256:22cb846d35d278235ef3b7e947c6040b2057d72e8305a314f21d5342eca49040", size = 2433149, upload-time = "2026-09-10T15:35:26.59Z" }, - { url = "https://files.pythonhosted.org/packages/62/c5/eb8f7506faf6a70c5a8f2eccbeea3cd826c748a6fd78c7b4b3effb5a3a11/fonttools-4.65.0-cp315-cp315-win_amd64.whl", hash = "sha256:aecc899fdbf9ecbf728f8977977e2e1043ee4d70c257124c8fa4cbcf796fcd83", size = 2485725, upload-time = "2026-09-10T15:35:28.945Z" }, - { url = "https://files.pythonhosted.org/packages/f1/a4/2df0d97514feb8d857d5de854cd8d660d9a7ee1fd081bc98497124f515a8/fonttools-4.65.0-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:6275863dad195ee34b6e0ca3fc61c74096bc37e5d6fb8e049f4d68d65865a2b7", size = 3164065, upload-time = "2026-09-10T15:35:31.197Z" }, - { url = "https://files.pythonhosted.org/packages/15/33/e09661c09e6c8a3b0bd50da0e72918df7576dede31f39c948cc245011434/fonttools-4.65.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:d8ffd2f62b402180b0edae8f86a071f583970e2177143117db5cf4c52da60079", size = 2615195, upload-time = "2026-09-10T15:35:33.569Z" }, - { url = "https://files.pythonhosted.org/packages/64/d7/114b05f4193679d0935272220083ec43de7f918b5a777018c5ac5c1ae39e/fonttools-4.65.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:830f91327ca83bfc1278e7060068a498938f84d05dc4869675486f84f55d4fe1", size = 5521239, upload-time = "2026-09-10T15:35:36.291Z" }, - { url = "https://files.pythonhosted.org/packages/ba/10/67d615939f859ffe75663a67bca3593966febbcd0109ec72f20f73cbb4cc/fonttools-4.65.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9db2cb95847c18eef74a4ef0fe257a893ae3f4b0395f4866e2f426ab07f3d804", size = 5343802, upload-time = "2026-09-10T15:35:38.82Z" }, - { url = "https://files.pythonhosted.org/packages/d1/06/faa793a806da03acce862fbed353f76026b28103d43860d69be9a6a1f0fd/fonttools-4.65.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:be9b9a95ed0af03375e99020e921c4bc6b41fad10e053dea7acad370521a3c46", size = 5388482, upload-time = "2026-09-10T15:35:41.616Z" }, - { url = "https://files.pythonhosted.org/packages/53/d2/eb7258df60e634db60c9a8cd72bc9eaf8dea409d1b1ceec3b9fb49531ad2/fonttools-4.65.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:bbd9faf777a9deb6790df4f2b0be611857c45fe86605e840d7154a028d828af7", size = 5435088, upload-time = "2026-09-10T15:35:44.639Z" }, - { url = "https://files.pythonhosted.org/packages/00/6a/58597f16e1265fe9205de3069e338a339e3eef0b1daf049ee08269458091/fonttools-4.65.0-cp315-cp315t-win32.whl", hash = "sha256:c779d838815b91889c95ed64c9be5950ad5a683279f91aeb23384cb757ddc6a3", size = 2464925, upload-time = "2026-09-10T15:35:47.224Z" }, - { url = "https://files.pythonhosted.org/packages/4b/95/122fc172006db747f4968e08c710f52a94f55eb007173b859b3f80b5b810/fonttools-4.65.0-cp315-cp315t-win_amd64.whl", hash = "sha256:d9484b7ee1b49b6b8a0231c849f3983723dec29e3a7366d9b1b02f4036f71944", size = 2513945, upload-time = "2026-09-10T15:35:49.895Z" }, - { url = "https://files.pythonhosted.org/packages/e6/35/f894ceb867118c0261d0f69a9bd516b045a3754238f76c88a49513ac7a83/fonttools-4.65.0-py3-none-any.whl", hash = "sha256:3060b8c1fc2329fa20265b7c138614143ea7c1624e26c5c180c76aeb74deae6f", size = 1196441, upload-time = "2026-09-10T15:35:52.347Z" }, -] - [[package]] name = "fonttools" version = "4.67.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.12'", - "python_full_version == '3.11.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/94/36/102e180f8f5dbaee88b26595b01ca8aa80bf4e62128d9aa94265b3996c96/fonttools-4.67.0.tar.gz", hash = "sha256:3cb57e6600ca77c0b1729cf8adc23bc0652633a37f18cfa934d9c7bc3de25519", size = 3750028, upload-time = "2026-10-14T13:20:28.294Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/5e/a5/723340838581bbed0590429662750dc70d67ba671947b7d5fa06a4e15c19/fonttools-4.67.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:47dba566b4f475b0fb5f83129487c21b6a6a4edc41c0eec52524f969a68a3d45", size = 3100299, upload-time = "2026-10-14T13:18:21.068Z" }, @@ -424,19 +276,6 @@ version = "1.5.1" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/ba/07/bd78e6a8fae171ea041ef5bba3ed21a003522fa088834b069b1909981f30/kiwisolver-1.5.1.tar.gz", hash = "sha256:f1303ef2eec81262a4b708c3e858afe58d7c75ad91c1c05266eda7673369859a", size = 104395, upload-time = "2026-08-28T10:28:27.153Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/23/54/1b8d2bc580414cc75b3a5b3d195981a6facacd8a8d986e589d0a3b51a709/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1acc7e5b7ef05e9da8bb70cd6c7c4513090213d2e1ad9720f599f0bf6c52aec5", size = 123362, upload-time = "2026-08-28T10:24:43.402Z" }, - { url = "https://files.pythonhosted.org/packages/57/19/92c30f540dcfff86ff625389427c39b53a9aaea16420ddcc09b2ab8d1073/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bad20d4c69c851c982a1e3606f4c293edfd5a87885786c50082412240c4b1ffd", size = 66551, upload-time = "2026-08-28T10:24:44.768Z" }, - { url = "https://files.pythonhosted.org/packages/30/ae/30b94088722e7bce8b821cd5ee935a87f80023e7243125f1accf98e39bf7/kiwisolver-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0a4faea5c6db201c6a21391d2ac926ea97acf7dacdbc3c417189e1adb1a00837", size = 64076, upload-time = "2026-08-28T10:24:46.184Z" }, - { url = "https://files.pythonhosted.org/packages/f1/0e/9f394d693be549fa3fab62498c2778294595991047adc3dcf10aa99b91c0/kiwisolver-1.5.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e05c2f7925f1d88778e53cb44f14e0223204a3bdd09a41664750363acfb1f2ef", size = 1628782, upload-time = "2026-08-28T10:24:47.91Z" }, - { url = "https://files.pythonhosted.org/packages/64/96/26efc04348c0f332b6e6c471dff132bb8b18b2df494a1b65826601674e62/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3a4e41e3096bf1f0f1b76e2ffd6d828d6547f574f702d59bdbef7acfa59db9c", size = 1228112, upload-time = "2026-08-28T10:24:49.503Z" }, - { url = "https://files.pythonhosted.org/packages/5a/ac/df9ddc19ec972cd97b60b262dd2c4be28c6192b5a779cad429c6657ee680/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1d56ec54d257d05e0b50f5780d967540cd07beeaf9e5f645b26d50cce79f4d8", size = 1246756, upload-time = "2026-08-28T10:24:51.225Z" }, - { url = "https://files.pythonhosted.org/packages/cf/de/c38a246b8a4f4b293c7291aa650917b05c5549b0d532749bc523296e90c4/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8de6f2a4ce7e7bd27d23dd94abf0ccafe0e0e5cc9c764b0577191f2c25f08f26", size = 1295555, upload-time = "2026-08-28T10:24:52.953Z" }, - { url = "https://files.pythonhosted.org/packages/b6/48/3c95a5232d8b5783050d8c8089b58bf1f57018f9135232d72c5aa6b0c01b/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:16895f553ee6620a827d2da56b871f835fb70b9216cca5d188e885caf6e3bd23", size = 2179476, upload-time = "2026-08-28T10:24:54.568Z" }, - { url = "https://files.pythonhosted.org/packages/e6/e9/b9e999336afc561b154e93682f597832bdc7446f2ee18b467c5b0e924867/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6b92f60017dda7d877fdc546438b5e28f31c523264f49cf5a48c1d0ce1a0dfbc", size = 2275258, upload-time = "2026-08-28T10:24:56.186Z" }, - { url = "https://files.pythonhosted.org/packages/76/cd/c1c550796ada4a59644b8264b425fe332686d2a086c4729fcc640ececdfe/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:7824b5e8bdbf0bccb4ccd37bbb115849a1dc45437fb4de8351385ed07c437ee0", size = 2443424, upload-time = "2026-08-28T10:24:58.093Z" }, - { url = "https://files.pythonhosted.org/packages/b2/d4/30f641eb8e10f6ad5bb9af8a15ec8eea386162a6ef491e68995b8680ef4e/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:aa7d00b1700966d2917e54d278aba86897890ca9276dd8b76cf6446b6c181b92", size = 2249457, upload-time = "2026-08-28T10:25:00.223Z" }, - { url = "https://files.pythonhosted.org/packages/1c/d9/211e016f8aa5b5bf496dd3bd7ebab4b73b22d91f025f25e20156a44a77fc/kiwisolver-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:96c30002424670b5e1e46495c2b8cbffef39cf77c1d79e76462029d50339785b", size = 70643, upload-time = "2026-08-28T10:25:01.888Z" }, - { url = "https://files.pythonhosted.org/packages/9e/8e/ae7007266dea1fd93fcc48541042c1f6583958055de3b424a59ec16def25/kiwisolver-1.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:f0f4a42db92d6ec7677ab9d12830a2a8ec145a9c6d15db2b593466bc875c78d7", size = 68215, upload-time = "2026-08-28T10:25:03.136Z" }, { url = "https://files.pythonhosted.org/packages/94/7b/2de6908edc668427c149af5f93112e931f87e1fa4cab80bac32c5844dccc/kiwisolver-1.5.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b3d78f7bb2b9d9a30345be1474b9aaa8685430b54afb51ba3639b5c6c11e9ed6", size = 123364, upload-time = "2026-08-28T10:25:04.359Z" }, { url = "https://files.pythonhosted.org/packages/8a/24/e70914415c77c97be7e22c80a0740869cb7428768cc380fdcdf6703e7084/kiwisolver-1.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5025e36fb4fb275cef0a4e30dbb11cb4ae61d1c83deb90189cb5d7e4cafd6b55", size = 66558, upload-time = "2026-08-28T10:25:05.506Z" }, { url = "https://files.pythonhosted.org/packages/e8/2b/8b08b11833db4d475b8ef1f36174f8d8a7abd31bedd7e794be78e8814b48/kiwisolver-1.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc1a26b8e53395a01c2c611e58602fa47461f136fba7cd5542e6db6d64be1839", size = 64071, upload-time = "2026-08-28T10:25:06.7Z" }, @@ -554,11 +393,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a9/c4/1407df7512a5b36cc79840e01710dc575733c461b13ab866cae77eaf87f3/kiwisolver-1.5.1-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:482676e5bd48d70ac99d9fc78863469845421e01184fa83f1f9366dc49f7e974", size = 134002, upload-time = "2026-08-28T10:28:08.881Z" }, { url = "https://files.pythonhosted.org/packages/16/45/c37a21ad5c0ab581a93c55ad544721aaa1f0ae94edb29c6a678a23d013e6/kiwisolver-1.5.1-graalpy312-graalpy250_312_native-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:072bdb15a3c19a5b5dbc8f8fb1f4e1884bf4f3507eeb4cc6334401274d37a5c0", size = 194292, upload-time = "2026-08-28T10:28:11.06Z" }, { url = "https://files.pythonhosted.org/packages/a6/c1/69f00d627949580e43d57af0aa465df46868d7c29801c137a55374101294/kiwisolver-1.5.1-graalpy312-graalpy250_312_native-win_amd64.whl", hash = "sha256:a5a00665d1a0e26763a7338d7e911d4598fbc1d50dd0d6b7919b7dc6c5d6569f", size = 73362, upload-time = "2026-08-28T10:28:12.449Z" }, - { url = "https://files.pythonhosted.org/packages/ba/f1/8bae9fac0f1837679ed59a5dd7e97e7eb943b738defa7cc0117ea0d107dc/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a5716a33bfabb2c6ce27b6cf03253467b3804f83e215f4d202685cf93c6c9874", size = 59543, upload-time = "2026-08-28T10:28:13.794Z" }, - { url = "https://files.pythonhosted.org/packages/c3/3e/42e3639d32ef3ac6ede80c39dc1d1df6224927409960d8f762b6cb504efe/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:685929988b208a911f1285e2f8ed54210b0d681a3dc0f03e00d599d291986e7e", size = 57504, upload-time = "2026-08-28T10:28:15.074Z" }, - { url = "https://files.pythonhosted.org/packages/e1/12/f4beaaceb740b96c363a8fa6f34dbdf37a58d9e5f15416427d7bf89c552a/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e4e49f7e1a4e7191bdf9dc67a974db714501b1fc52c24324103d06a86abd5c08", size = 79885, upload-time = "2026-08-28T10:28:16.345Z" }, - { url = "https://files.pythonhosted.org/packages/02/24/18d8a755acdae79c37ca2f1a925795aab67b9456c30c8569c377ea3abc77/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0a887b6565bbfe80efde2b7f6e8890d7d9bbdb11bdb17028a3690c32fe0621f", size = 77582, upload-time = "2026-08-28T10:28:17.719Z" }, - { url = "https://files.pythonhosted.org/packages/df/a9/b86dde4f553ef74db0f9c32398614e24b2e8ec1d29a6ca04ae080d7dd29b/kiwisolver-1.5.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1983f0974a750a6f6556f368ba11105d1d8369c735b944747c9f12ae5aea7aae", size = 98321, upload-time = "2026-08-28T10:28:19.087Z" }, { url = "https://files.pythonhosted.org/packages/b5/1d/59ba570b1774e95e97fde3a0981b2e22118a7a495f73bf74cedc538566a0/kiwisolver-1.5.1-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:416ba7ff9f233b7036689bb5a3783537e838ad483f63558d2a800f75afe738b1", size = 59450, upload-time = "2026-08-28T10:28:20.383Z" }, { url = "https://files.pythonhosted.org/packages/22/98/a6849f04dc18b5400e8b98affa2cd8fd86ed583085f036e57b32e571f4fa/kiwisolver-1.5.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:8af9b142ad719ae3a911ebf616bc4b78b32bbab84d6a40d3ad2f129670509957", size = 57400, upload-time = "2026-08-28T10:28:21.632Z" }, { url = "https://files.pythonhosted.org/packages/f4/ce/a7dc71353dd06a4cbe02222773f52d4a28c81e5a452a75797f8ed113dc99/kiwisolver-1.5.1-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5daa1f19e097050b9c4d9a78fcc9263cb96c9dfae08037ddc1b7c4ad1889f2a2", size = 79891, upload-time = "2026-08-28T10:28:22.936Z" }, @@ -571,15 +405,12 @@ name = "matplotlib" version = "3.10.9" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "contourpy", version = "1.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "contourpy", version = "1.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "contourpy", version = "1.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, { name = "contourpy", version = "1.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, { name = "cycler" }, - { name = "fonttools", version = "4.65.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "fonttools", version = "4.67.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "fonttools" }, { name = "kiwisolver" }, - { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.11.*'" }, + { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, { name = "numpy", version = "2.5.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.12'" }, { name = "packaging" }, { name = "pillow" }, @@ -588,12 +419,6 @@ dependencies = [ ] sdist = { url = "https://files.pythonhosted.org/packages/63/1b/4be5be87d43d327a0cf4de1a56e86f7f84c89312452406cf122efe2839e6/matplotlib-3.10.9.tar.gz", hash = "sha256:fd66508e8c6877d98e586654b608a0456db8d7e8a546eb1e2600efd957302358", size = 34811233, upload-time = "2026-04-24T00:14:13.539Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/18/6f/340b04986e67aac6f66c5145ce68bf72c64bed30f92c8913499a6e6b8f99/matplotlib-3.10.9-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77210dce9cb8153dffc967efaae990543392563d5a376d4dd8539bebcb0ed217", size = 8296625, upload-time = "2026-04-24T00:11:43.376Z" }, - { url = "https://files.pythonhosted.org/packages/bb/2f/127081eb83162053ebb9678ceac64220b93a663e0167432566e9c7c82aab/matplotlib-3.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1e7698ac9868428e84d2c967424803b2472ff7167d9d6590d4204ed775343c3b", size = 8188790, upload-time = "2026-04-24T00:11:46.556Z" }, - { url = "https://files.pythonhosted.org/packages/fc/b7/d8bcec2626c35f96972bff656299fef4578113ea6193c8fdad324710410c/matplotlib-3.10.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1aa972116abb4c9d201bf245620b433726cb6856f3bef6a78f776a00f5c92d37", size = 8769389, upload-time = "2026-04-24T00:11:48.959Z" }, - { url = "https://files.pythonhosted.org/packages/12/49/b78e214a527ea732033b7f4d37f7afb504d74ba9d134bd47938230dfb8b1/matplotlib-3.10.9-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae2f11957b27ce53497dd4d7b235c4d4f1faf383dfb39d0c5beb833bff883294", size = 9589657, upload-time = "2026-04-24T00:11:51.915Z" }, - { url = "https://files.pythonhosted.org/packages/5f/15/5246f7b43beae19c74dfee651d58d6cc8112e06f77adb4e88cc04f2e3a23/matplotlib-3.10.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b049278ddce116aaa1c1377ebf58adea909132dfce0281cf7e3a1ea9fc2e2c65", size = 9651983, upload-time = "2026-04-24T00:11:54.766Z" }, - { url = "https://files.pythonhosted.org/packages/75/77/5acecfe672ba0fa1b8c0454f69ce155d1e6fc5852fa7206bf9afaf767121/matplotlib-3.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:82834c3c292d24d3a8aae77cd2d20019de69d692a34a970e4fdb8d33e2ea3dda", size = 8199701, upload-time = "2026-04-24T00:11:58.389Z" }, { url = "https://files.pythonhosted.org/packages/4c/8c/290f021104741fea63769c31494f5324c0cd249bf536a65a4350767b1f22/matplotlib-3.10.9-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:68cfdcede415f7c8f5577b03303dd94526cdb6d11036cecdc205e08733b2d2bb", size = 8306860, upload-time = "2026-04-24T00:12:01.207Z" }, { url = "https://files.pythonhosted.org/packages/51/18/325cd32ece1120d1da51cc4e4294c6580190699490183fc2fe8cb6d61ec5/matplotlib-3.10.9-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfca0129678bd56379db26c52b5d77ed7de314c047492fbdc763aa7501710cfb", size = 8199254, upload-time = "2026-04-24T00:12:04.239Z" }, { url = "https://files.pythonhosted.org/packages/79/db/e28c1b83e3680740aa78925f5fb2ae4d16207207419ad75ea9fe604f8676/matplotlib-3.10.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8e436d155fa8a3399dc62683f8f5d0e2e50d25d0144a73edd73f82eec8f4abfb", size = 8777092, upload-time = "2026-04-24T00:12:06.793Z" }, @@ -636,85 +461,17 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/67/b2/ef8d6bb59b0edb6c16c968b70f548aa13b54348972def5aa6ac85df67145/matplotlib-3.10.9-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:4e42042d54db34fda4e95a7bd3e5789c2a995d2dad3eb8850232ee534092fbbf", size = 9680884, upload-time = "2026-04-24T00:13:48.066Z" }, { url = "https://files.pythonhosted.org/packages/61/1c/d21bfeb9931881ebe96bcfcff27c7ae4b160ae0ec291a714c42641a56d75/matplotlib-3.10.9-cp314-cp314t-win_amd64.whl", hash = "sha256:c27df8b3848f32a83d1767566595e43cfaa4460380974da06f4279a7ec143c39", size = 8432333, upload-time = "2026-04-24T00:13:51.008Z" }, { url = "https://files.pythonhosted.org/packages/78/23/92493c3e6e1b635ccfff146f7b99e674808787915420373ac399283764c2/matplotlib-3.10.9-cp314-cp314t-win_arm64.whl", hash = "sha256:a49f1eadc84ca85fd72fa4e89e70e61bf86452df6f971af04b12c60761a0772c", size = 8324785, upload-time = "2026-04-24T00:13:53.633Z" }, - { url = "https://files.pythonhosted.org/packages/2c/2b/0e92ad0ac446633f928a1563db4aa8add407e1924faf0ded5b95b35afb27/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1872fb212a05b729e649754a72d5da61d03e0554d76e80303b6f83d1d2c0552b", size = 8293058, upload-time = "2026-04-24T00:13:56.339Z" }, - { url = "https://files.pythonhosted.org/packages/4b/23/74682fd369f5299ceda438fea2a0662e6383b85c9383fb9cdfcf04713e07/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:985f2238880e2e69093f588f5fe2e46771747febf0649f3cf7f7b7480875317f", size = 8186627, upload-time = "2026-04-24T00:13:58.623Z" }, - { url = "https://files.pythonhosted.org/packages/ca/e8/368aab88f3c4cd8992800f31abfe0670c3e47540ba20a97e9fdbcde594b3/matplotlib-3.10.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6640f75af2c6148293caa0a2b39dd806a492dd66c8a8b04035813e33d0fd2585", size = 8764117, upload-time = "2026-04-24T00:14:01.684Z" }, { url = "https://files.pythonhosted.org/packages/63/e2/9f66ca6a651a52abfe0d4964ce01439ed34f3f1e119de10ff3a07f403043/matplotlib-3.10.9-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:42fb814efabe95c06c1994d8ab5a8385f43a249e23badd3ba931d4308e5bca20", size = 8304420, upload-time = "2026-04-24T00:14:04.57Z" }, { url = "https://files.pythonhosted.org/packages/e8/e8/467c03568218792906aa87b5e7bb379b605e056ed0c74fe00c051786d925/matplotlib-3.10.9-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:f76e640a5268850bfda54b5131b1b1941cc685e42c5fa98ed9f2d64038308cba", size = 8197981, upload-time = "2026-04-24T00:14:07.233Z" }, { url = "https://files.pythonhosted.org/packages/6f/87/afead29192170917537934c6aff4b008c805fff7b1ccea0c79120d96beda/matplotlib-3.10.9-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3fc0364dfbe1d07f6d15c5ebd0c5bf89e126916e5a8667dd4a7a6e84c36653d4", size = 8774002, upload-time = "2026-04-24T00:14:09.816Z" }, ] -[[package]] -name = "numpy" -version = "2.2.6" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.11'", -] -sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, - { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, - { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, - { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, - { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, - { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, - { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, - { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, - { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, - { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, - { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" }, - { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" }, - { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" }, - { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" }, - { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" }, - { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" }, - { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" }, - { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" }, - { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" }, - { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" }, - { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" }, - { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" }, - { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" }, - { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" }, - { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" }, - { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" }, - { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" }, - { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" }, - { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" }, - { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" }, - { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" }, - { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" }, - { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" }, - { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" }, - { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" }, - { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" }, - { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" }, - { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" }, - { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" }, - { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" }, - { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" }, - { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" }, - { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" }, - { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" }, - { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" }, - { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" }, - { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" }, - { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" }, - { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" }, - { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" }, - { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, - { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, - { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, - { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, -] - [[package]] name = "numpy" version = "2.4.6" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version == '3.11.*'", + "python_full_version < '3.12'", ] sdist = { url = "https://files.pythonhosted.org/packages/d0/ad/fed0499ce6a338d2a03ebae59cd15093910c8875328855781952abf6c2fe/numpy-2.4.6.tar.gz", hash = "sha256:f3a3570c4a2a16746ac2c31a7c7c7b0c186b95ce902e33db6f28094ed7387dda", size = 20735807, upload-time = "2026-05-18T23:37:14.07Z" } wheels = [ @@ -878,96 +635,92 @@ wheels = [ [[package]] name = "pillow" -version = "12.3.0" +version = "13.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035, upload-time = "2026-07-01T11:56:38.965Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ce/a4/9cc30690a394a8305e8be4c9036aa16d0dfddadd09079860b582f562496d/pillow-13.0.0.tar.gz", hash = "sha256:cdcd1ba258178f7356d74170c9a81ba4eab6a5d55748bc402a5a2a6fe6be3510", size = 47058631, upload-time = "2026-10-16T22:18:09.718Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/25/c2/669d88644cddb1485bd9534e63e8cf476c8e51cb3c3a1297677023505c0e/pillow-12.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6c0016e7b354317c4e9e525b937ac8596c38d2d232b419529b9cd7a1cd46e39a", size = 5392418, upload-time = "2026-07-01T11:53:27.808Z" }, - { url = "https://files.pythonhosted.org/packages/6b/ba/3762f376a2948e3036488d773a146e0ae6ecc2ca03ac20e2615bd0b2ba02/pillow-12.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bcc33feacfaefce60c12fd500a277533bdc02b10a19f7f6d348763d8140bbba7", size = 4785287, upload-time = "2026-07-01T11:53:29.761Z" }, - { url = "https://files.pythonhosted.org/packages/07/50/b5d688cc9c52d4482f3d5bcab6ce20bc2a74a85d2343841c907444a3be2c/pillow-12.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5594fc43d548a7ed94949d139aa1341b270f1863f11cfd37f5a6c8b778a6b67f", size = 6253754, upload-time = "2026-07-01T11:53:32.298Z" }, - { url = "https://files.pythonhosted.org/packages/4e/89/36f4cd76cf4baf05c50ababb976249153f18c959171c7f6ba09a6f217260/pillow-12.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0606c8bf2cdefea14a43530f7657cbbb7ecf1c4222512492ef4a4434a9501ec", size = 6925605, upload-time = "2026-07-01T11:53:34.487Z" }, - { url = "https://files.pythonhosted.org/packages/eb/c0/4de58cf6633b9e3a6061ef4be6fb91fc3c90b812ece886f531e3c523d777/pillow-12.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:85f998ea1848bc6757289e739cfbdda3a04adfd58b02fc018ce54d754a5ce468", size = 6327788, upload-time = "2026-07-01T11:53:36.433Z" }, - { url = "https://files.pythonhosted.org/packages/87/3c/14d53682a19550dbbaf3b598f807d5457646c510805a44c7d7891cd1cd1a/pillow-12.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:25b9b82bb22e6e2b3cd07b39c68b7b862001226cb3dff7130d1cb914121b39ed", size = 7036288, upload-time = "2026-07-01T11:53:38.712Z" }, - { url = "https://files.pythonhosted.org/packages/38/1d/36279e3c77efe034e4cc2b0393ee74ffdb5a62391dacbf9b916154f5f0b8/pillow-12.3.0-cp310-cp310-win32.whl", hash = "sha256:37dc8f7bbb66efe481bb60defacef820c950c24713fb44962ed6aa2a50966de1", size = 6472396, upload-time = "2026-07-01T11:53:40.781Z" }, - { url = "https://files.pythonhosted.org/packages/48/7c/8fa0039574c476d7c6fa57dd7c32a130436877c6ec1e5ce1cc8ec44878c1/pillow-12.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:300557495eb45ebb8aec96c2da9c4be642fbf7cd937278b4013ba894ea8eb0eb", size = 7226887, upload-time = "2026-07-01T11:53:42.764Z" }, - { url = "https://files.pythonhosted.org/packages/fa/17/e324be141d173c1c919428066c3259f21c1b8982e564e01a4a81e96dbdcf/pillow-12.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:514435a37670e3e5e08f3945b68718b6ed329bb84367777e16f9f4dfe1e61a0f", size = 2568039, upload-time = "2026-07-01T11:53:45.372Z" }, - { url = "https://files.pythonhosted.org/packages/fb/c8/0a78b0e02d7ac54bc03e5321c9220da52f0c2ea83b21f7c40e7f3169c502/pillow-12.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:00808c5e14ef63ac5161091d242999076604ff74b883423a11e5d7bbb38bf756", size = 5392415, upload-time = "2026-07-01T11:53:47.162Z" }, - { url = "https://files.pythonhosted.org/packages/b2/5b/a02d30018abd97ced9f5a6c63d28597694a00d066516b9c1c6de45859fc9/pillow-12.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:37d6d0a00072fd2948eb22bce7e1475f34569d90c87c59f7a2ec59541b77f7a6", size = 4785266, upload-time = "2026-07-01T11:53:49.079Z" }, - { url = "https://files.pythonhosted.org/packages/c8/98/766667a4be768150a202836acd9fad19c06824ca86c4286d3cf6b274964e/pillow-12.3.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bcb46e2f9feff8d06323983bd83ed00c201fdcab3d74973e7072a889b3979fcd", size = 6263814, upload-time = "2026-07-01T11:53:51.32Z" }, - { url = "https://files.pythonhosted.org/packages/3b/2d/ede717bc1144f63886c21fd349bb95860b0d1a21149ff16f2bb362b612b6/pillow-12.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23d27a3e0307ec2244cc51e7287b919aa68d097504ebe19df4e76a98a3eea5bd", size = 6934408, upload-time = "2026-07-01T11:53:53.487Z" }, - { url = "https://files.pythonhosted.org/packages/a3/48/9c58b685e69d49c31af6c8eb9012055fab7e665785165c84796e2c73ce72/pillow-12.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4f883547d4b7f0495ebe7056b0cc2aea76094e7a4abc8e933540f3271df27d9c", size = 6337160, upload-time = "2026-07-01T11:53:55.457Z" }, - { url = "https://files.pythonhosted.org/packages/ff/fa/dc2a5c0ba6df93f67c31d34b808b7ce440b40cdbf96f0b81cde1d1e6fa93/pillow-12.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:236ff70b9312fb68943c703aa842ca6a758abfa45ac187a5e7c1452e96ef72b5", size = 7045172, upload-time = "2026-07-01T11:53:57.736Z" }, - { url = "https://files.pythonhosted.org/packages/86/a5/444817a4d4c4c2417df00513086ca196f388d8f9ef40c2e4ccd1ad1af54b/pillow-12.3.0-cp311-cp311-win32.whl", hash = "sha256:10e41f0fbf1eec8cfd234b8fe17a4caac7c9d0db4c204d3c173a8f9f6ef3232b", size = 6472232, upload-time = "2026-07-01T11:53:59.767Z" }, - { url = "https://files.pythonhosted.org/packages/63/c6/4bad1b18d132a50b27e1365e1ab163616f7a5bb56d330f66f9d1d9d4f9d4/pillow-12.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8e95e1385e4998ae9694eeaa4730ba5457ff61185b3a55e2e7bea0880aef452a", size = 7233653, upload-time = "2026-07-01T11:54:02.066Z" }, - { url = "https://files.pythonhosted.org/packages/fd/16/00f91ab7760dc842f5aad55217e80fc4a7067a0604535249bc8a2d6d9870/pillow-12.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:ebaea975e03d3141d9d3a507df75c9b3ec90fa9d2ffd07567b3a978d9d790b26", size = 2568195, upload-time = "2026-07-01T11:54:04.622Z" }, - { url = "https://files.pythonhosted.org/packages/37/bf/fb3ebff8ddcb76aac5a01389251bbbb9519922a9b520d8247c1ca864a25d/pillow-12.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ba09209fbe443b4acccebe845d8a138b89a8f4fbaeedd44953490b5315d5e965", size = 5345969, upload-time = "2026-07-01T11:54:06.397Z" }, - { url = "https://files.pythonhosted.org/packages/d8/66/9a386a92561f402389a4fc70c18838bf6d35eb5eb5c6850b4b2dc64f5048/pillow-12.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffd0c5368496f41b0944be820fcb7a838aa6e623d250b01acf2643939c3f99d7", size = 4780323, upload-time = "2026-07-01T11:54:09.351Z" }, - { url = "https://files.pythonhosted.org/packages/25/27/ac8f99618ffd3dde21db0f4d4b1d2ab00c0880595bfd17df103f7f39fd0c/pillow-12.3.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d9c7f76c0673154f044e9d78c8655fb4213f6ca31a836df48b40fe5d187717b9", size = 6266838, upload-time = "2026-07-01T11:54:11.71Z" }, - { url = "https://files.pythonhosted.org/packages/84/21/a35af28dcc61f37ed850a2d64c65c701321dfbf25085e469d5559360cbbf/pillow-12.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91", size = 6940830, upload-time = "2026-07-01T11:54:13.732Z" }, - { url = "https://files.pythonhosted.org/packages/eb/51/8b08617af3ad95e33ce6d7dd2c99ed6c8298f7fb131636303956be022e25/pillow-12.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e491916b378fba47242221bb9ead245211b70d504f495d105d17b14a24b4907c", size = 6344383, upload-time = "2026-07-01T11:54:15.756Z" }, - { url = "https://files.pythonhosted.org/packages/1d/72/cf78ac9780bb93c28328f408973845a309d4d145041665f734572ced1b52/pillow-12.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0dd2064cbc55aaec028ef5fbb60fa47bb6c3e7918e07ff17935284b227a9d2df", size = 7052934, upload-time = "2026-07-01T11:54:17.721Z" }, - { url = "https://files.pythonhosted.org/packages/20/20/25e0f4dc178a6bc0696793720055519a0de89e7661dae886992decbd2f81/pillow-12.3.0-cp312-cp312-win32.whl", hash = "sha256:dbce0b29841537a2fa4a214c2bbf14de3587c9680caa9b4e217568472490b28f", size = 6472684, upload-time = "2026-07-01T11:54:19.839Z" }, - { url = "https://files.pythonhosted.org/packages/45/89/da2f7971a317f83d807fdd4065c0af40208e59e692cc43d315a71a0e96d1/pillow-12.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:a2b55dd6b2a4c4b7d87ffa56bdb33fdc5fdb9a462173861a7bc097f17d91cb09", size = 7227137, upload-time = "2026-07-01T11:54:22.025Z" }, - { url = "https://files.pythonhosted.org/packages/de/47/4845a0a6c0dbf1db8456bd9fc791f13c5ced7ced20606d08a0aacfd25b49/pillow-12.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:331b624368d4f1d069149002f25f44bc61c8919ce8ddb3c45bdad8f6e2d89510", size = 2568267, upload-time = "2026-07-01T11:54:24.051Z" }, - { url = "https://files.pythonhosted.org/packages/9d/ac/31fb64e1e7efb5a4b50cd3d92049ba89ac6e4d8d3bb6a74e15048ca3353e/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:21900ce7ba264168cd50defae43cd75d25c833ad4ad6e73ffc5596d12e25ac89", size = 4161684, upload-time = "2026-07-01T11:54:25.934Z" }, - { url = "https://files.pythonhosted.org/packages/87/b4/9805e23d2b4d77842b468513841fda254ee42f0289d25088340e4ff46e2d/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4e8c2a84d977f50b9daed6eeaf3baef67d00d5d74d932288f02cb94518ee3ace", size = 4255487, upload-time = "2026-07-01T11:54:27.935Z" }, - { url = "https://files.pythonhosted.org/packages/df/39/ecf519435a200c693fe053a6ee4d835b41cf963a4dfc2551c4e637cb2a71/pillow-12.3.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:ae26d61dfa7a47befdc7572b521024e8745f3d809bd95ca9505a7bba9ef849ec", size = 3696433, upload-time = "2026-07-01T11:54:29.813Z" }, - { url = "https://files.pythonhosted.org/packages/42/92/2fc3ffad878ae8dd5469ec1bc8eb83b71f48e13efdf68f02709003982a32/pillow-12.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7a743ff716f746fc19a9557f60dab1600d4613255f8a7aeb3cdde4db7eb15a66", size = 5345889, upload-time = "2026-07-01T11:54:31.97Z" }, - { url = "https://files.pythonhosted.org/packages/10/76/8803c13605b763d33d156c4678fc77f8443389c0c51c8aef707bb02015f4/pillow-12.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d69141514cc30b774ceea5e3ed3a6635c8d8a96edf664689b890f4089111fb35", size = 4780109, upload-time = "2026-07-01T11:54:34.026Z" }, - { url = "https://files.pythonhosted.org/packages/1f/01/e18aff37cb0b4aac47ac90f016d347a49aca667ef97f190b06ac2aabc928/pillow-12.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f7401aebd7f581d7f83a439d87d474999317ee099218e5ad25d125290990ba65", size = 6263736, upload-time = "2026-07-01T11:54:36.131Z" }, - { url = "https://files.pythonhosted.org/packages/f7/62/de5bdd77d935331f4f802edc11e4d82950f642caad6cb2f949837b8560e2/pillow-12.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0847a763afefb695bc912d7c131e7e0632d4edc1d8698f58ddabec8e46b8b6d3", size = 6937129, upload-time = "2026-07-01T11:54:38.216Z" }, - { url = "https://files.pythonhosted.org/packages/70/4d/105627a13300c5e0df1d174230b32fd1273062c96f7745fd552b945d1e1d/pillow-12.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:571b9fcb07b97ef3a492028fb3d2dc0993ca23a06138b0315286566d29ef718a", size = 6339562, upload-time = "2026-07-01T11:54:40.354Z" }, - { url = "https://files.pythonhosted.org/packages/6b/1d/f13de01a553988ab895ba1c722e06cf3144d4f57656fd5b81b6d881f1179/pillow-12.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:756c768d0c9c2955feb7a56c37ea24aea2e369f8d36a88da270b6a9f19e62b5e", size = 7049439, upload-time = "2026-07-01T11:54:42.489Z" }, - { url = "https://files.pythonhosted.org/packages/c9/f9/066794cca041b969964f779ee5fa66a9498bbf34248ac39c5d7954e4198f/pillow-12.3.0-cp313-cp313-win32.whl", hash = "sha256:a876864214e136f0eb367788dbd7df045f4806801518e2cfe9e13229cfe06d8f", size = 6473287, upload-time = "2026-07-01T11:54:44.9Z" }, - { url = "https://files.pythonhosted.org/packages/a6/9b/7a58e61d62be561da3a356fe2384d4059a6345fc130e23ef1c36a5b81d24/pillow-12.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:1cca606cd25738df4ed873d5ad46bbdb3d83b5cbca291f6b4ff13a4df6b0bbe8", size = 7239691, upload-time = "2026-07-01T11:54:47.141Z" }, - { url = "https://files.pythonhosted.org/packages/aa/b0/c4ed4f0ef8f8fa5ee8351537db6650bb8189f7e118842978dd6589065692/pillow-12.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:b629de27fda84b42cde7edef0d85f13b958b47f6e9bbcbba9b673c562a89bd8b", size = 2568185, upload-time = "2026-07-01T11:54:49.137Z" }, - { url = "https://files.pythonhosted.org/packages/dc/01/001f65b68192f0228cc1dbbc8d2530ab5d58b61037ba0587f946fea607cd/pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:9cf95fe4d0f84c82d282745d9bb08ad9f926efa00be4697e767b814ce40d4330", size = 4161736, upload-time = "2026-07-01T11:54:51.156Z" }, - { url = "https://files.pythonhosted.org/packages/1a/d2/0219746d0fd16fc8a84498e79452375be3797d3ce4044596ce565164b84f/pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:8728f216dcdb6e6d555cf971cb34076139ad74b31fc2c14da4fafc741c5f6217", size = 4255435, upload-time = "2026-07-01T11:54:53.414Z" }, - { url = "https://files.pythonhosted.org/packages/c8/02/8d0bc62ef0302318c46ff2a512822d2610e81c7aa46c9b3abe6cbaca5ad0/pillow-12.3.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:a45650e8ce7fafffd731db8550230db6b0d306d181a90b67d3e6bca2f1990930", size = 3696262, upload-time = "2026-07-01T11:54:55.739Z" }, - { url = "https://files.pythonhosted.org/packages/85/e2/73c77d218410b14f5f2d565e8a998d5317b7b9c75368d29985139f7a46f0/pillow-12.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ba54cfebe86920a559a7c4d6b9050791c20513650a1952ebe3368c7dc70306f8", size = 5350344, upload-time = "2026-07-01T11:54:57.657Z" }, - { url = "https://files.pythonhosted.org/packages/c7/da/32c752228ae345f489e3a42499d817b6c3996da7e8a3bc7a04fc806b243b/pillow-12.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e158cb00350dc278f3b91551101aa7d12415a66ebf2c91d8d5ac14e56ddd3ad0", size = 4780131, upload-time = "2026-07-01T11:54:59.713Z" }, - { url = "https://files.pythonhosted.org/packages/b1/9d/8b2c807dbef61a5197c047afe99823787eb66f63daf9fb2432f91d6f0462/pillow-12.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9aeb04d6aef139de265b29683e119b638208f88cf73cdd1658aa07221165321", size = 6263757, upload-time = "2026-07-01T11:55:01.778Z" }, - { url = "https://files.pythonhosted.org/packages/5c/44/c85361f65dbe00eea8576ee467c768d25129989efb76e94f205e9ca9bb46/pillow-12.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:251bf95b67017e27b13d82f5b326234ca62d70f9cf4c2b9032de2358a3b12c7b", size = 6936962, upload-time = "2026-07-01T11:55:03.93Z" }, - { url = "https://files.pythonhosted.org/packages/18/7e/e483414b35800b86b6f08dbbc7803fb5cd52c4d6f897f47d53ea2c7e6f65/pillow-12.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fe3cca2e4e8a592be0f269a1ca4835c25199d9f3ce815c8491048f785b0a0198", size = 6339171, upload-time = "2026-07-01T11:55:05.989Z" }, - { url = "https://files.pythonhosted.org/packages/f0/f4/68c491844841ede6bed70189546b3ee9731cf9f2cbad396faff5e1ccba45/pillow-12.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:23aceaa007d6172b02c277f0cd359c79492bbb14f7072b4ede9fbcaf20648130", size = 7048116, upload-time = "2026-07-01T11:55:08.131Z" }, - { url = "https://files.pythonhosted.org/packages/a3/34/77f3f793fed8efc7d243f21b33c5a3f0d1c97ee70346d3db855587e155ff/pillow-12.3.0-cp314-cp314-win32.whl", hash = "sha256:af8d94b0db561cf68b88a267c5c44b49e134f525d0dc2cb7ed413a66bc23559a", size = 6467209, upload-time = "2026-07-01T11:55:10.408Z" }, - { url = "https://files.pythonhosted.org/packages/f1/e0/492879f69d94f91f60fc8cd05ba03650e9520afebb2fb7aa12777d7c7f38/pillow-12.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:fdafc9cce40277e0f7a0feabce0ee50dd2fa1800f3b38015e51296b5e814048d", size = 7237707, upload-time = "2026-07-01T11:55:12.745Z" }, - { url = "https://files.pythonhosted.org/packages/c9/ac/6b11f2875f1c2ac040d84e1bbf9cf22a88038f901ca1037898b280b38365/pillow-12.3.0-cp314-cp314-win_arm64.whl", hash = "sha256:e91206ee562682b51b98ef4b26a6ef48fd84e15fd4c4bc5ec768eb641d206838", size = 2565995, upload-time = "2026-07-01T11:55:14.736Z" }, - { url = "https://files.pythonhosted.org/packages/52/69/c2208e56af9bfc1913afb24020297a691eb1d4ef688474c8a04913f65e04/pillow-12.3.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:164b31cd1a0490ab6efae01aa5df49da7061be0af1b30e035b6e9a1bfe34ee6e", size = 5352503, upload-time = "2026-07-01T11:55:17.076Z" }, - { url = "https://files.pythonhosted.org/packages/07/70/e5686d753e898a45d778ff1718dba8516ead6ab6b95d85fc8c4b70650cf2/pillow-12.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5afb51d599ea772b8365ae807ae557f18bccfe46ab261fd1c2a9ed700fc6eb17", size = 4782956, upload-time = "2026-07-01T11:55:19.448Z" }, - { url = "https://files.pythonhosted.org/packages/d5/37/25c6692f06927ee973ff18c8d9ee98ad0b4d84ee67a09610c2dd1447958e/pillow-12.3.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3edce1d53195db527e0191f84b71d02022de0540bf43a16ed734ed7537b07385", size = 6322855, upload-time = "2026-07-01T11:55:21.613Z" }, - { url = "https://files.pythonhosted.org/packages/cc/91/420637fcb8f1bc11029e403b4538e6694744428d8246118e45719f944556/pillow-12.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bf16ba1b4d0b6b7c8e534936632270cf70eb00dbe09005bc345b2677b726855c", size = 6989642, upload-time = "2026-07-01T11:55:24.006Z" }, - { url = "https://files.pythonhosted.org/packages/10/08/b94d7811281ccf0d143a1cf768d1c49e1e54af63e7b708ab2ee3eb87face/pillow-12.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:24870b09b224f7ae3c39ed07d10e819d06f8720bc551847b1d623832b5b0e28d", size = 6391281, upload-time = "2026-07-01T11:55:26.252Z" }, - { url = "https://files.pythonhosted.org/packages/d2/87/24233f785f55474dc02ce3e739c5528a77e3a862e9333d1dd7a25cc31f70/pillow-12.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:30f2aa603c41533cc25c05acd0da21636e84a315768feb631c937177db558931", size = 7096716, upload-time = "2026-07-01T11:55:28.318Z" }, - { url = "https://files.pythonhosted.org/packages/23/26/fcb2f6e37175b04f53570b59937867e2b80ee1685e744023153028fc14f9/pillow-12.3.0-cp314-cp314t-win32.whl", hash = "sha256:4b0a7fe987b14c31ebda6083f74f22b561fd3739bc0ac51e019622e3d72668c7", size = 6474125, upload-time = "2026-07-01T11:55:30.956Z" }, - { url = "https://files.pythonhosted.org/packages/90/de/3634abee5f1c9e13c56787b7d5517b0ba8d6de51700b95578cf338349c9f/pillow-12.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:962864dc93511324d51ddbb5b9f8731bf71675b93ca612a07441896f4688fb8c", size = 7242939, upload-time = "2026-07-01T11:55:34.044Z" }, - { url = "https://files.pythonhosted.org/packages/ce/2a/fd13f8eb24de5714a6eb444a3d67e2842c6c576e159a43793adf23051351/pillow-12.3.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0740a512dc522224c77d9aa5a8d70d8b7d73fb91f2c21125d8d025d3b8990e45", size = 2567506, upload-time = "2026-07-01T11:55:35.988Z" }, - { url = "https://files.pythonhosted.org/packages/5d/dc/8fdce34ec725a33c81c6ba122b904d6b9024e50ea9ac7bede62fab54506c/pillow-12.3.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:0feb2e9d6ad6c9e3c06effe9d00f3f1e618a6643273576b016f591e9315a7139", size = 4162063, upload-time = "2026-07-01T11:55:37.941Z" }, - { url = "https://files.pythonhosted.org/packages/76/66/2044b9a63d3b84ff048228dfcb7cd9bf0df983e8470971bf7d4c57b693de/pillow-12.3.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:9e881fca225083806662a5c43d627d215f258ff43c890f831966c7d7ba9c7402", size = 4255549, upload-time = "2026-07-01T11:55:40.022Z" }, - { url = "https://files.pythonhosted.org/packages/52/7e/1f67e6f4ece6b582ee4b539decbcc9f848dc245a93ed8cd7338bafef72f1/pillow-12.3.0-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:4998562bf62a445225f22e07c896bb04b35b1b1f2eb6d760584c9c51d7a5f78c", size = 3696331, upload-time = "2026-07-01T11:55:41.98Z" }, - { url = "https://files.pythonhosted.org/packages/12/40/d306fc2c8e4d45d7f175c77edca7063be7b86fe7fe6e68f4353bf71d808c/pillow-12.3.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:dc624f6bc473dacdf7ef7eb8678d0d08edf15cd94fad6ae5c7d6cc67a4e4902f", size = 5350370, upload-time = "2026-07-01T11:55:44.028Z" }, - { url = "https://files.pythonhosted.org/packages/dd/44/668fb1437e8ce420f62d6106eb66e44a5971602a4d794615bdf79315d82d/pillow-12.3.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:71d6097b330eea8fd15097780c8e89cb1a8ce7838669f48c5bacd6f663dd4701", size = 4780147, upload-time = "2026-07-01T11:55:46.073Z" }, - { url = "https://files.pythonhosted.org/packages/0c/08/93fa2e70e30a2d81547e481b6ee2bb9522117221fb1e0ce4b5df70967677/pillow-12.3.0-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:28ce87c5ab450a9dd970b52e5aca5fe63ed432d18a2eaddd1979a00a1ba24ace", size = 6273659, upload-time = "2026-07-01T11:55:48.264Z" }, - { url = "https://files.pythonhosted.org/packages/f8/6d/043e96ff814fc31a33077e4cba86082167db520c93632afdf2042febbb0c/pillow-12.3.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6b02afb9b97f65fbca5f31db6a2a3ba21aa93030225f150fa3f249717e938fb4", size = 6947439, upload-time = "2026-07-01T11:55:50.503Z" }, - { url = "https://files.pythonhosted.org/packages/af/92/ba71d2ee2ac0edf3fa33bd9d5ee9ee080da70b1766f3ca3934f9938ddac9/pillow-12.3.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:1182d52bc2d5e5d7d0949503aa7e36d12f42205dc287e4883f407b1988820d39", size = 6353577, upload-time = "2026-07-01T11:55:52.697Z" }, - { url = "https://files.pythonhosted.org/packages/0f/ce/e63064e2122923ff687c8ad792d0d736a7b3920a56a46982e81a7fdd25d6/pillow-12.3.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e795b7eb908249c4e43c7c99fac7c2c75dab0c43566e37db472a355f63693d71", size = 7060394, upload-time = "2026-07-01T11:55:55.149Z" }, - { url = "https://files.pythonhosted.org/packages/54/76/a09cc3ccc8d773a7283d34c38bec1708f9e3cc932093cbc4c5e71ac4060b/pillow-12.3.0-cp315-cp315-win32.whl", hash = "sha256:57b3d78c95ba9059768b10e28b813002261d3f3dfc55cc48b0c988f625175827", size = 6467375, upload-time = "2026-07-01T11:55:57.769Z" }, - { url = "https://files.pythonhosted.org/packages/3e/03/1846c49ba3b1d5550392a4bbd06d6fb4578e1cd91a803198b5c90f5f7d53/pillow-12.3.0-cp315-cp315-win_amd64.whl", hash = "sha256:fa4ecea169a355be7a3ade2c783e2ed12f0e40d2c5621cda8b3297faf7fbb9f5", size = 7237048, upload-time = "2026-07-01T11:55:59.975Z" }, - { url = "https://files.pythonhosted.org/packages/fb/bb/89f35dcc79610423f9f195504d7def7f0d1416a711541b42867e25fe3412/pillow-12.3.0-cp315-cp315-win_arm64.whl", hash = "sha256:877c3f311ff35410f690861c4409e7ccbf0cd2f878e50628a28e5a0bb689e658", size = 2566006, upload-time = "2026-07-01T11:56:02.143Z" }, - { url = "https://files.pythonhosted.org/packages/30/88/707027ba09942dfa2c28759b5c222d769290a41c6d20ea60ec250801941f/pillow-12.3.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:e9871b1ffbfa9656b60aeee92ed5136a5742696006fa322b29ea3d8da0ecc9cf", size = 5352509, upload-time = "2026-07-01T11:56:04.2Z" }, - { url = "https://files.pythonhosted.org/packages/b0/6d/00352fa25332c2569cd387851f568cc5a4b75a9adbfb37ac4fbce4c02eec/pillow-12.3.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:53aa02d20d10c3d814d536aa4e5ac9b84ca0ff5a88377963b085ad6822f93e64", size = 4783167, upload-time = "2026-07-01T11:56:06.631Z" }, - { url = "https://files.pythonhosted.org/packages/13/4f/9e049dfa21af7c22427275720e2490267ba8138120add5c4c574deb69782/pillow-12.3.0-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:446c34dcc4324b084a53b705127dc15717b22c5e140ae0a3c38349d4efec071e", size = 6329237, upload-time = "2026-07-01T11:56:08.868Z" }, - { url = "https://files.pythonhosted.org/packages/36/16/cf6eeaae8d0fce8dd390a33437cf68c5d5bd73834a2bc6e2f14efda0ab45/pillow-12.3.0-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf1845d02ad822a369a49f2bb9345b1614744267682e7a03527dc3bf6eea1777", size = 6997047, upload-time = "2026-07-01T11:56:11.379Z" }, - { url = "https://files.pythonhosted.org/packages/1e/69/dbf769bdd55f48bf5733cac28edc6364ffaa072ec9ba336266e4fe66be55/pillow-12.3.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:186941b6aef820ad110fb01fb06eb925374dc3a21b17e37ec9a53b250c6fe2d1", size = 6400440, upload-time = "2026-07-01T11:56:13.908Z" }, - { url = "https://files.pythonhosted.org/packages/a0/e1/ffc9cfc2eea0d178da8018e18e959301ad9d6bc9f3edb7181e748a474b97/pillow-12.3.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:f13c32a3abd6079a66d9526e18dad9b6d280384d49d7c54040cd57b6424041d9", size = 7105895, upload-time = "2026-07-01T11:56:16.575Z" }, - { url = "https://files.pythonhosted.org/packages/18/f0/a5595c1e8c3ae44b9828cb2f0fa8155e5095ef04d6327b8f61cf44a3df85/pillow-12.3.0-cp315-cp315t-win32.whl", hash = "sha256:1657923d2d45afb66526e5b933e5b3052e6bdea196c90d3abb2424e18c77dae8", size = 6474384, upload-time = "2026-07-01T11:56:18.855Z" }, - { url = "https://files.pythonhosted.org/packages/e4/04/62bcd9f844984c5938d3b05264a61d797a29d3e0812341a8204af70bbdee/pillow-12.3.0-cp315-cp315t-win_amd64.whl", hash = "sha256:8cd2f7bdda092d99c9fc2fb7391354f306d01443d22785d0cbfafa2e2c8bb418", size = 7243537, upload-time = "2026-07-01T11:56:21.214Z" }, - { url = "https://files.pythonhosted.org/packages/3d/68/1f3066acedf37673694a7141381d8f811ae97f30d34413d236abe7d489f1/pillow-12.3.0-cp315-cp315t-win_arm64.whl", hash = "sha256:06ff022112bc9cbf83b60f8e028d94ad87b60621706487e65f673de61610ab59", size = 2567491, upload-time = "2026-07-01T11:56:23.506Z" }, - { url = "https://files.pythonhosted.org/packages/75/18/2e8b40223153ccbc60df07f9e8928dc0c76202aa4e55ae9f53962b6510d6/pillow-12.3.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:b3c777e849237620b022f7f297dd67705f9f5cf1685f09f02e46f93e92725468", size = 5302510, upload-time = "2026-07-01T11:56:25.736Z" }, - { url = "https://files.pythonhosted.org/packages/46/3e/51fabf59d5ab801ceab709453d3ab6b180083496579549de4c45ced6528a/pillow-12.3.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:b343699e8308bdc51978310e1c959c584e7869cc8c40780058c87da7781a1e94", size = 4736058, upload-time = "2026-07-01T11:56:28.041Z" }, - { url = "https://files.pythonhosted.org/packages/bf/20/22fe9384b7949e25fb1293bcfc84fb82590ff4ea6b37c95b24d26d793d86/pillow-12.3.0-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fbd139c8447d25dd750ab79ee274cc5e1fe80fc56340ab10b18a195e1b6eca3e", size = 5237776, upload-time = "2026-07-01T11:56:30.263Z" }, - { url = "https://files.pythonhosted.org/packages/08/14/f6ba68107680ffa74b39985f3f30884e41318fbc4250caa423c79b4788bb/pillow-12.3.0-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7e480451b9fa137494bccd3a7d69adbe8ac65a87d97be61e11f1b1050a5bac3", size = 5860358, upload-time = "2026-07-01T11:56:32.68Z" }, - { url = "https://files.pythonhosted.org/packages/36/54/0169bc772ec491108b62f644f8ecf1fe5d8ae5ebafde2ee2142210166903/pillow-12.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:04f01d28a6aaff387bf842a13be313df23ba0597a44f1a976c9feb3c6ff4711a", size = 7231786, upload-time = "2026-07-01T11:56:35.046Z" }, + { url = "https://files.pythonhosted.org/packages/6c/d7/af6af1b8cc55e07cb0489d5b0950bf5a9bb1461eeba825700b6d8d0e26ea/pillow-13.0.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:6f38f3f885a09cafc93fd667b1173a92f379e43785d635e7983c893f0da319fb", size = 5592324, upload-time = "2026-10-16T22:15:24.672Z" }, + { url = "https://files.pythonhosted.org/packages/0b/d2/2c12cb4fbb5d95f38d1001ff3d95fafcb830077018cba40e56a8f932dfbc/pillow-13.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:37290fbef0c73e2d51d594eb78fded7dc7170d1c3ad0a890269e6fd8c8c4e061", size = 4856298, upload-time = "2026-10-16T22:15:27.669Z" }, + { url = "https://files.pythonhosted.org/packages/5c/ee/229b27472483a4801ea94990815e710391836afdf987b4b722b62bd75db6/pillow-13.0.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7c88c10dd432f3b39ccdafc9ed81d0c21b8fd634502574da76d1bfa4fe2c76d0", size = 6517304, upload-time = "2026-10-16T22:15:29.43Z" }, + { url = "https://files.pythonhosted.org/packages/36/46/f509b74787f40ce0627501089d630b2c741b63b244c1f40b640b3b01e181/pillow-13.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a625df9a2a5597fa5e5266e01aefc82604bb85d291e3547981e863560d75da6c", size = 7140667, upload-time = "2026-10-16T22:15:31.368Z" }, + { url = "https://files.pythonhosted.org/packages/aa/a4/5a398b8ec2c37145397d6461c0b551c23ec03072aa64f357aed25e582b00/pillow-13.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:10b5019883c98f1dd819ca48ffc6f33a91cee04948fe637c605f4345c7cafd6f", size = 6610583, upload-time = "2026-10-16T22:15:34.025Z" }, + { url = "https://files.pythonhosted.org/packages/4f/7b/f2f1109b230fd4e2d57ab2305de31adc37ea9b4ff8719436c623cb484415/pillow-13.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f391dc92a015c478745192fe4f2e120c2af2aba18d9fe0616341cbf537599806", size = 7218241, upload-time = "2026-10-16T22:15:36.214Z" }, + { url = "https://files.pythonhosted.org/packages/ab/d3/069edb9083b267746baf59756282cacef904d3475c5288c7216fb5195a98/pillow-13.0.0-cp311-cp311-win32.whl", hash = "sha256:6a0920cb55df5a4d3f6862964908078c0bd59332bdd1bcd20d14e8c70ef27cc5", size = 6515278, upload-time = "2026-10-16T22:15:38.129Z" }, + { url = "https://files.pythonhosted.org/packages/7d/f6/6e2d96413e4c9dbec12ea584d9e646d602877d4cce3ea669099f959deac6/pillow-13.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:d7710eb676e9bb68965cb045be0d333b4c0d7f9dfbaa7fbf121385b1588683d3", size = 7278471, upload-time = "2026-10-16T22:15:40.286Z" }, + { url = "https://files.pythonhosted.org/packages/70/e7/baff21f8cb60496c8c250609501b88919eeedb4088d3da106f6c62f3f3c0/pillow-13.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:12fbb851cf323cc19aac3eea1df5ad17b57e91e9fe3cfd06100dba7bb8208c13", size = 2698981, upload-time = "2026-10-16T22:15:42.637Z" }, + { url = "https://files.pythonhosted.org/packages/7a/b8/58d79332229482eb0d27c82973850808c19d37e5bdc14443d3417bd373f5/pillow-13.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:67c8d44ad89fa7eb88de5d6ef6199b1e03dd24974f85a67639fc8badb801fe79", size = 5568643, upload-time = "2026-10-16T22:15:44.474Z" }, + { url = "https://files.pythonhosted.org/packages/39/4b/f2ed53d83aa44ac19599ac0a54897f867fafb95f406980d1e24083f8cbe3/pillow-13.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc481f742ccda20e9ed760b8f978dff50f2a4e9bc253ac167fb0a05b0783ef52", size = 4852329, upload-time = "2026-10-16T22:15:46.284Z" }, + { url = "https://files.pythonhosted.org/packages/3b/bb/9e30e8ed18c20800ee327a12107d5249ad8dc444867b3adfcc21654e3c71/pillow-13.0.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8bf295fe459343bc6093c8e5e0df60bfa189e0fcb775a22e2c2488fdeccc6c0d", size = 6519309, upload-time = "2026-10-16T22:15:48.14Z" }, + { url = "https://files.pythonhosted.org/packages/e6/99/fdf65cc539e266ab93546c261bdf98411fe165c6e4e13f9dbf597097192b/pillow-13.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:42d63be3af4f9b951b199b0a9d23365d37ab14687e6d77b74940432c8515c4ca", size = 7144542, upload-time = "2026-10-16T22:15:50.093Z" }, + { url = "https://files.pythonhosted.org/packages/26/9b/f38b7c4d8f599537e2d1a6d546cec9beef7536ff8f5c49a3f9c78179d8ac/pillow-13.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4bd024d567eca931b668978d672dba914d4b8e2628e2c3073a2ad178de8a2620", size = 6618042, upload-time = "2026-10-16T22:15:52.054Z" }, + { url = "https://files.pythonhosted.org/packages/a8/7c/45ee28531f89ee4582967d8a17f7a26d71ca64cd902b93c269590cd60a00/pillow-13.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23edf4ec4b6f4f240e8df6e4985e9ee2ced86474632433e55fb1e2548744bf40", size = 7228137, upload-time = "2026-10-16T22:15:54.009Z" }, + { url = "https://files.pythonhosted.org/packages/01/bc/9c2a969cb1b70201d04fa17fd5aedf02a732870b8da86bceaaa30b0ca385/pillow-13.0.0-cp312-cp312-win32.whl", hash = "sha256:02464da86f561f410e13b061ec37c3068a9cb557a095494157742d07b3c24a27", size = 6515423, upload-time = "2026-10-16T22:15:56.25Z" }, + { url = "https://files.pythonhosted.org/packages/ff/cd/73a79ecdc822076002eb24b5e1e4a530b0bb5310fcb6d239abbec877110b/pillow-13.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:ff3fe9eb621fbb9db4c4be33ab946f6bac5f98ab50ca8d3260503653656c961b", size = 7272166, upload-time = "2026-10-16T22:15:58.597Z" }, + { url = "https://files.pythonhosted.org/packages/4a/a3/be5a1236efd085b3984e4305da8f179ae9dab80c991d2ad78f2bd5c4c843/pillow-13.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:c3bc8ee0271387e0b1e3ad0ff893645990a656e79bf9c42f4f734a3642b11d51", size = 2698943, upload-time = "2026-10-16T22:16:00.637Z" }, + { url = "https://files.pythonhosted.org/packages/82/e2/9132d38df320e8099e2642d9fa538f18a7dfebf68a875a31725dc2a115aa/pillow-13.0.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:e98b4f91f99b24b1da72e10621ba181f7281922384a7403094debb4199de6c00", size = 4190620, upload-time = "2026-10-16T22:16:02.527Z" }, + { url = "https://files.pythonhosted.org/packages/cb/be/436dac0996876f65ef1916ffb711c5ef4af2ebc57414b6f16642e07f6b47/pillow-13.0.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:34fb3db1149c879343861831728c243c432d4a5afc8f1878ca7612ef8de2a033", size = 4290286, upload-time = "2026-10-16T22:16:04.861Z" }, + { url = "https://files.pythonhosted.org/packages/60/16/7c1007162e4169ea0d5bec47e2e0b2174f56c50cf5b8c02a1dc23e41037e/pillow-13.0.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:2d50500a4a3bc6469adcdb319cf05d688b08ca3bf0f22a05339f3b25b433a599", size = 3723169, upload-time = "2026-10-16T22:16:06.956Z" }, + { url = "https://files.pythonhosted.org/packages/08/bc/578ab2eaa04705a8978bd9be0fe15c3d43a8fc95097c4f7e39540e79e4fa/pillow-13.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ef5fe6b7db3f501c56000ba8fe7c7e1a35ca1d45824fbeb95a67daa85cff4dbe", size = 5568469, upload-time = "2026-10-16T22:16:08.664Z" }, + { url = "https://files.pythonhosted.org/packages/98/c8/ccede3dcc4f274b80fb49199eed1ef34ba05566c8b71976b9d1f111da2e3/pillow-13.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f11a3c1358bb3c68012a7b1f41b223c3db9f7bfde90b481df028cfe1c3363313", size = 4852187, upload-time = "2026-10-16T22:16:10.693Z" }, + { url = "https://files.pythonhosted.org/packages/fb/3c/cd0770e96d20bfd990db024bcbd43897ff3e88da1f4782cf90ea231b1d4f/pillow-13.0.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:19b66ca0a4d25cc0200b381ce824c7ea090db61427315e73cfb05dbf1b35c369", size = 6515908, upload-time = "2026-10-16T22:16:12.896Z" }, + { url = "https://files.pythonhosted.org/packages/ef/fe/f5cdaa2d1c4086e757430f368c271a58ee29cfe7378e7ae7b9d964015c25/pillow-13.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5f56499c1a74d2b862beb0c33b8016f99d095858455df9d21583bbbc1c15b582", size = 7142544, upload-time = "2026-10-16T22:16:14.844Z" }, + { url = "https://files.pythonhosted.org/packages/fb/b5/a54f6d44adbcd23737c8c12953f42be107e4cca64e247c0ca3a5b563061c/pillow-13.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a2a14cd73d5e6c927f644b0110ee81f59c4ef506259ec9183904747f2caacc81", size = 6613097, upload-time = "2026-10-16T22:16:16.893Z" }, + { url = "https://files.pythonhosted.org/packages/e6/b4/9e6c1207c21b2e91db0d15c16d30f3701ce5add1bd4da0e787761e66cb6e/pillow-13.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:08b826a9bf1265c76de04a42061d61ea6b109418b7826f28ff1ecdfaa26c5502", size = 7224846, upload-time = "2026-10-16T22:16:19.195Z" }, + { url = "https://files.pythonhosted.org/packages/78/9f/d3c3cb0518f3dd1eee0ef501535f53d15597a53c5c4118d178086143397a/pillow-13.0.0-cp313-cp313-win32.whl", hash = "sha256:12b0fa15879fe5a9d9eebe66e4e2d74128a773b1a4448010c9c714f45e04b9d8", size = 6516013, upload-time = "2026-10-16T22:16:21.389Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ed/1b16fb66a37e1b9e41370b93b2c614c7da761a5b2a41dc333f7af4639962/pillow-13.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:9dda0788a9932776a75d8bcc020076edc308ce2508b51f6739a45e3158b3fc42", size = 7284777, upload-time = "2026-10-16T22:16:23.393Z" }, + { url = "https://files.pythonhosted.org/packages/87/7d/8d02eba9f7ecc87f8e90f731e032cc4773802f2a843763afd0c66a535ff4/pillow-13.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:40a266371ece581e5de13b6635ef78d7487824af80561b6ca27694a88c19bc0f", size = 2698826, upload-time = "2026-10-16T22:16:25.382Z" }, + { url = "https://files.pythonhosted.org/packages/8e/45/fbad9c7f5e2f1745c373a434d46072bc84eddfefaa28b852425ac957fda6/pillow-13.0.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:44629d4498c9cb6b2051806155f22141df0d8a929c56134b166655232dfb2f8c", size = 4190721, upload-time = "2026-10-16T22:16:27.524Z" }, + { url = "https://files.pythonhosted.org/packages/a2/bf/2074902a259a90692c5dbf132885d21671644cbbd3f690047516243a55db/pillow-13.0.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:bf97ba1b5542050e9b0c74e632323b6d8136cc99d64e193abebee22fe6013c76", size = 4290236, upload-time = "2026-10-16T22:16:29.562Z" }, + { url = "https://files.pythonhosted.org/packages/ff/a5/3d1bb93b8ea38d15d21356c1b8e9f50971ac592aaa248f7fb71739094c0e/pillow-13.0.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:aa694c49787040943570d61c9b8fc01271bd2a2cfdd55f0d896f8aecdce1a981", size = 3723093, upload-time = "2026-10-16T22:16:31.249Z" }, + { url = "https://files.pythonhosted.org/packages/84/a1/be060135d85187b25fa8b2573786c0e45c62ae27527fff5257675eb97f4a/pillow-13.0.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:49c12af515073e9bf511e4ef736743bf70d531a643668722279314b937742ba4", size = 5572253, upload-time = "2026-10-16T22:16:33.103Z" }, + { url = "https://files.pythonhosted.org/packages/b5/f4/0bf6f1ac9ba7ee2ffe9914aeb410a1035a0c1a3c42f122388d7fc950bc4b/pillow-13.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d9b0a2bee3f3e03e9f29057aedb807dbf1e1d96ee1b9d0f422d9db6c8583271d", size = 4852269, upload-time = "2026-10-16T22:16:35.102Z" }, + { url = "https://files.pythonhosted.org/packages/83/16/b603274617b3e6728da3a0133d4fba1ea8d7fbe0c4ea5fef9cbffa398b8b/pillow-13.0.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5933fcea5a5ba64c686f55c886a115cbfd92f2900460784a1e79909fdbafd7b6", size = 6516058, upload-time = "2026-10-16T22:16:37.228Z" }, + { url = "https://files.pythonhosted.org/packages/1d/f2/1371707ce438ba9a43f9d24089828494ec6f9396e28cd7903aa704dd6306/pillow-13.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e91c2b1cbeae768c98752e67e717e283d68dae45717b41f2d91eaee648e37b7d", size = 7142574, upload-time = "2026-10-16T22:16:39.172Z" }, + { url = "https://files.pythonhosted.org/packages/b9/a9/62cf68587f910bc87c5951bcb6e9430c7643a65076adf5f18b4bf350e2bd/pillow-13.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f6299e494e46253d40c34653cac369412f44ca53b5f85d848d3f95b1ed0546c", size = 6614295, upload-time = "2026-10-16T22:16:41.117Z" }, + { url = "https://files.pythonhosted.org/packages/6c/c9/9e9b48178649730299be0bafbf5f810a5b6977538f5a92d47e4ba5f5d608/pillow-13.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f9bd7d260d986f3553518c5d723544346fa48031f8aef3265d786aeb59845bc0", size = 7224841, upload-time = "2026-10-16T22:16:43.118Z" }, + { url = "https://files.pythonhosted.org/packages/8f/48/c44e91384b1b6c072a714a63d00608acc16a6a968735e478e4be4384e5ac/pillow-13.0.0-cp314-cp314-win32.whl", hash = "sha256:2e31c4e68cffd7b1f116127626813b82fcba19edf6b940a7b0c266d6484d0055", size = 6508694, upload-time = "2026-10-16T22:16:45.883Z" }, + { url = "https://files.pythonhosted.org/packages/50/e2/7ad17747517e4c813dca78257d6bb593466f8231baf1384bc98d92745edb/pillow-13.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:f7cbb7a64e7ec664775195e4f81923bc8a93d9451b963f844e59118f63147a7a", size = 7281830, upload-time = "2026-10-16T22:16:47.725Z" }, + { url = "https://files.pythonhosted.org/packages/41/9f/e5b51f2ce8ef4563215334035403ce61a244f93a2e65c24a940131618f87/pillow-13.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:a6aaa7871aebca081eb5c45f83e845bbd9712ae99fa9286dbfdcee835e63f4b4", size = 2695468, upload-time = "2026-10-16T22:16:49.515Z" }, + { url = "https://files.pythonhosted.org/packages/97/73/a53502f731f6c84805a4ce87a8881e86d07a65aee64728b900d112dc703e/pillow-13.0.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:7b999816b5850a35ada08443e6e03945f1f6488144a83afe2d37b240a552aafa", size = 5578196, upload-time = "2026-10-16T22:16:51.291Z" }, + { url = "https://files.pythonhosted.org/packages/21/50/7e949959a56b5559c78ef172b70fc6025706acb289f3f648a15329e4fa6f/pillow-13.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:67871a13cf47275201553b536c025da777f997fa562a19eb798af4ad4b97c18f", size = 4857276, upload-time = "2026-10-16T22:16:53.399Z" }, + { url = "https://files.pythonhosted.org/packages/c9/52/43ded0ac08e77e39d17bd6d894162572201b5e8fdc4a022b14c55a1960a4/pillow-13.0.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e8ca8f69b7c77fa96dad99f8638c1fc4f1c0bed4acaa1baf7a3c31bdb80a0ab1", size = 6607008, upload-time = "2026-10-16T22:16:55.525Z" }, + { url = "https://files.pythonhosted.org/packages/0d/2e/4a57ed216d5bf877387cba4d44c02aa87abe51ad2e06404aa6b597c4da39/pillow-13.0.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bce6a29c3898191f4c9998e4d4e8f69790caeabde46e54da4bc235ce5bde683", size = 7224281, upload-time = "2026-10-16T22:16:57.738Z" }, + { url = "https://files.pythonhosted.org/packages/5c/3d/2929b248e135752d63aaeabf53f6de797e905b7b6263f9c1e2adade20aba/pillow-13.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:816752a5ef76a80484c8c441c85593b7ea9304f6231fc5776ad1fbff7e773058", size = 6695600, upload-time = "2026-10-16T22:16:59.842Z" }, + { url = "https://files.pythonhosted.org/packages/bc/33/fb0da992cf084ed1ee6ee05e96b6191e35c351eb707ca2df874feb24ce47/pillow-13.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5bdb38ba220b61b4ec31dd1046dea6b016d3c6850a23f43ed8b58332b2fc668e", size = 7300589, upload-time = "2026-10-16T22:17:01.686Z" }, + { url = "https://files.pythonhosted.org/packages/bb/af/c30dd9ef6a3dce84ecb1b2393cac629047a32e66279056c6cb46c3ffd65c/pillow-13.0.0-cp314-cp314t-win32.whl", hash = "sha256:06903aac074d00c988e77a1fc435286dc498506d4ca8d6f69df9babddf4ecc15", size = 6517204, upload-time = "2026-10-16T22:17:03.722Z" }, + { url = "https://files.pythonhosted.org/packages/85/d5/ef3a8ae7609c8ab26570abf18194882534b480d245a9148b895a2262c004/pillow-13.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:9a635068d9793c7f0d929f39f18b58f1bd86c236e8e7b64167b86af9232ebca0", size = 7286695, upload-time = "2026-10-16T22:17:05.543Z" }, + { url = "https://files.pythonhosted.org/packages/84/3c/0861db0c69a03689ebe3e7599d35668a414deb5aaafd8255215e4e62e3d3/pillow-13.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0d1a9cf7bc6917538b20f8d06b9ab2147e542f68849e96fc58eb66bdf6acc692", size = 2698098, upload-time = "2026-10-16T22:17:07.674Z" }, + { url = "https://files.pythonhosted.org/packages/6e/eb/e86a41962a3a31ad495a3d6a912d9002b01bba4a6fa71c28703abdca7f69/pillow-13.0.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7d5e097eabd5d4915c27ac9f6e9325bb1e01a7c94d7348b5c4451d3fc30e8521", size = 4191213, upload-time = "2026-10-16T22:17:09.449Z" }, + { url = "https://files.pythonhosted.org/packages/dd/04/7e7445e706afec84ef06dc25b2c77f9cecff242c23730c62928ad1089d4a/pillow-13.0.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:51ebb529fc5e8abdd55302f6c3f8943037348ec2384329a3e55677f69ae2fdfc", size = 4290650, upload-time = "2026-10-16T22:17:11.196Z" }, + { url = "https://files.pythonhosted.org/packages/46/85/d534089068ac40c0f61f650389a296c812eab745a8a733f81feec39ae955/pillow-13.0.0-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:c87a04e7f152ee4db5dbe15f0bfa3fe628a1aeedbe66b81c43b87f52c813f9ac", size = 3723078, upload-time = "2026-10-16T22:17:12.772Z" }, + { url = "https://files.pythonhosted.org/packages/ce/2b/00b5c3b401df538b5dbe311d3899730fae5ba1e21cb8b80a128887ac6747/pillow-13.0.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:20722cd5375533ad754053363a80b8fb30c79d37930a6f7228030e237ce3bd5d", size = 5572292, upload-time = "2026-10-16T22:17:14.539Z" }, + { url = "https://files.pythonhosted.org/packages/72/f5/a6b0610f946e9b54ae888ba7ad29d6e2f8d9b11f69e212d70416b7186c09/pillow-13.0.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:04a63720f79e22fd54d897c233a68314c50ca0603360f54ce2bd5db8f0f43782", size = 4852222, upload-time = "2026-10-16T22:17:16.521Z" }, + { url = "https://files.pythonhosted.org/packages/1e/d0/c0ff25bb0427ec70f32aac995453321fc3c4494a46c7292ff02d9d260b04/pillow-13.0.0-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f8db54177035a2b5f717f94475b74907e12a96dc74f6d487f3966b0a4694071", size = 6527349, upload-time = "2026-10-16T22:17:18.534Z" }, + { url = "https://files.pythonhosted.org/packages/85/11/e46fa0bcc0fc117f1eacc206b3d51f04d583fab328b4b740672d0438d83f/pillow-13.0.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f36aa77f74b14a2103622b196402c71330e4e7cf4122ee45c854e9a01e0eecf", size = 7152873, upload-time = "2026-10-16T22:17:20.415Z" }, + { url = "https://files.pythonhosted.org/packages/7c/53/2bdeca705f3a58679fa9201233193c86a30238340ca29b3a152c3fcc719b/pillow-13.0.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:149a1c323ba366f90b48e6f1a6db6582eb50512df374588de56fc909abc0f0f3", size = 6626871, upload-time = "2026-10-16T22:17:22.361Z" }, + { url = "https://files.pythonhosted.org/packages/14/de/3829030f209722ade3753bb456b805a0e7f885cf885b483407365c82e9ca/pillow-13.0.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e892354a424b1e82a78ba16785822bdd40de06f19446a3d4a28047df1a4f8932", size = 7236439, upload-time = "2026-10-16T22:17:24.352Z" }, + { url = "https://files.pythonhosted.org/packages/44/b1/67fc37388382bc036a74f04da5bb6fcbf90ec3ac1f45893e06176c373fd3/pillow-13.0.0-cp315-cp315-win32.whl", hash = "sha256:8e459b613cf31f8980f584387b4fe47bf08e076e288d61aa8eba1f7fd4ddbb81", size = 6508688, upload-time = "2026-10-16T22:17:26.314Z" }, + { url = "https://files.pythonhosted.org/packages/44/05/fdb6a79aee10861165526b41b7b440e36ee1ff58613b2fbefe3acbf06d4f/pillow-13.0.0-cp315-cp315-win_amd64.whl", hash = "sha256:d4737f50d23ddd11d6685faacbb9252887dde0bc7997127757247983d74399d6", size = 7281107, upload-time = "2026-10-16T22:17:28.198Z" }, + { url = "https://files.pythonhosted.org/packages/e6/9c/6c6f7dc2a566467baf121394e83de25ac287cffe34cc030726beb4be0224/pillow-13.0.0-cp315-cp315-win_arm64.whl", hash = "sha256:2310e2adfc13c6d457d7d0f2ffdd5c56a74a317650cf765887df8d515a647ac0", size = 2695513, upload-time = "2026-10-16T22:17:30.013Z" }, + { url = "https://files.pythonhosted.org/packages/23/16/e9120defdb8bff693b582d035312acc6f530cdc2bc5238a87f410efccd82/pillow-13.0.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:21c32061a5512dc13f87cc7303e120e4d77c2f70df89a35af0e3ce246e5ac57f", size = 5578129, upload-time = "2026-10-16T22:17:31.642Z" }, + { url = "https://files.pythonhosted.org/packages/47/22/76faf2bb2448f48a84cf894c1e2bb1090d7d2b1aa521ece131cb2f05d631/pillow-13.0.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:1c774b9c0ba0d0b356f71530677b39028878a2cae5a93e0a13779cfd17120f88", size = 4857428, upload-time = "2026-10-16T22:17:33.43Z" }, + { url = "https://files.pythonhosted.org/packages/b3/64/0861ea4e03c50b14af9ed9dd8b9f388ab42f445c623a9fcbab19aef7aa55/pillow-13.0.0-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20822140c9a2ba9c5e42df342b0a892ab2e102fc0e3db967a133bb9ce3f898bb", size = 6612582, upload-time = "2026-10-16T22:17:35.415Z" }, + { url = "https://files.pythonhosted.org/packages/5c/20/cd1e9b3f60a9f3d5ebe46da36955c26004092a501f7f2c42f9fcc26611bc/pillow-13.0.0-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ffea6b2986a797c84b6d1d27d4f43e0b83c73fc16281a930891cd237cf0d08fe", size = 7230176, upload-time = "2026-10-16T22:17:37.362Z" }, + { url = "https://files.pythonhosted.org/packages/b6/ef/ffb0a2fc85690714fb7ac662956949645d57f15bf4426f520da361e7b6e3/pillow-13.0.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:05cd2cd39055d0b9650060e4513ef4a9a0aea870083950bd046a0d6490f93a22", size = 6703640, upload-time = "2026-10-16T22:17:39.313Z" }, + { url = "https://files.pythonhosted.org/packages/e0/c2/6402ee3ccb3363aeed8fdb3f9fe56703ac5377a539f0b81b53999d7e121f/pillow-13.0.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:c6fd031333dedcad7ce3e03d244093f43504f209e86925ebdb2b868fa4037630", size = 7309231, upload-time = "2026-10-16T22:17:41.021Z" }, + { url = "https://files.pythonhosted.org/packages/fc/96/d6b82e8b8c06ad143b66b12e0b31051e4bf489b4fabca1f390a14fe1ebde/pillow-13.0.0-cp315-cp315t-win32.whl", hash = "sha256:c50c80e3591e5cf9a8dfa6007d4f10732f02e32263850999286e56ccd650cfb2", size = 6517200, upload-time = "2026-10-16T22:17:42.886Z" }, + { url = "https://files.pythonhosted.org/packages/60/d4/0062e6005e9b270b165015aafd343364ac378ec5a685431ea42baad33357/pillow-13.0.0-cp315-cp315t-win_amd64.whl", hash = "sha256:adb3c2124c68e480f4632d06cb7caa3b48a51678475f483b4edb1c6dee29ea43", size = 7287488, upload-time = "2026-10-16T22:17:45.56Z" }, + { url = "https://files.pythonhosted.org/packages/e4/81/b8eb349746be7bce47dd95337c6634e84910af91b59aaa9159c034c614fa/pillow-13.0.0-cp315-cp315t-win_arm64.whl", hash = "sha256:4a25756244bdcce3b50580baadf320fa48297f0eeb8e114ba64139a40d4d0fc8", size = 2698073, upload-time = "2026-10-16T22:17:47.556Z" }, + { url = "https://files.pythonhosted.org/packages/68/c0/fb7b1caf25ed5ac5d46116f09b8b0706b9559833c65c667cecb1a53153f2/pillow-13.0.0-pp311-pypy311_pp80-macosx_10_15_x86_64.whl", hash = "sha256:405be6058e206a86fedce2f715ecc2343f94072d7925251632dffa2c05f70dca", size = 5521630, upload-time = "2026-10-16T22:17:50.008Z" }, + { url = "https://files.pythonhosted.org/packages/1a/e6/4d11d5b1137f4fc080605cce410cfaae4f303ad400bdec75d27d3083fa29/pillow-13.0.0-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:b84be41387fc00db28c13c02e30d42b02d8d8f6a4a741a1aee6012ca7f1f6039", size = 4806023, upload-time = "2026-10-16T22:17:51.932Z" }, + { url = "https://files.pythonhosted.org/packages/f1/45/0923202a658e8ff6aafd72c1a4395ebadcdebaa182c437d8595d3dd3db32/pillow-13.0.0-pp311-pypy311_pp80-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a192360d512305fe92d3053e4f7627bbad1f7708f1f4ad38cccd9336acabe9ad", size = 5464831, upload-time = "2026-10-16T22:17:53.742Z" }, + { url = "https://files.pythonhosted.org/packages/07/52/d3e38f0cad1dadea2a658b9a7d6ba8a04048f5ae14f011b806e5c3bd6bcb/pillow-13.0.0-pp311-pypy311_pp80-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:83b37abd87b590acd8f47ca8a61f70893322b11834d36e07c2298dacad4d14d2", size = 6043133, upload-time = "2026-10-16T22:17:55.625Z" }, + { url = "https://files.pythonhosted.org/packages/c4/f9/2ed7685980c1d64f8131a7d87a19c369424747577152622b73ddeff163b7/pillow-13.0.0-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:73ee25cf8cf8b75d5a5aeed7cb6588f5e5dbfbb0fde51707b630bbb23897645c", size = 7365208, upload-time = "2026-10-16T22:17:57.509Z" }, + { url = "https://files.pythonhosted.org/packages/60/da/f6d644e631c5b370c5d0b899f3ccadd2780aab070b29a110527cf4e1fd2c/pillow-13.0.0-pp312-pypy312_pp80-macosx_10_15_x86_64.whl", hash = "sha256:8619685cad8efc4c38c66d3b36aad854523297c43d748b3b6f0cc03c90ba3463", size = 5523188, upload-time = "2026-10-16T22:17:59.334Z" }, + { url = "https://files.pythonhosted.org/packages/e4/b0/2594f202d743a35d4fe80682bfd96f277e5ca7aecb27cf64ef5bfc1d000b/pillow-13.0.0-pp312-pypy312_pp80-macosx_11_0_arm64.whl", hash = "sha256:7e91e97a929232cdb828889ee6ad0e48d7f40f4ec38818f4e4a8968b2b1af22e", size = 4806808, upload-time = "2026-10-16T22:18:01.188Z" }, + { url = "https://files.pythonhosted.org/packages/8e/ed/d504165ef79af6fafe25c76726cf30f544cc236002f7ed054f1d51adc4ff/pillow-13.0.0-pp312-pypy312_pp80-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:93ff9c9c3663ce23aaa5d0b6b6abac55359e2a0c06c7e30f3771829af816be63", size = 5464358, upload-time = "2026-10-16T22:18:02.779Z" }, + { url = "https://files.pythonhosted.org/packages/7b/fe/a10aba5503ca13e9e009b8bd0a1a4ce5584bdce246245fd6f3a83701369c/pillow-13.0.0-pp312-pypy312_pp80-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e65dd6e75de67b2362a4fa3e16aa627595f65054dc4ec73d64680c84d592fa61", size = 6043514, upload-time = "2026-10-16T22:18:04.538Z" }, + { url = "https://files.pythonhosted.org/packages/c0/37/66b12dc476041fe523bca29c9d58fbf1ea92a4eaf73acfb9e993948f1191/pillow-13.0.0-pp312-pypy312_pp80-win_amd64.whl", hash = "sha256:567f20f1c75897d7663830da6ea8af719e03d712b1d9ee7f813319f9ece42e5a", size = 7366030, upload-time = "2026-10-16T22:18:06.638Z" }, ] [[package]] From 46731e939ea81a31fe468378f5344657640da36b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 7 Nov 2026 16:33:11 +0100 Subject: [PATCH 035/100] fix(rpc): bump evm2 to fix tracer panic on frameless logs (#28330) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- Cargo.lock | 44 ++++++++++++++++++++++---------------------- Cargo.toml | 12 ++++++------ 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bbbea9c1f1b..8c9c1c0baca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1043,7 +1043,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1054,7 +1054,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3623,7 +3623,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -3700,7 +3700,7 @@ dependencies = [ [[package]] name = "evm2" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -3741,7 +3741,7 @@ dependencies = [ [[package]] name = "evm2-inspectors" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "alloy-consensus", "alloy-eip2930", @@ -3764,7 +3764,7 @@ dependencies = [ [[package]] name = "evm2-jit" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "evm2", "evm2-jit-backend", @@ -3779,7 +3779,7 @@ dependencies = [ [[package]] name = "evm2-jit-backend" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "eyre", "ruint", @@ -3788,12 +3788,12 @@ dependencies = [ [[package]] name = "evm2-jit-build" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" [[package]] name = "evm2-jit-builtins" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "alloy-primitives", "evm2", @@ -3806,7 +3806,7 @@ dependencies = [ [[package]] name = "evm2-jit-codegen" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "alloy-primitives", "bitflags 2.13.2", @@ -3829,7 +3829,7 @@ dependencies = [ [[package]] name = "evm2-jit-context" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "alloy-primitives", "evm2", @@ -3839,7 +3839,7 @@ dependencies = [ [[package]] name = "evm2-jit-llvm" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "alloy-primitives", "cc", @@ -3852,7 +3852,7 @@ dependencies = [ [[package]] name = "evm2-jit-runtime" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -3878,7 +3878,7 @@ dependencies = [ [[package]] name = "evm2-macros" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=baf0d38f3b4f971e59b4aeb51de65e44d868d703#baf0d38f3b4f971e59b4aeb51de65e44d868d703" +source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" dependencies = [ "proc-macro2", "quote", @@ -5529,7 +5529,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -6622,7 +6622,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.59.0", ] [[package]] @@ -7668,7 +7668,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -11430,7 +11430,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -11510,7 +11510,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 1.0.10", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -12203,7 +12203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -12489,7 +12489,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] @@ -13664,7 +13664,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9cd8b275dfd..5aa08c8b6ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -432,9 +432,9 @@ reth-trie-sparse = { path = "crates/trie/sparse", default-features = false } reth-zstd-compressors = { version = "0.8.2", default-features = false } # evm2 -evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703", default-features = false } -evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703", default-features = false } -evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703", default-features = false } +evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b", default-features = false } +evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b", default-features = false } +evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b", default-features = false } # eth alloy-dyn-abi = "1.6.1" @@ -670,9 +670,9 @@ ipnet = "2.11" # evm2 is patched through its pre-transfer URL, which redirects to alloy-rs/evm2, because Cargo # rejects a patch from the same source. [patch."https://github.com/alloy-rs/evm2"] -evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703" } -evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703" } -evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "baf0d38f3b4f971e59b4aeb51de65e44d868d703" } +evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b" } +evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b" } +evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b" } [patch.crates-io] # reth-core From 685039caf7b8114d2b246c237bc1f6128ca15e22 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 8 Nov 2026 13:39:02 +0100 Subject: [PATCH 036/100] fix(rpc): replay bad blocks in debug_intermediateRoots (#28331) --- crates/rpc/rpc-api/src/debug.rs | 4 ++-- crates/rpc/rpc/src/debug.rs | 29 ++++++++++++++++++-------- docs/vocs/docs/pages/jsonrpc/debug.mdx | 2 +- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/crates/rpc/rpc-api/src/debug.rs b/crates/rpc/rpc-api/src/debug.rs index 7b2a6eaf353..306b5fecf9a 100644 --- a/crates/rpc/rpc-api/src/debug.rs +++ b/crates/rpc/rpc-api/src/debug.rs @@ -292,8 +292,8 @@ pub trait DebugApi { end_number: u64, ) -> RpcResult<()>; - /// Executes a block (bad- or canon- or side-), and returns a list of intermediate roots: the - /// stateroot after each transaction. + /// Executes a canonical or bad block, and returns a list of intermediate roots: the stateroot + /// after each transaction up to the first invalid one. #[method(name = "intermediateRoots")] async fn debug_intermediate_roots( &self, diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index c09572c4224..3f096c9a9d0 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -24,7 +24,7 @@ use reth_errors::RethError; use reth_evm::{ execute::{BlockExecutor, BlockTransactionResult, Executor}, witness::ExecutionWitnessRecord, - ConfigureEvm, DynDatabase, Evm, EvmEnv, EvmEnvFor, + BlockExecutionError, ConfigureEvm, DynDatabase, Evm, EvmEnv, EvmEnvFor, }; use reth_primitives_traits::{ Block as BlockTrait, BlockBody, BlockTy, ReceiptWithBloom, RecoveredBlock, @@ -820,12 +820,21 @@ where } /// Executes a block and returns the state root after each transaction. + /// + /// The block is either canonical or a bad block the engine rejected. Execution stops at the + /// first transaction that is invalid on top of its predecessors, so the result for a bad block + /// holds the roots before that transaction. pub async fn intermediate_roots(&self, block_hash: B256) -> Result, Eth::Error> { - let block = self - .eth_api() - .recovered_block(block_hash.into()) - .await? - .ok_or(EthApiError::HeaderNotFound(block_hash.into()))?; + let block = match self.eth_api().recovered_block(block_hash.into()).await? { + Some(block) => block, + None => { + self.inner + .bad_block_store + .get(block_hash) + .ok_or(EthApiError::HeaderNotFound(block_hash.into()))? + .block + } + }; let evm_env = self.eth_api().evm_env_for_header(block.sealed_block().sealed_header())?; self.eth_api() @@ -841,9 +850,11 @@ where if is_cancelled() { return Err(EthApiError::InternalEthError.into()) } - let output = executor - .execute_transaction_without_commit(tx) - .map_err(Eth::Error::from_evm_err)?; + let output = match executor.execute_transaction_without_commit(tx) { + Ok(output) => output, + Err(BlockExecutionError::Validation(_)) => break, + Err(err) => return Err(Eth::Error::from_evm_err(err)), + }; let mut changes = reth_execution_types::TransactionChanges::default(); let Ok(()) = output.result().pending_state.visit(&mut changes); let mut transaction_state = reth_execution_types::BlockState::default(); diff --git a/docs/vocs/docs/pages/jsonrpc/debug.mdx b/docs/vocs/docs/pages/jsonrpc/debug.mdx index d64a9e06c6c..14df6712250 100644 --- a/docs/vocs/docs/pages/jsonrpc/debug.mdx +++ b/docs/vocs/docs/pages/jsonrpc/debug.mdx @@ -179,7 +179,7 @@ Similar to [`debug_executionWitness`](#debug_executionwitness), but accepts a bl ## `debug_intermediateRoots` -Executes a block and returns a list of intermediate state roots: the state root after each transaction within the block. Accepts both canonical and non-canonical (bad or side) blocks by hash. +Executes a block and returns a list of intermediate state roots: the state root after each transaction within the block. Accepts canonical blocks and the bad blocks returned by `debug_getBadBlocks` by hash. Execution stops at the first invalid transaction, so the list for a bad block can be shorter than its transaction list. | Client | Method invocation | | ------ | ------------------------------------------------------------------- | From 5efe80f515c96fa34b569a22fb810b54f914cfb0 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 8 Nov 2026 16:13:14 +0100 Subject: [PATCH 037/100] fix(net): give pending sessions and the listener a turn under load (#28332) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/net/network/src/budget.rs | 7 ++++++ crates/net/network/src/session/mod.rs | 36 ++++++++++++++++++++++++--- crates/net/network/src/swarm.rs | 21 ++++++++++++++-- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/crates/net/network/src/budget.rs b/crates/net/network/src/budget.rs index f1d9ca87469..352afce8953 100644 --- a/crates/net/network/src/budget.rs +++ b/crates/net/network/src/budget.rs @@ -13,6 +13,13 @@ pub const DEFAULT_BUDGET_TRY_DRAIN_DOWNLOADERS: u32 = 2; /// Default is 10 [`SwarmEvent`](crate::swarm::SwarmEvent)s. pub const DEFAULT_BUDGET_TRY_DRAIN_SWARM: u32 = 10; +/// Default budget of consecutive events taken from a prioritized source before a lower priority +/// source is polled first once, e.g. active sessions over pending sessions and sessions over new +/// incoming connections. +/// +/// Default is 16 events. +pub const DEFAULT_BUDGET_PRIORITIZED_EVENTS: u32 = 16; + /// Default budget to try and drain pending messages from [`NetworkHandle`](crate::NetworkHandle) /// channel. Polling the [`TransactionsManager`](crate::transactions::TransactionsManager) future /// sends these types of messages. diff --git a/crates/net/network/src/session/mod.rs b/crates/net/network/src/session/mod.rs index 4c4b8f3e914..14f136c685b 100644 --- a/crates/net/network/src/session/mod.rs +++ b/crates/net/network/src/session/mod.rs @@ -10,6 +10,7 @@ mod types; pub use types::BlockRangeInfo; use crate::{ + budget::DEFAULT_BUDGET_PRIORITIZED_EVENTS, message::PeerMessage, metrics::SessionManagerMetrics, protocol::{IntoRlpxSubProtocol, OnNotSupported, RlpxSubProtocolHandlers, RlpxSubProtocols}, @@ -118,6 +119,8 @@ pub struct SessionManager { active_session_tx: MeteredPollSender>, /// Receiver half that listens for [`ActiveSessionMessage`] produced by pending sessions. active_session_rx: ReceiverStream>, + /// Number of active session events returned since pending sessions were last polled. + active_events_in_row: u32, /// Additional `RLPx` sub-protocols to be used by the session manager. extra_protocols: RlpxSubProtocols, /// Tracks the ongoing graceful disconnections attempts for incoming connections. @@ -182,6 +185,7 @@ impl SessionManager { pending_session_rx: ReceiverStream::new(pending_sessions_rx), active_session_tx: MeteredPollSender::new(active_session_tx, "network_active_session"), active_session_rx: ReceiverStream::new(active_session_rx), + active_events_in_row: 0, extra_protocols, disconnections_counter: Default::default(), metrics: Default::default(), @@ -501,13 +505,32 @@ impl SessionManager { /// This polls all the session handles and returns [`SessionEvent`]. /// - /// Active sessions are prioritized. + /// Active sessions are prioritized, but after [`DEFAULT_BUDGET_PRIORITIZED_EVENTS`] active + /// session events in a row pending sessions are polled first once, so a steady stream of active + /// session messages can't hold back new sessions. pub(crate) fn poll( &mut self, cx: &mut Context<'_>, has_inbound_capacity: impl Fn(PeerId) -> bool, ) -> Poll> { - // Poll events from active sessions + if self.active_events_in_row >= DEFAULT_BUDGET_PRIORITIZED_EVENTS { + self.active_events_in_row = 0; + if let Poll::Ready(event) = self.poll_pending_session_event(cx, &has_inbound_capacity) { + return Poll::Ready(event) + } + } + + if let Poll::Ready(event) = self.poll_active_session_event(cx) { + self.active_events_in_row += 1; + return Poll::Ready(event) + } + + self.active_events_in_row = 0; + self.poll_pending_session_event(cx, has_inbound_capacity) + } + + /// Polls the next event from the active sessions. + fn poll_active_session_event(&mut self, cx: &mut Context<'_>) -> Poll> { match self.active_session_rx.poll_next_unpin(cx) { Poll::Pending => {} Poll::Ready(None) => { @@ -549,8 +572,15 @@ impl SessionManager { } } } + Poll::Pending + } - // Poll the pending session event stream + /// Polls the next event from the pending sessions. + fn poll_pending_session_event( + &mut self, + cx: &mut Context<'_>, + has_inbound_capacity: impl Fn(PeerId) -> bool, + ) -> Poll> { let event = loop { let event = match self.pending_session_rx.poll_next_unpin(cx) { Poll::Pending => return Poll::Pending, diff --git a/crates/net/network/src/swarm.rs b/crates/net/network/src/swarm.rs index 986a5ee0b35..594c123d3ce 100644 --- a/crates/net/network/src/swarm.rs +++ b/crates/net/network/src/swarm.rs @@ -1,4 +1,5 @@ use crate::{ + budget::DEFAULT_BUDGET_PRIORITIZED_EVENTS, listener::{ConnectionListener, ListenerEvent}, message::PeerMessage, peers::{InboundConnectionError, PeersManager}, @@ -55,6 +56,8 @@ pub(crate) struct Swarm { sessions: SessionManager, /// Tracks the entire state of the network and handles events received from the sessions. state: NetworkState, + /// Number of session events handled since the listener was last polled. + session_events_in_row: u32, } // === impl Swarm === @@ -66,7 +69,7 @@ impl Swarm { sessions: SessionManager, state: NetworkState, ) -> Self { - Self { incoming, sessions, state } + Self { incoming, sessions, state, session_events_in_row: 0 } } /// Adds a protocol handler to the `RLPx` sub-protocol list. @@ -326,7 +329,9 @@ impl Stream for Swarm { // This loop advances the network's state prioritizing local work [NetworkState] over work // coming in from the network [SessionManager], [ConnectionListener] - // Existing connections are prioritized over new __incoming__ connections + // Existing connections are prioritized over new __incoming__ connections, but after + // `DEFAULT_BUDGET_PRIORITIZED_EVENTS` session events in a row the listener is polled first + // once loop { while let Poll::Ready(action) = this.state.poll(cx) { if let Some(event) = this.on_state_action(action) { @@ -334,11 +339,22 @@ impl Stream for Swarm { } } + if this.session_events_in_row >= DEFAULT_BUDGET_PRIORITIZED_EVENTS { + this.session_events_in_row = 0; + if let Poll::Ready(event) = Pin::new(&mut this.incoming).poll(cx) { + if let Some(event) = this.on_connection(event) { + return Poll::Ready(Some(event)) + } + continue + } + } + // poll all sessions match this.sessions.poll(cx, |peer_id| this.state.peers().has_inbound_capacity(peer_id)) { Poll::Pending => {} Poll::Ready(event) => { + this.session_events_in_row += 1; if let Some(event) = this.on_session_event(event) { return Poll::Ready(Some(event)) } @@ -347,6 +363,7 @@ impl Stream for Swarm { } // poll listener for incoming connections + this.session_events_in_row = 0; match Pin::new(&mut this.incoming).poll(cx) { Poll::Pending => {} Poll::Ready(event) => { From faf670e16dedad9786ba0faee00aee123133d176 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 09:34:01 +0100 Subject: [PATCH 038/100] fix(rpc): bound eth_callMany, trace_callMany and debug_traceCallMany (#28314) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/node/core/src/args/rpc_server.rs | 2 + crates/rpc/rpc-eth-api/src/core.rs | 7 +- crates/rpc/rpc-eth-api/src/helpers/call.rs | 20 +- crates/rpc/rpc-eth-types/src/error/mod.rs | 14 +- crates/rpc/rpc-eth-types/src/utils.rs | 186 ++++++++++++++++++- crates/rpc/rpc-server-types/src/constants.rs | 9 + crates/rpc/rpc/src/debug.rs | 12 +- crates/rpc/rpc/src/eth/core.rs | 104 +++++++++++ crates/rpc/rpc/src/trace.rs | 16 +- docs/vocs/docs/pages/cli/reth/node.mdx | 4 +- 10 files changed, 349 insertions(+), 25 deletions(-) diff --git a/crates/node/core/src/args/rpc_server.rs b/crates/node/core/src/args/rpc_server.rs index a6dda0458f0..be14e3bad57 100644 --- a/crates/node/core/src/args/rpc_server.rs +++ b/crates/node/core/src/args/rpc_server.rs @@ -660,6 +660,8 @@ pub struct RpcServerArgs { pub rpc_max_logs_per_response: ZeroAsNoneU64, /// Maximum gas limit for `eth_call`, `eth_estimateGas`, and call tracing RPC methods. + /// + /// The calls of an `eth_callMany`, `trace_callMany` or `debug_traceCallMany` request share it. #[arg( long = "rpc.gascap", alias = "rpc-gascap", diff --git a/crates/rpc/rpc-eth-api/src/core.rs b/crates/rpc/rpc-eth-api/src/core.rs index fb73505bff0..2cb0bc0dfd0 100644 --- a/crates/rpc/rpc-eth-api/src/core.rs +++ b/crates/rpc/rpc-eth-api/src/core.rs @@ -263,8 +263,11 @@ pub trait EthApi< #[method(name = "fillTransaction")] async fn fill_transaction(&self, request: TxReq) -> RpcResult>; - /// Simulate arbitrary number of transactions at an arbitrary blockchain index, with the - /// optionality of state overrides + /// Simulate transactions at an arbitrary blockchain index, with the optionality of state + /// overrides. + /// + /// The request is bounded by [`CallManyBudget`](reth_rpc_eth_types::utils::CallManyBudget): + /// its calls share the RPC gas cap. #[method(name = "callMany")] async fn call_many( &self, diff --git a/crates/rpc/rpc-eth-api/src/helpers/call.rs b/crates/rpc/rpc-eth-api/src/helpers/call.rs index 00f76253451..ae0e7343050 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/call.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/call.rs @@ -36,6 +36,7 @@ use reth_rpc_eth_types::{ }, error::{AsEthApiError, FromEthApiError}, simulate::{self, EthSimulateError, SimulatedState}, + utils::CallManyBudget, EthApiError, RpcInvalidTransactionError, StateCacheDb, }; use reth_storage_api::{BlockIdReader, ProviderTx, StateProvider}; @@ -288,8 +289,10 @@ pub trait EthCall: EstimateCall + LoadBlock + FullEthApiTypes { } } - /// Simulate arbitrary number of transactions at an arbitrary blockchain index, with the - /// optionality of state overrides + /// Simulate transactions at an arbitrary blockchain index, with the optionality of state + /// overrides. + /// + /// The request is bounded by [`CallManyBudget`]: its calls share the RPC gas cap. fn call_many( &self, bundles: Vec::Network>>>, @@ -304,6 +307,7 @@ pub trait EthCall: EstimateCall + LoadBlock + FullEthApiTypes { if bundles.is_empty() { return Err(EthApiError::InvalidParams(String::from("bundles are empty.")).into()); } + let mut budget = CallManyBudget::for_bundles(&bundles, self.call_gas_limit())?; let permit = self .acquire_owned_blocking_io() @@ -384,7 +388,7 @@ pub trait EthCall: EstimateCall + LoadBlock + FullEthApiTypes { let overrides = EvmOverrides::new(state_override.take(), block_overrides.clone()); - let (current_evm_env, prepared_tx) = this + let (current_evm_env, mut prepared_tx) = this .prepare_call_env(evm_env.clone(), tx, &mut db, overrides) .map_err(|err| { Self::Error::from_eth_err(EthApiError::call_many_error( @@ -393,15 +397,23 @@ pub trait EthCall: EstimateCall + LoadBlock + FullEthApiTypes { err.into(), )) })?; + budget.admit(&mut prepared_tx)?; let res = this.transact(&mut db, current_evm_env, prepared_tx).map_err( |err| { Self::Error::from_eth_err(EthApiError::call_many_error( bundle_index, tx_index, - err.into(), + budget.map_call_err(err).into(), )) }, )?; + budget.charge(&res.result).map_err(|err| { + Self::Error::from_eth_err(EthApiError::call_many_error( + bundle_index, + tx_index, + err.into(), + )) + })?; match Self::Error::ensure_success::>(res.result) { Ok(output) => { diff --git a/crates/rpc/rpc-eth-types/src/error/mod.rs b/crates/rpc/rpc-eth-types/src/error/mod.rs index 11f4c1b8b27..f25b7cb2b2c 100644 --- a/crates/rpc/rpc-eth-types/src/error/mod.rs +++ b/crates/rpc/rpc-eth-types/src/error/mod.rs @@ -217,6 +217,10 @@ pub enum EthApiError { /// Error thrown when trying to access block access list for blocks before Amsterdam #[error("Block access list not available for pre-Amsterdam blocks")] BlockAccessListNotAvailablePreAmsterdam, + /// Thrown when the calls of an `eth_callMany`, `trace_callMany` or `debug_traceCallMany` + /// request need more gas than the RPC gas cap they share. + #[error("the request's calls exceed the RPC gas cap of {0}")] + CallManyGasCapExceeded(u64), /// Any other error #[error("{0}")] Other(Box), @@ -383,10 +387,12 @@ impl From for jsonrpsee_types::error::ErrorObject<'static> { internal_rpc_err(msg) } EthApiError::InvalidParams(msg) => invalid_params_rpc_err(msg), - err @ EthApiError::ExecutionTimedOut(_) => rpc_error_with_code( - jsonrpsee_types::error::CALL_EXECUTION_FAILED_CODE, - err.to_string(), - ), + err @ (EthApiError::ExecutionTimedOut(_) | EthApiError::CallManyGasCapExceeded(_)) => { + rpc_error_with_code( + jsonrpsee_types::error::CALL_EXECUTION_FAILED_CODE, + err.to_string(), + ) + } err @ (EthApiError::InternalBlockingTaskError | EthApiError::InternalEthError) => { internal_rpc_err(err.to_string()) } diff --git a/crates/rpc/rpc-eth-types/src/utils.rs b/crates/rpc/rpc-eth-types/src/utils.rs index fee5d4f24f8..006c39aa9cf 100644 --- a/crates/rpc/rpc-eth-types/src/utils.rs +++ b/crates/rpc/rpc-eth-types/src/utils.rs @@ -1,9 +1,16 @@ //! Commonly used code snippets -use super::{EthApiError, EthResult}; +use super::{ + error::{AsEthApiError, FromEthApiError}, + EthApiError, EthResult, +}; use alloy_consensus::TxReceipt; +use alloy_rpc_types_eth::Bundle; +use evm2::{interpreter::InstrStop, TxResultExt}; +use reth_evm::TransactionEnvMut; use reth_primitives_traits::{Recovered, SignedTransaction}; -use std::future::Future; +use reth_rpc_server_types::constants::{DEFAULT_CALL_MANY_TIMEOUT, DEFAULT_MAX_CALL_MANY_CALLS}; +use std::{future::Future, time::Instant}; /// Calculates the gas used and next log index for a transaction at the given index pub fn calculate_gas_used_and_next_log_index( @@ -97,9 +104,184 @@ pub fn checked_blob_gas_used_ratio(blob_gas_used: u64, max_blob_gas_per_block: u } } +/// Bounds the work of one `eth_callMany`, `trace_callMany` or `debug_traceCallMany` request. +/// +/// The request may carry at most [`DEFAULT_MAX_CALL_MANY_CALLS`] calls, all of its calls share +/// one gas budget of the RPC gas cap, and no call starts more than [`DEFAULT_CALL_MANY_TIMEOUT`] +/// after the first one. +#[derive(Debug)] +pub struct CallManyBudget { + /// The RPC gas cap the calls share, reported once they exceed it. + gas_cap: u64, + /// Gas left for the remaining calls, `None` if the RPC gas cap is disabled. + remaining_gas: Option, + /// No call starts after this instant. Set when the first call is admitted, so waiting for a + /// permit or replaying the block's transactions does not count. + deadline: Option, + /// Whether [`Self::admit`] lowered the gas limit of the last admitted call. + capped: bool, +} + +impl CallManyBudget { + /// Creates the budget for a request of `calls` calls that share `gas_cap` gas. + /// + /// Returns an error if `calls` exceeds [`DEFAULT_MAX_CALL_MANY_CALLS`]. A `gas_cap` of `0` + /// disables the gas budget, as it disables the RPC gas cap. + pub fn new(calls: usize, gas_cap: u64) -> Result { + if calls > DEFAULT_MAX_CALL_MANY_CALLS { + return Err(EthApiError::InvalidParams(format!( + "call count {calls} exceeds limit {DEFAULT_MAX_CALL_MANY_CALLS}" + ))) + } + Ok(Self { + gas_cap, + remaining_gas: (gas_cap != 0).then_some(gas_cap), + deadline: None, + capped: false, + }) + } + + /// Creates the budget for a request of `bundles`, see [`Self::new`]. + /// + /// An empty bundle counts as one call, so requests of empty bundles are bounded too. + pub fn for_bundles(bundles: &[Bundle], gas_cap: u64) -> Result { + Self::new(bundles.iter().map(|bundle| bundle.transactions.len().max(1)).sum(), gas_cap) + } + + /// Admits the request's next call, lowering the gas limit of `tx_env` to the gas left for the + /// request's remaining calls. + /// + /// The first admitted call starts the request's timeout. Returns + /// [`EthApiError::ExecutionTimedOut`] once it has expired. + pub fn admit( + &mut self, + tx_env: &mut Recovered, + ) -> Result<(), EthApiError> { + let now = Instant::now(); + if now >= *self.deadline.get_or_insert(now + DEFAULT_CALL_MANY_TIMEOUT) { + return Err(EthApiError::ExecutionTimedOut(DEFAULT_CALL_MANY_TIMEOUT)) + } + self.capped = false; + if let Some(remaining) = self.remaining_gas && + tx_env.gas_limit() > remaining + { + tx_env.inner_mut().set_gas_limit(remaining); + self.capped = true; + } + Ok(()) + } + + /// Returns [`EthApiError::CallManyGasCapExceeded`] in place of `err` if the last admitted call + /// failed its intrinsic gas check because [`Self::admit`] lowered its gas limit. + pub fn map_call_err(&self, err: E) -> E { + if self.capped && err.is_gas_too_low() { + return E::from_eth_err(EthApiError::CallManyGasCapExceeded(self.gas_cap)) + } + err + } + + /// Charges the gas the last admitted call used against the budget. + /// + /// Returns [`EthApiError::CallManyGasCapExceeded`] if the call ran out of gas after + /// [`Self::admit`] lowered its gas limit, and an internal error if it used more gas than is + /// left, which an admitted call cannot do. + pub fn charge(&mut self, result: &TxResultExt) -> Result<(), EthApiError> { + if self.capped && result.stop.is_out_of_gas() && result.stop != InstrStop::MemoryLimitOOG { + return Err(EthApiError::CallManyGasCapExceeded(self.gas_cap)) + } + if let Some(remaining) = &mut self.remaining_gas { + *remaining = + remaining.checked_sub(result.tx_gas_used()).ok_or(EthApiError::InternalEthError)?; + } + Ok(()) + } +} + #[cfg(test)] mod tests { use super::*; + use alloy_consensus::{Transaction, TxLegacy}; + use alloy_primitives::Address; + use evm2::ethereum::TxEnvelope; + + #[test] + fn call_many_budget_limits_calls() { + assert!(CallManyBudget::new(DEFAULT_MAX_CALL_MANY_CALLS, 0).is_ok()); + + let empty = Bundle::<()> { transactions: Vec::new(), block_override: None }; + let full = + Bundle { transactions: vec![(); DEFAULT_MAX_CALL_MANY_CALLS], block_override: None }; + assert!(CallManyBudget::for_bundles(&vec![empty.clone(); DEFAULT_MAX_CALL_MANY_CALLS], 0) + .is_ok()); + assert_eq!( + CallManyBudget::for_bundles(&vec![empty.clone(); DEFAULT_MAX_CALL_MANY_CALLS + 1], 0) + .unwrap_err() + .to_string(), + "call count 1025 exceeds limit 1024" + ); + assert_eq!( + CallManyBudget::for_bundles(&[full, empty], 0).unwrap_err().to_string(), + "call count 1025 exceeds limit 1024" + ); + } + + fn tx_env(gas_limit: u64) -> Recovered { + Recovered::new_unchecked( + TxEnvelope::Legacy(TxLegacy { gas_limit, ..Default::default() }), + Address::ZERO, + ) + } + + fn tx_result(gas_used: u64, stop: InstrStop) -> TxResultExt { + TxResultExt { + status: stop.is_success(), + total_gas_spent: gas_used, + stop, + ..Default::default() + } + } + + #[test] + fn call_many_budget_shares_gas_cap() { + let admitted = |budget: &mut CallManyBudget, gas_limit| { + let mut tx_env = tx_env(gas_limit); + budget.admit(&mut tx_env).unwrap(); + tx_env.gas_limit() + }; + + let mut budget = CallManyBudget::new(3, 50_000).unwrap(); + assert_eq!(admitted(&mut budget, 30_000), 30_000); + // A call that was not capped keeps its own out-of-gas result. + budget.charge(&tx_result(30_000, InstrStop::OutOfGas)).unwrap(); + assert_eq!(admitted(&mut budget, 30_000_000), 20_000); + assert!(matches!( + budget.charge(&tx_result(20_000, InstrStop::OutOfGas)), + Err(EthApiError::CallManyGasCapExceeded(50_000)) + )); + assert_eq!(admitted(&mut budget, 10_000), 10_000); + assert!(matches!( + budget.charge(&tx_result(20_001, InstrStop::Stop)), + Err(EthApiError::InternalEthError) + )); + + let mut unlimited = CallManyBudget::new(3, 0).unwrap(); + unlimited.charge(&tx_result(u64::MAX, InstrStop::Stop)).unwrap(); + assert_eq!(admitted(&mut unlimited, u64::MAX), u64::MAX); + } + + #[test] + fn call_many_budget_times_out() { + let mut budget = CallManyBudget::new(2, 0).unwrap(); + assert_eq!(budget.deadline, None); + budget.admit(&mut tx_env(21_000)).unwrap(); + assert!(budget.deadline.is_some()); + + budget.deadline = Some(Instant::now()); + assert!(matches!( + budget.admit(&mut tx_env(21_000)), + Err(EthApiError::ExecutionTimedOut(timeout)) if timeout == DEFAULT_CALL_MANY_TIMEOUT + )); + } #[tokio::test] async fn test_binary_search() { diff --git a/crates/rpc/rpc-server-types/src/constants.rs b/crates/rpc/rpc-server-types/src/constants.rs index 7f0fc9e4c66..74f7f377424 100644 --- a/crates/rpc/rpc-server-types/src/constants.rs +++ b/crates/rpc/rpc-server-types/src/constants.rs @@ -55,6 +55,15 @@ pub const DEFAULT_ENGINE_API_IPC_ENDPOINT: &str = "/tmp/reth_engine_api.ipc"; /// The default limit for blocks count in `eth_simulateV1`. pub const DEFAULT_MAX_SIMULATE_BLOCKS: u64 = 256; +/// The default maximum number of calls in a single `eth_callMany`, `trace_callMany` or +/// `debug_traceCallMany` request. +pub const DEFAULT_MAX_CALL_MANY_CALLS: usize = 1024; + +/// The default timeout of an `eth_callMany`, `trace_callMany` or `debug_traceCallMany` request, +/// matching geth's `eth_call` timeout. It starts with the request's first call, and no call +/// starts after it expires. +pub const DEFAULT_CALL_MANY_TIMEOUT: Duration = Duration::from_secs(5); + /// The default maximum number of total storage slots for `eth_getStorageValues`. pub const DEFAULT_MAX_STORAGE_VALUES_SLOTS: usize = 1024; diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 3f096c9a9d0..b845321ce66 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -35,7 +35,7 @@ use reth_rpc_eth_api::{ helpers::{EthTransactions, TraceExt}, AsEthApiError, FromEthApiError, FromEvmError, RpcConvert, RpcNodeCore, }; -use reth_rpc_eth_types::{EthApiError, StateCacheDb}; +use reth_rpc_eth_types::{utils::CallManyBudget, EthApiError, StateCacheDb}; use reth_rpc_server_types::{result::internal_rpc_err, ToRpcResult}; use reth_storage_api::{ BlockIdReader, BlockReaderIdExt, HashedPostStateProvider, HeaderProvider, ProviderBlock, @@ -518,6 +518,7 @@ where if bundles.is_empty() { return Err(EthApiError::InvalidParams(String::from("bundles are empty.")).into()) } + let mut budget = CallManyBudget::for_bundles(&bundles, self.eth_api().call_gas_limit())?; let StateContext { transaction_index, block_number } = state_context.unwrap_or_default(); let transaction_index = transaction_index.unwrap_or_default(); @@ -583,11 +584,14 @@ where let state_overrides = state_overrides.take(); let overrides = EvmOverrides::new(state_overrides, block_overrides.clone()); - let (evm_env, tx_env) = + let (evm_env, mut tx_env) = eth_api.prepare_call_env(evm_env.clone(), tx, &mut db, overrides)?; + budget.admit(&mut tx_env)?; - let (next_inspector, res) = - eth_api.inspect(&mut db, evm_env.clone(), &tx_env, inspector)?; + let (next_inspector, res) = eth_api + .inspect(&mut db, evm_env.clone(), &tx_env, inspector) + .map_err(|err| budget.map_call_err(err))?; + budget.charge(&res.result)?; inspector = next_inspector; let trace = inspector .get_result(None, &tx_env, evm_env.block_env(), &res, &mut db) diff --git a/crates/rpc/rpc/src/eth/core.rs b/crates/rpc/rpc/src/eth/core.rs index b4bdd332604..2ae74440b94 100644 --- a/crates/rpc/rpc/src/eth/core.rs +++ b/crates/rpc/rpc/src/eth/core.rs @@ -576,6 +576,7 @@ mod tests { EthApiServer, }; use reth_rpc_eth_types::{receipt::EthReceiptConverter, EthConfig, RpcInvalidTransactionError}; + use reth_rpc_server_types::constants::DEFAULT_MAX_CALL_MANY_CALLS; use reth_storage_api::{ BalProvider, BlockReaderIdExt, NodePrimitivesProvider, StateProviderFactory, }; @@ -1054,6 +1055,109 @@ mod tests { ); } + #[tokio::test] + async fn call_many_methods_limit_calls_and_share_gas_cap() { + let provider = MockEthProvider::default(); + let header = Header { number: 1, gas_limit: 30_000_000, ..Default::default() }; + provider.add_block(header.hash_slow(), Block { header, body: BlockBody::default() }); + // Loops until it runs out of gas. + let looping = Address::with_last_byte(0x43); + provider.add_account( + looping, + ExtendedAccount::new(0, U256::ZERO).with_bytecode(alloy_primitives::bytes!("5b600056")), + ); + // A transfer to an empty account uses 21_000 gas, so a third one only gets 8_000 and a + // loop after one transfer runs out of the 29_000 left. + let api = build_test_eth_api_with_gas_cap(provider, 50_000); + let trace_api = + crate::TraceApi::new(api.clone(), BlockingTaskGuard::new(1), EthConfig::default()); + let debug_api = crate::DebugApi::new( + api.clone(), + BlockingTaskGuard::new(1), + &Runtime::test(), + futures::stream::empty(), + ); + let transfer = TransactionRequest::default().to(Address::with_last_byte(0x42)); + let transfers = |calls| vec![transfer.clone(); calls]; + let transfer_and_loop = vec![transfer.clone(), TransactionRequest::default().to(looping)]; + let bundles = |calls: Vec| { + vec![Bundle { transactions: calls, block_override: None }] + }; + let trace_calls = |calls: Vec| { + calls + .into_iter() + .map(|call| (call, std::iter::once(TraceType::Trace).collect())) + .collect::>() + }; + + assert_eq!( + EthCall::call_many(&api, bundles(transfers(2)), None, None).await.unwrap()[0].len(), + 2 + ); + assert_eq!( + trace_api.trace_call_many(trace_calls(transfers(2)), None).await.unwrap().len(), + 2 + ); + assert_eq!( + debug_api.debug_trace_call_many(bundles(transfers(2)), None, None).await.unwrap()[0] + .len(), + 2 + ); + + let gas_cap_err = "the request's calls exceed the RPC gas cap of 50000"; + for (calls, tx_index) in [(transfers(3), 2), (transfer_and_loop, 1)] { + assert_eq!( + EthCall::call_many(&api, bundles(calls.clone()), None, None) + .await + .unwrap_err() + .to_string(), + format!("call_many error in bundle 0 and transaction {tx_index}: {gas_cap_err}") + ); + assert_eq!( + trace_api + .trace_call_many(trace_calls(calls.clone()), None) + .await + .unwrap_err() + .to_string(), + gas_cap_err + ); + assert_eq!( + debug_api + .debug_trace_call_many(bundles(calls), None, None) + .await + .unwrap_err() + .to_string(), + gas_cap_err + ); + } + + let too_many = transfers(DEFAULT_MAX_CALL_MANY_CALLS + 1); + let limit_err = "call count 1025 exceeds limit 1024"; + assert_eq!( + EthCall::call_many(&api, bundles(too_many.clone()), None, None) + .await + .unwrap_err() + .to_string(), + limit_err + ); + assert_eq!( + trace_api + .trace_call_many(trace_calls(too_many.clone()), None) + .await + .unwrap_err() + .to_string(), + limit_err + ); + assert_eq!( + debug_api + .debug_trace_call_many(bundles(too_many), None, None) + .await + .unwrap_err() + .to_string(), + limit_err + ); + } + #[tokio::test] /// Requesting no block should result in a default response async fn test_fee_history_no_block_requested() { diff --git a/crates/rpc/rpc/src/trace.rs b/crates/rpc/rpc/src/trace.rs index 0c92f9f5231..23487306abc 100644 --- a/crates/rpc/rpc/src/trace.rs +++ b/crates/rpc/rpc/src/trace.rs @@ -31,7 +31,7 @@ use reth_rpc_eth_api::{ helpers::{LoadTransaction, Trace, TraceExt}, FromEthApiError, RpcNodeCore, }; -use reth_rpc_eth_types::{error::EthApiError, EthConfig}; +use reth_rpc_eth_types::{error::EthApiError, utils::CallManyBudget, EthConfig}; use reth_storage_api::{BlockNumReader, BlockReader}; use reth_tasks::{cancel::is_cancelled, pool::BlockingTaskGuard}; use reth_transaction_pool::{PoolPooledTx, PoolTransaction, TransactionPool}; @@ -161,6 +161,7 @@ where calls: Vec<(RpcTxReq, HashSet)>, block_id: Option, ) -> Result, Eth::Error> { + let mut budget = CallManyBudget::new(calls.len(), self.eth_api().call_gas_limit())?; let at = block_id.unwrap_or_default(); let (evm_env, at) = self.eth_api().evm_env_at(at).await?; @@ -174,19 +175,18 @@ where if is_cancelled() { return Err(EthApiError::InternalEthError.into()) } - let (evm_env, tx_env) = eth_api.prepare_call_env( + let (evm_env, mut tx_env) = eth_api.prepare_call_env( evm_env.clone(), call, &mut db, Default::default(), )?; + budget.admit(&mut tx_env)?; let config = TracingInspectorConfig::from_parity_config(&trace_types); - let (inspector, res) = eth_api.inspect( - &mut db, - evm_env, - &tx_env, - TracingInspector::new(config), - )?; + let (inspector, res) = eth_api + .inspect(&mut db, evm_env, &tx_env, TracingInspector::new(config)) + .map_err(|err| budget.map_call_err(err))?; + budget.charge(&res.result)?; let trace_res = inspector .into_parity_builder() diff --git a/docs/vocs/docs/pages/cli/reth/node.mdx b/docs/vocs/docs/pages/cli/reth/node.mdx index b1b0038cfea..6de64598e91 100644 --- a/docs/vocs/docs/pages/cli/reth/node.mdx +++ b/docs/vocs/docs/pages/cli/reth/node.mdx @@ -493,7 +493,9 @@ RPC: [default: 20000] --rpc.gascap - Maximum gas limit for `eth_call`, `eth_estimateGas`, and call tracing RPC methods + Maximum gas limit for `eth_call`, `eth_estimateGas`, and call tracing RPC methods. + + The calls of an `eth_callMany`, `trace_callMany` or `debug_traceCallMany` request share it. [default: 50000000] From b5dc94ca372e337d057911cdb4772ea58104bcbe Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 10:15:03 +0100 Subject: [PATCH 039/100] fix(rpc): cap eth_getProof and eth_getMultiProof key counts (#27716) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/rpc/rpc-eth-api/src/helpers/state.rs | 28 ++++++++++- crates/rpc/rpc-server-types/src/constants.rs | 7 +++ crates/rpc/rpc/src/eth/helpers/state.rs | 52 ++++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) diff --git a/crates/rpc/rpc-eth-api/src/helpers/state.rs b/crates/rpc/rpc-eth-api/src/helpers/state.rs index 31f3cdb18fc..ff6447d80c4 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/state.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/state.rs @@ -19,7 +19,7 @@ use reth_rpc_eth_types::{ error::{FromEvmError, IntoEthApiError}, EthApiError, PendingBlockEnv, RpcInvalidTransactionError, SignError, }; -use reth_rpc_server_types::constants::DEFAULT_MAX_STORAGE_VALUES_SLOTS; +use reth_rpc_server_types::constants::{DEFAULT_MAX_PROOF_SLOTS, DEFAULT_MAX_STORAGE_VALUES_SLOTS}; use reth_storage_api::{ BlockIdReader, BlockReaderIdExt, StateProvider, StateProviderBox, StateProviderFactory, }; @@ -151,6 +151,9 @@ pub trait EthState: LoadState + SpawnBlocking { } /// Returns values stored of given account, with Merkle-proof, at given blocknumber. + /// + /// Enforces a cap of [`DEFAULT_MAX_PROOF_SLOTS`] on the number of requested keys, before a + /// proof permit is acquired. fn get_proof( &self, address: Address, @@ -163,6 +166,13 @@ pub trait EthState: LoadState + SpawnBlocking { where Self: EthApiSpec, { + if keys.len() > DEFAULT_MAX_PROOF_SLOTS { + return Err(Self::Error::from_eth_err(EthApiError::InvalidParams(format!( + "storage key count {} exceeds limit {DEFAULT_MAX_PROOF_SLOTS}", + keys.len(), + )))); + } + Ok(async move { let permit = self .acquire_owned_tracing() @@ -186,6 +196,9 @@ pub trait EthState: LoadState + SpawnBlocking { } /// Returns account and storage proofs for multiple targets at the given block number. + /// + /// Enforces a cap of [`DEFAULT_MAX_PROOF_SLOTS`] on both the number of targets and the total + /// slot count across all targets, before a proof permit is acquired. fn get_multi_proof( &self, targets: Vec<(Address, Vec)>, @@ -197,6 +210,19 @@ pub trait EthState: LoadState + SpawnBlocking { where Self: EthApiSpec, { + if targets.len() > DEFAULT_MAX_PROOF_SLOTS { + return Err(Self::Error::from_eth_err(EthApiError::InvalidParams(format!( + "target count {} exceeds limit {DEFAULT_MAX_PROOF_SLOTS}", + targets.len(), + )))); + } + let total_slots: usize = targets.iter().map(|(_, slots)| slots.len()).sum(); + if total_slots > DEFAULT_MAX_PROOF_SLOTS { + return Err(Self::Error::from_eth_err(EthApiError::InvalidParams(format!( + "total slot count {total_slots} exceeds limit {DEFAULT_MAX_PROOF_SLOTS}", + )))); + } + Ok(async move { let permit = self .acquire_owned_tracing() diff --git a/crates/rpc/rpc-server-types/src/constants.rs b/crates/rpc/rpc-server-types/src/constants.rs index 74f7f377424..34e049c8012 100644 --- a/crates/rpc/rpc-server-types/src/constants.rs +++ b/crates/rpc/rpc-server-types/src/constants.rs @@ -67,6 +67,13 @@ pub const DEFAULT_CALL_MANY_TIMEOUT: Duration = Duration::from_secs(5); /// The default maximum number of total storage slots for `eth_getStorageValues`. pub const DEFAULT_MAX_STORAGE_VALUES_SLOTS: usize = 1024; +/// The default maximum number of storage slots (and, for multi-proofs, targets) accepted by a +/// single `eth_getProof` or multi-proof request. +/// +/// Bounds the work a request holds a proof permit for, since proof node selection scales with +/// the number of requested slots. +pub const DEFAULT_MAX_PROOF_SLOTS: usize = 1024; + /// The default eth historical proof window. pub const DEFAULT_ETH_PROOF_WINDOW: u64 = 0; diff --git a/crates/rpc/rpc/src/eth/helpers/state.rs b/crates/rpc/rpc/src/eth/helpers/state.rs index 0e01c9d137a..fd2db7c5ed3 100644 --- a/crates/rpc/rpc/src/eth/helpers/state.rs +++ b/crates/rpc/rpc/src/eth/helpers/state.rs @@ -35,6 +35,7 @@ mod tests { Address, StorageKey, StorageValue, B256, U256, }; use alloy_rpc_types_eth::TransactionRequest; + use alloy_serde::JsonStorageKey; use reth_chainspec::ChainSpec; use reth_ethereum_primitives::Block; use reth_evm_ethereum::EthEvmConfig; @@ -49,6 +50,7 @@ mod tests { EthApiTypes, }; use reth_rpc_eth_types::{EthApiSettings, EthStateCache, PendingBlock}; + use reth_rpc_server_types::constants::DEFAULT_MAX_PROOF_SLOTS; use reth_storage_api::{StateProviderBox, StateProviderFactory}; use reth_tasks::{ pool::{BlockingTaskGuard, BlockingTaskPool}, @@ -116,6 +118,56 @@ mod tests { assert!(account.is_none()); } + #[test] + fn test_get_proof_key_cap() { + let eth_api = noop_eth_api(); + let address = Address::random(); + let keys = |len| vec![JsonStorageKey::from(B256::ZERO); len]; + + assert!(eth_api.get_proof(address, keys(DEFAULT_MAX_PROOF_SLOTS), None).is_ok()); + + let Err(err) = eth_api.get_proof(address, keys(DEFAULT_MAX_PROOF_SLOTS + 1), None) else { + panic!("expected over-limit request to be rejected"); + }; + assert_eq!(err.to_string(), "storage key count 1025 exceeds limit 1024"); + } + + #[test] + fn test_get_multi_proof_cap() { + let eth_api = noop_eth_api(); + let address = Address::random(); + + // Exactly at the limit, on both axes. + let targets = vec![(address, vec![B256::ZERO; DEFAULT_MAX_PROOF_SLOTS])]; + assert!(eth_api.get_multi_proof(targets, None).is_ok()); + let targets = vec![(address, Vec::new()); DEFAULT_MAX_PROOF_SLOTS]; + assert!(eth_api.get_multi_proof(targets, None).is_ok()); + + // Too many slots in a single target. + let targets = vec![(address, vec![B256::ZERO; DEFAULT_MAX_PROOF_SLOTS + 1])]; + let Err(err) = eth_api.get_multi_proof(targets, None) else { + panic!("expected over-limit request to be rejected"); + }; + assert_eq!(err.to_string(), "total slot count 1025 exceeds limit 1024"); + + // Too many slots in total, spread across targets. + let targets = vec![ + (address, vec![B256::ZERO; DEFAULT_MAX_PROOF_SLOTS]), + (Address::random(), vec![B256::ZERO]), + ]; + let Err(err) = eth_api.get_multi_proof(targets, None) else { + panic!("expected over-limit request to be rejected"); + }; + assert_eq!(err.to_string(), "total slot count 1025 exceeds limit 1024"); + + // Too many targets without any slots. + let targets = vec![(address, Vec::new()); DEFAULT_MAX_PROOF_SLOTS + 1]; + let Err(err) = eth_api.get_multi_proof(targets, None) else { + panic!("expected over-limit request to be rejected"); + }; + assert_eq!(err.to_string(), "target count 1025 exceeds limit 1024"); + } + #[cfg(feature = "account-ext")] #[tokio::test] async fn test_get_account_extension() { From c252c2dd95ed9312ac192075154b102275497935 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 11:35:25 +0100 Subject: [PATCH 040/100] fix(discv5): make ENR conversion fallible (#28345) --- crates/cli/commands/src/p2p/bootnode.rs | 7 ++-- crates/net/discv5/src/enr.rs | 43 ++++++++++++++++++++++--- crates/net/discv5/src/error.rs | 3 ++ crates/net/discv5/src/lib.rs | 4 +-- 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/crates/cli/commands/src/p2p/bootnode.rs b/crates/cli/commands/src/p2p/bootnode.rs index 026b4906984..a8f0b5079ec 100644 --- a/crates/cli/commands/src/p2p/bootnode.rs +++ b/crates/cli/commands/src/p2p/bootnode.rs @@ -267,7 +267,10 @@ impl Command { AnyNode::Enr(enr) => { let record = self.enr_endpoint(enr, nat)?; seeds.enr_records.push(record); - seeds.enrs.push(EnrCombinedKeyWrapper::from(enr.clone()).0); + let EnrCombinedKeyWrapper(enr) = enr.clone().try_into().map_err(|err| { + eyre::eyre!("--bootnodes entry has an invalid ENR ({err}): {node}") + })?; + seeds.enrs.push(enr); record } node => eyre::bail!( @@ -900,7 +903,7 @@ mod tests { let canonical = Enr::builder().ip6("2001:db8::9".parse().unwrap()).udp6(30303).build(&sk).unwrap(); - let canonical = EnrCombinedKeyWrapper::from(canonical).0; + let canonical = EnrCombinedKeyWrapper::try_from(canonical).unwrap().0; assert!(discv5_contactable(&canonical, false, true)); } diff --git a/crates/net/discv5/src/enr.rs b/crates/net/discv5/src/enr.rs index a4d18fe15fd..a9a14d59583 100644 --- a/crates/net/discv5/src/enr.rs +++ b/crates/net/discv5/src/enr.rs @@ -38,10 +38,14 @@ pub fn discv4_id_to_multiaddr_id( #[derive(Debug, Clone)] pub struct EnrCombinedKeyWrapper(pub discv5::Enr); -impl From> for EnrCombinedKeyWrapper { - fn from(value: Enr) -> Self { +impl TryFrom> for EnrCombinedKeyWrapper { + type Error = alloy_rlp::Error; + + fn try_from(value: Enr) -> Result { + // The k256 backend of `discv5::Enr` rejects some public key encodings that libsecp256k1 + // accepts. let encoded_enr = alloy_rlp::encode(&value); - Self(alloy_rlp::Decodable::decode(&mut &encoded_enr[..]).unwrap()) + alloy_rlp::Decodable::decode(&mut &encoded_enr[..]).map(Self) } } @@ -55,7 +59,8 @@ impl From for Enr { #[cfg(test)] mod tests { use super::*; - use alloy_rlp::Encodable; + use alloy_primitives::keccak256; + use alloy_rlp::{Encodable, Header}; use enr::{CombinedKey, EnrKey}; use reth_chainspec::{EthereumHardfork, MAINNET}; use reth_network_peers::NodeRecord; @@ -106,4 +111,34 @@ mod tests { node_record ) } + + #[test] + fn enr_conversion_rejects_hybrid_encoded_key() { + let sk = SecretKey::from_secret_bytes([1; 32]).unwrap(); + // Hybrid encoding: an uncompressed point with the y parity in the prefix byte. + let mut pk = sk.public_key().serialize_uncompressed(); + pk[0] = 0x06 | (pk[64] & 1); + + let rlp_list = |payload: &[u8]| { + let mut out = Vec::new(); + Header { list: true, payload_length: payload.len() }.encode(&mut out); + out.extend_from_slice(payload); + out + }; + let mut content = Vec::new(); + 1u64.encode(&mut content); + for item in [&b"id"[..], b"v4", b"secp256k1", &pk] { + item.encode(&mut content); + } + let msg = secp256k1::Message::from_digest(keccak256(rlp_list(&content)).0); + let mut payload = Vec::new(); + secp256k1::ecdsa::sign(msg, &sk).serialize_compact().as_slice().encode(&mut payload); + payload.extend_from_slice(&content); + + let enr = alloy_rlp::decode_exact::>(rlp_list(&payload)).unwrap(); + assert_eq!( + EnrCombinedKeyWrapper::try_from(enr).unwrap_err(), + alloy_rlp::Error::Custom("Unknown signature") + ); + } } diff --git a/crates/net/discv5/src/error.rs b/crates/net/discv5/src/error.rs index 64b2cd73af8..1b7f00cd69e 100644 --- a/crates/net/discv5/src/error.rs +++ b/crates/net/discv5/src/error.rs @@ -30,4 +30,7 @@ pub enum Error { /// The [`ListenConfig`](discv5::ListenConfig) has been misconfigured. #[error("misconfigured listen config, RLPx TCP address must also be supported by discv5")] ListenConfigMisconfigured, + /// Node record can't be converted to a [`discv5::Enr`]. + #[error("invalid enr, {0}")] + InvalidEnr(alloy_rlp::Error), } diff --git a/crates/net/discv5/src/lib.rs b/crates/net/discv5/src/lib.rs index 3c864aca742..02da202580a 100644 --- a/crates/net/discv5/src/lib.rs +++ b/crates/net/discv5/src/lib.rs @@ -89,7 +89,7 @@ impl Discv5 { /// Adds the node to the table, if it is not already present. pub fn add_node(&self, node_record: Enr) -> Result<(), Error> { - let EnrCombinedKeyWrapper(enr) = node_record.into(); + let EnrCombinedKeyWrapper(enr) = node_record.try_into().map_err(Error::InvalidEnr)?; self.discv5.add_enr(enr).map_err(Error::AddNodeFailed) } @@ -197,7 +197,7 @@ impl Discv5 { .. } = discv5_config; - let EnrCombinedKeyWrapper(enr) = enr.into(); + let EnrCombinedKeyWrapper(enr) = enr.try_into().map_err(Error::InvalidEnr)?; let sk = CombinedKey::secp256k1_from_bytes(&mut sk.to_secret_bytes()).unwrap(); let mut discv5 = match discv5::Discv5::new(enr, sk, discv5_config) { Ok(discv5) => discv5, From 385c018f7884f16e10c67426cbd6e9162f89f2a9 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 11:35:30 +0100 Subject: [PATCH 041/100] fix(dns): retry links whose initial root lookup failed (#28346) --- crates/net/dns/src/lib.rs | 63 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index 5a69b8c1229..805d01af9d3 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -116,6 +116,9 @@ pub struct DnsDiscoveryService { recheck_tick: Interval, /// Links to the DNS networks to bootstrap. bootstrap_dns_networks: HashSet, + /// Links whose initial root lookup failed, retried on every recheck tick until a tree exists + /// for them. + failed_root_lookups: HashSet, } // === impl DnsDiscoveryService === @@ -154,6 +157,7 @@ impl DnsDiscoveryService { recheck_interval, recheck_tick: recheck_tick(recheck_interval), bootstrap_dns_networks: bootstrap_dns_networks.unwrap_or_default(), + failed_root_lookups: Default::default(), } } @@ -240,6 +244,7 @@ impl DnsDiscoveryService { entry.get_mut().update_root(root); } Entry::Vacant(entry) => { + self.failed_root_lookups.remove(&link); entry.insert(SyncTree::new(root, link)); } }, @@ -249,6 +254,8 @@ impl DnsDiscoveryService { // be released even though the lookup failed if let Some(tree) = self.trees.get_mut(&link) { tree.root_update_failed(); + } else { + self.failed_root_lookups.insert(link); } } } @@ -361,9 +368,14 @@ impl DnsDiscoveryService { } // Register the wake-up for the next recheck. Polled to `Pending` so the waker is - // always armed; a ready tick needs no extra work because the trees were already polled - // with a current timestamp above. - while self.recheck_tick.poll_tick(cx).is_ready() {} + // always armed; the trees were already polled with a current timestamp above, so a + // ready tick only retries the links whose initial root lookup failed. + while self.recheck_tick.poll_tick(cx).is_ready() { + for link in self.failed_root_lookups.drain() { + progress = true; + self.queries.resolve_root(link); + } + } if !progress && self.queued_events.is_empty() { return Poll::Pending @@ -377,6 +389,8 @@ fn recheck_tick(recheck_interval: Duration) -> Interval { let mut tick = tokio::time::interval(recheck_interval); // a service that was starved must not then fire a burst of catch-up ticks tick.set_missed_tick_behavior(MissedTickBehavior::Delay); + // the first tick would otherwise complete immediately and retry failed root lookups right away. + tick.reset(); tick } @@ -695,6 +709,49 @@ mod tests { handle.abort(); } + #[tokio::test] + async fn test_retry_failed_initial_root_lookup() { + reth_tracing::init_test_tracing(); + + let config = DnsDiscoveryConfig { + recheck_interval: Duration::from_millis(100), + max_requests_per_sec: NonZeroUsize::new(50).unwrap(), + ..Default::default() + }; + + let secret_key = SecretKey::new(&mut rng()); + let resolver = Arc::new(MapResolver::default()); + let s = "enrtree-root:v1 e=QFT4PBCRX4XQCV3VUYJ6BTCEPU l=JGUFMSAGI7KZYB3P7IZW4S5Y3A seq=3 sig=3FmXuVwpa8Y7OstZTx9PIb1mt8FrW7VpDOFv4AaGCsZ2EIHmhraWhe4NxYhQDlw5MjeFXYMbJjsPeKlHzmJREQE"; + let mut root: TreeRootEntry = s.parse().unwrap(); + root.sign(&secret_key).unwrap(); + + let link = + LinkEntry { domain: "nodes.example.org".to_string(), pubkey: secret_key.public() }; + + let mut service = DnsDiscoveryService::new(Arc::clone(&resolver), config.clone()); + + // the root is not published yet, so the initial lookup fails. + service.sync_tree_with_link(link.clone()); + poll_fn(|cx| { + assert!(service.poll(cx).is_pending()); + Poll::Ready(()) + }) + .await; + assert!(service.trees.is_empty()); + + resolver.insert(link.domain.clone(), root.to_string()); + tokio::time::sleep(config.recheck_interval).await; + + poll_fn(|cx| { + let _ = service.poll(cx); + Poll::Ready(()) + }) + .await; + + let tree = service.trees.get(&link).unwrap(); + assert_eq!(tree.root().clone(), root); + } + #[tokio::test] async fn test_hash_mismatch_is_not_cached_and_does_not_poison_same_hash() { let secret_key = SecretKey::new(&mut rng()); From 5a9b98bee4aed4575b9a6e725aed9f696dc76577 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 11:40:38 +0100 Subject: [PATCH 042/100] ci: lock the CLI docs script dependencies (#28350) --- docs/cli/Cargo.lock | 231 ++++++++++++++++++++++++++++++++++++++++++++ docs/cli/update.sh | 3 + 2 files changed, 234 insertions(+) create mode 100644 docs/cli/Cargo.lock diff --git a/docs/cli/Cargo.lock b/docs/cli/Cargo.lock new file mode 100644 index 00000000000..1f8ddf13cfd --- /dev/null +++ b/docs/cli/Cargo.lock @@ -0,0 +1,231 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys", +] + +[[package]] +name = "clap" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "help" +version = "0.0.0" +dependencies = [ + "clap", + "regex", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] diff --git a/docs/cli/update.sh b/docs/cli/update.sh index 25191650c74..708f4ffe9c3 100755 --- a/docs/cli/update.sh +++ b/docs/cli/update.sh @@ -4,6 +4,9 @@ set -eo pipefail DOCS_ROOT="$(dirname "$(dirname "$0")")" RETH=${1:-"$(dirname "$DOCS_ROOT")/target/debug/reth"} VOCS_PAGES_ROOT="$DOCS_ROOT/vocs/docs/pages" +# Build help.rs against its committed lockfile instead of the newest dependency releases. +CARGO_RESOLVER_LOCKFILE_PATH="$(dirname "$0")/Cargo.lock" +export CARGO_RESOLVER_LOCKFILE_PATH echo "Generating CLI documentation for reth at $RETH" echo "Using docs root: $DOCS_ROOT" From b4e4ce10d564d1bc6606a5e9cd94bece1cd6ccdf Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 11:30:37 +0000 Subject: [PATCH 043/100] perf(engine): step the balance tracker only on its opcodes (#28334) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- .../tree/src/tree/payload_processor/reuse.rs | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/crates/engine/tree/src/tree/payload_processor/reuse.rs b/crates/engine/tree/src/tree/payload_processor/reuse.rs index e5e5d3fea35..d4685ff57c9 100644 --- a/crates/engine/tree/src/tree/payload_processor/reuse.rs +++ b/crates/engine/tree/src/tree/payload_processor/reuse.rs @@ -34,7 +34,7 @@ use evm2::{ }, interpreter::{op, InstrStop, Interpreter, Message, MessageKind, MessageResult}, utils::WordExt, - EvmFeatures, EvmTypes, Inspector, TxResultWithState, Version, + EvmFeatures, EvmTypes, Inspector, InspectorConfig, OpcodeSet, TxResultWithState, Version, }; use parking_lot::{Mutex, RwLock}; use std::{ @@ -57,6 +57,19 @@ pub(crate) const POOL_BENEFICIARY: Address = address!("0x00000000000000000000000 /// Maximum estimated number of bytes held by [`PoolResults`]. const MAX_POOL_RESULT_BYTES: usize = 64 << 20; +/// Opcodes [`BalanceTracker::step`] is called for. Must contain every opcode it matches on. +const BALANCE_TRACKER_STEPS: OpcodeSet = { + let mut steps = OpcodeSet::EMPTY; + steps.insert(op::BALANCE); + steps.insert(op::SELFBALANCE); + steps.insert(op::SELFDESTRUCT); + steps.insert(op::COINBASE); + steps.insert(op::TIMESTAMP); + steps.insert(op::DIFFICULTY); + steps.insert(op::GASLIMIT); + steps +}; + /// Returns whether blocks executed with `cfg_env` may reuse prewarm results, which excludes /// EIP-8037 multidimensional block gas. pub(crate) const fn cfg_reuses_prewarm_results(version: &Version) -> bool { @@ -1007,6 +1020,10 @@ impl BalanceTracker { } impl Inspector for BalanceTracker { + fn inspector_config(&self) -> InspectorConfig { + InspectorConfig::new().with_steps(BALANCE_TRACKER_STEPS) + } + fn step(&mut self, interp: &mut Interpreter<'_, '_, T>) { let address = match interp.opcode() { op::BALANCE => { @@ -1108,7 +1125,7 @@ mod tests { const COUNTER: Address = Address::repeat_byte(0xc1); /// Stores the beneficiary balance in slot 0. const BENEFICIARY_BALANCE_READER: Address = Address::repeat_byte(0xc2); - /// Stores its own balance in slot 0. + /// Logs its own balance. const SELF_BALANCE_READER: Address = Address::repeat_byte(0xc3); /// Sends 5 wei to [`NOOP`]. const FORWARDER: Address = Address::repeat_byte(0xc4); @@ -1245,7 +1262,7 @@ mod tests { (SELFDESTRUCTER, bytes!("73c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0ff")), (COUNTER, bytes!("5f546001015f5500")), (BENEFICIARY_BALANCE_READER, bytes!("41315f5500")), - (SELF_BALANCE_READER, bytes!("475f5500")), + (SELF_BALANCE_READER, bytes!("475f5260205fa000")), (FORWARDER, bytes!("5f5f5f5f600573c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c05af100")), (TIMESTAMP_READER, bytes!("425f5500")), (GAS_LIMIT_READER, bytes!("455f5500")), From e564acacb85191773b0e55bde4fcdc4e5aaedd0b Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Mon, 9 Nov 2026 11:37:07 +0000 Subject: [PATCH 044/100] fix(trie): suppress redundant proof request (#28365) --- crates/trie/sparse/src/arena/mod.rs | 5 +- crates/trie/sparse/tests/suite/main.rs | 1 + .../trie/sparse/tests/suite/update_leaves.rs | 77 +++++++++++++++++++ 3 files changed, 81 insertions(+), 2 deletions(-) diff --git a/crates/trie/sparse/src/arena/mod.rs b/crates/trie/sparse/src/arena/mod.rs index d4f04307cc1..94518ee97ab 100644 --- a/crates/trie/sparse/src/arena/mod.rs +++ b/crates/trie/sparse/src/arena/mod.rs @@ -396,10 +396,11 @@ impl ArenaSparseSubtrie { self.num_dirty_leaves = (self.num_dirty_leaves as i64 + deltas.num_dirty_leaves_delta) as u64; - if let RemoveLeafResult::NeedsProof { key, proof_key, parent } = result { + // The removed leaf is already revealed, so only the blinded sibling needs a + // proof. The caller retries the update once that sibling is revealed. + if let RemoveLeafResult::NeedsProof { proof_key, parent, .. } = result { self.required_proofs .push((idx, ArenaRequiredProof { key: proof_key, parent })); - self.required_proofs.push((idx, ArenaRequiredProof { key, parent })); } } LeafUpdate::Touched => {} diff --git a/crates/trie/sparse/tests/suite/main.rs b/crates/trie/sparse/tests/suite/main.rs index 2852a1ba44c..90be8208e1b 100644 --- a/crates/trie/sparse/tests/suite/main.rs +++ b/crates/trie/sparse/tests/suite/main.rs @@ -255,6 +255,7 @@ sparse_trie_tests! { test_branch_collapse_multi_empty_subtries_blinded_remaining, test_subtrie_collapse_touched_with_blinded_sibling, test_subtrie_emptied_by_deletes_with_touched, + test_subtrie_removal_onto_blinded_sibling_requests_only_sibling_proof, // root test_root_empty_trie, diff --git a/crates/trie/sparse/tests/suite/update_leaves.rs b/crates/trie/sparse/tests/suite/update_leaves.rs index d4272b7d8c4..0ba5637061e 100644 --- a/crates/trie/sparse/tests/suite/update_leaves.rs +++ b/crates/trie/sparse/tests/suite/update_leaves.rs @@ -1,4 +1,5 @@ use super::*; +use reth_trie_common::ProofV2TargetParent; /// Insert a new leaf via `update_leaves` and verify root. /// @@ -1525,3 +1526,79 @@ pub(super) fn test_subtrie_emptied_by_deletes_with_touched(new_tr let actual_root = trie.root(epoch(0)); assert_eq!(actual_root, expected_harness.original_root(), "post-delete root mismatch"); } + +/// Removing a lower-subtrie leaf only requests its blinded sibling, then retries the removal. +pub(super) fn test_subtrie_removal_onto_blinded_sibling_requests_only_sibling_proof< + T: SparseTrie, +>( + new_trie: fn() -> T, +) { + // Branch [1] has children [1, 0] and [1, 2]; [1, 2] sits at the subtrie depth and holds + // a leaf at [1, 2, 0] and a branch at [1, 2, 3]. That branch has one revealed leaf at + // nibble 4 and a blinded child at nibble 5, so removing the leaf collapses it onto the + // blinded child inside a lower subtrie. + let key = |bytes: &[u8]| B256::right_padding_from(bytes); + let removed_key = key(&[0x12, 0x34]); + let subtrie_key = key(&[0x12, 0x01]); + let mut storage = BTreeMap::from([ + (key(&[0x10]), U256::from(1)), + (subtrie_key, U256::from(2)), + (removed_key, U256::from(3)), + ]); + for i in 0u8..16 { + storage.insert(key(&[0x12, 0x35, i << 4]), U256::from(100 + i as u64)); + } + let harness = SuiteTestHarness::new(storage); + + let mut trie = harness.init_trie_with_targets(&[removed_key, subtrie_key], true, new_trie); + + let mut leaf_updates: B256Map = + BTreeMap::from([(removed_key, LeafUpdate::Changed(Vec::new()))]).into_iter().collect(); + let mut requested = Vec::new(); + trie.update_leaves(&mut leaf_updates, |key, parent| requested.push((key, parent))) + .expect("update_leaves should succeed"); + + let sibling_key = key(&[0x12, 0x35]); + assert_eq!(requested, vec![(sibling_key, ProofV2TargetParent::new(3))]); + assert!(leaf_updates.contains_key(&removed_key), "removal should wait for the sibling"); + + harness.reveal_and_update(&mut trie, &mut leaf_updates); + assert!(leaf_updates.is_empty(), "removal should complete after revealing the sibling"); + let actual_root = trie.root(epoch(0)); + let mut actual_updates = trie.take_updates(); + let (expected_root, mut expected_trie_updates) = + harness.get_root_with_updates(&BTreeMap::from([(removed_key, U256::ZERO)])); + harness.minimize_trie_updates(&mut expected_trie_updates); + + // Minimize sparse updates inline (can't use TrieTestHarness::minimize_sparse_updates + // due to the crate's SparseTrieUpdates being a different type than reth-trie's copy). + actual_updates + .updated_nodes + .retain(|path, node| harness.storage_trie_updates().storage_nodes.get(path) != Some(node)); + actual_updates + .removed_nodes + .retain(|path| harness.storage_trie_updates().storage_nodes.contains_key(path)); + + let mut expected_updated_nodes = + expected_trie_updates.storage_nodes.into_iter().collect::>(); + let mut actual_updated_nodes = actual_updates.updated_nodes.into_iter().collect::>(); + expected_updated_nodes.sort(); + actual_updated_nodes.sort(); + pretty_assertions::assert_eq!( + expected_updated_nodes, + actual_updated_nodes, + "updated nodes mismatch" + ); + + let mut expected_removed_nodes = + expected_trie_updates.removed_nodes.into_iter().collect::>(); + let mut actual_removed_nodes = actual_updates.removed_nodes.into_iter().collect::>(); + expected_removed_nodes.sort(); + actual_removed_nodes.sort(); + pretty_assertions::assert_eq!( + expected_removed_nodes, + actual_removed_nodes, + "removed nodes mismatch" + ); + assert_eq!(expected_root, actual_root, "storage root mismatch"); +} From 9bcd861ad772eb46d37f3ed251bde2e5038721f7 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 12:55:21 +0100 Subject: [PATCH 045/100] perf(storage): share overlay manager state behind one Arc (#28333) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> Co-authored-by: Brian Picciano --- crates/node/builder/src/launch/engine.rs | 5 + crates/storage/storage-overlay/src/builder.rs | 20 +- .../storage-overlay/src/changeset_cache.rs | 7 +- crates/storage/storage-overlay/src/manager.rs | 181 ++++++++++-------- 4 files changed, 121 insertions(+), 92 deletions(-) diff --git a/crates/node/builder/src/launch/engine.rs b/crates/node/builder/src/launch/engine.rs index c5504312c13..e9935c16743 100644 --- a/crates/node/builder/src/launch/engine.rs +++ b/crates/node/builder/src/launch/engine.rs @@ -34,6 +34,7 @@ use reth_node_core::{ primitives::Head, }; use reth_node_events::node; +use reth_node_metrics::recorder::install_prometheus_recorder; use reth_provider::{ providers::{BlockchainProvider, NodeTypesForProvider}, BlockNumReader, StorageSettingsCache, @@ -107,6 +108,10 @@ impl EngineNodeLauncher { } = target; let NodeHooks { on_component_initialized, on_node_started, .. } = hooks; + // Install the recorder before creating anything that registers metrics: metrics registered + // earlier stay no-ops, and derived metrics cache their first instance for the process. + install_prometheus_recorder(); + // Create the overlay manager that will be shared across the provider and engine. let overlay_manager = OverlayManager::::new( ctx.task_executor.state_trie_overlay_worker_pool(), diff --git a/crates/storage/storage-overlay/src/builder.rs b/crates/storage/storage-overlay/src/builder.rs index 9e6f7f5d3c4..8196f79b435 100644 --- a/crates/storage/storage-overlay/src/builder.rs +++ b/crates/storage/storage-overlay/src/builder.rs @@ -197,8 +197,6 @@ pub struct OverlayBuilder { no_reverts: bool, /// Cache behavior for the overlays this builder resolves. overlay_cache_config: OverlayCacheConfig, - /// Metrics for overlay construction. - metrics: OverlayBuilderMetrics, } impl OverlayBuilder { @@ -215,7 +213,6 @@ impl OverlayBuilder { reused_sparse_trie_anchor_hash: None, no_reverts: false, overlay_cache_config: OverlayCacheConfig::default(), - metrics: OverlayBuilderMetrics::default(), } } @@ -555,7 +552,7 @@ impl OverlayBuilder { state_trie_tip_block.hash, finish_tip_block.hash, ) { - self.metrics.sparse_trie_overlay_skips.increment(1); + self.overlay_manager.builder_metrics().sparse_trie_overlay_skips.increment(1); return Ok(StateTrieOverlay::empty()) } @@ -580,14 +577,13 @@ impl OverlayBuilder { } }; - self.metrics - .retrieve_trie_reverts_duration - .record(retrieve_trie_reverts_duration.as_secs_f64()); - self.metrics + let metrics = self.overlay_manager.builder_metrics(); + metrics.retrieve_trie_reverts_duration.record(retrieve_trie_reverts_duration.as_secs_f64()); + metrics .retrieve_hashed_state_reverts_duration .record(retrieve_hashed_state_reverts_duration.as_secs_f64()); - self.metrics.trie_updates_size.record(trie_updates_total_len as f64); - self.metrics.hashed_state_size.record(hashed_state_updates_total_len as f64); + metrics.trie_updates_size.record(trie_updates_total_len as f64); + metrics.hashed_state_size.record(hashed_state_updates_total_len as f64); Ok(StateTrieOverlay::new(TrieInputSorted::new( trie_updates, @@ -765,9 +761,9 @@ where } /// Metrics for overlay construction. -#[derive(Clone, Metrics)] +#[derive(Metrics)] #[metrics(scope = "storage.overlay.builder")] -struct OverlayBuilderMetrics { +pub(crate) struct OverlayBuilderMetrics { /// Duration of retrieving trie updates from the database. retrieve_trie_reverts_duration: Histogram, /// Duration of retrieving hashed state from the database. diff --git a/crates/storage/storage-overlay/src/changeset_cache.rs b/crates/storage/storage-overlay/src/changeset_cache.rs index 87598aa0978..89374a1d106 100644 --- a/crates/storage/storage-overlay/src/changeset_cache.rs +++ b/crates/storage/storage-overlay/src/changeset_cache.rs @@ -163,11 +163,10 @@ where /// Thread-safe changeset cache. /// -/// This type wraps a shared, mutable reference to the cache inner. /// The `RwLock` enables concurrent reads while ensuring exclusive access for writes. -#[derive(Debug, Clone)] +#[derive(Debug)] pub(crate) struct ChangesetCache { - inner: Arc>, + inner: RwLock, } impl Default for ChangesetCache { @@ -182,7 +181,7 @@ impl ChangesetCache { /// The cache has no capacity limit and relies on explicit eviction /// via the `evict()` method to manage memory usage. pub(crate) fn new() -> Self { - Self { inner: Arc::new(RwLock::new(ChangesetCacheInner::new())) } + Self { inner: RwLock::new(ChangesetCacheInner::new()) } } /// Evicts changesets for blocks below the given block number. diff --git a/crates/storage/storage-overlay/src/manager.rs b/crates/storage/storage-overlay/src/manager.rs index 040f126b4de..b23bc24d630 100644 --- a/crates/storage/storage-overlay/src/manager.rs +++ b/crates/storage/storage-overlay/src/manager.rs @@ -5,6 +5,7 @@ //! reusable state trie and execution overlays on demand. use crate::{ + builder::OverlayBuilderMetrics, changeset_cache::compute_block_trie_updates, database_state_frontiers, manager_metrics::{ExecutionOverlayMetrics, OverlayCacheMetrics, StateTrieOverlayMetrics}, @@ -38,32 +39,42 @@ use tracing::{debug, trace}; /// Manages state trie and execution overlays for in-memory blocks. /// /// The manager owns the in-memory block graph, changeset cache, and caches keyed by -/// `(anchor_hash, tip_hash)`. +/// `(anchor_hash, tip_hash)`. Clones share all of it, and every state provider clones the manager, +/// so cloning is a single reference count increment. #[derive(Clone)] pub struct OverlayManager { - blocks: Arc>>, + inner: Arc>, +} + +/// State shared by all clones of an [`OverlayManager`]. +struct OverlayManagerInner { + blocks: DashMap>, state_trie_overlays: OverlayCache, execution_overlays: OverlayCache, changeset_cache: ChangesetCache, - preserved_sparse_trie: Arc>>, + preserved_sparse_trie: Mutex>, #[cfg(feature = "rayon")] worker_pool: Option>, metrics: StateTrieOverlayMetrics, execution_metrics: ExecutionOverlayMetrics, + builder_metrics: OverlayBuilderMetrics, } impl Default for OverlayManager { fn default() -> Self { Self { - blocks: Default::default(), - state_trie_overlays: Default::default(), - execution_overlays: Default::default(), - changeset_cache: Default::default(), - preserved_sparse_trie: Default::default(), - #[cfg(feature = "rayon")] - worker_pool: None, - metrics: Default::default(), - execution_metrics: Default::default(), + inner: Arc::new(OverlayManagerInner { + blocks: Default::default(), + state_trie_overlays: Default::default(), + execution_overlays: Default::default(), + changeset_cache: Default::default(), + preserved_sparse_trie: Default::default(), + #[cfg(feature = "rayon")] + worker_pool: None, + metrics: Default::default(), + execution_metrics: Default::default(), + builder_metrics: Default::default(), + }), } } } @@ -71,9 +82,9 @@ impl Default for OverlayManager { impl std::fmt::Debug for OverlayManager { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("OverlayManager") - .field("blocks", &self.blocks.len()) - .field("state_trie_overlays", &self.state_trie_overlays.len()) - .field("execution_overlays", &self.execution_overlays.len()) + .field("blocks", &self.inner.blocks.len()) + .field("state_trie_overlays", &self.inner.state_trie_overlays.len()) + .field("execution_overlays", &self.inner.execution_overlays.len()) .finish() } } @@ -83,14 +94,17 @@ impl OverlayManager { #[cfg(feature = "rayon")] pub fn new(worker_pool: Arc) -> Self { Self { - blocks: Default::default(), - state_trie_overlays: Default::default(), - execution_overlays: Default::default(), - changeset_cache: Default::default(), - preserved_sparse_trie: Default::default(), - worker_pool: Some(worker_pool), - metrics: Default::default(), - execution_metrics: Default::default(), + inner: Arc::new(OverlayManagerInner { + blocks: Default::default(), + state_trie_overlays: Default::default(), + execution_overlays: Default::default(), + changeset_cache: Default::default(), + preserved_sparse_trie: Default::default(), + worker_pool: Some(worker_pool), + metrics: Default::default(), + execution_metrics: Default::default(), + builder_metrics: Default::default(), + }), } } @@ -120,8 +134,13 @@ impl OverlayManager { }) } - pub(crate) const fn changeset_cache(&self) -> &ChangesetCache { - &self.changeset_cache + pub(crate) fn changeset_cache(&self) -> &ChangesetCache { + &self.inner.changeset_cache + } + + /// Returns the metrics shared by the overlay builders this manager creates. + pub(crate) fn builder_metrics(&self) -> &OverlayBuilderMetrics { + &self.inner.builder_metrics } /// Gets complete trie before-values for an inclusive block range, oldest values taking @@ -165,12 +184,18 @@ impl OverlayManager { + BlockNumReader + StorageSettingsCache, { - self.changeset_cache.get_or_compute_range(self, provider, range, partial_state_trie, finish) + self.inner.changeset_cache.get_or_compute_range( + self, + provider, + range, + partial_state_trie, + finish, + ) } /// Evicts cached changesets for blocks below `up_to_block`. pub fn evict_cached_changesets(&self, up_to_block: BlockNumber) { - self.changeset_cache.evict(up_to_block); + self.inner.changeset_cache.evict(up_to_block); } /// Computes the trie updates produced by `block_number`. @@ -193,17 +218,17 @@ impl OverlayManager { /// Takes the preserved sparse trie if present. pub fn take_sparse_trie(&self) -> Option { - self.preserved_sparse_trie.lock().take() + self.inner.preserved_sparse_trie.lock().take() } /// Stores a preserved sparse trie for later reuse. pub fn store_sparse_trie(&self, trie: PreservedSparseTrie) { - *self.preserved_sparse_trie.lock() = Some(trie); + *self.inner.preserved_sparse_trie.lock() = Some(trie); } /// Clears any preserved sparse trie state. pub fn clear_sparse_trie(&self) { - *self.preserved_sparse_trie.lock() = None; + *self.inner.preserved_sparse_trie.lock() = None; } /// Waits until the sparse trie lock becomes available. @@ -212,7 +237,7 @@ impl OverlayManager { /// complete before returning. Returns the time spent waiting for the lock. pub fn wait_for_sparse_trie_availability(&self) -> std::time::Duration { let start = FastInstant::now(); - let _guard = self.preserved_sparse_trie.lock(); + let _guard = self.inner.preserved_sparse_trie.lock(); let elapsed = start.elapsed(); if elapsed.as_millis() > 5 { debug!( @@ -241,7 +266,7 @@ impl OverlayManager { let span = tracing::Span::current(); // First add the block to the live graph; duplicate inserts do not need cache work. - match self.blocks.entry(hash) { + match self.inner.blocks.entry(hash) { Entry::Occupied(_) => { span.record("duplicate", true); debug!( @@ -260,6 +285,7 @@ impl OverlayManager { // Snapshot matching parent overlays before spawning so DashMap iteration guards are // dropped. let cached_parent_overlays = self + .inner .execution_overlays .entries .iter() @@ -302,7 +328,7 @@ impl OverlayManager { if tip_hash == anchor_hash { return } - let Some(worker_pool) = &self.worker_pool else { return }; + let Some(worker_pool) = &self.inner.worker_pool else { return }; let manager = self.clone(); let parent_span = tracing::Span::current(); worker_pool.spawn(move || { @@ -341,21 +367,23 @@ impl OverlayManager { let mut pruned_overlays = 0usize; for hash in hashes { block_count += 1; - removed_blocks += self.blocks.remove(&hash).is_some() as usize; + removed_blocks += self.inner.blocks.remove(&hash).is_some() as usize; } span.record("block_count", block_count); span.record("removed_blocks", removed_blocks); if removed_blocks > 0 { - let overlays_before = self.state_trie_overlays.len() + self.execution_overlays.len(); - self.state_trie_overlays.retain(|key, _| { + let overlays_before = + self.inner.state_trie_overlays.len() + self.inner.execution_overlays.len(); + self.inner.state_trie_overlays.retain(|key, _| { self.contains_hash(key.tip_hash, key.anchor_hash, key.anchor_hash) }); - self.execution_overlays.retain(|key, _| { + self.inner.execution_overlays.retain(|key, _| { self.contains_hash(key.tip_hash, key.anchor_hash, key.anchor_hash) }); - pruned_overlays = overlays_before - .saturating_sub(self.state_trie_overlays.len() + self.execution_overlays.len()); + pruned_overlays = overlays_before.saturating_sub( + self.inner.state_trie_overlays.len() + self.inner.execution_overlays.len(), + ); span.record("pruned_overlays", pruned_overlays); } debug!( @@ -395,8 +423,8 @@ impl OverlayManager { ); let input = self .get_or_compute_overlay( - &self.state_trie_overlays, - &self.metrics, + &self.inner.state_trie_overlays, + &self.inner.metrics, anchor_hash, parent_state, cache_config, @@ -460,8 +488,8 @@ impl OverlayManager { } self.get_or_compute_overlay( - &self.execution_overlays, - &self.execution_metrics, + &self.inner.execution_overlays, + &self.inner.execution_metrics, anchor_hash, parent_state, cache_config, @@ -545,7 +573,8 @@ impl OverlayManager { cache.retain(|sibling_key, entry| { sibling_key.tip_hash == tip_hash || !matches!(entry, OverlayCacheEntry::Ready(_)) || - self.blocks + self.inner + .blocks .get(&sibling_key.tip_hash) .is_none_or(|block| block.recovered_block().parent_hash() != parent_hash) }); @@ -638,7 +667,7 @@ impl OverlayManager { ) -> impl Iterator> + '_ { let mut hash = parent_hash; std::iter::from_fn(move || { - let block = self.blocks.get(&hash)?; + let block = self.inner.blocks.get(&hash)?; hash = block.recovered_block().parent_hash(); Some(block.clone()) }) @@ -657,7 +686,7 @@ impl OverlayManager { return false } - let Some(block) = self.blocks.get(¤t_hash) else { return false }; + let Some(block) = self.inner.blocks.get(¤t_hash) else { return false }; current_hash = block.recovered_block().parent_hash(); } } @@ -670,14 +699,14 @@ impl OverlayManager { write_to_cache: bool, ) -> TrieInputSorted { if !write_to_cache { - return compute_overlay(compute_input, anchor_hash, &self.metrics) + return compute_overlay(compute_input, anchor_hash, &self.inner.metrics) } #[cfg(feature = "rayon")] { - if let Some(worker_pool) = &self.worker_pool { + if let Some(worker_pool) = &self.inner.worker_pool { let compute_span = _span; - let metrics = self.metrics.clone(); + let metrics = self.inner.metrics.clone(); return worker_pool.spawn_and_wait(move || { let _guard = compute_span.enter(); compute_overlay(compute_input, anchor_hash, &metrics) @@ -685,7 +714,7 @@ impl OverlayManager { } } - compute_overlay(compute_input, anchor_hash, &self.metrics) + compute_overlay(compute_input, anchor_hash, &self.inner.metrics) } fn compute_execution_overlay( @@ -699,15 +728,15 @@ impl OverlayManager { return compute_execution_overlay_inner( compute_input, anchor_hash, - &self.execution_metrics, + &self.inner.execution_metrics, ) } #[cfg(feature = "rayon")] { - if let Some(worker_pool) = &self.worker_pool { + if let Some(worker_pool) = &self.inner.worker_pool { let compute_span = _span; - let metrics = self.execution_metrics.clone(); + let metrics = self.inner.execution_metrics.clone(); return worker_pool.spawn_and_wait(move || { let _guard = compute_span.enter(); compute_execution_overlay_inner(compute_input, anchor_hash, &metrics) @@ -715,7 +744,7 @@ impl OverlayManager { } } - compute_execution_overlay_inner(compute_input, anchor_hash, &self.execution_metrics) + compute_execution_overlay_inner(compute_input, anchor_hash, &self.inner.execution_metrics) } } @@ -762,7 +791,7 @@ struct OverlayCacheKey { } struct OverlayCache { - entries: Arc>>, + entries: DashMap>, } impl Default for OverlayCache { @@ -771,12 +800,6 @@ impl Default for OverlayCache { } } -impl Clone for OverlayCache { - fn clone(&self) -> Self { - Self { entries: Arc::clone(&self.entries) } - } -} - impl OverlayCache { fn len(&self) -> usize { self.entries.len() @@ -1179,10 +1202,12 @@ mod tests { manager.insert_block(first); manager.insert_block(sibling); manager + .inner .state_trie_overlays .entries .insert(first_key, OverlayCacheEntry::Ready(Arc::new(TrieInputSorted::default()))); manager + .inner .execution_overlays .entries .insert(first_key, OverlayCacheEntry::Ready(Arc::new(ExecutionOverlay::default()))); @@ -1190,8 +1215,8 @@ mod tests { overlay_for_parent(&manager, sibling_hash, anchor_hash).unwrap(); manager.execution_overlay_for_parent(sibling_hash, anchor_hash).unwrap(); - assert!(!manager.state_trie_overlays.entries.contains_key(&first_key)); - assert!(!manager.execution_overlays.entries.contains_key(&first_key)); + assert!(!manager.inner.state_trie_overlays.entries.contains_key(&first_key)); + assert!(!manager.inner.execution_overlays.entries.contains_key(&first_key)); } #[test] @@ -1214,10 +1239,10 @@ mod tests { overlay_for_parent(&manager, child_hash, anchor_hash).unwrap(); manager.execution_overlay_for_parent(child_hash, anchor_hash).unwrap(); - assert!(!manager.state_trie_overlays.entries.contains_key(&parent_key)); - assert!(manager.state_trie_overlays.entries.contains_key(&child_key)); - assert!(!manager.execution_overlays.entries.contains_key(&parent_key)); - assert!(manager.execution_overlays.entries.contains_key(&child_key)); + assert!(!manager.inner.state_trie_overlays.entries.contains_key(&parent_key)); + assert!(manager.inner.state_trie_overlays.entries.contains_key(&child_key)); + assert!(!manager.inner.execution_overlays.entries.contains_key(&parent_key)); + assert!(manager.inner.execution_overlays.entries.contains_key(&child_key)); } #[test] @@ -1235,6 +1260,7 @@ mod tests { overlay_for_parent(&manager, parent_hash, anchor_hash).unwrap(); let state_parent = manager + .inner .state_trie_overlays .entries .get(&parent_key) @@ -1250,8 +1276,8 @@ mod tests { let child_execution = manager.execution_overlay_for_parent(child_hash, anchor_hash).unwrap(); - assert!(!manager.state_trie_overlays.entries.contains_key(&parent_key)); - assert!(!manager.execution_overlays.entries.contains_key(&parent_key)); + assert!(!manager.inner.state_trie_overlays.entries.contains_key(&parent_key)); + assert!(!manager.inner.execution_overlays.entries.contains_key(&parent_key)); assert_eq!(state_parent.state.accounts.len(), 2); assert_eq!(execution_parent.accounts().len(), 2); assert_eq!(child_state.accounts.len(), 3); @@ -1286,10 +1312,10 @@ mod tests { assert_eq!(state.accounts.len(), 3); assert_eq!(execution.accounts().len(), 3); - assert!(manager.state_trie_overlays.entries.contains_key(&parent_key)); - assert!(!manager.state_trie_overlays.entries.contains_key(&child_key)); - assert!(manager.execution_overlays.entries.contains_key(&parent_key)); - assert!(!manager.execution_overlays.entries.contains_key(&child_key)); + assert!(manager.inner.state_trie_overlays.entries.contains_key(&parent_key)); + assert!(!manager.inner.state_trie_overlays.entries.contains_key(&child_key)); + assert!(manager.inner.execution_overlays.entries.contains_key(&parent_key)); + assert!(!manager.inner.execution_overlays.entries.contains_key(&child_key)); } #[cfg(feature = "rayon")] @@ -1344,6 +1370,7 @@ mod tests { let key = OverlayCacheKey { anchor_hash, tip_hash: blocks[1].recovered_block().hash() }; let deadline = std::time::Instant::now() + Duration::from_secs(1); while !manager + .inner .execution_overlays .entries .get(&key) @@ -1352,7 +1379,7 @@ mod tests { assert!(std::time::Instant::now() < deadline, "execution overlay was not precomputed"); thread::sleep(Duration::from_millis(10)); } - assert!(!manager.execution_overlays.entries.contains_key(&OverlayCacheKey { + assert!(!manager.inner.execution_overlays.entries.contains_key(&OverlayCacheKey { anchor_hash, tip_hash: blocks[0].recovered_block().hash(), })); @@ -1376,6 +1403,7 @@ mod tests { let new_anchor = blocks[0].recovered_block().hash(); manager.remove_blocks([new_anchor]); assert!(!manager + .inner .execution_overlays .entries .contains_key(&OverlayCacheKey { anchor_hash: old_anchor, tip_hash })); @@ -1385,7 +1413,7 @@ mod tests { let key = OverlayCacheKey { anchor_hash: new_anchor, tip_hash }; let deadline = std::time::Instant::now() + Duration::from_secs(1); let overlay = loop { - if let Some(overlay) = manager.execution_overlays.ready(&key) { + if let Some(overlay) = manager.inner.execution_overlays.ready(&key) { break overlay } assert!(std::time::Instant::now() < deadline, "new anchor overlay was not precomputed"); @@ -1416,7 +1444,7 @@ mod tests { manager.insert_block(block); let waiter = Arc::new(OverlayWaiter::new()); - manager.execution_overlays.entries.insert( + manager.inner.execution_overlays.entries.insert( OverlayCacheKey { anchor_hash, tip_hash }, OverlayCacheEntry::Computing(Arc::clone(&waiter)), ); @@ -1496,6 +1524,7 @@ mod tests { }; let waiter = Arc::new(OverlayWaiter::new()); manager + .inner .state_trie_overlays .entries .insert(key, OverlayCacheEntry::Computing(Arc::clone(&waiter))); From d050451ce15fc11dd5fb83ccf379c40d4e979afe Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Mon, 9 Nov 2026 11:49:49 +0000 Subject: [PATCH 046/100] chore(cli): remove no-op CLI flags (#28369) --- crates/node/core/src/args/engine.rs | 45 -------------------- crates/node/core/src/args/rpc_server.rs | 3 -- crates/node/core/src/args/rpc_state_cache.rs | 19 +-------- crates/node/core/tests/default_rpc_args.rs | 1 - crates/rpc/rpc-server-types/src/constants.rs | 3 -- 5 files changed, 1 insertion(+), 70 deletions(-) diff --git a/crates/node/core/src/args/engine.rs b/crates/node/core/src/args/engine.rs index f863ed5a929..6cb41b8c263 100644 --- a/crates/node/core/src/args/engine.rs +++ b/crates/node/core/src/args/engine.rs @@ -377,18 +377,6 @@ pub struct EngineArgs { #[arg(long = "engine.invalid-header-cache-hit-eviction-threshold", default_value_t = DefaultEngineValues::get_global().invalid_header_hit_eviction_threshold)] pub invalid_header_hit_eviction_threshold: u8, - /// CAUTION: This CLI flag has no effect anymore, use --engine.state-root-fallback if you - /// want to force synchronous state root computation - #[arg(long = "engine.legacy-state-root", default_value_t = false, hide = true)] - #[deprecated] - pub legacy_state_root_task_enabled: bool, - - /// CAUTION: This CLI flag has no effect anymore, use --engine.disable-caching-and-prewarming - /// if you want to disable caching and prewarming - #[arg(long = "engine.caching-and-prewarming", default_value = "true", hide = true)] - #[deprecated] - pub caching_and_prewarming_enabled: bool, - /// Disable state cache #[arg(long = "engine.disable-state-cache", default_value_t = DefaultEngineValues::get_global().state_cache_disabled)] pub state_cache_disabled: bool, @@ -417,16 +405,6 @@ pub struct EngineArgs { )] pub sender_recovery_cache_enabled: bool, - /// CAUTION: This CLI flag has no effect anymore. The parallel sparse trie is always enabled. - #[deprecated] - #[arg(long = "engine.parallel-sparse-trie", default_value = "true", hide = true)] - pub parallel_sparse_trie_enabled: bool, - - /// CAUTION: This CLI flag has no effect anymore. The parallel sparse trie is always enabled. - #[deprecated] - #[arg(long = "engine.disable-parallel-sparse-trie", default_value = "false", hide = true)] - pub parallel_sparse_trie_disabled: bool, - /// Enable state provider latency metrics. This allows the engine to collect and report stats /// about how long state provider calls took during execution, but this does introduce slight /// overhead to state provider calls. @@ -459,12 +437,6 @@ pub struct EngineArgs { #[arg(long = "cpu-cores", value_name = "COUNT")] pub cpu_cores: Option, - /// CAUTION: This CLI flag has no effect anymore, use --engine.disable-precompile-cache - /// if you want to disable precompile cache - #[arg(long = "engine.precompile-cache", default_value = "true", hide = true)] - #[deprecated] - pub precompile_cache_enabled: bool, - /// Disable precompile cache #[arg(long = "engine.disable-precompile-cache", default_value_t = DefaultEngineValues::get_global().precompile_cache_disabled)] pub precompile_cache_disabled: bool, @@ -620,7 +592,6 @@ pub struct EngineArgs { pub proof_jitter: Option, } -#[allow(deprecated)] impl Default for EngineArgs { fn default() -> Self { let DefaultEngineValues { @@ -665,21 +636,16 @@ impl Default for EngineArgs { backfill_run_threshold, invalid_header_hit_eviction_threshold, state_root_task_compare_updates, - legacy_state_root_task_enabled: false, - caching_and_prewarming_enabled: true, state_cache_disabled, prewarming_disabled, txpool_prewarming_enabled, sender_recovery_cache_enabled, - parallel_sparse_trie_enabled: true, - parallel_sparse_trie_disabled: false, state_provider_metrics, cross_block_cache_size, accept_execution_requests_hash, multiproof_chunk_size, reserved_cpu_cores, cpu_cores: None, - precompile_cache_enabled: true, precompile_cache_disabled, state_root_fallback, always_process_payload_attributes_on_canonical_head, @@ -772,10 +738,6 @@ impl EngineArgs { /// Creates a [`TreeConfig`] from the engine arguments. pub fn tree_config(&self) -> TreeConfig { - #[allow(deprecated)] - if self.legacy_state_root_task_enabled { - tracing::warn!(target: "reth::cli", "--engine.legacy-state-root has no effect anymore, use --engine.state-root-fallback to force synchronous state root computation"); - } let config = TreeConfig::default() // Clear the default window before applying overrides that may be smaller than it. .with_persistence_threshold(0) @@ -989,7 +951,6 @@ mod tests { } #[test] - #[allow(deprecated)] fn engine_args() { let args = EngineArgs { persistence_threshold: 100, @@ -998,15 +959,11 @@ mod tests { memory_block_buffer_target: Some(50), backfill_run_threshold: 100, invalid_header_hit_eviction_threshold: 7, - legacy_state_root_task_enabled: true, - caching_and_prewarming_enabled: true, state_cache_disabled: true, prewarming_disabled: true, // conflicts with --engine.disable-state-cache, covered by its own test below txpool_prewarming_enabled: false, sender_recovery_cache_enabled: true, - parallel_sparse_trie_enabled: true, - parallel_sparse_trie_disabled: false, state_provider_metrics: true, cross_block_cache_size: 256, state_root_task_compare_updates: true, @@ -1014,7 +971,6 @@ mod tests { multiproof_chunk_size: 512, reserved_cpu_cores: 4, cpu_cores: Some(NonZeroUsize::new(8).unwrap()), - precompile_cache_enabled: true, precompile_cache_disabled: true, state_root_fallback: true, always_process_payload_attributes_on_canonical_head: true, @@ -1049,7 +1005,6 @@ mod tests { "100", "--engine.invalid-header-cache-hit-eviction-threshold", "7", - "--engine.legacy-state-root", "--engine.disable-state-cache", "--engine.disable-prewarming", "--engine.sender-recovery-cache", diff --git a/crates/node/core/src/args/rpc_server.rs b/crates/node/core/src/args/rpc_server.rs index be14e3bad57..868def41809 100644 --- a/crates/node/core/src/args/rpc_server.rs +++ b/crates/node/core/src/args/rpc_server.rs @@ -1368,7 +1368,6 @@ mod tests { rpc_state_cache: RpcStateCacheArgs { max_blocks: 5000, max_receipts: 2000, - max_headers: 1000, max_bals: 1000, cache_computed_bals: true, prewarm_bals: Some(0), @@ -1461,8 +1460,6 @@ mod tests { "5000", "--rpc-cache.max-receipts", "2000", - "--rpc-cache.max-headers", - "1000", "--rpc-cache.max-bals", "1000", "--rpc-cache.cache-computed-bals", diff --git a/crates/node/core/src/args/rpc_state_cache.rs b/crates/node/core/src/args/rpc_state_cache.rs index efcd40eb902..2f474c1089e 100644 --- a/crates/node/core/src/args/rpc_state_cache.rs +++ b/crates/node/core/src/args/rpc_state_cache.rs @@ -3,8 +3,7 @@ use clap::{builder::Resettable, Args}; use reth_rpc_server_types::constants::cache::{ DEFAULT_BAL_CACHE_MAX_BYTES, DEFAULT_BAL_CACHE_MAX_LEN, DEFAULT_BLOCK_CACHE_MAX_BYTES, DEFAULT_BLOCK_CACHE_MAX_LEN, DEFAULT_CACHE_IDLE_TIMEOUT, DEFAULT_CONCURRENT_DB_REQUESTS, - DEFAULT_HEADER_CACHE_MAX_LEN, DEFAULT_MAX_CACHED_TX_HASHES, DEFAULT_RECEIPT_CACHE_MAX_BYTES, - DEFAULT_RECEIPT_CACHE_MAX_LEN, + DEFAULT_MAX_CACHED_TX_HASHES, DEFAULT_RECEIPT_CACHE_MAX_BYTES, DEFAULT_RECEIPT_CACHE_MAX_LEN, }; use std::time::Duration; @@ -26,15 +25,6 @@ pub struct RpcStateCacheArgs { )] pub max_receipts: u32, - /// Legacy no-op retained for CLI compatibility. - #[arg( - long = "rpc-cache.max-headers", - alias = "rpc-cache.max-envs", - default_value_t = DefaultRpcServerArgs::get_global().rpc_state_cache.max_headers, - hide = true, - )] - pub max_headers: u32, - /// Max number of block access lists in cache. #[arg( long = "rpc-cache.max-bals", @@ -102,7 +92,6 @@ impl RpcStateCacheArgs { pub const fn set_zero_lengths(&mut self) { self.max_blocks = 0; self.max_receipts = 0; - self.max_headers = 0; self.max_bals = 0; self.max_blocks_bytes = 0; self.max_receipts_bytes = 0; @@ -118,7 +107,6 @@ impl Default for RpcStateCacheArgs { Self { max_blocks: DEFAULT_BLOCK_CACHE_MAX_LEN, max_receipts: DEFAULT_RECEIPT_CACHE_MAX_LEN, - max_headers: DEFAULT_HEADER_CACHE_MAX_LEN, max_bals: DEFAULT_BAL_CACHE_MAX_LEN, max_blocks_bytes: DEFAULT_BLOCK_CACHE_MAX_BYTES, max_receipts_bytes: DEFAULT_RECEIPT_CACHE_MAX_BYTES, @@ -148,11 +136,6 @@ mod tests { fn rpc_cache_defaults() { let args = CommandParser::parse_from(["reth"]).args; assert_eq!(args, RpcStateCacheArgs::default()); - - for flag in ["--rpc-cache.max-headers", "--rpc-cache.max-envs"] { - let args = CommandParser::parse_from(["reth", flag, "123"]).args; - assert_eq!(args.max_headers, 123); - } } #[test] diff --git a/crates/node/core/tests/default_rpc_args.rs b/crates/node/core/tests/default_rpc_args.rs index 714eb231a23..bec900f77f2 100644 --- a/crates/node/core/tests/default_rpc_args.rs +++ b/crates/node/core/tests/default_rpc_args.rs @@ -26,7 +26,6 @@ fn custom_rpc_defaults_apply_to_cli() { .with_rpc_state_cache(RpcStateCacheArgs { max_blocks: 1, max_receipts: 2, - max_headers: 3, max_bals: 4, max_blocks_bytes: 1024, max_receipts_bytes: 2048, diff --git a/crates/rpc/rpc-server-types/src/constants.rs b/crates/rpc/rpc-server-types/src/constants.rs index 34e049c8012..2330d3494b3 100644 --- a/crates/rpc/rpc-server-types/src/constants.rs +++ b/crates/rpc/rpc-server-types/src/constants.rs @@ -150,9 +150,6 @@ pub mod cache { /// Default cache size for the receipts cache: 500 blocks' receipts. pub const DEFAULT_RECEIPT_CACHE_MAX_LEN: u32 = 500; - /// Legacy default for the no-op RPC header cache option. - pub const DEFAULT_HEADER_CACHE_MAX_LEN: u32 = 1000; - /// Default cache size for the EVM BAL cache: 1000 block access lists. pub const DEFAULT_BAL_CACHE_MAX_LEN: u32 = 1000; From 0f3e79273860bf89bc7b446311cd00381fb1087b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Mon, 9 Nov 2026 12:33:36 +0000 Subject: [PATCH 047/100] fix(trie): bump alloy-trie to 0.9.9 (#28367) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- crates/trie/common/src/hash_builder/state.rs | 1 + crates/trie/common/src/range_proof.rs | 19 +++++++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c9c1c0baca..f3584138351 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -961,9 +961,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94e3e0a88f8db47250ac8a95fb825d020719f833eb1dc661bd3609c3bbece7d" +checksum = "70c7c04b6e5a7a2325f53d38c319a47d01c3609b44845ac2801bac9643fe26b9" dependencies = [ "alloy-primitives", "alloy-rlp", diff --git a/Cargo.toml b/Cargo.toml index 5aa08c8b6ac..bc613f4b74b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -445,7 +445,7 @@ alloy-chains = { version = "0.2.33", default-features = false } alloy-eip2124 = { version = "0.2.0", default-features = false } alloy-eip7928 = { version = "0.4.10", default-features = false, features = ["rlp"] } alloy-rlp = { version = "0.3.16", default-features = false, features = ["core-net"] } -alloy-trie = { version = "0.9.8", default-features = false } +alloy-trie = { version = "0.9.9", default-features = false } alloy-hardforks = "0.4.11" diff --git a/crates/trie/common/src/hash_builder/state.rs b/crates/trie/common/src/hash_builder/state.rs index e31fe8962a1..bd750c95ae3 100644 --- a/crates/trie/common/src/hash_builder/state.rs +++ b/crates/trie/common/src/hash_builder/state.rs @@ -40,6 +40,7 @@ impl From for HashBuilder { updated_branch_nodes: None, proof_retainer: None, rlp_buf: Vec::with_capacity(32), + all_branch_nodes: false, } } } diff --git a/crates/trie/common/src/range_proof.rs b/crates/trie/common/src/range_proof.rs index 91c332bbbea..2196817a406 100644 --- a/crates/trie/common/src/range_proof.rs +++ b/crates/trie/common/src/range_proof.rs @@ -642,6 +642,25 @@ mod tests { )); } + // Decoding precedes the path checks, so oversized compact keys must fail as RLP errors. + #[test] + fn oversized_compact_keys_are_rejected() { + // Extension and leaf flags: 33 bytes after an even flag or 32 after an odd one exceed a + // hashed key. The second item is a child hash or a leaf value. + for (flag, len) in [(0x00, 33), (0x1a, 32), (0x20, 33), (0x3a, 32)] { + let compact_key = [&[flag][..], &[0xab; 33][..len]].concat(); + let mut node = Vec::new(); + alloy_rlp::encode_list::<_, [u8]>(&[&compact_key[..], &[0xaa; 32]], &mut node); + let node = Bytes::from(node); + + assert_eq!( + verify_range_proof(keccak256(&node), key(1), no_leaves(), &[node]), + Err(RangeProofErrorKind::Rlp(alloy_rlp::Error::Custom("trie node key too long"))), + "flag {flag:#04x}" + ); + } + } + // Empty extensions could recurse indefinitely without increasing the path depth. #[test] fn empty_extension_keys_are_rejected() { From c59ecff66d7f1288c4e3e9b6914e18b8b1ad7ac9 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 13:19:59 +0000 Subject: [PATCH 048/100] fix(prune): cap ExEx height at persisted tip (#28325) --- crates/prune/prune/src/pruner.rs | 63 +++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/crates/prune/prune/src/pruner.rs b/crates/prune/prune/src/pruner.rs index a98b9f18974..ee2541f54e7 100644 --- a/crates/prune/prune/src/pruner.rs +++ b/crates/prune/prune/src/pruner.rs @@ -123,8 +123,8 @@ where self.event_sender.new_listener() } - /// Run the pruner with the given provider. This will only prune data up to the highest finished - /// `ExEx` height, if there are no `ExExes`. + /// Run the pruner with the given provider. The pruning tip is capped by the lowest finished + /// `ExEx` height when `ExExes` are installed. /// /// Returns a [`PruneProgress`], indicating whether pruning is finished, or there is more data /// to prune. @@ -326,7 +326,7 @@ where /// is needed. /// - [`FinishedExExHeight::NotReady`] returns `None` as not all `ExExs` have emitted a /// `FinishedHeight` event yet. - /// - [`FinishedExExHeight::Height`] returns the finished `ExEx` height. + /// - [`FinishedExExHeight::Height`] caps the tip at the finished `ExEx` height. fn adjust_tip_block_number_to_finished_exex_height( &self, tip_block_number: BlockNumber, @@ -338,8 +338,10 @@ where None } FinishedExExHeight::Height(finished_exex_height) => { - debug!(target: "pruner", %tip_block_number, %finished_exex_height, "Adjusting tip block number to the finished ExEx height"); - Some(finished_exex_height) + // ExEx progress may be ahead of the persisted tip. + let adjusted_tip_block_number = finished_exex_height.min(tip_block_number); + debug!(target: "pruner", %tip_block_number, %finished_exex_height, %adjusted_tip_block_number, "Capped tip block number at the finished ExEx height"); + Some(adjusted_tip_block_number) } } } @@ -351,8 +353,8 @@ where ProviderRW: PruneCheckpointWriter + PruneCheckpointReader + StageCheckpointReader, >, { - /// Run the pruner. This will only prune data up to the highest finished ExEx height, if there - /// are no ExExes. + /// Run the pruner. The pruning tip is capped by the lowest finished `ExEx` height when + /// `ExExes` are installed. /// /// Returns a [`PruneProgress`], indicating whether pruning is finished, or there is more data /// to prune. @@ -380,9 +382,10 @@ fn is_stage_finished( #[cfg(test)] mod tests { - use crate::Pruner; - use reth_exex_types::FinishedExExHeight; + use super::*; + use crate::segments::AccountHistory; use reth_provider::test_utils::create_test_provider_factory; + use reth_prune_types::{PruneMode, PruneSegment, MINIMUM_UNWIND_SAFE_DISTANCE}; #[test] fn is_pruning_needed() { @@ -422,5 +425,47 @@ mod tests { // Adjust tip block number to the finished ExEx height that reaches the threshold finished_exex_height_tx.send(FinishedExExHeight::Height(third_block_number)).unwrap(); assert!(pruner.is_pruning_needed(third_block_number)); + + // ExEx progress alone must not advance the pruning interval. + assert!(!pruner.is_pruning_needed(second_block_number)); + finished_exex_height_tx.send(FinishedExExHeight::Height(u64::MAX)).unwrap(); + assert!(!pruner.is_pruning_needed(second_block_number)); + assert!(pruner.is_pruning_needed(third_block_number)); + + pruner.run(0).unwrap(); + assert_eq!(pruner.previous_tip_block_number, Some(0)); + } + + #[test] + fn exex_height_preserves_pruning_distance() { + let tip = 20_000; + for (finished_height, expected_tip) in [(15_000, 15_000), (tip, tip), (40_000, tip)] { + let factory = create_test_provider_factory(); + let provider = factory.database_provider_rw().unwrap(); + + let (_, finished_height_rx) = + watch::channel(FinishedExExHeight::Height(finished_height)); + let mut pruner = Pruner::new( + vec![Box::new(AccountHistory::new(PruneMode::Distance( + MINIMUM_UNWIND_SAFE_DISTANCE, + )))], + 5, + usize::MAX, + None, + finished_height_rx, + ); + pruner.run_with_provider(&provider, tip).unwrap(); + + assert_eq!( + provider + .get_prune_checkpoint(PruneSegment::AccountHistory) + .unwrap() + .unwrap() + .block_number, + Some(expected_tip - MINIMUM_UNWIND_SAFE_DISTANCE), + "finished height {finished_height}" + ); + assert_eq!(pruner.previous_tip_block_number, Some(expected_tip)); + } } } From b6f96e7aec3dfcd498a6e98f01dd65ea21811a91 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 14:00:55 +0000 Subject: [PATCH 049/100] fix(net): ignore re-announcements from peers that failed to deliver a hash (#28362) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- .../net/network/src/transactions/fetcher.rs | 70 ++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/crates/net/network/src/transactions/fetcher.rs b/crates/net/network/src/transactions/fetcher.rs index e02ab7a87e0..04d966cd559 100644 --- a/crates/net/network/src/transactions/fetcher.rs +++ b/crates/net/network/src/transactions/fetcher.rs @@ -28,7 +28,9 @@ //! Undelivered hashes after the last delivered hash keep the peer as a candidate only if it //! delivered at least half of the request, treating that tail as potentially truncated. This is //! a retry heuristic: transaction counts do not establish whether the response reached a byte -//! limit. Requiring half the request limits repeated low-progress retries. +//! limit. Requiring half the request limits repeated low-progress retries. A dropped peer's later +//! announcements of the hash are ignored while it is tracked, so it cannot take retries from +//! candidates that were not asked yet. //! //! Request timeouts are enforced by the peer's session, which resolves the request with //! [`RequestError::Timeout`], so the fetcher does not run any timers. A first timeout is retried @@ -231,6 +233,9 @@ impl TransactionFetcher { candidate.set_size(size); continue } + if entry.failed.contains(&key) { + continue + } if tracked >= max_per_peer { dropped_peer_limit += 1; continue @@ -907,11 +912,13 @@ impl TransactionFetcher { // only source arrives. Allow one retry; prefer another source whenever available. let retry_only_source = timed_out && entry.attempts == 1 && entry.candidates.len() == 1; let peers = &mut self.peers; + let failed = &mut entry.failed; entry.candidates.retain(|candidate| { // disconnected peers are pruned as well let Some(peer) = peers.get_mut(&candidate.peer) else { return false }; if idx < cutoff && candidate.peer == key && !retry_only_source { peer.tracked = peer.tracked.saturating_sub(1); + failed.push(key); return false } true @@ -1233,6 +1240,9 @@ struct TxEntry { fetching_by: Option<(PeerKey, u64)>, /// Sent requests for this entry, bounded independently of candidate replacement. attempts: usize, + /// Peers dropped as candidates after failing to deliver the hash, whose announcements of it + /// are ignored. Bounded by `attempts`, since each failed request adds at most one peer. + failed: SmallVec<[PeerKey; 2]>, } impl TxEntry { @@ -1240,7 +1250,7 @@ impl TxEntry { fn new(peer: PeerKey, size: u32, generation: u64) -> Self { let mut candidates = SmallVec::new(); candidates.push(Candidate::queued(peer, size)); - Self { candidates, generation, fetching_by: None, attempts: 0 } + Self { candidates, generation, fetching_by: None, attempts: 0, failed: SmallVec::new() } } fn has_candidate(&self, key: PeerKey) -> bool { @@ -1833,6 +1843,62 @@ mod tests { assert_eq!(rig.dispatch(), 0); } + #[test] + fn reannouncing_failed_peers_do_not_overtake_untried_candidates() { + let mut rig = Rig::new(); + let (peer_a, peer_b, honest) = (peer(1), peer(2), peer(3)); + let txs = pooled_txs(1); + let h = hashes_of(&txs)[0]; + rig.add_peer(peer_a); + rig.add_peer(honest); + rig.add_peer(peer_b); + + rig.announce(peer_a, &[h]); + rig.dispatch(); + rig.announce(honest, &[h]); + rig.dispatch(); + rig.announce(peer_b, &[h]); + rig.dispatch(); + + // the failing peers take turns re-announcing the hash and answering empty + let (mut failing, mut other) = (peer_a, peer_b); + for _ in 0..MAX_FETCH_ATTEMPTS_PER_HASH { + if rig.fetcher.fetching_peer(&h) == Some(honest) { + break + } + rig.respond(failing, vec![]); + rig.dispatch(); + rig.announce(failing, &[h]); + rig.dispatch(); + std::mem::swap(&mut failing, &mut other); + } + + assert_eq!(rig.fetcher.fetching_peer(&h), Some(honest)); + assert_eq!(rig.fetcher.candidate_peers(&h), vec![honest]); + let event = rig.respond(honest, txs); + assert!( + matches!(event, FetchEvent::TransactionsFetched { peer_id, .. } if peer_id == honest) + ); + assert_eq!(rig.fetcher.num_hashes(), 0); + } + + #[test] + fn untried_candidate_is_asked_after_a_single_empty_response() { + let mut rig = Rig::new(); + let (peer_a, honest) = (peer(1), peer(2)); + let h = hash(1); + rig.add_peer(peer_a); + rig.add_peer(honest); + + rig.announce(peer_a, &[h]); + rig.dispatch(); + rig.announce(honest, &[h]); + rig.dispatch(); + rig.respond(peer_a, vec![]); + rig.dispatch(); + assert_eq!(rig.fetcher.fetching_peer(&h), Some(honest)); + } + #[test] fn partial_response_keeps_peer_for_truncated_tail() { let mut rig = Rig::new(); From cb56b244ad3439eb0cc24aae211a8786bbeac0b4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 14:09:10 +0000 Subject: [PATCH 050/100] perf(storage): cut overlay provider setup cost (#28373) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/storage/storage-overlay/src/builder.rs | 5 ++ crates/storage/storage-overlay/src/manager.rs | 23 ++++- .../storage/storage-overlay/src/provider.rs | 83 +++++++++++-------- 3 files changed, 75 insertions(+), 36 deletions(-) diff --git a/crates/storage/storage-overlay/src/builder.rs b/crates/storage/storage-overlay/src/builder.rs index 8196f79b435..e4bc786126c 100644 --- a/crates/storage/storage-overlay/src/builder.rs +++ b/crates/storage/storage-overlay/src/builder.rs @@ -232,6 +232,11 @@ impl OverlayBuilder { self } + /// Returns the manager this builder resolves overlays from. + pub(crate) const fn overlay_manager(&self) -> &OverlayManager { + &self.overlay_manager + } + /// Appends an executed block to this builder's in-memory parent state. pub fn with_appended_block(mut self, block: ExecutedBlock) -> Self { debug_assert_eq!(block.recovered_block().parent_hash(), self.parent_hash); diff --git a/crates/storage/storage-overlay/src/manager.rs b/crates/storage/storage-overlay/src/manager.rs index b23bc24d630..81e721566ab 100644 --- a/crates/storage/storage-overlay/src/manager.rs +++ b/crates/storage/storage-overlay/src/manager.rs @@ -9,6 +9,7 @@ use crate::{ changeset_cache::compute_block_trie_updates, database_state_frontiers, manager_metrics::{ExecutionOverlayMetrics, OverlayCacheMetrics, StateTrieOverlayMetrics}, + provider::OverlayStateProviderFactoryMetrics, ChangesetCache, ExecutionOverlay, OverlayBuilder, }; use alloy_eips::BlockNumHash; @@ -27,7 +28,10 @@ use reth_storage_api::{ }; #[cfg(feature = "rayon")] use reth_tasks::WorkerPool; -use reth_trie::{updates::TrieUpdatesSorted, HashedPostStateSorted, TrieInputSorted}; +use reth_trie::{ + proof_v2::ProofCursorMetrics, updates::TrieUpdatesSorted, HashedPostStateSorted, + TrieInputSorted, +}; use std::{ fmt, ops::RangeInclusive, @@ -58,6 +62,8 @@ struct OverlayManagerInner { metrics: StateTrieOverlayMetrics, execution_metrics: ExecutionOverlayMetrics, builder_metrics: OverlayBuilderMetrics, + provider_metrics: OverlayStateProviderFactoryMetrics, + proof_cursor_metrics: ProofCursorMetrics, } impl Default for OverlayManager { @@ -74,6 +80,8 @@ impl Default for OverlayManager { metrics: Default::default(), execution_metrics: Default::default(), builder_metrics: Default::default(), + provider_metrics: Default::default(), + proof_cursor_metrics: Default::default(), }), } } @@ -104,6 +112,8 @@ impl OverlayManager { metrics: Default::default(), execution_metrics: Default::default(), builder_metrics: Default::default(), + provider_metrics: Default::default(), + proof_cursor_metrics: Default::default(), }), } } @@ -143,6 +153,17 @@ impl OverlayManager { &self.inner.builder_metrics } + /// Returns the metrics shared by the overlay state providers built from this manager. + pub(crate) fn provider_metrics(&self) -> &OverlayStateProviderFactoryMetrics { + &self.inner.provider_metrics + } + + /// Returns the cursor metric handles shared by the overlay state providers built from this + /// manager. + pub(crate) fn proof_cursor_metrics(&self) -> &ProofCursorMetrics { + &self.inner.proof_cursor_metrics + } + /// Gets complete trie before-values for an inclusive block range, oldest values taking /// precedence. No updates from outside the requested range are included. pub fn get_or_compute_cached_changesets_range

( diff --git a/crates/storage/storage-overlay/src/provider.rs b/crates/storage/storage-overlay/src/provider.rs index 44646685788..43d6f2f6d31 100644 --- a/crates/storage/storage-overlay/src/provider.rs +++ b/crates/storage/storage-overlay/src/provider.rs @@ -80,12 +80,13 @@ pub struct OverlayStateProviderFactory { impl OverlayStateProviderFactory { /// Create a new overlay state provider factory. pub fn new(factory: F, overlay_builder: OverlayBuilder) -> Self { + let manager = overlay_builder.overlay_manager(); Self { factory, + metrics: manager.provider_metrics().clone(), + proof_cursor_metrics: manager.proof_cursor_metrics().clone(), overlay_builder, state_trie_overlay_cache: Default::default(), - metrics: Default::default(), - proof_cursor_metrics: Default::default(), known_storage_roots: Default::default(), } } @@ -148,7 +149,7 @@ where Ok(OverlayStateProvider::from_parts( OwnedProvider(provider), Some(self.overlay_builder.clone()), - Arc::clone(&self.state_trie_overlay_cache), + Some(Arc::clone(&self.state_trie_overlay_cache)), self.metrics.clone(), self.proof_cursor_metrics.clone(), self.known_storage_roots.clone(), @@ -172,7 +173,8 @@ where /// The `!Unpin` pointee preserves cached transaction borrows when the owning box moves. provider: Pin>, overlay_builder: Option>, - state_trie_overlay_cache: StateTrieOverlayCache, + /// Overlay cache shared with the factory that created this provider, if any. + state_trie_overlay_cache: Option, metrics: OverlayStateProviderFactoryMetrics, proof_cursor_metrics: ProofCursorMetrics, /// Revealed storage roots from the reused sparse trie, shared across proof workers. @@ -190,12 +192,15 @@ impl OverlayStateProvider OverlayStateProvider OverlayStateProvider<&'a Provi Provider: StorageSettingsCache, { let is_v2 = provider.cached_storage_settings().is_v2(); + let manager = overlay_builder.overlay_manager(); + let metrics = manager.provider_metrics().clone(); + let proof_cursor_metrics = manager.proof_cursor_metrics().clone(); Self::from_parts( provider, Some(overlay_builder), - Default::default(), - Default::default(), - Default::default(), + None, + metrics, + proof_cursor_metrics, Default::default(), is_v2, ) @@ -250,7 +258,7 @@ impl<'a, Provider: DBProvider, N: NodePrimitives> OverlayStateProvider<&'a Provi let mut provider = Self::from_parts( provider, None, - Default::default(), + None, Default::default(), Default::default(), Default::default(), @@ -272,7 +280,7 @@ where fn from_parts( provider: Provider, overlay_builder: Option>, - state_trie_overlay_cache: StateTrieOverlayCache, + state_trie_overlay_cache: Option, metrics: OverlayStateProviderFactoryMetrics, proof_cursor_metrics: ProofCursorMetrics, known_storage_roots: Arc>, @@ -313,29 +321,34 @@ where } let (state_trie_tip_block, finish_tip_block) = database_state_frontiers(self.provider())?; - let overlay = match self.state_trie_overlay_cache.entry(( - state_trie_tip_block.hash, - finish_tip_block.hash, - trie_changesets, - )) { - dashmap::Entry::Occupied(entry) => entry.get().clone(), - dashmap::Entry::Vacant(entry) => { - self.metrics.state_trie_overlay_cache_misses.increment(1); - let overlay = self - .overlay_builder - .as_ref() - .expect("state trie overlay must be initialized or lazily resolvable") - .build_state_trie_overlay_at_frontiers( - self.provider(), - state_trie_tip_block, - finish_tip_block, - trie_changesets, - )?; - if !overlay.skipped_for_reused_sparse_trie() { - entry.insert(overlay.clone()); + let build = || { + self.overlay_builder + .as_ref() + .expect("state trie overlay must be initialized or lazily resolvable") + .build_state_trie_overlay_at_frontiers( + self.provider(), + state_trie_tip_block, + finish_tip_block, + trie_changesets, + ) + }; + let overlay = match &self.state_trie_overlay_cache { + Some(cache) => match cache.entry(( + state_trie_tip_block.hash, + finish_tip_block.hash, + trie_changesets, + )) { + dashmap::Entry::Occupied(entry) => entry.get().clone(), + dashmap::Entry::Vacant(entry) => { + self.metrics.state_trie_overlay_cache_misses.increment(1); + let overlay = build()?; + if !overlay.skipped_for_reused_sparse_trie() { + entry.insert(overlay.clone()); + } + overlay } - overlay - } + }, + None => build()?, }; let _ = state_trie_overlay.set(overlay); Ok(state_trie_overlay.get().expect("state trie overlay was just initialized")) From 98fd256be9e43bc9ef725e5dab6f19987d809bf7 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 14:13:11 +0000 Subject: [PATCH 051/100] fix(txpool): apply tx fee cap based on submission origin (#28354) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/transaction-pool/src/validate/eth.rs | 38 ++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/crates/transaction-pool/src/validate/eth.rs b/crates/transaction-pool/src/validate/eth.rs index 8ba02b42657..c88334cd795 100644 --- a/crates/transaction-pool/src/validate/eth.rs +++ b/crates/transaction-pool/src/validate/eth.rs @@ -557,12 +557,9 @@ where return Err(InvalidTransactionError::TipAboveFeeCap.into()) } - // determine whether the transaction should be treated as local - let is_local = self.local_transactions_config.is_local(origin, transaction.sender_ref()); - // Ensure max possible transaction fee doesn't exceed configured transaction fee cap. // Only for transactions locally submitted for acceptance into the pool. - if is_local { + if origin.is_local() { match self.tx_fee_cap { Some(0) | None => {} // Skip if cap is 0 or None Some(tx_fee_cap_wei) => { @@ -1991,6 +1988,39 @@ mod tests { assert!(tx.is_none()); } + #[tokio::test] + async fn invalid_on_fee_cap_exceeded_with_no_exemptions() { + let sender = Address::repeat_byte(1); + let tx = alloy_consensus::TxEip1559 { + chain_id: 1, + gas_limit: 21_000, + max_fee_per_gas: 1e15 as u128, // 21 ETH max fee + to: Address::repeat_byte(2).into(), + ..Default::default() + }; + let transaction = pooled_eip1559_tx(tx, sender); + let provider = mock_provider(); + provider.add_account(sender, ExtendedAccount::new(0, U256::MAX)); + + // default 1 ETH cap + let validator = EthTransactionValidatorBuilder::new(provider, test_evm_config()) + .with_local_transactions_config(LocalTransactionConfig { + no_exemptions: true, + ..Default::default() + }) + .build(InMemoryBlobStore::default()); + + let outcome = validator.validate_one(TransactionOrigin::Local, transaction); + let TransactionValidationOutcome::Invalid(_, err) = outcome else { + panic!("expected invalid outcome, got {outcome:?}") + }; + assert!(matches!( + err, + InvalidPoolTransactionError::ExceedsFeeCap { max_tx_fee_wei, tx_fee_cap_wei } + if max_tx_fee_wei == 21_000 * 1e15 as u128 && tx_fee_cap_wei == 1e18 as u128 + )); + } + #[tokio::test] async fn valid_on_zero_fee_cap() { let transaction = get_transaction(); From 18bed80c0697e3c768c14d2035bf406b82dc9b4f Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 14:13:42 +0000 Subject: [PATCH 052/100] perf: replace schnellru with reth-lru (#28291) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- .github/CODEOWNERS | 1 + Cargo.lock | 38 +- Cargo.toml | 4 +- crates/engine/tree/Cargo.toml | 2 +- .../engine/tree/src/tree/invalid_headers.rs | 8 +- crates/lru/Cargo.toml | 16 + crates/lru/src/lib.rs | 640 ++++++++++++++++++ crates/net/discv4/Cargo.toml | 2 +- crates/net/discv4/src/lib.rs | 7 +- crates/net/dns/Cargo.toml | 2 +- crates/net/dns/src/lib.rs | 4 +- crates/net/network/Cargo.toml | 2 +- crates/net/network/src/cache.rs | 122 +--- crates/rpc/rpc-eth-types/Cargo.toml | 2 +- crates/rpc/rpc-eth-types/src/cache/mod.rs | 21 +- .../rpc-eth-types/src/cache/multi_consumer.rs | 48 +- crates/rpc/rpc-eth-types/src/gas_oracle.rs | 11 +- crates/transaction-pool/Cargo.toml | 2 +- crates/transaction-pool/src/blobstore/disk.rs | 18 +- 19 files changed, 762 insertions(+), 188 deletions(-) create mode 100644 crates/lru/Cargo.toml create mode 100644 crates/lru/src/lib.rs diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0b8bee9179f..d8c416c6e73 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,6 +15,7 @@ crates/etl/ @joshieDo @shekhirin crates/evm/ @mattsse @Rjected @klkvr crates/exex/ @shekhirin crates/fs-util/ @mattsse +crates/lru/ @mattsse crates/metrics/ @mattsse @Rjected crates/net/ @mattsse @Rjected crates/net/downloaders/ @Rjected diff --git a/Cargo.lock b/Cargo.lock index f3584138351..ac5e6196eed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,7 +70,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", - "getrandom 0.3.4", "once_cell", "version_check", "zerocopy", @@ -4821,12 +4820,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" - [[package]] name = "hashbrown" version = "0.14.5" @@ -8563,11 +8556,11 @@ dependencies = [ "parking_lot", "rand 0.9.5", "reth-ethereum-forks", + "reth-lru", "reth-net-banlist", "reth-net-nat", "reth-network-peers", "reth-tracing", - "schnellru", "secp256k1 0.33.1", "serde", "thiserror 2.0.21", @@ -8617,10 +8610,10 @@ dependencies = [ "rand 0.9.5", "reth-chainspec", "reth-ethereum-forks", + "reth-lru", "reth-network-peers", "reth-tokio-util", "reth-tracing", - "schnellru", "secp256k1 0.33.1", "serde", "serde_with", @@ -8858,6 +8851,7 @@ dependencies = [ "reth-execution-cache", "reth-execution-types", "reth-exex-types", + "reth-lru", "reth-metrics", "reth-network-p2p", "reth-node-ethereum", @@ -8878,7 +8872,6 @@ dependencies = [ "reth-trie-common", "reth-trie-parallel", "reth-trie-sparse", - "schnellru", "thiserror 2.0.21", "tokio", "tracing", @@ -9506,6 +9499,14 @@ dependencies = [ "tracing", ] +[[package]] +name = "reth-lru" +version = "2.10.1" +dependencies = [ + "alloy-primitives", + "hashbrown 0.17.1", +] + [[package]] name = "reth-mdbx-sys" version = "2.10.1" @@ -9586,6 +9587,7 @@ dependencies = [ "reth-evm", "reth-evm-ethereum", "reth-fs-util", + "reth-lru", "reth-metrics", "reth-net-banlist", "reth-net-nat", @@ -9605,7 +9607,6 @@ dependencies = [ "reth-transaction-pool", "reth-trie", "rustc-hash", - "schnellru", "secp256k1 0.33.1", "serde", "smallvec", @@ -10564,6 +10565,7 @@ dependencies = [ "reth-ethereum-primitives", "reth-evm", "reth-execution-types", + "reth-lru", "reth-metrics", "reth-primitives-traits", "reth-rpc-convert", @@ -10572,7 +10574,6 @@ dependencies = [ "reth-tasks", "reth-transaction-pool", "reth-trie-common", - "schnellru", "serde", "serde_json", "thiserror 2.0.21", @@ -11043,6 +11044,7 @@ dependencies = [ "reth-evm-ethereum", "reth-execution-types", "reth-fs-util", + "reth-lru", "reth-metrics", "reth-primitives-traits", "reth-provider", @@ -11051,7 +11053,6 @@ dependencies = [ "reth-tracing", "reth-transaction-pool", "rustc-hash", - "schnellru", "serde", "serde_json", "smallvec", @@ -11618,17 +11619,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "schnellru" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" -dependencies = [ - "ahash", - "cfg-if", - "hashbrown 0.13.2", -] - [[package]] name = "scoped-tls" version = "1.0.1" diff --git a/Cargo.toml b/Cargo.toml index bc613f4b74b..08e67499f81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,7 @@ members = [ "crates/exex/exex/", "crates/exex/test-utils/", "crates/exex/types/", + "crates/lru/", "crates/metrics/", "crates/net/banlist/", "crates/net/discv4/", @@ -373,6 +374,7 @@ reth-fs-util = { path = "crates/fs-util" } reth-invalid-block-hooks = { path = "crates/engine/invalid-block-hooks" } reth-ipc = { path = "crates/rpc/ipc" } reth-libmdbx = { path = "crates/storage/libmdbx-rs" } +reth-lru = { path = "crates/lru" } reth-mdbx-sys = { path = "crates/storage/libmdbx-rs/mdbx-sys" } reth-metrics = { path = "crates/metrics" } reth-net-banlist = { path = "crates/net/banlist" } @@ -496,6 +498,7 @@ eyre = "0.6" fdlimit = "0.3.0" fixed-map = { version = "0.9", default-features = false } flate2 = "1.0" +hashbrown = { version = "0.17", default-features = false } humantime = "2.1" imbl = "7" humantime-serde = "1.1" @@ -513,7 +516,6 @@ rand = "0.9" rayon = "1.7" thread-priority = "3.0.0" rustc-hash = { version = "2.0", default-features = false } -schnellru = "0.2" serde = { version = "1.0", default-features = false } serde_json = { version = "1.0", default-features = false, features = ["alloc"] } serde_with = { version = "3", default-features = false, features = ["macros"] } diff --git a/crates/engine/tree/Cargo.toml b/crates/engine/tree/Cargo.toml index 177b11ead8b..5f5eafaebd7 100644 --- a/crates/engine/tree/Cargo.toml +++ b/crates/engine/tree/Cargo.toml @@ -36,6 +36,7 @@ reth-trie-parallel.workspace = true reth-trie-sparse = { workspace = true, features = ["std", "metrics"] } reth-trie.workspace = true reth-trie-common.workspace = true +reth-lru.workspace = true # alloy alloy-consensus.workspace = true @@ -58,7 +59,6 @@ reth-metrics = { workspace = true, features = ["common"] } # misc dashmap.workspace = true indexmap.workspace = true -schnellru.workspace = true rayon.workspace = true tracing.workspace = true derive_more.workspace = true diff --git a/crates/engine/tree/src/tree/invalid_headers.rs b/crates/engine/tree/src/tree/invalid_headers.rs index d1eca0aa380..979ae7e1e75 100644 --- a/crates/engine/tree/src/tree/invalid_headers.rs +++ b/crates/engine/tree/src/tree/invalid_headers.rs @@ -1,10 +1,10 @@ use alloy_eips::eip1898::BlockWithParent; -use alloy_primitives::B256; +use alloy_primitives::{map::FbBuildHasher, B256}; +use reth_lru::LruMap; use reth_metrics::{ metrics::{Counter, Gauge}, Metrics, }; -use schnellru::{ByLength, LruMap}; use std::fmt::Debug; use tracing::warn; @@ -12,7 +12,7 @@ use tracing::warn; #[derive(Debug)] pub struct InvalidHeaderCache { /// This maps a header hash to a reference to its invalid ancestor. - headers: LruMap, + headers: LruMap>, /// Number of cache hits before an invalid header entry is evicted and reprocessed. hit_eviction_threshold: u8, /// Metrics for the cache. @@ -26,7 +26,7 @@ impl InvalidHeaderCache { /// evicted on the first lookup. pub fn new(max_length: u32, hit_eviction_threshold: u8) -> Self { Self { - headers: LruMap::new(ByLength::new(max_length)), + headers: LruMap::with_hasher(max_length, Default::default()), hit_eviction_threshold, metrics: Default::default(), } diff --git a/crates/lru/Cargo.toml b/crates/lru/Cargo.toml new file mode 100644 index 00000000000..5d732f6f327 --- /dev/null +++ b/crates/lru/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "reth-lru" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +description = "Length-limited LRU map used by reth's caches" + +[lints] +workspace = true + +[dependencies] +alloy-primitives.workspace = true +hashbrown.workspace = true diff --git a/crates/lru/src/lib.rs b/crates/lru/src/lib.rs new file mode 100644 index 00000000000..57156e2495d --- /dev/null +++ b/crates/lru/src/lib.rs @@ -0,0 +1,640 @@ +//! A length-limited LRU map tailored to reth's caches. +//! +//! Entries live in a `Vec` of nodes that form a doubly linked list from most to least recently +//! used. A [`HashTable`] maps keys to node indices, so hashbrown can grow or rehash it freely +//! without invalidating the links. Nodes freed by removals are reused by later inserts, and the +//! node `Vec` never grows past the length limit. +//! +//! Insertions that evict return the evicted entry, so callers that need eviction feedback don't +//! need a second lookup. + +#![doc( + html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png", + html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256", + issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/" +)] +#![cfg_attr(not(test), warn(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg))] +#![no_std] + +extern crate alloc; + +use alloc::vec::Vec; +use alloy_primitives::map::DefaultHashBuilder; +use core::{ + borrow::Borrow, + fmt, + hash::{BuildHasher, Hash}, + iter::FusedIterator, + mem::{self, MaybeUninit}, +}; +use hashbrown::HashTable; + +/// Marks the end of the list and an empty free list. +const NONE: u32 = u32::MAX; + +/// Hash table capacity per node slot. +/// +/// The table holds only `u32` indices, so a sparse table costs a few bytes per entry and keeps +/// probe sequences short and tombstone rehashes rare under eviction churn. +const TABLE_SLACK: usize = 2; + +/// A hash map holding at most `max_length` entries that evicts the least recently used entry. +/// +/// [`get`](Self::get) and the insert methods mark an entry as most recently used, the `peek` +/// methods don't. +pub struct LruMap { + /// Indices of the linked nodes, keyed by the hash of their key. + table: HashTable, + nodes: Vec>, + hasher: S, + max_length: u32, + len: u32, + newest: u32, + oldest: u32, + /// Head of the vacant nodes, chained through [`Node::newer`]. + free: u32, +} + +impl LruMap { + /// Creates an empty map that holds at most `max_length` entries, using the default hasher. + /// Does not allocate. + pub fn new(max_length: u32) -> Self { + Self::with_hasher(max_length, DefaultHashBuilder::default()) + } +} + +impl LruMap { + /// Creates an empty map that holds at most `max_length` entries, using `hasher` to hash keys. + /// Does not allocate. + pub const fn with_hasher(max_length: u32, hasher: S) -> Self { + Self { + table: HashTable::new(), + nodes: Vec::new(), + hasher, + max_length, + len: 0, + newest: NONE, + oldest: NONE, + free: NONE, + } + } + + /// Returns the maximum number of entries. + pub const fn max_length(&self) -> u32 { + self.max_length + } + + /// Returns the number of entries. + pub const fn len(&self) -> usize { + self.len as usize + } + + /// Returns `true` if the map holds no entries. + pub const fn is_empty(&self) -> bool { + self.len == 0 + } + + /// Returns the number of heap bytes allocated by the map, excluding heap memory owned by keys + /// and values. + pub fn memory_usage(&self) -> usize { + self.table.allocation_size() + self.nodes.capacity() * size_of::>() + } + + /// Returns the least recently used entry without changing its position. + pub fn peek_oldest(&self) -> Option<(&K, &V)> { + (self.oldest != NONE).then(|| self.entry(self.oldest)) + } + + /// Returns the most recently used entry without changing its position. + pub fn peek_newest(&self) -> Option<(&K, &V)> { + (self.newest != NONE).then(|| self.entry(self.newest)) + } + + /// Iterates from the most to the least recently used entry. + pub const fn iter(&self) -> Iter<'_, K, V, S> { + Iter { map: self, next: self.newest, remaining: self.len() } + } + + /// Removes all entries, keeping the allocated memory. + pub fn clear(&mut self) { + self.table.clear(); + let newest = mem::replace(&mut self.newest, NONE); + self.oldest = NONE; + self.free = NONE; + self.len = 0; + // The map is empty before any entry is dropped, so a panicking drop only leaks the rest. + let mut nodes = mem::take(&mut self.nodes); + drop_linked(&mut nodes, newest); + nodes.clear(); + self.nodes = nodes; + } + + #[inline] + fn node(&self, index: u32) -> &Node { + debug_assert!((index as usize) < self.nodes.len()); + // SAFETY: indices stored in the table, the list and the free list are always in bounds. + unsafe { self.nodes.get_unchecked(index as usize) } + } + + #[inline] + fn node_mut(&mut self, index: u32) -> &mut Node { + debug_assert!((index as usize) < self.nodes.len()); + // SAFETY: see `node`. + unsafe { self.nodes.get_unchecked_mut(index as usize) } + } + + /// Returns the entry of the linked node at `index`. + #[inline] + fn entry(&self, index: u32) -> (&K, &V) { + let node = self.node(index); + // SAFETY: linked nodes are initialized. + unsafe { (node.key.assume_init_ref(), node.value.assume_init_ref()) } + } + + #[inline] + fn unlink(&mut self, index: u32) { + let Node { older, newer, .. } = *self.node(index); + if older == NONE { + self.oldest = newer + } else { + self.node_mut(older).newer = newer + } + if newer == NONE { + self.newest = older + } else { + self.node_mut(newer).older = older + } + } + + #[inline] + fn link_newest(&mut self, index: u32) { + let prev = self.newest; + let node = self.node_mut(index); + node.older = prev; + node.newer = NONE; + if prev == NONE { + self.oldest = index + } else { + self.node_mut(prev).newer = index + } + self.newest = index; + } + + #[inline] + fn promote(&mut self, index: u32) { + if self.newest != index { + self.unlink(index); + self.link_newest(index); + } + } +} + +impl LruMap +where + K: Hash + Eq, + S: BuildHasher, +{ + /// Returns the value for `key` and marks it as the most recently used. + #[inline] + pub fn get(&mut self, key: &Q) -> Option<&mut V> + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + let index = self.find(key)?; + self.promote(index); + // SAFETY: `find` only returns linked nodes, which are initialized. + Some(unsafe { self.node_mut(index).value.assume_init_mut() }) + } + + /// Returns the value for `key` without changing its position. + #[inline] + pub fn peek(&self, key: &Q) -> Option<&V> + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + self.find(key).map(|index| self.entry(index).1) + } + + /// Returns a mutable reference to the value for `key` without changing its position. + #[inline] + pub fn peek_mut(&mut self, key: &Q) -> Option<&mut V> + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + let index = self.find(key)?; + // SAFETY: `find` only returns linked nodes, which are initialized. + Some(unsafe { self.node_mut(index).value.assume_init_mut() }) + } + + /// Returns `true` if the map contains `key`, without changing its position. + #[inline] + pub fn contains(&self, key: &Q) -> bool + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + self.find(key).is_some() + } + + /// Inserts `value` for `key`, or replaces the current value, and marks `key` as the most + /// recently used. + /// + /// Returns the least recently used entry if it was evicted to make room. If `max_length` is + /// zero, nothing is stored and the given entry is returned instead. + #[inline] + pub fn insert(&mut self, key: K, value: V) -> Option<(K, V)> { + let hash = self.hasher.hash_one(&key); + if let Some(index) = self.find_hashed(hash, &key) { + self.promote(index); + // SAFETY: `find_hashed` only returns linked nodes, which are initialized. + *unsafe { self.node_mut(index).value.assume_init_mut() } = value; + return None + } + self.insert_new(hash, key, value).1 + } + + /// Returns the value for `key` and marks it as the most recently used, first inserting the + /// value returned by `f` if `key` is absent. + /// + /// Returns `None` only if `max_length` is zero. + #[inline] + pub fn get_or_insert(&mut self, key: K, f: impl FnOnce() -> V) -> Option<&mut V> { + let hash = self.hasher.hash_one(&key); + let index = if let Some(index) = self.find_hashed(hash, &key) { + self.promote(index); + index + } else { + let index = self.insert_new(hash, key, f()).0; + if index == NONE { + return None + } + index + }; + // SAFETY: both branches yield a linked node, which is initialized. + Some(unsafe { self.node_mut(index).value.assume_init_mut() }) + } + + /// Removes `key` and returns its value. + #[inline] + pub fn remove(&mut self, key: &Q) -> Option + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + let index = self.find(key)?; + Some(self.take(index).1) + } + + /// Removes and returns the least recently used entry. + #[inline] + pub fn pop_oldest(&mut self) -> Option<(K, V)> { + (self.oldest != NONE).then(|| self.take(self.oldest)) + } + + #[inline] + fn find(&self, key: &Q) -> Option + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + self.find_hashed(self.hasher.hash_one(key), key) + } + + #[inline] + fn find_hashed(&self, hash: u64, key: &Q) -> Option + where + K: Borrow, + Q: Hash + Eq + ?Sized, + { + let nodes = &self.nodes; + self.table + .find(hash, |&index| { + // SAFETY: the table only holds indices of linked nodes, which are initialized. + let node = unsafe { nodes.get_unchecked(index as usize) }; + unsafe { node.key.assume_init_ref() }.borrow() == key + }) + .copied() + } + + /// Removes the linked node at `index` from the table, list and length, moves its entry out + /// and puts the node on the free list. + fn take(&mut self, index: u32) -> (K, V) { + // Hashing may panic, so it happens before any state changes. + // SAFETY: the node is linked, so its key is initialized. + let hash = self.hasher.hash_one(unsafe { self.node(index).key.assume_init_ref() }); + match self.table.find_entry(hash, |&i| i == index) { + Ok(slot) => { + slot.remove(); + } + // Only reachable with a `Hash` impl that is not deterministic. The table must never + // point at a vacant node, so fall back to a full scan. + Err(_) => self.table.retain(|&mut i| i != index), + } + self.unlink(index); + let free = self.free; + let node = self.node_mut(index); + node.newer = free; + // SAFETY: the node was linked, so both are initialized. It is vacant from here on. + let entry = unsafe { (node.key.assume_init_read(), node.value.assume_init_read()) }; + self.free = index; + self.len -= 1; + entry + } + + /// Inserts an absent key, evicting the oldest entry if the map is full. + /// + /// Returns the index of the new node, or [`NONE`] with the given entry if `max_length` is + /// zero, and the evicted entry. + /// + /// Every linked node is initialized and counted in `len` whenever user code (hashing, + /// equality, drops) can panic. The table may then miss an index, which only causes lookup + /// misses, but never holds the index of a vacant node. + fn insert_new(&mut self, hash: u64, key: K, value: V) -> (u32, Option<(K, V)>) { + if self.max_length == 0 { + return (NONE, Some((key, value))) + } + let evicted = (self.len >= self.max_length).then(|| self.take(self.oldest)); + let index = if self.free == NONE { + if self.nodes.len() == self.nodes.capacity() { + self.grow(); + } + self.nodes.push(Node { + key: MaybeUninit::new(key), + value: MaybeUninit::new(value), + older: NONE, + newer: NONE, + }); + self.nodes.len() as u32 - 1 + } else { + let index = self.free; + let node = self.node_mut(index); + let next = node.newer; + node.key.write(key); + node.value.write(value); + self.free = next; + index + }; + self.link_newest(index); + self.len += 1; + let (nodes, hasher) = (&self.nodes, &self.hasher); + self.table.insert_unique(hash, index, |&i| hash_node(hasher, nodes, i)); + (index, evicted) + } + + /// Grows the node `Vec` geometrically up to `max_length` and keeps the table sparse. + #[cold] + fn grow(&mut self) { + let target = + (self.nodes.len() * 2).clamp(4.min(self.max_length as usize), self.max_length as usize); + self.nodes.reserve_exact(target - self.nodes.len()); + let (nodes, hasher) = (&self.nodes, &self.hasher); + let additional = target.saturating_mul(TABLE_SLACK).saturating_sub(self.table.len()); + self.table.reserve(additional, |&i| hash_node(hasher, nodes, i)); + } +} + +impl Default for LruMap { + /// Returns an empty map with `max_length` zero, which stores nothing. + fn default() -> Self { + Self::with_hasher(0, S::default()) + } +} + +impl Drop for LruMap { + fn drop(&mut self) { + drop_linked(&mut self.nodes, self.newest); + } +} + +impl fmt::Debug for LruMap { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("LruMap") + .field("len", &self.len) + .field("max_length", &self.max_length) + .finish_non_exhaustive() + } +} + +impl<'a, K, V, S> IntoIterator for &'a LruMap { + type Item = (&'a K, &'a V); + type IntoIter = Iter<'a, K, V, S>; + + fn into_iter(self) -> Self::IntoIter { + self.iter() + } +} + +/// Iterator over the entries of an [`LruMap`], from most to least recently used. +#[derive(Debug)] +pub struct Iter<'a, K, V, S> { + map: &'a LruMap, + next: u32, + remaining: usize, +} + +impl<'a, K, V, S> Iterator for Iter<'a, K, V, S> { + type Item = (&'a K, &'a V); + + fn next(&mut self) -> Option { + if self.next == NONE { + return None + } + let map = self.map; + let entry = map.entry(self.next); + self.next = map.node(self.next).older; + self.remaining -= 1; + Some(entry) + } + + fn size_hint(&self) -> (usize, Option) { + (self.remaining, Some(self.remaining)) + } +} + +impl ExactSizeIterator for Iter<'_, K, V, S> {} + +impl FusedIterator for Iter<'_, K, V, S> {} + +/// A list node. `key` and `value` are initialized iff the node is linked into the LRU list. +struct Node { + key: MaybeUninit, + value: MaybeUninit, + /// Next less recently used node, or [`NONE`]. + older: u32, + /// Next more recently used node, or the next vacant node for vacant nodes, or [`NONE`]. + newer: u32, +} + +/// Drops the entries of the list starting at `newest`. +/// +/// Callers must not treat these nodes as linked afterwards. +fn drop_linked(nodes: &mut [Node], newest: u32) { + if !mem::needs_drop::<(K, V)>() { + return + } + let mut index = newest; + while index != NONE { + let node = &mut nodes[index as usize]; + index = node.older; + // SAFETY: linked nodes are initialized, and the caller stops treating them as linked, so + // each is dropped exactly once. + unsafe { + node.key.assume_init_drop(); + node.value.assume_init_drop(); + } + } +} + +/// Hashes the key of the linked node at `index`, for rehashing the table. +#[inline] +fn hash_node(hasher: &S, nodes: &[Node], index: u32) -> u64 { + // SAFETY: the table only holds indices of linked nodes, which are initialized. + hasher.hash_one(unsafe { nodes.get_unchecked(index as usize).key.assume_init_ref() }) +} + +#[cfg(test)] +mod tests { + use super::*; + use alloc::{ + string::{String, ToString}, + sync::Arc, + vec, + }; + + fn keys(map: &LruMap) -> Vec { + map.iter().map(|(k, _)| *k).collect() + } + + #[test] + fn evicts_least_recently_used() { + let mut map = LruMap::::new(3); + assert_eq!(map.insert(1, 10), None); + assert_eq!(map.insert(2, 20), None); + assert_eq!(map.insert(3, 30), None); + assert_eq!(map.get(&1), Some(&mut 10)); + assert_eq!(map.peek(&2), Some(&20)); + assert_eq!(map.insert(4, 40), Some((2, 20))); + assert_eq!(keys(&map), [4, 1, 3]); + assert_eq!(map.peek_oldest(), Some((&3, &30))); + assert_eq!(map.peek_newest(), Some((&4, &40))); + assert_eq!(map.insert(3, 31), None); + assert_eq!(keys(&map), [3, 4, 1]); + assert_eq!(map.remove(&4), Some(40)); + assert_eq!(map.get_or_insert(5, || 50), Some(&mut 50)); + assert_eq!(map.get_or_insert(1, || 0), Some(&mut 10)); + assert_eq!(keys(&map), [1, 5, 3]); + assert_eq!(map.pop_oldest(), Some((3, 31))); + assert_eq!(map.len(), 2); + assert_eq!(map.iter().len(), 2); + } + + #[test] + fn zero_length_stores_nothing() { + let mut map = LruMap::::default(); + assert_eq!(map.insert(1, 1), Some((1, 1))); + assert_eq!(map.get_or_insert(1, || 1), None); + assert!(map.is_empty()); + assert_eq!(map.memory_usage(), 0); + } + + #[test] + fn borrowed_lookups() { + let mut map = LruMap::::new(2); + map.insert("a".to_string(), 1); + assert_eq!(map.get("a"), Some(&mut 1)); + assert!(map.contains("a")); + assert_eq!(map.peek_mut("a"), Some(&mut 1)); + assert_eq!(map.remove("a"), Some(1)); + assert!(!map.contains("a")); + } + + #[test] + fn never_grows_past_max_length() { + let mut map = LruMap::::new(5); + for i in 0..100 { + map.insert(i, ()); + if i % 7 == 6 { + map.remove(&(i - 1)); + } + } + assert_eq!(map.nodes.capacity(), 5); + assert_eq!(map.len(), 5); + } + + /// Every value is dropped exactly once across evictions, removals, replacements, clears and + /// drop. + #[test] + fn drops_each_value_once() { + let token = Arc::new(()); + { + let mut map = LruMap::>::new(4); + for i in 0..64u64 { + map.insert(i % 9, Arc::clone(&token)); + if i % 3 == 0 { + map.remove(&(i % 7)); + } + if i % 5 == 0 { + map.pop_oldest(); + } + map.get_or_insert(i % 11, || Arc::clone(&token)); + assert_eq!(Arc::strong_count(&token), 1 + map.len()); + if i == 32 { + map.clear(); + assert_eq!(Arc::strong_count(&token), 1); + } + } + } + assert_eq!(Arc::strong_count(&token), 1); + } + + /// Replays a random trace against a `Vec` model, newest first. + #[test] + fn matches_model() { + let steps = if cfg!(miri) { 2_000 } else { 100_000 }; + for max_length in [1u32, 2, 3, 7, 64, 333] { + let mut map = LruMap::::new(max_length); + let mut model: Vec<(u64, u64)> = vec![]; + let mut x = 0x9e37_79b9_7f4a_7c15u64; + for step in 0..steps { + x ^= x << 13; + x ^= x >> 7; + x ^= x << 17; + let key = x % (max_length as u64 * 3 + 1); + let position = model.iter().position(|e| e.0 == key); + match x >> 61 { + 0..=2 => { + let expected = match position { + Some(p) => { + model.remove(p); + None + } + None if model.len() == max_length as usize => model.pop(), + None => None, + }; + model.insert(0, (key, step)); + assert_eq!(map.insert(key, step), expected); + } + 3 | 4 => { + let expected = position.map(|p| { + let entry = model.remove(p); + model.insert(0, entry); + entry.1 + }); + assert_eq!(map.get(&key).copied(), expected); + } + 5 => assert_eq!(map.remove(&key), position.map(|p| model.remove(p).1)), + 6 => assert_eq!(map.pop_oldest(), model.pop()), + _ => assert_eq!(map.peek(&key).copied(), position.map(|p| model[p].1)), + } + assert_eq!(map.len(), model.len()); + if step % 997 == 0 { + assert_eq!(map.iter().map(|(k, v)| (*k, *v)).collect::>(), model); + } + } + } + } +} diff --git a/crates/net/discv4/Cargo.toml b/crates/net/discv4/Cargo.toml index e5ef81929cb..7da5a9471d6 100644 --- a/crates/net/discv4/Cargo.toml +++ b/crates/net/discv4/Cargo.toml @@ -17,6 +17,7 @@ reth-net-banlist.workspace = true reth-ethereum-forks.workspace = true reth-net-nat.workspace = true reth-network-peers = { workspace = true, features = ["secp256k1"] } +reth-lru.workspace = true # ethereum alloy-primitives = { workspace = true, features = ["rand"] } @@ -30,7 +31,6 @@ tokio = { workspace = true, features = ["io-util", "net", "time"] } tokio-stream.workspace = true # misc -schnellru.workspace = true tracing.workspace = true thiserror.workspace = true parking_lot.workspace = true diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index f34a9806e54..e2811a6c3cb 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -2233,7 +2233,7 @@ struct ReceiveCache { /// Valid packet hashes paired with their canonical source IP. /// /// A replay from another IP must not suppress the genuine packet from the expected source. - unique_packets: schnellru::LruMap<(B256, IpAddr), ()>, + unique_packets: reth_lru::LruMap<(B256, IpAddr), ()>, } impl ReceiveCache { @@ -2273,10 +2273,7 @@ impl ReceiveCache { impl Default for ReceiveCache { fn default() -> Self { - Self { - ip_messages: Default::default(), - unique_packets: schnellru::LruMap::new(schnellru::ByLength::new(32)), - } + Self { ip_messages: Default::default(), unique_packets: reth_lru::LruMap::new(32) } } } diff --git a/crates/net/dns/Cargo.toml b/crates/net/dns/Cargo.toml index f4b789105cc..1bbc736e23d 100644 --- a/crates/net/dns/Cargo.toml +++ b/crates/net/dns/Cargo.toml @@ -16,6 +16,7 @@ workspace = true reth-ethereum-forks.workspace = true reth-network-peers = { workspace = true, features = ["secp256k1"] } reth-tokio-util = { workspace = true, features = ["time"] } +reth-lru.workspace = true # ethereum alloy-primitives.workspace = true @@ -33,7 +34,6 @@ hickory-resolver = { workspace = true, features = ["tokio"] } dashmap = { workspace = true, features = ["inline"] } data-encoding.workspace = true linked_hash_set.workspace = true -schnellru.workspace = true thiserror.workspace = true tracing.workspace = true serde = { workspace = true, optional = true } diff --git a/crates/net/dns/src/lib.rs b/crates/net/dns/src/lib.rs index 805d01af9d3..247e599566e 100644 --- a/crates/net/dns/src/lib.rs +++ b/crates/net/dns/src/lib.rs @@ -23,8 +23,8 @@ pub use config::DnsDiscoveryConfig; use enr::Enr; pub use error::ParseDnsEntryError; use reth_ethereum_forks::{EnrForkIdEntry, ForkId}; +use reth_lru::LruMap; use reth_network_peers::NodeRecord; -use schnellru::{ByLength, LruMap}; use secp256k1::SecretKey; use std::{ collections::{hash_map::Entry, HashMap, HashSet, VecDeque}, @@ -152,7 +152,7 @@ impl DnsDiscoveryService { node_record_listeners: Default::default(), trees: Default::default(), queries, - dns_record_cache: LruMap::new(ByLength::new(dns_record_cache_limit.get())), + dns_record_cache: LruMap::new(dns_record_cache_limit.get()), queued_events: Default::default(), recheck_interval, recheck_tick: recheck_tick(recheck_interval), diff --git a/crates/net/network/Cargo.toml b/crates/net/network/Cargo.toml index 61e82dde1cc..b4dff403a12 100644 --- a/crates/net/network/Cargo.toml +++ b/crates/net/network/Cargo.toml @@ -36,6 +36,7 @@ reth-tokio-util.workspace = true reth-consensus.workspace = true reth-network-peers = { workspace = true, features = ["net"] } reth-network-types = { workspace = true, features = ["serde"] } +reth-lru.workspace = true # ethereum alloy-consensus.workspace = true @@ -74,7 +75,6 @@ rayon.workspace = true rand.workspace = true secp256k1 = { workspace = true, features = ["global-context", "std", "recovery"] } derive_more.workspace = true -schnellru.workspace = true itertools.workspace = true smallvec.workspace = true diff --git a/crates/net/network/src/cache.rs b/crates/net/network/src/cache.rs index 3ad96686d64..c6b1817d876 100644 --- a/crates/net/network/src/cache.rs +++ b/crates/net/network/src/cache.rs @@ -2,12 +2,12 @@ use alloy_primitives::map::DefaultHashBuilder; use core::hash::BuildHasher; -use derive_more::{Deref, DerefMut}; use itertools::Itertools; -use schnellru::{ByLength, Limiter, Unlimited}; use std::{fmt, hash::Hash}; -/// A minimal LRU cache based on a [`LruMap`](schnellru::LruMap) with limited capacity. +pub use reth_lru::LruMap; + +/// A minimal LRU cache based on a [`LruMap`] with limited capacity. /// /// If the length exceeds the set capacity, the oldest element will be removed /// In the limit, for each element inserted the oldest existing element will be removed. @@ -15,8 +15,7 @@ pub struct LruCache where S: BuildHasher, { - limit: u32, - inner: LruMap, + inner: LruMap, } impl LruCache { @@ -29,15 +28,12 @@ impl LruCache { impl LruCache { /// Creates a new [`LruCache`] using the given limit and hash builder. pub const fn with_hasher(limit: u32, hash_builder: S) -> Self { - // limit of lru map is one element more, so can give eviction feedback, which isn't - // supported by LruMap - Self { inner: LruMap::with_hasher(limit + 1, hash_builder), limit } + Self { inner: LruMap::with_hasher(limit, hash_builder) } } /// Insert an element into the set. /// - /// This operation uses `get_or_insert` from the underlying `schnellru::LruMap` which: - /// - Automatically evicts the least recently used item if capacity is exceeded + /// Automatically evicts the least recently used item if capacity is exceeded. /// /// This method is more efficient than [`insert_and_get_evicted`](Self::insert_and_get_evicted) /// as it performs fewer checks. Use this method when you don't need information about @@ -56,18 +52,16 @@ impl LruCache { /// Same as [`insert`](Self::insert) but returns a tuple, where the second index is the evicted /// value, if one was evicted. pub fn insert_and_get_evicted(&mut self, entry: T) -> (bool, Option) { - let new = self.inner.peek(&entry).is_none(); - let evicted = - (new && (self.limit as usize) <= self.inner.len()).then(|| self.remove_lru()).flatten(); - _ = self.inner.get_or_insert(entry, || ()); - - (new, evicted) + if self.inner.get(&entry).is_some() { + return (false, None) + } + (true, self.inner.insert(entry, ()).map(|(evicted, ())| evicted)) } /// Gets the given element, if exists, and promotes to lru. pub fn get(&mut self, entry: &T) -> Option<&T> { - let _ = self.inner.get(entry)?; - self.iter().next() + self.inner.get(entry)?; + self.inner.peek_newest().map(|(key, ())| key) } /// Iterates through entries and returns a reference to the given entry, if exists, without @@ -80,15 +74,6 @@ impl LruCache { self.iter().find(|key| *key == entry) } - /// Remove the least recently used entry and return it. - /// - /// If the `LruCache` is empty or if the eviction feedback is - /// configured, this will return None. - #[inline] - fn remove_lru(&mut self) -> Option { - self.inner.pop_oldest().map(|(k, ())| k) - } - /// Expels the given value. Returns true if the value existed. pub fn remove(&mut self, value: &T) -> bool { self.inner.remove(value).is_some() @@ -96,7 +81,7 @@ impl LruCache { /// Returns `true` if the set contains a value. pub fn contains(&self, value: &T) -> bool { - self.inner.peek(value).is_some() + self.inner.contains(value) } /// Returns an iterator over all cached entries in lru order @@ -105,12 +90,12 @@ impl LruCache { } /// Returns number of elements currently in cache. - pub fn len(&self) -> usize { + pub const fn len(&self) -> usize { self.inner.len() } /// Returns `true` if there are currently no elements in the cache. - pub fn is_empty(&self) -> bool { + pub const fn is_empty(&self) -> bool { self.inner.is_empty() } } @@ -135,7 +120,7 @@ where fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let mut debug_struct = f.debug_struct("LruCache"); - debug_struct.field("limit", &self.limit); + debug_struct.field("limit", &self.inner.max_length()); debug_struct.field( "ret %iter", @@ -146,77 +131,13 @@ where } } -/// Wrapper of [`schnellru::LruMap`] that implements [`fmt::Debug`] and with the common hash -/// builder. -#[derive(Deref, DerefMut, Default)] -pub struct LruMap(schnellru::LruMap) -where - K: Hash + PartialEq, - L: Limiter, - S: BuildHasher; - -impl fmt::Debug for LruMap -where - K: Hash + PartialEq + fmt::Display, - V: fmt::Debug, - L: Limiter + fmt::Debug, - S: BuildHasher, -{ - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut debug_struct = f.debug_struct("LruMap"); - - debug_struct.field("limiter", self.limiter()); - - debug_struct.field( - "ret %iter", - &format_args!( - "Iter: {{{} }}", - self.iter().map(|(k, v)| format!(" {k}: {v:?}")).format(",") - ), - ); - - debug_struct.finish() - } -} - -impl LruMap -where - K: Hash + PartialEq, -{ - /// Returns a new cache with default limiter and hash builder. - pub fn new(max_length: u32) -> Self { - Self::with_hasher(max_length, Default::default()) - } -} - -impl LruMap -where - K: Hash + PartialEq, - S: BuildHasher, -{ - /// Returns a new cache with default limiter and the given hash builder. - pub const fn with_hasher(max_length: u32, hash_builder: S) -> Self { - Self(schnellru::LruMap::with_hasher(ByLength::new(max_length), hash_builder)) - } -} - -impl LruMap -where - K: Hash + PartialEq, -{ - /// Returns a new cache with [`Unlimited`] limiter and default hash builder. - pub fn new_unlimited() -> Self { - Self(schnellru::LruMap::with_hasher(Unlimited, Default::default())) - } -} - #[cfg(test)] mod test { use super::*; - use derive_more::{Constructor, Display}; + use derive_more::Constructor; use std::hash::Hasher; - #[derive(Debug, Hash, PartialEq, Eq, Display, Clone, Copy)] + #[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)] struct Key(i8); #[derive(Debug, Eq, Constructor, Clone, Copy)] @@ -256,7 +177,7 @@ mod test { #[test] fn test_cache_should_remove_oldest_element_when_exceeding_limit() { - let mut cache = LruCache::new(1); // LruCache limit will be 2, check LruCache::new + let mut cache = LruCache::new(1); let old_entry = "old_entry"; let new_entry = "new_entry"; cache.insert(old_entry); @@ -290,10 +211,7 @@ mod test { let value_2 = Value(22); cache.insert(key_2, value_2); - assert_eq!( - "LruMap { limiter: ByLength { max_length: 2 }, ret %iter: Iter: { 2: Value(22), 1: Value(11) } }", - format!("{cache:?}") - ) + assert_eq!("LruMap { len: 2, max_length: 2, .. }", format!("{cache:?}")) } #[test] diff --git a/crates/rpc/rpc-eth-types/Cargo.toml b/crates/rpc/rpc-eth-types/Cargo.toml index 91764efc706..10ffbac70e2 100644 --- a/crates/rpc/rpc-eth-types/Cargo.toml +++ b/crates/rpc/rpc-eth-types/Cargo.toml @@ -27,6 +27,7 @@ reth-rpc-convert.workspace = true reth-tasks.workspace = true reth-transaction-pool.workspace = true reth-trie-common.workspace = true +reth-lru.workspace = true # ethereum alloy-chains.workspace = true @@ -60,7 +61,6 @@ serde = { workspace = true, features = ["derive"] } url = { workspace = true, features = ["serde"] } thiserror.workspace = true derive_more.workspace = true -schnellru.workspace = true rand.workspace = true tracing.workspace = true itertools.workspace = true diff --git a/crates/rpc/rpc-eth-types/src/cache/mod.rs b/crates/rpc/rpc-eth-types/src/cache/mod.rs index 3f96ca71b9d..8b17932ec5e 100644 --- a/crates/rpc/rpc-eth-types/src/cache/mod.rs +++ b/crates/rpc/rpc-eth-types/src/cache/mod.rs @@ -5,7 +5,7 @@ use crate::block::CachedTransaction; use alloy_consensus::transaction::TxHashRef; use alloy_eip7928::{bal::DecodedBal, StorageChange}; use alloy_eips::BlockHashOrNumber; -use alloy_primitives::{Address, Bytes, TxHash, B256, U256}; +use alloy_primitives::{map::FbBuildHasher, Address, Bytes, TxHash, B256, U256}; use evm2::{ bytecode::Bytecode, evm::{ @@ -18,10 +18,10 @@ use futures::{Stream, StreamExt}; use reth_chain_state::CanonStateNotification; use reth_errors::{ProviderError, ProviderResult}; use reth_execution_types::{Chain, DecodedEvmBal}; +use reth_lru::LruMap; use reth_primitives_traits::{Block, BlockBody, InMemorySize, NodePrimitives, RecoveredBlock}; use reth_storage_api::{BalProvider, BlockReader, TransactionVariant}; use reth_tasks::Runtime; -use schnellru::{ByLength, LruMap}; use std::{ cell::LazyCell, collections::VecDeque, @@ -65,12 +65,17 @@ type TransactionHashResponseSender = oneshot::Sender>>; -type BlockLruCache = - MultiConsumerLruCache>, BlockWithSendersResponseSender>; +type BlockLruCache = MultiConsumerLruCache< + B256, + Arc>, + BlockWithSendersResponseSender, + FbBuildHasher<32>, +>; -type ReceiptsLruCache = MultiConsumerLruCache>, ReceiptsResponseSender>; +type ReceiptsLruCache = + MultiConsumerLruCache>, ReceiptsResponseSender, FbBuildHasher<32>>; -type BalLruCache = MultiConsumerLruCache; +type BalLruCache = MultiConsumerLruCache>; /// Provides async access to cached eth data /// @@ -133,7 +138,7 @@ impl EthStateCache { action_task_spawner, rate_limiter: Arc::new(Semaphore::new(max_concurrent_db_requests)), pending_fetches: VecDeque::new(), - tx_hash_index: LruMap::new(ByLength::new(max_cached_tx_hashes)), + tx_hash_index: LruMap::with_hasher(max_cached_tx_hashes, Default::default()), }; let cache = Self { to_service }; (cache, service) @@ -348,7 +353,7 @@ where /// cache misses that are waiting for a slot from occupying Tokio blocking threads. pending_fetches: VecDeque, /// LRU index mapping transaction hashes to their block hash and index within the block. - tx_hash_index: LruMap, + tx_hash_index: LruMap>, } impl EthStateCacheService diff --git a/crates/rpc/rpc-eth-types/src/cache/multi_consumer.rs b/crates/rpc/rpc-eth-types/src/cache/multi_consumer.rs index d9013a94dc7..88dc5420eb2 100644 --- a/crates/rpc/rpc-eth-types/src/cache/multi_consumer.rs +++ b/crates/rpc/rpc-eth-types/src/cache/multi_consumer.rs @@ -2,20 +2,23 @@ //! a cache miss. use super::metrics::CacheMetrics; +use alloy_primitives::map::DefaultHashBuilder; +use reth_lru::LruMap; use reth_primitives_traits::InMemorySize; -use schnellru::{ByLength, LruMap}; use std::{ collections::{hash_map::Entry, HashMap}, fmt::{self, Debug, Formatter}, - hash::Hash, + hash::{BuildHasher, Hash}, time::Duration, }; use tokio::time::Instant; /// A multi-consumer LRU cache bounded by entry count and estimated payload size. -pub struct MultiConsumerLruCache { +/// +/// `H` hashes the keys of the cached values. +pub struct MultiConsumerLruCache { /// The LRU cache. - cache: LruMap>, + cache: LruMap, H>, /// All queued consumers. queued: HashMap>, /// Cache metrics. @@ -28,7 +31,7 @@ pub struct MultiConsumerLruCache { metrics_dirty: bool, } -impl Debug for MultiConsumerLruCache { +impl Debug for MultiConsumerLruCache { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_struct("MultiConsumerLruCache") .field("cache_length", &self.cache.len()) @@ -39,13 +42,16 @@ impl Debug for MultiConsumerLruCache { } } -impl MultiConsumerLruCache { +impl MultiConsumerLruCache { /// Creates an empty cache with entry and payload byte limits and a metric label. /// /// Setting either limit to zero disables caching, but consumers can still queue requests. - pub fn new(max_len: u32, max_bytes: usize, cache_id: &str) -> Self { + pub fn new(max_len: u32, max_bytes: usize, cache_id: &str) -> Self + where + H: Default, + { Self { - cache: LruMap::new(ByLength::new(max_len)), + cache: LruMap::with_hasher(max_len, H::default()), queued: Default::default(), metrics: CacheMetrics::new_with_labels(&[("cache", cache_id.to_string())]), memory_usage: 0, @@ -125,7 +131,7 @@ impl MultiConsumerLruCache { where V: InMemorySize, { - if self.cache.limiter().max_length() == 0 || self.max_bytes == 0 { + if self.cache.max_length() == 0 || self.max_bytes == 0 { return false } let size = value.size(); @@ -138,24 +144,18 @@ impl MultiConsumerLruCache { self.memory_usage -= previous.size; self.metrics_dirty = true; } - while self.cache.len() >= self.cache.limiter().max_length() as usize || + while self.cache.len() >= self.cache.max_length() as usize || self.memory_usage > self.max_bytes - size { self.pop_oldest(); } - let previous_len = self.cache.len(); - let inserted = self.cache.insert(key, CachedValue { value, size, last_access: now }); - if inserted { - self.memory_usage += size; - self.metrics_dirty = true; - } - if self.cache.len() != previous_len + usize::from(inserted) { - // A failed allocation can make the LRU evict internally while trying to insert. - self.memory_usage = self.cache.iter().map(|(_, entry)| entry.size).sum(); - self.metrics_dirty = true; - } - inserted + // The loop above made room, so this never evicts. + let evicted = self.cache.insert(key, CachedValue { value, size, last_access: now }); + debug_assert!(evicted.is_none()); + self.memory_usage += size; + self.metrics_dirty = true; + true } /// Shrinks the capacity of the queue with a lower limit. @@ -288,7 +288,7 @@ mod tests { #[tokio::test(start_paused = true)] async fn idle_eviction_preserves_hits_and_queued_consumers() { - let mut cache = MultiConsumerLruCache::new(3, 10, "test"); + let mut cache = MultiConsumerLruCache::<_, _, _>::new(3, 10, "test"); let timeout = Duration::from_secs(10); for key in 0..3 { assert!(cache.insert(key, Weighted(3))); @@ -369,7 +369,7 @@ mod tests { #[test] fn idle_eviction_is_bounded_and_preserves_renewed_entries() { - let mut cache = MultiConsumerLruCache::new(12, 36, "test"); + let mut cache = MultiConsumerLruCache::<_, _, _>::new(12, 36, "test"); let start = Instant::now(); let timeout = Duration::from_secs(10); for key in 0..12 { diff --git a/crates/rpc/rpc-eth-types/src/gas_oracle.rs b/crates/rpc/rpc-eth-types/src/gas_oracle.rs index d67e1ede06a..ed79ed7a6f9 100644 --- a/crates/rpc/rpc-eth-types/src/gas_oracle.rs +++ b/crates/rpc/rpc-eth-types/src/gas_oracle.rs @@ -4,10 +4,11 @@ use super::{EthApiError, EthResult, EthStateCache, RpcInvalidTransactionError}; use alloy_consensus::{constants::GWEI_TO_WEI, BlockHeader, Transaction, TxReceipt}; use alloy_eips::BlockNumberOrTag; -use alloy_primitives::{B256, U256}; +use alloy_primitives::{map::FbBuildHasher, B256, U256}; use alloy_rpc_types_eth::BlockId; use derive_more::{Deref, DerefMut, From, Into}; use itertools::Itertools; +use reth_lru::LruMap; use reth_rpc_server_types::{ constants, constants::gas_oracle::{ @@ -16,7 +17,6 @@ use reth_rpc_server_types::{ }, }; use reth_storage_api::{BlockReaderIdExt, NodePrimitivesProvider}; -use schnellru::{ByLength, LruMap}; use serde::{Deserialize, Serialize}; use std::fmt::{self, Debug, Formatter}; use tokio::sync::Mutex; @@ -118,9 +118,10 @@ where .default_suggested_fee .unwrap_or_else(|| GasPriceOracleResult::default().price), }, - lowest_effective_tip_cache: EffectiveTipLruCache(LruMap::new(ByLength::new( + lowest_effective_tip_cache: EffectiveTipLruCache(LruMap::with_hasher( cached_values, - ))), + Default::default(), + )), }); Self { provider, oracle_config, cache, ignore_price, inner } @@ -392,7 +393,7 @@ struct GasPriceOracleInner { /// Wrapper struct for `LruMap` #[derive(Deref, DerefMut)] -pub struct EffectiveTipLruCache(LruMap), ByLength>); +pub struct EffectiveTipLruCache(LruMap), FbBuildHasher<32>>); impl Debug for EffectiveTipLruCache { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { diff --git a/crates/transaction-pool/Cargo.toml b/crates/transaction-pool/Cargo.toml index 365a4fb8fe7..12a2782a2a0 100644 --- a/crates/transaction-pool/Cargo.toml +++ b/crates/transaction-pool/Cargo.toml @@ -24,6 +24,7 @@ reth-execution-types.workspace = true reth-fs-util.workspace = true reth-storage-api.workspace = true reth-tasks.workspace = true +reth-lru.workspace = true # ethereum alloy-eips = { workspace = true, features = ["kzg"] } @@ -47,7 +48,6 @@ aquamarine.workspace = true thiserror.workspace = true tracing.workspace = true rustc-hash.workspace = true -schnellru.workspace = true serde = { workspace = true, features = ["derive", "rc"] } serde_json.workspace = true bitflags.workspace = true diff --git a/crates/transaction-pool/src/blobstore/disk.rs b/crates/transaction-pool/src/blobstore/disk.rs index 01d1d9085cd..9ab58426f84 100644 --- a/crates/transaction-pool/src/blobstore/disk.rs +++ b/crates/transaction-pool/src/blobstore/disk.rs @@ -9,9 +9,12 @@ use alloy_eips::{ eip7840::BlobParams, merge::EPOCH_SLOTS, }; -use alloy_primitives::{map::B256Set, TxHash, B256}; +use alloy_primitives::{ + map::{B256Set, FbBuildHasher}, + TxHash, B256, +}; use parking_lot::{Mutex, RwLock}; -use schnellru::{ByLength, LruMap}; +use reth_lru::LruMap; use std::{fmt, fs, io, path::PathBuf, sync::Arc}; use tracing::{debug, trace}; @@ -454,7 +457,7 @@ impl BlobStore for DiskFileBlobStore { struct DiskFileBlobStoreInner { blob_dir: PathBuf, - blob_cache: Mutex, ByLength>>, + blob_cache: Mutex, FbBuildHasher<32>>>, size_tracker: BlobStoreSize, file_lock: RwLock<()>, txs_to_delete: RwLock, @@ -462,7 +465,7 @@ struct DiskFileBlobStoreInner { /// /// Note: It is possible that one blob can appear in multiple transactions but this only tracks /// the most recent one. - versioned_hashes_to_txhash: Mutex>, + versioned_hashes_to_txhash: Mutex>>, } impl DiskFileBlobStoreInner { @@ -470,13 +473,14 @@ impl DiskFileBlobStoreInner { fn new(blob_dir: PathBuf, max_length: u32) -> Self { Self { blob_dir, - blob_cache: Mutex::new(LruMap::new(ByLength::new(max_length))), + blob_cache: Mutex::new(LruMap::with_hasher(max_length, Default::default())), size_tracker: Default::default(), file_lock: Default::default(), txs_to_delete: Default::default(), - versioned_hashes_to_txhash: Mutex::new(LruMap::new(ByLength::new( + versioned_hashes_to_txhash: Mutex::new(LruMap::with_hasher( VERSIONED_HASH_TO_TX_HASH_CACHE_SIZE as u32, - ))), + Default::default(), + )), } } From b5f0cb13c874db8ebc46b34c87c8fbaedce25c92 Mon Sep 17 00:00:00 2001 From: onbjerg Date: Mon, 9 Nov 2026 14:51:57 +0000 Subject: [PATCH 053/100] fix(node): use configured JIT settings when enabled at runtime (#28374) --- crates/ethereum/node/src/node.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ethereum/node/src/node.rs b/crates/ethereum/node/src/node.rs index 2850351295f..3be85d912c8 100644 --- a/crates/ethereum/node/src/node.rs +++ b/crates/ethereum/node/src/node.rs @@ -535,7 +535,12 @@ pub fn build_evm_config( dump_dir: Option, ) -> eyre::Result<(EthEvmConfig, Option>)> { if !jit.enabled { - let factory = RethEvmFactory::disabled(); + // Keep the configured mode and tuning so `reth_jit enable` starts the backend with them. + // Blocking mode would start the backend immediately, so it only applies with `--jit`. + let config = RuntimeConfig { blocking: false, ..jit_runtime_config(jit) }; + #[cfg(not(unix))] + let config = RuntimeConfig { jit_mode: JitMode::InProcess, ..config }; + let factory = RethEvmFactory::new(JitBackend::new(config)?); return Ok((EthEvmConfig::new_with_evm_factory(chain_spec, factory), None)); } From f4b546c3e755cc9a6a679eb2e1e5fe11a52dbc8a Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Mon, 9 Nov 2026 15:01:11 +0000 Subject: [PATCH 054/100] chore(engine): remove state root task trie updates comparison (#28377) --- crates/engine/primitives/src/config.rs | 22 -- crates/engine/tree/Cargo.toml | 1 - crates/engine/tree/src/tree/mod.rs | 1 - .../tree/src/tree/state_root_strategy/mod.rs | 97 +----- crates/engine/tree/src/tree/trie_updates.rs | 287 ------------------ crates/node/core/src/args/engine.rs | 18 -- docs/vocs/docs/pages/cli/reth/node.mdx | 3 - 7 files changed, 5 insertions(+), 424 deletions(-) delete mode 100644 crates/engine/tree/src/tree/trie_updates.rs diff --git a/crates/engine/primitives/src/config.rs b/crates/engine/primitives/src/config.rs index 6a20055b73c..d3c362a6f32 100644 --- a/crates/engine/primitives/src/config.rs +++ b/crates/engine/primitives/src/config.rs @@ -147,9 +147,6 @@ pub struct TreeConfig { /// This is used as a cutoff to prevent long-running sequential block execution when we receive /// a batch of downloaded blocks. max_execute_block_batch_size: usize, - /// Whether to always compare trie updates from the state root task to the trie updates from - /// the regular state root calculation. - always_compare_trie_updates: bool, /// Whether to disable state cache. disable_state_cache: bool, /// Whether to disable parallel prewarming. @@ -263,7 +260,6 @@ impl Default for TreeConfig { max_invalid_header_cache_length: DEFAULT_MAX_INVALID_HEADER_CACHE_LENGTH, invalid_header_hit_eviction_threshold: DEFAULT_INVALID_HEADER_HIT_EVICTION_THRESHOLD, max_execute_block_batch_size: DEFAULT_MAX_EXECUTE_BLOCK_BATCH_SIZE, - always_compare_trie_updates: false, disable_state_cache: false, disable_prewarming: false, txpool_prewarming: false, @@ -314,7 +310,6 @@ impl TreeConfig { max_invalid_header_cache_length: u32, invalid_header_hit_eviction_threshold: u8, max_execute_block_batch_size: usize, - always_compare_trie_updates: bool, disable_state_cache: bool, disable_prewarming: bool, state_provider_metrics: bool, @@ -355,7 +350,6 @@ impl TreeConfig { max_invalid_header_cache_length, invalid_header_hit_eviction_threshold, max_execute_block_batch_size, - always_compare_trie_updates, disable_state_cache, disable_prewarming, txpool_prewarming: false, @@ -469,12 +463,6 @@ impl TreeConfig { self.txpool_prewarming } - /// Returns whether to always compare trie updates from the state root task to the trie updates - /// from the regular state root calculation. - pub const fn always_compare_trie_updates(&self) -> bool { - self.always_compare_trie_updates - } - /// Returns the cross-block cache size. pub const fn cross_block_cache_size(&self) -> usize { self.cross_block_cache_size @@ -634,16 +622,6 @@ impl TreeConfig { self } - /// Setter for whether to always compare trie updates from the state root task to the trie - /// updates from the regular state root calculation. - pub const fn with_always_compare_trie_updates( - mut self, - always_compare_trie_updates: bool, - ) -> Self { - self.always_compare_trie_updates = always_compare_trie_updates; - self - } - /// Setter for cross block cache size. pub const fn with_cross_block_cache_size(mut self, cross_block_cache_size: usize) -> Self { self.cross_block_cache_size = cross_block_cache_size; diff --git a/crates/engine/tree/Cargo.toml b/crates/engine/tree/Cargo.toml index 5f5eafaebd7..5f257534642 100644 --- a/crates/engine/tree/Cargo.toml +++ b/crates/engine/tree/Cargo.toml @@ -16,7 +16,6 @@ evm2.workspace = true reth-chain-state.workspace = true reth-chainspec = { workspace = true, optional = true } reth-consensus.workspace = true -reth-db.workspace = true reth-engine-primitives = { workspace = true, features = ["std"] } reth-execution-cache.workspace = true reth-errors.workspace = true diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index 1070b17d7ed..750b4962c43 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -69,7 +69,6 @@ mod persistence_state; pub mod state_root_strategy; #[cfg(test)] mod tests; -mod trie_updates; mod txpool_prewarm; pub mod types; diff --git a/crates/engine/tree/src/tree/state_root_strategy/mod.rs b/crates/engine/tree/src/tree/state_root_strategy/mod.rs index fff3d90ac90..15db386c7fc 100644 --- a/crates/engine/tree/src/tree/state_root_strategy/mod.rs +++ b/crates/engine/tree/src/tree/state_root_strategy/mod.rs @@ -965,7 +965,6 @@ where state_provider_factory, executor: executor.clone(), timeout: config.state_root_task_timeout(), - compare_trie_updates: config.always_compare_trie_updates(), metrics: BlockValidationMetrics::default(), }), hashed_state_rx, @@ -1079,7 +1078,6 @@ struct SparseTrieStateRootJob { state_provider_factory: OverlayStateProviderFactory, executor: reth_tasks::Runtime, timeout: Option, - compare_trie_updates: bool, metrics: BlockValidationMetrics, } @@ -1141,7 +1139,7 @@ where output: &BlockExecutionOutput, outcome: StateRootComputeOutcome, ) -> ProviderResult { - let outcome = self.sparse_outcome(output, outcome); + let outcome = StateRootJobOutcome::new(outcome.state_root, outcome.trie_updates); if outcome.state_root == block.header().state_root() { publish_sparse_trie( &self.pending_trie_rx, @@ -1159,25 +1157,6 @@ where ); self.compute_serial(output) } - - fn sparse_outcome( - &self, - output: &BlockExecutionOutput, - outcome: StateRootComputeOutcome, - ) -> StateRootJobOutcome { - let StateRootComputeOutcome { state_root, trie_updates, hashed_state: _hashed_state } = - outcome; - - if self.compare_trie_updates { - compare_trie_updates_with_serial( - self.state_provider_factory.clone(), - output, - trie_updates.as_ref().clone(), - ); - } - - StateRootJobOutcome::new(state_root, trie_updates) - } } impl StateRootJob for SparseTrieStateRootJob @@ -1218,22 +1197,22 @@ where Ok(Ok(outcome)) => return self.verified_sparse_outcome(block, &output, outcome), Ok(Err(err)) => { debug!(target: "engine::tree::state_root_strategy", %err, "State root task failed, falling back to serial root"); - self.serial_fallback(output.clone())? + self.serial_fallback(output)? } Err(RecvTimeoutError::Timeout) => { warn!(target: "engine::tree::state_root_strategy", ?timeout, "State root task timed out, racing serial fallback"); self.metrics.state_root_task_timeout_total.increment(1); - self.serial_fallback(output.clone())? + self.serial_fallback(output)? } Err(RecvTimeoutError::Disconnected) => { debug!(target: "engine::tree::state_root_strategy", "State root task dropped, falling back to serial root"); - self.serial_fallback(output.clone())? + self.serial_fallback(output)? } }; loop { if let Ok(Ok(outcome)) = task_rx.try_recv() { - let outcome = self.sparse_outcome(&output, outcome); + let outcome = StateRootJobOutcome::new(outcome.state_root, outcome.trie_updates); if outcome.state_root == block.header().state_root() { publish_sparse_trie( &self.pending_trie_rx, @@ -1272,71 +1251,6 @@ where } } -fn compare_trie_updates_with_serial( - state_provider_factory: OverlayStateProviderFactory, - output: &BlockExecutionOutput, - task_trie_updates: TrieUpdates, -) -> bool -where - N: NodePrimitives, - P: DatabaseProviderFactory, - P::Provider: BlockNumReader - + PruneCheckpointReader - + StageCheckpointReader - + ChangeSetReader - + StorageChangeSetReader - + StorageSettingsCache - + 'static, -{ - debug!(target: "engine::tree::state_root_strategy", "Comparing trie updates with serial computation"); - - match state_provider_factory.database_provider_ro().and_then(|provider| { - let hashed_state = provider.hashed_post_state(&output.state)?; - provider.state_root_with_updates(hashed_state) - }) { - Ok((serial_root, serial_trie_updates)) => { - debug!( - target: "engine::tree::state_root_strategy", - ?serial_root, - "Serial state root computation finished for comparison" - ); - - match state_provider_factory.database_provider_ro() { - Ok(provider) => match super::trie_updates::compare_trie_updates( - &provider, - task_trie_updates, - serial_trie_updates, - ) { - Ok(has_diff) => return has_diff, - Err(err) => { - warn!( - target: "engine::tree::state_root_strategy", - %err, - "Error comparing trie updates" - ); - return true; - } - }, - Err(err) => { - warn!( - target: "engine::tree::state_root_strategy", - %err, - "Failed to get database provider for trie update comparison" - ); - } - } - } - Err(err) => { - warn!( - target: "engine::tree::state_root_strategy", - %err, - "Failed to compute serial state root for comparison" - ); - } - } - false -} - #[cfg(test)] mod tests { use super::*; @@ -1463,7 +1377,6 @@ mod tests { ), executor: runtime.clone(), timeout, - compare_trie_updates: false, metrics: Default::default(), }; assert!(overlay_manager.take_sparse_trie().is_none()); diff --git a/crates/engine/tree/src/tree/trie_updates.rs b/crates/engine/tree/src/tree/trie_updates.rs deleted file mode 100644 index 87a1081f2ba..00000000000 --- a/crates/engine/tree/src/tree/trie_updates.rs +++ /dev/null @@ -1,287 +0,0 @@ -use alloy_primitives::{ - map::{B256Map, HashMap}, - B256, -}; -use reth_db::DatabaseError; -use reth_trie::{ - trie_cursor::{TrieCursor, TrieCursorFactory}, - updates::{StorageTrieUpdates, TrieUpdates}, - BranchNodeCompact, Nibbles, -}; -use std::collections::BTreeSet; -use tracing::warn; - -#[derive(Debug)] -struct EntryDiff { - task: T, - regular: T, - database: T, -} - -#[derive(Debug, Default)] -struct TrieUpdatesDiff { - account_nodes: HashMap>>, - removed_nodes: HashMap>, - storage_tries: B256Map, -} - -impl TrieUpdatesDiff { - fn has_differences(&self) -> bool { - !self.account_nodes.is_empty() || - !self.removed_nodes.is_empty() || - !self.storage_tries.is_empty() - } - - pub(super) fn log_differences(mut self) { - if self.has_differences() { - for (path, EntryDiff { task, regular, database }) in &mut self.account_nodes { - warn!(target: "engine::tree", ?path, ?task, ?regular, ?database, "Difference in account trie updates"); - } - - for ( - path, - EntryDiff { - task: task_removed, - regular: regular_removed, - database: database_not_exists, - }, - ) in &self.removed_nodes - { - warn!(target: "engine::tree", ?path, ?task_removed, ?regular_removed, ?database_not_exists, "Difference in removed account trie nodes"); - } - - for (address, storage_diff) in self.storage_tries { - storage_diff.log_differences(address); - } - } - } -} - -#[derive(Debug, Default)] -struct StorageTrieUpdatesDiff { - storage_nodes: HashMap>>, - removed_nodes: HashMap>, -} - -impl StorageTrieUpdatesDiff { - fn has_differences(&self) -> bool { - !self.storage_nodes.is_empty() || !self.removed_nodes.is_empty() - } - - fn log_differences(&self, address: B256) { - for (path, EntryDiff { task, regular, database }) in &self.storage_nodes { - warn!(target: "engine::tree", ?address, ?path, ?task, ?regular, ?database, "Difference in storage trie updates"); - } - - for ( - path, - EntryDiff { - task: task_removed, - regular: regular_removed, - database: database_not_exists, - }, - ) in &self.removed_nodes - { - warn!(target: "engine::tree", ?address, ?path, ?task_removed, ?regular_removed, ?database_not_exists, "Difference in removed storage trie nodes"); - } - } -} - -/// Compares the trie updates from state root task, regular state root calculation and database, -/// and logs the differences if there's any. -/// -/// Returns `true` if there are differences. -pub(crate) fn compare_trie_updates( - trie_cursor_factory: impl TrieCursorFactory, - task: TrieUpdates, - regular: TrieUpdates, -) -> Result { - let mut task = adjust_trie_updates(task); - let mut regular = adjust_trie_updates(regular); - - let mut diff = TrieUpdatesDiff::default(); - - // compare account nodes - let mut account_trie_cursor = trie_cursor_factory.account_trie_cursor()?; - for key in task - .account_nodes - .keys() - .chain(regular.account_nodes.keys()) - .copied() - .collect::>() - { - let (task, regular) = (task.account_nodes.remove(&key), regular.account_nodes.remove(&key)); - let database = account_trie_cursor.seek_exact(key)?.map(|x| x.1); - - if !branch_nodes_equal(task.as_ref(), regular.as_ref(), database.as_ref())? { - diff.account_nodes.insert(key, EntryDiff { task, regular, database }); - } - } - - // compare removed nodes - let mut account_trie_cursor = trie_cursor_factory.account_trie_cursor()?; - for key in task - .removed_nodes - .iter() - .chain(regular.removed_nodes.iter()) - .copied() - .collect::>() - { - let (task_removed, regular_removed) = - (task.removed_nodes.contains(&key), regular.removed_nodes.contains(&key)); - let database_not_exists = account_trie_cursor.seek_exact(key)?.is_none(); - // If the deletion is a no-op, meaning that the entry is not in the - // database, do not add it to the diff. - if task_removed != regular_removed && !database_not_exists { - diff.removed_nodes.insert( - key, - EntryDiff { - task: task_removed, - regular: regular_removed, - database: database_not_exists, - }, - ); - } - } - - // compare storage tries - for key in task - .storage_tries - .keys() - .chain(regular.storage_tries.keys()) - .copied() - .collect::>() - { - let (mut task, mut regular) = - (task.storage_tries.remove(&key), regular.storage_tries.remove(&key)); - if task != regular { - #[expect(clippy::or_fun_call)] - let storage_diff = compare_storage_trie_updates( - || trie_cursor_factory.storage_trie_cursor(key), - // Compare non-existent storage tries as empty. - task.as_mut().unwrap_or(&mut Default::default()), - regular.as_mut().unwrap_or(&mut Default::default()), - )?; - if storage_diff.has_differences() { - diff.storage_tries.insert(key, storage_diff); - } - } - } - - // log differences - let has_differences = diff.has_differences(); - diff.log_differences(); - - Ok(has_differences) -} - -fn compare_storage_trie_updates( - trie_cursor: impl Fn() -> Result, - task: &mut StorageTrieUpdates, - regular: &mut StorageTrieUpdates, -) -> Result { - let mut diff = StorageTrieUpdatesDiff::default(); - - // compare storage nodes - let mut storage_trie_cursor = trie_cursor()?; - for key in task - .storage_nodes - .keys() - .chain(regular.storage_nodes.keys()) - .copied() - .collect::>() - { - let (task, regular) = (task.storage_nodes.remove(&key), regular.storage_nodes.remove(&key)); - let database = storage_trie_cursor.seek_exact(key)?.map(|x| x.1); - if !branch_nodes_equal(task.as_ref(), regular.as_ref(), database.as_ref())? { - diff.storage_nodes.insert(key, EntryDiff { task, regular, database }); - } - } - - // compare removed nodes - let mut storage_trie_cursor = trie_cursor()?; - for key in - task.removed_nodes.iter().chain(regular.removed_nodes.iter()).collect::>() - { - let (task_removed, regular_removed) = - (task.removed_nodes.contains(key), regular.removed_nodes.contains(key)); - if task_removed == regular_removed { - continue; - } - let database_not_exists = storage_trie_cursor.seek_exact(*key)?.map(|x| x.1).is_none(); - // If the deletion is a no-op, meaning that the entry is not in the - // database, do not add it to the diff. - if !database_not_exists { - diff.removed_nodes.insert( - *key, - EntryDiff { - task: task_removed, - regular: regular_removed, - database: database_not_exists, - }, - ); - } - } - - Ok(diff) -} - -/// Filters the removed nodes of both account trie updates and storage trie updates, so that they -/// don't include those nodes that were also updated. -fn adjust_trie_updates(trie_updates: TrieUpdates) -> TrieUpdates { - TrieUpdates { - removed_nodes: trie_updates - .removed_nodes - .into_iter() - .filter(|key| !trie_updates.account_nodes.contains_key(key)) - .collect(), - storage_tries: trie_updates - .storage_tries - .into_iter() - .map(|(address, updates)| { - ( - address, - StorageTrieUpdates { - removed_nodes: updates - .removed_nodes - .into_iter() - .filter(|key| !updates.storage_nodes.contains_key(key)) - .collect(), - ..updates - }, - ) - }) - .collect(), - ..trie_updates - } -} - -/// Compares the branch nodes from state root task and regular state root calculation. -/// -/// If one of the branch nodes is [`None`], it means it's not updated and the other is compared to -/// the branch node from the database. -/// -/// Returns `true` if they are equal. -fn branch_nodes_equal( - task: Option<&BranchNodeCompact>, - regular: Option<&BranchNodeCompact>, - database: Option<&BranchNodeCompact>, -) -> Result { - Ok(match (task, regular) { - (Some(task), Some(regular)) => { - task.state_mask == regular.state_mask && - task.tree_mask == regular.tree_mask && - task.hash_mask == regular.hash_mask && - task.hashes == regular.hashes && - task.root_hash == regular.root_hash - } - (None, None) => true, - _ => { - if task.is_some() { - task == database - } else { - regular == database - } - } - }) -} diff --git a/crates/node/core/src/args/engine.rs b/crates/node/core/src/args/engine.rs index 6cb41b8c263..dd1ca9e6148 100644 --- a/crates/node/core/src/args/engine.rs +++ b/crates/node/core/src/args/engine.rs @@ -38,7 +38,6 @@ pub struct DefaultEngineValues { sender_recovery_cache_enabled: bool, state_provider_metrics: bool, cross_block_cache_size: usize, - state_root_task_compare_updates: bool, accept_execution_requests_hash: bool, multiproof_chunk_size: usize, reserved_cpu_cores: usize, @@ -143,12 +142,6 @@ impl DefaultEngineValues { self } - /// Set whether to compare state root task updates by default - pub const fn with_state_root_task_compare_updates(mut self, v: bool) -> Self { - self.state_root_task_compare_updates = v; - self - } - /// Set whether to accept execution requests hash by default pub const fn with_accept_execution_requests_hash(mut self, v: bool) -> Self { self.accept_execution_requests_hash = v; @@ -282,7 +275,6 @@ impl Default for DefaultEngineValues { sender_recovery_cache_enabled: true, state_provider_metrics: false, cross_block_cache_size: DEFAULT_CROSS_BLOCK_CACHE_SIZE_MB, - state_root_task_compare_updates: false, accept_execution_requests_hash: false, multiproof_chunk_size: DEFAULT_MULTIPROOF_TASK_CHUNK_SIZE, reserved_cpu_cores: DEFAULT_RESERVED_CPU_CORES, @@ -415,11 +407,6 @@ pub struct EngineArgs { #[arg(long = "engine.cross-block-cache-size", default_value_t = DefaultEngineValues::get_global().cross_block_cache_size)] pub cross_block_cache_size: usize, - /// Enable comparing trie updates from the state root task to the trie updates from the regular - /// state root calculation. - #[arg(long = "engine.state-root-task-compare-updates", default_value_t = DefaultEngineValues::get_global().state_root_task_compare_updates)] - pub state_root_task_compare_updates: bool, - /// Enables accepting requests hash instead of an array of requests in `engine_newPayloadV4`. #[arg(long = "engine.accept-execution-requests-hash", default_value_t = DefaultEngineValues::get_global().accept_execution_requests_hash)] pub accept_execution_requests_hash: bool, @@ -607,7 +594,6 @@ impl Default for EngineArgs { sender_recovery_cache_enabled, state_provider_metrics, cross_block_cache_size, - state_root_task_compare_updates, accept_execution_requests_hash, multiproof_chunk_size, reserved_cpu_cores, @@ -635,7 +621,6 @@ impl Default for EngineArgs { memory_block_buffer_target: None, backfill_run_threshold, invalid_header_hit_eviction_threshold, - state_root_task_compare_updates, state_cache_disabled, prewarming_disabled, txpool_prewarming_enabled, @@ -751,7 +736,6 @@ impl EngineArgs { .without_prewarming(self.prewarming_disabled) .with_txpool_prewarming(self.txpool_prewarming_enabled) .with_state_provider_metrics(self.state_provider_metrics) - .with_always_compare_trie_updates(self.state_root_task_compare_updates) .with_cross_block_cache_size(self.cross_block_cache_size * 1024 * 1024) .with_multiproof_chunk_size(self.multiproof_chunk_size) .with_reserved_cpu_cores(self.reserved_cpu_cores) @@ -966,7 +950,6 @@ mod tests { sender_recovery_cache_enabled: true, state_provider_metrics: true, cross_block_cache_size: 256, - state_root_task_compare_updates: true, accept_execution_requests_hash: true, multiproof_chunk_size: 512, reserved_cpu_cores: 4, @@ -1011,7 +994,6 @@ mod tests { "--engine.state-provider-metrics", "--engine.cross-block-cache-size", "256", - "--engine.state-root-task-compare-updates", "--engine.accept-execution-requests-hash", "--engine.multiproof-chunk-size", "512", diff --git a/docs/vocs/docs/pages/cli/reth/node.mdx b/docs/vocs/docs/pages/cli/reth/node.mdx index 6de64598e91..c5dcf69f2cc 100644 --- a/docs/vocs/docs/pages/cli/reth/node.mdx +++ b/docs/vocs/docs/pages/cli/reth/node.mdx @@ -1105,9 +1105,6 @@ Engine: [default: 4096] - --engine.state-root-task-compare-updates - Enable comparing trie updates from the state root task to the trie updates from the regular state root calculation - --engine.accept-execution-requests-hash Enables accepting requests hash instead of an array of requests in `engine_newPayloadV4` From a6796242c537e117a05fef2789146c189b6e94c6 Mon Sep 17 00:00:00 2001 From: onbjerg Date: Mon, 9 Nov 2026 15:05:27 +0000 Subject: [PATCH 055/100] fix(rpc): skip blob txs in testing_buildBlockV1 (#28379) Co-authored-by: Matthias Seitz --- crates/rpc/rpc/src/testing.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/rpc/rpc/src/testing.rs b/crates/rpc/rpc/src/testing.rs index 8fffda57ddb..84d94b29f8e 100644 --- a/crates/rpc/rpc/src/testing.rs +++ b/crates/rpc/rpc/src/testing.rs @@ -191,6 +191,9 @@ where ), ); best_txs.no_updates(); + // Blob sidecars aren't attached to the response, so including blob + // transactions would return a payload whose blobs bundle lacks their data. + best_txs.skip_blobs(); best_txs.map(|tx| tx.to_consensus()).collect() } else { // Decode and recover all transactions in parallel From 22e9553da45bf70e45ad73b7467a699fb778c7af Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 15:27:11 +0000 Subject: [PATCH 056/100] fix(txpool): skip local senders when selecting pending eviction candidates (#28352) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/transaction-pool/src/pool/pending.rs | 115 ++++++++++++-------- 1 file changed, 69 insertions(+), 46 deletions(-) diff --git a/crates/transaction-pool/src/pool/pending.rs b/crates/transaction-pool/src/pool/pending.rs index 59be47f7c82..ecc93c8b0c2 100644 --- a/crates/transaction-pool/src/pool/pending.rs +++ b/crates/transaction-pool/src/pool/pending.rs @@ -9,7 +9,7 @@ use crate::{ Priority, SubPoolLimit, TransactionOrdering, ValidPoolTransaction, }; use imbl::OrdMap; -use rustc_hash::{FxHashMap, FxHashSet}; +use rustc_hash::FxHashMap; use std::{cmp::Ordering, collections::hash_map::Entry, ops::Bound::Unbounded, sync::Arc}; use tokio::sync::broadcast; @@ -423,23 +423,6 @@ impl PendingPool { remove_locals: bool, end_removed: &mut Vec>>, ) { - // This serves as a termination condition for the loop - it represents the number of - // _valid_ unique senders that might have descendants in the pool. - // - // If `remove_locals` is false, a value of zero means that there are no non-local txs in the - // pool that can be removed. - // - // If `remove_locals` is true, a value of zero means that there are no txs in the pool that - // can be removed. - let mut non_local_senders = self.highest_nonces.len(); - - // keeps track of unique senders from previous iterations, to understand how many unique - // senders were removed in the last iteration - let mut unique_senders = self.highest_nonces.len(); - - // keeps track of which senders we've marked as local - let mut local_senders = FxHashSet::default(); - // keep track of transactions to remove and how many have been removed so far let original_length = self.len(); let mut removed = Vec::new(); @@ -450,32 +433,33 @@ impl PendingPool { let mut total_size = 0; loop { - // check how many unique senders were removed last iteration - let unique_removed = unique_senders - self.highest_nonces.len(); - - // the new number of unique senders - unique_senders = self.highest_nonces.len(); - non_local_senders -= unique_removed; - // we can reuse the temp array removed.clear(); // we prefer removing transactions with lower ordering - let mut worst_transactions = self.highest_nonces.values().collect::>(); + let mut worst_transactions = self + .highest_nonces + .values() + .filter(|tx| remove_locals || !tx.transaction.is_local()) + .collect::>(); + + // no eligible transactions left to remove + if worst_transactions.is_empty() { + return + } // Each pass removes at most one transaction per sender (its highest nonce), so only // the worst few senders can be relevant in this pass. Selecting them is O(n) - // instead of sorting all senders. The estimate may fall short for size-based limits - // or skipped local senders, in which case the outer loop runs another pass. + // instead of sorting all senders. The estimate may fall short for size-based limits, in + // which case the outer loop runs another pass. let current_len = original_length - total_removed; let current_size = original_size - total_size; let excess_txs = current_len.saturating_sub(limit.max_txs); let avg_tx_size = (current_size / current_len.max(1)).max(1); let excess_size_txs = current_size.saturating_sub(limit.max_size).div_ceil(avg_tx_size); // Number of worst senders to consider for removal in this pass: enough to cover the - // count and (estimated) size excess, widened by known local senders since those are - // skipped below. - let removal_candidates = excess_txs.max(excess_size_txs).max(1) + local_senders.len(); + // count and (estimated) size excess. + let removal_candidates = excess_txs.max(excess_size_txs).max(1); if removal_candidates < worst_transactions.len() { // keep only the `removal_candidates` worst senders, in O(n) without a full sort @@ -487,9 +471,7 @@ impl PendingPool { // loop through the highest nonces set, removing transactions until we reach the limit for tx in worst_transactions { // return early if the pool is under limits - if !limit.is_exceeded(original_length - total_removed, original_size - total_size) || - non_local_senders == 0 - { + if !limit.is_exceeded(original_length - total_removed, original_size - total_size) { // need to remove remaining transactions before exiting for id in &removed { if let Some(tx) = self.remove_transaction(id) { @@ -500,14 +482,6 @@ impl PendingPool { return } - if !remove_locals && tx.transaction.is_local() { - let sender_id = tx.transaction.sender_id(); - if local_senders.insert(sender_id) { - non_local_senders -= 1; - } - continue - } - total_size += tx.transaction.size(); total_removed += 1; removed.push(*tx.transaction.id()); @@ -520,9 +494,7 @@ impl PendingPool { } } - // return if either the pool is under limits or there are no more _eligible_ - // transactions to remove - if !self.exceeds(limit) || non_local_senders == 0 { + if !self.exceeds(limit) { return } } @@ -755,7 +727,7 @@ mod tests { use super::*; use crate::{ test_utils::{MockOrdering, MockTransaction, MockTransactionFactory, MockTransactionSet}, - PoolTransaction, + PoolTransaction, TransactionOrigin, }; use alloy_consensus::{Transaction, TxType}; use alloy_primitives::Address; @@ -1029,6 +1001,57 @@ mod tests { assert_eq!(pending, expected_pending); } + #[test] + fn truncate_skips_local_heads_ranked_below_non_local() { + let mut f = MockTransactionFactory::default(); + let mut pool = PendingPool::new(MockOrdering::default()); + + // many local senders that rank below every non-local sender + let num_locals = 3_000; + for _ in 0..num_locals { + let tx = f.validated_with_origin(TransactionOrigin::Local, MockTransaction::eip1559()); + pool.add_transaction(Arc::new(tx), 0); + } + + let non_locals: Vec<_> = (1..=3u128) + .map(|i| { + let tx = f.validated_arc(MockTransaction::eip1559().inc_price_by(10 * i)); + pool.add_transaction(tx.clone(), 0); + tx + }) + .collect(); + pool.assert_invariants(); + + let removed = + pool.truncate_pool(SubPoolLimit { max_txs: num_locals + 2, max_size: usize::MAX }); + pool.assert_invariants(); + + assert_eq!(removed.len(), 1); + assert_eq!(removed[0].hash(), non_locals[0].hash()); + assert_eq!(pool.len(), num_locals + 2); + } + + #[test] + fn truncate_removes_non_local_head_above_local_tx() { + let mut f = MockTransactionFactory::default(); + let mut pool = PendingPool::new(MockOrdering::default()); + + // the sender's highest nonce tx is non-local, so it is removed even though a local tx + // of the same sender stays behind + let local = MockTransaction::eip1559(); + let local_tx = f.validated_with_origin(TransactionOrigin::Local, local.clone()); + let head_tx = f.validated_arc(local.inc_nonce().rng_hash()); + pool.add_transaction(Arc::new(local_tx), 0); + pool.add_transaction(head_tx.clone(), 0); + + let removed = pool.truncate_pool(SubPoolLimit { max_txs: 1, max_size: usize::MAX }); + pool.assert_invariants(); + + assert_eq!(removed.len(), 1); + assert_eq!(removed[0].hash(), head_tx.hash()); + assert_eq!(pool.len(), 1); + } + // #[test] fn test_eligible_updates_promoted() { From 8868368b4e519024e4ada2a54e99fa603dd702ed Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 16:24:46 +0000 Subject: [PATCH 057/100] fix(evm): publish the EIP-8037 total tx gas cap to the pool (#28353) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/ethereum/evm/src/lib.rs | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/crates/ethereum/evm/src/lib.rs b/crates/ethereum/evm/src/lib.rs index eff121a1ece..8ce4c10f7bd 100644 --- a/crates/ethereum/evm/src/lib.rs +++ b/crates/ethereum/evm/src/lib.rs @@ -158,12 +158,10 @@ where } fn transaction_validation_limits(&self) -> reth_evm::EvmTransactionValidationLimits { - let tx_gas_limit_cap = if self.version.feature(evm2::EvmFeatures::EIP8037) || - self.version.tx_gas_limit_cap == u64::MAX - { - 0 - } else { - self.version.tx_gas_limit_cap + // `u64::MAX` means there is no cap, which the pool expects as `0`. + let tx_gas_limit_cap = match self.version.tx_gas_caps().0 { + u64::MAX => 0, + cap => cap, }; reth_evm::EvmTransactionValidationLimits { @@ -593,6 +591,7 @@ where #[cfg(test)] mod tests { use super::*; + use alloy_eips::eip7825::MAX_TX_GAS_LIMIT_OSAKA; use alloy_genesis::Genesis; use alloy_primitives::U256; use reth_chainspec::{Chain, ChainSpec}; @@ -620,6 +619,19 @@ mod tests { } } + #[test] + fn test_transaction_validation_limits_tx_gas_limit_cap() { + let cap = |spec| { + EthEvmEnv::::new(spec, Default::default(), 1) + .transaction_validation_limits() + .tx_gas_limit_cap + }; + + assert_eq!(cap(evm2::SpecId::PRAGUE), 0); + assert_eq!(cap(evm2::SpecId::OSAKA), MAX_TX_GAS_LIMIT_OSAKA); + assert_eq!(cap(evm2::SpecId::AMSTERDAM), evm2::constants::MAX_TX_TOTAL_GAS_LIMIT_AMSTERDAM); + } + #[derive(Debug, Clone)] struct CustomFactory; From ad1b0fe4a35c5e4548990662ab33ae211484d14a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:39:05 +0000 Subject: [PATCH 058/100] chore(deps): bump the ci-weekly group with 2 updates (#28347) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> --- .github/workflows/bench-scheduled.yml | 2 +- .github/workflows/bench.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/hive.yml | 2 +- .github/workflows/kurtosis.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bench-scheduled.yml b/.github/workflows/bench-scheduled.yml index 8fb1f936952..834139a6772 100644 --- a/.github/workflows/bench-scheduled.yml +++ b/.github/workflows/bench-scheduled.yml @@ -372,7 +372,7 @@ jobs: toolchain: stable - uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11 continue-on-error: true - - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 + - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: version: "0.13.4" diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index aa0e51a248f..ca1f40cc367 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -1376,7 +1376,7 @@ jobs: toolchain: stable - uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11 continue-on-error: true - - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 + - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: version: "0.13.4" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b861b6831c5..f606324b26c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -159,7 +159,7 @@ jobs: if: failure() && github.event_name == 'schedule' steps: - name: Slack Webhook Action - uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2.4.0 + uses: rtCamp/action-slack-notify@06cc13f74fa8d4d2296c09455d91e9453e4025f4 # v2.4.1 env: SLACK_COLOR: danger SLACK_ICON_EMOJI: ":rotating_light:" diff --git a/.github/workflows/hive.yml b/.github/workflows/hive.yml index e77b332a466..985a09db877 100644 --- a/.github/workflows/hive.yml +++ b/.github/workflows/hive.yml @@ -484,7 +484,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Slack Webhook Action - uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2.4.0 + uses: rtCamp/action-slack-notify@06cc13f74fa8d4d2296c09455d91e9453e4025f4 # v2.4.1 env: SLACK_COLOR: ${{ job.status }} SLACK_MESSAGE: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}" diff --git a/.github/workflows/kurtosis.yml b/.github/workflows/kurtosis.yml index 6639cac4445..b99d5f4f224 100644 --- a/.github/workflows/kurtosis.yml +++ b/.github/workflows/kurtosis.yml @@ -74,7 +74,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Slack Webhook Action - uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2.4.0 + uses: rtCamp/action-slack-notify@06cc13f74fa8d4d2296c09455d91e9453e4025f4 # v2.4.1 env: SLACK_COLOR: ${{ job.status }} SLACK_MESSAGE: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}" From a4235df087519489ecb0ca4ba9f122d3cc9bca3f Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 21:11:33 +0100 Subject: [PATCH 059/100] fix(net): bound the satellite mux eth send queue (#28381) --- crates/net/eth-wire/src/multiplex.rs | 113 +++++++++++++++++------ crates/net/network/src/session/active.rs | 6 +- crates/net/network/tests/it/multiplex.rs | 34 ++++++- 3 files changed, 123 insertions(+), 30 deletions(-) diff --git a/crates/net/eth-wire/src/multiplex.rs b/crates/net/eth-wire/src/multiplex.rs index d76111c5aeb..9db571758b7 100644 --- a/crates/net/eth-wire/src/multiplex.rs +++ b/crates/net/eth-wire/src/multiplex.rs @@ -354,6 +354,23 @@ impl MultiplexInner { ) -> (InboundSender, InboundReceiver) { inbound_channel(capability, limits, Arc::clone(&self.inbound_budget)) } + + /// Hands buffered messages to the connection without flushing it. + /// + /// Returns `Ready` once the buffer is empty and the connection can accept another message. + fn poll_send_buffered(&mut self, cx: &mut Context<'_>) -> Poll> + where + St: Sink + Unpin, + { + loop { + if let Err(err) = ready!(self.conn.poll_ready_unpin(cx)) { + self.conn.start_disconnect(DisconnectReason::DisconnectRequested)?; + return Poll::Ready(Err(err)) + } + let Some(msg) = self.out_buffer.pop_front() else { return Poll::Ready(Ok(())) }; + self.conn.start_send_unpin(msg)?; + } + } } /// Represents a protocol in the multiplexer that is used as the primary protocol. @@ -779,6 +796,25 @@ impl RlpxSatelliteStream { Ok(ProducerPoll::Pending) } + + /// Moves messages the primary protocol already accepted into the connection. + /// + /// [`ProtocolProxy`] accepts outgoing messages into an unbounded channel, so the sink must not + /// report readiness before that channel is drained. Otherwise a caller that sends while the + /// sink is ready queues messages without limit when the remote reads slowly. + fn poll_drain_primary(&mut self, cx: &mut Context<'_>) -> Poll> + where + St: Sink + Unpin, + { + loop { + ready!(self.inner.poll_send_buffered(cx))?; + // Both errors, empty and disconnected, mean no accepted message is left. + let Ok(msg) = self.primary.from_primary.as_mut().try_recv() else { + return Poll::Ready(Ok(())) + }; + self.inner.out_buffer.push_back(msg); + } + } } impl Stream for RlpxSatelliteStream @@ -799,32 +835,11 @@ where return Poll::Ready(Some(msg)) } - let mut conn_ready = true; - loop { - match this.inner.conn.poll_ready_unpin(cx) { - Poll::Ready(Ok(())) => { - if let Some(msg) = this.inner.out_buffer.pop_front() { - if let Err(err) = this.inner.conn.start_send_unpin(msg) { - return Poll::Ready(Some(Err(err.into()))) - } - } else { - break - } - } - Poll::Ready(Err(err)) => { - if let Err(disconnect_err) = - this.inner.conn.start_disconnect(DisconnectReason::DisconnectRequested) - { - return Poll::Ready(Some(Err(disconnect_err.into()))) - } - return Poll::Ready(Some(Err(err.into()))) - } - Poll::Pending => { - conn_ready = false; - break - } - } - } + let mut conn_ready = match this.inner.poll_send_buffered(cx) { + Poll::Ready(Ok(())) => true, + Poll::Ready(Err(err)) => return Poll::Ready(Some(Err(err.into()))), + Poll::Pending => false, + }; // The connection only buffers frames on `start_send`; `poll_flush` performs the // actual writes and flushes the transport once for the batch handed to it above. // This also resumes a flush that returned pending on an earlier pass; a no-op if @@ -913,7 +928,7 @@ where fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { let this = self.get_mut(); - if let Err(err) = ready!(this.inner.conn.poll_ready_unpin(cx)) { + if let Err(err) = ready!(this.poll_drain_primary(cx)) { return Poll::Ready(Err(err.into())) } if let Err(err) = ready!(this.primary.st.poll_ready_unpin(cx)) { @@ -927,7 +942,11 @@ where } fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { - self.get_mut().inner.conn.poll_flush_unpin(cx).map_err(Into::into) + let this = self.get_mut(); + if let Err(err) = ready!(this.poll_drain_primary(cx)) { + return Poll::Ready(Err(err.into())) + } + this.inner.conn.poll_flush_unpin(cx).map_err(Into::into) } fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { @@ -1689,4 +1708,42 @@ mod tests { } } } + + #[tokio::test] + async fn satellite_sink_drains_accepted_primary_messages() { + let (mux, eth, _) = test_multiplexer(0); + let mut stream = mux + .into_satellite_stream(eth.capability().as_ref(), |proxy| UnauthProxy { inner: proxy }) + .unwrap(); + stream.inner.conn.inner().writable.store(false, Ordering::Relaxed); + let mut cx = Context::from_waker(noop_waker_ref()); + + // Mirrors the session, which hands over queued messages while the sink reports readiness. + let mut sent = 0; + while sent < 64 && + matches!( + Sink::::poll_ready(Pin::new(&mut stream), &mut cx), + Poll::Ready(Ok(())) + ) + { + Pin::new(&mut stream).start_send(Bytes::from_static(&[0, 0])).unwrap(); + sent += 1; + } + // A stalled transport only admits the two messages the lower p2p sink buffers. + assert_eq!(sent, 2); + assert!(stream.primary.from_primary.as_ref().is_empty()); + assert!(stream.inner.out_buffer.is_empty()); + + stream.inner.conn.inner().writable.store(true, Ordering::Relaxed); + assert!(matches!( + Sink::::poll_ready(Pin::new(&mut stream), &mut cx), + Poll::Ready(Ok(())) + )); + Pin::new(&mut stream).start_send(Bytes::from_static(&[0, 0])).unwrap(); + assert!(matches!( + Sink::::poll_flush(Pin::new(&mut stream), &mut cx), + Poll::Ready(Ok(())) + )); + assert!(stream.primary.from_primary.as_ref().is_empty()); + } } diff --git a/crates/net/network/src/session/active.rs b/crates/net/network/src/session/active.rs index 2409f99a6fd..b2305fcd75d 100644 --- a/crates/net/network/src/session/active.rs +++ b/crates/net/network/src/session/active.rs @@ -237,9 +237,13 @@ impl ActiveSession { /// poll. /// /// Returns `true` if at least one message was handed to the connection. + /// + /// A readiness error closes the session: a satellite connection reports messages it already + /// accepted but the wire rejected through its readiness. fn poll_send_queued(&mut self, cx: &mut Context<'_>) -> Result { let mut progress = false; - while self.conn.poll_ready_unpin(cx).is_ready() { + while let Poll::Ready(ready) = self.conn.poll_ready_unpin(cx) { + ready?; let Some(msg) = self.queued_outgoing.pop_front() else { break }; progress = true; let res = match msg { diff --git a/crates/net/network/tests/it/multiplex.rs b/crates/net/network/tests/it/multiplex.rs index 25d19a2a94d..bcedadc58cf 100644 --- a/crates/net/network/tests/it/multiplex.rs +++ b/crates/net/network/tests/it/multiplex.rs @@ -4,14 +4,18 @@ use std::{ net::SocketAddr, pin::Pin, + sync::Arc, task::{ready, Context, Poll}, + time::Duration, }; -use alloy_primitives::bytes::BytesMut; +use alloy_consensus::TxLegacy; +use alloy_primitives::{bytes::BytesMut, Signature}; use futures::{Stream, StreamExt}; use reth_eth_wire::{ capability::SharedCapabilities, multiplex::ProtocolConnection, protocol::Protocol, }; +use reth_ethereum_primitives::TransactionSigned; use reth_network::{ protocol::{ConnectionHandler, OnNotSupported, ProtocolHandler}, test_utils::Testnet, @@ -337,3 +341,31 @@ async fn test_proto_multiplex() { let response = rx.await.unwrap(); assert_eq!(response, "hello from peer1!"); } + +#[tokio::test(flavor = "multi_thread")] +async fn test_proto_multiplex_closes_session_on_rejected_eth_message() { + reth_tracing::init_test_tracing(); + + let mut net = Testnet::create(2).await; + for peer in net.peers_mut() { + let (tx, _) = mpsc::unbounded_channel(); + peer.add_rlpx_sub_protocol(PingPongProtoHandler { state: ProtocolState { events: tx } }); + } + let net = net.spawn(); + net.connect_peers().await; + let [peer0, peer1] = net.peers_array(); + let mut events = peer0.event_stream(); + + // The mux accepts the broadcast, but the p2p stream rejects payloads above 16 MiB. + let tx = TxLegacy { input: vec![0; 17 * 1024 * 1024].into(), ..Default::default() }; + let tx = TransactionSigned::new_unhashed(tx.into(), Signature::test_signature()); + peer0.network().send_transactions(*peer1.peer_id(), vec![Arc::new(tx)]); + + let (peer_id, reason) = + tokio::time::timeout(Duration::from_secs(10), events.next_session_closed()) + .await + .expect("session stayed open after the wire rejected a message") + .expect("network event stream ended before the session closed"); + assert_eq!(peer_id, *peer1.peer_id()); + assert_eq!(reason, None); +} From 7218044b093fd44b75f770c3e137fae0f3902f94 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 20:59:33 +0000 Subject: [PATCH 060/100] fix(net): move fetching hashes past the eviction fallback search (#28361) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- .../net/network/src/transactions/fetcher.rs | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/crates/net/network/src/transactions/fetcher.rs b/crates/net/network/src/transactions/fetcher.rs index 04d966cd559..b4043bc5afa 100644 --- a/crates/net/network/src/transactions/fetcher.rs +++ b/crates/net/network/src/transactions/fetcher.rs @@ -98,7 +98,8 @@ pub struct TransactionFetcher { hashes: B256Map, /// Tracked hashes in the order they were added, used to evict the oldest pending hash once /// the fetcher is at capacity and the peer tracking the most hashes has none pending. Entries - /// are removed lazily, so it may contain hashes that are not tracked anymore. + /// are removed lazily, so it may contain hashes that are not tracked anymore. Fetching hashes + /// skipped by an eviction search are moved to the back. order: VecDeque<(TxHash, u64)>, /// Fetch state of all peers that announced tracked hashes. peers: HashMap, @@ -671,23 +672,21 @@ impl TransactionFetcher { /// Evicts the oldest pending hash, including shared hashes, as a last resort. /// /// Shared hashes cannot be exempt from eviction: co-announcements could pin every slot. - /// Returns `false` if only fetching hashes were found within the search budget. + /// Returns `false` if only fetching hashes were found within the search budget. Fetching + /// hashes are moved to the back of the order, so the next search continues past them. fn evict_oldest_pending(&mut self) -> bool { - let mut index = 0; let mut attempts = 0; while attempts < MAX_EVICTION_ATTEMPTS { - let Some(&(hash, generation)) = self.order.get(index) else { break }; + let Some((hash, generation)) = self.order.pop_front() else { break }; let Some(entry) = self.hashes.get(&hash).filter(|entry| entry.generation == generation) else { - self.order.remove(index); continue }; attempts += 1; if entry.fetching_by.is_some() { - index += 1; + self.order.push_back((hash, generation)); continue } - self.order.remove(index); self.remove_hash(&hash); return true } @@ -2463,6 +2462,37 @@ mod tests { assert_eq!(rig.take_request(flooder).unwrap().0, vec![hash(2), hash(3)]); } + #[test] + fn capacity_fallback_moves_past_fetching_hashes() { + let mut rig = Rig::with_config(TransactionFetcherConfig { + max_capacity_cache_txns_pending_fetch: 24, + ..Default::default() + }); + let [fetching, first, second, coannouncer, honest] = [1, 2, 3, 4, 5].map(peer); + for p in [fetching, first, second, coannouncer, honest] { + rig.add_peer(p); + } + // the oldest hashes are inflight and the busiest peer has no exclusive hashes + rig.announce(fetching, &hashes(0..8)); + rig.dispatch(); + rig.announce(first, &hashes(8..16)); + rig.announce(second, &hashes(16..24)); + rig.announce(coannouncer, &hashes(8..24)); + + // the first search only gets past the fetching hashes, later ones evict pending hashes + rig.announce(honest, &hashes(24..28)); + assert!(rig.fetcher.candidate_peers(&hash(24)).is_empty()); + for h in hashes(25..28) { + assert_eq!(rig.fetcher.candidate_peers(&h), vec![honest]); + } + for h in hashes(8..11) { + assert!(rig.fetcher.candidate_peers(&h).is_empty()); + } + assert_eq!(rig.fetcher.num_fetching_hashes(), 8); + rig.dispatch(); + assert_eq!(rig.take_request(honest).unwrap().0, hashes(25..28)); + } + #[test] fn capacity_with_only_shared_hashes_admits_new_announcements() { let config = TransactionFetcherConfig { From fdfe25a881450c108745614fa3a0dce5163854e6 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 21:00:18 +0000 Subject: [PATCH 061/100] fix(net): reject banned and untrusted inbound peers before session activation (#28360) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/net/network/src/peers.rs | 21 +++++++++++++++++++++ crates/net/network/src/session/mod.rs | 18 +++++++++++------- crates/net/network/src/session/tests.rs | 10 +++++----- crates/net/network/src/swarm.rs | 4 +++- crates/net/network/tests/it/connect.rs | 9 +++++++-- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/crates/net/network/src/peers.rs b/crates/net/network/src/peers.rs index 234cbd10fc0..52130da6ba3 100644 --- a/crates/net/network/src/peers.rs +++ b/crates/net/network/src/peers.rs @@ -518,6 +518,18 @@ impl PeersManager { self.peers.get(&peer_id).is_some_and(|peer| peer.is_trusted()) } + /// Returns the reason to reject an incoming session before it is activated, or `None` if the + /// session may become active. + pub(crate) fn inbound_session_rejection(&self, peer_id: PeerId) -> Option { + if self.ban_list.is_banned_peer(&peer_id) || + self.peers.get(&peer_id).is_some_and(|peer| peer.is_banned()) || + (self.trusted_nodes_only && !self.trusted_peer_ids.contains(&peer_id)) + { + return Some(DisconnectReason::DisconnectRequested) + } + (!self.has_inbound_capacity(peer_id)).then_some(DisconnectReason::TooManyPeers) + } + /// Bans the peer temporarily with the configured ban timeout fn ban_peer(&mut self, peer_id: PeerId) { let ban_duration = if let Some(peer) = self.peers.get(&peer_id) && @@ -2808,6 +2820,10 @@ mod tests { assert!(peer_manager.on_incoming_pending_session(socket_addr.ip()).is_ok()); // non-trusted nodes should also increase pending_in assert_eq!(peer_manager.connection_info.num_pending_in, 1); + assert_eq!( + peer_manager.inbound_session_rejection(given_peer_id), + Some(DisconnectReason::DisconnectRequested) + ); peer_manager.on_incoming_session_established(given_peer_id, socket_addr); // after the connection is established, the peer should be removed, the num_pending_in // should be decreased, and the num_inbound should not be increased @@ -3004,6 +3020,11 @@ mod tests { assert!(peers.on_incoming_pending_session(basic_sock.ip()).is_ok()); // non-trusted nodes should also increase pending_in assert_eq!(peers.connection_info.num_pending_in, 1); + assert_eq!( + peers.inbound_session_rejection(basic_peer), + Some(DisconnectReason::DisconnectRequested) + ); + assert_eq!(peers.inbound_session_rejection(trusted_peer), None); peers.on_incoming_session_established(basic_peer, basic_sock); // after the connection is established, the peer should be removed, the num_pending_in // should be decreased, and the num_inbound mut not be increased diff --git a/crates/net/network/src/session/mod.rs b/crates/net/network/src/session/mod.rs index 14f136c685b..d0dd7da14f8 100644 --- a/crates/net/network/src/session/mod.rs +++ b/crates/net/network/src/session/mod.rs @@ -507,15 +507,19 @@ impl SessionManager { /// /// Active sessions are prioritized, but after [`DEFAULT_BUDGET_PRIORITIZED_EVENTS`] active /// session events in a row pending sessions are polled first once, so a steady stream of active - /// session messages can't hold back new sessions. + /// session messages can't hold back new sessions. Established incoming sessions are + /// disconnected with the reason returned by `inbound_session_rejection` instead of being + /// activated. pub(crate) fn poll( &mut self, cx: &mut Context<'_>, - has_inbound_capacity: impl Fn(PeerId) -> bool, + inbound_session_rejection: impl Fn(PeerId) -> Option, ) -> Poll> { if self.active_events_in_row >= DEFAULT_BUDGET_PRIORITIZED_EVENTS { self.active_events_in_row = 0; - if let Poll::Ready(event) = self.poll_pending_session_event(cx, &has_inbound_capacity) { + if let Poll::Ready(event) = + self.poll_pending_session_event(cx, &inbound_session_rejection) + { return Poll::Ready(event) } } @@ -526,7 +530,7 @@ impl SessionManager { } self.active_events_in_row = 0; - self.poll_pending_session_event(cx, has_inbound_capacity) + self.poll_pending_session_event(cx, inbound_session_rejection) } /// Polls the next event from the active sessions. @@ -579,7 +583,7 @@ impl SessionManager { fn poll_pending_session_event( &mut self, cx: &mut Context<'_>, - has_inbound_capacity: impl Fn(PeerId) -> bool, + inbound_session_rejection: impl Fn(PeerId) -> Option, ) -> Poll> { let event = loop { let event = match self.pending_session_rx.poll_next_unpin(cx) { @@ -635,8 +639,8 @@ impl SessionManager { } if direction.is_incoming() { - if !has_inbound_capacity(peer_id) { - self.disconnect_pending_connection(conn, DisconnectReason::TooManyPeers); + if let Some(reason) = inbound_session_rejection(peer_id) { + self.disconnect_pending_connection(conn, reason); return Poll::Ready(SessionEvent::IncomingPendingSessionClosed { remote_addr, error: None, diff --git a/crates/net/network/src/session/tests.rs b/crates/net/network/src/session/tests.rs index 6c68cf8858d..a02402e1db3 100644 --- a/crates/net/network/src/session/tests.rs +++ b/crates/net/network/src/session/tests.rs @@ -469,7 +469,7 @@ async fn canceled_dial_events_do_not_reach_replacement_sessions() { }) .await .unwrap(); - assert!(sessions.poll(&mut Context::from_waker(Waker::noop()), |_| true).is_pending()); + assert!(sessions.poll(&mut Context::from_waker(Waker::noop()), |_| None).is_pending()); assert!(sessions.pending_sessions.contains_key(&new_id)); } sessions @@ -482,7 +482,7 @@ async fn canceled_dial_events_do_not_reach_replacement_sessions() { }) .await .unwrap(); - assert!(sessions.poll(&mut Context::from_waker(Waker::noop()), |_| true).is_pending()); + assert!(sessions.poll(&mut Context::from_waker(Waker::noop()), |_| None).is_pending()); sessions .pending_sessions_tx .send(PendingSessionEvent::Disconnected { @@ -493,7 +493,7 @@ async fn canceled_dial_events_do_not_reach_replacement_sessions() { }) .await .unwrap(); - assert!(matches!(sessions.poll(&mut Context::from_waker(Waker::noop()), |_| true), + assert!(matches!(sessions.poll(&mut Context::from_waker(Waker::noop()), |_| None), Poll::Ready(SessionEvent::OutgoingPendingSessionClosed { peer_id: id, error: None, .. }) if id == peer_id)); assert!(sessions.pending_sessions.is_empty()); } @@ -571,7 +571,7 @@ async fn canceled_completed_dial_sends_disconnect() { ); outgoing.counter.inc_pending_outbound(); outgoing.pending_sessions_tx.send(event).await.unwrap(); - assert!(outgoing.poll(&mut Context::from_waker(Waker::noop()), |_| true).is_pending()); + assert!(outgoing.poll(&mut Context::from_waker(Waker::noop()), |_| None).is_pending()); assert!(outgoing.pending_sessions.contains_key(&replacement)); assert!(outgoing.active_sessions.is_empty()); let error = tokio::time::timeout(Duration::from_secs(5), conn.next()) @@ -602,7 +602,7 @@ async fn inbound_capacity_rejection_preserves_outbound_attempt() { futures::future::poll_fn(|cx| { incoming.poll(cx, |id| { assert_eq!(id, peer_id); - allow + (!allow).then_some(DisconnectReason::TooManyPeers) }) }), ) diff --git a/crates/net/network/src/swarm.rs b/crates/net/network/src/swarm.rs index 594c123d3ce..b560d785c85 100644 --- a/crates/net/network/src/swarm.rs +++ b/crates/net/network/src/swarm.rs @@ -350,7 +350,9 @@ impl Stream for Swarm { } // poll all sessions - match this.sessions.poll(cx, |peer_id| this.state.peers().has_inbound_capacity(peer_id)) + match this + .sessions + .poll(cx, |peer_id| this.state.peers().inbound_session_rejection(peer_id)) { Poll::Pending => {} Poll::Ready(event) => { diff --git a/crates/net/network/tests/it/connect.rs b/crates/net/network/tests/it/connect.rs index d1586a534bf..3009a964832 100644 --- a/crates/net/network/tests/it/connect.rs +++ b/crates/net/network/tests/it/connect.rs @@ -241,8 +241,13 @@ async fn test_trusted_peer_only() { // only receive connections from trusted peers. peer1.add_peer(peer); - // wait 500ms, the number of connections is still 1, because peer1 is untrusted. - tokio::time::sleep(Duration::from_millis(500)).await; + // peer1 is untrusted, so its incoming session is never activated. + assert!(tokio::time::timeout( + Duration::from_millis(500), + event_stream.next_session_established() + ) + .await + .is_err()); assert_eq!(peer.network().num_connected_peers(), 1); // remove peer from peer1's peer list to prevent a competing outgoing connection attempt From 80b99ebd77dc9e07c8a8da9c1ffe0dd7e77e1bb4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 22:12:19 +0100 Subject: [PATCH 062/100] feat(txpool): allow subscribing to events of txs held outside the pool (#28387) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/transaction-pool/src/pool/mod.rs | 40 +++++++++++++++++++++---- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/crates/transaction-pool/src/pool/mod.rs b/crates/transaction-pool/src/pool/mod.rs index 1ee4cb2ae90..209711eb8fa 100644 --- a/crates/transaction-pool/src/pool/mod.rs +++ b/crates/transaction-pool/src/pool/mod.rs @@ -313,10 +313,20 @@ where if !self.get_pool_data().contains(&tx_hash) { return None } - let mut listener = self.event_listener.write(); - let events = listener.subscribe(tx_hash); + Some(self.subscribe_transaction_events(tx_hash)) + } + + /// Adds a listener for events of the given transaction without checking that this pool + /// holds it. + /// + /// For [`TransactionPool`](crate::TransactionPool) implementations that keep some + /// transactions outside this pool and report their events through + /// [`Self::notify_event_listeners`]. Only subscribe to transactions the caller holds: a + /// subscription is removed once its hash gets a final event. + pub fn subscribe_transaction_events(&self, tx_hash: TxHash) -> TransactionEvents { + let events = self.event_listener.write().subscribe(tx_hash); self.mark_event_listener_installed(); - Some(events) + events } /// Adds a listener for all transaction events. @@ -1731,12 +1741,15 @@ impl OnNewCanonicalStateOutcome { #[cfg(test)] mod tests { + use super::{AddedPendingTransaction, AddedTransaction}; use crate::{ blobstore::{BlobStore, InMemoryBlobStore, PooledBlobSidecar}, identifier::SenderId, - test_utils::{testing_pool, MockTransaction, TestPool, TestPoolBuilder}, + test_utils::{ + testing_pool, MockTransaction, MockTransactionFactory, TestPool, TestPoolBuilder, + }, validate::ValidTransaction, - BlockInfo, FullTransactionEvent, PoolConfig, SubPool, SubPoolLimit, + BlockInfo, FullTransactionEvent, PoolConfig, SubPool, SubPoolLimit, TransactionEvent, TransactionListenerKind, TransactionOrigin, TransactionPool, TransactionPoolExt, TransactionValidationOutcome, ValidPoolTransaction, U256, }; @@ -1826,6 +1839,23 @@ mod tests { assert_eq!(nonces(&pool.get_transactions_by_sender(sender)), [0, 1, 9]); } + #[test] + fn subscribe_transaction_events_without_pool_residency() { + let test_pool = testing_pool(); + let pool = &test_pool.pool; + let tx = MockTransactionFactory::default().validated_arc(MockTransaction::eip1559()); + assert!(pool.add_transaction_event_listener(*tx.hash()).is_none()); + + let mut events = pool.subscribe_transaction_events(*tx.hash()); + pool.notify_event_listeners(&AddedTransaction::Pending(AddedPendingTransaction { + transaction: tx, + replaced: None, + promoted: vec![], + discarded: vec![], + })); + assert_eq!(events.next().now_or_never(), Some(Some(TransactionEvent::Pending))); + } + #[test] fn queued_insertion_notifies_older_promotions() { let test_pool = testing_pool(); From f1c244b4d27c050a1ad8e3135f08448151cac3ac Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 21:11:27 +0000 Subject: [PATCH 063/100] fix(txpool): allow same-nonce replacement for senders at slot capacity (#28358) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/transaction-pool/src/pool/txpool.rs | 44 +++++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/crates/transaction-pool/src/pool/txpool.rs b/crates/transaction-pool/src/pool/txpool.rs index fc6d085a230..38cacef85a8 100644 --- a/crates/transaction-pool/src/pool/txpool.rs +++ b/crates/transaction-pool/src/pool/txpool.rs @@ -1996,8 +1996,12 @@ impl AllTransactions { self.tx_counter.get(&transaction.sender_id()).copied().unwrap_or_default(); // Reject transactions if sender's capacity is exceeded. - // If transaction's nonce matches on-chain nonce always let it through - if current_txs >= self.max_account_slots && transaction.nonce() > on_chain_nonce { + // If transaction's nonce matches on-chain nonce always let it through. + // Replacements of an existing transaction don't increase the sender's count. + if current_txs >= self.max_account_slots && + transaction.nonce() > on_chain_nonce && + !self.txs.contains_key(&transaction.transaction_id) + { return Err(InsertErr::ExceededSenderTransactionsCapacity { transaction: Arc::new(transaction), }) @@ -3496,6 +3500,42 @@ mod tests { .is_ok()); } + #[test] + fn replace_at_sender_capacity() { + let on_chain_balance = U256::from(1_000); + let on_chain_nonce = 0; + let mut f = MockTransactionFactory::default(); + let mut pool = AllTransactions::default(); + + let mut tx = MockTransaction::eip1559().with_nonce(on_chain_nonce); + pool.insert_tx(f.validated(tx.clone()), on_chain_balance, on_chain_nonce).unwrap(); + for _ in 1..pool.max_account_slots { + tx = tx.next(); + pool.insert_tx(f.validated(tx.clone()), on_chain_balance, on_chain_nonce).unwrap(); + } + let sender = f.ids.sender_id(tx.get_sender()).unwrap(); + assert_eq!(pool.tx_count(sender), pool.max_account_slots); + + // a fee-bumped replacement of the highest nonce does not change the sender's count + let replacement = f.validated(tx.clone().rng_hash().inc_price_by(tx.get_gas_price())); + let InsertOk { replaced_tx, .. } = + pool.insert_tx(replacement.clone(), on_chain_balance, on_chain_nonce).unwrap(); + assert_eq!(replaced_tx.unwrap().0.hash(), tx.hash()); + assert!(!pool.contains(tx.hash())); + assert!(pool.contains(replacement.hash())); + assert_eq!(pool.tx_count(sender), pool.max_account_slots); + + // an underpriced replacement is still rejected as such + let underpriced = f.validated(tx.clone().rng_hash()); + let err = pool.insert_tx(underpriced, on_chain_balance, on_chain_nonce).unwrap_err(); + assert!(matches!(err, InsertErr::Underpriced { .. })); + + // a new nonce is still over capacity + let err = + pool.insert_tx(f.validated(tx.next()), on_chain_balance, on_chain_nonce).unwrap_err(); + assert!(matches!(err, InsertErr::ExceededSenderTransactionsCapacity { .. })); + } + #[test] fn allow_local_spamming() { let on_chain_balance = U256::from(1_000); From 2edd2f1e750a3ae58bc473fc89ed7d2c0b42479a Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 21:20:01 +0000 Subject: [PATCH 064/100] fix(txpool): run blob store cleanup on every finalized block advance (#28357) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/transaction-pool/src/blobstore/disk.rs | 29 +++++++++++++++-- crates/transaction-pool/src/maintain.rs | 32 ++++++++++++------- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/crates/transaction-pool/src/blobstore/disk.rs b/crates/transaction-pool/src/blobstore/disk.rs index 9ab58426f84..2275d78b526 100644 --- a/crates/transaction-pool/src/blobstore/disk.rs +++ b/crates/transaction-pool/src/blobstore/disk.rs @@ -246,6 +246,7 @@ impl BlobStore for DiskFileBlobStore { let txs_to_delete = std::mem::take(&mut *self.inner.txs_to_delete.write()); let mut stat = BlobStoreCleanupStat::default(); let mut subsize = 0; + let mut removed = 0; debug!(target:"txpool::blob", num_blobs=%txs_to_delete.len(), "Removing blobs from disk"); for tx in txs_to_delete { let path = self.inner.blob_disk_file(tx); @@ -254,9 +255,10 @@ impl BlobStore for DiskFileBlobStore { Ok(_) => { stat.delete_succeed += 1; subsize += filesize; + removed += 1; } Err(e) if e.kind() == std::io::ErrorKind::NotFound => { - // Already deleted by a concurrent cleanup task + // Already deleted, and uncounted, by an earlier or concurrent cleanup stat.delete_succeed += 1; } Err(e) => { @@ -267,7 +269,7 @@ impl BlobStore for DiskFileBlobStore { }; } self.inner.size_tracker.sub_size(subsize as usize); - self.inner.size_tracker.sub_len(stat.delete_succeed); + self.inner.size_tracker.sub_len(removed); stat } @@ -926,6 +928,29 @@ mod tests { assert_eq!(store.inner.size_tracker.num_blobs.load(Ordering::Relaxed), 0); } + #[test] + fn disk_queued_deletions_count_until_cleanup() { + let (store, _dir) = tmp_store(); + assert_eq!(store.blobs_len(), 0); + + let blobs = rng_blobs(2); + let hashes = blobs.iter().map(|(tx, _)| *tx).collect::>(); + store.insert_all(wrapped_blobs(blobs)).unwrap(); + + // queued deletions keep the blobs counted, so the store isn't reported empty before + // cleanup ran + store.delete_all(vec![hashes[0]]).unwrap(); + assert_eq!(store.blobs_len(), 2); + + store.cleanup(); + assert_eq!(store.blobs_len(), 1); + + // the removed blob is still cached, so it can be queued again + store.delete(hashes[0]).unwrap(); + store.cleanup(); + assert_eq!(store.blobs_len(), 1); + } + #[test] fn disk_insert_and_retrieve() { let (store, _dir) = tmp_store(); diff --git a/crates/transaction-pool/src/maintain.rs b/crates/transaction-pool/src/maintain.rs index 54353a22007..bc387f8a3d5 100644 --- a/crates/transaction-pool/src/maintain.rs +++ b/crates/transaction-pool/src/maintain.rs @@ -161,6 +161,9 @@ pub async fn maintain_transaction_pool( // keeps track of mined blob transaction so we can clean finalized transactions let mut blob_store_tracker = BlobStoreCanonTracker::default(); + // handle to the pool's blob store, used to skip cleanup while it holds no blobs + let blob_store = pool.blob_store(); + // keeps track of the latest finalized block let mut last_finalized_block = FinalizedBlockTracker::new(client.finalized_block_number().ok().flatten()); @@ -232,19 +235,24 @@ pub async fn maintain_transaction_pool( // check if we have a new finalized block if let Some(finalized) = - last_finalized_block.update(client.finalized_block_number().ok().flatten()) && - let BlobStoreUpdates::Finalized(blobs) = - blob_store_tracker.on_finalized_block(finalized) + last_finalized_block.update(client.finalized_block_number().ok().flatten()) { - metrics.inc_deleted_tracked_blobs(blobs.len()); - // remove all finalized blobs from the blob store - pool.delete_blobs(blobs); - // and also do periodic cleanup - let pool = pool.clone(); - task_spawner.spawn_blocking_task(async move { - debug!(target: "txpool", finalized_block = %finalized, "cleaning up blob store"); - pool.cleanup_blobs(); - }); + if let BlobStoreUpdates::Finalized(blobs) = + blob_store_tracker.on_finalized_block(finalized) + { + metrics.inc_deleted_tracked_blobs(blobs.len()); + // remove all finalized blobs from the blob store + pool.delete_blobs(blobs); + } + // and also do periodic cleanup, deletions of replaced or evicted blobs are only queued + // in the blob store until this runs, and queued blobs still count towards its length + if blob_store.blobs_len() > 0 { + let pool = pool.clone(); + task_spawner.spawn_blocking_task(async move { + debug!(target: "txpool", finalized_block = %finalized, "cleaning up blob store"); + pool.cleanup_blobs(); + }); + } } // outcomes of the futures we are waiting on From 9764beb39b2bb6ee9f75dec704b05715a59c0ae8 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 23:34:20 +0100 Subject: [PATCH 065/100] fix(rpc): check cancellation once per simulated block (#28390) --- crates/rpc/rpc-eth-types/src/simulate.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/rpc/rpc-eth-types/src/simulate.rs b/crates/rpc/rpc-eth-types/src/simulate.rs index 8b9422bcc14..b27b47f8270 100644 --- a/crates/rpc/rpc-eth-types/src/simulate.rs +++ b/crates/rpc/rpc-eth-types/src/simulate.rs @@ -325,6 +325,9 @@ where T: RpcConvert, EvmTypes: evm2::EvmTypes, { + if is_cancelled() { + return Err(EthApiError::InternalEthError) + } builder.apply_pre_execution_changes()?; let mut results = Vec::with_capacity(calls.len()); From 9e10691e0e1d14d1d66e0587683bb294fa38f878 Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Mon, 9 Nov 2026 22:32:17 +0000 Subject: [PATCH 066/100] fix(provider): defer static file truncation on reorg (#28370) Co-authored-by: Claude Opus 5.5 Co-authored-by: Matthias Seitz --- .../types/src/changeset_offsets.rs | 22 ++++++++- crates/storage/nippy-jar/src/writer.rs | 49 +++++++++++++++++-- .../provider/src/providers/static_file/mod.rs | 13 +++++ .../src/providers/static_file/writer.rs | 31 ++++++++++-- 4 files changed, 106 insertions(+), 9 deletions(-) diff --git a/crates/static-file/types/src/changeset_offsets.rs b/crates/static-file/types/src/changeset_offsets.rs index fe22b8135b4..33d89e2fd70 100644 --- a/crates/static-file/types/src/changeset_offsets.rs +++ b/crates/static-file/types/src/changeset_offsets.rs @@ -17,6 +17,8 @@ pub struct ChangesetOffsetWriter { file: File, /// Number of records written. records_written: u64, + /// Records to keep once the deferred truncation is applied, or `None` if none is pending. + pending_truncation: Option, } impl ChangesetOffsetWriter { @@ -106,11 +108,12 @@ impl ChangesetOffsetWriter { let records_written = committed_len; let file = OpenOptions::new().create(true).append(true).open(path)?; - Ok(Self { file, records_written }) + Ok(Self { file, records_written, pending_truncation: None }) } /// Appends a single changeset offset record. pub fn append(&mut self, offset: &ChangesetOffset) -> io::Result<()> { + self.apply_pending_truncation()?; let mut buf = [0u8; Self::RECORD_SIZE]; buf[..8].copy_from_slice(&offset.offset().to_le_bytes()); buf[8..].copy_from_slice(&offset.num_changes().to_le_bytes()); @@ -140,10 +143,27 @@ impl ChangesetOffsetWriter { pub fn truncate(&mut self, len: u64) -> io::Result<()> { self.file.set_len(len * Self::RECORD_SIZE as u64)?; self.file.sync_all()?; + self.pending_truncation = None; self.records_written = len; Ok(()) } + /// Drops records like [`Self::truncate`], but leaves them on disk until + /// [`Self::apply_pending_truncation`]. + pub const fn truncate_deferred(&mut self, len: u64) { + self.records_written = len; + self.pending_truncation = Some(len); + } + + /// Truncates the file to the records kept by [`Self::truncate_deferred`]. + /// + /// Returns `false` if no truncation was pending. + pub fn apply_pending_truncation(&mut self) -> io::Result { + let Some(len) = self.pending_truncation else { return Ok(false) }; + self.truncate(len)?; + Ok(true) + } + /// Returns the number of records in the file. pub const fn len(&self) -> u64 { self.records_written diff --git a/crates/storage/nippy-jar/src/writer.rs b/crates/storage/nippy-jar/src/writer.rs index 6bcc7bf3831..2d280e1c4f2 100644 --- a/crates/storage/nippy-jar/src/writer.rs +++ b/crates/storage/nippy-jar/src/writer.rs @@ -43,6 +43,13 @@ pub struct NippyJarWriter { column: usize, /// Whether the writer has changed data that needs to be committed. dirty: bool, + pending_truncation: Option, +} + +#[derive(Debug, Clone, Copy)] +struct PendingTruncation { + offsets_len: u64, + data_len: u64, } impl NippyJarWriter { @@ -79,6 +86,7 @@ impl NippyJarWriter { offsets: Vec::with_capacity(1_000_000), column: 0, dirty: false, + pending_truncation: None, }; if !is_created { @@ -197,6 +205,7 @@ impl NippyJarWriter { &mut self, column: Option>>, ) -> Result<(), NippyJarError> { + self.apply_pending_truncation()?; self.dirty = true; match column { @@ -248,6 +257,15 @@ impl NippyJarWriter { /// Prunes rows from data and offsets file and updates its configuration on disk pub fn prune_rows(&mut self, num_rows: usize) -> Result<(), NippyJarError> { + self.prune_rows_deferred(num_rows)?; + self.apply_pending_truncation()?; + Ok(()) + } + + /// Prunes rows like [`Self::prune_rows`], but leaves the committed rows' bytes on disk until + /// [`Self::apply_pending_truncation`]. + pub fn prune_rows_deferred(&mut self, num_rows: usize) -> Result<(), NippyJarError> { + self.apply_pending_truncation()?; self.dirty = true; self.offsets_file.flush()?; @@ -297,8 +315,10 @@ impl NippyJarWriter { // file size = 0). This maintains the same structure as when // a file is initially created. // See `NippyJarWriter::create_or_open_files` for the initial file format. - self.offsets_file.get_mut().set_len(1 + OFFSET_SIZE_BYTES as u64)?; - self.data_file.get_mut().set_len(0)?; + self.pending_truncation = Some(PendingTruncation { + offsets_len: 1 + OFFSET_SIZE_BYTES as u64, + data_len: 0, + }); } else { // Calculate the new length for the on-disk offset list let new_len = 1 + new_num_offsets * OFFSET_SIZE_BYTES as u64; @@ -311,8 +331,8 @@ impl NippyJarWriter { let last_offset = u64::from_le_bytes(last_offset); // Update the lengths of both the offsets and data files - self.offsets_file.get_mut().set_len(new_len)?; - self.data_file.get_mut().set_len(last_offset)?; + self.pending_truncation = + Some(PendingTruncation { offsets_len: new_len, data_len: last_offset }); } } else { return Err(NippyJarError::InvalidPruning(0, remaining_to_prune as u64)) @@ -346,6 +366,27 @@ impl NippyJarWriter { Ok(()) } + /// Truncates the files to the rows kept by [`Self::prune_rows_deferred`]. + /// + /// Returns `false` if no truncation was pending. + pub fn apply_pending_truncation(&mut self) -> Result { + let Some(PendingTruncation { offsets_len, data_len }) = self.pending_truncation else { + return Ok(false) + }; + + self.offsets_file.get_mut().set_len(offsets_len)?; + self.data_file.get_mut().set_len(data_len)?; + + self.offsets_file.get_ref().sync_all()?; + self.data_file.get_ref().sync_all()?; + + self.offsets_file.seek(SeekFrom::End(0))?; + self.data_file.seek(SeekFrom::End(0))?; + self.pending_truncation = None; + + Ok(true) + } + /// Updates [`NippyJar`] with the new row count and maximum uncompressed row size, while /// resetting internal fields. fn finalize_row(&mut self) { diff --git a/crates/storage/provider/src/providers/static_file/mod.rs b/crates/storage/provider/src/providers/static_file/mod.rs index 0718f3d2d73..2b97a854812 100644 --- a/crates/storage/provider/src/providers/static_file/mod.rs +++ b/crates/storage/provider/src/providers/static_file/mod.rs @@ -119,6 +119,17 @@ mod tests { Ok(()) } + fn assert_cached_size_matches_disk( + sf_rw: &StaticFileProvider, + segment: StaticFileSegment, + block: u64, + ) -> eyre::Result<()> { + let jar_provider = sf_rw.get_segment_provider_for_block(segment, block, None)?; + let disk_size = fs::metadata(jar_provider.data_path())?.len() + + fs::metadata(jar_provider.offsets_path())?.len(); + assert_eyre(jar_provider.size() as u64, disk_size, "cached size mismatch") + } + #[test] fn test_static_files() { // Ranges @@ -241,6 +252,7 @@ mod tests { expected_tip, "header mismatch", )?; + assert_cached_size_matches_disk(sf_rw, StaticFileSegment::Headers, id)?; } // Validate the number of files remaining in the directory @@ -494,6 +506,7 @@ mod tests { "block mismatch", )?; assert_eyre(sf_rw.get_highest_static_file_tx(segment), expected_tx_tip, "tx mismatch")?; + assert_cached_size_matches_disk(sf_rw, segment, last_block)?; // Verify that transactions and receipts are returned correctly. Uses // cumulative_gas_used & nonce as ids. diff --git a/crates/storage/provider/src/providers/static_file/writer.rs b/crates/storage/provider/src/providers/static_file/writer.rs index 36398391d43..bd88f096e0f 100644 --- a/crates/storage/provider/src/providers/static_file/writer.rs +++ b/crates/storage/provider/src/providers/static_file/writer.rs @@ -668,9 +668,28 @@ impl StaticFileProviderRW { self.update_index()?; } + // Pruned rows are cut from the files only now. Both the cached jar `update_index` just + // replaced and the one it installed may still map the uncut length: the replaced one waits + // for its readers, and the installed one never reads past its row count. Indexing again + // caches a jar that maps the cut length. + if self.apply_pending_truncation()? { + self.update_index()?; + } + Ok(()) } + /// Applies the truncation deferred by pruning to the data and changeset offset files. + /// + /// Returns `false` if no truncation was pending. + fn apply_pending_truncation(&mut self) -> ProviderResult { + let mut truncated = self.writer.apply_pending_truncation().map_err(ProviderError::other)?; + if let Some(writer) = &mut self.changeset_offsets { + truncated |= writer.apply_pending_truncation().map_err(ProviderError::other)?; + } + Ok(truncated) + } + /// Commits configuration changes to disk and updates the reader index with the new changes. /// /// CAUTION: does not call `sync_all` on the files. @@ -975,7 +994,9 @@ impl StaticFileProviderRW { self.writer.user_header_mut().prune(blocks_to_remove); // Prune the actual rows - self.writer.prune_rows(rows_to_delete as usize).map_err(ProviderError::other)?; + self.writer + .prune_rows_deferred(rows_to_delete as usize) + .map_err(ProviderError::other)?; } // Update the block range @@ -986,7 +1007,7 @@ impl StaticFileProviderRW { // Truncate the sidecar file to match the new block count if let Some(writer) = &mut self.changeset_offsets { - writer.truncate(blocks_to_keep).map_err(ProviderError::other)?; + writer.truncate_deferred(blocks_to_keep); } // Clear current changeset offset tracking since we've pruned @@ -1035,7 +1056,7 @@ impl StaticFileProviderRW { } else { // Update `SegmentHeader` self.writer.user_header_mut().prune(len); - self.writer.prune_rows(len as usize).map_err(ProviderError::other)?; + self.writer.prune_rows_deferred(len as usize).map_err(ProviderError::other)?; break } @@ -1045,7 +1066,9 @@ impl StaticFileProviderRW { self.writer.user_header_mut().prune(remaining_rows); // Truncate data - self.writer.prune_rows(remaining_rows as usize).map_err(ProviderError::other)?; + self.writer + .prune_rows_deferred(remaining_rows as usize) + .map_err(ProviderError::other)?; remaining_rows = 0; } } From 76bde994b0b3ead8116accf5a6777e413a2abda4 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov Date: Mon, 9 Nov 2026 22:57:41 +0000 Subject: [PATCH 067/100] chore(deps): bump evm2 to 0b448ca (#28389) --- Cargo.lock | 22 +++++++++++----------- Cargo.toml | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac5e6196eed..28120bd7727 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3699,7 +3699,7 @@ dependencies = [ [[package]] name = "evm2" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -3740,7 +3740,7 @@ dependencies = [ [[package]] name = "evm2-inspectors" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "alloy-consensus", "alloy-eip2930", @@ -3763,7 +3763,7 @@ dependencies = [ [[package]] name = "evm2-jit" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "evm2", "evm2-jit-backend", @@ -3778,7 +3778,7 @@ dependencies = [ [[package]] name = "evm2-jit-backend" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "eyre", "ruint", @@ -3787,12 +3787,12 @@ dependencies = [ [[package]] name = "evm2-jit-build" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" [[package]] name = "evm2-jit-builtins" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "alloy-primitives", "evm2", @@ -3805,7 +3805,7 @@ dependencies = [ [[package]] name = "evm2-jit-codegen" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "alloy-primitives", "bitflags 2.13.2", @@ -3828,7 +3828,7 @@ dependencies = [ [[package]] name = "evm2-jit-context" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "alloy-primitives", "evm2", @@ -3838,7 +3838,7 @@ dependencies = [ [[package]] name = "evm2-jit-llvm" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "alloy-primitives", "cc", @@ -3851,7 +3851,7 @@ dependencies = [ [[package]] name = "evm2-jit-runtime" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -3877,7 +3877,7 @@ dependencies = [ [[package]] name = "evm2-macros" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=37fb326b91a76dd07308c703b3f3c85152a6230b#37fb326b91a76dd07308c703b3f3c85152a6230b" +source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 08e67499f81..1f1fe5b3f2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -434,9 +434,9 @@ reth-trie-sparse = { path = "crates/trie/sparse", default-features = false } reth-zstd-compressors = { version = "0.8.2", default-features = false } # evm2 -evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b", default-features = false } -evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b", default-features = false } -evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b", default-features = false } +evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea", default-features = false } +evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea", default-features = false } +evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea", default-features = false } # eth alloy-dyn-abi = "1.6.1" @@ -672,9 +672,9 @@ ipnet = "2.11" # evm2 is patched through its pre-transfer URL, which redirects to alloy-rs/evm2, because Cargo # rejects a patch from the same source. [patch."https://github.com/alloy-rs/evm2"] -evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b" } -evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b" } -evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "37fb326b91a76dd07308c703b3f3c85152a6230b" } +evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea" } +evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea" } +evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea" } [patch.crates-io] # reth-core From 2bfbd38134bd6bcac4fcbd4437c93ff5c9d7e268 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 9 Nov 2026 23:02:05 +0000 Subject: [PATCH 068/100] fix(txpool): refresh validator head on deep canonical commits (#28359) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/transaction-pool/src/maintain.rs | 96 ++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 10 deletions(-) diff --git a/crates/transaction-pool/src/maintain.rs b/crates/transaction-pool/src/maintain.rs index bc387f8a3d5..ba66b9d5704 100644 --- a/crates/transaction-pool/src/maintain.rs +++ b/crates/transaction-pool/src/maintain.rs @@ -472,14 +472,17 @@ pub async fn maintain_transaction_pool( if depth > max_update_depth { maintained_state = MaintainedPoolState::Drifted; debug!(target: "txpool", ?depth, "skipping deep canonical update"); - let info = BlockInfo { - block_gas_limit: tip.header().gas_limit(), - last_seen_block_hash: tip.hash(), - last_seen_block_number: tip.number(), - pending_basefee: pending_block_base_fee, - pending_blob_fee: pending_block_blob_fee, + // move the pool and the validator to the new tip without updating accounts or + // removing mined transactions + let update = CanonicalStateUpdate { + new_tip: tip.sealed_block(), + pending_block_base_fee, + pending_block_blob_fee, + changed_accounts: Vec::new(), + mined_transactions: Vec::new(), + update_kind: PoolUpdateKind::Commit, }; - pool.set_block_info(info); + pool.on_canonical_state_change(update); // keep track of mined blob transactions blob_store_tracker.add_new_chain_blocks(&blocks); @@ -863,14 +866,20 @@ pub async fn backup_local_transactions_task

( mod tests { use super::*; use crate::{ - blobstore::InMemoryBlobStore, validate::EthTransactionValidatorBuilder, + blobstore::InMemoryBlobStore, + error::{InvalidPoolTransactionError, PoolErrorKind}, + test_utils::TransactionBuilder, + validate::EthTransactionValidatorBuilder, CoinbaseTipOrdering, EthPooledTransaction, Pool, TransactionOrigin, }; + use alloy_consensus::Header; use alloy_eips::{eip1559::ETHEREUM_BLOCK_GAS_LIMIT_30M, eip2718::Decodable2718}; - use alloy_primitives::{address, hex, U256}; - use reth_ethereum_primitives::PooledTransactionVariant; + use alloy_primitives::{address, hex, B256, U256}; + use reth_ethereum_primitives::{Block, PooledTransactionVariant}; use reth_evm_ethereum::EthEvmConfig; + use reth_execution_types::Chain; use reth_fs_util as fs; + use reth_primitives_traits::{RecoveredBlock, SealedBlock}; use reth_provider::test_utils::{ExtendedAccount, MockEthProvider}; use reth_tasks::Runtime; @@ -933,6 +942,73 @@ mod tests { temp_dir.close().unwrap(); } + #[tokio::test(flavor = "multi_thread")] + async fn deep_commit_refreshes_validator_head() { + // mainnet genesis has a 5,000 gas limit, which the validator picks up from the latest + // header + let provider = MockEthProvider::default().with_genesis_block(); + let transaction = EthPooledTransaction::try_from_consensus( + TransactionBuilder::default() + .gas_limit(21_000) + .max_fee_per_gas(1_000_000_000) + .to(Address::ZERO) + .into_eip1559() + .try_into_recovered() + .unwrap(), + ) + .unwrap(); + provider.add_account(transaction.sender(), ExtendedAccount::new(0, U256::MAX)); + let blob_store = InMemoryBlobStore::default(); + let validator = + EthTransactionValidatorBuilder::new(provider.clone(), EthEvmConfig::mainnet()) + .build(blob_store.clone()); + let txpool = + Pool::new(validator, CoinbaseTipOrdering::default(), blob_store, Default::default()); + + let err = txpool + .add_transaction(TransactionOrigin::External, transaction.clone()) + .await + .unwrap_err(); + assert!(matches!( + err.kind, + PoolErrorKind::InvalidTransaction(InvalidPoolTransactionError::ExceedsGasLimit( + 21_000, 5_000 + )) + )); + + let config = MaintainPoolConfig::default(); + let tip = RecoveredBlock::::new_sealed( + SealedBlock::from_sealed_parts( + SealedHeader::new( + Header { + number: config.max_update_depth + 1, + gas_limit: ETHEREUM_BLOCK_GAS_LIMIT_30M, + ..Default::default() + }, + B256::random(), + ), + Default::default(), + ), + Default::default(), + ); + let commit: CanonStateNotification = CanonStateNotification::Commit { + new: Arc::new(Chain::new(vec![tip], Default::default(), Default::default())), + }; + let maintain = maintain_transaction_pool( + provider, + txpool.clone(), + futures::stream::iter([commit]), + Runtime::test(), + config, + ); + time::timeout(Duration::from_secs(10), maintain).await.unwrap(); + assert_eq!(txpool.block_info().last_seen_block_number, config.max_update_depth + 1); + + let hash = *transaction.hash(); + let added = txpool.add_transaction(TransactionOrigin::External, transaction).await.unwrap(); + assert_eq!(added.hash, hash); + } + #[test] fn test_update_with_higher_finalized_block() { let mut tracker = FinalizedBlockTracker::new(Some(10)); From e81d6ac764548e5b09d3bec4f89f3b9ed32325a5 Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Tue, 10 Nov 2026 10:34:33 +0000 Subject: [PATCH 069/100] ci: add nightly evm2 auto-update workflow (#28382) --- .github/scripts/amp-run.sh | 21 ++ .github/scripts/evm2-fix-loop.sh | 51 ++++ .github/sts/update-evm2.sts.yaml | 12 + .github/workflows/update-evm2.yml | 411 ++++++++++++++++++++++++++++++ 4 files changed, 495 insertions(+) create mode 100755 .github/scripts/amp-run.sh create mode 100755 .github/scripts/evm2-fix-loop.sh create mode 100644 .github/sts/update-evm2.sts.yaml create mode 100644 .github/workflows/update-evm2.yml diff --git a/.github/scripts/amp-run.sh b/.github/scripts/amp-run.sh new file mode 100755 index 00000000000..f930a58a4de --- /dev/null +++ b/.github/scripts/amp-run.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# Runs amp with --stream-json, logs its thread URL and prints only the final result, so callers can +# capture it. Exits non-zero when Amp fails (Update evm2 workflow). +set -uo pipefail + +OUTPUT=$(amp "$@" --stream-json 2>&1) +AMP_EXIT=$? +THREAD_ID=$(echo "$OUTPUT" | head -1 | jq -r '.session_id // empty' 2>/dev/null) +if [ -n "$THREAD_ID" ]; then + echo "Amp thread: https://ampcode.com/threads/${THREAD_ID}" >&2 +fi +echo "$OUTPUT" | jq -r 'select(.type=="result") | .result // empty' 2>/dev/null +IS_ERROR=$(echo "$OUTPUT" | jq -r 'select(.type=="result") | .is_error // false' 2>/dev/null) +if [ "$AMP_EXIT" -ne 0 ] || [ "$IS_ERROR" = "true" ]; then + echo "::group::Amp errors" >&2 + echo "$OUTPUT" | jq -r 'select(.type=="error") | .message // empty' 2>/dev/null >&2 + printf '%s\n' "$OUTPUT" | awk 'substr($0,1,1)!="{" { print }' >&2 + echo "::endgroup::" >&2 + exit 1 +fi diff --git a/.github/scripts/evm2-fix-loop.sh b/.github/scripts/evm2-fix-loop.sh new file mode 100755 index 00000000000..b9da65f95db --- /dev/null +++ b/.github/scripts/evm2-fix-loop.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# +# Runs a cargo check and, while it fails, asks Amp to fix the code (Update evm2 workflow). +# Writes passed=true or passed=false to $GITHUB_OUTPUT. Never fails, so later steps still publish +# partial work. +# +# Usage: evm2-fix-loop.sh +set -uo pipefail + +CHECK="${1:?check command is required}" +PROMPT="${2:?prompt is required}" +MAX_ATTEMPTS=10 +# Two loops run per job; 45 minutes each keeps both, plus the builds, inside its 150-minute timeout. +DEADLINE=$((SECONDS + 2700)) + +run_check() { + echo "::group::$CHECK" + # Word splitting of CHECK into a command and its arguments is intended. + # shellcheck disable=SC2086 + $CHECK 2>&1 + local status=$? + echo "::endgroup::" + return "$status" +} + +if run_check; then + echo "passed=true" >> "$GITHUB_OUTPUT" + exit 0 +fi + +if ! command -v amp-run > /dev/null; then + echo "::warning::Amp is not available; leaving the failure for a person to fix" + echo "passed=false" >> "$GITHUB_OUTPUT" + exit 0 +fi + +attempt=0 +while [ "$attempt" -lt "$MAX_ATTEMPTS" ] && [ "$SECONDS" -lt "$DEADLINE" ]; do + attempt=$((attempt + 1)) + echo "::group::Amp attempt $attempt" + amp-run --dangerously-allow-all -x "$PROMPT" || echo "::warning::Amp attempt $attempt failed; checking the tree anyway" + echo "::endgroup::" + if run_check; then + echo "Passed after Amp attempt $attempt" + echo "passed=true" >> "$GITHUB_OUTPUT" + exit 0 + fi +done + +echo "::error::Still failing after $attempt Amp attempts / $((SECONDS / 60))m; publishing best effort" +echo "passed=false" >> "$GITHUB_OUTPUT" diff --git a/.github/sts/update-evm2.sts.yaml b/.github/sts/update-evm2.sts.yaml new file mode 100644 index 00000000000..f737e5f848a --- /dev/null +++ b/.github/sts/update-evm2.sts.yaml @@ -0,0 +1,12 @@ +# Allow the Update evm2 workflow's publish job (running in the evm2-auto-bump environment) to +# mint a short-lived token to push the evm2-auto-bump branch and open its pull request. The +# job_workflow_ref check pins minting to update-evm2.yml as it exists on main; the update job, +# where Amp runs, has no environment and so cannot mint one. +subject: repo:paradigmxyz@97369466/reth@537233603:environment:evm2-auto-bump +claim_pattern: + repository_id: '537233603' + event_name: '(schedule|workflow_dispatch)' + job_workflow_ref: paradigmxyz/reth/\.github/workflows/update-evm2\.yml@refs/heads/main +permissions: + contents: write + pull_requests: write diff --git a/.github/workflows/update-evm2.yml b/.github/workflows/update-evm2.yml new file mode 100644 index 00000000000..95b16709f57 --- /dev/null +++ b/.github/workflows/update-evm2.yml @@ -0,0 +1,411 @@ +# Nightly workflow to update evm2 from upstream alloy-rs/evm2 main. +# +# Bumps every alloy-rs/evm2 pin (and the DaniPopes/evm2 patch of it) to the latest evm2 main +# commit, has Amp fix what breaks, and opens or updates a PR from the evm2-auto-bump branch. +# If evm2-auto-bump already exists, it is rebased onto main first so earlier fixes are kept. +# +# The update job, where Amp runs, holds no write credentials. The publish job runs in the +# evm2-auto-bump environment, the only place .github/sts/update-evm2.sts.yaml lets mint a token +# to push the branch and open the PR. + +name: Update evm2 + +on: + schedule: + - cron: "0 3 * * *" + workflow_dispatch: + +concurrency: + group: update-evm2 + cancel-in-progress: false + +permissions: {} + +env: + BRANCH: evm2-auto-bump + CARGO_TERM_COLOR: always + RUST_BACKTRACE: full + +jobs: + update: + name: Update evm2 and fix breakage + if: github.repository == 'paradigmxyz/reth' && github.ref == 'refs/heads/main' + runs-on: depot-ubuntu-latest-16 + timeout-minutes: 150 + permissions: + contents: read + id-token: write + outputs: + bumped: ${{ steps.update.outputs.bumped }} + old_rev: ${{ steps.update.outputs.old_rev }} + new_rev: ${{ steps.update.outputs.new_rev }} + lease: ${{ steps.branch.outputs.lease }} + clippy_passed: ${{ steps.clippy-loop.outputs.passed }} + test_passed: ${{ steps.test-loop.outputs.passed }} + steps: + - name: Secure runner + uses: tempoxyz/gh-actions/actions/secure-runner@d5402286a7abdfb7232173b3228d56473feb8a66 # 2026-09-29T02-04-45Z-d5402286 + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Configure git + run: | + git config user.name "tempo-github-sts[bot]" + git config user.email "312736176+tempo-github-sts[bot]@users.noreply.github.com" + + - name: Set up working branch + id: branch + run: | + if git rev-parse --verify "origin/$BRANCH" >/dev/null 2>&1; then + # The publish job pushes only if the branch is still at this commit. + echo "lease=$(git rev-parse "origin/$BRANCH")" >> "$GITHUB_OUTPUT" + echo "Continuing on existing $BRANCH, rebasing onto main" + git checkout -B "$BRANCH" "origin/$BRANCH" + # -X ours (main during a rebase) keeps main's side of each conflicting hunk and our + # non-conflicting fixes; the fix loops below re-apply any fix this drops. + if ! git rebase -X ours origin/main; then + # Whole-file conflicts (such as modify/delete) are left: take main's side of those too. + while [ -d .git/rebase-merge ] || [ -d .git/rebase-apply ]; do + for f in $(git diff --name-only --diff-filter=U); do + echo " Accepting main version of $f" + if git checkout --ours "$f" 2>/dev/null; then git add "$f"; else git rm -q "$f"; fi + done + GIT_EDITOR=true git rebase --continue || true + done + fi + else + echo "lease=" >> "$GITHUB_OUTPUT" + echo "Creating $BRANCH from main" + git checkout -b "$BRANCH" origin/main + fi + + # When already on the latest rev, all later steps are skipped. + - name: Update evm2 rev in Cargo.toml + id: update + env: + GH_TOKEN: ${{ github.token }} + run: | + evm2_rev() { + grep -v '^[[:space:]]*#' | grep -m1 'github.com/alloy-rs/evm2", rev = ' | sed 's/.*rev = "\([^"]*\)".*/\1/' + } + BASE_REV=$(git show origin/main:Cargo.toml | evm2_rev) + CURRENT_REV=$(evm2_rev < Cargo.toml) + NEW_REV=$(gh api repos/alloy-rs/evm2/commits/main --jq '.sha') + echo "evm2 rev on main: $BASE_REV" + echo "evm2 rev on $BRANCH: $CURRENT_REV" + echo "Latest evm2 main: $NEW_REV" + + for rev in "$BASE_REV" "$CURRENT_REV" "$NEW_REV"; do + if ! [[ "$rev" =~ ^[0-9a-f]{7,40}$ ]]; then + echo "::error::Could not read evm2 rev: '$rev'" + exit 1 + fi + done + + if [[ "$NEW_REV" == "$CURRENT_REV"* ]]; then + echo "bumped=false" >> "$GITHUB_OUTPUT" + echo "Already on latest evm2 rev." + exit 0 + fi + + { + echo "bumped=true" + echo "old_rev=$BASE_REV" + echo "new_rev=$NEW_REV" + } >> "$GITHUB_OUTPUT" + + # reth patches alloy-rs/evm2 with DaniPopes/evm2 (its pre-transfer URL); keep both on the + # same rev. + find . -name Cargo.toml -not -path './target/*' -exec sed -i -E \ + "s#(github\.com/(alloy-rs|DaniPopes)/evm2\", rev = \")[0-9a-f]+\"#\1${NEW_REV}\"#g" {} + + echo "Updated evm2 rev: $CURRENT_REV -> $NEW_REV" + + - uses: tempoxyz/gh-actions/vendor/dtolnay/rust-toolchain@d5402286a7abdfb7232173b3228d56473feb8a66 # 2026-09-29T02-04-45Z-d5402286 + if: steps.update.outputs.bumped == 'true' + with: + toolchain: stable + components: clippy + - uses: rui314/setup-mold@339e96b4ff1f3bd865856ba4cbbe8818a7acb038 # v1 + if: steps.update.outputs.bumped == 'true' + - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + if: steps.update.outputs.bumped == 'true' + with: + # Restore only: this job builds unreviewed evm2 code and Amp edits, so it must not write + # the main-branch cache that CI restores. + save-if: false + - uses: tempoxyz/gh-actions/vendor/taiki-e/install-action@d5402286a7abdfb7232173b3228d56473feb8a66 # 2026-09-29T02-04-45Z-d5402286 + if: steps.update.outputs.bumped == 'true' + with: + tool: nextest,zepter + - name: Install LLVM + if: steps.update.outputs.bumped == 'true' + run: .github/scripts/install_llvm.sh ubuntu + + - name: Commit evm2 rev bump + if: steps.update.outputs.bumped == 'true' + env: + NEW_REV: ${{ steps.update.outputs.new_rev }} + run: | + # Re-resolve Cargo.lock for the new evm2 rev only. + cargo metadata --format-version 1 > /dev/null + git add -A + git commit -m "deps: bump evm2 to ${NEW_REV:0:7} ($(date -u +%Y-%m-%d))" + + - name: Install Amp CLI + if: steps.update.outputs.bumped == 'true' + env: + AMP_API_KEY: ${{ secrets.AMP_API_KEY }} + run: | + if [ -z "$AMP_API_KEY" ]; then + echo "::warning::AMP_API_KEY is not set; breakage from the bump will not be fixed automatically" + exit 0 + fi + curl -fsSL https://ampcode.com/install.sh | bash + mkdir -p "$HOME/.local/bin" + install -m 755 .github/scripts/amp-run.sh "$HOME/.local/bin/amp-run" + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + + - name: Fix clippy errors + id: clippy-loop + if: steps.update.outputs.bumped == 'true' + env: + AMP_API_KEY: ${{ secrets.AMP_API_KEY }} + RUSTFLAGS: -D warnings + CHECK: cargo clippy --workspace --lib --examples --tests --benches --all-features + run: | + PROMPT="This Rust workspace just had its evm2 dependency (alloy-rs/evm2, patched with DaniPopes/evm2) \ + updated to the latest commit on evm2's main branch, and \`RUSTFLAGS=-D warnings $CHECK\` now fails. + + Run it to see the errors, then fix the Rust source code and repeat until it passes. You may bump \ + other dependency versions in Cargo.toml files if needed (e.g. alloy), but do NOT modify the evm2 \ + rev or git source specifications in any Cargo.toml: the workflow already updated them. + + IMPORTANT: Do NOT suppress warnings with #[allow(...)]. Migrate the code to the new APIs instead; \ + read the upstream evm2 source to see what replaced removed or deprecated items." + bash .github/scripts/evm2-fix-loop.sh "$CHECK" "$PROMPT" + + - name: Fix test compilation errors + id: test-loop + if: steps.update.outputs.bumped == 'true' + env: + AMP_API_KEY: ${{ secrets.AMP_API_KEY }} + CHECK: cargo nextest run --workspace --all-features --no-run + run: | + PROMPT="This Rust workspace just had its evm2 dependency (alloy-rs/evm2, patched with DaniPopes/evm2) \ + updated to the latest commit on evm2's main branch, and test compilation (\`$CHECK\`) now fails. + + Run it to see the errors, then fix the Rust source code and repeat until the test binaries compile. \ + Also run \`cargo check --workspace\` after fixes to catch regressions. You may bump other dependency \ + versions in Cargo.toml files if needed, but do NOT modify the evm2 rev or git source specifications \ + in any Cargo.toml: the workflow already updated them. + + IMPORTANT: Do NOT suppress warnings with #[allow(...)]. Migrate the code to the new APIs instead; \ + read the upstream evm2 source to see what replaced removed or deprecated items." + bash .github/scripts/evm2-fix-loop.sh "$CHECK" "$PROMPT" + + - name: Commit source fixes + if: steps.update.outputs.bumped == 'true' + run: | + if [ -n "$(git status --porcelain)" ]; then + git add -A + git commit -m "fix: resolve breaking changes from evm2 update ($(date -u +%Y-%m-%d))" + fi + + - name: Fix zepter lint + if: steps.update.outputs.bumped == 'true' + run: | + if ! zepter run check; then + zepter + if [ -n "$(git status --porcelain)" ]; then + git add -A + git commit -m "fix: resolve zepter feature propagation from evm2 update ($(date -u +%Y-%m-%d))" + fi + fi + + - name: Write PR body + if: steps.update.outputs.bumped == 'true' + env: + GH_TOKEN: ${{ github.token }} + AMP_API_KEY: ${{ secrets.AMP_API_KEY }} + OLD_REV: ${{ steps.update.outputs.old_rev }} + NEW_REV: ${{ steps.update.outputs.new_rev }} + run: | + { + echo "Automated nightly update of evm2 from \`alloy-rs/evm2\` main." + echo "" + echo "## Upstream evm2 changes" + echo "" + echo "[\`${OLD_REV:0:7}...${NEW_REV:0:7}\`](https://github.com/alloy-rs/evm2/compare/${OLD_REV}...${NEW_REV})" + echo "" + LOG=$(gh api "repos/alloy-rs/evm2/compare/${OLD_REV}...${NEW_REV}" \ + --jq '[.commits[] | "- " + (.commit.message | split("\n")[0])] | join("\n")' 2>/dev/null || true) + SUMMARY="" + if [ -n "$LOG" ] && command -v amp-run >/dev/null; then + SUMMARY=$(echo "$LOG" | amp-run -x "Summarize these upstream evm2 commit messages into a concise \ + markdown bullet list grouped by area, with bold **Area** headers. Merge related commits into single \ + bullets and skip CI/doc-only changes unless significant. Reference PRs as full links like \ + [#123](https://github.com/alloy-rs/evm2/pull/123), never bare #123. No preamble, just the list." || true) + fi + echo "${SUMMARY:-$LOG}" + echo "" + + DIFF=$(git diff origin/main -- '*.rs' '*.toml' ':!Cargo.lock' ':!Cargo.toml' || true) + if [ -n "$DIFF" ]; then + echo "## Migrations" + echo "" + MIGRATIONS="" + if command -v amp-run >/dev/null; then + MIGRATIONS=$(echo "$DIFF" | amp-run -x "Summarize these code changes as a concise markdown bullet \ + list: what was migrated and why (e.g. API rename, parameter change, removed method). No preamble, \ + just the list." || true) + fi + echo "${MIGRATIONS:-$(git diff --stat origin/main -- '*.rs' '*.toml' ':!Cargo.lock')}" + echo "" + fi + + echo "[GitHub Workflow](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})" + } > pr-body.md + git bundle create evm2-auto-bump.bundle "origin/main..$BRANCH" + + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + if: steps.update.outputs.bumped == 'true' + with: + name: evm2-auto-bump + path: | + evm2-auto-bump.bundle + pr-body.md + retention-days: 7 + + publish: + name: Push branch and open PR + needs: update + if: needs.update.outputs.bumped == 'true' + runs-on: ubuntu-latest + environment: evm2-auto-bump + permissions: + contents: read + id-token: write + steps: + - name: Secure runner + uses: tempoxyz/gh-actions/actions/secure-runner@d5402286a7abdfb7232173b3228d56473feb8a66 # 2026-09-29T02-04-45Z-d5402286 + + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: false + + - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: evm2-auto-bump + path: ${{ runner.temp }}/evm2-auto-bump + + - name: Fetch GitHub token via STS + id: sts + uses: tempoxyz/gh-actions/actions/github-sts@68a1e4645c9596fee5398dd1e2ba07f0a4aa6a71 # 2026-10-20T04-40-18Z-68a1e464 + with: + policy: update-evm2 + + - name: Push branch and create or update PR + env: + GH_TOKEN: ${{ steps.sts.outputs.token }} + LEASE: ${{ needs.update.outputs.lease }} + NEW_REV: ${{ needs.update.outputs.new_rev }} + ARTIFACT: ${{ runner.temp }}/evm2-auto-bump + run: | + git fetch "$ARTIFACT/evm2-auto-bump.bundle" "refs/heads/$BRANCH:refs/heads/$BRANCH" + if [ "$(git rev-list --count "origin/main..$BRANCH")" = "0" ]; then + echo "No commits ahead of main; nothing to publish" + exit 0 + fi + + # The bump must never change CI: refuse to publish if it touches anything under .github/. + CHANGED=$(git diff --name-only "origin/main...$BRANCH" -- .github/) + if [ -n "$CHANGED" ]; then + echo "::error::Refusing to publish: the bump changes files under .github/:" + echo "$CHANGED" + exit 1 + fi + + # Push only if the branch is where the update job found it (absent when LEASE is empty). + gh auth setup-git + git push --force-with-lease="refs/heads/$BRANCH:$LEASE" origin "$BRANCH:refs/heads/$BRANCH" + + TITLE="deps: update evm2 to ${NEW_REV:0:7} ($(date -u +%Y-%m-%d))" + # --head matches fork PRs with the same branch name too; only take this repository's own. + PR=$(gh pr list --head "$BRANCH" --base main --state open --json number,isCrossRepository \ + --jq '[.[] | select(.isCrossRepository | not)][0].number // empty') + if [ -n "$PR" ]; then + gh pr edit "$PR" --title "$TITLE" --body-file "$ARTIFACT/pr-body.md" + else + gh pr create --head "$BRANCH" --base main --title "$TITLE" --body-file "$ARTIFACT/pr-body.md" + fi + + notify: + name: Notify Slack + needs: [update, publish] + if: >- + always() && github.repository == 'paradigmxyz/reth' && + (contains(needs.*.result, 'failure') || + needs.update.outputs.clippy_passed == 'false' || needs.update.outputs.test_passed == 'false') + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - name: Secure runner + uses: tempoxyz/gh-actions/actions/secure-runner@d5402286a7abdfb7232173b3228d56473feb8a66 # 2026-09-29T02-04-45Z-d5402286 + + - name: Notify eng-reth-alerts + env: + GH_TOKEN: ${{ github.token }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BENCH_BOT_TOKEN }} + SLACK_CHANNEL: C09KA1JNJ02 # eng-reth-alerts + OLD_REV: ${{ needs.update.outputs.old_rev }} + NEW_REV: ${{ needs.update.outputs.new_rev }} + CLIPPY_PASSED: ${{ needs.update.outputs.clippy_passed }} + TEST_PASSED: ${{ needs.update.outputs.test_passed }} + run: | + if [ -z "${SLACK_BOT_TOKEN:-}" ]; then + echo "::warning::SLACK_BOT_TOKEN is not set; skipping Slack notification" + exit 0 + fi + RUN_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + DETAILS="" + if [ -n "$OLD_REV" ] && [ -n "$NEW_REV" ]; then + DETAILS+=$'\n'"• → ()" + fi + if [ "$CLIPPY_PASSED" = "false" ]; then DETAILS+=$'\n'"• ⚠️ Clippy: unresolved errors"; fi + if [ "$TEST_PASSED" = "false" ]; then DETAILS+=$'\n'"• ⚠️ Tests: unresolved compilation errors"; fi + PR_INFO=$(gh pr list --repo "$GITHUB_REPOSITORY" --head evm2-auto-bump --base main --state open \ + --json number,url,isCrossRepository \ + --jq '[.[] | select(.isCrossRepository | not)][0] | select(.) | [.number, .url] | @tsv' 2>/dev/null || true) + if [ -n "$PR_INFO" ]; then + IFS=$'\t' read -r PR_NUMBER PR_URL <<< "$PR_INFO" + DETAILS+=$'\n'"• <${PR_URL}|PR #${PR_NUMBER}>" + fi + DETAILS+=$'\n'"• <${RUN_URL}|Workflow>" + + PAYLOAD=$(jq -n --arg channel "$SLACK_CHANNEL" --arg details "$DETAILS" '{ + channel: $channel, + text: "evm2 update failed", + unfurl_links: false, + unfurl_media: false, + attachments: [{ + color: "#e01e5a", + blocks: [{ + type: "section", + text: { type: "mrkdwn", text: ("❌ *evm2 update failed*\n" + $details) } + }] + }] + }') + RESPONSE=$(curl -sf -X POST -H "Authorization: Bearer $SLACK_BOT_TOKEN" \ + -H 'Content-type: application/json' --data "$PAYLOAD" https://slack.com/api/chat.postMessage) || { + echo "::warning::Failed to post Slack notification" + exit 0 + } + if ! jq -e '.ok == true' <<< "$RESPONSE" > /dev/null; then + echo "::warning::Slack rejected notification: $(jq -r '.error // "unknown_error"' <<< "$RESPONSE")" + fi From 5ae4d94413fdffeec1e83f8673b2f09e037693a2 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 10:34:35 +0000 Subject: [PATCH 070/100] fix(engine): offload invalid block diagnostics (#28284) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- Cargo.lock | 7 +- Cargo.toml | 1 + crates/engine/invalid-block-hooks/Cargo.toml | 9 +- crates/engine/invalid-block-hooks/src/lib.rs | 2 + .../engine/invalid-block-hooks/src/witness.rs | 636 ++++++++---------- .../builder/src/launch/invalid_block_hook.rs | 5 + 6 files changed, 291 insertions(+), 369 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28120bd7727..356e36254e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9434,15 +9434,13 @@ name = "reth-invalid-block-hooks" version = "2.10.1" dependencies = [ "alloy-consensus", - "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-rpc-types-debug", "evm2", "eyre", - "futures", "jsonrpsee", - "pretty_assertions", + "metrics", "reth-chainspec", "reth-engine-primitives", "reth-ethereum-primitives", @@ -9452,11 +9450,14 @@ dependencies = [ "reth-primitives-traits", "reth-provider", "reth-rpc-api", + "reth-tasks", "reth-testing-utils", "reth-trie", "serde", "serde_json", + "similar", "tempfile", + "tokio", "tracing", ] diff --git a/Cargo.toml b/Cargo.toml index 1f1fe5b3f2c..306985e223b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -653,6 +653,7 @@ ringbuffer = "0.16.0" rmp-serde = "1.3" roaring = "0.11.3" rolling-file = "0.2.0" +similar = { version = "2.7", default-features = false } smolgen = "0.1.1" snap = "1.1.1" socket2 = { version = "0.6", default-features = false } diff --git a/crates/engine/invalid-block-hooks/Cargo.toml b/crates/engine/invalid-block-hooks/Cargo.toml index 37b432f0339..0b40bd3d2de 100644 --- a/crates/engine/invalid-block-hooks/Cargo.toml +++ b/crates/engine/invalid-block-hooks/Cargo.toml @@ -18,6 +18,7 @@ reth-execution-types.workspace = true reth-primitives-traits.workspace = true reth-provider.workspace = true reth-rpc-api = { workspace = true, features = ["client"] } +reth-tasks.workspace = true reth-trie.workspace = true # alloy @@ -28,21 +29,23 @@ alloy-rpc-types-debug.workspace = true alloy-consensus.workspace = true # async -futures.workspace = true +tokio = { workspace = true, features = ["sync"] } # misc eyre.workspace = true jsonrpsee.workspace = true -pretty_assertions.workspace = true +metrics.workspace = true serde.workspace = true serde_json.workspace = true +similar = { workspace = true, features = ["text"] } tracing.workspace = true [dev-dependencies] -alloy-eips.workspace = true +jsonrpsee = { workspace = true, features = ["server"] } reth-chainspec.workspace = true reth-ethereum-primitives.workspace = true reth-evm-ethereum = { workspace = true, features = ["std"] } reth-provider = { workspace = true, features = ["test-utils"] } reth-testing-utils.workspace = true tempfile.workspace = true +tokio = { workspace = true, features = ["macros", "time"] } diff --git a/crates/engine/invalid-block-hooks/src/lib.rs b/crates/engine/invalid-block-hooks/src/lib.rs index 26e208da643..2b0718318d6 100644 --- a/crates/engine/invalid-block-hooks/src/lib.rs +++ b/crates/engine/invalid-block-hooks/src/lib.rs @@ -1,5 +1,7 @@ //! Invalid block hook implementations. +pub use reth_tasks::Runtime; + mod witness; pub use witness::InvalidBlockWitnessHook; diff --git a/crates/engine/invalid-block-hooks/src/witness.rs b/crates/engine/invalid-block-hooks/src/witness.rs index d1034958ca4..1fd6183c2a1 100644 --- a/crates/engine/invalid-block-hooks/src/witness.rs +++ b/crates/engine/invalid-block-hooks/src/witness.rs @@ -1,8 +1,8 @@ +use crate::Runtime; use alloy_consensus::BlockHeader; use alloy_primitives::{Address, B256, U256}; use alloy_rpc_types_debug::ExecutionWitness; use evm2::{bytecode::Bytecode, evm::AccountInfo}; -use pretty_assertions::Comparison; use reth_engine_primitives::InvalidBlockHook; use reth_evm::{database::StateProviderDatabase, ConfigureEvm, Executor}; use reth_execution_types::BundleSource; @@ -14,8 +14,19 @@ use reth_trie::{ updates::TrieUpdates, }; use serde::Serialize; -use std::{collections::BTreeMap, fmt::Debug, fs::File, io::Write, path::PathBuf}; -use tracing::warn; +use similar::TextDiff; +use std::{ + collections::BTreeMap, fmt::Debug, fs::File, io::Write, path::PathBuf, sync::Arc, + time::Duration, +}; +use tokio::sync::Semaphore; +use tracing::{debug, error, warn}; + +/// Time budget for computing a diff before the remaining lines are reported as replaced. +/// +/// The bundle state of a large block renders to hundreds of thousands of lines. Bound the +/// diff search so that one block cannot monopolize the background worker. +const DIFF_TIMEOUT: Duration = Duration::from_secs(1); /// Serializable version of `BundleState` for deterministic comparison #[derive(Debug, PartialEq, Eq)] @@ -107,8 +118,9 @@ fn sort_bundle_state_for_comparison(bundle_state: &BundleState) -> BundleStateSo /// Hook for generating execution witnesses when invalid blocks are detected. /// /// This hook captures the execution state and generates witness data that can be used -/// for debugging and analysis of invalid block execution. -#[derive(Debug)] +/// for debugging and analysis of invalid block execution. Diagnostics run on a blocking task; +/// additional invalid blocks are skipped while a task is running or queued. +#[derive(Clone, Debug)] pub struct InvalidBlockWitnessHook { /// The provider to read the historical state and do the EVM execution. provider: P, @@ -119,17 +131,31 @@ pub struct InvalidBlockWitnessHook { output_directory: PathBuf, /// The healthy node client to compare the witness against. healthy_node_client: Option, + /// Runtime for background diagnostics and shutdown-aware RPC requests. + runtime: Runtime, + /// Allows at most one diagnostic task, including across clones of the hook. + task_permit: Arc, } impl InvalidBlockWitnessHook { - /// Creates a new witness hook. - pub const fn new( + /// Creates a witness hook that runs diagnostics on the given runtime. + /// + /// If `healthy_node_client` is `None`, no remote witness comparison is performed. + pub fn new( provider: P, evm_config: E, output_directory: PathBuf, healthy_node_client: Option, + runtime: Runtime, ) -> Self { - Self { provider, evm_config, output_directory, healthy_node_client } + Self { + provider, + evm_config, + output_directory, + healthy_node_client, + runtime, + task_permit: Arc::new(Semaphore::new(1)), + } } } @@ -163,7 +189,7 @@ where } /// Handles witness generation, saving, and comparison with healthy node - fn handle_witness_operations( + async fn handle_witness_operations( &self, witness: &ExecutionWitness, block_prefix: &str, @@ -173,14 +199,12 @@ where let re_executed_witness_path = self.save_file(filename, witness)?; if let Some(healthy_node_client) = &self.healthy_node_client { - let healthy_node_witness = futures::executor::block_on(async move { - DebugApiClient::<()>::debug_execution_witness( - healthy_node_client, - block_number.into(), - None, - ) - .await - })?; + let healthy_node_witness = DebugApiClient::<()>::debug_execution_witness( + healthy_node_client, + block_number.into(), + None, + ) + .await?; let filename = format!("{}.witness.healthy.json", block_prefix); let healthy_path = self.save_file(filename, &healthy_node_witness)?; @@ -276,20 +300,21 @@ where Ok(()) } - fn on_invalid_block( + /// Runs diagnostics on a blocking executor, yielding during the healthy-node RPC request. + async fn process_invalid_block( &self, parent_header: &SealedHeader, block: &RecoveredBlock, - output: &BlockExecutionOutput, + original_state: &BundleState, trie_updates: Option<(&TrieUpdates, B256)>, ) -> eyre::Result<()> { // TODO(alexey): unify with `DebugApi::debug_execution_witness` let (witness, bundle_state, hashed_state) = self.re_execute_block(parent_header, block)?; let block_prefix = format!("{}_{}", block.number(), block.hash()); - self.handle_witness_operations(&witness, &block_prefix, block.number())?; + self.handle_witness_operations(&witness, &block_prefix, block.number()).await?; - self.validate_bundle_state(&bundle_state, &output.state, &block_prefix)?; + self.validate_bundle_state(&bundle_state, original_state, &block_prefix)?; self.validate_state_root_and_trie( parent_header, @@ -310,16 +335,23 @@ where Ok(path) } - /// Compares two values and saves their diff to a file in the output directory - fn save_diff( + /// Compares the debug output of two values and saves their unified line diff to a file in the + /// output directory. + /// + /// Myers' algorithm keeps memory linear in the input size, and [`DIFF_TIMEOUT`] bounds its + /// running time. + fn save_diff( &self, filename: String, original: &T, new: &T, ) -> eyre::Result { let path = self.output_directory.join(filename); - let diff = Comparison::new(original, new); - File::create(&path)?.write_all(diff.to_string().as_bytes())?; + let original = format!("{original:#?}\n"); + let new = format!("{new:#?}\n"); + let diff = TextDiff::configure().timeout(DIFF_TIMEOUT).diff_lines(&original, &new); + File::create(&path)? + .write_all(diff.unified_diff().header("original", "new").to_string().as_bytes())?; Ok(path) } @@ -327,7 +359,7 @@ where impl InvalidBlockHook for InvalidBlockWitnessHook where - P: StateProviderFactory + 'static, + P: StateProviderFactory + Clone + 'static, E: ConfigureEvm + 'static, { fn on_invalid_block( @@ -337,24 +369,57 @@ where output: &BlockExecutionOutput, trie_updates: Option<(&TrieUpdates, B256)>, ) { - if let Err(err) = self.on_invalid_block(parent_header, block, output, trie_updates) { - warn!(target: "engine::invalid_block_hooks::witness", %err, "Failed to invoke hook"); - } + // Reserve capacity before cloning potentially large diagnostic inputs. + let Ok(permit) = self.task_permit.clone().try_acquire_owned() else { + metrics::counter!("engine.invalid_block_hooks.witness.skipped_blocks_total") + .increment(1); + debug!(target: "engine::invalid_block_hooks::witness", block_hash = %block.hash(), "Skipping diagnostics while witness hook is busy"); + return + }; + + let hook = self.clone(); + let parent_header = parent_header.clone(); + let block = block.clone(); + let original_state = output.state.clone(); + let trie_updates = trie_updates.map(|(updates, root)| (updates.clone(), root)); + self.runtime.spawn_blocking_task(async move { + let _permit = permit; + debug!(target: "engine::invalid_block_hooks::witness", block_hash = %block.hash(), "Starting witness diagnostics"); + if let Err(err) = hook + .process_invalid_block( + &parent_header, + &block, + &original_state, + trie_updates.as_ref().map(|(updates, root)| (updates, *root)), + ) + .await + { + error!(target: "engine::invalid_block_hooks::witness", block_hash = %block.hash(), %err, "Failed to invoke hook"); + } + debug!(target: "engine::invalid_block_hooks::witness", block_hash = %block.hash(), "Finished witness diagnostics"); + }); } } #[cfg(test)] mod tests { use super::*; - use alloy_eips::eip7685::Requests; + use alloy_consensus::Header; use alloy_primitives::{map::HashMap, Bytes, B256, U256}; use evm2::evm::{CacheDB, EmptyDB}; + use jsonrpsee::{ + core::RpcResult, + http_client::{HttpClient, HttpClientBuilder}, + server::{ServerBuilder, ServerHandle}, + RpcModule, + }; use reth_chainspec::ChainSpec; - use reth_ethereum_primitives::EthPrimitives; + use reth_ethereum_primitives::{Block, EthPrimitives}; use reth_evm_ethereum::EthEvmConfig; use reth_provider::test_utils::MockEthProvider; use reth_trie::bundle_state::{AccountRevert, BundleAccount}; use tempfile::TempDir; + use tokio::{sync::Notify, time::timeout}; use reth_testing_utils::generators::{self, random_block, random_eoa_accounts, BlockParams}; use std::collections::HashSet; @@ -436,63 +501,12 @@ mod tests { #[test] fn test_sort_bundle_state_for_comparison() { - // Use the fixture function to create test data - let bundle_state = create_bundle_state(); - - // Call the function under test - let sorted = sort_bundle_state_for_comparison(&bundle_state); - - // Verify state_size and reverts_size values match the fixture + let sorted = sort_bundle_state_for_comparison(&create_bundle_state()); assert_eq!(sorted.state_size, 3); assert_eq!(sorted.reverts_size, 2); - - // Verify state contains our mock accounts - assert_eq!(sorted.state.len(), 3); // We added 3 accounts - - // Verify contracts contains our mock contracts - assert_eq!(sorted.contracts.len(), 3); // We added 3 contracts - - // Verify reverts is an array with multiple blocks of reverts - let reverts = &sorted.reverts; - assert_eq!(reverts.len(), 2); // Fixture has two blocks of reverts - - // Verify that the state accounts have the expected structure - for account_data in sorted.state.values() { - // BundleAccountSorted has info, original_info, storage, and status fields - // Just verify the structure exists by accessing the fields - let _info = &account_data.info; - let _original_info = &account_data.original_info; - let _storage = &account_data.storage; - let _status = &account_data.status; - } - } - - #[test] - fn test_re_execute_block() { - // Create hook instance - let (hook, _output_directory, _temp_dir) = create_test_hook(); - - // Setup to call re_execute_block - let mut rng = generators::rng(); - let parent_header = generators::random_header(&mut rng, 1, None); - - // Create a random block that inherits from the parent header - let recovered_block = random_block( - &mut rng, - 2, // block number - BlockParams { - parent: Some(parent_header.hash()), - tx_count: Some(0), - ..Default::default() - }, - ) - .try_recover() - .unwrap(); - - let result = hook.re_execute_block(&parent_header, &recovered_block); - - // Verify the function behavior with mock data - assert!(result.is_ok(), "re_execute_block should return Ok"); + assert_eq!(sorted.state.len(), 3); + assert_eq!(sorted.contracts.len(), 3); + assert_eq!(sorted.reverts.len(), 2); } /// Creates test `InvalidBlockWitnessHook` with temporary directory @@ -507,69 +521,29 @@ mod tests { let provider = MockEthProvider::::default(); let evm_config = EthEvmConfig::mainnet(); - let hook = - InvalidBlockWitnessHook::new(provider, evm_config, output_directory.clone(), None); + let hook = InvalidBlockWitnessHook::new( + provider, + evm_config, + output_directory.clone(), + None, + Runtime::test(), + ); (hook, output_directory, temp_dir) } - #[test] - fn test_handle_witness_operations_with_healthy_client_mock() { - // Create hook instance with mock healthy client - let (hook, output_directory, _temp_dir) = create_test_hook(); - - // Create sample ExecutionWitness with correct types - let witness = ExecutionWitness { - state: vec![Bytes::from("state_data")], - codes: vec![Bytes::from("code_data")], - keys: vec![Bytes::from("key_data")], - ..Default::default() - }; - - // Call handle_witness_operations - let result = hook.handle_witness_operations(&witness, "test_block_healthy", 67890); - - // Should succeed - assert!(result.is_ok()); - - // Check that witness file was created - let witness_file = output_directory.join("test_block_healthy.witness.re_executed.json"); - assert!(witness_file.exists()); - } - - #[test] - fn test_handle_witness_operations_file_creation() { - // Test file creation and content validation - let (hook, output_directory, _temp_dir) = create_test_hook(); - + #[tokio::test] + async fn test_handle_witness_operations_file_creation() { + let (hook, output_dir, _temp_dir) = create_test_hook(); let witness = ExecutionWitness { - state: vec![Bytes::from("test_state")], - codes: vec![Bytes::from("test_code")], - keys: vec![Bytes::from("test_key")], + state: vec![Bytes::from("state")], + codes: vec![Bytes::from("code")], + keys: vec![Bytes::from("key")], ..Default::default() }; - - let block_prefix = "file_test_block"; - let block_number = 11111; - - // Call handle_witness_operations - let result = hook.handle_witness_operations(&witness, block_prefix, block_number); - assert!(result.is_ok()); - - // Verify file was created with correct name - let expected_file = - output_directory.join(format!("{}.witness.re_executed.json", block_prefix)); - assert!(expected_file.exists()); - - // Read and verify file content is valid JSON and contains witness structure - let file_content = std::fs::read_to_string(&expected_file).expect("Failed to read file"); - let parsed_witness: serde_json::Value = - serde_json::from_str(&file_content).expect("File should contain valid JSON"); - - // Verify the JSON structure contains expected fields - assert!(parsed_witness.get("state").is_some(), "JSON should contain 'state' field"); - assert!(parsed_witness.get("codes").is_some(), "JSON should contain 'codes' field"); - assert!(parsed_witness.get("keys").is_some(), "JSON should contain 'keys' field"); + hook.handle_witness_operations(&witness, "block", 0).await.unwrap(); + let saved = std::fs::read(output_dir.join("block.witness.re_executed.json")).unwrap(); + assert_eq!(serde_json::from_slice::(&saved).unwrap(), witness); } #[test] @@ -594,28 +568,19 @@ mod tests { #[test] fn test_validate_bundle_state_matching() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); - let bundle_state = create_bundle_state(); - let block_prefix = "test_block_123"; - - // Test with identical states - should not produce any warnings or files - let result = hook.validate_bundle_state(&bundle_state, &bundle_state, block_prefix); - assert!(result.is_ok()); + let (hook, output_dir, _temp_dir) = create_test_hook(); + for state in [BundleState::default(), create_bundle_state()] { + hook.validate_bundle_state(&state, &state, "matching").unwrap(); + assert_eq!(output_dir.read_dir().unwrap().count(), 0); + } } #[test] fn test_validate_bundle_state_mismatch() { let (hook, output_dir, _temp_dir) = create_test_hook(); let original_state = create_bundle_state(); - let mut modified_state = create_bundle_state(); - - // Modify the state to create a mismatch - let addr = Address::repeat_byte(1u8); - if let Some(account) = modified_state.state.get_mut(&addr) && - let Some(info) = &mut account.info - { - info.balance = U256::from(999); - } + let mut modified_state = original_state.clone(); + modified_state.state.values_mut().next().unwrap().info.as_mut().unwrap().nonce ^= 1; let block_prefix = "test_block_mismatch"; @@ -658,23 +623,11 @@ mod tests { #[test] fn test_validate_state_root_and_trie_with_trie_updates() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); + let (hook, output_dir, _temp_dir) = create_test_hook(); let bundle_state = create_bundle_state(); // Generate test data - let mut rng = generators::rng(); - let parent_header = generators::random_header(&mut rng, 1, None); - let recovered_block = random_block( - &mut rng, - 2, - BlockParams { - parent: Some(parent_header.hash()), - tx_count: Some(0), - ..Default::default() - }, - ) - .try_recover() - .unwrap(); + let (parent_header, recovered_block) = invalid_block_fixture(2); let trie_updates = create_test_trie_updates(); let original_root = B256::repeat_byte(2u8); // Different from what will be computed @@ -689,125 +642,17 @@ mod tests { Some((&trie_updates, original_root)), block_prefix, ); - assert!(result.is_ok()); - } - - #[test] - fn test_on_invalid_block_calls_all_validation_methods() { - let (hook, output_dir, _temp_dir) = create_test_hook(); - let bundle_state = create_bundle_state(); - - // Generate test data - let mut rng = generators::rng(); - let parent_header = generators::random_header(&mut rng, 1, None); - let recovered_block = random_block( - &mut rng, - 2, - BlockParams { - parent: Some(parent_header.hash()), - tx_count: Some(0), - ..Default::default() - }, - ) - .try_recover() - .unwrap(); - - // Create mock BlockExecutionOutput - let output = BlockExecutionOutput::new( - reth_provider::BlockExecutionResult { - receipts: vec![], - requests: Requests::default(), - gas_used: 0, - blob_gas_used: 0, - }, - bundle_state, - ); - - // Create test trie updates - let trie_updates = create_test_trie_updates(); - let state_root = B256::random(); - - // Test that on_invalid_block attempts to call all its internal methods - // by checking that it doesn't panic and tries to create files - let files_before = output_dir.read_dir().unwrap().count(); - - let _result = hook.on_invalid_block( - &parent_header, - &recovered_block, - &output, - Some((&trie_updates, state_root)), - ); - - // Verify that the function attempted to process the block: - // Either it succeeded, or it created some output files during processing - let files_after = output_dir.read_dir().unwrap().count(); - - // The function should attempt to execute its workflow - assert!( - files_after >= files_before, - "on_invalid_block should attempt to create output files during processing" - ); - } - - #[test] - fn test_handle_witness_operations_with_empty_witness() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); - let witness = ExecutionWitness::default(); - let block_prefix = "empty_witness_test"; - let block_number = 12345; - - let result = hook.handle_witness_operations(&witness, block_prefix, block_number); - assert!(result.is_ok()); - } - - #[test] - fn test_handle_witness_operations_with_zero_block_number() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); - let witness = ExecutionWitness { - state: vec![Bytes::from("test_state")], - codes: vec![Bytes::from("test_code")], - keys: vec![Bytes::from("test_key")], - ..Default::default() - }; - let block_prefix = "zero_block_test"; - let block_number = 0; - - let result = hook.handle_witness_operations(&witness, block_prefix, block_number); - assert!(result.is_ok()); - } - - #[test] - fn test_handle_witness_operations_with_large_witness_data() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); - let large_data = vec![0u8; 10000]; // 10KB of data - let witness = ExecutionWitness { - state: vec![Bytes::from(large_data.clone())], - codes: vec![Bytes::from(large_data.clone())], - keys: vec![Bytes::from(large_data)], - ..Default::default() - }; - let block_prefix = "large_witness_test"; - let block_number = 999999; - - let result = hook.handle_witness_operations(&witness, block_prefix, block_number); - assert!(result.is_ok()); - } - - #[test] - fn test_validate_bundle_state_with_empty_states() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); - let empty_state = BundleState::default(); - let block_prefix = "empty_states_test"; - - let result = hook.validate_bundle_state(&empty_state, &empty_state, block_prefix); - assert!(result.is_ok()); + result.unwrap(); + assert!(output_dir.join(format!("{block_prefix}.state_root.diff")).exists()); + assert!(output_dir.join(format!("{block_prefix}.trie_updates.original.json")).exists()); + assert!(output_dir.join(format!("{block_prefix}.trie_updates.re_executed.json")).exists()); } #[test] fn test_validate_bundle_state_with_different_contract_counts() { let (hook, output_dir, _temp_dir) = create_test_hook(); let state1 = create_bundle_state(); - let mut state2 = create_bundle_state(); + let mut state2 = state1.clone(); // Add extra contract to state2 let extra_contract_hash = B256::random(); @@ -826,37 +671,20 @@ mod tests { } #[test] - fn test_save_diff_with_identical_values() { - let (hook, output_dir, _temp_dir) = create_test_hook(); - let value1 = "identical_value"; - let value2 = "identical_value"; - let filename = "identical_diff_test".to_string(); - - let result = hook.save_diff(filename.clone(), &value1, &value2); - assert!(result.is_ok()); - - let diff_file = output_dir.join(filename); - assert!(diff_file.exists()); + fn test_save_diff() { + let (hook, _output_dir, _temp_dir) = create_test_hook(); + for (new, expected) in [(1, ""), (2, "--- original\n+++ new\n@@ -1 +1 @@\n-1\n+2\n")] { + let path = hook.save_diff("diff".to_string(), &1, &new).unwrap(); + assert_eq!(std::fs::read_to_string(path).unwrap(), expected); + } } #[test] fn test_validate_state_root_and_trie_without_trie_updates() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); + let (hook, output_dir, _temp_dir) = create_test_hook(); let bundle_state = create_bundle_state(); - let mut rng = generators::rng(); - let parent_header = generators::random_header(&mut rng, 1, None); - let recovered_block = random_block( - &mut rng, - 2, - BlockParams { - parent: Some(parent_header.hash()), - tx_count: Some(0), - ..Default::default() - }, - ) - .try_recover() - .unwrap(); + let (parent_header, recovered_block) = invalid_block_fixture(2); let block_prefix = "no_trie_updates_test"; let hashed_state = hashed_state_for_bundle_state(bundle_state); @@ -869,71 +697,153 @@ mod tests { None, block_prefix, ); - assert!(result.is_ok()); + result.unwrap(); + assert_eq!(output_dir.read_dir().unwrap().count(), 0); } #[test] - fn test_complete_invalid_block_workflow() { + fn test_save_diff_large_bundle_state() { + const ACCOUNTS: usize = 3_000; let (hook, _output_dir, _temp_dir) = create_test_hook(); - let mut rng = generators::rng(); - - // Create a realistic block scenario - let parent_header = generators::random_header(&mut rng, 100, None); - let invalid_block = random_block( - &mut rng, - 101, - BlockParams { - parent: Some(parent_header.hash()), - tx_count: Some(3), - ..Default::default() - }, - ) - .try_recover() - .unwrap(); - - let bundle_state = create_bundle_state(); - let trie_updates = create_test_trie_updates(); - - // Test validation methods - let validation_result = - hook.validate_bundle_state(&bundle_state, &bundle_state, "integration_test"); - assert!(validation_result.is_ok(), "Bundle state validation should succeed"); + let original = sort_bundle_state_for_comparison(&create_transfer_bundle_state(ACCOUNTS, 0)); + let new = + sort_bundle_state_for_comparison(&create_transfer_bundle_state(ACCOUNTS, ACCOUNTS)); + + // Every account differs, so the changed region spans the whole state. A quadratic line + // diff of it would allocate tens of gigabytes. + let path = hook.save_diff("large_diff_test".to_string(), &original, &new).unwrap(); + + let diff = std::fs::read_to_string(path).unwrap(); + let added: HashSet<_> = + diff.lines().filter_map(|line| line.strip_prefix('+')).map(str::trim).collect(); + for balance in ACCOUNTS..2 * ACCOUNTS { + assert!(added.contains(format!("balance: {balance},").as_str())); + } + } - let state_root_result = hook.validate_state_root_and_trie( - &parent_header, - &invalid_block, - hashed_state_for_bundle_state(bundle_state), - Some((&trie_updates, B256::random())), - "integration_test", - ); - assert!(state_root_result.is_ok(), "State root validation should succeed"); + /// Creates a `BundleState` of `accounts` funded accounts, offsetting every balance by + /// `balance_offset`. + fn create_transfer_bundle_state(accounts: usize, balance_offset: usize) -> BundleState { + let mut bundle_state = BundleState::default(); + for i in 0..accounts { + bundle_state.state.insert( + Address::from_word(B256::from(U256::from(i))), + BundleAccount { + info: Some(AccountInfo { + balance: U256::from(i + balance_offset), + ..Default::default() + }), + original_info: None, + storage: HashMap::default(), + status: AccountStatus::Changed, + }, + ); + } + bundle_state.state_size = accounts; + bundle_state } - #[test] - fn test_integration_workflow_components() { - let (hook, _output_dir, _temp_dir) = create_test_hook(); + #[tokio::test] + async fn test_on_invalid_block_runs_in_background_and_skips_while_busy() { + let (mut hook, output_dir, _temp_dir) = create_test_hook(); + let (client, server, requested, respond) = healthy_node_server().await; + hook.healthy_node_client = Some(client); + let (parent, block) = invalid_block_fixture(2); + let (skipped_parent, skipped_block) = invalid_block_fixture(3); + let output = BlockExecutionOutput::default(); + let healthy_path = output_dir.join(format!("2_{}.witness.healthy.json", block.hash())); + let skipped_path = + output_dir.join(format!("3_{}.witness.re_executed.json", skipped_block.hash())); + + hook.on_invalid_block(&parent, &block, &output, None); + timeout(Duration::from_secs(10), requested.notified()).await.unwrap(); + assert!(!healthy_path.exists()); + + // Clones share the admission limit and must not queue another diagnostic job. + hook.clone().on_invalid_block(&skipped_parent, &skipped_block, &output, None); + respond.notify_one(); + drop(timeout(Duration::from_secs(10), hook.task_permit.acquire()).await.unwrap().unwrap()); + assert!(healthy_path.exists()); + assert!(!skipped_path.exists()); + + hook.healthy_node_client = None; + hook.on_invalid_block(&skipped_parent, &skipped_block, &output, None); + drop(timeout(Duration::from_secs(10), hook.task_permit.acquire()).await.unwrap().unwrap()); + assert!(skipped_path.exists()); + server.stop().unwrap(); + timeout(Duration::from_secs(10), server.stopped()).await.unwrap(); + } + + #[tokio::test] + async fn test_on_invalid_block_releases_capacity_after_error() { + let (mut hook, output_dir, _temp_dir) = create_test_hook(); + let (parent, block) = invalid_block_fixture(2); + let output = BlockExecutionOutput::default(); + hook.output_directory = output_dir.join("missing"); + + hook.on_invalid_block(&parent, &block, &output, None); + drop(timeout(Duration::from_secs(10), hook.task_permit.acquire()).await.unwrap().unwrap()); + assert!(!hook.output_directory.exists()); + + hook.output_directory = output_dir.clone(); + hook.on_invalid_block(&parent, &block, &output, None); + drop(timeout(Duration::from_secs(10), hook.task_permit.acquire()).await.unwrap().unwrap()); + assert!(output_dir + .join(format!("{}_{}.witness.re_executed.json", block.number(), block.hash())) + .exists()); + } + + #[tokio::test] + async fn test_on_invalid_block_cancels_rpc_on_shutdown() { + let (mut hook, output_dir, _temp_dir) = create_test_hook(); + let (client, server, requested, respond) = healthy_node_server().await; + hook.healthy_node_client = Some(client); + let (parent, block) = invalid_block_fixture(2); + + hook.on_invalid_block(&parent, &block, &BlockExecutionOutput::default(), None); + timeout(Duration::from_secs(10), requested.notified()).await.unwrap(); + drop(hook.runtime.initiate_graceful_shutdown().unwrap()); + drop(timeout(Duration::from_secs(10), hook.task_permit.acquire()).await.unwrap().unwrap()); + assert!(!output_dir + .join(format!("{}_{}.witness.healthy.json", block.number(), block.hash())) + .exists()); + + respond.notify_one(); + server.stop().unwrap(); + timeout(Duration::from_secs(10), server.stopped()).await.unwrap(); + } + + fn invalid_block_fixture(number: u64) -> (SealedHeader

, RecoveredBlock) { let mut rng = generators::rng(); - - // Create test data - let parent_header = generators::random_header(&mut rng, 50, None); - let _invalid_block = random_block( + let parent = generators::random_header(&mut rng, number - 1, None); + let block = random_block( &mut rng, - 51, - BlockParams { - parent: Some(parent_header.hash()), - tx_count: Some(2), - ..Default::default() - }, + number, + BlockParams { parent: Some(parent.hash()), tx_count: Some(0), ..Default::default() }, ) .try_recover() .unwrap(); + (parent, block) + } - let bundle_state = create_bundle_state(); - let _trie_updates = create_test_trie_updates(); - - // Test individual components that would be part of the complete flow - let validation_result = - hook.validate_bundle_state(&bundle_state, &bundle_state, "integration_component_test"); - assert!(validation_result.is_ok(), "Component validation should succeed"); + async fn healthy_node_server() -> (HttpClient, ServerHandle, Arc, Arc) { + let requested = Arc::new(Notify::new()); + let respond = Arc::new(Notify::new()); + let server = ServerBuilder::default().build("127.0.0.1:0").await.unwrap(); + let client = HttpClientBuilder::default() + .build(format!("http://{}", server.local_addr().unwrap())) + .unwrap(); + let mut module = RpcModule::new((requested.clone(), respond.clone())); + module + .register_async_method("debug_executionWitness", |_, context, _| async move { + context.0.notify_one(); + context.1.notified().await; + RpcResult::Ok(ExecutionWitness { + codes: vec![Bytes::from_static(b"healthy node code")], + ..Default::default() + }) + }) + .unwrap(); + (client, server.start(module), requested, respond) } } diff --git a/crates/node/builder/src/launch/invalid_block_hook.rs b/crates/node/builder/src/launch/invalid_block_hook.rs index 280c8676f9e..0a24c9d0627 100644 --- a/crates/node/builder/src/launch/invalid_block_hook.rs +++ b/crates/node/builder/src/launch/invalid_block_hook.rs @@ -16,6 +16,7 @@ use reth_node_core::{ use reth_primitives_traits::NodePrimitives; use reth_provider::ChainSpecProvider; use reth_rpc_api::EthApiClient; +use reth_tasks::Runtime; /// Extension trait for [`AddOnsContext`] to create invalid block hooks. pub trait InvalidBlockHookExt { @@ -46,6 +47,7 @@ where self.node.provider().clone(), self.node.evm_config().clone(), self.node.provider().chain_spec().chain().id(), + self.node.task_executor().clone(), ) .await } @@ -64,12 +66,14 @@ where /// * `provider` - The blockchain database provider /// * `evm_config` - The EVM configuration /// * `chain_id` - The chain ID for verification +/// * `runtime` - The runtime for background diagnostics and shutdown handling. pub async fn create_invalid_block_hook( config: &NodeConfig, data_dir: &ChainPath, provider: P, evm_config: E, chain_id: u64, + runtime: Runtime, ) -> eyre::Result>> where N: NodePrimitives, @@ -96,6 +100,7 @@ where evm_config.clone(), output_directory, healthy_node_rpc_client.clone(), + runtime.clone(), )), InvalidBlockHookType::PreState | InvalidBlockHookType::Opcode => { eyre::bail!("invalid block hook {hook:?} is not implemented yet"); From 562a2b2fba58e99a9275f95677d0e58e43aa4327 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 10:34:44 +0000 Subject: [PATCH 071/100] fix(engine): cap invalid block hook output on disk (#28286) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- Cargo.lock | 1 + crates/engine/invalid-block-hooks/Cargo.toml | 1 + .../engine/invalid-block-hooks/src/witness.rs | 109 +++++++++++++++++- 3 files changed, 108 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 356e36254e6..439ef4b4c62 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9447,6 +9447,7 @@ dependencies = [ "reth-evm", "reth-evm-ethereum", "reth-execution-types", + "reth-fs-util", "reth-primitives-traits", "reth-provider", "reth-rpc-api", diff --git a/crates/engine/invalid-block-hooks/Cargo.toml b/crates/engine/invalid-block-hooks/Cargo.toml index 0b40bd3d2de..d609310af42 100644 --- a/crates/engine/invalid-block-hooks/Cargo.toml +++ b/crates/engine/invalid-block-hooks/Cargo.toml @@ -15,6 +15,7 @@ workspace = true reth-engine-primitives.workspace = true reth-evm = { workspace = true, features = ["witness"] } reth-execution-types.workspace = true +reth-fs-util.workspace = true reth-primitives-traits.workspace = true reth-provider.workspace = true reth-rpc-api = { workspace = true, features = ["client"] } diff --git a/crates/engine/invalid-block-hooks/src/witness.rs b/crates/engine/invalid-block-hooks/src/witness.rs index 1fd6183c2a1..dcc725676d8 100644 --- a/crates/engine/invalid-block-hooks/src/witness.rs +++ b/crates/engine/invalid-block-hooks/src/witness.rs @@ -16,7 +16,12 @@ use reth_trie::{ use serde::Serialize; use similar::TextDiff; use std::{ - collections::BTreeMap, fmt::Debug, fs::File, io::Write, path::PathBuf, sync::Arc, + collections::BTreeMap, + fmt::Debug, + fs::File, + io::{BufWriter, Write}, + path::{Path, PathBuf}, + sync::Arc, time::Duration, }; use tokio::sync::Semaphore; @@ -28,6 +33,9 @@ use tracing::{debug, error, warn}; /// diff search so that one block cannot monopolize the background worker. const DIFF_TIMEOUT: Duration = Duration::from_secs(1); +/// Number of invalid blocks whose output files are kept in the output directory. +const MAX_RETAINED_BLOCKS: usize = 100; + /// Serializable version of `BundleState` for deterministic comparison #[derive(Debug, PartialEq, Eq)] struct BundleStateSorted { @@ -119,7 +127,8 @@ fn sort_bundle_state_for_comparison(bundle_state: &BundleState) -> BundleStateSo /// /// This hook captures the execution state and generates witness data that can be used /// for debugging and analysis of invalid block execution. Diagnostics run on a blocking task; -/// additional invalid blocks are skipped while a task is running or queued. +/// additional invalid blocks are skipped while a task is running or queued. Only the output of +/// the highest invalid blocks is kept. #[derive(Clone, Debug)] pub struct InvalidBlockWitnessHook { /// The provider to read the historical state and do the EVM execution. @@ -308,6 +317,10 @@ where original_state: &BundleState, trie_updates: Option<(&TrieUpdates, B256)>, ) -> eyre::Result<()> { + if let Err(err) = prune_output(&self.output_directory) { + error!(target: "engine::invalid_block_hooks::witness", %err, "Failed to prune hook output"); + } + // TODO(alexey): unify with `DebugApi::debug_execution_witness` let (witness, bundle_state, hashed_state) = self.re_execute_block(parent_header, block)?; @@ -330,7 +343,9 @@ where /// Serializes and saves a value to a JSON file in the output directory fn save_file(&self, filename: String, value: &T) -> eyre::Result { let path = self.output_directory.join(filename); - File::create(&path)?.write_all(serde_json::to_string(value)?.as_bytes())?; + let mut writer = BufWriter::new(File::create(&path)?); + serde_json::to_writer(&mut writer, value)?; + writer.flush()?; Ok(path) } @@ -401,6 +416,31 @@ where } } +/// Removes the output files of all but the highest blocks, so that the output of +/// [`MAX_RETAINED_BLOCKS`] blocks remains once the next block is written. +/// +/// Only files named `{block_number}_{block_hash}.*` are considered, others are left alone. +fn prune_output(output_directory: &Path) -> eyre::Result<()> { + let mut blocks = BTreeMap::<(u64, String), Vec>::new(); + for entry in reth_fs_util::read_dir(output_directory)? { + let entry = entry?; + let file_name = entry.file_name(); + if let Some((prefix, _)) = file_name.to_str().and_then(|name| name.split_once('.')) && + let Some((number, hash)) = prefix.split_once('_') && + let Ok(number) = number.parse::() && + hash.parse::().is_ok() + { + blocks.entry((number, prefix.to_string())).or_default().push(entry.path()); + } + } + + for path in blocks.into_values().rev().skip(MAX_RETAINED_BLOCKS - 1).flatten() { + reth_fs_util::remove_file(path)?; + } + + Ok(()) +} + #[cfg(test)] mod tests { use super::*; @@ -846,4 +886,67 @@ mod tests { .unwrap(); (client, server.start(module), requested, respond) } + + #[test] + fn test_prune_output_keeps_highest_blocks() { + let temp_dir = TempDir::new().unwrap(); + let output_dir = temp_dir.path(); + let blocks = (0..MAX_RETAINED_BLOCKS as u64 + 2) + .map(|number| { + let prefix = format!("{number}_{}", B256::with_last_byte(number as u8)); + let files = [ + output_dir.join(format!("{prefix}.witness.re_executed.json")), + output_dir.join(format!("{prefix}.bundle_state.diff")), + ]; + for path in &files { + File::create(path).unwrap(); + } + files + }) + .collect::>(); + let unrelated = output_dir.join("notes.txt"); + File::create(&unrelated).unwrap(); + + prune_output(output_dir).unwrap(); + + // Room is left for one more block, so the three lowest blocks are removed. + for (number, files) in blocks.iter().enumerate() { + for path in files { + assert_eq!(path.exists(), number >= 3, "{}", path.display()); + } + } + assert!(unrelated.exists()); + } + + #[tokio::test] + async fn test_on_invalid_block_prunes_old_output() { + let (hook, output_dir, _temp_dir) = create_test_hook(); + let old_blocks = (0..MAX_RETAINED_BLOCKS as u64) + .map(|number| { + let path = output_dir.join(format!( + "{number}_{}.witness.re_executed.json", + B256::with_last_byte(number as u8) + )); + File::create(&path).unwrap(); + path + }) + .collect::>(); + + let (parent_header, block) = invalid_block_fixture(100); + let output = BlockExecutionOutput::default(); + let permit = hook.task_permit.try_acquire().unwrap(); + + // Busy hooks must skip pruning as well as writing. + hook.on_invalid_block(&parent_header, &block, &output, None); + assert!(old_blocks[0].exists()); + drop(permit); + + hook.on_invalid_block(&parent_header, &block, &output, None); + drop(timeout(Duration::from_secs(10), hook.task_permit.acquire()).await.unwrap().unwrap()); + assert!(!old_blocks[0].exists()); + assert!(old_blocks[1..].iter().all(|path| path.exists())); + assert!(output_dir + .join(format!("{}_{}.witness.re_executed.json", block.number(), block.hash())) + .exists()); + } } From 56c646de7a4be8f95a8f34c2ff67ad850848169e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Tue, 10 Nov 2026 10:51:49 +0000 Subject: [PATCH 072/100] fix(trie): cap range proof node count (#28375) --- crates/trie/common/src/range_proof.rs | 57 +++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/crates/trie/common/src/range_proof.rs b/crates/trie/common/src/range_proof.rs index 2196817a406..c60cc18274b 100644 --- a/crates/trie/common/src/range_proof.rs +++ b/crates/trie/common/src/range_proof.rs @@ -12,6 +12,10 @@ use alloy_rlp::Decodable; const KEY_NIBBLES: usize = B256::len_bytes() * 2; +// Each of the two boundary paths holds at most one hashed node per key nibble plus its leaf, +// since inline nodes are never separate proof entries. +const MAX_PROOF_NODES: usize = 2 * (KEY_NIBBLES + 1); + // Coordinates proof traversal and root reconstruction through one shared frontier. struct RangeProofVerifier<'a> { // Determines which trie paths belong to the response and which remain proof-owned. @@ -26,13 +30,18 @@ struct RangeProofVerifier<'a> { impl<'a> RangeProofVerifier<'a> { // Creates a verifier with fixed bounds so traversal cannot drift from the supplied leaf range. - fn new(left: B256, right: B256, proof: &'a [Bytes], frontier: ProofFrontier) -> Self { - Self { + fn new( + left: B256, + right: B256, + proof: &'a [Bytes], + frontier: ProofFrontier, + ) -> Result { + Ok(Self { range: ProofRange::new(left, right), - nodes: ProofNodes::new(proof), + nodes: ProofNodes::new(proof)?, frontier, next: None, - } + }) } // Verifies the range by rebuilding its root, making omitted or altered leaves change the @@ -223,9 +232,13 @@ enum KeyRelation { struct ProofNodes<'a>(B256Map<&'a [u8]>); impl<'a> ProofNodes<'a> { - // Builds the proof index once to avoid rescanning it for every boundary reference. - fn new(proof: &'a [Bytes]) -> Self { - Self(proof.iter().map(|node| (keccak256(node), node.as_ref())).collect()) + // Builds the proof index once to avoid rescanning it for every boundary reference, rejecting + // peer-chosen node counts before they size the index or its hashing work. + fn new(proof: &'a [Bytes]) -> Result { + if proof.len() > MAX_PROOF_NODES { + return Err(RangeProofErrorKind::TooManyProofNodes { count: proof.len() }) + } + Ok(Self(proof.iter().map(|node| (keccak256(node), node.as_ref())).collect())) } // Resolves inline references directly and requires proof backing for hashed references. @@ -359,6 +372,12 @@ enum RangeProofErrorKind { /// Trie path the missing node was referenced from. path: Nibbles, }, + /// The proof holds more nodes than two boundary paths can reference. + #[error("range proof has {count} nodes, more than two boundary paths can reference")] + TooManyProofNodes { + /// Number of nodes in the proof. + count: usize, + }, /// An extension node consumes no nibble, so a crafted chain could recurse without descending. #[error("extension node at path {path:?} has an empty key")] EmptyExtensionKey { @@ -404,6 +423,8 @@ enum RangeProofErrorKind { /// /// When `leaves` is empty, `limit` supplies the right boundary of the authenticated empty interval. /// +/// Proofs with more nodes than the two boundary paths can reference are rejected. +/// /// Returns a lower bound for the next key, or `None` if the range exhausts the trie. pub fn verify_range_proof( root: B256, @@ -427,7 +448,7 @@ where return Ok(None) } - RangeProofVerifier::new(origin, last_key.unwrap_or(limit), proof, frontier) + RangeProofVerifier::new(origin, last_key.unwrap_or(limit), proof, frontier)? .verify(root) .map_err(Into::into) } @@ -606,6 +627,26 @@ mod tests { ); } + #[test] + fn proof_node_count_is_bounded() { + let leaves = + vec![(key(1), value(1)), (key(2), value(2)), (key(3), value(3)), (key(4), value(4))]; + let (root, mut proof) = build_proof(&leaves, &[key(2), key(3)]); + proof.resize(MAX_PROOF_NODES, Bytes::from_static(&[alloy_rlp::EMPTY_STRING_CODE])); + + assert_eq!( + verify_range_proof(root, key(2), leaves[1..3].to_vec(), &proof), + Ok(Some(key(4))) + ); + + proof.push(Bytes::from_static(&[alloy_rlp::EMPTY_STRING_CODE])); + + assert_eq!( + verify_range_proof(root, key(2), leaves[1..3].to_vec(), &proof), + Err(RangeProofErrorKind::TooManyProofNodes { count: MAX_PROOF_NODES + 1 }) + ); + } + // Reject paths before they exceed the fixed hashed-key length. #[test] fn node_paths_are_bounded_before_they_overflow_a_key() { From f13450ffd1d91f87bd0dfac45cfc0b10cd97206a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Tue, 10 Nov 2026 10:51:52 +0000 Subject: [PATCH 073/100] chore(net): drop unused eth handler peers handle (#28394) --- crates/net/network/src/builder.rs | 4 +-- crates/net/network/src/eth_requests.rs | 37 ++++---------------- crates/net/network/src/test_utils/testnet.rs | 3 +- 3 files changed, 9 insertions(+), 35 deletions(-) diff --git a/crates/net/network/src/builder.rs b/crates/net/network/src/builder.rs index 3ed5b92fac1..e92976bfede 100644 --- a/crates/net/network/src/builder.rs +++ b/crates/net/network/src/builder.rs @@ -14,7 +14,6 @@ use crate::{ }; use reth_eth_wire::{EthNetworkPrimitives, NetworkPrimitives}; use reth_metrics::common::mpsc::memory_bounded_channel; -use reth_network_api::test_utils::PeersHandleProvider; use reth_storage_api::BalProvider; use reth_transaction_pool::{BlobStore, TransactionPool}; use tokio::sync::mpsc; @@ -82,8 +81,7 @@ impl NetworkBuilder { let Self { mut network, transactions, .. } = self; let (tx, rx) = mpsc::channel(ETH_REQUEST_CHANNEL_CAPACITY); network.set_eth_request_handler(tx); - let peers = network.handle().peers_handle().clone(); - let request_handler = EthRequestHandler::new(client, peers, rx); + let request_handler = EthRequestHandler::new(client, rx); NetworkBuilder { network, request_handler, transactions } } diff --git a/crates/net/network/src/eth_requests.rs b/crates/net/network/src/eth_requests.rs index d597c67dff1..36c75cc3fee 100644 --- a/crates/net/network/src/eth_requests.rs +++ b/crates/net/network/src/eth_requests.rs @@ -20,7 +20,6 @@ use reth_eth_wire::{ GetBlockBodies, GetBlockHeaders, GetCells, GetNodeData, GetReceipts, GetReceipts70, HeadersDirection, NetworkPrimitives, NodeData, Receipts, Receipts69, Receipts70, }; -use reth_network_api::test_utils::PeersHandle; use reth_network_p2p::{ error::{RequestError, RequestResult}, snap::client::SnapResponse, @@ -105,10 +104,6 @@ pub struct EthRequestHandler { client: C, /// Blob store used for serving blob cell requests. blob_store: Box, - /// Used for reporting peers. - // TODO use to report spammers - #[expect(dead_code)] - peers: PeersHandle, /// Incoming request from the [`NetworkManager`](crate::NetworkManager). incoming_requests: ReceiverStream>, /// Metrics for the eth request handler. @@ -118,11 +113,10 @@ pub struct EthRequestHandler { // === impl EthRequestHandler === impl EthRequestHandler { /// Create a new instance - pub fn new(client: C, peers: PeersHandle, incoming: Receiver>) -> Self { + pub fn new(client: C, incoming: Receiver>) -> Self { Self { client, blob_store: Box::::default(), - peers, incoming_requests: ReceiverStream::new(incoming), metrics: Default::default(), } @@ -886,7 +880,6 @@ mod tests { use alloy_rlp::{Decodable, Encodable}; use reth_eth_wire::{message::RequestPair, EthMessage, EthStreamInner, EthVersion}; use reth_ethereum_primitives::Receipt; - use reth_network_api::test_utils::PeersHandle; use reth_primitives_traits::Account; use reth_provider::test_utils::{ExtendedAccount, MockEthProvider}; use reth_storage_api::noop::NoopProvider; @@ -1016,19 +1009,14 @@ mod tests { #[tokio::test] async fn get_cells_request_limits_blob_store_lookups() { - let (peers_tx, _) = mpsc::unbounded_channel(); let (_incoming_tx, incoming_rx) = mpsc::channel(1); let get_cells_calls = Arc::new(AtomicUsize::new(0)); let blob_store = CountingBlobStore { get_cells_calls: Arc::clone(&get_cells_calls), ..Default::default() }; - let handler = EthRequestHandler::::new( - NoopProvider::default(), - PeersHandle::new(peers_tx), - incoming_rx, - ) - .with_blob_store(Box::new(blob_store)); + let handler = EthRequestHandler::::new(NoopProvider::default(), incoming_rx) + .with_blob_store(Box::new(blob_store)); let (response, rx) = oneshot::channel(); let request = GetCells { hashes: vec![B256::ZERO; MAX_CELLS_SERVE + 1], cell_mask: B128::default() }; @@ -1048,19 +1036,14 @@ mod tests { #[test_case(127)] #[tokio::test] async fn get_cells_request_uses_little_endian_wire_mask(index: u32) { - let (peers_tx, _) = mpsc::unbounded_channel(); let (_incoming_tx, incoming_rx) = mpsc::channel(1); let numeric_mask = 1u128 << index; let blob_store = CountingBlobStore { expected_cell_mask: Some(BlobCellMask::from_bits(numeric_mask)), ..Default::default() }; - let handler = EthRequestHandler::::new( - NoopProvider::default(), - PeersHandle::new(peers_tx), - incoming_rx, - ) - .with_blob_store(Box::new(blob_store)); + let handler = EthRequestHandler::::new(NoopProvider::default(), incoming_rx) + .with_blob_store(Box::new(blob_store)); let wire_mask = B128::from(numeric_mask.to_le_bytes()); let request = GetCells { hashes: vec![B256::ZERO], cell_mask: wire_mask }; let mut encoded = Vec::new(); @@ -1081,13 +1064,8 @@ mod tests { #[tokio::test] async fn get_node_data_responds_with_empty_payload() { - let (peers_tx, _) = mpsc::unbounded_channel(); let (_incoming_tx, incoming_rx) = mpsc::channel(1); - let handler = EthRequestHandler::::new( - NoopProvider::default(), - PeersHandle::new(peers_tx), - incoming_rx, - ); + let handler = EthRequestHandler::::new(NoopProvider::default(), incoming_rx); let (response, rx) = oneshot::channel(); handler.on_node_data_request(PeerId::default(), GetNodeData(vec![B256::ZERO]), response); @@ -1100,9 +1078,8 @@ mod tests { fn snap_handler( provider: MockEthProvider, ) -> EthRequestHandler { - let (peers_tx, _) = mpsc::unbounded_channel(); let (_incoming_tx, incoming_rx) = mpsc::channel(1); - EthRequestHandler::new(provider, PeersHandle::new(peers_tx), incoming_rx) + EthRequestHandler::new(provider, incoming_rx) } #[test_case( diff --git a/crates/net/network/src/test_utils/testnet.rs b/crates/net/network/src/test_utils/testnet.rs index 7d4af469fb3..c0f031e5246 100644 --- a/crates/net/network/src/test_utils/testnet.rs +++ b/crates/net/network/src/test_utils/testnet.rs @@ -382,8 +382,7 @@ where { let (tx, rx) = channel(ETH_REQUEST_CHANNEL_CAPACITY); self.network.set_eth_request_handler(tx); - let peers = self.network.peers_handle(); - let request_handler = EthRequestHandler::new(self.client.clone(), peers, rx); + let request_handler = EthRequestHandler::new(self.client.clone(), rx); self.request_handler = Some(request_handler); } From 168b0a47704c5c71774d8941d04b6f79b3250933 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Tue, 10 Nov 2026 10:52:38 +0000 Subject: [PATCH 074/100] fix(storage): resume interrupted genesis initialization (#28376) --- crates/storage/db-common/src/init.rs | 71 ++++++++++++++++++---------- 1 file changed, 47 insertions(+), 24 deletions(-) diff --git a/crates/storage/db-common/src/init.rs b/crates/storage/db-common/src/init.rs index d8c7000daef..2afb8a64978 100644 --- a/crates/storage/db-common/src/init.rs +++ b/crates/storage/db-common/src/init.rs @@ -168,6 +168,9 @@ where /// Write the genesis block if it has not already been written with [`StorageSettings`], /// optionally validating the DB-resident genesis hash against the chainspec hash. +/// +/// Retries interrupted genesis initialization when the Headers checkpoint is absent and the +/// static files contain only the matching genesis block. pub fn init_genesis_with_settings_and_validate( factory: &PF, genesis_storage_settings: StorageSettings, @@ -208,29 +211,50 @@ where Ok(None) | Err(ProviderError::MissingStaticFileBlock(StaticFileSegment::Headers, _)) => {} Ok(Some(block_hash)) => { if block_hash == hash { - // Some users will at times attempt to re-sync from scratch by just deleting the - // database. Since `factory.block_hash` will only query the static files, we need to - // make sure that our database has been written to, and throw error if it's empty. - if factory.get_stage_checkpoint(StageId::Headers)?.is_none() { + if factory.get_stage_checkpoint(StageId::Headers)?.is_some() { + let stored = factory.storage_settings()?.unwrap_or_else(StorageSettings::v1); + if stored != genesis_storage_settings { + warn!( + target: "reth::storage", + ?stored, + requested = ?genesis_storage_settings, + "Storage settings mismatch detected. Using the stored settings from the existing database." + ); + } + + debug!("Genesis already written, skipping."); + return Ok(hash) + } + + // A static-first genesis commit can be interrupted before its MDBX transaction + // commits. The genesis MDBX writes are atomic, so an absent Headers checkpoint + // permits replay when static files contain only genesis. Reject static files + // from an already-synced node whose MDBX database was deleted. + let static_files = factory.static_file_provider(); + let has_non_genesis_static_files = StaticFileSegment::iter().any(|segment| { + static_files + .get_highest_static_file_block(segment) + .is_some_and(|block| block != genesis_block_number) || + static_files + .get_lowest_range_start(segment) + .is_some_and(|block| block != genesis_block_number) || + (segment.is_tx_based() && + static_files.get_highest_static_file_tx(segment).is_some()) + }); + if has_non_genesis_static_files { error!(target: "reth::storage", "Genesis header found on static files, but database is uninitialized."); return Err(InitStorageError::UninitializedDatabase) } - let stored = factory.storage_settings()?.unwrap_or_else(StorageSettings::v1); - if stored != genesis_storage_settings { - warn!( - target: "reth::storage", - ?stored, - requested = ?genesis_storage_settings, - "Storage settings mismatch detected. Using the stored settings from the existing database." - ); + // Genesis changesets may already have been published. Remove them before replay + // so storage v2 does not append the same genesis block twice after a restart. + for segment in + [StaticFileSegment::AccountChangeSets, StaticFileSegment::StorageChangeSets] + { + static_files.delete_segment(segment)?; } - - debug!("Genesis already written, skipping."); - return Ok(hash) - } - - if !validate_genesis_hash { + warn!(target: "reth::storage", "Resuming interrupted genesis initialization."); + } else if !validate_genesis_hash { warn!( target: "reth::storage", chainspec_hash = %hash, @@ -238,11 +262,12 @@ where "Genesis hash mismatch with chainspec; trusting DB per --debug.skip-genesis-validation" ); return Ok(block_hash) + } else { + return Err(InitStorageError::GenesisHashMismatch { + chainspec_hash: hash, + storage_hash: block_hash, + }) } - return Err(InitStorageError::GenesisHashMismatch { - chainspec_hash: hash, - storage_hash: block_hash, - }) } Err(e) => { debug!(?e); @@ -321,8 +346,6 @@ where .set_block_range(genesis_block_number, genesis_block_number); } - // `commit_unwind`` will first commit the DB and then the static file provider, which is - // necessary on `init_genesis`. provider_rw.commit()?; Ok(hash) From 2f7e87298c67cc6fdad3f25d17ac80fa3fbcbe4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Tue, 10 Nov 2026 11:09:43 +0000 Subject: [PATCH 075/100] fix(provider): refuse snap ranges on unverified state (#28392) Co-authored-by: Matthias Seitz --- .../src/providers/blockchain_provider.rs | 178 +++++++++++++----- 1 file changed, 126 insertions(+), 52 deletions(-) diff --git a/crates/storage/provider/src/providers/blockchain_provider.rs b/crates/storage/provider/src/providers/blockchain_provider.rs index 497386cd34a..4eff491a555 100644 --- a/crates/storage/provider/src/providers/blockchain_provider.rs +++ b/crates/storage/provider/src/providers/blockchain_provider.rs @@ -6,10 +6,10 @@ use crate::{ AccountReader, BalProvider, BalStoreHandle, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt, BlockSource, CanonChainTracker, CanonStateNotifications, CanonStateSubscriptions, ChainSpecProvider, ChainStateBlockReader, ChangeSetReader, - DatabaseProviderFactory, HeaderProvider, ProviderError, ProviderFactory, PruneCheckpointReader, - ReceiptProvider, ReceiptProviderIdExt, RocksDBProviderFactory, StageCheckpointReader, - StateProvider, StateProviderBox, StateProviderFactory, StateReader, StaticFileProviderFactory, - TransactionVariant, TransactionsProvider, + DatabaseProviderFactory, HeaderProvider, MetadataProvider, ProviderError, ProviderFactory, + PruneCheckpointReader, ReceiptProvider, ReceiptProviderIdExt, RocksDBProviderFactory, + StageCheckpointReader, StateProvider, StateProviderBox, StateProviderFactory, StateReader, + StaticFileProviderFactory, TransactionVariant, TransactionsProvider, }; use alloy_consensus::{transaction::TransactionMeta, BlockHeader}; use alloy_eips::{BlockHashOrNumber, BlockId, BlockNumHash, BlockNumberOrTag}; @@ -176,51 +176,54 @@ impl BlockchainProvider { )) } - /// Returns a cursor-backed state view for a state root still in canonical in-memory blocks. - fn block_state_range_provider( - &self, - state_root: B256, - ) -> ProviderResult>> { - let Some(matched) = self - .canonical_in_memory_state + /// Returns the canonical in-memory block with `state_root`. + fn block_state_by_root(&self, state_root: B256) -> Option>> { + self.canonical_in_memory_state .canonical_chain() .find(|state| state.state_root() == state_root) - else { - return Ok(None) - }; - - let state_provider_factory = OverlayStateProviderFactory::new( - self.database.clone(), - self.database.overlay_manager().overlay_builder_for_state(matched), - ); - state_provider_factory.database_provider_ro().map(Some) } - /// Returns a cursor-backed state view for a retained canonical state root. - fn historical_state_range_provider( + /// Resolves `state_root` into a range view over `provider`'s snapshot, preferring + /// `block_state` over the persisted-history fallback. + /// + /// The snap attempt is read from `provider` too, so a bootstrap committing after the snapshot + /// was taken can't slip its downloads past the check. + fn state_range_view( &self, + provider: StateRangeDbProvider, + block_state: Option>>, state_root: B256, - ) -> ProviderResult>> { - let provider = self.database.provider()?; + ) -> ProviderResult> { + if provider.snap_attempt()?.is_some_and(|attempt| !attempt.is_verified()) { + return Ok(None) + } + + // A pipeline run commits executed state before it moves `Finish`, so until then the state + // tables are ahead of every retained block. let Some(finish) = provider.get_stage_checkpoint(StageId::Finish)? else { return Ok(None) }; - let oldest = finish.block_number.saturating_sub(SNAPSHOT_STATE_RETENTION - 1); - let mut block_hash = None; + if provider + .get_stage_checkpoint(StageId::Execution)? + .is_some_and(|execution| execution.block_number > finish.block_number) + { + return Ok(None) + } - for number in (oldest..=finish.block_number).rev() { - let Some(header) = provider.sealed_header(number)? else { continue }; - if header.state_root() == state_root { - block_hash = Some(header.hash()); - break + let overlay_manager = self.database.overlay_manager(); + let overlay_builder = match block_state { + Some(state) => overlay_manager.overlay_builder_for_state(state), + None => { + let Some(block_hash) = + retained_block_hash::(&provider, finish.block_number, state_root)? + else { + return Ok(None) + }; + overlay_manager.overlay_builder(block_hash) } - } - drop(provider); + }; - let Some(block_hash) = block_hash else { return Ok(None) }; - let state_provider_factory = OverlayStateProviderFactory::new( - self.database.clone(), - self.database.overlay_manager().overlay_builder(block_hash), - ); - state_provider_factory.database_provider_ro().map(Some) + Ok(Some(Box::new(HistoricalStateRangeView { + provider: OverlayStateProvider::new(provider, overlay_builder), + }))) } } @@ -241,14 +244,14 @@ struct HistoricalStateRangeView { impl StateRangeProviderFactory for BlockchainProvider { /// Resolves a retained canonical state root into a pinned range view, preferring a still - /// in-memory block over the persisted-history fallback. + /// in-memory block over the persisted-history fallback. Resolves nothing while a snap attempt + /// is unverified, since no root describes its partially downloaded state, or while the + /// `Execution` checkpoint is ahead of `Finish`. fn state_range_provider(&self, state_root: B256) -> ProviderResult> { - let provider = match self.block_state_range_provider(state_root)? { - Some(provider) => Some(provider), - None => self.historical_state_range_provider(state_root)?, - }; - Ok(provider - .map(|provider| Box::new(HistoricalStateRangeView { provider }) as StateRangeView)) + // Persisted blocks leave memory only after their commit, so a canonical root missed here is + // already visible to a snapshot opened afterwards. + let block_state = self.block_state_by_root(state_root); + self.state_range_view(self.database.provider()?, block_state, state_root) } } @@ -363,6 +366,24 @@ impl StateRangeProvider for HistoricalStateRangeView { } } +/// Returns the hash of the canonical block with `state_root` among those retained up to `finish`, +/// as seen by `provider`. +fn retained_block_hash( + provider: &StateRangeDbProvider, + finish: BlockNumber, + state_root: B256, +) -> ProviderResult> { + let oldest = finish.saturating_sub(SNAPSHOT_STATE_RETENTION - 1); + + for number in (oldest..=finish).rev() { + let Some(header) = provider.sealed_header(number)? else { continue }; + if header.state_root() == state_root { + return Ok(Some(header.hash())) + } + } + Ok(None) +} + impl DatabaseProviderFactory for BlockchainProvider { type DB = N::DB; type Provider = as DatabaseProviderFactory>::Provider; @@ -1082,7 +1103,7 @@ mod tests { CanonicalInMemoryState, ExecutedBlock, NewCanonicalChain, }; use reth_chainspec::{ChainSpec, MAINNET}; - use reth_db_api::models::{AccountBeforeTx, StoredBlockBodyIndices}; + use reth_db_api::models::{AccountBeforeTx, SnapAttempt, StoredBlockBodyIndices}; use reth_errors::ProviderError; use reth_ethereum_primitives::{Block, Receipt}; use reth_execution_types::{ @@ -1095,10 +1116,11 @@ mod tests { use reth_storage_api::{ BlockBodyIndicesProvider, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt, BlockSource, ChangeSetReader, DBProvider, DatabaseProviderFactory, - HashingWriter, HeaderProvider, RangeEnd, ReceiptProvider, ReceiptProviderIdExt, - StageCheckpointWriter, StateProviderFactory, StateRangeProvider, StateRangeProviderFactory, - StateRootProvider, StateWriteConfig, StateWriter, StorageRootProvider, StorageSettings, - StorageSettingsCache, TransactionVariant, TransactionsProvider, TrieWriter, + HashingWriter, HeaderProvider, MetadataWriter, RangeEnd, ReceiptProvider, + ReceiptProviderIdExt, StageCheckpointWriter, StateProviderFactory, StateRangeProvider, + StateRangeProviderFactory, StateRootProvider, StateWriteConfig, StateWriter, + StorageRootProvider, StorageSettings, StorageSettingsCache, TransactionVariant, + TransactionsProvider, TrieWriter, }; use reth_testing_utils::generators::{ self, random_block, random_block_range, random_changeset_range, random_eoa_accounts, @@ -3100,6 +3122,36 @@ mod tests { Ok(()) } + #[test] + fn state_range_view_checks_snap_attempt_on_its_snapshot() -> eyre::Result<()> { + let factory = test_provider_factory_with_genesis()?; + let provider = BlockchainProvider::new(factory.clone())?; + let (address, account) = random_account(1); + let mut attempt = SnapAttempt::start(None, BlockNumHash::default(), B256::ZERO); + + // A snapshot taken before the attempt starts keeps serving, without its downloads. + let before_attempt = factory.provider()?; + let provider_rw = factory.provider_rw()?; + provider_rw.write_snap_attempt(&attempt)?; + provider_rw.insert_account_for_hashing([(address, Some(account))])?; + provider_rw.commit()?; + let state = provider + .state_range_view(before_attempt, None, EMPTY_ROOT_HASH)? + .expect("snapshot holds no attempt"); + assert_eq!(state.account_range(B256::ZERO, B256::repeat_byte(0xff), 10_000)?.items, []); + + // A snapshot taken while the attempt is unverified stays refused after verification. + let unverified = factory.provider()?; + attempt.verify(); + let provider_rw = factory.provider_rw()?; + provider_rw.write_snap_attempt(&attempt)?; + provider_rw.insert_account_for_hashing([(address, None)])?; + provider_rw.commit()?; + assert!(provider.state_range_view(unverified, None, EMPTY_ROOT_HASH)?.is_none()); + + Ok(()) + } + #[test] fn state_range_provider_account_range_respects_response_bytes() -> eyre::Result<()> { let factory = test_provider_factory_with_genesis()?; @@ -3231,10 +3283,32 @@ mod tests { )?; provider_rw.commit()?; - let provider = BlockchainProvider::new(factory)?; + let provider = BlockchainProvider::new(factory.clone())?; assert!(provider.state_range_provider(recent_root)?.is_some()); assert!(provider.state_range_provider(expired_root)?.is_none()); + // An unverified snap attempt owns the state tables, so no root resolves. + let mut attempt = SnapAttempt::start(None, BlockNumHash::default(), B256::ZERO); + let provider_rw = factory.provider_rw()?; + provider_rw.write_snap_attempt(&attempt)?; + provider_rw.commit()?; + assert!(provider.state_range_provider(recent_root)?.is_none()); + + attempt.verify(); + let provider_rw = factory.provider_rw()?; + provider_rw.write_snap_attempt(&attempt)?; + provider_rw.commit()?; + assert!(provider.state_range_provider(recent_root)?.is_some()); + + // State executed past `Finish` matches no retained root. + let provider_rw = factory.provider_rw()?; + provider_rw.save_stage_checkpoint( + StageId::Execution, + StageCheckpoint::new(SNAPSHOT_STATE_RETENTION + 1), + )?; + provider_rw.commit()?; + assert!(provider.state_range_provider(recent_root)?.is_none()); + Ok(()) } From 1b34b821ea1a6573d2248b7fb94aa2720294f15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Tue, 10 Nov 2026 11:12:48 +0000 Subject: [PATCH 076/100] fix(net): serve snap ranges off the eth handler (#28378) Co-authored-by: Matthias Seitz --- crates/net/network/src/eth_requests.rs | 747 ++++++++++++++++--- crates/net/network/src/metrics.rs | 4 + crates/net/network/src/test_utils/testnet.rs | 2 + etc/grafana/dashboards/overview.json | 105 +++ 4 files changed, 741 insertions(+), 117 deletions(-) diff --git a/crates/net/network/src/eth_requests.rs b/crates/net/network/src/eth_requests.rs index 36c75cc3fee..c3781c51857 100644 --- a/crates/net/network/src/eth_requests.rs +++ b/crates/net/network/src/eth_requests.rs @@ -33,13 +33,19 @@ use reth_storage_api::{ }; use reth_transaction_pool::{blobstore::NoopBlobStore, BlobStore}; use std::{ + collections::VecDeque, future::Future, pin::Pin, task::{Context, Poll}, time::Duration, }; -use tokio::sync::{mpsc::Receiver, oneshot}; +use tokio::{ + sync::{mpsc::Receiver, oneshot}, + task::JoinHandle, + time::{sleep_until, Instant, Sleep}, +}; use tokio_stream::wrappers::ReceiverStream; +use tracing::{debug, error, Span}; // Limits: @@ -80,6 +86,24 @@ pub const MAX_STORAGE_RANGE_ACCOUNTS_SERVE: usize = 1024; /// Maximum size of replies to data retrievals: 2MB pub const SOFT_RESPONSE_LIMIT: usize = 2 * 1024 * 1024; +/// Maximum number of `snap/2` account and storage range requests served at once. +/// +/// Serving an old root can rewind the trie block by block, so these requests run off the handler +/// task and are capped to keep them from starving other blocking work. +const MAX_CONCURRENT_STATE_RANGE_REQUESTS: usize = 2; + +/// Maximum number of `snap/2` range requests waiting for a serving slot, one per peer. +/// +/// They wait because snap clients read an empty response as the root being unavailable, and then +/// leave the peer alone until they retry. +const MAX_QUEUED_STATE_RANGE_REQUESTS: usize = 16; + +/// How long a `snap/2` range request may wait for a serving slot before it is answered empty. +/// +/// A requester's timeout adapts down to two seconds and also covers transit and serving, so the +/// wait takes only a fraction of it. A slot is otherwise spent on a response nobody awaits. +const STATE_RANGE_REQUEST_QUEUE_TIMEOUT: Duration = Duration::from_millis(500); + /// Upper bound on the headers reserved once the first requested header resolves. /// /// Header responses are bound by [`MAX_HEADERS_SERVE`] rather than by size, so a full batch reaches @@ -108,6 +132,8 @@ pub struct EthRequestHandler { incoming_requests: ReceiverStream>, /// Metrics for the eth request handler. metrics: EthRequestHandlerMetrics, + /// `snap/2` range requests running or waiting off the handler task. + state_range_requests: StateRangeRequests, } // === impl EthRequestHandler === @@ -119,6 +145,7 @@ impl EthRequestHandler { blob_store: Box::::default(), incoming_requests: ReceiverStream::new(incoming), metrics: Default::default(), + state_range_requests: Default::default(), } } @@ -479,18 +506,19 @@ where impl EthRequestHandler where N: NetworkPrimitives, - C: BalProvider + StateProviderFactory + StateRangeProviderFactory, + C: BalProvider + StateProviderFactory + StateRangeProviderFactory + Clone + 'static, { /// Handles `snap/2` (EIP-8189) requests. /// /// `GetAccountRange`/`GetStorageRanges` are hash-native throughout and served from retained - /// canonical roots via [`StateRangeProviderFactory`]. `GetByteCodes` is content-addressed and + /// canonical roots via [`StateRangeProviderFactory`], on blocking tasks so that rewinding an + /// old root doesn't stall other requests. `GetByteCodes` is content-addressed and /// independent of any particular state root, so it's served directly. /// `GetBlockAccessLists` is answered from the same [`BalProvider`] store eth71's /// `GetBlockAccessLists` uses, since both serve the same underlying data. fn on_snap_request( - &self, - _peer_id: PeerId, + &mut self, + peer_id: PeerId, request: SnapProtocolMessage, response: oneshot::Sender>, ) { @@ -498,20 +526,22 @@ where let result = match request { SnapProtocolMessage::GetAccountRange(req) => { - let request_id = req.request_id; - let response = self.get_account_range_response(req).unwrap_or_else(|error| { - tracing::debug!(target: "net::snap", %error, "failed to serve account range"); - AccountRangeMessage { request_id, accounts: Vec::new(), proof: Vec::new() } - }); - Ok(SnapResponse::AccountRange(response)) + return self.on_state_range_request( + peer_id, + StateRangeRequest::Account(req), + response, + ) } - SnapProtocolMessage::GetStorageRanges(req) => { - let request_id = req.request_id; - let response = self.get_storage_ranges_response(req).unwrap_or_else(|error| { - tracing::debug!(target: "net::snap", %error, "failed to serve storage ranges"); - StorageRangesMessage { request_id, slots: Vec::new(), proof: Vec::new() } - }); - Ok(SnapResponse::StorageRanges(response)) + SnapProtocolMessage::GetStorageRanges(mut req) => { + // Accounts past the serving limit are never read, so a queued request releases + // them along with the allocation the peer sized. + req.account_hashes.truncate(MAX_STORAGE_RANGE_ACCOUNTS_SERVE); + req.account_hashes.shrink_to_fit(); + return self.on_state_range_request( + peer_id, + StateRangeRequest::Storage(req), + response, + ) } SnapProtocolMessage::GetByteCodes(req) => { let codes = self @@ -544,6 +574,18 @@ where let _ = response.send(result); } + /// Hands a `snap/2` range request to [`StateRangeRequests`]. + fn on_state_range_request( + &mut self, + peer_id: PeerId, + request: StateRangeRequest, + response: oneshot::Sender>, + ) { + let incoming = + IncomingStateRangeRequest { peer_id, request, response, received: Instant::now() }; + self.state_range_requests.admit(incoming, &self.client, &self.metrics); + } + /// Returns the bytecode for each of `hashes`, skipping hashes with no known code, stopping /// once `response_bytes` (capped at [`SOFT_RESPONSE_LIMIT`]) is exceeded. fn get_byte_codes_response( @@ -574,6 +616,307 @@ where } Ok(codes) } +} + +/// Boundary-proof keys for a range reply: `origin`, plus the last returned item's key if any. +fn boundary_proof_keys(origin: B256, last: Option<&(B256, T)>) -> Vec { + match last { + Some((last, _)) => vec![origin, *last], + None => vec![origin], + } +} + +/// An endless future. +/// +/// This should be spawned or used as part of `tokio::select!`. +impl Future for EthRequestHandler +where + N: NetworkPrimitives, + C: BalProvider + + StateProviderFactory + + StateRangeProviderFactory + + BlockReader + + HeaderProvider
+ + Clone + + Unpin + + 'static, +{ + type Output = (); + + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + let this = self.get_mut(); + + // Frees the slots of finished state range tasks first, so the requests admitted below see + // them and queued requests keep their turn. + this.state_range_requests.poll(cx, &this.client, &this.metrics); + + let mut acc = Duration::ZERO; + let maybe_more_incoming_requests = metered_poll_nested_stream_with_budget!( + acc, + "net::eth", + "Incoming eth requests stream", + DEFAULT_BUDGET_TRY_DRAIN_DOWNLOADERS, + this.incoming_requests.poll_next_unpin(cx), + |incoming| { + match incoming { + IncomingEthRequest::GetBlockHeaders { peer_id, request, response } => { + this.on_headers_request(peer_id, request, response) + } + IncomingEthRequest::GetBlockBodies { peer_id, request, response } => { + this.on_bodies_request(peer_id, request, response) + } + IncomingEthRequest::GetNodeData { peer_id, request, response } => { + this.on_node_data_request(peer_id, request, response) + } + IncomingEthRequest::GetReceipts { peer_id, request, response } => { + this.on_receipts_request(peer_id, request, response) + } + IncomingEthRequest::GetReceipts69 { peer_id, request, response } => { + this.on_receipts69_request(peer_id, request, response) + } + IncomingEthRequest::GetReceipts70 { peer_id, request, response } => { + this.on_receipts70_request(peer_id, request, response) + } + IncomingEthRequest::GetBlockAccessLists { peer_id, request, response } => { + this.on_block_access_lists_request(peer_id, request, response) + } + IncomingEthRequest::GetCells { peer_id, request, response } => { + this.on_cells_request(peer_id, request, response) + } + IncomingEthRequest::GetSnap { peer_id, request, response } => { + this.on_snap_request(peer_id, request, response) + } + } + }, + ); + + this.metrics.acc_duration_poll_eth_req_handler.set(acc.as_secs_f64()); + + // Polled again so that the tasks and the queue timeout of requests admitted above wake this + // handler. + this.state_range_requests.poll(cx, &this.client, &this.metrics); + + // stream is fully drained and import futures pending + if maybe_more_incoming_requests { + // make sure we're woken up again + cx.waker().wake_by_ref(); + } + + Poll::Pending + } +} + +/// `snap/2` state range requests served off the handler task. +/// +/// Unlike other requests, serving a range for an old root rewinds the state to that block, which +/// can take seconds and would stall every peer if it ran on the handler task. +/// +/// At most [`MAX_CONCURRENT_STATE_RANGE_REQUESTS`] run at once, one per peer. A request that can't +/// start waits in a queue of at most [`MAX_QUEUED_STATE_RANGE_REQUESTS`], one place per peer, for +/// at most [`STATE_RANGE_REQUEST_QUEUE_TIMEOUT`]. +#[derive(Debug, Default)] +struct StateRangeRequests { + /// Requests being served on blocking tasks, with the peer each belongs to. + tasks: Vec<(PeerId, JoinHandle<()>)>, + /// Requests waiting for a slot in `tasks`, oldest first. + queue: VecDeque, + /// Wakes the handler when the oldest queued request times out. + queue_timeout: Option>>, +} + +impl StateRangeRequests { + /// Starts `incoming` or queues it until a slot is free. + /// + /// A request whose peer has already gone is dropped. One that finds the queue full, or its + /// peer already holding a place in it, is answered empty. + fn admit( + &mut self, + incoming: IncomingStateRangeRequest, + client: &C, + metrics: &EthRequestHandlerMetrics, + ) where + C: StateRangeProviderFactory + Clone + Send + 'static, + { + if incoming.response.is_closed() { + return + } + if self.can_start(incoming.peer_id) { + return self.spawn(incoming, client) + } + + self.remove_stale(metrics); + if self.queue.len() >= MAX_QUEUED_STATE_RANGE_REQUESTS || + self.queue.iter().any(|queued| queued.peer_id == incoming.peer_id) + { + debug!( + target: "net::snap", + peer_id=?incoming.peer_id, + queued=self.queue.len(), + "no room to queue state range request" + ); + return incoming.reply_empty(metrics) + } + self.queue.push_back(incoming); + } + + /// Returns whether a request from `peer_id` can start now. + fn can_start(&self, peer_id: PeerId) -> bool { + self.tasks.len() < MAX_CONCURRENT_STATE_RANGE_REQUESTS && + self.tasks.iter().all(|(running, _)| *running != peer_id) + } + + /// Serves `incoming` on a blocking task, which holds its peer's slot until it finishes. + fn spawn(&mut self, incoming: IncomingStateRangeRequest, client: &C) + where + C: StateRangeProviderFactory + Clone + Send + 'static, + { + let IncomingStateRangeRequest { peer_id, request, response, .. } = incoming; + let client = client.clone(); + let span = Span::current(); + let task = tokio::task::spawn_blocking(move || { + let _guard = span.enter(); + let empty = request.empty_response(); + let result = request.serve(&client).unwrap_or_else(|error| { + debug!(target: "net::snap", %error, "failed to serve state range"); + empty + }); + let _ = response.send(Ok(result)); + }); + self.tasks.push((peer_id, task)); + } + + /// Drops queued requests whose peer has gone, and answers empty those that waited longer than + /// [`STATE_RANGE_REQUEST_QUEUE_TIMEOUT`]. + fn remove_stale(&mut self, metrics: &EthRequestHandlerMetrics) { + let mut index = 0; + while index < self.queue.len() { + let queued = &self.queue[index]; + if queued.response.is_closed() { + self.queue.remove(index); + } else if queued.received.elapsed() < STATE_RANGE_REQUEST_QUEUE_TIMEOUT { + index += 1; + } else if let Some(incoming) = self.queue.remove(index) { + debug!( + target: "net::snap", + peer_id=?incoming.peer_id, + "state range request timed out in queue" + ); + incoming.reply_empty(metrics); + } + } + } + + /// Frees the slots of finished tasks and starts queued requests, oldest first, in their place. + /// + /// Registers `cx` to be woken when a task finishes or the oldest queued request times out. + fn poll(&mut self, cx: &mut Context<'_>, client: &C, metrics: &EthRequestHandlerMetrics) + where + C: StateRangeProviderFactory + Clone + Send + 'static, + { + // Runs again after starting queued requests so that their tasks wake this context, and + // after the queue timeout fires so that it is armed for the next request. + loop { + self.remove_stale(metrics); + self.tasks.retain_mut(|(_, task)| match Pin::new(task).poll(cx) { + Poll::Pending => true, + Poll::Ready(result) => { + if let Err(error) = result { + error!(target: "net::snap", %error, "state range task failed"); + } + false + } + }); + + let mut spawned = false; + let mut index = 0; + while index < self.queue.len() && self.tasks.len() < MAX_CONCURRENT_STATE_RANGE_REQUESTS + { + // A peer with a request still running keeps its place and is passed over. + if !self.can_start(self.queue[index].peer_id) { + index += 1; + } else if let Some(incoming) = self.queue.remove(index) { + self.spawn(incoming, client); + spawned = true; + } + } + if !spawned && !self.poll_queue_timeout(cx) { + break + } + } + } + + /// Arms the timeout of the oldest queued request, returning whether it already fired. + fn poll_queue_timeout(&mut self, cx: &mut Context<'_>) -> bool { + let Some(oldest) = self.queue.front() else { + self.queue_timeout = None; + return false + }; + let deadline = oldest.received + STATE_RANGE_REQUEST_QUEUE_TIMEOUT; + let timeout = self.queue_timeout.get_or_insert_with(|| Box::pin(sleep_until(deadline))); + timeout.as_mut().reset(deadline); + timeout.as_mut().poll(cx).is_ready() + } +} + +/// A `snap/2` range request waiting for, or holding, a serving slot. +#[derive(Debug)] +struct IncomingStateRangeRequest { + /// Peer that sent the request. + peer_id: PeerId, + /// The range request the peer sent. + request: StateRangeRequest, + /// Channel the response is sent on. + response: oneshot::Sender>, + /// When the request arrived, which bounds how long it may wait in the queue. + received: Instant, +} + +impl IncomingStateRangeRequest { + /// Answers the request empty without serving it. + fn reply_empty(self, metrics: &EthRequestHandlerMetrics) { + metrics.snap_state_range_requests_unserved_total.increment(1); + let _ = self.response.send(Ok(self.request.empty_response())); + } +} + +/// A `snap/2` request for a range of state at a given root. +#[derive(Debug)] +enum StateRangeRequest { + /// A `GetAccountRange` request. + Account(GetAccountRangeMessage), + /// A `GetStorageRanges` request. + Storage(GetStorageRangesMessage), +} + +impl StateRangeRequest { + /// Returns the response for a request that isn't served, which snap clients read as the root + /// being unavailable. + const fn empty_response(&self) -> SnapResponse { + match self { + Self::Account(req) => SnapResponse::AccountRange(AccountRangeMessage { + request_id: req.request_id, + accounts: Vec::new(), + proof: Vec::new(), + }), + Self::Storage(req) => SnapResponse::StorageRanges(StorageRangesMessage { + request_id: req.request_id, + slots: Vec::new(), + proof: Vec::new(), + }), + } + } + + /// Serves the range from `client`. + fn serve(self, client: &impl StateRangeProviderFactory) -> ProviderResult { + match self { + Self::Account(req) => { + Self::serve_account_range(client, req).map(SnapResponse::AccountRange) + } + Self::Storage(req) => { + Self::serve_storage_ranges(client, req).map(SnapResponse::StorageRanges) + } + } + } /// Serves a `GetAccountRange` request via [`StateRangeProviderFactory`]. /// @@ -581,8 +924,8 @@ where /// Proves the boundary between `starting_hash` and the last returned account, per snap/2's /// boundary-proof requirement, unless the range is a zero-origin range that exhausted the /// trie, in which case no proof is needed. - fn get_account_range_response( - &self, + fn serve_account_range( + client: &impl StateRangeProviderFactory, req: GetAccountRangeMessage, ) -> ProviderResult { let empty = AccountRangeMessage { @@ -592,9 +935,7 @@ where }; let response_bytes = (req.response_bytes as usize).min(SOFT_RESPONSE_LIMIT); - let Some(state) = self.client.state_range_provider(req.root_hash)? else { - return Ok(empty) - }; + let Some(state) = client.state_range_provider(req.root_hash)? else { return Ok(empty) }; let RangeResponse { items: accounts, end } = state.account_range(req.starting_hash, req.limit_hash, response_bytes)?; @@ -623,8 +964,8 @@ where /// this root makes the whole response empty, rather than skipping it and shifting later /// accounts' positions. A proof stops the response at the first account that isn't a /// complete, zero-origin range. - fn get_storage_ranges_response( - &self, + fn serve_storage_ranges( + client: &impl StateRangeProviderFactory, req: GetStorageRangesMessage, ) -> ProviderResult { let empty = StorageRangesMessage { @@ -632,9 +973,7 @@ where slots: Vec::new(), proof: Vec::new(), }; - let Some(state) = self.client.state_range_provider(req.root_hash)? else { - return Ok(empty) - }; + let Some(state) = client.state_range_provider(req.root_hash)? else { return Ok(empty) }; let mut slots: Vec> = Vec::new(); let mut proof = Vec::new(); let mut remaining_bytes = (req.response_bytes as usize).min(SOFT_RESPONSE_LIMIT); @@ -686,84 +1025,6 @@ where } } -/// Boundary-proof keys for a range reply: `origin`, plus the last returned item's key if any. -fn boundary_proof_keys(origin: B256, last: Option<&(B256, T)>) -> Vec { - match last { - Some((last, _)) => vec![origin, *last], - None => vec![origin], - } -} - -/// An endless future. -/// -/// This should be spawned or used as part of `tokio::select!`. -impl Future for EthRequestHandler -where - N: NetworkPrimitives, - C: BalProvider - + StateProviderFactory - + StateRangeProviderFactory - + BlockReader - + HeaderProvider
- + Unpin, -{ - type Output = (); - - fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - let this = self.get_mut(); - - let mut acc = Duration::ZERO; - let maybe_more_incoming_requests = metered_poll_nested_stream_with_budget!( - acc, - "net::eth", - "Incoming eth requests stream", - DEFAULT_BUDGET_TRY_DRAIN_DOWNLOADERS, - this.incoming_requests.poll_next_unpin(cx), - |incoming| { - match incoming { - IncomingEthRequest::GetBlockHeaders { peer_id, request, response } => { - this.on_headers_request(peer_id, request, response) - } - IncomingEthRequest::GetBlockBodies { peer_id, request, response } => { - this.on_bodies_request(peer_id, request, response) - } - IncomingEthRequest::GetNodeData { peer_id, request, response } => { - this.on_node_data_request(peer_id, request, response) - } - IncomingEthRequest::GetReceipts { peer_id, request, response } => { - this.on_receipts_request(peer_id, request, response) - } - IncomingEthRequest::GetReceipts69 { peer_id, request, response } => { - this.on_receipts69_request(peer_id, request, response) - } - IncomingEthRequest::GetReceipts70 { peer_id, request, response } => { - this.on_receipts70_request(peer_id, request, response) - } - IncomingEthRequest::GetBlockAccessLists { peer_id, request, response } => { - this.on_block_access_lists_request(peer_id, request, response) - } - IncomingEthRequest::GetCells { peer_id, request, response } => { - this.on_cells_request(peer_id, request, response) - } - IncomingEthRequest::GetSnap { peer_id, request, response } => { - this.on_snap_request(peer_id, request, response) - } - } - }, - ); - - this.metrics.acc_duration_poll_eth_req_handler.set(acc.as_secs_f64()); - - // stream is fully drained and import futures pending - if maybe_more_incoming_requests { - // make sure we're woken up again - cx.waker().wake_by_ref(); - } - - Poll::Pending - } -} - /// All `eth` request related to blocks delegated by the network. #[derive(Debug)] pub enum IncomingEthRequest { @@ -1126,7 +1387,7 @@ mod tests { ) { let provider = MockEthProvider::default(); provider.set_snap_state_reads_fail(true); - let handler = snap_handler(provider); + let mut handler = snap_handler(provider); let (response, rx) = oneshot::channel(); handler.on_snap_request(PeerId::default(), request, response); @@ -1137,7 +1398,7 @@ mod tests { #[tokio::test] async fn unavailable_snap_state_returns_empty_response() { let provider = MockEthProvider::default(); - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1162,6 +1423,258 @@ mod tests { assert_eq!(provider.snap_state_range_resolutions(), 1); } + fn account_range_request() -> SnapProtocolMessage { + SnapProtocolMessage::GetAccountRange(GetAccountRangeMessage { + request_id: 1, + root_hash: B256::ZERO, + starting_hash: B256::ZERO, + limit_hash: B256::repeat_byte(0xff), + response_bytes: SOFT_RESPONSE_LIMIT as u64, + }) + } + + fn empty_account_range() -> SnapResponse { + SnapResponse::AccountRange(AccountRangeMessage { + request_id: 1, + accounts: Vec::new(), + proof: Vec::new(), + }) + } + + #[tokio::test] + async fn busy_state_range_request_waits_for_a_slot() { + let provider = MockEthProvider::default(); + let mut handler = snap_handler(provider.clone()); + // Every slot is taken, and the requesting peer holds the one that finishes on `release`. + let peer_id = PeerId::default(); + let (release, released) = oneshot::channel::<()>(); + handler.state_range_requests.tasks.push(( + peer_id, + tokio::spawn(async move { + let _ = released.await; + }), + )); + let busy_peer = PeerId::repeat_byte(1); + for peer in std::iter::once(busy_peer).chain((2..).map(PeerId::repeat_byte)) { + if handler.state_range_requests.tasks.len() == MAX_CONCURRENT_STATE_RANGE_REQUESTS { + break + } + handler + .state_range_requests + .tasks + .push((peer, tokio::spawn(futures::future::pending()))); + } + // A peer whose request keeps running is queued first, and must be passed over. + let (response, mut passed_over) = oneshot::channel(); + handler.on_snap_request(busy_peer, account_range_request(), response); + let (response, mut rx) = oneshot::channel(); + handler.on_snap_request(peer_id, account_range_request(), response); + + assert_eq!(handler.state_range_requests.queue.len(), 2); + assert_eq!(provider.snap_state_range_resolutions(), 0); + + release.send(()).unwrap(); + // Only the queue is polled, so the request it starts is served and its slot freed only if + // that task wakes this one. + let EthRequestHandler { state_range_requests, client, metrics, .. } = &mut handler; + let wait = Duration::from_secs(5); + let started = Instant::now(); + let mut served = None; + tokio::time::timeout( + wait, + std::future::poll_fn(|cx| { + state_range_requests.poll(cx, client, metrics); + if served.is_none() { + served = rx.try_recv().ok(); + } + if served.is_some() && + state_range_requests.tasks.len() < MAX_CONCURRENT_STATE_RANGE_REQUESTS + { + Poll::Ready(()) + } else { + Poll::Pending + } + }), + ) + .await + .expect("queued state range request must be served once a slot frees"); + + assert!(started.elapsed() < wait, "task started from the queue must wake the poller"); + assert_eq!(served, Some(Ok(empty_account_range()))); + assert_eq!(provider.snap_state_range_resolutions(), 1); + assert_eq!(handler.state_range_requests.queue.len(), 1); + assert_eq!(passed_over.try_recv(), Err(oneshot::error::TryRecvError::Empty)); + } + + #[tokio::test] + async fn stale_queued_state_range_requests_are_not_served() { + let provider = MockEthProvider::default(); + let mut handler = snap_handler(provider.clone()); + for byte in 0..MAX_CONCURRENT_STATE_RANGE_REQUESTS as u8 { + handler + .state_range_requests + .tasks + .push((PeerId::repeat_byte(byte), tokio::spawn(futures::future::pending()))); + } + // One peer goes away while its request is queued. + let (response, gone) = oneshot::channel(); + handler.on_snap_request(PeerId::repeat_byte(0x80), account_range_request(), response); + drop(gone); + // Another request is about to time out, with nothing else left to wake the handler. + let SnapProtocolMessage::GetAccountRange(request) = account_range_request() else { + unreachable!("fixture is an account range request") + }; + let (response, mut expired) = oneshot::channel(); + handler.state_range_requests.queue.push_back(IncomingStateRangeRequest { + peer_id: PeerId::repeat_byte(0x81), + request: StateRangeRequest::Account(request), + response, + received: Instant::now() + Duration::from_millis(50) - + STATE_RANGE_REQUEST_QUEUE_TIMEOUT, + }); + + // Only the queue is polled, so nothing but its timeout can wake this task before the wait + // below gives up. + let EthRequestHandler { state_range_requests, client, metrics, .. } = &mut handler; + let wait = Duration::from_secs(5); + let started = Instant::now(); + let answer = tokio::time::timeout( + wait, + std::future::poll_fn(|cx| { + state_range_requests.poll(cx, client, metrics); + Pin::new(&mut expired).poll(cx) + }), + ) + .await + .expect("queued state range request must be answered when it times out"); + + assert!(started.elapsed() < wait, "queue timeout must wake the poller"); + assert_eq!(answer.unwrap(), Ok(empty_account_range())); + assert!(handler.state_range_requests.queue.is_empty()); + assert_eq!(provider.snap_state_range_resolutions(), 0); + } + + #[tokio::test] + async fn incoming_state_range_request_sees_slots_freed_since_the_last_poll() { + let provider = MockEthProvider::default(); + let (incoming_tx, incoming_rx) = mpsc::channel(1); + let mut handler = snap_handler(provider.clone()); + handler.incoming_requests = ReceiverStream::new(incoming_rx); + // The peer's task finished after the last poll, and it has another request queued. + let peer_id = PeerId::default(); + let finished = tokio::spawn(async {}); + while !finished.is_finished() { + tokio::task::yield_now().await; + } + handler.state_range_requests.tasks.push((peer_id, finished)); + for byte in 1..MAX_CONCURRENT_STATE_RANGE_REQUESTS as u8 { + handler + .state_range_requests + .tasks + .push((PeerId::repeat_byte(byte), tokio::spawn(futures::future::pending()))); + } + let (response, _queued) = oneshot::channel(); + handler.on_snap_request(peer_id, account_range_request(), response); + assert_eq!(handler.state_range_requests.queue.len(), 1); + + // Its next request arrives before the handler has noticed the finished task. + let (response, mut rx) = oneshot::channel(); + incoming_tx + .send(IncomingEthRequest::GetSnap { + peer_id, + request: account_range_request(), + response, + }) + .await + .unwrap(); + tokio::time::timeout( + Duration::from_secs(5), + std::future::poll_fn(|cx| { + let _ = Pin::new(&mut handler).poll(cx); + Pin::new(&mut rx).poll(cx) + }), + ) + .await + .expect("incoming state range request must be answered") + .unwrap() + .unwrap(); + + // Both requests were served in turn, neither was turned away. + assert_eq!(provider.snap_state_range_resolutions(), 2); + } + + #[tokio::test] + async fn overflowing_state_range_requests_return_empty_responses() { + let provider = MockEthProvider::default(); + let mut handler = snap_handler(provider.clone()); + for byte in 0..MAX_CONCURRENT_STATE_RANGE_REQUESTS as u8 { + handler + .state_range_requests + .tasks + .push((PeerId::repeat_byte(byte), tokio::spawn(futures::future::pending()))); + } + let queued_peer = |index: usize| PeerId::repeat_byte(0x80 + index as u8); + let (response, queued) = oneshot::channel(); + handler.on_snap_request(queued_peer(0), account_range_request(), response); + + // The peer already holds a place in the queue. + let (response, rx) = oneshot::channel(); + handler.on_snap_request(queued_peer(0), account_range_request(), response); + assert_eq!(rx.await.unwrap(), Ok(empty_account_range())); + + // The queue is full. + let mut waiting = vec![queued]; + for index in 1..MAX_QUEUED_STATE_RANGE_REQUESTS { + let (response, rx) = oneshot::channel(); + handler.on_snap_request(queued_peer(index), account_range_request(), response); + waiting.push(rx); + } + let (response, rx) = oneshot::channel(); + handler.on_snap_request(PeerId::repeat_byte(0xff), account_range_request(), response); + assert_eq!(rx.await.unwrap(), Ok(empty_account_range())); + + // Queued requests stay unanswered until a slot frees. + assert!(waiting + .iter_mut() + .all(|rx| rx.try_recv() == Err(oneshot::error::TryRecvError::Empty))); + assert_eq!(provider.snap_state_range_resolutions(), 0); + } + + #[tokio::test] + async fn state_range_request_from_gone_peer_is_dropped() { + let mut handler = snap_handler(MockEthProvider::default()); + let (response, rx) = oneshot::channel(); + drop(rx); + + handler.on_snap_request(PeerId::default(), account_range_request(), response); + + assert!(handler.state_range_requests.tasks.is_empty()); + } + + #[tokio::test] + async fn finished_state_range_request_frees_its_peer_slot() { + let mut handler = snap_handler(MockEthProvider::default()); + let (response, rx) = oneshot::channel(); + + handler.on_snap_request(PeerId::default(), account_range_request(), response); + + assert_eq!(handler.state_range_requests.tasks.len(), 1); + rx.await.unwrap().unwrap(); + tokio::time::timeout( + Duration::from_secs(5), + std::future::poll_fn(|cx| { + let _ = Pin::new(&mut handler).poll(cx); + if handler.state_range_requests.tasks.is_empty() { + Poll::Ready(()) + } else { + Poll::Pending + } + }), + ) + .await + .expect("finished state range task must free its peer slot"); + } + #[tokio::test] async fn snap_requests_return_empty_responses_on_inconsistent_provider_results() { let missing_storage_root = MockEthProvider::default(); @@ -1216,7 +1729,7 @@ mod tests { ]; for (provider, request, expected) in cases { - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request(PeerId::default(), request, response); assert_eq!(rx.await.unwrap(), Ok(expected)); @@ -1260,7 +1773,7 @@ mod tests { full_body.extend_from_slice(code_hash.as_slice()); let empty_body = Bytes::from_static(&[0xc4, 0x03, 0x04, 0x80, 0x80]); - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1307,7 +1820,7 @@ mod tests { // this wrongly-included proof would surface in the response and fail the assertion below. provider.set_snap_account_proof(Some(vec![Bytes::from_static(&[0xaa])])); - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1343,7 +1856,7 @@ mod tests { ); provider.set_snap_storage_proof(Some(proof.clone())); - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1383,7 +1896,7 @@ mod tests { let origin = B256::ZERO; let limit = B256::repeat_byte(0x22); - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1432,7 +1945,7 @@ mod tests { ExtendedAccount::new(1, U256::ZERO).with_bytecode(later_code), ); - let handler = snap_handler(provider); + let mut handler = snap_handler(provider); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1459,7 +1972,7 @@ mod tests { for _ in 0..=MAX_STORAGE_RANGE_ACCOUNTS_SERVE { provider.push_snap_storage_range(Vec::new(), RangeEnd::Exhausted); } - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1496,7 +2009,7 @@ mod tests { provider.push_snap_storage_range(vec![(hash, U256::ONE)], RangeEnd::HashLimit); provider.set_snap_storage_proof(Some(proof.clone())); - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), @@ -1532,7 +2045,7 @@ mod tests { let missing_account = B256::repeat_byte(0x01); let valid_account = B256::repeat_byte(0x02); - let handler = snap_handler(provider.clone()); + let mut handler = snap_handler(provider.clone()); let (response, rx) = oneshot::channel(); handler.on_snap_request( PeerId::default(), diff --git a/crates/net/network/src/metrics.rs b/crates/net/network/src/metrics.rs index adba83f365b..8f5d90c9279 100644 --- a/crates/net/network/src/metrics.rs +++ b/crates/net/network/src/metrics.rs @@ -563,6 +563,10 @@ pub struct EthRequestHandlerMetrics { /// Number of `snap/2` (EIP-8189) requests received pub(crate) snap_requests_received_total: Counter, + /// Number of `snap/2` state range requests answered empty without being served: the queue + /// was full, the peer already held a place in it, or the request waited too long + pub(crate) snap_state_range_requests_unserved_total: Counter, + /// Duration in seconds of call to poll /// [`EthRequestHandler`](crate::eth_requests::EthRequestHandler). pub(crate) acc_duration_poll_eth_req_handler: Gauge, diff --git a/crates/net/network/src/test_utils/testnet.rs b/crates/net/network/src/test_utils/testnet.rs index c0f031e5246..c5302261540 100644 --- a/crates/net/network/src/test_utils/testnet.rs +++ b/crates/net/network/src/test_utils/testnet.rs @@ -680,6 +680,7 @@ pub trait TestnetProvider: > + BalProvider + StateProviderFactory + StateRangeProviderFactory + + Clone + Unpin + 'static { @@ -693,6 +694,7 @@ impl TestnetProvider for T where > + BalProvider + StateProviderFactory + StateRangeProviderFactory + + Clone + Unpin + 'static { diff --git a/etc/grafana/dashboards/overview.json b/etc/grafana/dashboards/overview.json index be11d9306a3..2c06d039b22 100644 --- a/etc/grafana/dashboards/overview.json +++ b/etc/grafana/dashboards/overview.json @@ -12319,6 +12319,111 @@ ], "title": "Restarts and invalid responses", "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Snap requests received, and state range requests answered empty because the serving queue was full, the peer already held a place in it, or the request waited too long.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + } + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 399 + }, + "id": 1045, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "11.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(reth_network_snap_requests_received_total{$instance_label=\"$instance\"}[$__rate_interval])", + "legendFormat": "Requests received", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "increase(reth_network_snap_state_range_requests_unserved_total{$instance_label=\"$instance\"}[$__rate_interval])", + "legendFormat": "State range requests answered empty", + "range": true, + "refId": "B" + } + ], + "title": "Served snap requests", + "type": "timeseries" } ], "title": "Snap Sync", From 4cf928fee228f3ff6eaaa9b89784efaa6a7dfb8b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 11:13:30 +0000 Subject: [PATCH 077/100] fix(rpc): bound mev_simBundle work (#28386) --- crates/rpc/rpc/src/eth/bundle.rs | 73 ++++++++++++---- crates/rpc/rpc/src/eth/sim_bundle.rs | 121 +++++++++++++++++++++++++-- 2 files changed, 169 insertions(+), 25 deletions(-) diff --git a/crates/rpc/rpc/src/eth/bundle.rs b/crates/rpc/rpc/src/eth/bundle.rs index 7aa2e1f4b35..0c429a88b97 100644 --- a/crates/rpc/rpc/src/eth/bundle.rs +++ b/crates/rpc/rpc/src/eth/bundle.rs @@ -183,14 +183,10 @@ where .map_err(Eth::Error::from_eth_err)? .map(|acc| acc.balance) .unwrap_or_default(); - let separate_block_gas = evm_env.version().feature(evm2::EvmFeatures::EIP8037); - let tx_gas_limit_cap = evm_env.version().tx_gas_limit_cap; + let mut block_gas = BundleBlockGas::new(block_gas_limit, evm_env.version()); let mut evm = eth_api.evm_config().evm_with_env(&mut db, evm_env); let mut coinbase_balance_before_tx = initial_coinbase; let mut coinbase_balance_after_tx = initial_coinbase; - let mut total_gas_used = 0u64; - let mut regular_gas_used = 0u64; - let mut state_gas_used = 0u64; let mut total_gas_fees = U256::ZERO; let mut hasher = Keccak256::new(); @@ -200,16 +196,7 @@ where return Err(EthApiError::InternalEthError.into()) } - // Admit each transaction against the gas left in the block, like the block - // executor does: EIP-8037 keeps separate regular and state gas pools. - let regular_limit = tx.gas_limit().min(tx_gas_limit_cap); - let exceeds_block_gas = if separate_block_gas { - regular_limit > block_gas_limit.saturating_sub(regular_gas_used) || - tx.gas_limit() > block_gas_limit.saturating_sub(state_gas_used) - } else { - regular_limit > block_gas_limit.saturating_sub(total_gas_used) - }; - if exceeds_block_gas { + if !block_gas.admits(tx.gas_limit()) { return Err(EthApiError::InvalidParams( EthBundleError::BundleGasLimitExceeded(block_gas_limit).to_string(), ) @@ -246,9 +233,7 @@ where let result = evm.transact_commit(&tx_env).map_err(Eth::Error::from_evm_err)?; let gas_used = result.tx_gas_used(); - total_gas_used += gas_used; - regular_gas_used += result.execution_gas_spent(); - state_gas_used += result.state_gas_spent(); + block_gas.record(&result); let gas_fees = U256::from(gas_used) * U256::from(gas_price); total_gas_fees += gas_fees; @@ -291,6 +276,7 @@ where // populate the response + let total_gas_used = block_gas.gas_used(); let coinbase_diff = coinbase_balance_after_tx.saturating_sub(initial_coinbase); let eth_sent_to_coinbase = coinbase_diff.saturating_sub(total_gas_fees); let bundle_gas_price = @@ -361,6 +347,57 @@ pub enum EthBundleError { BundleGasLimitExceeded(u64), } +/// Gas a simulated bundle uses from the block it is simulated in. +/// +/// Transactions are admitted against the gas left in the block, like the block executor does: +/// EIP-8037 keeps separate regular and state gas pools. +#[derive(Debug)] +pub(crate) struct BundleBlockGas { + limit: u64, + tx_gas_limit_cap: u64, + separate_pools: bool, + gas_used: u64, + regular_gas_used: u64, + state_gas_used: u64, +} + +impl BundleBlockGas { + /// Creates an unused budget of `limit` gas for a block executed with `version`. + pub(crate) const fn new(limit: u64, version: &evm2::Version) -> Self { + Self { + limit, + tx_gas_limit_cap: version.tx_gas_limit_cap, + separate_pools: version.feature(evm2::EvmFeatures::EIP8037), + gas_used: 0, + regular_gas_used: 0, + state_gas_used: 0, + } + } + + /// Returns the receipt gas used by the recorded transactions. + pub(crate) const fn gas_used(&self) -> u64 { + self.gas_used + } + + /// Returns whether a transaction with `gas_limit` fits in the gas left in the block. + pub(crate) fn admits(&self, gas_limit: u64) -> bool { + let regular_limit = gas_limit.min(self.tx_gas_limit_cap); + if self.separate_pools { + regular_limit <= self.limit.saturating_sub(self.regular_gas_used) && + gas_limit <= self.limit.saturating_sub(self.state_gas_used) + } else { + regular_limit <= self.limit.saturating_sub(self.gas_used) + } + } + + /// Records the gas spent by an executed transaction. + pub(crate) const fn record(&mut self, result: &evm2::TxResultExt) { + self.gas_used += result.tx_gas_used(); + self.regular_gas_used += result.execution_gas_spent(); + self.state_gas_used += result.state_gas_spent(); + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/rpc/rpc/src/eth/sim_bundle.rs b/crates/rpc/rpc/src/eth/sim_bundle.rs index b23ae394e5b..872a0f9d556 100644 --- a/crates/rpc/rpc/src/eth/sim_bundle.rs +++ b/crates/rpc/rpc/src/eth/sim_bundle.rs @@ -1,6 +1,7 @@ //! `Eth` Sim bundle implementation and helpers. -use alloy_consensus::{transaction::TxHashRef, BlockHeader}; +use crate::eth::bundle::{BundleBlockGas, EthBundleError}; +use alloy_consensus::{transaction::TxHashRef, BlockHeader, Transaction as _}; use alloy_primitives::U256; use alloy_rpc_types_eth::{BlockId, Log}; use alloy_rpc_types_mev::{ @@ -17,9 +18,11 @@ use reth_rpc_eth_api::{ helpers::{block::LoadBlock, Call, EthTransactions}, FromEthApiError, FromEvmError, }; -use reth_rpc_eth_types::{cache::db::apply_block_overrides, EthApiError}; +use reth_rpc_eth_types::{ + cache::db::apply_block_overrides, EthApiError, RpcInvalidTransactionError, +}; use reth_storage_api::ProviderTx; -use reth_tasks::pool::BlockingTaskGuard; +use reth_tasks::{cancel::is_cancelled, pool::BlockingTaskGuard}; use reth_transaction_pool::{PoolPooledTx, PoolTransaction, TransactionPool}; use std::{sync::Arc, time::Duration}; use tracing::trace; @@ -284,6 +287,17 @@ where ) -> Result { let SimBundleOverrides { parent_block, block_overrides, .. } = overrides; + // A call gas limit of 0 disables the cap. + let call_gas_limit = self.eth_api().call_gas_limit(); + if let Some(gas_limit) = block_overrides.gas_limit && + call_gas_limit != 0 && + gas_limit > call_gas_limit + { + return Err( + EthApiError::InvalidTransaction(RpcInvalidTransactionError::GasTooHigh).into() + ) + } + // Parse and validate bundle // Also, flatten the bundle here so that its easier to process let flattened_bundle = self.parse_and_flatten_bundle(&request)?; @@ -308,12 +322,19 @@ where .map_err(EthApiError::from_eth_err)? }; + let permit = self + .eth_api() + .acquire_owned_blocking_io() + .await + .map_err(|_| EthApiError::InternalEthError)?; + let eth_api = self.inner.eth_api.clone(); let sim_response = self .inner .eth_api .spawn_with_state_at_block(parent_block_id, move |_, mut db| { + let _permit = permit; // apply overrides before reading the block values they may change apply_block_overrides(block_overrides, &mut db, &mut evm_env); @@ -330,9 +351,13 @@ where .map(|acc| acc.balance) .unwrap_or_default(); + let mut block_gas_limit = evm_env.block_env().gas_limit.saturating_to::(); + if call_gas_limit != 0 { + block_gas_limit = block_gas_limit.min(call_gas_limit); + } + let mut block_gas = BundleBlockGas::new(block_gas_limit, evm_env.version()); let mut evm = eth_api.evm_config().evm_with_env(&mut db, evm_env); let mut coinbase_balance_before_tx = initial_coinbase_balance; - let mut total_gas_used = 0; let mut total_profit = U256::ZERO; let mut refundable_value = U256::ZERO; let mut flat_logs: Vec> = Vec::new(); @@ -340,6 +365,10 @@ where let mut log_index = 0; for (tx_index, item) in flattened_bundle.iter().enumerate() { + if is_cancelled() { + return Err(EthApiError::InternalEthError.into()) + } + // Check inclusion constraints let block_number = item.inclusion.block_number(); let max_block_number = @@ -354,6 +383,13 @@ where .into()); } + if !block_gas.admits(item.tx.gas_limit()) { + return Err(EthApiError::InvalidParams( + EthBundleError::BundleGasLimitExceeded(block_gas_limit).to_string(), + ) + .into()) + } + let tx_env = eth_api.evm_config().tx_env(item.tx.clone()); let result = evm.transact_commit(&tx_env).map_err(Eth::Error::from_evm_err)?; @@ -364,8 +400,7 @@ where .into()); } - let gas_used = result.tx_gas_used(); - total_gas_used += gas_used; + block_gas.record(&result); let coinbase_balance_after_tx = evm .account_info(&coinbase) @@ -414,6 +449,8 @@ where let body_logs = if logs { Self::build_bundle_logs(&request, &flat_logs)? } else { vec![] }; + let mut total_gas_used = block_gas.gas_used(); + // After processing all transactions, process refunds for item in &flattened_bundle { if let Some(refund_percent) = item.refund_percent { @@ -564,11 +601,12 @@ mod tests { use super::*; use crate::EthApiBuilder; use alloy_consensus::{transaction::SignerRecoverable, TxEip1559}; - use alloy_eips::eip2718::Encodable2718; + use alloy_eips::{eip1559::INITIAL_BASE_FEE, eip2718::Encodable2718}; use alloy_genesis::{Genesis, GenesisAccount}; use alloy_primitives::{Address, Bytes, TxKind, B256}; use alloy_rpc_types_eth::BlockOverrides; use alloy_rpc_types_mev::{Inclusion, ProtocolVersion}; + use jsonrpsee::types::ErrorObjectOwned; use reth_chainspec::{ChainSpecBuilder, ChainSpecProvider}; use reth_db_common::init::init_genesis; use reth_evm_ethereum::EthEvmConfig; @@ -885,4 +923,73 @@ mod tests { &create_bundle_logs(&[1, 2]), )); } + + /// The bundle's gas budget is capped at the RPC call gas limit, and a limit of 0 disables the + /// cap. + #[tokio::test(flavor = "multi_thread")] + async fn sim_bundle_caps_gas_at_call_gas_limit() { + let mut rng = generators::rng(); + let key = generate_key(&mut rng); + let txs: Vec<_> = (0..2) + .map(|nonce| { + sign_tx_with_key_pair( + key, + reth_ethereum_primitives::Transaction::Eip1559(TxEip1559 { + chain_id: 1, + nonce, + gas_limit: 21_000, + max_fee_per_gas: INITIAL_BASE_FEE as u128, + to: TxKind::Call(Address::random()), + ..Default::default() + }), + ) + }) + .collect(); + let sender = txs[0].recover_signer().unwrap(); + + let genesis = Genesis::default() + .with_gas_limit(30_000_000) + .with_base_fee(Some(INITIAL_BASE_FEE as u128)) + .extend_accounts([( + sender, + GenesisAccount::default().with_balance(U256::from(10u128.pow(18))), + )]); + let chain_spec = + Arc::new(ChainSpecBuilder::mainnet().cancun_activated().genesis(genesis).build()); + let factory = create_test_provider_factory_with_chain_spec(chain_spec); + init_genesis(&factory).unwrap(); + let provider = BlockchainProvider::new(factory).unwrap(); + let api = |gas_cap: u64| { + let eth_api = EthApiBuilder::new( + provider.clone(), + testing_pool(), + NoopNetwork::default(), + EthEvmConfig::new(provider.chain_spec()), + ) + .gas_cap(gas_cap.into()) + .build(); + EthSimBundle::new(eth_api, BlockingTaskGuard::new(4)) + }; + let bundle = create_test_bundle(txs.iter().map(|tx| tx.encoded_2718().into()).collect()); + let overrides = SimBundleOverrides { + block_overrides: BlockOverrides { gas_limit: Some(21_001), ..Default::default() }, + ..Default::default() + }; + + let capped = api(21_000); + assert_eq!( + capped.sim_bundle(bundle.clone(), overrides).await.unwrap_err(), + ErrorObjectOwned::from(EthApiError::InvalidTransaction( + RpcInvalidTransactionError::GasTooHigh + )) + ); + assert_eq!( + capped.sim_bundle(bundle.clone(), SimBundleOverrides::default()).await.unwrap_err(), + ErrorObjectOwned::from(EthApiError::InvalidParams( + EthBundleError::BundleGasLimitExceeded(21_000).to_string() + )) + ); + let response = api(0).sim_bundle(bundle, SimBundleOverrides::default()).await.unwrap(); + assert_eq!(response.gas_used, 42_000); + } } From 6f6f67e2c0b0ff660ef3f2d6c6713c726baeaf54 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 12:32:46 +0000 Subject: [PATCH 078/100] fix(rpc): map consensus errors to invalid params (#28398) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/rpc/rpc/src/validation.rs | 39 +++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/crates/rpc/rpc/src/validation.rs b/crates/rpc/rpc/src/validation.rs index fbc19799034..77c7a91309a 100644 --- a/crates/rpc/rpc/src/validation.rs +++ b/crates/rpc/rpc/src/validation.rs @@ -803,16 +803,12 @@ impl From for ErrorObject<'static> { ValidationApiError::ProposerPayment | ValidationApiError::InvalidBlobsBundle | ValidationApiError::InvalidBlockAccessList(_) | - ValidationApiError::Blob(_) => invalid_params_rpc_err(error.to_string()), + ValidationApiError::Blob(_) | + ValidationApiError::Consensus(_) => invalid_params_rpc_err(error.to_string()), - ValidationApiError::Consensus( - error @ (ConsensusError::BlockAccessListCostMoreThanGasLimit(_) | - ConsensusError::BlockAccessListHashMismatch(_)), - ) => invalid_params_rpc_err(error.to_string()), ValidationApiError::MissingLatestBlock | ValidationApiError::MissingParentBlock | ValidationApiError::BlockTooOld | - ValidationApiError::Consensus(_) | ValidationApiError::Provider(_) => internal_rpc_err(error.to_string()), ValidationApiError::Execution(err) => match err { error @ BlockExecutionError::Validation(_) => { @@ -849,6 +845,7 @@ mod tests { use evm2::evm::AccountInfo; use reth_consensus::noop::NoopConsensus; use reth_engine_primitives::PayloadValidator; + use reth_errors::ConsensusError; use reth_ethereum_engine_primitives::EthPayloadTypes; use reth_ethereum_primitives::Block; use reth_evm_ethereum::EthEvmConfig; @@ -1143,6 +1140,36 @@ mod tests { assert_eq!(error.code(), jsonrpsee::types::error::INVALID_PARAMS_CODE); } + #[tokio::test] + async fn consensus_invalid_submission_is_invalid_params() { + let (provider, block, mut message) = payment_free_submission(); + // The mock provider hands out the recomputed state root from this list, so the block's + // header no longer matches it. + *provider.state_roots.lock() = vec![B256::repeat_byte(0xab)]; + // A zero-value bid skips the payment check, leaving the state root comparison as the + // first failing check. + message.value = U256::ZERO; + let registered_gas_limit = block.gas_limit(); + + let error = test_validation_api(provider) + .validate_message_against_block(block, message, registered_gas_limit, None) + .await + .unwrap_err(); + assert!( + matches!(error, ValidationApiError::Consensus(ConsensusError::BodyStateRootDiff(_))), + "{error}" + ); + let error = jsonrpsee::types::ErrorObjectOwned::from(error); + assert_eq!(error.code(), jsonrpsee::types::error::INVALID_PARAMS_CODE); + } + + #[test] + fn node_fault_is_internal_error() { + let error = + jsonrpsee::types::ErrorObjectOwned::from(ValidationApiError::MissingParentBlock); + assert_eq!(error.code(), jsonrpsee::types::error::INTERNAL_ERROR_CODE); + } + #[tokio::test] async fn test_payment_check_runs_for_a_nonzero_bid() { let (provider, block, message) = payment_free_submission(); From 7b7125825ed553e07660539a5497b1512873530d Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Tue, 10 Nov 2026 14:48:17 +0000 Subject: [PATCH 079/100] fix(mdbx): stop read monitor on environment drop (#28404) --- crates/storage/libmdbx-rs/src/environment.rs | 3 + crates/storage/libmdbx-rs/src/txn_manager.rs | 89 ++++++++++++++++++-- 2 files changed, 86 insertions(+), 6 deletions(-) diff --git a/crates/storage/libmdbx-rs/src/environment.rs b/crates/storage/libmdbx-rs/src/environment.rs index 69b758df351..dd4a32d98e8 100644 --- a/crates/storage/libmdbx-rs/src/environment.rs +++ b/crates/storage/libmdbx-rs/src/environment.rs @@ -258,6 +258,9 @@ struct EnvironmentInner { impl Drop for EnvironmentInner { fn drop(&mut self) { + #[cfg(feature = "read-tx-timeouts")] + self.txn_manager.stop_read_transaction_monitor(); + // Abort all pooled read transactions before closing the environment. self.ro_txn_pool.drain(); diff --git a/crates/storage/libmdbx-rs/src/txn_manager.rs b/crates/storage/libmdbx-rs/src/txn_manager.rs index ece338b2698..4ca68befada 100644 --- a/crates/storage/libmdbx-rs/src/txn_manager.rs +++ b/crates/storage/libmdbx-rs/src/txn_manager.rs @@ -40,7 +40,7 @@ impl fmt::Debug for TxnManagerMessage { pub(crate) struct TxnManager { sender: SyncSender, #[cfg(feature = "read-tx-timeouts")] - read_transactions: Option>, + read_transactions: Option, } impl TxnManager { @@ -128,7 +128,12 @@ mod read_transactions { use dashmap::{DashMap, DashSet}; use std::{ backtrace::Backtrace, - sync::{mpsc::sync_channel, Arc}, + ops::Deref, + sync::{ + mpsc::{channel, sync_channel, RecvTimeoutError, Sender}, + Arc, + }, + thread::JoinHandle, time::{Duration, Instant}, }; use tracing::{error, trace, warn}; @@ -143,7 +148,7 @@ mod read_transactions { duration: Duration, ) -> Self { let read_transactions = Arc::new(ReadTransactions::new(duration)); - read_transactions.clone().start_monitor(); + let read_transactions = read_transactions.start_monitor(); let (tx, rx) = sync_channel(0); @@ -154,6 +159,11 @@ mod read_transactions { txn_manager } + /// Stops and joins the read transaction monitor before the environment is closed. + pub(crate) fn stop_read_transaction_monitor(&mut self) { + drop(self.read_transactions.take()); + } + /// Adds a new transaction to the list of active read transactions. pub(crate) fn add_active_read_transaction( &self, @@ -180,6 +190,34 @@ mod read_transactions { } } + /// Owns the monitor thread and joins it when the environment is closed. + #[derive(Debug)] + pub(super) struct ReadTransactionMonitor { + transactions: Arc, + shutdown: Option>, + handle: Option>, + } + + impl Deref for ReadTransactionMonitor { + type Target = ReadTransactions; + + fn deref(&self) -> &Self::Target { + &self.transactions + } + } + + impl Drop for ReadTransactionMonitor { + fn drop(&mut self) { + // Disconnecting wakes the monitor even if it has not started waiting yet. + drop(self.shutdown.take()); + if let Some(handle) = self.handle.take() && + handle.join().is_err() + { + error!(target: "libmdbx", "Read transaction monitor panicked during shutdown"); + } + } + } + #[derive(Debug, Default)] pub(super) struct ReadTransactions { /// Maximum duration that a read transaction can be open until the @@ -229,7 +267,9 @@ mod read_transactions { /// Spawns a new [`std::thread`] that monitors the list of active read transactions and /// timeouts those that are open for longer than `ReadTransactions.max_duration`. - pub(super) fn start_monitor(self: Arc) { + pub(super) fn start_monitor(self: Arc) -> ReadTransactionMonitor { + let transactions = self.clone(); + let (shutdown, receiver) = channel(); let task = move || { let mut timed_out_active = Vec::new(); @@ -326,18 +366,24 @@ mod read_transactions { self.max_duration - max_active_transaction_duration.unwrap_or_default(), ); trace!(target: "libmdbx", ?sleep_duration, elapsed = ?now.elapsed(), "Putting transaction monitor to sleep"); - std::thread::sleep(sleep_duration); + match receiver.recv_timeout(sleep_duration) { + Err(RecvTimeoutError::Timeout) => {} + Ok(()) | Err(RecvTimeoutError::Disconnected) => break, + } } }; - std::thread::Builder::new() + let handle = std::thread::Builder::new() .name("mdbx-rs-read-tx-timeouts".to_string()) .spawn(task) .unwrap(); + + ReadTransactionMonitor { transactions, shutdown: Some(shutdown), handle: Some(handle) } } } #[cfg(test)] mod tests { + use super::*; use crate::{ txn_manager::read_transactions::READ_TRANSACTIONS_CHECK_INTERVAL, Environment, Error, MaxReadTransactionDuration, @@ -443,5 +489,36 @@ mod read_transactions { let tx = env.begin_ro_txn().unwrap(); assert!(tx.commit().is_ok()) } + + #[test] + fn read_transaction_monitor_stops_on_last_environment_drop() { + let dir = tempdir().unwrap(); + let env = Environment::builder() + .set_max_read_transaction_duration(MaxReadTransactionDuration::Set( + Duration::from_secs(60), + )) + .open(dir.path()) + .unwrap(); + let transactions = + Arc::downgrade(&env.txn_manager().read_transactions.as_ref().unwrap().transactions); + let clone = env.clone(); + drop(env); + assert!(transactions.upgrade().is_some()); + + drop(clone); + assert!(transactions.upgrade().is_none(), "monitor retained transaction state"); + } + + #[test] + fn read_transaction_monitor_shutdown_wakes_waiter() { + let transactions = Arc::new(ReadTransactions::new(Duration::from_secs(60))); + let monitor = transactions.start_monitor(); + // Retaining the state proves shutdown does not depend on its reference count. + let transactions = monitor.transactions.clone(); + let started = Instant::now(); + drop(monitor); + assert!(started.elapsed() < READ_TRANSACTIONS_CHECK_INTERVAL); + assert_eq!(Arc::strong_count(&transactions), 1); + } } } From 1721c6a0e9a085a9e0b48fd93ba06ae507c76791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Narzis?= <78718413+lean-apple@users.noreply.github.com> Date: Tue, 10 Nov 2026 14:58:45 +0000 Subject: [PATCH 080/100] fix(storage): don't cache snap trie reverts (#28401) --- .../src/providers/blockchain_provider.rs | 6 +- crates/storage/storage-overlay/src/builder.rs | 14 ++++ .../storage-overlay/src/changeset_cache.rs | 75 +++++++++++++++++-- crates/storage/storage-overlay/src/manager.rs | 3 + 4 files changed, 89 insertions(+), 9 deletions(-) diff --git a/crates/storage/provider/src/providers/blockchain_provider.rs b/crates/storage/provider/src/providers/blockchain_provider.rs index 4eff491a555..71a80b4d412 100644 --- a/crates/storage/provider/src/providers/blockchain_provider.rs +++ b/crates/storage/provider/src/providers/blockchain_provider.rs @@ -221,8 +221,12 @@ impl BlockchainProvider { } }; + // Peers choose the root, so its reverts stay out of the cache the engine shares. Ok(Some(Box::new(HistoricalStateRangeView { - provider: OverlayStateProvider::new(provider, overlay_builder), + provider: OverlayStateProvider::new( + provider, + overlay_builder.without_trie_revert_caching(), + ), }))) } } diff --git a/crates/storage/storage-overlay/src/builder.rs b/crates/storage/storage-overlay/src/builder.rs index e4bc786126c..a0442dbbe4f 100644 --- a/crates/storage/storage-overlay/src/builder.rs +++ b/crates/storage/storage-overlay/src/builder.rs @@ -197,6 +197,8 @@ pub struct OverlayBuilder { no_reverts: bool, /// Cache behavior for the overlays this builder resolves. overlay_cache_config: OverlayCacheConfig, + /// Whether the trie reverts this builder accumulates are written to the changeset cache. + write_reverts_to_cache: bool, } impl OverlayBuilder { @@ -213,6 +215,7 @@ impl OverlayBuilder { reused_sparse_trie_anchor_hash: None, no_reverts: false, overlay_cache_config: OverlayCacheConfig::default(), + write_reverts_to_cache: true, } } @@ -232,6 +235,16 @@ impl OverlayBuilder { self } + /// Stops this builder from retaining the trie reverts it accumulates in the changeset cache. + /// + /// Use it for anchors an untrusted peer chooses: cached reverts are keyed by the anchor and + /// stay until their start block is evicted, so they would otherwise pile up in the cache the + /// engine shares. + pub const fn without_trie_revert_caching(mut self) -> Self { + self.write_reverts_to_cache = false; + self + } + /// Returns the manager this builder resolves overlays from. pub(crate) const fn overlay_manager(&self) -> &OverlayManager { &self.overlay_manager @@ -456,6 +469,7 @@ impl OverlayBuilder { revert_blocks.clone(), state_trie_tip_block, finish_tip_block, + self.write_reverts_to_cache, )?; retrieve_trie_reverts_duration = start.elapsed(); accumulated_reverts diff --git a/crates/storage/storage-overlay/src/changeset_cache.rs b/crates/storage/storage-overlay/src/changeset_cache.rs index 89374a1d106..f27f21cd7a4 100644 --- a/crates/storage/storage-overlay/src/changeset_cache.rs +++ b/crates/storage/storage-overlay/src/changeset_cache.rs @@ -120,6 +120,7 @@ where (block_number + 1)..=finish.number, partial_state_trie, finish, + true, )?; // Step 3: Create an InMemoryTrieCursorFactory with the reverts @@ -234,6 +235,7 @@ impl ChangesetCache { block_number..=block_number, partial_state_trie, finish, + true, ) } @@ -245,12 +247,15 @@ impl ChangesetCache { /// /// If any block is missing from cache, this falls back to one aggregate database computation /// for the whole range. The aggregate result restores the trie to the state before the range - /// and is inserted into the range cache. + /// and is inserted into the range cache when `write_reverts_to_cache` is set. /// /// # Arguments /// /// * `provider` - Database provider for DB access and block lookups /// * `range` - Block range to accumulate reverts for (inclusive) + /// * `write_reverts_to_cache` - Whether to retain the accumulated reverts. Callers serving + /// ranges an untrusted peer chooses pass `false`, since entries stay until their start block + /// is evicted. /// /// # Returns /// @@ -270,6 +275,7 @@ impl ChangesetCache { range: RangeInclusive, partial_state_trie: BlockNumHash, finish: BlockNumHash, + write_reverts_to_cache: bool, ) -> ProviderResult> where N: NodePrimitives, @@ -388,7 +394,9 @@ impl ChangesetCache { "Finished accumulating cached trie reverts for block range" ); - self.inner.write().insert(range_key, Arc::clone(&accumulated_reverts)); + if write_reverts_to_cache { + self.inner.write().insert(range_key, Arc::clone(&accumulated_reverts)); + } return Ok(accumulated_reverts) } @@ -444,7 +452,9 @@ impl ChangesetCache { "Finished accumulating trie reverts for block range" ); - self.inner.write().insert(range_key, Arc::clone(&accumulated_reverts)); + if write_reverts_to_cache { + self.inner.write().insert(range_key, Arc::clone(&accumulated_reverts)); + } Ok(accumulated_reverts) } @@ -852,6 +862,28 @@ mod tests { .unwrap(); assert_eq!(overlay.input().nodes, block4); assert_eq!(manager.compute_block_trie_updates(&*provider, 4).unwrap(), *block4); + + // With only per-block entries left, the reverts are merged again on every build, and a + // builder that opted out keeps the merged range out of the cache. + manager.evict_cached_changesets(11); + for number in 5..=10 { + insert_test_changesets( + &mut manager.changeset_cache().inner.write(), + blocks[number as usize].recovered_block().hash(), + number, + Arc::default(), + ); + } + let cached = || manager.changeset_cache().inner.read().entries.len(); + let builder = manager.overlay_builder(blocks[4].recovered_block().hash()); + builder + .clone() + .without_trie_revert_caching() + .build_state_trie_overlay_at_frontiers(&*provider, frontier, finish, true) + .unwrap(); + assert_eq!(cached(), 6); + builder.build_state_trie_overlay_at_frontiers(&*provider, frontier, finish, true).unwrap(); + assert_eq!(cached(), 7); } #[test] @@ -908,7 +940,7 @@ mod tests { let cache = manager.changeset_cache(); let (frontier, finish) = database_state_frontiers(&before).unwrap(); let result = - cache.get_or_compute_range(&manager, &before, 1..=2, frontier, finish).unwrap(); + cache.get_or_compute_range(&manager, &before, 1..=2, frontier, finish, true).unwrap(); assert_eq!( result.storage_tries_ref()[&hashed_address].storage_nodes_ref(), &[(removed, None), (replaced, None)], @@ -921,13 +953,13 @@ mod tests { let after = factory.provider().unwrap(); let (frontier, finish) = database_state_frontiers(&after).unwrap(); let advanced = - cache.get_or_compute_range(&manager, &after, 1..=2, frontier, finish).unwrap(); + cache.get_or_compute_range(&manager, &after, 1..=2, frontier, finish, true).unwrap(); assert!(Arc::ptr_eq(&advanced, &result)); // A cold calculation at the newer frontier must also serve the older reader. cache.evict(2); let advanced = - cache.get_or_compute_range(&manager, &after, 1..=2, frontier, finish).unwrap(); + cache.get_or_compute_range(&manager, &after, 1..=2, frontier, finish, true).unwrap(); assert_eq!(advanced, result); // An older reader must still receive the deletion after the frontier advances. @@ -1128,7 +1160,14 @@ mod tests { let overlay_manager = OverlayManager::::default(); let (partial_state_trie, finish) = database_state_frontiers(&*provider).unwrap(); let accumulated = cache - .get_or_compute_range(&overlay_manager, &*provider, 1..=2, partial_state_trie, finish) + .get_or_compute_range( + &overlay_manager, + &*provider, + 1..=2, + partial_state_trie, + finish, + true, + ) .unwrap(); assert_eq!(accumulated.account_nodes_ref(), &[(path, Some(older_node))]); } @@ -1222,8 +1261,28 @@ mod tests { let cache = ChangesetCache::new(); let overlay_manager = OverlayManager::::default(); let (partial_state_trie, finish) = database_state_frontiers(&*provider).unwrap(); + let uncached = cache + .get_or_compute_range( + &overlay_manager, + &*provider, + 1..=3, + partial_state_trie, + finish, + false, + ) + .unwrap(); + assert_eq!(*uncached, actual); + assert!(cache.inner.read().entries.is_empty()); + let from_cache_api = cache - .get_or_compute_range(&overlay_manager, &*provider, 1..=3, partial_state_trie, finish) + .get_or_compute_range( + &overlay_manager, + &*provider, + 1..=3, + partial_state_trie, + finish, + true, + ) .unwrap(); assert_eq!(*from_cache_api, actual); assert_eq!(cache.inner.read().entries.len(), 1); diff --git a/crates/storage/storage-overlay/src/manager.rs b/crates/storage/storage-overlay/src/manager.rs index 81e721566ab..f6fbcf9a4ea 100644 --- a/crates/storage/storage-overlay/src/manager.rs +++ b/crates/storage/storage-overlay/src/manager.rs @@ -186,6 +186,7 @@ impl OverlayManager { range, partial_state_trie, finish, + true, ) } @@ -195,6 +196,7 @@ impl OverlayManager { range: RangeInclusive, partial_state_trie: BlockNumHash, finish: BlockNumHash, + write_reverts_to_cache: bool, ) -> ProviderResult> where P: DBProvider @@ -211,6 +213,7 @@ impl OverlayManager { range, partial_state_trie, finish, + write_reverts_to_cache, ) } From a117cf545c9b0c2ba9724606671bb153a3be4658 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 16:00:00 +0000 Subject: [PATCH 081/100] fix(libmdbx): avoid lock inversion in read tx timeout monitor (#28254) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/storage/libmdbx-rs/src/transaction.rs | 9 + crates/storage/libmdbx-rs/src/txn_manager.rs | 198 +++++++++++++------ 2 files changed, 146 insertions(+), 61 deletions(-) diff --git a/crates/storage/libmdbx-rs/src/transaction.rs b/crates/storage/libmdbx-rs/src/transaction.rs index f1326ac6c76..5981fe48aae 100644 --- a/crates/storage/libmdbx-rs/src/transaction.rs +++ b/crates/storage/libmdbx-rs/src/transaction.rs @@ -574,6 +574,15 @@ impl TransactionPtr { self.timed_out.store(true, std::sync::atomic::Ordering::SeqCst); } + /// Returns `true` if both pointers refer to the same transaction handle. + /// + /// Unlike comparing the raw pointers, this tells apart a transaction from a later one that + /// reuses the same MDBX handle. + #[cfg(feature = "read-tx-timeouts")] + pub(crate) fn is_same(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.lock, &other.lock) + } + /// Acquires the inner transaction lock to guarantee exclusive access to the transaction /// pointer. fn lock(&self) -> MutexGuard<'_, ()> { diff --git a/crates/storage/libmdbx-rs/src/txn_manager.rs b/crates/storage/libmdbx-rs/src/txn_manager.rs index 4ca68befada..2b8c3a6f43b 100644 --- a/crates/storage/libmdbx-rs/src/txn_manager.rs +++ b/crates/storage/libmdbx-rs/src/txn_manager.rs @@ -260,6 +260,14 @@ mod read_transactions { self.active.remove(&(ptr as usize)).is_some() } + /// Returns `true` if `tx` is still the active read transaction registered for `ptr`. + /// + /// Pointers can be reused by new read transactions, so the transaction identity is + /// compared as well. + fn is_active(&self, ptr: usize, tx: &TransactionPtr) -> bool { + self.active.get(&ptr).is_some_and(|entry| entry.value().0.is_same(tx)) + } + /// Returns the number of timed out transactions that were not aborted by the user yet. pub(super) fn timed_out_not_aborted(&self) -> usize { self.timed_out_not_aborted.len() @@ -271,52 +279,24 @@ mod read_transactions { let transactions = self.clone(); let (shutdown, receiver) = channel(); let task = move || { - let mut timed_out_active = Vec::new(); + let mut expired = Vec::new(); loop { let now = Instant::now(); let mut max_active_transaction_duration = None; - // Iterate through active read transactions and time out those that's open for - // longer than `self.max_duration`. + // Collect active read transactions that are open for longer than + // `self.max_duration`. + // + // The transaction locks must not be taken while iterating: commit and drop + // hold the transaction lock and then remove the entry from `active`, which + // needs the write lock of the shard that the iterator is holding. for entry in &self.active { let (tx, start, backtrace) = entry.value(); let duration = now - *start; if duration > self.max_duration { - let result = tx.txn_execute_fail_on_timeout(|txn_ptr| { - // Time out the transaction. - // - // We use `mdbx_txn_reset` instead of `mdbx_txn_abort` here to - // prevent MDBX from reusing the pointer of the aborted - // transaction for new read-only transactions. This is - // important because we store the pointer in the `active` list - // and assume that it is unique. - // - // See https://libmdbx.dqdkfa.ru/group__c__transactions.html#gae9f34737fe60b0ba538d5a09b6a25c8d for more info. - let result = mdbx_result(unsafe { ffi::mdbx_txn_reset(txn_ptr) }); - if result.is_ok() { - tx.set_timed_out(); - } - (txn_ptr, duration, result) - }); - - match result { - Ok((txn_ptr, duration, error)) => { - // Add the transaction to `timed_out_active`. We can't remove it - // instantly from the list of active transactions, because we - // iterate through it. - timed_out_active.push(( - txn_ptr, - duration, - backtrace.clone(), - error, - )); - } - Err(err) => { - error!(target: "libmdbx", %err, ?backtrace, "Failed to abort the long-lived read transaction") - } - } + expired.push((*entry.key(), tx.clone(), duration, backtrace.clone())); } else { max_active_transaction_duration = Some( duration.max(max_active_transaction_duration.unwrap_or_default()), @@ -324,29 +304,63 @@ mod read_transactions { } } - // Walk through timed out transactions, and delete them from the list of active - // transactions. - for (ptr, open_duration, backtrace, err) in timed_out_active.iter().cloned() { - // Try deleting the transaction from the list of active transactions. - let was_in_active = self.remove_active(ptr); - if let Err(err) = err { - if was_in_active { - // If the transaction was in the list of active transactions, - // then user didn't abort it and we failed to do so. - error!(target: "libmdbx", %err, ?open_duration, ?backtrace, "Failed to time out the long-lived read transaction"); + // Time out the collected transactions. + for (ptr, tx, open_duration, backtrace) in &expired { + let ptr = *ptr; + let result = tx.txn_execute_fail_on_timeout(|txn_ptr| { + // The transaction could have been committed or dropped after it was + // collected, and its pointer could even have been reused by a new + // read transaction from the pool. We hold the transaction lock, so + // it can't be finished from now on. If the entry is still ours, the + // transaction is live. + if !self.is_active(ptr, tx) { + return None } - } else { - // Happy path, the transaction has been timed out by us with no errors. - warn!(target: "libmdbx", ?open_duration, ?backtrace, "Long-lived read transaction has been timed out"); - // Add transaction to the list of timed out transactions that were not - // aborted by the user yet. - self.timed_out_not_aborted.insert(ptr as usize); + + // Time out the transaction. + // + // We use `mdbx_txn_reset` instead of `mdbx_txn_abort` here to + // prevent MDBX from reusing the pointer of the aborted + // transaction for new read-only transactions. This is + // important because we store the pointer in the `active` list + // and assume that it is unique. + // + // See https://libmdbx.dqdkfa.ru/group__c__transactions.html#gae9f34737fe60b0ba538d5a09b6a25c8d for more info. + let result = mdbx_result(unsafe { ffi::mdbx_txn_reset(txn_ptr) }); + if result.is_ok() { + tx.set_timed_out(); + } + + // Delete the transaction from the list of active transactions while + // still holding the transaction lock, so that it can't be dropped + // in between. + let was_in_active = self.remove_active(txn_ptr); + match result { + Ok(_) => { + // Happy path, the transaction has been timed out by us with + // no errors. Add it to the list of timed out transactions + // that were not aborted by the user yet. + self.timed_out_not_aborted.insert(txn_ptr as usize); + warn!(target: "libmdbx", ?open_duration, ?backtrace, "Long-lived read transaction has been timed out"); + } + Err(err) if was_in_active => { + // If the transaction was in the list of active transactions, + // then user didn't abort it and we failed to do so. + error!(target: "libmdbx", %err, ?open_duration, ?backtrace, "Failed to time out the long-lived read transaction"); + } + Err(_) => {} + } + Some(()) + }); + + if let Err(err) = result { + error!(target: "libmdbx", %err, ?backtrace, "Failed to abort the long-lived read transaction") } } - // Clear the list of timed out transactions, but not de-allocate the reserved - // capacity to save on further pushes. - timed_out_active.clear(); + // Clear the list, but not de-allocate the reserved capacity to save on + // further pushes. + expired.clear(); if !self.active.is_empty() { trace!( @@ -384,12 +398,10 @@ mod read_transactions { #[cfg(test)] mod tests { use super::*; - use crate::{ - txn_manager::read_transactions::READ_TRANSACTIONS_CHECK_INTERVAL, Environment, Error, - MaxReadTransactionDuration, - }; + use crate::{Environment, Error, MaxReadTransactionDuration}; use std::{ - thread::sleep, + sync::mpsc, + thread::{self, sleep}, time::{Duration, Instant}, }; use tempfile::tempdir; @@ -416,10 +428,18 @@ mod read_transactions { cfg!(all(debug_assertions, not(feature = "fuzz"))), ); + let snapshot = read_transactions.active.get(&tx_ptr).unwrap().0.clone(); + assert!(read_transactions.is_active(tx_ptr, &snapshot)); tx.open_db(None).unwrap(); drop(tx); - assert!(!read_transactions.active.contains_key(&tx_ptr)); + assert!(!read_transactions.is_active(tx_ptr, &snapshot)); + + // A collected entry must not match a later transaction reusing its pooled handle. + let tx = env.begin_ro_txn().unwrap(); + assert_eq!(tx.txn() as usize, tx_ptr); + assert!(!read_transactions.is_active(tx_ptr, &snapshot)); + tx.open_db(None).unwrap(); } // Create a read-only transaction, successfully use it, close it by committing. @@ -476,6 +496,62 @@ mod read_transactions { } } + /// Commits and drops read transactions around their timeout while the monitor is timing + /// them out. The monitor must not hold a lock on the active transactions while waiting + /// for a transaction lock, otherwise it deadlocks with commit and drop. + #[test] + fn txn_manager_read_transactions_timeout_commit_drop_race() { + const MAX_DURATION: Duration = Duration::from_millis(10); + const THREADS: usize = 16; + const RUN_FOR: Duration = Duration::from_secs(2); + + let dir = tempdir().unwrap(); + let env = Environment::builder() + .set_max_read_transaction_duration(MaxReadTransactionDuration::Set(MAX_DURATION)) + .open(dir.path()) + .unwrap(); + + let (done_tx, done_rx) = mpsc::channel(); + for thread_id in 0..THREADS { + let env = env.clone(); + let done_tx = done_tx.clone(); + thread::spawn(move || { + let deadline = Instant::now() + RUN_FOR; + let mut i = thread_id; + while Instant::now() < deadline { + let tx = env.begin_ro_txn().unwrap(); + // Finish the transaction right around the moment it expires. + sleep( + MAX_DURATION - Duration::from_millis(3) + + Duration::from_millis(i as u64 % 6), + ); + // The transaction might have been timed out already. + if i % 2 == 0 { + if let Err(err) = tx.commit() { + assert_eq!(err, Error::ReadTransactionTimeout); + } + } else { + drop(tx); + } + i += 1; + } + done_tx.send(()).unwrap(); + }); + } + drop(done_tx); + + for _ in 0..THREADS { + done_rx + .recv_timeout(Duration::from_secs(30)) + .expect("read transaction timeout monitor deadlocked"); + } + + // Every transaction was finished, so nothing must be left behind. + let read_transactions = env.txn_manager().read_transactions.as_ref().unwrap(); + assert!(read_transactions.active.is_empty()); + assert!(read_transactions.timed_out_not_aborted.is_empty()); + } + #[test] fn txn_manager_read_transactions_duration_unbounded() { let dir = tempdir().unwrap(); From b5e7d63d94d23718545f3efbac718dcc5a6b2139 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 16:21:30 +0000 Subject: [PATCH 082/100] perf(net): skip decoding unrequested responses (#28403) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/net/eth-wire-types/src/snap.rs | 28 +- crates/net/eth-wire/src/errors/eth.rs | 28 +- crates/net/eth-wire/src/eth_snap.rs | 346 +++++++++++++++++++++- crates/net/eth-wire/src/ethstream.rs | 357 ++++++++++++++++++++++- crates/net/network/src/eth_requests.rs | 13 +- crates/net/network/src/session/active.rs | 35 +++ 6 files changed, 785 insertions(+), 22 deletions(-) diff --git a/crates/net/eth-wire-types/src/snap.rs b/crates/net/eth-wire-types/src/snap.rs index e45bcde3ac4..d829f1ba256 100644 --- a/crates/net/eth-wire-types/src/snap.rs +++ b/crates/net/eth-wire-types/src/snap.rs @@ -331,7 +331,8 @@ pub enum SnapProtocolMessage { BlockAccessLists(BlockAccessListsMessage), } -/// Error decoding an inbound `snap` protocol message from its framed bytes. +/// Error decoding an inbound `snap` protocol message from its framed bytes, or matching a response +/// to its request. #[derive(thiserror::Error, Debug)] pub enum SnapProtocolError { /// The payload was empty and carried no message id. @@ -344,6 +345,31 @@ pub enum SnapProtocolError { /// Decoding the RLP message body failed. #[error("RLP error: {0}")] Rlp(#[from] alloy_rlp::Error), + /// The response answers no request sent on this connection. + /// + /// The response is rejected before its body is decoded. + #[error("received unsolicited {message_id:?} response with request id {request_id}")] + UnsolicitedResponse { + /// The message id of the response. + message_id: SnapMessageId, + /// The request id the response carried. + request_id: u64, + }, + /// A list in the response is longer than its request allows: more entries than requested, or + /// more range proof nodes than two boundary paths can hold. + /// + /// The response is rejected before its body is decoded. + #[error( + "{message_id:?} response with request id {request_id} holds a list longer than the {max_items} items its request allows" + )] + ResponseExceedsRequest { + /// The message id of the response. + message_id: SnapMessageId, + /// The request id the response carried. + request_id: u64, + /// The longest the list may be. + max_items: usize, + }, } impl SnapProtocolMessage { diff --git a/crates/net/eth-wire/src/errors/eth.rs b/crates/net/eth-wire/src/errors/eth.rs index f8826a73838..615c191d84f 100644 --- a/crates/net/eth-wire/src/errors/eth.rs +++ b/crates/net/eth-wire/src/errors/eth.rs @@ -5,7 +5,7 @@ use crate::{ }; use alloy_chains::Chain; use alloy_primitives::B256; -use reth_eth_wire_types::{snap::SnapProtocolError, EthVersion}; +use reth_eth_wire_types::{snap::SnapProtocolError, EthMessageID, EthVersion}; use reth_ethereum_forks::ValidationError; use reth_primitives_traits::{GotExpected, GotExpectedBoxed}; use std::io; @@ -52,6 +52,30 @@ pub enum EthStreamError { /// The identifier of the unknown Ethereum message. message_id: u8, }, + /// Received a response that answers no request sent on this stream. + /// + /// The response is rejected before its items are decoded. + #[error("received unsolicited {message_id:?} response with request id {request_id}")] + UnsolicitedResponse { + /// The message id of the response. + message_id: EthMessageID, + /// The request id the response carried. + request_id: u64, + }, + /// Received a response with more items than its request asked for. + /// + /// The response is rejected before its items are decoded. + #[error( + "{message_id:?} response with request id {request_id} exceeds the {max_items} requested items" + )] + ResponseExceedsRequest { + /// The message id of the response. + message_id: EthMessageID, + /// The request id the response carried. + request_id: u64, + /// The number of items the request asked for. + max_items: usize, + }, } // === impl EthStreamError === @@ -78,6 +102,8 @@ impl EthStreamError { Self::MessageTooBig(_) | Self::TransactionHashesInvalidLenOfFields { .. } | Self::UnsupportedMessage { .. } | + Self::UnsolicitedResponse { .. } | + Self::ResponseExceedsRequest { .. } | Self::P2PStreamError( P2PStreamError::Rlp(_) | P2PStreamError::Snap(_) | diff --git a/crates/net/eth-wire/src/eth_snap.rs b/crates/net/eth-wire/src/eth_snap.rs index 963a53c4096..f178928eb3b 100644 --- a/crates/net/eth-wire/src/eth_snap.rs +++ b/crates/net/eth-wire/src/eth_snap.rs @@ -8,19 +8,25 @@ use crate::{ capability::SharedCapabilities, errors::{EthStreamError, P2PStreamError}, + ethstream::list_exceeds_items, handshake::EthRlpxHandshake, message::EthBroadcastMessage, Capability, EthMessage, EthNetworkPrimitives, EthStreamInner, EthVersion, NetworkPrimitives, P2PStream, UnifiedStatus, HANDSHAKE_TIMEOUT, }; -use alloy_primitives::bytes::{Bytes, BytesMut}; +use alloy_primitives::{ + bytes::{Bytes, BytesMut}, + B256, +}; +use alloy_rlp::{Decodable, Header}; use futures::{Sink, SinkExt, Stream, StreamExt}; use reth_eth_wire_types::{ - snap::{SnapProtocolMessage, SnapVersion}, + snap::{SnapMessageId, SnapProtocolError, SnapProtocolMessage, SnapVersion}, RawCapabilityMessage, }; use reth_ethereum_forks::ForkFilter; use std::{ + collections::BTreeMap, io, pin::Pin, sync::Arc, @@ -43,6 +49,12 @@ pub struct EthSnapStream { /// or above it are snap, rebased to snap-relative and validated by /// [`SnapProtocolMessage::decode_versioned`]. snap_offset: u8, + /// Responses the remote owes for `snap/2` requests sent on this stream, keyed by request id. + /// + /// Like the `eth` codec's pending requests, a snap response is only decoded if it answers one + /// of these, and the entry is removed when it does, so the map is bounded by the snap requests + /// the owner keeps in flight. + pending_snap_responses: BTreeMap, } impl EthSnapStream @@ -70,7 +82,7 @@ where handshake.handshake(&mut conn, status, fork_filter, HANDSHAKE_TIMEOUT).await?; let eth = EthStreamInner::with_max_message_size(eth_version, eth_max_message_size); - Ok((Self { conn, eth, snap_offset }, their_status)) + Ok((Self { conn, eth, snap_offset, pending_snap_responses: BTreeMap::new() }, their_status)) } } @@ -104,6 +116,51 @@ impl EthSnapStream { pub fn into_inner(self) -> P2PStream { self.conn } + + /// Consumes the pending request a framed `snap/2` response answers, without decoding the + /// response's lists. + /// + /// Like the `eth` codec, this rejects a response before decoding allocates per list entry if + /// nobody asked for it, if it holds more entries than requested, or if its range proof holds + /// more than [`MAX_RANGE_PROOF_NODES`] nodes. Messages that are not responses pass through. + fn take_pending_snap_response(&mut self, bytes: &[u8]) -> Result<(), SnapProtocolError> { + let Some((&id, mut buf)) = bytes.split_first() else { return Ok(()) }; + let Some(message_id) = [ + SnapMessageId::AccountRange, + SnapMessageId::StorageRanges, + SnapMessageId::ByteCodes, + SnapMessageId::BlockAccessLists, + ] + .into_iter() + .find(|response| *response as u8 == id) else { + return Ok(()) + }; + + // Every response is a list that starts with the request id. + let mut payload = Header::decode_bytes(&mut buf, true)?; + let request_id = u64::decode(&mut payload)?; + + let Some(pending) = self + .pending_snap_responses + .remove(&request_id) + .filter(|pending| pending.message_id == message_id) + else { + return Err(SnapProtocolError::UnsolicitedResponse { message_id, request_id }) + }; + + // The request sizes the list right after the request id; range responses follow it with + // their proof. + let max_items = if list_exceeds_items(&mut payload, pending.max_items)? { + pending.max_items + } else if matches!(message_id, SnapMessageId::AccountRange | SnapMessageId::StorageRanges) && + list_exceeds_items(&mut payload, MAX_RANGE_PROOF_NODES)? + { + MAX_RANGE_PROOF_NODES + } else { + return Ok(()) + }; + Err(SnapProtocolError::ResponseExceedsRequest { message_id, request_id, max_items }) + } } impl EthSnapStream @@ -120,6 +177,9 @@ where } /// Sends a raw capability message over the connection. + /// + /// Raw messages are not recorded as requests, so the response to an `eth` or `snap/2` request + /// sent this way is rejected as unsolicited. Send requests as [`EthSnapMessage`]s instead. pub fn start_send_raw(&mut self, msg: RawCapabilityMessage) -> Result<(), EthStreamError> { self.conn.start_send_unpin(msg.encoded()).map_err(Into::into) } @@ -160,6 +220,9 @@ where return Poll::Ready(Some(this.eth.decode_message(bytes).map(EthSnapMessage::Eth))) }; bytes[0] = snap_id; + if let Err(err) = this.take_pending_snap_response(&bytes) { + return Poll::Ready(Some(Err(err.into()))) + } Poll::Ready(Some( SnapProtocolMessage::decode_versioned(SnapVersion::V2, &bytes) .map(EthSnapMessage::Snap) @@ -184,6 +247,9 @@ where let bytes = match item { EthSnapMessage::Eth(msg) => this.eth.encode_message(msg)?, EthSnapMessage::Snap(msg) => { + if let Some((request_id, response)) = PendingSnapResponse::for_request(&msg) { + this.pending_snap_responses.insert(request_id, response); + } // Reclaim the freshly-encoded buffer as mutable without copying the payload, then // rebase the snap-relative id into the combined message space. let mut buf = @@ -204,6 +270,45 @@ where } } +/// The response the remote owes for a `snap/2` request sent on an [`EthSnapStream`]. +#[derive(Clone, Copy, Debug)] +struct PendingSnapResponse { + /// Message id the response must carry. + message_id: SnapMessageId, + /// Number of entries the request sized the response's leading list to. + max_items: usize, +} + +impl PendingSnapResponse { + /// Returns the request id and the response owed for `msg`, or `None` if it is a response. + const fn for_request(msg: &SnapProtocolMessage) -> Option<(u64, Self)> { + let (message_id, max_items) = match msg { + // Accounts are bounded by the requested response bytes, not by a count. + SnapProtocolMessage::GetAccountRange(_) => (SnapMessageId::AccountRange, usize::MAX), + // One slot list per requested account. + SnapProtocolMessage::GetStorageRanges(req) => { + (SnapMessageId::StorageRanges, req.account_hashes.len()) + } + SnapProtocolMessage::GetByteCodes(req) => (SnapMessageId::ByteCodes, req.hashes.len()), + SnapProtocolMessage::GetBlockAccessLists(req) => { + (SnapMessageId::BlockAccessLists, req.block_hashes.len()) + } + SnapProtocolMessage::AccountRange(_) | + SnapProtocolMessage::StorageRanges(_) | + SnapProtocolMessage::ByteCodes(_) | + SnapProtocolMessage::BlockAccessLists(_) => return None, + }; + Some((msg.request_id(), Self { message_id, max_items })) + } +} + +/// Maximum number of nodes in a `snap/2` range proof. +/// +/// The proof covers two boundary paths, each holding at most one hashed node per nibble of a +/// 32-byte key plus its leaf, since inline nodes are never separate proof entries. The range proof +/// verifier in `reth-trie-common` rejects longer proofs as well. +const MAX_RANGE_PROOF_NODES: usize = 2 * (2 * B256::len_bytes() + 1); + /// Resolves the `snap/2` message-id offset from the negotiated capabilities, accepting only a /// connection that shares exactly `eth` at relative offset 0 immediately followed by `snap/2`. /// @@ -247,11 +352,83 @@ mod tests { UnauthedP2PStream, }; use reth_eth_wire_types::{ - snap::{BlockAccessListsMessage, GetBlockAccessListsMessage}, - EthVersion, + snap::{ + AccountRangeMessage, BlockAccessListsMessage, ByteCodesMessage, GetAccountRangeMessage, + GetBlockAccessListsMessage, GetByteCodesMessage, GetStorageRangesMessage, + StorageRangesMessage, + }, + BlockAccessLists, EthVersion, }; - use tokio::net::TcpListener; - use tokio_util::codec::Decoder; + use tokio::net::{TcpListener, TcpStream}; + use tokio_util::codec::{Decoder, Framed}; + + type TestEthSnapStream = + EthSnapStream, EthNetworkPrimitives>; + + /// Connects two peers that negotiate `eth` + `snap/2` and returns their streams. + async fn eth_snap_pair() -> (TestEthSnapStream, TestEthSnapStream) { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + let local_addr = listener.local_addr().unwrap(); + let (status, fork_filter) = eth_handshake(); + let server_fork_filter = fork_filter.clone(); + + let server = tokio::spawn(async move { + let (incoming, _) = listener.accept().await.unwrap(); + let stream = crate::PassthroughCodec::default().framed(incoming); + let (conn, _) = + UnauthedP2PStream::new(stream).handshake(eth_snap_hello()).await.unwrap(); + EthSnapStream::handshake( + conn, + status, + server_fork_filter, + Arc::new(EthHandshake::default()), + MAX_MESSAGE_SIZE, + ) + .await + .unwrap() + .0 + }); + + let conn = connect_passthrough(local_addr, eth_snap_hello()).await; + let (client, _) = EthSnapStream::handshake( + conn, + status, + fork_filter, + Arc::new(EthHandshake::default()), + MAX_MESSAGE_SIZE, + ) + .await + .unwrap(); + (client, server.await.unwrap()) + } + + /// Sends `msg` from `from` and returns the error `to` reports for it. + async fn send_and_expect_error( + from: &mut TestEthSnapStream, + to: &mut TestEthSnapStream, + msg: SnapProtocolMessage, + ) -> SnapProtocolError { + from.send(EthSnapMessage::Snap(msg)).await.unwrap(); + match to.next().await.unwrap() { + Err(EthStreamError::InvalidSnapMessage(err)) => err, + other => panic!("expected a snap error, got {other:?}"), + } + } + + fn get_byte_codes(request_id: u64, hashes: usize) -> SnapProtocolMessage { + SnapProtocolMessage::GetByteCodes(GetByteCodesMessage { + request_id, + hashes: vec![B256::ZERO; hashes], + response_bytes: u64::MAX, + }) + } + + fn byte_codes(request_id: u64, codes: usize) -> SnapProtocolMessage { + SnapProtocolMessage::ByteCodes(ByteCodesMessage { + request_id, + codes: vec![Bytes::new().into(); codes], + }) + } /// Builds shared capabilities from matching local protocols and peer capabilities. fn shared_caps(local: Vec, peer: Vec) -> SharedCapabilities { @@ -379,7 +556,7 @@ mod tests { .send(EthSnapMessage::Snap(SnapProtocolMessage::GetBlockAccessLists( GetBlockAccessListsMessage { request_id: 7, - block_hashes: Vec::new(), + block_hashes: vec![B256::ZERO], response_bytes: u64::MAX, }, ))) @@ -456,4 +633,157 @@ mod tests { ); } } + + #[tokio::test(flavor = "multi_thread")] + async fn unsolicited_snap_response_is_rejected() { + let (mut client, mut server) = eth_snap_pair().await; + + let err = send_and_expect_error(&mut client, &mut server, byte_codes(7, 1)).await; + assert!(matches!( + err, + SnapProtocolError::UnsolicitedResponse { + message_id: SnapMessageId::ByteCodes, + request_id: 7 + } + )); + } + + #[tokio::test(flavor = "multi_thread")] + async fn snap_response_to_sent_request_is_decoded_once() { + let (mut client, mut server) = eth_snap_pair().await; + server.send(EthSnapMessage::Snap(get_byte_codes(7, 2))).await.unwrap(); + assert!(matches!( + client.next().await.unwrap().unwrap(), + EthSnapMessage::Snap(SnapProtocolMessage::GetByteCodes(_)) + )); + + client.send(EthSnapMessage::Snap(byte_codes(7, 2))).await.unwrap(); + assert!(matches!( + server.next().await.unwrap().unwrap(), + EthSnapMessage::Snap(SnapProtocolMessage::ByteCodes(_)) + )); + + let err = send_and_expect_error(&mut client, &mut server, byte_codes(7, 2)).await; + assert!(matches!( + err, + SnapProtocolError::UnsolicitedResponse { + message_id: SnapMessageId::ByteCodes, + request_id: 7 + } + )); + } + + #[tokio::test(flavor = "multi_thread")] + async fn snap_response_of_other_type_is_rejected() { + let (mut client, mut server) = eth_snap_pair().await; + server.send(EthSnapMessage::Snap(get_byte_codes(7, 1))).await.unwrap(); + client.next().await.unwrap().unwrap(); + + let response = SnapProtocolMessage::BlockAccessLists(BlockAccessListsMessage { + request_id: 7, + block_access_lists: BlockAccessLists(Vec::new()), + }); + let err = send_and_expect_error(&mut client, &mut server, response).await; + assert!(matches!( + err, + SnapProtocolError::UnsolicitedResponse { + message_id: SnapMessageId::BlockAccessLists, + request_id: 7 + } + )); + } + + #[tokio::test(flavor = "multi_thread")] + async fn snap_response_with_more_entries_than_requested_is_rejected() { + let (mut client, mut server) = eth_snap_pair().await; + server.send(EthSnapMessage::Snap(get_byte_codes(7, 2))).await.unwrap(); + client.next().await.unwrap().unwrap(); + + let err = send_and_expect_error(&mut client, &mut server, byte_codes(7, 3)).await; + assert!(matches!( + err, + SnapProtocolError::ResponseExceedsRequest { + message_id: SnapMessageId::ByteCodes, + request_id: 7, + max_items: 2 + } + )); + } + + #[tokio::test(flavor = "multi_thread")] + async fn snap_range_proof_is_bounded() { + let (mut client, mut server) = eth_snap_pair().await; + let request = |request_id| { + SnapProtocolMessage::GetAccountRange(GetAccountRangeMessage { + request_id, + root_hash: B256::ZERO, + starting_hash: B256::ZERO, + limit_hash: B256::repeat_byte(0xff), + response_bytes: u64::MAX, + }) + }; + let response = |request_id, proof_nodes| { + SnapProtocolMessage::AccountRange(AccountRangeMessage { + request_id, + accounts: Vec::new(), + proof: vec![Bytes::new().into(); proof_nodes], + }) + }; + + server.send(EthSnapMessage::Snap(request(1))).await.unwrap(); + client.next().await.unwrap().unwrap(); + client.send(EthSnapMessage::Snap(response(1, MAX_RANGE_PROOF_NODES))).await.unwrap(); + assert!(matches!( + server.next().await.unwrap().unwrap(), + EthSnapMessage::Snap(SnapProtocolMessage::AccountRange(_)) + )); + + server.send(EthSnapMessage::Snap(request(2))).await.unwrap(); + client.next().await.unwrap().unwrap(); + let err = + send_and_expect_error(&mut client, &mut server, response(2, MAX_RANGE_PROOF_NODES + 1)) + .await; + assert!(matches!( + err, + SnapProtocolError::ResponseExceedsRequest { + message_id: SnapMessageId::AccountRange, + request_id: 2, + max_items: MAX_RANGE_PROOF_NODES + } + )); + } + + #[tokio::test(flavor = "multi_thread")] + async fn snap_storage_ranges_hold_one_slot_list_per_account() { + let (mut client, mut server) = eth_snap_pair().await; + server + .send(EthSnapMessage::Snap(SnapProtocolMessage::GetStorageRanges( + GetStorageRangesMessage { + request_id: 7, + root_hash: B256::ZERO, + account_hashes: vec![B256::ZERO], + starting_hash: B256::ZERO.into(), + limit_hash: B256::repeat_byte(0xff).into(), + response_bytes: u64::MAX, + }, + ))) + .await + .unwrap(); + client.next().await.unwrap().unwrap(); + + let response = SnapProtocolMessage::StorageRanges(StorageRangesMessage { + request_id: 7, + slots: vec![Vec::new(); 2], + proof: Vec::new(), + }); + let err = send_and_expect_error(&mut client, &mut server, response).await; + assert!(matches!( + err, + SnapProtocolError::ResponseExceedsRequest { + message_id: SnapMessageId::StorageRanges, + request_id: 7, + max_items: 1 + } + )); + } } diff --git a/crates/net/eth-wire/src/ethstream.rs b/crates/net/eth-wire/src/ethstream.rs index 73a4aaf1c2d..b7de6ff63d2 100644 --- a/crates/net/eth-wire/src/ethstream.rs +++ b/crates/net/eth-wire/src/ethstream.rs @@ -7,17 +7,19 @@ use crate::{ errors::{EthHandshakeError, EthStreamError}, handshake::EthereumEthHandshake, - message::{EthBroadcastMessage, MAX_MESSAGE_SIZE, TX_MEMORY_BUDGET_MULTIPLIER}, + message::{EthBroadcastMessage, MessageError, MAX_MESSAGE_SIZE, TX_MEMORY_BUDGET_MULTIPLIER}, p2pstream::HANDSHAKE_TIMEOUT, CanDisconnect, DisconnectReason, EthMessage, EthNetworkPrimitives, EthVersion, ProtocolMessage, UnifiedStatus, }; use alloy_primitives::bytes::{Bytes, BytesMut}; +use alloy_rlp::{Decodable, Header}; use futures::{ready, Sink, SinkExt}; use pin_project::pin_project; use reth_eth_wire_types::{EthMessageID, NetworkPrimitives, RawCapabilityMessage}; use reth_ethereum_forks::ForkFilter; use std::{ + collections::BTreeMap, future::Future, pin::Pin, task::{Context, Poll}, @@ -110,6 +112,13 @@ pub struct EthStreamInner { /// When true, `NewBlock` (0x07) and `NewBlockHashes` (0x01) messages are rejected before RLP /// decoding to avoid any memory impact for non-PoW networks. reject_block_announcements: bool, + /// Responses the remote owes for requests encoded by [`Self::encode_message`], keyed by + /// request id. + /// + /// [`Self::decode_message`] only decodes a response that answers one of these requests, and + /// removes the entry when it does. The map is therefore bounded by the requests the owner + /// keeps in flight. + pending_responses: BTreeMap, _pd: std::marker::PhantomData, } @@ -128,6 +137,7 @@ where version, max_message_size, reject_block_announcements: false, + pending_responses: BTreeMap::new(), _pd: std::marker::PhantomData, } } @@ -145,7 +155,11 @@ where } /// Decodes incoming bytes into an [`EthMessage`]. - pub fn decode_message(&self, bytes: BytesMut) -> Result, EthStreamError> { + /// + /// A response is only decoded if it answers a request sent through [`Self::encode_message`] + /// and carries at most as many items as that request asked for, see + /// [`EthStreamError::UnsolicitedResponse`] and [`EthStreamError::ResponseExceedsRequest`]. + pub fn decode_message(&mut self, bytes: BytesMut) -> Result, EthStreamError> { if bytes.len() > self.max_message_size { return Err(EthStreamError::MessageTooBig(bytes.len())); } @@ -157,6 +171,8 @@ where return Err(EthStreamError::UnsupportedMessage { message_id: id }); } + self.take_pending_response(&bytes)?; + let msg = match ProtocolMessage::decode_message_with_tx_memory_budget( self.version, &mut bytes.as_ref(), @@ -188,13 +204,66 @@ where /// Encodes an [`EthMessage`] to bytes. /// /// Validates that Status messages are not sent after handshake, enforcing protocol rules. - pub fn encode_message(&self, item: EthMessage) -> Result { + /// Requests are recorded so that [`Self::decode_message`] accepts their responses. + pub fn encode_message(&mut self, item: EthMessage) -> Result { if matches!(item, EthMessage::Status(_)) { return Err(EthStreamError::EthHandshakeError(EthHandshakeError::StatusNotInHandshake)); } + if let Some((request_id, response)) = PendingResponse::for_request(&item) { + self.pending_responses.insert(request_id, response); + } + Ok(Bytes::from(alloy_rlp::encode(ProtocolMessage::from(item)))) } + + /// Consumes the pending request an encoded response answers, without decoding the response's + /// items. + /// + /// Decoding allocates per item, and an item can be a single RLP byte, so a few hundred KiB of + /// compressed frame can decode into hundreds of MiB. Responses nobody asked for, and responses + /// with more items than requested, are rejected before any of that happens. Messages that are + /// not responses pass through. + fn take_pending_response(&mut self, bytes: &[u8]) -> Result<(), EthStreamError> { + let mut buf = bytes; + let message_id = EthMessageID::decode(&mut buf).map_err(MessageError::from)?; + if !matches!( + message_id, + EthMessageID::BlockHeaders | + EthMessageID::BlockBodies | + EthMessageID::PooledTransactions | + EthMessageID::NodeData | + EthMessageID::Receipts | + EthMessageID::BlockAccessLists | + EthMessageID::Cells + ) { + return Ok(()) + } + + // Every response is a list that starts with the request id. + let mut payload = Header::decode_bytes(&mut buf, true).map_err(MessageError::from)?; + let request_id = u64::decode(&mut payload).map_err(MessageError::from)?; + + let Some(pending) = self + .pending_responses + .remove(&request_id) + .filter(|pending| pending.message_id == message_id) + else { + return Err(EthStreamError::UnsolicitedResponse { message_id, request_id }) + }; + + if response_exceeds_items(self.version, message_id, payload, pending.max_items) + .map_err(MessageError::from)? + { + return Err(EthStreamError::ResponseExceedsRequest { + message_id, + request_id, + max_items: pending.max_items, + }) + } + + Ok(()) + } } /// An `EthStream` wraps over any `Stream` that yields bytes and makes it @@ -273,6 +342,9 @@ where } /// Sends a raw capability message directly over the stream + /// + /// Raw messages are not recorded as requests, so the response to an `eth` request sent this + /// way is rejected as unsolicited. Send requests as [`EthMessage`]s instead. pub fn start_send_raw(&mut self, msg: RawCapabilityMessage) -> Result<(), EthStreamError> { self.inner.start_send_unpin(msg.encoded())?; Ok(()) @@ -323,9 +395,9 @@ where return Err(EthStreamError::EthHandshakeError(EthHandshakeError::StatusNotInHandshake)) } - self.project() - .inner - .start_send(Bytes::from(alloy_rlp::encode(ProtocolMessage::from(item))))?; + let this = self.project(); + let bytes = this.eth.encode_message(item)?; + this.inner.start_send(bytes)?; Ok(()) } @@ -353,20 +425,114 @@ where } } +/// The response the remote owes for a request sent on an [`EthStreamInner`]. +#[derive(Clone, Copy, Debug)] +struct PendingResponse { + /// Message id the response must carry. + message_id: EthMessageID, + /// Number of items the request asked for, which the response must not exceed. + max_items: usize, +} + +impl PendingResponse { + /// Returns the request id and the response owed for `msg`, or `None` if it is not a request. + fn for_request(msg: &EthMessage) -> Option<(u64, Self)> { + let (request_id, message_id, max_items) = match msg { + EthMessage::GetBlockHeaders(req) => ( + req.request_id, + EthMessageID::BlockHeaders, + usize::try_from(req.message.limit).unwrap_or(usize::MAX), + ), + EthMessage::GetBlockBodies(req) => { + (req.request_id, EthMessageID::BlockBodies, req.message.0.len()) + } + EthMessage::GetPooledTransactions(req) => { + (req.request_id, EthMessageID::PooledTransactions, req.message.0.len()) + } + EthMessage::GetNodeData(req) => { + (req.request_id, EthMessageID::NodeData, req.message.0.len()) + } + EthMessage::GetReceipts(req) => { + (req.request_id, EthMessageID::Receipts, req.message.0.len()) + } + EthMessage::GetReceipts70(req) => { + (req.request_id, EthMessageID::Receipts, req.message.block_hashes.len()) + } + EthMessage::GetBlockAccessLists(req) => { + (req.request_id, EthMessageID::BlockAccessLists, req.message.0.len()) + } + EthMessage::GetCells(req) => { + (req.request_id, EthMessageID::Cells, req.message.hashes.len()) + } + _ => return None, + }; + Some((request_id, Self { message_id, max_items })) + } +} + +/// Returns whether the response payload following the request id holds more than `max_items` +/// items. +fn response_exceeds_items( + version: EthVersion, + message_id: EthMessageID, + mut payload: &[u8], + max_items: usize, +) -> alloy_rlp::Result { + match message_id { + // eth/70 receipts carry the `lastBlockIncomplete` flag before the receipt lists. + EthMessageID::Receipts if version >= EthVersion::Eth70 => { + bool::decode(&mut payload)?; + } + // Cells wraps the per-transaction hashes and cell lists in a struct. + EthMessageID::Cells => { + let mut cells = Header::decode_bytes(&mut payload, true)?; + return Ok(list_exceeds_items(&mut cells, max_items)? || + list_exceeds_items(&mut cells, max_items)?) + } + _ => {} + } + list_exceeds_items(&mut payload, max_items) +} + +/// Decodes the header of the RLP list at the front of `buf` and returns whether the list holds +/// more than `max_items` items, without decoding them. +/// +/// Advances `buf` past the list. +pub(crate) fn list_exceeds_items(buf: &mut &[u8], max_items: usize) -> alloy_rlp::Result { + let mut items = Header::decode_bytes(buf, true)?; + let mut count = 0; + while !items.is_empty() { + if count == max_items { + return Ok(true) + } + let header = Header::decode(&mut items)?; + // `Header::decode` checked that the payload is in bounds. + items = &items[header.payload_length..]; + count += 1; + } + Ok(false) +} + #[cfg(test)] mod tests { - use super::UnauthedEthStream; + use super::{EthStreamInner, UnauthedEthStream}; use crate::{ broadcast::BlockHashNumber, errors::{EthHandshakeError, EthStreamError}, ethstream::RawCapabilityMessage, hello::DEFAULT_TCP_PORT, + message::RequestPair, p2pstream::UnauthedP2PStream, - EthMessage, EthStream, EthVersion, HelloMessageWithProtocols, PassthroughCodec, - ProtocolVersion, Status, StatusMessage, + BlockAccessLists, BlockBodies, BlockHeaders, Cells, EthMessage, EthMessageID, EthStream, + EthVersion, GetBlockAccessLists, GetBlockBodies, GetCells, GetReceipts70, + HelloMessageWithProtocols, PassthroughCodec, ProtocolMessage, ProtocolVersion, Receipts70, + Status, StatusMessage, }; use alloy_chains::NamedChain; - use alloy_primitives::{bytes::Bytes, B256, U256}; + use alloy_primitives::{ + bytes::{Bytes, BytesMut}, + B128, B256, U256, + }; use alloy_rlp::Decodable; use futures::{SinkExt, StreamExt}; use reth_ecies::stream::ECIESStream; @@ -829,4 +995,175 @@ mod tests { handle.await.unwrap(); } + + /// Encodes `msg` with its message id, as [`EthStreamInner::decode_message`] receives it. + fn encode(msg: EthMessage) -> BytesMut { + alloy_rlp::encode(ProtocolMessage::from(msg)).as_slice().into() + } + + fn get_block_access_lists(request_id: u64, hashes: usize) -> EthMessage { + EthMessage::GetBlockAccessLists(RequestPair { + request_id, + message: GetBlockAccessLists(vec![B256::ZERO; hashes]), + }) + } + + fn block_access_lists(request_id: u64, entries: usize) -> EthMessage { + EthMessage::BlockAccessLists(RequestPair { + request_id, + message: BlockAccessLists(vec![None; entries]), + }) + } + + #[test] + fn unsolicited_response_is_rejected() { + let mut eth = EthStreamInner::::new(EthVersion::Eth71); + + let err = eth.decode_message(encode(block_access_lists(7, 1))).unwrap_err(); + assert!(matches!( + err, + EthStreamError::UnsolicitedResponse { + message_id: EthMessageID::BlockAccessLists, + request_id: 7 + } + )); + assert!(err.is_protocol_breach()); + } + + #[test] + fn response_to_sent_request_is_decoded_once() { + let mut eth = EthStreamInner::::new(EthVersion::Eth71); + eth.encode_message(get_block_access_lists(7, 2)).unwrap(); + + let response = block_access_lists(7, 2); + assert_eq!(eth.decode_message(encode(response.clone())).unwrap(), response); + assert!(matches!( + eth.decode_message(encode(response)).unwrap_err(), + EthStreamError::UnsolicitedResponse { + message_id: EthMessageID::BlockAccessLists, + request_id: 7 + } + )); + } + + #[test] + fn response_with_more_items_than_requested_is_rejected() { + let mut eth = EthStreamInner::::new(EthVersion::Eth71); + eth.encode_message(get_block_access_lists(7, 2)).unwrap(); + + let err = eth.decode_message(encode(block_access_lists(7, 3))).unwrap_err(); + assert!(matches!( + err, + EthStreamError::ResponseExceedsRequest { + message_id: EthMessageID::BlockAccessLists, + request_id: 7, + max_items: 2 + } + )); + assert!(err.is_protocol_breach()); + } + + #[test] + fn response_of_other_type_is_rejected() { + let mut eth = EthStreamInner::::new(EthVersion::Eth71); + eth.encode_message(EthMessage::GetBlockBodies(RequestPair { + request_id: 7, + message: GetBlockBodies(vec![B256::ZERO]), + })) + .unwrap(); + + let response = EthMessage::BlockHeaders(RequestPair { + request_id: 7, + message: BlockHeaders(Vec::new()), + }); + assert!(matches!( + eth.decode_message(encode(response)).unwrap_err(), + EthStreamError::UnsolicitedResponse { + message_id: EthMessageID::BlockHeaders, + request_id: 7 + } + )); + + // The request was consumed, so its proper response is now unsolicited as well. + let response = EthMessage::BlockBodies(RequestPair { + request_id: 7, + message: BlockBodies(Vec::new()), + }); + assert!(matches!( + eth.decode_message(encode(response)).unwrap_err(), + EthStreamError::UnsolicitedResponse { message_id: EthMessageID::BlockBodies, .. } + )); + } + + #[test] + fn receipts70_response_items_are_receipt_lists() { + let mut eth = EthStreamInner::::new(EthVersion::Eth70); + let request = |request_id| { + EthMessage::GetReceipts70(RequestPair { + request_id, + message: GetReceipts70 { + first_block_receipt_index: 0, + block_hashes: vec![B256::ZERO], + }, + }) + }; + let response = |request_id, lists| { + EthMessage::Receipts70(RequestPair { + request_id, + message: Receipts70 { + last_block_incomplete: true, + receipts: vec![Vec::new(); lists], + }, + }) + }; + + eth.encode_message(request(1)).unwrap(); + assert_eq!(eth.decode_message(encode(response(1, 1))).unwrap(), response(1, 1)); + + eth.encode_message(request(2)).unwrap(); + assert!(matches!( + eth.decode_message(encode(response(2, 2))).unwrap_err(), + EthStreamError::ResponseExceedsRequest { + message_id: EthMessageID::Receipts, + request_id: 2, + max_items: 1 + } + )); + } + + #[test] + fn cells_response_bounds_hashes_and_cells() { + let mut eth = EthStreamInner::::new(EthVersion::Eth72); + let request = |request_id| { + EthMessage::GetCells(RequestPair { + request_id, + message: GetCells { hashes: vec![B256::ZERO], cell_mask: B128::ZERO }, + }) + }; + let response = |request_id, hashes, cells| { + EthMessage::Cells(RequestPair { + request_id, + message: Cells { + hashes: vec![B256::ZERO; hashes], + cells: vec![Vec::new(); cells], + cell_mask: B128::ZERO, + }, + }) + }; + + eth.encode_message(request(1)).unwrap(); + assert_eq!(eth.decode_message(encode(response(1, 1, 1))).unwrap(), response(1, 1, 1)); + + for (request_id, hashes, cells) in [(2, 2, 1), (3, 1, 2)] { + eth.encode_message(request(request_id)).unwrap(); + assert!(matches!( + eth.decode_message(encode(response(request_id, hashes, cells))).unwrap_err(), + EthStreamError::ResponseExceedsRequest { + message_id: EthMessageID::Cells, + max_items: 1, + .. + } + )); + } + } } diff --git a/crates/net/network/src/eth_requests.rs b/crates/net/network/src/eth_requests.rs index c3781c51857..910ddb19add 100644 --- a/crates/net/network/src/eth_requests.rs +++ b/crates/net/network/src/eth_requests.rs @@ -2192,9 +2192,18 @@ mod tests { } let encoded = encode_receipts70_response(resp); assert!(encoded.len() <= MAX_MESSAGE_SIZE); - EthStreamInner::::new(EthVersion::Eth70) - .decode_message(encoded.as_ref().into()) + // The requesting side only decodes responses to requests it sent. + let mut requester = EthStreamInner::::new(EthVersion::Eth70); + requester + .encode_message(EthMessage::GetReceipts70(RequestPair { + request_id: u64::MAX, + message: GetReceipts70 { + first_block_receipt_index: first_receipt_index, + block_hashes: vec![hash], + }, + })) .unwrap(); + requester.decode_message(encoded.as_ref().into()).unwrap(); } /// Encodes a receipts response with the largest possible request ID. diff --git a/crates/net/network/src/session/active.rs b/crates/net/network/src/session/active.rs index b2305fcd75d..693a2f49ff6 100644 --- a/crates/net/network/src/session/active.rs +++ b/crates/net/network/src/session/active.rs @@ -1626,6 +1626,41 @@ mod tests { rx.await.unwrap(); } + #[tokio::test(flavor = "multi_thread")] + async fn test_unsolicited_response_disconnects_with_protocol_breach() { + let mut builder = SessionBuilder::default(); + + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + let local_addr = listener.local_addr().unwrap(); + + let fut = builder.with_client_stream(local_addr, async move |mut client_stream| { + assert_eq!(client_stream.version(), EthVersion::Eth71); + client_stream + .send(EthMessage::BlockAccessLists(RequestPair { + request_id: 7, + message: BlockAccessLists(vec![None; 1024]), + })) + .await + .unwrap(); + + let msg = client_stream.next().await.unwrap().unwrap_err(); + assert_eq!(msg.as_disconnected(), Some(DisconnectReason::ProtocolBreach)); + }); + + let (tx, rx) = oneshot::channel(); + + tokio::task::spawn(async move { + let (incoming, _) = listener.accept().await.unwrap(); + let session = builder.connect_incoming(incoming).await; + session.await; + + tx.send(()).unwrap(); + }); + + fut.await; + rx.await.unwrap(); + } + #[tokio::test(flavor = "multi_thread")] async fn handle_dropped_stream() { let mut builder = SessionBuilder::default(); From 467449357b6d0aca6c1fb7cc2d87a304bb8fbff5 Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Tue, 10 Nov 2026 17:29:34 +0000 Subject: [PATCH 083/100] chore(deps): bump evm2 to 66687c1 (#28413) --- Cargo.lock | 44 +++++++++++++------------- Cargo.toml | 12 +++---- crates/evm/evm/src/precompile_cache.rs | 15 +++++---- 3 files changed, 37 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 439ef4b4c62..77ac9ae3d6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1042,7 +1042,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -1053,7 +1053,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -3622,7 +3622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -3699,7 +3699,7 @@ dependencies = [ [[package]] name = "evm2" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -3740,7 +3740,7 @@ dependencies = [ [[package]] name = "evm2-inspectors" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-consensus", "alloy-eip2930", @@ -3763,7 +3763,7 @@ dependencies = [ [[package]] name = "evm2-jit" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "evm2", "evm2-jit-backend", @@ -3778,7 +3778,7 @@ dependencies = [ [[package]] name = "evm2-jit-backend" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "eyre", "ruint", @@ -3787,12 +3787,12 @@ dependencies = [ [[package]] name = "evm2-jit-build" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" [[package]] name = "evm2-jit-builtins" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "evm2", @@ -3805,7 +3805,7 @@ dependencies = [ [[package]] name = "evm2-jit-codegen" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "bitflags 2.13.2", @@ -3828,7 +3828,7 @@ dependencies = [ [[package]] name = "evm2-jit-context" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "evm2", @@ -3838,7 +3838,7 @@ dependencies = [ [[package]] name = "evm2-jit-llvm" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "cc", @@ -3851,7 +3851,7 @@ dependencies = [ [[package]] name = "evm2-jit-runtime" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -3877,7 +3877,7 @@ dependencies = [ [[package]] name = "evm2-macros" version = "0.1.0" -source = "git+https://github.com/DaniPopes/evm2?rev=0b448ca75d9f9a86ef27b700921f1c45d933e5ea#0b448ca75d9f9a86ef27b700921f1c45d933e5ea" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "proc-macro2", "quote", @@ -5522,7 +5522,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -6615,7 +6615,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -7661,7 +7661,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -11433,7 +11433,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -11513,7 +11513,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs 1.0.10", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -12195,7 +12195,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -12481,7 +12481,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] @@ -13656,7 +13656,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.60.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 306985e223b..8b20ec4190c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -434,9 +434,9 @@ reth-trie-sparse = { path = "crates/trie/sparse", default-features = false } reth-zstd-compressors = { version = "0.8.2", default-features = false } # evm2 -evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea", default-features = false } -evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea", default-features = false } -evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea", default-features = false } +evm2 = { git = "https://github.com/alloy-rs/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475", default-features = false } +evm2-inspectors = { git = "https://github.com/alloy-rs/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475", default-features = false } +evm2-jit = { git = "https://github.com/alloy-rs/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475", default-features = false } # eth alloy-dyn-abi = "1.6.1" @@ -673,9 +673,9 @@ ipnet = "2.11" # evm2 is patched through its pre-transfer URL, which redirects to alloy-rs/evm2, because Cargo # rejects a patch from the same source. [patch."https://github.com/alloy-rs/evm2"] -evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea" } -evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea" } -evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "0b448ca75d9f9a86ef27b700921f1c45d933e5ea" } +evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475" } +evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475" } +evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475" } [patch.crates-io] # reth-core diff --git a/crates/evm/evm/src/precompile_cache.rs b/crates/evm/evm/src/precompile_cache.rs index 383e6ed683d..72080cda69f 100644 --- a/crates/evm/evm/src/precompile_cache.rs +++ b/crates/evm/evm/src/precompile_cache.rs @@ -226,7 +226,7 @@ where let cacheable_input = message.input.len() <= MAX_PRECOMPILE_CACHE_INPUT_SIZE; if cacheable_input && - let Some(entry) = cache.get(message.input.as_ref(), self.spec_id.clone()) + let Some(entry) = cache.get(evm.message_input(message), self.spec_id.clone()) { return Some(match gas.spend(entry.regular_gas_used).map_err(PrecompileError::from) { Ok(()) => { @@ -246,12 +246,14 @@ where }) } + // Copy the input before running the precompile: it may be a range of the caller's memory. + let input = cacheable_input.then(|| Bytes::copy_from_slice(evm.message_input(message))); let before = GasSnapshot::new(gas); let result = self.inner.execute(evm, message, gas)?; let after = GasSnapshot::new(gas); match &result { - Ok(output) if cacheable_input => { + Ok(output) if let Some(input) = input => { if before.reservoir != after.reservoir { error!( target: "evm::precompile_cache", @@ -272,7 +274,7 @@ where ); } else if let Some(regular_gas_used) = after.spent.checked_sub(before.spent) { let _size = cache.insert( - Bytes::copy_from_slice(message.input.as_ref()), + input, CacheEntry { output: output.clone(), regular_gas_used, @@ -542,7 +544,8 @@ mod tests { assert_eq!(output.bytes(), b"cached-input"); let cache = cache_map.cache_for_address(address); - let entry = cache.get(message.input.as_ref(), SpecId::OSAKA).expect("cache entry exists"); + let entry = + cache.get(evm.message_input(&message), SpecId::OSAKA).expect("cache entry exists"); assert_eq!(entry.output.bytes(), b"cached-input"); assert_eq!(entry.regular_gas_used, 18); @@ -586,11 +589,11 @@ mod tests { .execute(&mut evm, &message, &mut GasTracker::new(30_000)) .unwrap() .unwrap(); - assert_eq!(output.bytes(), message.input.as_ref()); + assert_eq!(output.bytes(), evm.message_input(&message)); assert_eq!( cache .cache_for_address(address) - .get(message.input.as_ref(), SpecId::OSAKA) + .get(evm.message_input(&message), SpecId::OSAKA) .is_some(), len == 2048 ); From e847b55e388576db3f22369a61819fe5cb9fa009 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 20:14:46 +0100 Subject: [PATCH 084/100] fix(txpool): run blob replacement overdraft check for head replacements (#28356) --- crates/transaction-pool/src/pool/txpool.rs | 100 +++++++++++++++------ 1 file changed, 72 insertions(+), 28 deletions(-) diff --git a/crates/transaction-pool/src/pool/txpool.rs b/crates/transaction-pool/src/pool/txpool.rs index 38cacef85a8..cfe1db67a5f 100644 --- a/crates/transaction-pool/src/pool/txpool.rs +++ b/crates/transaction-pool/src/pool/txpool.rs @@ -2034,7 +2034,8 @@ impl AllTransactions { on_chain_balance: U256, ancestor: Option, ) -> Result, InsertErr> { - if let Some(ancestor) = ancestor { + // the cost of all preceding transactions of the sender + let mut cumulative_cost = if let Some(ancestor) = ancestor { let Some(ancestor_tx) = self.txs.get(&ancestor) else { // ancestor tx is missing, so we can't insert the new blob self.metrics.blob_transactions_nonce_gaps.increment(1); @@ -2047,39 +2048,40 @@ impl AllTransactions { return Err(InsertErr::BlobTxHasNonceGap { transaction: Arc::new(new_blob_tx) }) } - // the max cost executing this transaction requires - let mut cumulative_cost = ancestor_tx.next_cumulative_cost() + new_blob_tx.cost(); + ancestor_tx.next_cumulative_cost() + } else { + U256::ZERO + }; - // check if the new blob would go into overdraft - if cumulative_cost > on_chain_balance { - // the transaction would go into overdraft - return Err(InsertErr::Overdraft { transaction: Arc::new(new_blob_tx) }) - } + // the max cost executing this transaction requires + cumulative_cost += new_blob_tx.cost(); - // ensure that a replacement would not shift already propagated blob transactions into - // overdraft - let id = new_blob_tx.transaction_id; - let mut descendants = self.descendant_txs_inclusive(&id).peekable(); - if let Some((maybe_replacement, _)) = descendants.peek() && - **maybe_replacement == new_blob_tx.transaction_id - { - // replacement transaction - descendants.next(); - - // check if any of descendant blob transactions should be shifted into overdraft - for (_, tx) in descendants { - cumulative_cost += tx.transaction.cost(); - if tx.transaction.is_eip4844() && cumulative_cost > on_chain_balance { - // the transaction would shift - return Err(InsertErr::Overdraft { transaction: Arc::new(new_blob_tx) }) - } - } - } - } else if new_blob_tx.cost() > &on_chain_balance { + // check if the new blob would go into overdraft + if cumulative_cost > on_chain_balance { // the transaction would go into overdraft return Err(InsertErr::Overdraft { transaction: Arc::new(new_blob_tx) }) } + // ensure that a replacement would not shift already propagated blob transactions into + // overdraft + let id = new_blob_tx.transaction_id; + let mut descendants = self.descendant_txs_inclusive(&id).peekable(); + if let Some((maybe_replacement, _)) = descendants.peek() && + **maybe_replacement == new_blob_tx.transaction_id + { + // replacement transaction + descendants.next(); + + // check if any of descendant blob transactions should be shifted into overdraft + for (_, tx) in descendants { + cumulative_cost += tx.transaction.cost(); + if tx.transaction.is_eip4844() && cumulative_cost > on_chain_balance { + // the transaction would shift + return Err(InsertErr::Overdraft { transaction: Arc::new(new_blob_tx) }) + } + } + } + Ok(new_blob_tx) } @@ -2540,6 +2542,48 @@ mod tests { assert_eq!(inserted.subpool, SubPool::Pending); } + #[test] + fn test_blob_head_replacement_overdraft() { + let on_chain_nonce = 0; + let mut f = MockTransactionFactory::default(); + let mut pool = AllTransactions::default(); + + // `with_gas_limit` recomputes the cost after the fee setters + let head = MockTransaction::eip4844() + .with_max_fee(100) + .with_priority_fee(100) + .with_nonce(on_chain_nonce) + .with_gas_limit(10); + let child = head.next(); + let head_id = f.validated(head.clone()).transaction_id; + let child_id = f.validated(child.clone()).transaction_id; + assert_eq!(*head.cost(), U256::from(1_000)); + + // both fit the balance + let on_chain_balance = U256::from(4_500); + pool.insert_tx(f.validated(head.clone()), on_chain_balance, on_chain_nonce).unwrap(); + pool.insert_tx(f.validated(child), on_chain_balance, on_chain_nonce).unwrap(); + assert_eq!(pool.txs.get(&child_id).unwrap().subpool, SubPool::Pending); + + // the replacement fits the balance on its own, but not together with the child + let blob_fee = 3 * head.max_fee_per_blob_gas().unwrap(); + let replacement = head + .rng_hash() + .with_max_fee(400) + .with_priority_fee(400) + .with_blob_fee(blob_fee) + .with_gas_limit(10); + assert_eq!(*replacement.cost(), U256::from(4_000)); + let err = + pool.insert_tx(f.validated(replacement), on_chain_balance, on_chain_nonce).unwrap_err(); + assert!(matches!(err, InsertErr::Overdraft { .. }), "{err:?}"); + + // nothing changed + assert_eq!(pool.txs.get(&head_id).unwrap().transaction.cost(), &U256::from(1_000)); + assert_eq!(pool.txs.get(&child_id).unwrap().subpool, SubPool::Pending); + assert!(pool.txs.get(&child_id).unwrap().state.contains(TxState::ENOUGH_BALANCE)); + } + #[test] fn test_insert_blob_not_enough_blob_fee() { let on_chain_balance = U256::MAX; From c6c086fc238f008869b960644b8f12da404518a7 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 20:15:21 +0100 Subject: [PATCH 085/100] fix(txpool): don't treat oversized transactions as bad (#28355) --- crates/net/network/src/transactions/mod.rs | 1 - crates/transaction-pool/src/error.rs | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/net/network/src/transactions/mod.rs b/crates/net/network/src/transactions/mod.rs index d30f2d27c43..0ace3d21a67 100644 --- a/crates/net/network/src/transactions/mod.rs +++ b/crates/net/network/src/transactions/mod.rs @@ -549,7 +549,6 @@ impl TransactionsManager { /// - exceeds gas limit /// - gas uint overflow /// - exceeds max init code size - /// - oversized data /// - signer account has bytecode /// - chain id mismatch /// - old legacy chain id diff --git a/crates/transaction-pool/src/error.rs b/crates/transaction-pool/src/error.rs index 9f74d9d725b..2cfb51c5cdc 100644 --- a/crates/transaction-pool/src/error.rs +++ b/crates/transaction-pool/src/error.rs @@ -382,7 +382,10 @@ impl InvalidPoolTransactionError { false } Self::ExceedsMaxInitCodeSize(_, _) => true, - Self::OversizedData { .. } => true, + Self::OversizedData { .. } => { + // local setting + false + } Self::Underpriced => { // local setting false @@ -560,4 +563,12 @@ mod tests { assert!(!err.is_bad_blob_sidecar()); } + + #[test] + fn oversized_data_is_not_bad_transaction() { + let err = InvalidPoolTransactionError::OversizedData { size: 2048, limit: 1024 }; + assert!(err.is_oversized()); + assert!(!err.is_bad_transaction()); + assert!(!PoolError::new(TxHash::ZERO, err).is_bad_transaction()); + } } From 5dad593ec847a0558c24abf24115cefaee30355a Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 19:51:49 +0000 Subject: [PATCH 086/100] fix(eth-wire): reject shared capabilities that overflow the message id space (#28414) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/net/eth-wire/src/capability.rs | 56 +++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/crates/net/eth-wire/src/capability.rs b/crates/net/eth-wire/src/capability.rs index 4814e400b39..ac6322a789e 100644 --- a/crates/net/eth-wire/src/capability.rs +++ b/crates/net/eth-wire/src/capability.rs @@ -349,16 +349,23 @@ pub fn shared_capability_offsets( // Message IDs are assumed to be compact from ID 0x10 onwards (0x00-0x0f is reserved for the // "p2p" capability) and given to each shared (equal-version, equal-name) capability in // alphabetic order. - let mut offset = MAX_RESERVED_MESSAGE_ID + 1; + // + // Message IDs are a single byte, so offsets are accumulated in u16 and the shared capabilities + // must fit in IDs 0x10..=0xff. + let mut offset = u16::from(MAX_RESERVED_MESSAGE_ID) + 1; for name in shared_capability_names { let proto_version = &shared_capabilities[&name]; + let start = u8::try_from(offset).map_err(|_| SharedCapabilityError::MessageIdOverflow)?; let shared_capability = SharedCapability::new( &name, proto_version.version as u8, - offset, + start, proto_version.messages, )?; - offset += shared_capability.num_messages(); + offset += u16::from(shared_capability.num_messages()); + if offset > u16::from(u8::MAX) + 1 { + return Err(SharedCapabilityError::MessageIdOverflow.into()) + } shared_with_offsets.push(shared_capability); } @@ -379,6 +386,10 @@ pub enum SharedCapabilityError { /// message id space [`MAX_RESERVED_MESSAGE_ID`]. #[error("message id offset `{0}` is reserved")] ReservedMessageIdOffset(u8), + /// Thrown when the shared capabilities need more message ids than fit in the single-byte + /// message id space. + #[error("shared capabilities exceed the message id space")] + MessageIdOverflow, } /// An error thrown when capabilities mismatch. @@ -578,6 +589,45 @@ mod tests { assert_eq!(shared_eth.name(), "eth"); } + /// Negotiates `(name, messages)` protocols with a peer that shares all of them. + fn negotiate_all( + protocols: &[(&'static str, u8)], + ) -> Result, P2PStreamError> { + let local_protocols: Vec<_> = protocols + .iter() + .map(|&(name, messages)| Protocol::new(Capability::new_static(name, 1), messages)) + .collect(); + let peer_capabilities = local_protocols.iter().map(|p| p.cap.clone()).collect(); + shared_capability_offsets(local_protocols, peer_capabilities) + } + + #[test] + fn shared_capability_offsets_reject_last_capability_past_message_id_space() { + // 0x10 + 120 + 121 ends one message id past 0xff. + assert!(matches!( + negotiate_all(&[("aaa", 120), ("bbb", 121)]), + Err(P2PStreamError::ParseSharedCapability(SharedCapabilityError::MessageIdOverflow)) + )); + } + + #[test] + fn shared_capability_offsets_reject_capability_after_full_message_id_space() { + // 0x10 + 120 + 120 uses every message id, so ccc would start at 0x100. + assert!(matches!( + negotiate_all(&[("aaa", 120), ("bbb", 120), ("ccc", 1)]), + Err(P2PStreamError::ParseSharedCapability(SharedCapabilityError::MessageIdOverflow)) + )); + } + + #[test] + fn shared_capability_offsets_fill_message_id_space() { + // 0x10 + 120 + 120 uses every message id up to and including 0xff. + let shared = SharedCapabilities(negotiate_all(&[("aaa", 120), ("bbb", 120)]).unwrap()); + + assert_eq!(shared[1].message_id_offset(), MAX_RESERVED_MESSAGE_ID + 1 + 120); + assert_eq!(shared.find_by_offset(u8::MAX).unwrap().name(), "bbb"); + } + #[test] fn relative_message_id_accounts_for_intermediate_capabilities() { let intermediate_cap = Capability::new_static("foo", 1); From 85414e669f3ea1146110986e23f6fd166126cf4c Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 22:36:16 +0100 Subject: [PATCH 087/100] fix(rpc): serialize eth_sendTransaction nonces (#28418) --- crates/rpc/rpc-eth-api/src/helpers/signer.rs | 12 ++++++- .../rpc-eth-api/src/helpers/transaction.rs | 11 ++++-- crates/rpc/rpc/src/eth/helpers/signer.rs | 16 +++++++-- crates/rpc/rpc/src/eth/helpers/transaction.rs | 34 +++++++++++++++++++ 4 files changed, 66 insertions(+), 7 deletions(-) diff --git a/crates/rpc/rpc-eth-api/src/helpers/signer.rs b/crates/rpc/rpc-eth-api/src/helpers/signer.rs index be04ecc2786..d54634e0c6f 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/signer.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/signer.rs @@ -5,7 +5,8 @@ use alloy_primitives::{Address, Signature}; use alloy_rpc_types_eth::TransactionRequest; use dyn_clone::DynClone; use reth_rpc_eth_types::SignError; -use std::result; +use std::{result, sync::Arc}; +use tokio::sync::Mutex; /// Result returned by [`EthSigner`] methods. pub type Result = result::Result; @@ -29,6 +30,15 @@ pub trait EthSigner: Send + Sync + DynClone { /// Encodes and signs the typed data according EIP-712. Payload must implement Eip712 trait. fn sign_typed_data(&self, address: Address, payload: &TypedData) -> Result; + + /// Returns the lock `eth_sendTransaction` holds for this signer's accounts from filling the + /// nonce until the signed transaction is in the pool, so concurrent requests from one account + /// get distinct nonces. + /// + /// `None` leaves those requests unserialized. + fn nonce_lock(&self) -> Option>> { + None + } } dyn_clone::clone_trait_object!( EthSigner); diff --git a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs index f1f7c336565..3ff84ecd73e 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/transaction.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/transaction.rs @@ -515,9 +515,14 @@ pub trait EthTransactions: LoadTransaction { None => return Err(SignError::NoAccount.into_eth_err()), }; - if self.find_signer(&from).is_err() { - return Err(SignError::NoAccount.into_eth_err()) - } + let signer = self.find_signer(&from)?; + + // Held until the pool insert below, so a concurrent request from this account reads + // the pool only after this transaction is in it. + let _nonce_guard = match signer.nonce_lock() { + Some(lock) if request.as_ref().nonce().is_none() => Some(lock.lock_owned().await), + _ => None, + }; // set nonce if not already set before if request.as_ref().nonce().is_none() { diff --git a/crates/rpc/rpc/src/eth/helpers/signer.rs b/crates/rpc/rpc/src/eth/helpers/signer.rs index 3a6907c497f..935eae4f493 100644 --- a/crates/rpc/rpc/src/eth/helpers/signer.rs +++ b/crates/rpc/rpc/src/eth/helpers/signer.rs @@ -8,12 +8,16 @@ use alloy_signer_local::{coins_bip39::English, MnemonicBuilder, PrivateKeySigner use reth_rpc_convert::SignableTxRequest; use reth_rpc_eth_api::helpers::{signer::Result, EthSigner}; use reth_rpc_eth_types::SignError; +use std::sync::Arc; +use tokio::sync::Mutex; /// Holds developer keys #[derive(Debug, Clone)] pub struct DevSigner { addresses: Vec
, accounts: AddressMap, + /// Shared by all clones of this signer, see [`EthSigner::nonce_lock`]. + nonce_lock: Arc>, } impl DevSigner { @@ -30,7 +34,8 @@ impl DevSigner { let addresses = vec![address]; let accounts = AddressMap::from_iter([(address, sk)]); - signers.push(Box::new(Self { addresses, accounts }) as Box>); + signers.push(Box::new(Self { addresses, accounts, nonce_lock: Default::default() }) + as Box>); } signers } @@ -55,7 +60,8 @@ impl DevSigner { let addresses = vec![address]; let accounts = AddressMap::from_iter([(address, sk)]); - signers.push(Box::new(Self { addresses, accounts }) as Box>); + signers.push(Box::new(Self { addresses, accounts, nonce_lock: Default::default() }) + as Box>); } signers @@ -102,6 +108,10 @@ impl> EthSigner for DevS let encoded = payload.eip712_signing_hash().map_err(|_| SignError::InvalidTypedData)?; self.sign_hash(encoded, address) } + + fn nonce_lock(&self) -> Option>> { + Some(self.nonce_lock.clone()) + } } #[cfg(test)] @@ -118,7 +128,7 @@ mod tests { let address = signer.address(); let accounts = AddressMap::from_iter([(address, signer)]); let addresses = vec![address]; - DevSigner { addresses, accounts } + DevSigner { addresses, accounts, nonce_lock: Default::default() } } #[tokio::test] diff --git a/crates/rpc/rpc/src/eth/helpers/transaction.rs b/crates/rpc/rpc/src/eth/helpers/transaction.rs index c174a0bbd3c..38ed6e52fcc 100644 --- a/crates/rpc/rpc/src/eth/helpers/transaction.rs +++ b/crates/rpc/rpc/src/eth/helpers/transaction.rs @@ -541,6 +541,40 @@ mod tests { assert_eq!(pooled.transaction.chain_id(), Some(1)); } + #[tokio::test] + async fn send_transaction_assigns_distinct_nonces_to_concurrent_requests() { + let signers = DevSigner::random_signers(1); + let address = signers[0].accounts()[0]; + let accounts = AddressMap::from_iter([( + address, + ExtendedAccount::new(0, U256::from(10_000_000_000_000_000_000u64)), + )]); + let eth_api = mock_eth_api(accounts); + eth_api.signers().write().extend(signers); + + let tx_req = TransactionRequest { + from: Some(address), + to: Some(address.into()), + gas: Some(21_000), + gas_price: Some(1_000_000_000), + ..Default::default() + }; + + let hashes = futures::future::try_join_all( + (0..5).map(|_| eth_api.send_transaction_request(tx_req.clone())), + ) + .await + .expect("concurrent requests should each get their own nonce"); + let mut nonces = hashes + .iter() + .map(|hash| { + eth_api.pool().get(hash).expect("transaction should be in the pool").nonce() + }) + .collect::>(); + nonces.sort_unstable(); + assert_eq!(nonces, [0, 1, 2, 3, 4]); + } + #[tokio::test] async fn test_fill_transaction_fills_chain_id() { let address = Address::random(); From 7fe34e77a732e74f13a01ca884c6a411693eeb27 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 23:02:25 +0100 Subject: [PATCH 088/100] fix(rpc): default the builder validation window to 3 blocks (#28424) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/rpc/rpc-builder/src/config.rs | 29 +++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/crates/rpc/rpc-builder/src/config.rs b/crates/rpc/rpc-builder/src/config.rs index a5b880234c4..c42c267c272 100644 --- a/crates/rpc/rpc-builder/src/config.rs +++ b/crates/rpc/rpc-builder/src/config.rs @@ -117,7 +117,11 @@ impl RethRpcServerConfig for RpcServerArgs { fn flashbots_config(&self) -> ValidationApiConfig { ValidationApiConfig { disallow: self.builder_disallow.clone().unwrap_or_default(), - validation_window: self.rpc_eth_proof_window, + // the proof window defaults to 0, which would reject any submission whose parent is + // behind the tip, so it can only widen the default window + validation_window: self + .rpc_eth_proof_window + .max(ValidationApiConfig::DEFAULT_VALIDATION_WINDOW), } } @@ -283,6 +287,7 @@ impl RethRpcServerConfig for RpcServerArgs { mod tests { use clap::{Args, Parser}; use reth_node_core::args::RpcServerArgs; + use reth_rpc::ValidationApiConfig; use reth_rpc_eth_types::{EthStateCacheConfig, RPC_DEFAULT_GAS_CAP}; use reth_rpc_layer::JwtSecret; use reth_rpc_server_types::{constants, RethRpcModule, RpcModuleSelection}; @@ -342,6 +347,28 @@ mod tests { } } + #[test] + fn flashbots_validation_window() { + let args = CommandParser::::parse_from(["reth"]).args; + assert_eq!( + args.flashbots_config().validation_window, + ValidationApiConfig::DEFAULT_VALIDATION_WINDOW + ); + + let args = + CommandParser::::parse_from(["reth", "--rpc.eth-proof-window", "1"]) + .args; + assert_eq!( + args.flashbots_config().validation_window, + ValidationApiConfig::DEFAULT_VALIDATION_WINDOW + ); + + let args = + CommandParser::::parse_from(["reth", "--rpc.eth-proof-window", "100"]) + .args; + assert_eq!(args.flashbots_config().validation_window, 100); + } + #[test] fn test_rpc_gas_cap() { let args = CommandParser::::parse_from(["reth"]).args; From c050a76fd1de19b742299845b711515d16485a68 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 23:03:25 +0100 Subject: [PATCH 089/100] fix(net): keep disconnecting peers on repeated removal (#28423) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- crates/net/network/src/peers.rs | 34 ++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/crates/net/network/src/peers.rs b/crates/net/network/src/peers.rs index 52130da6ba3..7672c3db81c 100644 --- a/crates/net/network/src/peers.rs +++ b/crates/net/network/src/peers.rs @@ -1045,10 +1045,19 @@ impl PeersManager { /// Removes the tracked node from the set. pub(crate) fn remove_peer(&mut self, peer_id: PeerId) { - let Entry::Occupied(entry) = self.peers.entry(peer_id) else { return }; + let Entry::Occupied(mut entry) = self.peers.entry(peer_id) else { return }; if entry.get().is_trusted() { return } + if matches!( + entry.get().state, + PeerConnectionState::DisconnectingIn | PeerConnectionState::DisconnectingOut + ) { + // a previous removal already queued the disconnect and `PeerRemoved`, the entry must + // stay so the session close handler can release its slot + entry.get_mut().remove_after_disconnect = true; + return + } let mut peer = entry.remove(); trace!(target: "net::peers", ?peer_id, "remove discovered node"); @@ -3209,6 +3218,29 @@ mod tests { assert!(!peers.peers.contains_key(&peer_id)) } + #[tokio::test] + async fn test_repeated_remove_while_disconnecting_releases_slot() { + let peer_id = PeerId::random(); + let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 1, 2)), 8009); + let mut peers = PeersManager::default(); + + peers.on_incoming_pending_session(addr.ip()).unwrap(); + peers.on_incoming_session_established(peer_id, addr); + assert_eq!(peers.connection_info.num_inbound, 1); + + peers.remove_peer(peer_id); + peers.remove_peer(peer_id); + + let peer = peers.peers.get(&peer_id).unwrap(); + assert_eq!(peer.state, PeerConnectionState::DisconnectingIn); + assert!(peer.remove_after_disconnect); + assert_eq!(peers.connection_info.num_inbound, 1); + + peers.on_active_session_gracefully_closed(peer_id); + assert_eq!(peers.connection_info.num_inbound, 0); + assert!(!peers.peers.contains_key(&peer_id)); + } + #[tokio::test] async fn test_keep_incoming_after_disconnect_if_discovered() { let peer_id = PeerId::random(); From 15200acbe75f5aee8df82b8d81622cb370d79395 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Tue, 10 Nov 2026 21:57:38 +0000 Subject: [PATCH 090/100] fix(engine): close execution-apis#885 SSZ gaps (#28417) Co-authored-by: Soubhik Singha Mahapatra Co-authored-by: Ravan Mammadov <95362051+Ravan002@users.noreply.github.com> Co-authored-by: Matthias Seitz --- Cargo.lock | 3 + crates/ethereum/node/Cargo.toml | 4 + crates/ethereum/node/src/engine_ssz_proxy.rs | 95 ++++++++++++++----- .../ethereum/node/src/engine_ssz_witness.rs | 9 +- crates/ethereum/node/tests/e2e/eth.rs | 32 ++++--- 5 files changed, 105 insertions(+), 38 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 77ac9ae3d6a..a379a3d409c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9916,11 +9916,13 @@ dependencies = [ "reth-evm-ethereum", "reth-exex", "reth-network", + "reth-network-api", "reth-network-p2p", "reth-network-peers", "reth-node-api", "reth-node-builder", "reth-node-core", + "reth-payload-builder", "reth-payload-primitives", "reth-primitives-traits", "reth-provider", @@ -9938,6 +9940,7 @@ dependencies = [ "reth-stages-api", "reth-stages-types", "reth-static-file", + "reth-storage-api", "reth-tasks", "reth-testing-utils", "reth-tracing", diff --git a/crates/ethereum/node/Cargo.toml b/crates/ethereum/node/Cargo.toml index 6f968280c74..1332d489f65 100644 --- a/crates/ethereum/node/Cargo.toml +++ b/crates/ethereum/node/Cargo.toml @@ -72,6 +72,9 @@ tracing.workspace = true [dev-dependencies] reth-db.workspace = true +reth-network-api.workspace = true +reth-payload-builder.workspace = true +reth-storage-api.workspace = true reth-exex.workspace = true reth-e2e-test-utils.workspace = true reth-tasks.workspace = true @@ -166,4 +169,5 @@ test-utils = [ "reth-consensus/test-utils", "reth-engine-tree/test-utils", "reth-stages-api/test-utils", + "reth-payload-builder/test-utils", ] diff --git a/crates/ethereum/node/src/engine_ssz_proxy.rs b/crates/ethereum/node/src/engine_ssz_proxy.rs index 5270d1ef2fe..5fc11c3228f 100644 --- a/crates/ethereum/node/src/engine_ssz_proxy.rs +++ b/crates/ethereum/node/src/engine_ssz_proxy.rs @@ -4,9 +4,7 @@ //! //! [EIP-8178]: https://eips.ethereum.org/EIPS/eip-8178 -use crate::engine_ssz_witness::{ - EngineSszWitness, EngineSszWitnessError, PayloadStatusWithWitness, -}; +use crate::engine_ssz_witness::{EngineSszWitness, PayloadStatusWithWitness}; use alloy_consensus::{Transaction, TxEnvelope}; use alloy_eips::eip7685::Requests; use alloy_primitives::{Bytes, B128, B256}; @@ -22,11 +20,11 @@ use alloy_rpc_types_engine::{ ForkchoiceUpdateAmsterdam, ForkchoiceUpdateCancun, ForkchoiceUpdateOsaka, ForkchoiceUpdateParis, ForkchoiceUpdatePrague, ForkchoiceUpdateResponse, ForkchoiceUpdateShanghai, Optional, PayloadStatus as EngineSszPayloadStatus, - PayloadStatusKind, MAX_BLOBS_REQUEST, MAX_BODIES_REQUEST, + PayloadStatusKind, MAX_BLOBS_REQUEST, MAX_BODIES_REQUEST, MAX_ERROR_BYTES, }, CancunPayloadFields, ExecutionData, ExecutionPayload, ExecutionPayloadBodyV1, ExecutionPayloadFieldV2, ExecutionPayloadSidecar, ForkchoiceState, PayloadAttributes, - PayloadId, PraguePayloadFields, + PayloadId, PayloadStatusEnum, PraguePayloadFields, }; use futures::future::{BoxFuture, Either}; use http_body_util::{BodyExt, LengthLimitError, Limited}; @@ -46,7 +44,6 @@ use std::{ }; use tokio::sync::RwLock; use tower::{BoxError, Layer, Service}; -use tracing::debug; const OCTET_STREAM: &str = "application/octet-stream"; const APPLICATION_JSON: &str = "application/json"; @@ -407,18 +404,6 @@ where let witness = match status.status { PayloadStatusKind::Valid => match witness_handler.generate_witness(payload).await { Ok(witness) => Some(witness), - // The block is valid but its parent is only known to the engine tree. The - // status stays authoritative; resubmitting once forkchoice has made the parent - // canonical yields the witness. - Err(EngineSszWitnessError::ParentStateUnavailable { parent, source }) => { - debug!( - target: "engine::ssz", - %parent, - %source, - "witness omitted for valid payload" - ); - None - } Err(err) => { return problem_response( STATUS_INTERNAL_SERVER_ERROR, @@ -812,7 +797,7 @@ where Validator: EngineApiValidator, ChainSpec: EthereumHardforks + Send + Sync + 'static, { - let status = match fork.payloads_version() { + let mut status = match fork.payloads_version() { 1 => engine_api.new_payload_v1(payload).await, 2 => engine_api.new_payload_v2(payload).await, 3 => engine_api.new_payload_v3(payload).await, @@ -821,6 +806,10 @@ where _ => return Err(problem_response(STATUS_BAD_REQUEST, "unsupported-fork", None)), } .map_err(engine_error_response)?; + // The SSZ error string is bounded, truncate it rather than losing the INVALID verdict. + if let PayloadStatusEnum::Invalid { validation_error } = &mut status.status { + validation_error.truncate(validation_error.floor_char_boundary(MAX_ERROR_BYTES)); + } EngineSszPayloadStatus::try_from(status).map_err(|error| { problem_response(STATUS_INTERNAL_SERVER_ERROR, "internal", Some(error.to_string())) }) @@ -1254,17 +1243,28 @@ fn problem_response( #[cfg(test)] mod tests { use super::*; + use crate::{engine_ssz_witness::EngineSszWitnessError, EthereumEngineValidator}; use alloy_rpc_types_engine::{ ssz_engine_types::{ PayloadAttributesAmsterdam, PayloadAttributesCancun, PayloadAttributesParis, PayloadAttributesShanghai, }, - ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3, ForkchoiceUpdateError, + ClientCode, ClientVersionV1, ExecutionPayloadV1, ExecutionPayloadV2, ExecutionPayloadV3, + ForkchoiceUpdateError, PayloadStatus, + }; + use reth_chainspec::{ChainSpecBuilder, ForkCondition, MAINNET}; + use reth_engine_primitives::{ + BeaconEngineMessage, BeaconForkChoiceUpdateError, ConsensusEngineHandle, }; - use reth_chainspec::{ChainSpecBuilder, ForkCondition}; - use reth_engine_primitives::BeaconForkChoiceUpdateError; + use reth_ethereum_primitives::Block; + use reth_network_api::noop::NoopNetwork; + use reth_payload_builder::PayloadBuilderHandle; use reth_payload_primitives::PayloadBuilderError; + use reth_storage_api::noop::NoopProvider; + use reth_tasks::Runtime; + use reth_transaction_pool::noop::NoopTransactionPool; use ssz::Encode; + use tokio::sync::mpsc::unbounded_channel; #[tokio::test] async fn witness_capabilities_follow_both_wiring_orders() { @@ -1381,6 +1381,57 @@ mod tests { )); } + #[tokio::test] + async fn new_payload_keeps_invalid_status_with_long_validation_error() { + let (to_engine, mut engine_rx) = unbounded_channel(); + let chain_spec = MAINNET.clone(); + let api = EngineApi::new( + NoopProvider::default(), + chain_spec.clone(), + ConsensusEngineHandle::new(to_engine), + PayloadBuilderHandle::new(unbounded_channel().0).into(), + NoopTransactionPool::default(), + Runtime::test(), + ClientVersionV1 { + code: ClientCode::RH, + name: "Reth".to_string(), + version: String::new(), + commit: String::new(), + }, + Default::default(), + EthereumEngineValidator::new(chain_spec), + false, + NoopNetwork::default(), + ); + let envelope = ExecutionPayloadEnvelopeParis { + payload: ExecutionPayloadV1::from_block_unchecked(B256::ZERO, &Block::default()), + }; + // `€` is 3 bytes, so `MAX_ERROR_BYTES` falls inside a character. + let validation_error = "€".repeat(MAX_ERROR_BYTES); + + let (response, ()) = tokio::join!( + api.new_payload(EngineSszFork::Paris, envelope.as_ssz_bytes().into()), + async { + let Some(BeaconEngineMessage::NewPayload { tx, .. }) = engine_rx.recv().await + else { + panic!("engine did not receive the payload"); + }; + let status = PayloadStatusEnum::Invalid { validation_error }; + tx.send(Ok(PayloadStatus::from_status(status))).unwrap(); + } + ); + + assert_eq!(response.status(), STATUS_OK); + let body = response.into_body().collect().await.unwrap().to_bytes(); + let status = EngineSszPayloadStatus::from_ssz_bytes(&body).unwrap(); + assert_eq!( + PayloadStatus::from(status), + PayloadStatus::from_status(PayloadStatusEnum::Invalid { + validation_error: "€".repeat(MAX_ERROR_BYTES / 3), + }) + ); + } + #[test] fn forkchoice_withdrawal_bounds() { for count in [16, 17] { diff --git a/crates/ethereum/node/src/engine_ssz_witness.rs b/crates/ethereum/node/src/engine_ssz_witness.rs index c0efb5d8e11..29c88f4c5e9 100644 --- a/crates/ethereum/node/src/engine_ssz_witness.rs +++ b/crates/ethereum/node/src/engine_ssz_witness.rs @@ -21,8 +21,8 @@ use std::{future::Future, pin::Pin}; /// /// The parent state must be available through the provider (persisted, canonical in-memory, /// or pending). Parents present only in the engine tree are reported as -/// [`EngineSszWitnessError::ParentStateUnavailable`]; the route then answers with the payload -/// status alone. +/// [`EngineSszWitnessError::ParentStateUnavailable`]; the route then answers with an internal +/// error. #[derive(Clone, Debug)] pub struct EngineSszWitnessGenerator { provider: Provider, @@ -203,9 +203,8 @@ pub type ExecutionWitness = ExecutionWitnessV1; /// REST-SSZ response for `POST /payloads/witness`. /// /// The witness uses the Engine REST-SSZ `Optional[T]` encoding from execution-apis and is present -/// only when the payload status is `VALID`. A `VALID` status without a witness means the parent -/// state was not yet available through the provider (the parent is only known to the engine -/// tree); resubmitting the payload once forkchoice has made the parent canonical yields it. +/// for every `VALID` payload status and absent for all other statuses. A failure to generate +/// the witness is returned as an HTTP error. #[derive(Clone, Debug, PartialEq, Eq, ssz_derive::Encode)] pub struct PayloadStatusWithWitness { /// Result of processing the submitted payload. diff --git a/crates/ethereum/node/tests/e2e/eth.rs b/crates/ethereum/node/tests/e2e/eth.rs index 212c6ef53b6..d747243b836 100644 --- a/crates/ethereum/node/tests/e2e/eth.rs +++ b/crates/ethereum/node/tests/e2e/eth.rs @@ -679,7 +679,7 @@ async fn test_engine_ssz_custom_engine_and_middleware() -> eyre::Result<()> { } #[tokio::test] -async fn test_engine_ssz_witness_omitted_without_provider_parent_state() -> eyre::Result<()> { +async fn test_engine_ssz_witness_requires_provider_parent_state() -> eyre::Result<()> { let (mut nodes, _) = EthereumNode::test_setup_for(EthereumHardfork::Amsterdam).with_num_nodes(2).build().await?; let target = nodes.pop().unwrap(); @@ -696,16 +696,26 @@ async fn test_engine_ssz_witness_omitted_without_provider_parent_state() -> eyre execution_requests: child.execution_requests, }; let auth = target.auth_server_handle(); - let response: PayloadStatusWithWitness = reqwest::Client::new() - .post(format!("{}/engine/v1/payloads/witness", auth.http_url())) - .jwt(&auth) - .fork("amsterdam") - .ssz(&request) - .send() - .await? - .ssz() - .await?; + let client = reqwest::Client::new(); + let url = format!("{}/engine/v1/payloads/witness", auth.http_url()); + let response = client.post(&url).jwt(&auth).fork("amsterdam").ssz(&request).send().await?; + assert_eq!(response.status(), reqwest::StatusCode::INTERNAL_SERVER_ERROR); + assert_eq!(response.headers()[reqwest::header::CONTENT_TYPE], "application/problem+json"); + assert_eq!( + response.json::().await?, + serde_json::json!({ + "type": "/engine-api/errors/internal", + "detail": format!( + "parent state {parent_hash} is unavailable through the provider: \ + no state found for block {parent_hash}" + ), + }) + ); + + target.reorg_to(parent_hash).await?; + let response: PayloadStatusWithWitness = + client.post(&url).jwt(&auth).fork("amsterdam").ssz(&request).send().await?.ssz().await?; assert_eq!(response.payload_status.status, PayloadStatusKind::Valid); - assert!(response.witness.is_none()); + assert!(response.witness.is_some()); Ok(()) } From ab805ea6ac88d062e9a0373bb0c400b7163350d6 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 22:08:08 +0000 Subject: [PATCH 091/100] fix(stages): unwind on unrecoverable senders (#28420) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> --- .../stages/src/stages/sender_recovery.rs | 116 +++++++++++++++--- 1 file changed, 96 insertions(+), 20 deletions(-) diff --git a/crates/stages/stages/src/stages/sender_recovery.rs b/crates/stages/stages/src/stages/sender_recovery.rs index ab2cfb2624c..4f9f7f6e938 100644 --- a/crates/stages/stages/src/stages/sender_recovery.rs +++ b/crates/stages/stages/src/stages/sender_recovery.rs @@ -2,25 +2,18 @@ use alloy_primitives::{Address, BlockNumber, TxNumber}; use reth_config::config::SenderRecoveryConfig; use reth_consensus::ConsensusError; use reth_db::static_file::TransactionMask; -use reth_db_api::{ - cursor::DbCursorRW, - table::Value, - tables, - transaction::{DbTx, DbTxMut}, - RawValue, -}; +use reth_db_api::{cursor::DbCursorRW, table::Value, tables, transaction::DbTxMut, RawValue}; use reth_primitives_traits::{ FastInstant as Instant, GotExpected, NodePrimitives, SignedTransaction, }; use reth_provider::{ BlockReader, DBProvider, EitherWriter, HeaderProvider, ProviderError, PruneCheckpointReader, PruneCheckpointWriter, StaticFileProviderFactory, StatsReader, StorageSettingsCache, - TransactionsProvider, }; use reth_prune_types::{PruneCheckpoint, PruneMode, PrunePurpose, PruneSegment}; use reth_stages_api::{ BlockErrorKind, EntitiesCheckpoint, ExecInput, ExecOutput, Stage, StageCheckpoint, StageError, - StageId, UnwindInput, UnwindOutput, + StageId, TransactionRangeOutput, UnwindInput, UnwindOutput, }; use reth_static_file_types::StaticFileSegment; use std::{fmt::Debug, ops::Range, sync::mpsc}; @@ -165,7 +158,8 @@ where let block_body_indices = provider.block_body_indices_range(range_output.block_range.clone())?; let block_body_indices_elapsed = start.elapsed(); - let mut blocks_with_indices = range_output.block_range.zip(block_body_indices).peekable(); + let mut blocks_with_indices = + range_output.block_range.clone().zip(block_body_indices).peekable(); for range in batch { // Pair each transaction number with its block number @@ -182,7 +176,14 @@ where }); let fold_elapsed = start.elapsed(); debug!(target: "sync::stages::sender_recovery", ?block_body_indices_elapsed, ?fold_elapsed, len = block_numbers.len(), "Calculated block numbers"); - recover_range(range, block_numbers, provider, tx_batch_sender.clone(), &mut writer)?; + recover_range( + range, + block_numbers, + &range_output, + provider, + tx_batch_sender.clone(), + &mut writer, + )?; } // Advance the static file header to the end of this range to account for empty blocks. @@ -221,12 +222,13 @@ where fn recover_range( tx_range: Range, block_numbers: Vec, + range_output: &TransactionRangeOutput, provider: &Provider, tx_batch_sender: mpsc::Sender, RecoveryResultSender)>>, writer: &mut EitherWriter<'_, CURSOR, Provider::Primitives>, ) -> Result<(), StageError> where - Provider: DBProvider + HeaderProvider + TransactionsProvider + StaticFileProviderFactory, + Provider: HeaderProvider + StaticFileProviderFactory, CURSOR: DbCursorRW, { debug_assert_eq!( @@ -264,10 +266,23 @@ where Err(error) => { return match *error { SenderRecoveryStageError::FailedRecovery(err) => { - // get the block number for the bad transaction - let block_number = provider - .tx_ref() - .get::(err.tx)? + debug_assert_eq!(err.tx, tx_range.start + processed_transactions); + + // The stage checkpoint does not move on failure, so the pipeline unwind + // skips this stage, while the shared static file writer would persist + // the rows appended so far on the unwind's commit. + if let EitherWriter::StaticFile(writer) = writer { + writer.prune_transaction_senders( + tx_range.start + processed_transactions - + range_output.tx_range.start, + range_output.block_range.start() - 1, + )?; + } + + // Senders are appended in transaction order, so the next block number + // belongs to the bad transaction. + let block_number = block_numbers + .next() .ok_or(ProviderError::BlockNumberForTransactionIndexNotFound)?; // fetch the sealed header so we can use it in the sender recovery @@ -462,11 +477,12 @@ mod tests { stage_test_suite_ext, ExecuteStageTestRunner, StageTestRunner, StorageKind, TestRunnerError, TestStageDB, UnwindStageTestRunner, }; - use alloy_primitives::{BlockNumber, B256}; + use alloy_consensus::SignableTransaction; + use alloy_primitives::{BlockNumber, Signature, B256, U256}; use assert_matches::assert_matches; - use reth_db_api::{cursor::DbCursorRO, models::StorageSettings}; + use reth_db_api::{cursor::DbCursorRO, models::StorageSettings, transaction::DbTx}; use reth_ethereum_primitives::{Block, TransactionSigned}; - use reth_primitives_traits::{SealedBlock, SignerRecoverable}; + use reth_primitives_traits::{Block as _, SealedBlock, SignerRecoverable}; use reth_provider::{ providers::StaticFileWriter, BlockBodyIndicesProvider, DatabaseProviderFactory, PruneCheckpointWriter, StaticFileProviderFactory, TransactionsProvider, @@ -475,7 +491,7 @@ mod tests { use reth_stages_api::StageUnitCheckpoint; use reth_static_file_types::StaticFileSegment; use reth_testing_utils::generators::{ - self, random_block, random_block_range, BlockParams, BlockRangeParams, + self, random_block, random_block_range, random_tx, BlockParams, BlockRangeParams, }; stage_test_suite_ext!(SenderRecoveryTestRunner, sender_recovery); @@ -531,6 +547,66 @@ mod tests { assert!(runner.validate_execution(input, result.ok()).is_ok(), "execution validation"); } + /// A transaction with an unrecoverable signature that is not the last one in its block must + /// unwind the block instead of failing with a database integrity error, and must not leave + /// the senders appended before it in the shared static file writer. + #[tokio::test] + async fn execute_unrecoverable_sender_before_last_transaction() { + let (stage_progress, target) = (0, 2); + let mut rng = generators::rng(); + + let runner = SenderRecoveryTestRunner::default(); + runner.db.factory.set_storage_settings_cache(StorageSettings::v2()); + let input = ExecInput { + target: Some(target), + checkpoint: Some(StageCheckpoint::new(stage_progress)), + }; + + let genesis = + random_block(&mut rng, 0, BlockParams { tx_count: Some(0), ..Default::default() }); + let valid_block = + random_block(&mut rng, 1, BlockParams { tx_count: Some(2), ..Default::default() }); + let mut bad_block = + random_block(&mut rng, target, BlockParams { tx_count: Some(2), ..Default::default() }) + .into_block(); + bad_block.body.transactions[0] = + random_tx(&mut rng).into_signed(Signature::new(U256::ZERO, U256::ZERO, false)).into(); + let bad_block = bad_block.seal_slow(); + runner + .db + .insert_blocks([&genesis, &valid_block, &bad_block].into_iter(), StorageKind::Static) + .expect("failed to insert blocks"); + + let static_files = runner.db.factory.static_file_provider(); + for _ in 0..2 { + // The pipeline drops the provider on a stage error, then commits a new one to unwind. + let provider_rw = runner.db.factory.database_provider_rw().unwrap(); + let result = runner.stage().execute(&provider_rw, input); + drop(provider_rw); + assert_matches!( + result, + Err(StageError::Block { + block, + error: BlockErrorKind::Validation( + ConsensusError::TransactionSignerRecoveryError + ), + }) if block.block.number == target + ); + + runner.db.factory.database_provider_rw().unwrap().commit().unwrap(); + + // The stale senders are gone and the segment is back at the stage checkpoint. + assert_eq!( + static_files.get_highest_static_file_tx(StaticFileSegment::TransactionSenders), + None + ); + assert_eq!( + static_files.get_highest_static_file_block(StaticFileSegment::TransactionSenders), + Some(stage_progress) + ); + } + } + /// Ensure the static file header advances to trailing empty blocks. #[tokio::test] async fn execute_advances_static_file_for_trailing_empty_blocks() { From 3fa8ec0377de1368e6e9ad01fe4a8bb68740558d Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 10 Nov 2026 23:40:05 +0100 Subject: [PATCH 092/100] docs(cli): document engine.memory-block-buffer-target (#28429) --- crates/node/core/src/args/engine.rs | 15 +++++++++++++-- docs/vocs/docs/pages/cli/reth/node.mdx | 8 ++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/crates/node/core/src/args/engine.rs b/crates/node/core/src/args/engine.rs index dd1ca9e6148..61787c52d4e 100644 --- a/crates/node/core/src/args/engine.rs +++ b/crates/node/core/src/args/engine.rs @@ -340,10 +340,21 @@ pub struct EngineArgs { )] pub num_state_masking_blocks: u64, - /// Configure the target number of blocks to keep in memory. + /// Configure how many of the most recent canonical blocks persistence leaves in memory. + /// + /// When more than `--engine.persistence-threshold` canonical blocks are held in memory, the + /// engine writes the canonical chain to disk up to `head - memory-block-buffer-target`. The + /// blocks above that height are kept only in memory, so a reorg of them does not unwind the + /// database. With state masking enabled, the `--engine.num-state-masking-blocks` blocks below + /// that height also stay in memory until a later cycle persists their state/trie updates. + /// + /// This is also the in-memory buffer that `--engine.persistence-backpressure-threshold` is + /// measured from. /// /// If omitted, this defaults to the lesser of `--engine.persistence-threshold` and the - /// configured default memory block buffer target. + /// configured default memory block buffer target. The value must not exceed + /// `--engine.persistence-threshold`, and with state masking enabled, its sum with + /// `--engine.num-state-masking-blocks` must be less than `--engine.persistence-threshold`. #[arg(long = "engine.memory-block-buffer-target")] pub memory_block_buffer_target: Option, diff --git a/docs/vocs/docs/pages/cli/reth/node.mdx b/docs/vocs/docs/pages/cli/reth/node.mdx index c5dcf69f2cc..bbf60deabab 100644 --- a/docs/vocs/docs/pages/cli/reth/node.mdx +++ b/docs/vocs/docs/pages/cli/reth/node.mdx @@ -1058,9 +1058,13 @@ Engine: [default: 30] --engine.memory-block-buffer-target - Configure the target number of blocks to keep in memory. + Configure how many of the most recent canonical blocks persistence leaves in memory. - If omitted, this defaults to the lesser of `--engine.persistence-threshold` and the configured default memory block buffer target. + When more than `--engine.persistence-threshold` canonical blocks are held in memory, the engine writes the canonical chain to disk up to `head - memory-block-buffer-target`. The blocks above that height are kept only in memory, so a reorg of them does not unwind the database. With state masking enabled, the `--engine.num-state-masking-blocks` blocks below that height also stay in memory until a later cycle persists their state/trie updates. + + This is also the in-memory buffer that `--engine.persistence-backpressure-threshold` is measured from. + + If omitted, this defaults to the lesser of `--engine.persistence-threshold` and the configured default memory block buffer target. The value must not exceed `--engine.persistence-threshold`, and with state masking enabled, its sum with `--engine.num-state-masking-blocks` must be less than `--engine.persistence-threshold`. --engine.backfill-threshold Configure the largest gap, in blocks, between the local head and the forkchoice head that is closed by downloading the missing blocks directly. Larger gaps trigger a full pipeline (backfill) run instead. From 999be5fdd0f85fd95d0406e129844ee7c434ad7c Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 11 Nov 2026 01:08:32 +0100 Subject: [PATCH 093/100] fix(rpc): select simulated block fork from its timestamp (#28431) --- crates/rpc/rpc-eth-api/src/helpers/pending_block.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs index c8d24358689..a4e33f1c253 100644 --- a/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs +++ b/crates/rpc/rpc-eth-api/src/helpers/pending_block.rs @@ -551,7 +551,11 @@ impl BuildPendingEnv for NextBlockEnvAttributes { block_overrides: Option<&BlockOverrides>, ) -> Self { let mut attributes = Self { - timestamp: parent.timestamp().saturating_add(12), + // The timestamp selects the hardfork rules, so it must be overridden before the EVM + // environment is derived from these attributes. + timestamp: block_overrides + .and_then(|overrides| overrides.time) + .unwrap_or_else(|| parent.timestamp().saturating_add(12)), suggested_fee_recipient: parent.beneficiary(), prev_randao: B256::random(), gas_limit: parent.gas_limit(), From b9abbcc1b982755baa9021e6874e2e58936ca65f Mon Sep 17 00:00:00 2001 From: Emma Jamieson-Hoare Date: Wed, 11 Nov 2026 10:00:30 +0000 Subject: [PATCH 094/100] chore: release 2.11.0 --- Cargo.lock | 232 +++++++++++++++++++-------------------- Cargo.toml | 2 +- docs/vocs/vocs.config.ts | 2 +- 3 files changed, 118 insertions(+), 118 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a379a3d409c..ff0ba1c399e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3444,7 +3444,7 @@ dependencies = [ [[package]] name = "ef-test-runner" -version = "2.10.1" +version = "2.11.0" dependencies = [ "clap", "ef-tests", @@ -3452,7 +3452,7 @@ dependencies = [ [[package]] name = "ef-tests" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -4132,7 +4132,7 @@ dependencies = [ [[package]] name = "example-full-contract-state" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "eyre", @@ -4250,7 +4250,7 @@ dependencies = [ [[package]] name = "exex-subscription" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "eyre", @@ -8042,7 +8042,7 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-node-bindings", "alloy-primitives", @@ -8095,7 +8095,7 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8121,7 +8121,7 @@ dependencies = [ [[package]] name = "reth-bb" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8156,7 +8156,7 @@ dependencies = [ [[package]] name = "reth-chain-state" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8185,7 +8185,7 @@ dependencies = [ [[package]] name = "reth-chainspec" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -8204,7 +8204,7 @@ dependencies = [ [[package]] name = "reth-cli" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-genesis", "clap", @@ -8216,7 +8216,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -8306,7 +8306,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" -version = "2.10.1" +version = "2.11.0" dependencies = [ "reth-tasks", "tokio", @@ -8315,7 +8315,7 @@ dependencies = [ [[package]] name = "reth-cli-util" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8365,7 +8365,7 @@ dependencies = [ [[package]] name = "reth-config" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "eyre", @@ -8383,7 +8383,7 @@ dependencies = [ [[package]] name = "reth-consensus" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -8396,7 +8396,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8410,7 +8410,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8434,7 +8434,7 @@ dependencies = [ [[package]] name = "reth-db" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8468,7 +8468,7 @@ dependencies = [ [[package]] name = "reth-db-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8497,7 +8497,7 @@ dependencies = [ [[package]] name = "reth-db-common" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -8528,7 +8528,7 @@ dependencies = [ [[package]] name = "reth-db-models" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8544,7 +8544,7 @@ dependencies = [ [[package]] name = "reth-discv4" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8571,7 +8571,7 @@ dependencies = [ [[package]] name = "reth-discv5" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8597,7 +8597,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-chains", "alloy-primitives", @@ -8625,7 +8625,7 @@ dependencies = [ [[package]] name = "reth-downloaders" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8665,7 +8665,7 @@ dependencies = [ [[package]] name = "reth-dst" -version = "2.10.1" +version = "2.11.0" dependencies = [ "bedrock-assertions", "serde", @@ -8674,7 +8674,7 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8736,7 +8736,7 @@ dependencies = [ [[package]] name = "reth-ecies" -version = "2.10.1" +version = "2.11.0" dependencies = [ "aes 0.8.4", "alloy-primitives", @@ -8762,7 +8762,7 @@ dependencies = [ [[package]] name = "reth-engine-local" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8784,7 +8784,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8812,7 +8812,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -8880,7 +8880,7 @@ dependencies = [ [[package]] name = "reth-engine-util" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8907,7 +8907,7 @@ dependencies = [ [[package]] name = "reth-era" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8931,7 +8931,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "bytes", @@ -8949,7 +8949,7 @@ dependencies = [ [[package]] name = "reth-era-utils" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8979,7 +8979,7 @@ dependencies = [ [[package]] name = "reth-errors" -version = "2.10.1" +version = "2.11.0" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -8989,7 +8989,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9026,7 +9026,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -9054,7 +9054,7 @@ dependencies = [ [[package]] name = "reth-ethereum" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth", @@ -9093,7 +9093,7 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" -version = "2.10.1" +version = "2.11.0" dependencies = [ "clap", "eyre", @@ -9116,7 +9116,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9132,7 +9132,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9148,7 +9148,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eip2124", "alloy-hardforks 0.4.11", @@ -9161,7 +9161,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9189,7 +9189,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9210,7 +9210,7 @@ dependencies = [ [[package]] name = "reth-etl" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "rayon", @@ -9220,7 +9220,7 @@ dependencies = [ [[package]] name = "reth-evm" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9248,7 +9248,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9276,7 +9276,7 @@ dependencies = [ [[package]] name = "reth-execution-cache" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "evm2", @@ -9295,7 +9295,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9307,7 +9307,7 @@ dependencies = [ [[package]] name = "reth-execution-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9328,7 +9328,7 @@ dependencies = [ [[package]] name = "reth-exex" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9374,7 +9374,7 @@ dependencies = [ [[package]] name = "reth-exex-test-utils" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "eyre", @@ -9405,7 +9405,7 @@ dependencies = [ [[package]] name = "reth-exex-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9422,7 +9422,7 @@ dependencies = [ [[package]] name = "reth-fs-util" -version = "2.10.1" +version = "2.11.0" dependencies = [ "serde", "serde_json", @@ -9431,7 +9431,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9464,7 +9464,7 @@ dependencies = [ [[package]] name = "reth-ipc" -version = "2.10.1" +version = "2.11.0" dependencies = [ "bytes", "futures", @@ -9486,7 +9486,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" -version = "2.10.1" +version = "2.11.0" dependencies = [ "bitflags 2.13.2", "byteorder", @@ -9503,7 +9503,7 @@ dependencies = [ [[package]] name = "reth-lru" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "hashbrown 0.17.1", @@ -9511,7 +9511,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" -version = "2.10.1" +version = "2.11.0" dependencies = [ "bindgen", "cc", @@ -9519,7 +9519,7 @@ dependencies = [ [[package]] name = "reth-metrics" -version = "2.10.1" +version = "2.11.0" dependencies = [ "futures", "libc", @@ -9532,7 +9532,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "ipnet", @@ -9540,7 +9540,7 @@ dependencies = [ [[package]] name = "reth-net-nat" -version = "2.10.1" +version = "2.11.0" dependencies = [ "futures-util", "if-addrs", @@ -9554,7 +9554,7 @@ dependencies = [ [[package]] name = "reth-network" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9624,7 +9624,7 @@ dependencies = [ [[package]] name = "reth-network-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9648,7 +9648,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -9672,7 +9672,7 @@ dependencies = [ [[package]] name = "reth-network-peers" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9688,7 +9688,7 @@ dependencies = [ [[package]] name = "reth-network-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -9701,7 +9701,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" -version = "2.10.1" +version = "2.11.0" dependencies = [ "anyhow", "bincode", @@ -9720,7 +9720,7 @@ dependencies = [ [[package]] name = "reth-node-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -9743,7 +9743,7 @@ dependencies = [ [[package]] name = "reth-node-builder" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9816,7 +9816,7 @@ dependencies = [ [[package]] name = "reth-node-core" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9871,7 +9871,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-contract", @@ -9958,7 +9958,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9981,7 +9981,7 @@ dependencies = [ [[package]] name = "reth-node-events" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10004,7 +10004,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" -version = "2.10.1" +version = "2.11.0" dependencies = [ "bytes", "eyre", @@ -10036,7 +10036,7 @@ dependencies = [ [[package]] name = "reth-node-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "reth-chainspec", "reth-db-api", @@ -10047,7 +10047,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10070,7 +10070,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" -version = "2.10.1" +version = "2.11.0" dependencies = [ "pin-project", "reth-payload-primitives", @@ -10081,7 +10081,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10105,7 +10105,7 @@ dependencies = [ [[package]] name = "reth-payload-util" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10114,7 +10114,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -10154,7 +10154,7 @@ dependencies = [ [[package]] name = "reth-provider" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10206,7 +10206,7 @@ dependencies = [ [[package]] name = "reth-prune" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -10235,7 +10235,7 @@ dependencies = [ [[package]] name = "reth-prune-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "arbitrary", @@ -10255,7 +10255,7 @@ dependencies = [ [[package]] name = "reth-rpc" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -10335,7 +10335,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-genesis", @@ -10364,7 +10364,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-network", @@ -10422,7 +10422,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-json-rpc", @@ -10441,7 +10441,7 @@ dependencies = [ [[package]] name = "reth-rpc-e2e-tests" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-genesis", "eyre", @@ -10460,7 +10460,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10496,7 +10496,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -10540,7 +10540,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -10590,7 +10590,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-rpc-types-engine", "brotli", @@ -10612,7 +10612,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -10640,7 +10640,7 @@ dependencies = [ [[package]] name = "reth-snap-sync" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10681,7 +10681,7 @@ dependencies = [ [[package]] name = "reth-stages" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10743,7 +10743,7 @@ dependencies = [ [[package]] name = "reth-stages-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10777,7 +10777,7 @@ dependencies = [ [[package]] name = "reth-stages-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "arbitrary", @@ -10794,7 +10794,7 @@ dependencies = [ [[package]] name = "reth-static-file" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "assert_matches", @@ -10817,7 +10817,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "clap", @@ -10835,7 +10835,7 @@ dependencies = [ [[package]] name = "reth-storage-api" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -10860,7 +10860,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-eips", "alloy-primitives", @@ -10875,7 +10875,7 @@ dependencies = [ [[package]] name = "reth-storage-overlay" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10905,7 +10905,7 @@ dependencies = [ [[package]] name = "reth-storage-rpc-provider" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10935,7 +10935,7 @@ dependencies = [ [[package]] name = "reth-tasks" -version = "2.10.1" +version = "2.11.0" dependencies = [ "crossbeam-utils", "dashmap", @@ -10955,7 +10955,7 @@ dependencies = [ [[package]] name = "reth-testing-utils" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -10970,7 +10970,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" -version = "2.10.1" +version = "2.11.0" dependencies = [ "tokio", "tokio-stream", @@ -10979,7 +10979,7 @@ dependencies = [ [[package]] name = "reth-tracing" -version = "2.10.1" +version = "2.11.0" dependencies = [ "clap", "eyre", @@ -10998,7 +10998,7 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" -version = "2.10.1" +version = "2.11.0" dependencies = [ "base64 0.23.1", "clap", @@ -11019,7 +11019,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11070,7 +11070,7 @@ dependencies = [ [[package]] name = "reth-trie" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11103,7 +11103,7 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-eips", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "reth-trie-db" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -11163,7 +11163,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -11187,7 +11187,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" -version = "2.10.1" +version = "2.11.0" dependencies = [ "alloy-primitives", "alloy-rlp", diff --git a/Cargo.toml b/Cargo.toml index 8b20ec4190c..97fc879c45c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "2.10.1" +version = "2.11.0" edition = "2024" rust-version = "1.96" license = "MIT OR Apache-2.0" diff --git a/docs/vocs/vocs.config.ts b/docs/vocs/vocs.config.ts index e574ccc6888..de34f8234ae 100644 --- a/docs/vocs/vocs.config.ts +++ b/docs/vocs/vocs.config.ts @@ -23,7 +23,7 @@ export default defineConfig({ { text: 'Rustdocs', link: '/docs' }, { text: 'GitHub', link: 'https://github.com/paradigmxyz/reth' }, { - text: 'v2.10.1', + text: 'v2.11.0', items: [ { text: 'Releases', From 6af7f0b5861dadef4fce650ee8e1b8fbf3664fba Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot Date: Wed, 11 Nov 2026 11:03:08 +0000 Subject: [PATCH 095/100] Adapt Firehose to the evm2 66687c18 APIs Call inputs are read from the caller's memory and the initial call depth moved from Version to Evm. --- .../tree/benches/firehose_bal_tracing.rs | 10 ++++---- .../tree/payload_processor/bal/firehose.rs | 24 ++++++++++--------- crates/firehose/src/inspector.rs | 4 ++-- .../firehose/src/inspector/tests/balance.rs | 2 +- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/crates/engine/tree/benches/firehose_bal_tracing.rs b/crates/engine/tree/benches/firehose_bal_tracing.rs index f8c22dc8968..d937e73b36c 100644 --- a/crates/engine/tree/benches/firehose_bal_tracing.rs +++ b/crates/engine/tree/benches/firehose_bal_tracing.rs @@ -31,9 +31,7 @@ use reth_evm::{ }; use reth_evm_ethereum::EthEvmConfig; use reth_firehose::{run_wrapped_block, FirehoseBlockTracer, NoPostTxExtras, NoPreTxAdjust}; -use reth_primitives_traits::{ - crypto::secp256k1::public_key_to_address, Block as _, Recovered, RecoveredBlock, SealedBlock, -}; +use reth_primitives_traits::{Block as _, Recovered, RecoveredBlock, SealedBlock}; use reth_tasks::{RayonConfig, Runtime, RuntimeBuilder, RuntimeConfig, TokioConfig}; use reth_testing_utils::generators::{generate_key, rng, sign_tx_with_key_pair}; use std::{convert::Infallible, sync::Arc, time::Duration}; @@ -141,8 +139,10 @@ struct Fixture { fn fixture() -> Fixture { let evm_config = evm_config(); let keys = (0..SENDERS).map(|_| generate_key(&mut rng())).collect::>(); - let senders = - keys.iter().map(|key| public_key_to_address(key.public_key())).collect::>(); + let senders = keys + .iter() + .map(|key| Address::from_raw_public_key(&key.public_key().serialize_uncompressed()[1..])) + .collect::>(); let txs = (0..CALLS) .map(|index| { let key = &keys[index % SENDERS]; diff --git a/crates/engine/tree/src/tree/payload_processor/bal/firehose.rs b/crates/engine/tree/src/tree/payload_processor/bal/firehose.rs index 7891b1fdfd6..a9ed9eba142 100644 --- a/crates/engine/tree/src/tree/payload_processor/bal/firehose.rs +++ b/crates/engine/tree/src/tree/payload_processor/bal/firehose.rs @@ -24,7 +24,7 @@ use alloy_eip7928::{bal::DecodedBal, BlockAccessIndex, BlockAccessList}; use alloy_eips::eip4895::Withdrawals; use alloy_primitives::Address; use crossbeam_channel::{Receiver, Sender}; -use evm2::evm::Bal as EvmBal; +use evm2::{evm::Bal as EvmBal, AnyError}; use reth_engine_primitives::BlockAccessListDecodeError; use reth_evm::{ BlockExecutionOutput, BlockExecutor, BlockExecutorFactory, BlockExecutorFor, ConfigureEvm, @@ -263,8 +263,10 @@ fn spawn_traced_worker<'scope, Evm, Tx, Err, DB, MakeDb>( let tx = match tx { Ok(tx) => tx, Err(source) => { - let error = - BalWorkerError::Transaction { tx_index, source: Box::new(source) }; + let error = BalWorkerError::Transaction { + tx_index, + source: AnyError::new(source), + }; if result_tx.send(Err(error)).is_err() { break 'worker; } @@ -330,10 +332,7 @@ mod tests { record_block_access_list, run_wrapped_block, NoPostTxExtras, NoPreTxAdjust, }; use reth_firehose_tests::parse_fire_block_for; - use reth_primitives_traits::{ - crypto::secp256k1::public_key_to_address, Block as _, Recovered, RecoveredBlock, - SealedBlock, - }; + use reth_primitives_traits::{Block as _, Recovered, RecoveredBlock, SealedBlock}; use reth_testing_utils::generators::{generate_key, rng, sign_tx_with_key_pair}; use secp256k1::Keypair; use std::convert::Infallible; @@ -401,7 +400,7 @@ mod tests { }); Recovered::new_unchecked( sign_tx_with_key_pair(*key, tx), - public_key_to_address(key.public_key()), + Address::from_raw_public_key(&key.public_key().serialize_uncompressed()[1..]), ) } @@ -551,9 +550,12 @@ mod tests { fn traced_block(evm_config: &EthEvmConfig) -> (CacheDB, RecoveredBlock) { let keys = (0..3).map(|_| generate_key(&mut rng())).collect::>(); let coinbase_key = generate_key(&mut rng()); - let coinbase = public_key_to_address(coinbase_key.public_key()); - let mut senders = - keys.iter().map(|key| public_key_to_address(key.public_key())).collect::>(); + let coinbase = + Address::from_raw_public_key(&coinbase_key.public_key().serialize_uncompressed()[1..]); + let mut senders = keys + .iter() + .map(|key| Address::from_raw_public_key(&key.public_key().serialize_uncompressed()[1..])) + .collect::>(); senders.push(coinbase); let mut txs = vec![ diff --git a/crates/firehose/src/inspector.rs b/crates/firehose/src/inspector.rs index 5b3dd8fed09..0d8797cc4ac 100644 --- a/crates/firehose/src/inspector.rs +++ b/crates/firehose/src/inspector.rs @@ -655,7 +655,7 @@ impl> InspectorState { call_type as u8, from, to, - &message.input, + message.input.as_bytes(interp.memory()), gas_limit, message.value, ); @@ -999,7 +999,7 @@ fn load_code(host: &mut Evm<'_, T>, info: &AccountInfo) -> Bytes { /// Call depth of a message as Firehose counts it, 0 for the root call. fn frame_depth(host: &Evm<'_, T>, message: &Message) -> i32 { - i32::from(message.depth) - i32::from(host.version().initial_call_depth) + i32::from(message.depth) - i32::from(host.initial_call_depth()) } /// The memory range the KECCAK256 about to run hashes, when its preimage is small enough to diff --git a/crates/firehose/src/inspector/tests/balance.rs b/crates/firehose/src/inspector/tests/balance.rs index 69bf3500fea..64919e7477c 100644 --- a/crates/firehose/src/inspector/tests/balance.rs +++ b/crates/firehose/src/inspector/tests/balance.rs @@ -45,7 +45,7 @@ fn self_authorizations(count: usize) -> Vec { let authorization = SignedAuthorization::decode(&mut rlp.as_slice()).expect("authorization is RLP"); assert_eq!( - LazyAuthorization::from(authorization.clone()).authority(), + LazyAuthorization::Signed(&authorization).authority(), Some(AUTHORITY), "fixture signed by the wrong key" ); From 50cd9e8cb6a07af99180559905688abb0496822d Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot Date: Wed, 11 Nov 2026 11:03:08 +0000 Subject: [PATCH 096/100] Add Firehose hooks to the executor replay test config --- crates/ethereum/node/Cargo.toml | 1 + crates/ethereum/node/tests/e2e/executor_replay.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/crates/ethereum/node/Cargo.toml b/crates/ethereum/node/Cargo.toml index 1332d489f65..9209116ff9a 100644 --- a/crates/ethereum/node/Cargo.toml +++ b/crates/ethereum/node/Cargo.toml @@ -84,6 +84,7 @@ reth-downloaders.workspace = true reth-eth-wire-types.workspace = true reth-network-peers.workspace = true reth-tracing.workspace = true +reth-firehose.workspace = true tempfile.workspace = true jsonrpsee-core.workspace = true diff --git a/crates/ethereum/node/tests/e2e/executor_replay.rs b/crates/ethereum/node/tests/e2e/executor_replay.rs index 22063fcb9e5..99257eadcf4 100644 --- a/crates/ethereum/node/tests/e2e/executor_replay.rs +++ b/crates/ethereum/node/tests/e2e/executor_replay.rs @@ -206,6 +206,11 @@ struct SettlingEvmConfig { executor_factory: SettlingExecutorFactory, } +impl reth_firehose::FirehoseLiveHooks for SettlingEvmConfig { + type PreTxAdjust = reth_firehose::NoPreTxAdjust; + type PostTxExtras = reth_firehose::NoPostTxExtras; +} + impl ConfigureEvm for SettlingEvmConfig { type Primitives = EthPrimitives; type Error = ::Error; From 9db080cce6ee2e168099d57099a4b36ed4eb0a30 Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot Date: Wed, 11 Nov 2026 11:07:10 +0000 Subject: [PATCH 097/100] Update Amsterdam goldens for evm2 66687c18 evm2 runs the EIP-4788 system call before EIP-2935 and opens the root frame of a transaction that runs out of gas in its runtime gas phase. --- .../block.2099.binpb | Bin 2246 -> 2246 bytes .../block.2099.binpb | Bin 2240 -> 2240 bytes .../block.2099.binpb | Bin 2106 -> 2106 bytes .../amsterdam_slot_number/block.2099.binpb | Bin 1968 -> 1968 bytes crates/firehose-tests/tests/prestate.rs | 10 +++++----- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/firehose-tests/tests/cases/amsterdam_block_access_list/block.2099.binpb b/crates/firehose-tests/tests/cases/amsterdam_block_access_list/block.2099.binpb index 29d1dc7ecb9ab4e7f2eaca40310b65cd1cbfd7eb..fce1f2af21b51b1895af70914996f9a33c17c745 100644 GIT binary patch delta 23 dcmX>mcua7E9{c1zcALpr>?)J>fb=Q$KLBKW2!sFt delta 23 dcmX>mcua7E9{c1zcALpr>?)J>fb=Q$KLBKW2!sFt diff --git a/crates/firehose-tests/tests/cases/amsterdam_builder_execution_requests/block.2099.binpb b/crates/firehose-tests/tests/cases/amsterdam_builder_execution_requests/block.2099.binpb index b1edaa8c3fe2bc5bd6b0a0c951dbd4f50bf60c3b..078b78d4ef582bf061aebf32bdf452e4d6757b77 100644 GIT binary patch delta 46 zcmX>gctCK21l!~aHXBaH1}3IejIkU{lQ?81OR`yWGB+@>tYWn0U<3+mzRC8S5daoh B3$g$J delta 46 zcmX>gctCK21l!~aHXBaH1}3IejIkU{lQ^U&O8^C!8<<#DF&1S(PV$Vzrrkj#XvyBvzZvdTcyQ0OR@#hyVZp delta 36 scmdlbuuEV=1}i)J2S&ypj2x5mS(PV$Vzrrkj#XvyBvzZvdTcyQ0ORxvhyVZp diff --git a/crates/firehose-tests/tests/cases/amsterdam_slot_number/block.2099.binpb b/crates/firehose-tests/tests/cases/amsterdam_slot_number/block.2099.binpb index 28c1547c1f76b15c2fbcb81c736894da82e18b9c..b569de420ae2a23de9ef982ace9ce46e6f4709af 100644 GIT binary patch delta 29 lcmdnMzkz>)1l!~aHXBaH1}3IejIkU{lmD`YPu{}z2LOTR32y)Z delta 29 lcmdnMzkz>)1l!~aHXBaH1}3IejIkU{lmD`YPu{}z2LOTR32y)Z diff --git a/crates/firehose-tests/tests/prestate.rs b/crates/firehose-tests/tests/prestate.rs index cc48cec25e6..392bded8728 100644 --- a/crates/firehose-tests/tests/prestate.rs +++ b/crates/firehose-tests/tests/prestate.rs @@ -102,11 +102,11 @@ fn amsterdam_builder_execution_requests() { } /// Amsterdam: a creation transaction whose gas covers its intrinsic cost but not the EIP-8037 -/// account-creation state gas that EIP-2780 charges before the root frame opens. revm includes it -/// as an out-of-gas halt without ever opening that frame, so the root `CREATE` has to be traced -/// by the executor, and it has to be the transaction's own even though the block's system calls -/// opened depth-0 frames before it ran. Left untraced, the transaction had no call at all, and -/// the tracer dropped its receipt and left its status unknown. +/// account-creation state gas that EIP-2780 charges before the root frame runs. evm2 opens the +/// root `CREATE` frame and halts it out of gas, as go-ethereum does, and the traced root call has +/// to be the transaction's own even though the block's system calls opened depth-0 frames before +/// it ran. Left untraced, the transaction had no call at all, and the tracer dropped its receipt +/// and left its status unknown. /// /// Battlefield `contract_fail_code_copy` hits this with a 99309 gas deployment. #[test] From 406213a51789359944b1302618acaa8d459c9186 Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot Date: Wed, 11 Nov 2026 11:07:38 +0000 Subject: [PATCH 098/100] Add reth-v2.11.0-fh3.1 changelog entry --- ACTIVATIONS.md | 6 +++--- CHANGELOG.md | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ACTIVATIONS.md b/ACTIVATIONS.md index 73f4bf9cbc5..59fb90454ab 100644 --- a/ACTIVATIONS.md +++ b/ACTIVATIONS.md @@ -5,7 +5,7 @@ Firehose reth node serves and its effect on the Firehose block. Review the entri whose status changed at every upstream bump, and when an activation is announced between bumps. Statuses come from the `alloy-hardforks` timestamps compiled into the release (0.4.11 for -`reth-v2.9.0-fh3.1` and `reth-v2.10.0-fh3.1`), checked 2026-11-06. "Not scheduled" means the fork +`reth-v2.9.0-fh3.1`, `reth-v2.10.0-fh3.1` and `reth-v2.11.0-fh3.1`), checked 2026-11-11. "Not scheduled" means the fork has no timestamp in the code: it reaches the tracer only once a later release schedules it. | Fork | Mainnet | Sepolia | Hoodi | Effect on the Firehose block | @@ -13,9 +13,9 @@ has no timestamp in the code: it reaches the tracer only once a later release sc | Frontier → Paris | Active | Active | Active (genesis) | Covered by the Firehose releases before this file existed. | | Shanghai | Active (2023-04-12) | Active | Active (genesis) | Withdrawals are emitted as `Withdrawal` balance changes. | | Cancun | Active (2024-03-13) | Active | Active (genesis) | Receipts carry the blob gas price; EIP-4788 beacon root system call. | -| Prague | Active (2025-05-07) | Active | Active | EIP-2935, EIP-7002, EIP-7251 system calls; EIP-7702 authorization nonce and code changes. | +| Prague | Active (2025-05-07) | Active | Active | EIP-2935, EIP-7002, EIP-7251 system calls; EIP-7702 authorization nonce and code changes. The EIP-2935 call runs after the EIP-4788 call, so the block lists it second. | | Osaka | Active (2025-12-03) | Active (2025-10-14) | Active (2025-10-28) | Traced by earlier Firehose releases; not re-reviewed for this file. | | BPO1 | Active (2025-12-09) | Active (2025-10-21) | Active (2025-11-05) | None: blob parameters only. | | BPO2 | Active (2026-01-07) | Active (2025-10-27) | Active (2025-11-12) | None: blob parameters only. | | BPO3, BPO4, BPO5 | Not scheduled | Not scheduled | Not scheduled | None expected: blob parameters only. Re-check when scheduled. | -| Amsterdam (Glamsterdam) | Not scheduled | Active (2026-10-06, block 11856337) | Not scheduled (unscheduled in v2.8.1, no new date as of 2026-11-06) | Header gains `block_access_list_rlp` and `slot_number`; EIP-7708 native transfer logs; EIP-8037 state gas in call gas; EIP-2780 transactions included without a root frame are traced as an out-of-gas root call; EIP-8282 builder request system calls; EIP-8246 self-beneficiary SELFDESTRUCT no longer burns. Covered by the `amsterdam_*` prestate goldens and `firehose_live_tracing_amsterdam`. | +| Amsterdam (Glamsterdam) | Not scheduled | Active (2026-10-06, block 11856337) | Not scheduled (unscheduled in v2.8.1, no new date as of 2026-11-11) | Header gains `block_access_list_rlp` and `slot_number`; EIP-7708 native transfer logs; EIP-8037 state gas in call gas; EIP-2780 transactions included without a root frame are traced as an out-of-gas root call; EIP-8282 builder request system calls; EIP-8246 self-beneficiary SELFDESTRUCT no longer burns. Covered by the `amsterdam_*` prestate goldens and `firehose_live_tracing_amsterdam`. | diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee615530da..cffa442b354 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,19 @@ This changelog covers Firehose-specific changes only. For upstream reth changes, The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## reth-v2.11.0-fh3.1 + +### Changed + +- Update to upstream reth [v2.11.0](https://github.com/paradigmxyz/reth/releases/tag/v2.11.0). + evm2 comes from the `streamingfast/evm2` fork tag `reth-v2.11.0-sf`, which now matches the + upstream evm2 revision reth pins. No hardfork is scheduled or changed. +- From Prague on, the EIP-4788 beacon root system call is traced before the EIP-2935 block hash + system call, the order evm2's block executor runs them in. Their content does not change. +- On Amsterdam, a transaction that runs out of gas in its runtime gas phase opens its root call + before the sender's nonce change, as on go-ethereum. The block content does not change, only + the order of those two ordinals. + ## reth-v2.9.0-fh3.1-not-a-real-version-alpha Tests the automated release tag, no Firehose changes. From f557f816ded5630891f75dc7319600bcfca345ad Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot Date: Wed, 11 Nov 2026 11:09:38 +0000 Subject: [PATCH 099/100] Report no gas for calls that fail before running evm2 narrowed InstrStop::is_revert to the REVERT opcode. Insufficient balance, call depth and nonce overflow failures return their gas, now is_frame_revert. --- crates/firehose/src/inspector.rs | 8 ++++---- crates/firehose/src/inspector/tests/gas.rs | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/crates/firehose/src/inspector.rs b/crates/firehose/src/inspector.rs index 0d8797cc4ac..bbc8abf5a47 100644 --- a/crates/firehose/src/inspector.rs +++ b/crates/firehose/src/inspector.rs @@ -725,9 +725,9 @@ impl> InspectorState { } let failed = !result.stop.is_success(); - let is_revert = result.stop.is_revert(); + let is_frame_revert = result.stop.is_frame_revert(); let err = failed.then(|| failure_reason(result.stop, is_create)); - let gas_used = frame_gas_consumed(message.gas_limit, &result.gas, failed, is_revert); + let gas_used = frame_gas_consumed(message.gas_limit, &result.gas, failed, is_frame_revert); if depth == 0 { self.capture_root_exit(host, message.caller); @@ -1024,9 +1024,9 @@ fn frame_gas_consumed( gas_limit: u64, gas: &evm2::interpreter::GasTracker, failed: bool, - is_revert: bool, + is_frame_revert: bool, ) -> u64 { - if failed && !is_revert { + if failed && !is_frame_revert { return gas_limit; } if failed { diff --git a/crates/firehose/src/inspector/tests/gas.rs b/crates/firehose/src/inspector/tests/gas.rs index 9e388a6152a..19b984c41e5 100644 --- a/crates/firehose/src/inspector/tests/gas.rs +++ b/crates/firehose/src/inspector/tests/gas.rs @@ -206,3 +206,23 @@ fn call_gas_consumed_excludes_state_gas_returned_on_revert() { "the reverted store's state gas is reported as consumed but the receipt gave it back" ); } + +/// A call that fails before its frame runs (here, a value transfer the caller cannot afford) +/// returns all of its gas to the caller, as in go-ethereum, so it reports no gas consumed. +#[test] +fn call_failed_on_insufficient_balance_consumes_no_gas() { + let target = Address::repeat_byte(0xdd); + for spec in [SpecId::PRAGUE, SpecId::AMSTERDAM] { + let accounts = [ + (SENDER, balance_account(u64::MAX)), + (RECIPIENT, code_account(&op_call_with_value(target, 1), 0)), + ]; + let block = drive_tx(spec, &accounts, RECIPIENT, 0); + let trx = block.transaction_traces.first().expect("one transaction"); + let inner = trx.calls.get(1).expect("the value call"); + + assert!(inner.status_failed, "{spec:?}: the value call fails"); + assert_eq!(inner.failure_reason, "insufficient balance for transfer", "{spec:?}"); + assert_eq!(inner.gas_consumed, 0, "{spec:?}: the failed call gives back all its gas"); + } +} From 961bf9b5bf8988904271470eeca57f5b1a411ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Duchesneau?= Date: Wed, 11 Nov 2026 07:39:28 -0500 Subject: [PATCH 100/100] Use upstream evm2 instead of the SF fork Our only evm2 patch is upstream now, so the fork had the same tree as alloy-rs/evm2@66687c18. --- CHANGELOG.md | 4 ++-- Cargo.lock | 22 +++++++++++----------- Cargo.toml | 8 +++----- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cffa442b354..93715e864d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Update to upstream reth [v2.11.0](https://github.com/paradigmxyz/reth/releases/tag/v2.11.0). - evm2 comes from the `streamingfast/evm2` fork tag `reth-v2.11.0-sf`, which now matches the - upstream evm2 revision reth pins. No hardfork is scheduled or changed. + evm2 now comes from the upstream revision reth pins instead of the `streamingfast/evm2` fork, + because its only patch is upstream. No hardfork is scheduled or changed. - From Prague on, the EIP-4788 beacon root system call is traced before the EIP-2935 block hash system call, the order evm2's block executor runs them in. Their content does not change. - On Amsterdam, a transaction that runs out of gas in its runtime gas phase opens its root call diff --git a/Cargo.lock b/Cargo.lock index f90adce6bbd..aa99411ae58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3709,7 +3709,7 @@ dependencies = [ [[package]] name = "evm2" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-consensus", "alloy-eip7928", @@ -3750,7 +3750,7 @@ dependencies = [ [[package]] name = "evm2-inspectors" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-consensus", "alloy-eip2930", @@ -3773,7 +3773,7 @@ dependencies = [ [[package]] name = "evm2-jit" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "evm2", "evm2-jit-backend", @@ -3788,7 +3788,7 @@ dependencies = [ [[package]] name = "evm2-jit-backend" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "eyre", "ruint", @@ -3797,12 +3797,12 @@ dependencies = [ [[package]] name = "evm2-jit-build" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" [[package]] name = "evm2-jit-builtins" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "evm2", @@ -3815,7 +3815,7 @@ dependencies = [ [[package]] name = "evm2-jit-codegen" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "bitflags 2.13.2", @@ -3838,7 +3838,7 @@ dependencies = [ [[package]] name = "evm2-jit-context" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "evm2", @@ -3848,7 +3848,7 @@ dependencies = [ [[package]] name = "evm2-jit-llvm" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "cc", @@ -3861,7 +3861,7 @@ dependencies = [ [[package]] name = "evm2-jit-runtime" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "alloy-primitives", "crossbeam-channel", @@ -3887,7 +3887,7 @@ dependencies = [ [[package]] name = "evm2-macros" version = "0.1.0" -source = "git+https://github.com/streamingfast/evm2?rev=ed6a07c214c47df13d82f568d9f255ef4b3f5d22#ed6a07c214c47df13d82f568d9f255ef4b3f5d22" +source = "git+https://github.com/DaniPopes/evm2?rev=66687c18b34d3bdbb899f5eb7605070615c03475#66687c18b34d3bdbb899f5eb7605070615c03475" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index eb260bc7bcb..3d0b2902953 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -680,12 +680,10 @@ reth-firehose-tests = { path = "crates/firehose-tests" } # evm2 is patched through its pre-transfer URL, which redirects to alloy-rs/evm2, because Cargo # rejects a patch from the same source. -## Firehose additions -# SF fork of evm2 (`sf/reth` branch) at the upstream revision this release pins. [patch."https://github.com/alloy-rs/evm2"] -evm2 = { git = "https://github.com/streamingfast/evm2", rev = "ed6a07c214c47df13d82f568d9f255ef4b3f5d22" } # reth-v2.11.0-sf -evm2-inspectors = { git = "https://github.com/streamingfast/evm2", rev = "ed6a07c214c47df13d82f568d9f255ef4b3f5d22" } # reth-v2.11.0-sf -evm2-jit = { git = "https://github.com/streamingfast/evm2", rev = "ed6a07c214c47df13d82f568d9f255ef4b3f5d22" } # reth-v2.11.0-sf +evm2 = { git = "https://github.com/DaniPopes/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475" } +evm2-inspectors = { git = "https://github.com/DaniPopes/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475" } +evm2-jit = { git = "https://github.com/DaniPopes/evm2", rev = "66687c18b34d3bdbb899f5eb7605070615c03475" } [patch.crates-io] # Detached transaction tracing, until firehose-tracer 5.8.0 is released.