From 8b2c3a4a3413ef6ce9baa487a1b588ee332b0bf9 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Sun, 5 Oct 2025 23:20:55 +0000 Subject: [PATCH 1/9] refactor: Move primitives into files --- src/node/primitives/block.rs | 52 +++ src/node/primitives/body.rs | 73 ++++ src/node/primitives/mod.rs | 333 +----------------- src/node/primitives/rlp.rs | 142 ++++++++ src/node/primitives/serde_bincode_compat.rs | 64 ++++ .../{tx_wrapper.rs => transaction.rs} | 0 src/node/storage/mod.rs | 2 +- 7 files changed, 342 insertions(+), 324 deletions(-) create mode 100644 src/node/primitives/block.rs create mode 100644 src/node/primitives/body.rs create mode 100644 src/node/primitives/rlp.rs create mode 100644 src/node/primitives/serde_bincode_compat.rs rename src/node/primitives/{tx_wrapper.rs => transaction.rs} (100%) diff --git a/src/node/primitives/block.rs b/src/node/primitives/block.rs new file mode 100644 index 000000000..e8b73276d --- /dev/null +++ b/src/node/primitives/block.rs @@ -0,0 +1,52 @@ +use crate::node::primitives::HlBlockBody; +use alloy_consensus::Header; +use alloy_rlp::Encodable; +use reth_primitives_traits::{Block, InMemorySize}; +use serde::{Deserialize, Serialize}; +use std::borrow::Cow; + +use crate::node::primitives::rlp; + +/// Block for HL +#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] +pub struct HlBlock { + pub header: Header, + pub body: HlBlockBody, +} + +impl InMemorySize for HlBlock { + fn size(&self) -> usize { + self.header.size() + self.body.size() + } +} + +impl Block for HlBlock { + type Header = Header; + type Body = HlBlockBody; + + fn new(header: Self::Header, body: Self::Body) -> Self { + Self { header, body } + } + fn header(&self) -> &Self::Header { + &self.header + } + fn body(&self) -> &Self::Body { + &self.body + } + fn split(self) -> (Self::Header, Self::Body) { + (self.header, self.body) + } + + fn rlp_length(header: &Self::Header, body: &Self::Body) -> usize { + rlp::BlockHelper { + header: Cow::Borrowed(header), + transactions: Cow::Borrowed(&body.inner.transactions), + ommers: Cow::Borrowed(&body.inner.ommers), + withdrawals: body.inner.withdrawals.as_ref().map(Cow::Borrowed), + sidecars: body.sidecars.as_ref().map(Cow::Borrowed), + read_precompile_calls: body.read_precompile_calls.as_ref().map(Cow::Borrowed), + highest_precompile_address: body.highest_precompile_address.as_ref().map(Cow::Borrowed), + } + .length() + } +} diff --git a/src/node/primitives/body.rs b/src/node/primitives/body.rs new file mode 100644 index 000000000..f9abb291c --- /dev/null +++ b/src/node/primitives/body.rs @@ -0,0 +1,73 @@ +use alloy_consensus::{BlobTransactionSidecar, Header}; +use alloy_primitives::Address; +use reth_primitives_traits::{BlockBody as BlockBodyTrait, InMemorySize}; +use serde::{Deserialize, Serialize}; + +use crate::node::primitives::{BlockBody, TransactionSigned}; +pub use crate::node::types::{ReadPrecompileCall, ReadPrecompileCalls}; + +/// Block body for HL. It is equivalent to Ethereum [`BlockBody`] but additionally stores sidecars +/// for blob transactions. +#[derive( + Debug, + Clone, + Default, + PartialEq, + Eq, + Serialize, + Deserialize, + derive_more::Deref, + derive_more::DerefMut, +)] +pub struct HlBlockBody { + #[serde(flatten)] + #[deref] + #[deref_mut] + pub inner: BlockBody, + pub sidecars: Option>, + pub read_precompile_calls: Option, + pub highest_precompile_address: Option
, +} + +impl InMemorySize for HlBlockBody { + fn size(&self) -> usize { + self.inner.size() + + self.sidecars + .as_ref() + .map_or(0, |s| s.capacity() * core::mem::size_of::()) + + self.read_precompile_calls + .as_ref() + .map_or(0, |s| s.0.capacity() * core::mem::size_of::()) + } +} + +impl BlockBodyTrait for HlBlockBody { + type Transaction = TransactionSigned; + type OmmerHeader = Header; + + fn transactions(&self) -> &[Self::Transaction] { + BlockBodyTrait::transactions(&self.inner) + } + fn into_ethereum_body(self) -> BlockBody { + self.inner + } + fn into_transactions(self) -> Vec { + self.inner.into_transactions() + } + fn withdrawals(&self) -> Option<&alloy_rpc_types::Withdrawals> { + self.inner.withdrawals() + } + fn ommers(&self) -> Option<&[Self::OmmerHeader]> { + self.inner.ommers() + } + + fn calculate_tx_root(&self) -> alloy_primitives::B256 { + alloy_consensus::proofs::calculate_transaction_root( + &self + .transactions() + .iter() + .filter(|tx| !tx.is_system_transaction()) + .collect::>(), + ) + } +} diff --git a/src/node/primitives/mod.rs b/src/node/primitives/mod.rs index c76efa70a..aa2029efa 100644 --- a/src/node/primitives/mod.rs +++ b/src/node/primitives/mod.rs @@ -1,17 +1,17 @@ -#![allow(clippy::owned_cow)] -use alloy_consensus::{BlobTransactionSidecar, Header}; -use alloy_primitives::Address; -use alloy_rlp::{Encodable, RlpDecodable, RlpEncodable}; +use alloy_consensus::Header; use reth_ethereum_primitives::Receipt; use reth_primitives::NodePrimitives; -use reth_primitives_traits::{Block, BlockBody as BlockBodyTrait, InMemorySize}; -use serde::{Deserialize, Serialize}; -use std::borrow::Cow; -use crate::node::types::{ReadPrecompileCall, ReadPrecompileCalls}; +pub mod transaction; +pub use transaction::{BlockBody, TransactionSigned}; -pub mod tx_wrapper; -pub use tx_wrapper::{BlockBody, TransactionSigned}; +pub mod block; +pub use block::HlBlock; +pub mod body; +pub use body::HlBlockBody; + +pub mod rlp; +pub mod serde_bincode_compat; /// Primitive types for HyperEVM. #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] @@ -25,316 +25,3 @@ impl NodePrimitives for HlPrimitives { type SignedTx = TransactionSigned; type Receipt = Receipt; } - -/// Block body for HL. It is equivalent to Ethereum [`BlockBody`] but additionally stores sidecars -/// for blob transactions. -#[derive( - Debug, - Clone, - Default, - PartialEq, - Eq, - Serialize, - Deserialize, - derive_more::Deref, - derive_more::DerefMut, -)] -pub struct HlBlockBody { - #[serde(flatten)] - #[deref] - #[deref_mut] - pub inner: BlockBody, - pub sidecars: Option>, - pub read_precompile_calls: Option, - pub highest_precompile_address: Option
, -} - -impl InMemorySize for HlBlockBody { - fn size(&self) -> usize { - self.inner.size() + - self.sidecars - .as_ref() - .map_or(0, |s| s.capacity() * core::mem::size_of::()) + - self.read_precompile_calls - .as_ref() - .map_or(0, |s| s.0.capacity() * core::mem::size_of::()) - } -} - -impl BlockBodyTrait for HlBlockBody { - type Transaction = TransactionSigned; - type OmmerHeader = Header; - - fn transactions(&self) -> &[Self::Transaction] { - BlockBodyTrait::transactions(&self.inner) - } - fn into_ethereum_body(self) -> BlockBody { - self.inner - } - fn into_transactions(self) -> Vec { - self.inner.into_transactions() - } - fn withdrawals(&self) -> Option<&alloy_rpc_types::Withdrawals> { - self.inner.withdrawals() - } - fn ommers(&self) -> Option<&[Self::OmmerHeader]> { - self.inner.ommers() - } - - fn calculate_tx_root(&self) -> alloy_primitives::B256 { - alloy_consensus::proofs::calculate_transaction_root( - &self - .transactions() - .iter() - .filter(|tx| !tx.is_system_transaction()) - .collect::>(), - ) - } -} - -/// Block for HL -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -pub struct HlBlock { - pub header: Header, - pub body: HlBlockBody, -} - -impl InMemorySize for HlBlock { - fn size(&self) -> usize { - self.header.size() + self.body.size() - } -} - -impl Block for HlBlock { - type Header = Header; - type Body = HlBlockBody; - - fn new(header: Self::Header, body: Self::Body) -> Self { - Self { header, body } - } - fn header(&self) -> &Self::Header { - &self.header - } - fn body(&self) -> &Self::Body { - &self.body - } - fn split(self) -> (Self::Header, Self::Body) { - (self.header, self.body) - } - - fn rlp_length(header: &Self::Header, body: &Self::Body) -> usize { - rlp::BlockHelper { - header: Cow::Borrowed(header), - transactions: Cow::Borrowed(&body.inner.transactions), - ommers: Cow::Borrowed(&body.inner.ommers), - withdrawals: body.inner.withdrawals.as_ref().map(Cow::Borrowed), - sidecars: body.sidecars.as_ref().map(Cow::Borrowed), - read_precompile_calls: body.read_precompile_calls.as_ref().map(Cow::Borrowed), - highest_precompile_address: body.highest_precompile_address.as_ref().map(Cow::Borrowed), - } - .length() - } -} - -mod rlp { - use super::*; - use alloy_eips::eip4895::Withdrawals; - use alloy_rlp::Decodable; - - #[derive(RlpEncodable, RlpDecodable)] - #[rlp(trailing)] - struct BlockBodyHelper<'a> { - transactions: Cow<'a, Vec>, - ommers: Cow<'a, Vec
>, - withdrawals: Option>, - sidecars: Option>>, - read_precompile_calls: Option>, - highest_precompile_address: Option>, - } - - #[derive(RlpEncodable, RlpDecodable)] - #[rlp(trailing)] - pub(crate) struct BlockHelper<'a> { - pub(crate) header: Cow<'a, Header>, - pub(crate) transactions: Cow<'a, Vec>, - pub(crate) ommers: Cow<'a, Vec
>, - pub(crate) withdrawals: Option>, - pub(crate) sidecars: Option>>, - pub(crate) read_precompile_calls: Option>, - pub(crate) highest_precompile_address: Option>, - } - - impl<'a> From<&'a HlBlockBody> for BlockBodyHelper<'a> { - fn from(value: &'a HlBlockBody) -> Self { - let HlBlockBody { - inner: BlockBody { transactions, ommers, withdrawals }, - sidecars, - read_precompile_calls, - highest_precompile_address, - } = value; - Self { - transactions: Cow::Borrowed(transactions), - ommers: Cow::Borrowed(ommers), - withdrawals: withdrawals.as_ref().map(Cow::Borrowed), - sidecars: sidecars.as_ref().map(Cow::Borrowed), - read_precompile_calls: read_precompile_calls.as_ref().map(Cow::Borrowed), - highest_precompile_address: highest_precompile_address.as_ref().map(Cow::Borrowed), - } - } - } - - impl<'a> From<&'a HlBlock> for BlockHelper<'a> { - fn from(value: &'a HlBlock) -> Self { - let HlBlock { - header, - body: - HlBlockBody { - inner: BlockBody { transactions, ommers, withdrawals }, - sidecars, - read_precompile_calls, - highest_precompile_address, - }, - } = value; - Self { - header: Cow::Borrowed(header), - transactions: Cow::Borrowed(transactions), - ommers: Cow::Borrowed(ommers), - withdrawals: withdrawals.as_ref().map(Cow::Borrowed), - sidecars: sidecars.as_ref().map(Cow::Borrowed), - read_precompile_calls: read_precompile_calls.as_ref().map(Cow::Borrowed), - highest_precompile_address: highest_precompile_address.as_ref().map(Cow::Borrowed), - } - } - } - - impl Encodable for HlBlockBody { - fn encode(&self, out: &mut dyn bytes::BufMut) { - BlockBodyHelper::from(self).encode(out); - } - fn length(&self) -> usize { - BlockBodyHelper::from(self).length() - } - } - - impl Decodable for HlBlockBody { - fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { - let BlockBodyHelper { - transactions, - ommers, - withdrawals, - sidecars, - read_precompile_calls, - highest_precompile_address, - } = BlockBodyHelper::decode(buf)?; - Ok(Self { - inner: BlockBody { - transactions: transactions.into_owned(), - ommers: ommers.into_owned(), - withdrawals: withdrawals.map(|w| w.into_owned()), - }, - sidecars: sidecars.map(|s| s.into_owned()), - read_precompile_calls: read_precompile_calls.map(|s| s.into_owned()), - highest_precompile_address: highest_precompile_address.map(|s| s.into_owned()), - }) - } - } - - impl Encodable for HlBlock { - fn encode(&self, out: &mut dyn bytes::BufMut) { - BlockHelper::from(self).encode(out); - } - fn length(&self) -> usize { - BlockHelper::from(self).length() - } - } - - impl Decodable for HlBlock { - fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { - let BlockHelper { - header, - transactions, - ommers, - withdrawals, - sidecars, - read_precompile_calls, - highest_precompile_address, - } = BlockHelper::decode(buf)?; - Ok(Self { - header: header.into_owned(), - body: HlBlockBody { - inner: BlockBody { - transactions: transactions.into_owned(), - ommers: ommers.into_owned(), - withdrawals: withdrawals.map(|w| w.into_owned()), - }, - sidecars: sidecars.map(|s| s.into_owned()), - read_precompile_calls: read_precompile_calls.map(|s| s.into_owned()), - highest_precompile_address: highest_precompile_address.map(|s| s.into_owned()), - }, - }) - } - } -} - -pub mod serde_bincode_compat { - use super::*; - use reth_primitives_traits::serde_bincode_compat::{BincodeReprFor, SerdeBincodeCompat}; - - #[derive(Debug, Serialize, Deserialize)] - pub struct HlBlockBodyBincode<'a> { - inner: BincodeReprFor<'a, BlockBody>, - sidecars: Option>>, - read_precompile_calls: Option>, - highest_precompile_address: Option>, - } - - #[derive(Debug, Serialize, Deserialize)] - pub struct HlBlockBincode<'a> { - header: BincodeReprFor<'a, Header>, - body: BincodeReprFor<'a, HlBlockBody>, - } - - impl SerdeBincodeCompat for HlBlockBody { - type BincodeRepr<'a> = HlBlockBodyBincode<'a>; - - fn as_repr(&self) -> Self::BincodeRepr<'_> { - HlBlockBodyBincode { - inner: self.inner.as_repr(), - sidecars: self.sidecars.as_ref().map(Cow::Borrowed), - read_precompile_calls: self.read_precompile_calls.as_ref().map(Cow::Borrowed), - highest_precompile_address: self - .highest_precompile_address - .as_ref() - .map(Cow::Borrowed), - } - } - - fn from_repr(repr: Self::BincodeRepr<'_>) -> Self { - let HlBlockBodyBincode { - inner, - sidecars, - read_precompile_calls, - highest_precompile_address, - } = repr; - Self { - inner: BlockBody::from_repr(inner), - sidecars: sidecars.map(|s| s.into_owned()), - read_precompile_calls: read_precompile_calls.map(|s| s.into_owned()), - highest_precompile_address: highest_precompile_address.map(|s| s.into_owned()), - } - } - } - - impl SerdeBincodeCompat for HlBlock { - type BincodeRepr<'a> = HlBlockBincode<'a>; - - fn as_repr(&self) -> Self::BincodeRepr<'_> { - HlBlockBincode { header: self.header.as_repr(), body: self.body.as_repr() } - } - - fn from_repr(repr: Self::BincodeRepr<'_>) -> Self { - let HlBlockBincode { header, body } = repr; - Self { header: Header::from_repr(header), body: HlBlockBody::from_repr(body) } - } - } -} diff --git a/src/node/primitives/rlp.rs b/src/node/primitives/rlp.rs new file mode 100644 index 000000000..1af433eed --- /dev/null +++ b/src/node/primitives/rlp.rs @@ -0,0 +1,142 @@ +#![allow(clippy::owned_cow)] +use super::{HlBlock, HlBlockBody, TransactionSigned}; +use crate::node::types::ReadPrecompileCalls; +use alloy_consensus::{BlobTransactionSidecar, BlockBody, Header}; +use alloy_eips::eip4895::Withdrawals; +use alloy_primitives::Address; +use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable}; +use std::borrow::Cow; + +#[derive(RlpEncodable, RlpDecodable)] +#[rlp(trailing)] +struct BlockBodyHelper<'a> { + transactions: Cow<'a, Vec>, + ommers: Cow<'a, Vec
>, + withdrawals: Option>, + sidecars: Option>>, + read_precompile_calls: Option>, + highest_precompile_address: Option>, +} + +#[derive(RlpEncodable, RlpDecodable)] +#[rlp(trailing)] +pub(crate) struct BlockHelper<'a> { + pub(crate) header: Cow<'a, Header>, + pub(crate) transactions: Cow<'a, Vec>, + pub(crate) ommers: Cow<'a, Vec
>, + pub(crate) withdrawals: Option>, + pub(crate) sidecars: Option>>, + pub(crate) read_precompile_calls: Option>, + pub(crate) highest_precompile_address: Option>, +} + +impl<'a> From<&'a HlBlockBody> for BlockBodyHelper<'a> { + fn from(value: &'a HlBlockBody) -> Self { + let HlBlockBody { + inner: BlockBody { transactions, ommers, withdrawals }, + sidecars, + read_precompile_calls, + highest_precompile_address, + } = value; + Self { + transactions: Cow::Borrowed(transactions), + ommers: Cow::Borrowed(ommers), + withdrawals: withdrawals.as_ref().map(Cow::Borrowed), + sidecars: sidecars.as_ref().map(Cow::Borrowed), + read_precompile_calls: read_precompile_calls.as_ref().map(Cow::Borrowed), + highest_precompile_address: highest_precompile_address.as_ref().map(Cow::Borrowed), + } + } +} + +impl<'a> From<&'a HlBlock> for BlockHelper<'a> { + fn from(value: &'a HlBlock) -> Self { + let HlBlock { + header, + body: + HlBlockBody { + inner: BlockBody { transactions, ommers, withdrawals }, + sidecars, + read_precompile_calls, + highest_precompile_address, + }, + } = value; + Self { + header: Cow::Borrowed(header), + transactions: Cow::Borrowed(transactions), + ommers: Cow::Borrowed(ommers), + withdrawals: withdrawals.as_ref().map(Cow::Borrowed), + sidecars: sidecars.as_ref().map(Cow::Borrowed), + read_precompile_calls: read_precompile_calls.as_ref().map(Cow::Borrowed), + highest_precompile_address: highest_precompile_address.as_ref().map(Cow::Borrowed), + } + } +} + +impl Encodable for HlBlockBody { + fn encode(&self, out: &mut dyn bytes::BufMut) { + BlockBodyHelper::from(self).encode(out); + } + fn length(&self) -> usize { + BlockBodyHelper::from(self).length() + } +} + +impl Decodable for HlBlockBody { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + let BlockBodyHelper { + transactions, + ommers, + withdrawals, + sidecars, + read_precompile_calls, + highest_precompile_address, + } = BlockBodyHelper::decode(buf)?; + Ok(Self { + inner: BlockBody { + transactions: transactions.into_owned(), + ommers: ommers.into_owned(), + withdrawals: withdrawals.map(|w| w.into_owned()), + }, + sidecars: sidecars.map(|s| s.into_owned()), + read_precompile_calls: read_precompile_calls.map(|s| s.into_owned()), + highest_precompile_address: highest_precompile_address.map(|s| s.into_owned()), + }) + } +} + +impl Encodable for HlBlock { + fn encode(&self, out: &mut dyn bytes::BufMut) { + BlockHelper::from(self).encode(out); + } + fn length(&self) -> usize { + BlockHelper::from(self).length() + } +} + +impl Decodable for HlBlock { + fn decode(buf: &mut &[u8]) -> alloy_rlp::Result { + let BlockHelper { + header, + transactions, + ommers, + withdrawals, + sidecars, + read_precompile_calls, + highest_precompile_address, + } = BlockHelper::decode(buf)?; + Ok(Self { + header: header.into_owned(), + body: HlBlockBody { + inner: BlockBody { + transactions: transactions.into_owned(), + ommers: ommers.into_owned(), + withdrawals: withdrawals.map(|w| w.into_owned()), + }, + sidecars: sidecars.map(|s| s.into_owned()), + read_precompile_calls: read_precompile_calls.map(|s| s.into_owned()), + highest_precompile_address: highest_precompile_address.map(|s| s.into_owned()), + }, + }) + } +} diff --git a/src/node/primitives/serde_bincode_compat.rs b/src/node/primitives/serde_bincode_compat.rs new file mode 100644 index 000000000..af876d003 --- /dev/null +++ b/src/node/primitives/serde_bincode_compat.rs @@ -0,0 +1,64 @@ +#![allow(clippy::owned_cow)] +use alloy_consensus::{BlobTransactionSidecar, Header}; +use alloy_primitives::Address; +use reth_primitives_traits::serde_bincode_compat::{BincodeReprFor, SerdeBincodeCompat}; +use serde::{Deserialize, Serialize}; +use std::borrow::Cow; + +use super::{HlBlock, HlBlockBody}; +use crate::node::{primitives::BlockBody, types::ReadPrecompileCalls}; + +#[derive(Debug, Serialize, Deserialize)] +pub struct HlBlockBodyBincode<'a> { + inner: BincodeReprFor<'a, BlockBody>, + sidecars: Option>>, + read_precompile_calls: Option>, + highest_precompile_address: Option>, +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct HlBlockBincode<'a> { + header: BincodeReprFor<'a, Header>, + body: BincodeReprFor<'a, HlBlockBody>, +} + +impl SerdeBincodeCompat for HlBlockBody { + type BincodeRepr<'a> = HlBlockBodyBincode<'a>; + + fn as_repr(&self) -> Self::BincodeRepr<'_> { + HlBlockBodyBincode { + inner: self.inner.as_repr(), + sidecars: self.sidecars.as_ref().map(Cow::Borrowed), + read_precompile_calls: self.read_precompile_calls.as_ref().map(Cow::Borrowed), + highest_precompile_address: self.highest_precompile_address.as_ref().map(Cow::Borrowed), + } + } + + fn from_repr(repr: Self::BincodeRepr<'_>) -> Self { + let HlBlockBodyBincode { + inner, + sidecars, + read_precompile_calls, + highest_precompile_address, + } = repr; + Self { + inner: BlockBody::from_repr(inner), + sidecars: sidecars.map(|s| s.into_owned()), + read_precompile_calls: read_precompile_calls.map(|s| s.into_owned()), + highest_precompile_address: highest_precompile_address.map(|s| s.into_owned()), + } + } +} + +impl SerdeBincodeCompat for HlBlock { + type BincodeRepr<'a> = HlBlockBincode<'a>; + + fn as_repr(&self) -> Self::BincodeRepr<'_> { + HlBlockBincode { header: self.header.as_repr(), body: self.body.as_repr() } + } + + fn from_repr(repr: Self::BincodeRepr<'_>) -> Self { + let HlBlockBincode { header, body } = repr; + Self { header: Header::from_repr(header), body: HlBlockBody::from_repr(body) } + } +} diff --git a/src/node/primitives/tx_wrapper.rs b/src/node/primitives/transaction.rs similarity index 100% rename from src/node/primitives/tx_wrapper.rs rename to src/node/primitives/transaction.rs diff --git a/src/node/storage/mod.rs b/src/node/storage/mod.rs index 73f3d8bf6..8ee49ba27 100644 --- a/src/node/storage/mod.rs +++ b/src/node/storage/mod.rs @@ -1,7 +1,7 @@ use crate::{ HlBlock, HlBlockBody, HlPrimitives, node::{ - primitives::tx_wrapper::{convert_to_eth_block_body, convert_to_hl_block_body}, + primitives::transaction::{convert_to_eth_block_body, convert_to_hl_block_body}, types::HlExtras, }, }; From 567d6ce2e419288273df6236acb0ad7acdc414fb Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Sun, 5 Oct 2025 23:34:04 +0000 Subject: [PATCH 2/9] feat: Introduce HlHeader --- src/node/primitives/header.rs | 187 ++++++++++++++++++++++++++++++++++ src/node/primitives/mod.rs | 1 + src/node/types/mod.rs | 17 +++- 3 files changed, 202 insertions(+), 3 deletions(-) create mode 100644 src/node/primitives/header.rs diff --git a/src/node/primitives/header.rs b/src/node/primitives/header.rs new file mode 100644 index 000000000..f6fa1794d --- /dev/null +++ b/src/node/primitives/header.rs @@ -0,0 +1,187 @@ +use alloy_consensus::Header; +use alloy_primitives::{Address, B64, B256, BlockNumber, Bloom, Bytes, Sealable, U256}; +use alloy_rlp::{RlpDecodable, RlpEncodable}; +use reth_codecs::Compact; +use reth_primitives_traits::{BlockHeader, InMemorySize, serde_bincode_compat::RlpBincode}; +use serde::{Deserialize, Serialize}; + +use crate::node::types::HlExtras; + +/// The header type of this node +/// +/// This type extends the regular ethereum header with an extension. +#[derive( + Clone, + Debug, + PartialEq, + Eq, + Hash, + derive_more::AsRef, + derive_more::Deref, + Default, + RlpEncodable, + RlpDecodable, + Serialize, + Deserialize, +)] +#[serde(rename_all = "camelCase")] +pub struct HlHeader { + /// The regular eth header + #[as_ref] + #[deref] + #[serde(flatten)] + pub inner: Header, + /// The extended header fields that is not part of the block hash + pub logs_bloom_with_system_txs: Bloom, + pub system_tx_count: u64, + pub read_precompile_calls: HlExtras, +} + +impl From
for HlHeader { + fn from(_value: Header) -> Self { + unreachable!() + } +} + +impl AsRef for HlHeader { + fn as_ref(&self) -> &Self { + self + } +} + +impl Sealable for HlHeader { + fn hash_slow(&self) -> B256 { + self.inner.hash_slow() + } +} + +impl alloy_consensus::BlockHeader for HlHeader { + fn parent_hash(&self) -> B256 { + self.inner.parent_hash() + } + + fn ommers_hash(&self) -> B256 { + self.inner.ommers_hash() + } + + fn beneficiary(&self) -> Address { + self.inner.beneficiary() + } + + fn state_root(&self) -> B256 { + self.inner.state_root() + } + + fn transactions_root(&self) -> B256 { + self.inner.transactions_root() + } + + fn receipts_root(&self) -> B256 { + self.inner.receipts_root() + } + + fn withdrawals_root(&self) -> Option { + self.inner.withdrawals_root() + } + + fn logs_bloom(&self) -> Bloom { + self.inner.logs_bloom() + } + + fn difficulty(&self) -> U256 { + self.inner.difficulty() + } + + fn number(&self) -> BlockNumber { + self.inner.number() + } + + fn gas_limit(&self) -> u64 { + self.inner.gas_limit() + } + + fn gas_used(&self) -> u64 { + self.inner.gas_used() + } + + fn timestamp(&self) -> u64 { + self.inner.timestamp() + } + + fn mix_hash(&self) -> Option { + self.inner.mix_hash() + } + + fn nonce(&self) -> Option { + self.inner.nonce() + } + + fn base_fee_per_gas(&self) -> Option { + self.inner.base_fee_per_gas() + } + + fn blob_gas_used(&self) -> Option { + self.inner.blob_gas_used() + } + + fn excess_blob_gas(&self) -> Option { + self.inner.excess_blob_gas() + } + + fn parent_beacon_block_root(&self) -> Option { + self.inner.parent_beacon_block_root() + } + + fn requests_hash(&self) -> Option { + self.inner.requests_hash() + } + + fn extra_data(&self) -> &Bytes { + self.inner.extra_data() + } +} + +impl InMemorySize for HlHeader { + fn size(&self) -> usize { + self.inner.size() + + self.logs_bloom_with_system_txs.data().len() + + self.system_tx_count.size() + + self.read_precompile_calls.size() + } +} + +impl reth_codecs::Compact for HlHeader { + fn to_compact(&self, buf: &mut B) -> usize + where + B: alloy_rlp::bytes::BufMut + AsMut<[u8]>, + { + // It's too tedious to implement to_compact for every field, so use rmp_serde to serialize + // This also helps the struct to be upgradable in future thanks to serde's flexibility. + let result: Bytes = rmp_serde::to_vec(&self).unwrap().into(); + result.to_compact(buf) + } + + fn from_compact(buf: &[u8], identifier: usize) -> (Self, &[u8]) { + let header: HlHeader = rmp_serde::from_slice(&buf[identifier..]).unwrap(); + (header, &buf[identifier + buf.len()..]) + } +} + +impl reth_db_api::table::Compress for HlHeader { + type Compressed = Vec; + + fn compress_to_buf>(&self, buf: &mut B) { + let _ = Compact::to_compact(self, buf); + } +} + +impl reth_db_api::table::Decompress for HlHeader { + fn decompress(value: &[u8]) -> Result { + let (obj, _) = Compact::from_compact(value, value.len()); + Ok(obj) + } +} + +impl BlockHeader for HlHeader {} + +impl RlpBincode for HlHeader {} diff --git a/src/node/primitives/mod.rs b/src/node/primitives/mod.rs index aa2029efa..2d49b8343 100644 --- a/src/node/primitives/mod.rs +++ b/src/node/primitives/mod.rs @@ -9,6 +9,7 @@ pub mod block; pub use block::HlBlock; pub mod body; pub use body::HlBlockBody; +pub mod header; pub mod rlp; pub mod serde_bincode_compat; diff --git a/src/node/types/mod.rs b/src/node/types/mod.rs index 8d6dc353b..9029ee57e 100644 --- a/src/node/types/mod.rs +++ b/src/node/types/mod.rs @@ -5,23 +5,34 @@ use alloy_primitives::{Address, B256, Bytes, Log}; use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable}; use bytes::BufMut; +use reth_primitives_traits::InMemorySize; use serde::{Deserialize, Serialize}; use crate::HlBlock; pub type ReadPrecompileCall = (Address, Vec<(ReadPrecompileInput, ReadPrecompileResult)>); -#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, Default)] +#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, Default, Hash)] pub struct ReadPrecompileCalls(pub Vec); pub(crate) mod reth_compat; -#[derive(Debug, Clone, Serialize, Deserialize, Default)] +#[derive( + Debug, Clone, Serialize, Deserialize, Default, RlpEncodable, RlpDecodable, Eq, PartialEq, Hash, +)] +#[rlp(trailing)] pub struct HlExtras { pub read_precompile_calls: Option, pub highest_precompile_address: Option
, } +impl InMemorySize for HlExtras { + fn size(&self) -> usize { + self.read_precompile_calls.as_ref().map_or(0, |s| s.0.len()) + + self.highest_precompile_address.as_ref().map_or(0, |_| 20) + } +} + impl Encodable for ReadPrecompileCalls { fn encode(&self, out: &mut dyn BufMut) { let buf: Bytes = rmp_serde::to_vec(&self.0).unwrap().into(); @@ -117,7 +128,7 @@ pub struct ReadPrecompileInput { pub gas_limit: u64, } -#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq, Hash)] pub enum ReadPrecompileResult { Ok { gas_used: u64, bytes: Bytes }, OutOfGas, From 2390ed864aeead09638aaef50c02908ba2e6b4c5 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Mon, 6 Oct 2025 00:27:33 +0000 Subject: [PATCH 3/9] feat(breaking): Use HlHeader for storing header --- src/chainspec/mod.rs | 20 +++++++--- src/chainspec/parser.rs | 4 +- src/lib.rs | 2 +- src/node/consensus/mod.rs | 9 ++--- src/node/evm/assembler.rs | 6 +-- src/node/evm/config.rs | 21 +++++------ src/node/network/block_import/service.rs | 4 +- src/node/network/mod.rs | 8 ++-- src/node/primitives/block.rs | 9 ++--- src/node/primitives/body.rs | 4 +- src/node/primitives/header.rs | 41 +++++++++++++++++++++ src/node/primitives/mod.rs | 4 +- src/node/primitives/rlp.rs | 12 +++--- src/node/primitives/serde_bincode_compat.rs | 8 ++-- src/node/primitives/transaction.rs | 10 ++--- src/node/storage/mod.rs | 24 ++++++------ src/node/types/mod.rs | 20 ++++++++++ src/node/types/reth_compat.rs | 15 ++++++-- 18 files changed, 147 insertions(+), 74 deletions(-) diff --git a/src/chainspec/mod.rs b/src/chainspec/mod.rs index 783ddbabf..14c3a1d61 100644 --- a/src/chainspec/mod.rs +++ b/src/chainspec/mod.rs @@ -1,8 +1,7 @@ pub mod hl; pub mod parser; -use crate::hardforks::HlHardforks; -use alloy_consensus::Header; +use crate::{hardforks::HlHardforks, node::primitives::HlHeader}; use alloy_eips::eip7840::BlobParams; use alloy_genesis::Genesis; use alloy_primitives::{Address, B256, U256}; @@ -20,10 +19,11 @@ pub const TESTNET_CHAIN_ID: u64 = 998; #[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct HlChainSpec { pub inner: ChainSpec, + pub genesis_header: HlHeader, } impl EthChainSpec for HlChainSpec { - type Header = Header; + type Header = HlHeader; fn blob_params_at_timestamp(&self, timestamp: u64) -> Option { self.inner.blob_params_at_timestamp(timestamp) @@ -57,8 +57,8 @@ impl EthChainSpec for HlChainSpec { Box::new(self.inner.display_hardforks()) } - fn genesis_header(&self) -> &Header { - self.inner.genesis_header() + fn genesis_header(&self) -> &HlHeader { + &self.genesis_header } fn genesis(&self) -> &Genesis { @@ -127,4 +127,14 @@ impl HlChainSpec { _ => unreachable!("Unreachable since ChainSpecParser won't return other chains"), } } + + fn new(inner: ChainSpec) -> Self { + let genesis_header = HlHeader { + inner: inner.genesis_header().clone(), + logs_bloom_with_system_txs: Default::default(), + system_tx_count: 0, + read_precompile_calls: Default::default(), + }; + Self { inner, genesis_header } + } } diff --git a/src/chainspec/parser.rs b/src/chainspec/parser.rs index 0ac712b8b..a85d73005 100644 --- a/src/chainspec/parser.rs +++ b/src/chainspec/parser.rs @@ -26,8 +26,8 @@ impl ChainSpecParser for HlChainSpecParser { /// Currently only mainnet is supported. pub fn chain_value_parser(s: &str) -> eyre::Result> { match s { - "mainnet" => Ok(Arc::new(HlChainSpec { inner: hl_mainnet() })), - "testnet" => Ok(Arc::new(HlChainSpec { inner: hl_testnet() })), + "mainnet" => Ok(Arc::new(HlChainSpec::new(hl_mainnet()))), + "testnet" => Ok(Arc::new(HlChainSpec::new(hl_testnet()))), _ => Err(eyre::eyre!("Unsupported chain: {}", s)), } } diff --git a/src/lib.rs b/src/lib.rs index 8291c71a5..e3cbf55d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,4 +7,4 @@ pub mod node; pub mod pseudo_peer; pub mod version; -pub use node::primitives::{HlBlock, HlBlockBody, HlPrimitives}; +pub use node::primitives::{HlBlock, HlBlockBody, HlHeader, HlPrimitives}; diff --git a/src/node/consensus/mod.rs b/src/node/consensus/mod.rs index 7a990bc9b..aec2d76db 100644 --- a/src/node/consensus/mod.rs +++ b/src/node/consensus/mod.rs @@ -1,5 +1,4 @@ -use crate::{HlBlock, HlBlockBody, HlPrimitives, hardforks::HlHardforks, node::HlNode}; -use alloy_consensus::Header; +use crate::{hardforks::HlHardforks, node::{primitives::HlHeader, HlNode}, HlBlock, HlBlockBody, HlPrimitives}; use reth::{ api::{FullNodeTypes, NodeTypes}, beacon_consensus::EthBeaconConsensus, @@ -101,14 +100,14 @@ where impl Consensus for HlConsensus where - ChainSpec: EthChainSpec
+ HlHardforks, + ChainSpec: EthChainSpec
+ HlHardforks, { type Error = ConsensusError; fn validate_body_against_header( &self, body: &HlBlockBody, - header: &SealedHeader, + header: &SealedHeader, ) -> Result<(), ConsensusError> { Consensus::::validate_body_against_header(&self.inner, body, header) } @@ -148,7 +147,7 @@ mod reth_copy; impl FullConsensus for HlConsensus where - ChainSpec: EthChainSpec
+ HlHardforks, + ChainSpec: EthChainSpec
+ HlHardforks, { fn validate_block_post_execution( &self, diff --git a/src/node/evm/assembler.rs b/src/node/evm/assembler.rs index 4a3911024..62aee3250 100644 --- a/src/node/evm/assembler.rs +++ b/src/node/evm/assembler.rs @@ -1,8 +1,6 @@ use crate::{ - HlBlock, - node::evm::config::{HlBlockExecutorFactory, HlEvmConfig}, + node::evm::config::{HlBlockExecutorFactory, HlEvmConfig}, HlBlock, HlHeader }; -use alloy_consensus::Header; use reth_evm::{ block::BlockExecutionError, execute::{BlockAssembler, BlockAssemblerInput}, @@ -13,7 +11,7 @@ impl BlockAssembler for HlEvmConfig { fn assemble_block( &self, - input: BlockAssemblerInput<'_, '_, HlBlockExecutorFactory, Header>, + input: BlockAssemblerInput<'_, '_, HlBlockExecutorFactory, HlHeader>, ) -> Result { let HlBlock { header, body } = self.block_assembler.assemble_block(input)?; Ok(HlBlock { header, body }) diff --git a/src/node/evm/config.rs b/src/node/evm/config.rs index 60958cf58..c5e406b38 100644 --- a/src/node/evm/config.rs +++ b/src/node/evm/config.rs @@ -1,15 +1,11 @@ use super::{executor::HlBlockExecutor, factory::HlEvmFactory}; use crate::{ - HlBlock, HlBlockBody, HlPrimitives, - chainspec::HlChainSpec, - evm::{spec::HlSpecId, transaction::HlTxEnv}, - hardforks::HlHardforks, - node::{ + chainspec::HlChainSpec, evm::{spec::HlSpecId, transaction::HlTxEnv}, hardforks::HlHardforks, node::{ evm::{executor::is_system_transaction, receipt_builder::RethReceiptBuilder}, primitives::{BlockBody, TransactionSigned}, rpc::engine_api::validator::HlExecutionData, types::HlExtras, - }, + }, HlBlock, HlBlockBody, HlHeader, HlPrimitives }; use alloy_consensus::{BlockHeader, EMPTY_OMMER_ROOT_HASH, Header, Transaction as _, TxReceipt}; use alloy_eips::{Encodable2718, merge::BEACON_NONCE}; @@ -54,7 +50,7 @@ where fn assemble_block( &self, - input: BlockAssemblerInput<'_, '_, F>, + input: BlockAssemblerInput<'_, '_, F, HlHeader>, ) -> Result { // TODO: Copy of EthBlockAssembler::assemble_block let inner = &self.inner; @@ -136,6 +132,7 @@ where excess_blob_gas, requests_hash, }; + let header = HlHeader::from_ethereum_header(header, receipts); Ok(Self::Block { header, @@ -269,6 +266,8 @@ where } } +static EMPTY_OMMERS: [Header; 0] = []; + impl ConfigureEvm for HlEvmConfig where Self: Send + Sync + Unpin + Clone + 'static, @@ -287,7 +286,7 @@ where self } - fn evm_env(&self, header: &Header) -> Result, Self::Error> { + fn evm_env(&self, header: &HlHeader) -> Result, Self::Error> { let blob_params = self.chain_spec().blob_params_at_timestamp(header.timestamp); let spec = revm_spec_by_timestamp_and_block_number( self.chain_spec().clone(), @@ -332,7 +331,7 @@ where fn next_evm_env( &self, - parent: &Header, + parent: &HlHeader, attributes: &Self::NextBlockEnvCtx, ) -> Result, Self::Error> { // ensure we're not missing any timestamp based hardforks @@ -382,7 +381,7 @@ where ctx: EthBlockExecutionCtx { parent_hash: block.header().parent_hash, parent_beacon_block_root: block.header().parent_beacon_block_root, - ommers: &block.body().ommers, + ommers: &EMPTY_OMMERS, withdrawals: block.body().withdrawals.as_ref().map(Cow::Borrowed), }, extras: HlExtras { @@ -420,7 +419,7 @@ impl ConfigureEngineEvm for HlEvmConfig { ctx: EthBlockExecutionCtx { parent_hash: block.header.parent_hash, parent_beacon_block_root: block.header.parent_beacon_block_root, - ommers: &block.body.ommers, + ommers: &EMPTY_OMMERS, withdrawals: block.body.withdrawals.as_ref().map(Cow::Borrowed), }, extras: HlExtras { diff --git a/src/node/network/block_import/service.rs b/src/node/network/block_import/service.rs index 9860348fd..359d9ed72 100644 --- a/src/node/network/block_import/service.rs +++ b/src/node/network/block_import/service.rs @@ -179,7 +179,7 @@ where #[cfg(test)] mod tests { - use crate::chainspec::hl::hl_mainnet; + use crate::{chainspec::hl::hl_mainnet, HlHeader}; use super::*; use alloy_primitives::{B256, U128}; @@ -355,7 +355,7 @@ mod tests { /// Creates a test block message fn create_test_block() -> NewBlockMessage { let block = HlBlock { - header: Header::default(), + header: HlHeader::default(), body: HlBlockBody { inner: BlockBody { transactions: Vec::new(), diff --git a/src/node/network/mod.rs b/src/node/network/mod.rs index a9fc469e0..70ed586c2 100644 --- a/src/node/network/mod.rs +++ b/src/node/network/mod.rs @@ -38,10 +38,10 @@ pub struct HlNewBlock(pub NewBlock); mod rlp { use super::*; use crate::{ - HlBlockBody, + HlBlockBody, HlHeader, node::primitives::{BlockBody, TransactionSigned}, }; - use alloy_consensus::{BlobTransactionSidecar, Header}; + use alloy_consensus::BlobTransactionSidecar; use alloy_primitives::{Address, U128}; use alloy_rlp::{RlpDecodable, RlpEncodable}; use alloy_rpc_types::Withdrawals; @@ -50,9 +50,9 @@ mod rlp { #[derive(RlpEncodable, RlpDecodable)] #[rlp(trailing)] struct BlockHelper<'a> { - header: Cow<'a, Header>, + header: Cow<'a, HlHeader>, transactions: Cow<'a, Vec>, - ommers: Cow<'a, Vec
>, + ommers: Cow<'a, Vec>, withdrawals: Option>, } diff --git a/src/node/primitives/block.rs b/src/node/primitives/block.rs index e8b73276d..7462a82c6 100644 --- a/src/node/primitives/block.rs +++ b/src/node/primitives/block.rs @@ -1,16 +1,13 @@ -use crate::node::primitives::HlBlockBody; -use alloy_consensus::Header; +use super::{HlBlockBody, HlHeader, rlp}; use alloy_rlp::Encodable; use reth_primitives_traits::{Block, InMemorySize}; use serde::{Deserialize, Serialize}; use std::borrow::Cow; -use crate::node::primitives::rlp; - /// Block for HL #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct HlBlock { - pub header: Header, + pub header: HlHeader, pub body: HlBlockBody, } @@ -21,7 +18,7 @@ impl InMemorySize for HlBlock { } impl Block for HlBlock { - type Header = Header; + type Header = HlHeader; type Body = HlBlockBody; fn new(header: Self::Header, body: Self::Body) -> Self { diff --git a/src/node/primitives/body.rs b/src/node/primitives/body.rs index f9abb291c..cdf7e196c 100644 --- a/src/node/primitives/body.rs +++ b/src/node/primitives/body.rs @@ -1,4 +1,4 @@ -use alloy_consensus::{BlobTransactionSidecar, Header}; +use alloy_consensus::BlobTransactionSidecar; use alloy_primitives::Address; use reth_primitives_traits::{BlockBody as BlockBodyTrait, InMemorySize}; use serde::{Deserialize, Serialize}; @@ -43,7 +43,7 @@ impl InMemorySize for HlBlockBody { impl BlockBodyTrait for HlBlockBody { type Transaction = TransactionSigned; - type OmmerHeader = Header; + type OmmerHeader = super::HlHeader; fn transactions(&self) -> &[Self::Transaction] { BlockBodyTrait::transactions(&self.inner) diff --git a/src/node/primitives/header.rs b/src/node/primitives/header.rs index f6fa1794d..b0c356ae3 100644 --- a/src/node/primitives/header.rs +++ b/src/node/primitives/header.rs @@ -1,8 +1,12 @@ use alloy_consensus::Header; use alloy_primitives::{Address, B64, B256, BlockNumber, Bloom, Bytes, Sealable, U256}; use alloy_rlp::{RlpDecodable, RlpEncodable}; +use reth_cli_commands::common::CliHeader; use reth_codecs::Compact; +use reth_ethereum_primitives::EthereumReceipt; +use reth_primitives::{SealedHeader, logs_bloom}; use reth_primitives_traits::{BlockHeader, InMemorySize, serde_bincode_compat::RlpBincode}; +use reth_rpc_convert::transaction::FromConsensusHeader; use serde::{Deserialize, Serialize}; use crate::node::types::HlExtras; @@ -36,6 +40,18 @@ pub struct HlHeader { pub system_tx_count: u64, pub read_precompile_calls: HlExtras, } +impl HlHeader { + pub(crate) fn from_ethereum_header(header: Header, receipts: &[EthereumReceipt]) -> HlHeader { + let logs_bloom = logs_bloom(receipts.iter().flat_map(|r| &r.logs)); + let system_tx_count = receipts.iter().filter(|r| r.cumulative_gas_used == 0).count() as u64; + HlHeader { + inner: header, + logs_bloom_with_system_txs: logs_bloom, + system_tx_count, + read_precompile_calls: Default::default(), + } + } +} impl From
for HlHeader { fn from(_value: Header) -> Self { @@ -185,3 +201,28 @@ impl reth_db_api::table::Decompress for HlHeader { impl BlockHeader for HlHeader {} impl RlpBincode for HlHeader {} + +impl CliHeader for HlHeader { + fn set_number(&mut self, number: u64) { + self.inner.set_number(number); + } +} + +impl From for Header { + fn from(value: HlHeader) -> Self { + value.inner + } +} + +pub fn to_ethereum_ommers(ommers: &[HlHeader]) -> Vec
{ + ommers.iter().map(|ommer| ommer.clone().into()).collect() +} + +impl FromConsensusHeader for alloy_rpc_types::Header { + fn from_consensus_header(header: SealedHeader, block_size: usize) -> Self { + FromConsensusHeader::
::from_consensus_header( + SealedHeader::
::new(header.inner.clone(), header.hash()), + block_size, + ) + } +} diff --git a/src/node/primitives/mod.rs b/src/node/primitives/mod.rs index 2d49b8343..c4622e617 100644 --- a/src/node/primitives/mod.rs +++ b/src/node/primitives/mod.rs @@ -1,4 +1,3 @@ -use alloy_consensus::Header; use reth_ethereum_primitives::Receipt; use reth_primitives::NodePrimitives; @@ -10,6 +9,7 @@ pub use block::HlBlock; pub mod body; pub use body::HlBlockBody; pub mod header; +pub use header::HlHeader; pub mod rlp; pub mod serde_bincode_compat; @@ -21,7 +21,7 @@ pub struct HlPrimitives; impl NodePrimitives for HlPrimitives { type Block = HlBlock; - type BlockHeader = Header; + type BlockHeader = HlHeader; type BlockBody = HlBlockBody; type SignedTx = TransactionSigned; type Receipt = Receipt; diff --git a/src/node/primitives/rlp.rs b/src/node/primitives/rlp.rs index 1af433eed..fb9c9975a 100644 --- a/src/node/primitives/rlp.rs +++ b/src/node/primitives/rlp.rs @@ -1,7 +1,7 @@ #![allow(clippy::owned_cow)] use super::{HlBlock, HlBlockBody, TransactionSigned}; -use crate::node::types::ReadPrecompileCalls; -use alloy_consensus::{BlobTransactionSidecar, BlockBody, Header}; +use crate::{node::types::ReadPrecompileCalls, HlHeader}; +use alloy_consensus::{BlobTransactionSidecar, BlockBody}; use alloy_eips::eip4895::Withdrawals; use alloy_primitives::Address; use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable}; @@ -11,7 +11,7 @@ use std::borrow::Cow; #[rlp(trailing)] struct BlockBodyHelper<'a> { transactions: Cow<'a, Vec>, - ommers: Cow<'a, Vec
>, + ommers: Cow<'a, Vec>, withdrawals: Option>, sidecars: Option>>, read_precompile_calls: Option>, @@ -21,9 +21,9 @@ struct BlockBodyHelper<'a> { #[derive(RlpEncodable, RlpDecodable)] #[rlp(trailing)] pub(crate) struct BlockHelper<'a> { - pub(crate) header: Cow<'a, Header>, + pub(crate) header: Cow<'a, HlHeader>, pub(crate) transactions: Cow<'a, Vec>, - pub(crate) ommers: Cow<'a, Vec
>, + pub(crate) ommers: Cow<'a, Vec>, pub(crate) withdrawals: Option>, pub(crate) sidecars: Option>>, pub(crate) read_precompile_calls: Option>, @@ -95,7 +95,7 @@ impl Decodable for HlBlockBody { Ok(Self { inner: BlockBody { transactions: transactions.into_owned(), - ommers: ommers.into_owned(), + ommers: ommers.into_owned().into_iter().map(Into::into).collect(), withdrawals: withdrawals.map(|w| w.into_owned()), }, sidecars: sidecars.map(|s| s.into_owned()), diff --git a/src/node/primitives/serde_bincode_compat.rs b/src/node/primitives/serde_bincode_compat.rs index af876d003..958ede8a9 100644 --- a/src/node/primitives/serde_bincode_compat.rs +++ b/src/node/primitives/serde_bincode_compat.rs @@ -1,12 +1,12 @@ #![allow(clippy::owned_cow)] -use alloy_consensus::{BlobTransactionSidecar, Header}; +use alloy_consensus::BlobTransactionSidecar; use alloy_primitives::Address; use reth_primitives_traits::serde_bincode_compat::{BincodeReprFor, SerdeBincodeCompat}; use serde::{Deserialize, Serialize}; use std::borrow::Cow; use super::{HlBlock, HlBlockBody}; -use crate::node::{primitives::BlockBody, types::ReadPrecompileCalls}; +use crate::{node::{primitives::BlockBody, types::ReadPrecompileCalls}, HlHeader}; #[derive(Debug, Serialize, Deserialize)] pub struct HlBlockBodyBincode<'a> { @@ -18,7 +18,7 @@ pub struct HlBlockBodyBincode<'a> { #[derive(Debug, Serialize, Deserialize)] pub struct HlBlockBincode<'a> { - header: BincodeReprFor<'a, Header>, + header: BincodeReprFor<'a, HlHeader>, body: BincodeReprFor<'a, HlBlockBody>, } @@ -59,6 +59,6 @@ impl SerdeBincodeCompat for HlBlock { fn from_repr(repr: Self::BincodeRepr<'_>) -> Self { let HlBlockBincode { header, body } = repr; - Self { header: Header::from_repr(header), body: HlBlockBody::from_repr(body) } + Self { header: HlHeader::from_repr(header), body: HlBlockBody::from_repr(body) } } } diff --git a/src/node/primitives/transaction.rs b/src/node/primitives/transaction.rs index 872439901..4e4f1bcb6 100644 --- a/src/node/primitives/transaction.rs +++ b/src/node/primitives/transaction.rs @@ -2,7 +2,7 @@ //! except that it supports pseudo signer for system transactions. use std::convert::Infallible; -use crate::evm::transaction::HlTxEnv; +use crate::{evm::transaction::HlTxEnv, HlHeader}; use alloy_consensus::{ SignableTransaction, Signed, Transaction as TransactionTrait, TransactionEnvelope, TxEip1559, TxEip2930, TxEip4844, TxEip7702, TxLegacy, TxType, TypedTransaction, crypto::RecoveryError, @@ -181,7 +181,7 @@ impl SerdeBincodeCompat for TransactionSigned { } } -pub type BlockBody = alloy_consensus::BlockBody; +pub type BlockBody = alloy_consensus::BlockBody; impl TryFrom for PooledTransactionVariant { type Error = >::Error; @@ -211,15 +211,15 @@ impl Decompress for TransactionSigned { } } -pub fn convert_to_eth_block_body(value: BlockBody) -> alloy_consensus::BlockBody { +pub fn convert_to_eth_block_body(value: BlockBody) -> alloy_consensus::BlockBody { alloy_consensus::BlockBody { transactions: value.transactions.into_iter().map(|tx| tx.into_inner()).collect(), - ommers: value.ommers, + ommers: value.ommers.into_iter().map(|ommer| ommer.into()).collect(), withdrawals: value.withdrawals, } } -pub fn convert_to_hl_block_body(value: alloy_consensus::BlockBody) -> BlockBody { +pub fn convert_to_hl_block_body(value: alloy_consensus::BlockBody) -> BlockBody { BlockBody { transactions: value.transactions.into_iter().map(TransactionSigned::Default).collect(), ommers: value.ommers, diff --git a/src/node/storage/mod.rs b/src/node/storage/mod.rs index 8ee49ba27..b492bff1b 100644 --- a/src/node/storage/mod.rs +++ b/src/node/storage/mod.rs @@ -1,5 +1,5 @@ use crate::{ - HlBlock, HlBlockBody, HlPrimitives, + HlBlock, HlBlockBody, HlHeader, HlPrimitives, node::{ primitives::transaction::{convert_to_eth_block_body, convert_to_hl_block_body}, types::HlExtras, @@ -13,6 +13,8 @@ use reth_db::{ cursor::{DbCursorRO, DbCursorRW}, transaction::{DbTx, DbTxMut}, }; +use reth_primitives::TransactionSigned; +use reth_primitives_traits::Block; use reth_provider::{ BlockBodyReader, BlockBodyWriter, ChainSpecProvider, ChainStorageReader, ChainStorageWriter, DBProvider, DatabaseProvider, EthStorage, ProviderResult, ReadBodyInput, StorageLocation, @@ -23,7 +25,7 @@ pub mod tables; #[derive(Debug, Clone, Default)] #[non_exhaustive] -pub struct HlStorage(EthStorage); +pub struct HlStorage(EthStorage); impl HlStorage { fn write_precompile_calls( @@ -146,15 +148,15 @@ where inputs: Vec>, ) -> ProviderResult> { let read_precompile_calls = self.read_precompile_calls(provider, &inputs)?; - let eth_bodies = self.0.read_block_bodies( - provider, - inputs - .into_iter() - .map(|(header, transactions)| { - (header, transactions.into_iter().map(|tx| tx.into_inner()).collect()) - }) - .collect(), - )?; + let inputs: Vec<(&HlHeader, _)> = inputs + .into_iter() + .map(|(header, transactions)| { + (header, transactions.into_iter().map(|tx| tx.into_inner()).collect()) + }) + .collect(); + let inputs: Vec<(&::Header, _)> = inputs; + let eth_bodies = self.0.read_block_bodies(provider, inputs)?; + let eth_bodies: Vec> = eth_bodies; // NOTE: sidecars are not used in HyperEVM yet. Ok(eth_bodies diff --git a/src/node/types/mod.rs b/src/node/types/mod.rs index 9029ee57e..bdfcf572c 100644 --- a/src/node/types/mod.rs +++ b/src/node/types/mod.rs @@ -2,9 +2,11 @@ //! //! Changes: //! - ReadPrecompileCalls supports RLP encoding / decoding +use alloy_consensus::TxType; use alloy_primitives::{Address, B256, Bytes, Log}; use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable}; use bytes::BufMut; +use reth_ethereum_primitives::EthereumReceipt; use reth_primitives_traits::InMemorySize; use serde::{Deserialize, Serialize}; @@ -67,6 +69,7 @@ impl BlockAndReceipts { self.read_precompile_calls.clone(), self.highest_precompile_address, self.system_txs.clone(), + self.receipts.clone(), chain_id, ) } @@ -95,6 +98,23 @@ pub struct LegacyReceipt { logs: Vec, } +impl From for EthereumReceipt { + fn from(r: LegacyReceipt) -> Self { + EthereumReceipt { + tx_type: match r.tx_type { + LegacyTxType::Legacy => TxType::Legacy, + LegacyTxType::Eip2930 => TxType::Eip2930, + LegacyTxType::Eip1559 => TxType::Eip1559, + LegacyTxType::Eip4844 => TxType::Eip4844, + LegacyTxType::Eip7702 => TxType::Eip7702, + }, + success: r.success, + cumulative_gas_used: r.cumulative_gas_used, + logs: r.logs, + } + } +} + #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] enum LegacyTxType { Legacy = 0, diff --git a/src/node/types/reth_compat.rs b/src/node/types/reth_compat.rs index aea0422bd..7978767ef 100644 --- a/src/node/types/reth_compat.rs +++ b/src/node/types/reth_compat.rs @@ -10,11 +10,11 @@ use std::{ use tracing::info; use crate::{ - HlBlock, HlBlockBody, + HlBlock, HlBlockBody, HlHeader, node::{ primitives::TransactionSigned as TxSigned, spot_meta::{SpotId, erc20_contract_to_spot_token}, - types::{ReadPrecompileCalls, SystemTx}, + types::{LegacyReceipt, ReadPrecompileCalls, SystemTx}, }, }; @@ -114,6 +114,7 @@ impl SealedBlock { read_precompile_calls: ReadPrecompileCalls, highest_precompile_address: Option
, system_txs: Vec, + receipts: Vec, chain_id: u64, ) -> HlBlock { let mut merged_txs = vec![]; @@ -123,13 +124,19 @@ impl SealedBlock { inner: reth_primitives::BlockBody { transactions: merged_txs, withdrawals: self.body.withdrawals.clone(), - ommers: self.body.ommers.clone(), + ommers: vec![], }, sidecars: None, read_precompile_calls: Some(read_precompile_calls), highest_precompile_address, }; - HlBlock { header: self.header.header.clone(), body: block_body } + HlBlock { + header: HlHeader::from_ethereum_header( + self.header.header.clone(), + &receipts.into_iter().map(From::from).collect::>(), + ), + body: block_body, + } } } From bcdf4d933dcb602b656a2f0ebc44c90cd88820a5 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Mon, 6 Oct 2025 06:20:47 +0000 Subject: [PATCH 4/9] feat(breaking): Use HlHeader for HlPrimitives --- src/addons/hl_node_compliance.rs | 6 ++-- src/chainspec/mod.rs | 12 +++----- src/evm/api/patch.rs | 26 +--------------- src/node/consensus/reth_copy.rs | 10 +++---- src/node/evm/config.rs | 12 ++++++-- src/node/primitives/header.rs | 51 ++++++++++++++++++++------------ src/node/types/reth_compat.rs | 9 +++++- 7 files changed, 62 insertions(+), 64 deletions(-) diff --git a/src/addons/hl_node_compliance.rs b/src/addons/hl_node_compliance.rs index 0331926bd..60deeb6f8 100644 --- a/src/addons/hl_node_compliance.rs +++ b/src/addons/hl_node_compliance.rs @@ -23,7 +23,7 @@ use jsonrpsee::{PendingSubscriptionSink, SubscriptionMessage, SubscriptionSink, use jsonrpsee_core::{RpcResult, async_trait}; use jsonrpsee_types::{ErrorObject, error::INTERNAL_ERROR_CODE}; use reth::{api::FullNodeComponents, builder::rpc::RpcContext, tasks::TaskSpawner}; -use reth_primitives_traits::{BlockBody as _, SignedTransaction}; +use reth_primitives_traits::SignedTransaction; use reth_provider::{BlockIdReader, BlockReader, BlockReaderIdExt, ReceiptProvider}; use reth_rpc::{EthFilter, EthPubSub, RpcTypes, eth::pubsub::SubscriptionSerializeError}; use reth_rpc_eth_api::{ @@ -579,9 +579,9 @@ async fn adjust_transaction_receipt( // This function assumes that `block_id` is already validated by the caller. fn system_tx_count_for_block(eth_api: &Eth, block_id: BlockId) -> usize { let provider = eth_api.provider(); - let block = provider.block_by_id(block_id).unwrap().unwrap(); + let header = provider.header_by_id(block_id).unwrap().unwrap(); - block.body.transactions().iter().filter(|tx| tx.is_system_transaction()).count() + header.extras.system_tx_count.try_into().unwrap() } #[async_trait] diff --git a/src/chainspec/mod.rs b/src/chainspec/mod.rs index 14c3a1d61..19ae4bdc0 100644 --- a/src/chainspec/mod.rs +++ b/src/chainspec/mod.rs @@ -1,7 +1,7 @@ pub mod hl; pub mod parser; -use crate::{hardforks::HlHardforks, node::primitives::HlHeader}; +use crate::{hardforks::HlHardforks, node::primitives::{header::HlHeaderExtras, HlHeader}}; use alloy_eips::eip7840::BlobParams; use alloy_genesis::Genesis; use alloy_primitives::{Address, B256, U256}; @@ -127,14 +127,10 @@ impl HlChainSpec { _ => unreachable!("Unreachable since ChainSpecParser won't return other chains"), } } - + fn new(inner: ChainSpec) -> Self { - let genesis_header = HlHeader { - inner: inner.genesis_header().clone(), - logs_bloom_with_system_txs: Default::default(), - system_tx_count: 0, - read_precompile_calls: Default::default(), - }; + let genesis_header = + HlHeader { inner: inner.genesis_header().clone(), extras: HlHeaderExtras::default() }; Self { inner, genesis_header } } } diff --git a/src/evm/api/patch.rs b/src/evm/api/patch.rs index 62c85ac48..f333d845d 100644 --- a/src/evm/api/patch.rs +++ b/src/evm/api/patch.rs @@ -7,36 +7,12 @@ use alloy_primitives::keccak256; use revm::{ context::Host, interpreter::{ - InstructionContext, InterpreterTypes, as_u64_saturated, interpreter_types::StackTr, + _count, InstructionContext, InterpreterTypes, as_u64_saturated, interpreter_types::StackTr, popn_top, }, primitives::{BLOCK_HASH_HISTORY, U256}, }; -#[doc(hidden)] -#[macro_export] -#[collapse_debuginfo(yes)] -macro_rules! _count { - (@count) => { 0 }; - (@count $head:tt $($tail:tt)*) => { 1 + _count!(@count $($tail)*) }; - ($($arg:tt)*) => { _count!(@count $($arg)*) }; -} - -/// Pops n values from the stack and returns the top value. Fails the instruction if n values can't -/// be popped. -#[macro_export] -#[collapse_debuginfo(yes)] -macro_rules! popn_top { - ([ $($x:ident),* ], $top:ident, $interpreter:expr $(,$ret:expr)? ) => { - // Workaround for https://github.com/rust-lang/rust/issues/144329. - if $interpreter.stack.len() < (1 + $crate::_count!($($x)*)) { - $interpreter.halt_underflow(); - return $($ret)?; - } - let ([$( $x ),*], $top) = unsafe { $interpreter.stack.popn_top().unwrap_unchecked() }; - }; -} - /// Implements the BLOCKHASH instruction. /// /// Gets the hash of one of the 256 most recent complete blocks. diff --git a/src/node/consensus/reth_copy.rs b/src/node/consensus/reth_copy.rs index f4934dfed..1adf4c8dd 100644 --- a/src/node/consensus/reth_copy.rs +++ b/src/node/consensus/reth_copy.rs @@ -1,21 +1,21 @@ //! Copy of reth codebase. +use crate::HlBlock; use alloy_consensus::{BlockHeader, TxReceipt, proofs::calculate_receipt_root}; use alloy_eips::eip7685::Requests; use alloy_primitives::{B256, Bloom}; use reth::consensus::ConsensusError; use reth_chainspec::EthereumHardforks; use reth_primitives::{GotExpected, RecoveredBlock, gas_spent_by_transactions}; -use reth_primitives_traits::{Block, Receipt as ReceiptTrait}; +use reth_primitives_traits::Receipt as ReceiptTrait; -pub fn validate_block_post_execution( - block: &RecoveredBlock, +pub fn validate_block_post_execution( + block: &RecoveredBlock, chain_spec: &ChainSpec, receipts: &[R], requests: &Requests, ) -> Result<(), ConsensusError> where - B: Block, R: ReceiptTrait, ChainSpec: EthereumHardforks, { @@ -42,7 +42,7 @@ where receipts.iter().filter(|&r| r.cumulative_gas_used() != 0).cloned().collect::>(); if let Err(error) = verify_receipts( block.header().receipts_root(), - block.header().logs_bloom(), + block.header().inner.logs_bloom(), &receipts_for_root, ) { tracing::debug!(%error, ?receipts, "receipts verification failed"); diff --git a/src/node/evm/config.rs b/src/node/evm/config.rs index c5e406b38..dcf226ec8 100644 --- a/src/node/evm/config.rs +++ b/src/node/evm/config.rs @@ -1,11 +1,15 @@ use super::{executor::HlBlockExecutor, factory::HlEvmFactory}; use crate::{ - chainspec::HlChainSpec, evm::{spec::HlSpecId, transaction::HlTxEnv}, hardforks::HlHardforks, node::{ + HlBlock, HlBlockBody, HlHeader, HlPrimitives, + chainspec::HlChainSpec, + evm::{spec::HlSpecId, transaction::HlTxEnv}, + hardforks::HlHardforks, + node::{ evm::{executor::is_system_transaction, receipt_builder::RethReceiptBuilder}, primitives::{BlockBody, TransactionSigned}, rpc::engine_api::validator::HlExecutionData, types::HlExtras, - }, HlBlock, HlBlockBody, HlHeader, HlPrimitives + }, }; use alloy_consensus::{BlockHeader, EMPTY_OMMER_ROOT_HASH, Header, Transaction as _, TxReceipt}; use alloy_eips::{Encodable2718, merge::BEACON_NONCE}; @@ -132,7 +136,9 @@ where excess_blob_gas, requests_hash, }; - let header = HlHeader::from_ethereum_header(header, receipts); + let system_tx_count = + transactions.iter().filter(|t| is_system_transaction(t)).count() as u64; + let header = HlHeader::from_ethereum_header(header, receipts, system_tx_count); Ok(Self::Block { header, diff --git a/src/node/primitives/header.rs b/src/node/primitives/header.rs index b0c356ae3..3734ba2e5 100644 --- a/src/node/primitives/header.rs +++ b/src/node/primitives/header.rs @@ -9,8 +9,6 @@ use reth_primitives_traits::{BlockHeader, InMemorySize, serde_bincode_compat::Rl use reth_rpc_convert::transaction::FromConsensusHeader; use serde::{Deserialize, Serialize}; -use crate::node::types::HlExtras; - /// The header type of this node /// /// This type extends the regular ethereum header with an extension. @@ -33,22 +31,25 @@ pub struct HlHeader { /// The regular eth header #[as_ref] #[deref] - #[serde(flatten)] pub inner: Header, /// The extended header fields that is not part of the block hash + pub extras: HlHeaderExtras, +} + +#[derive( + Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, RlpEncodable, RlpDecodable, Hash, +)] +pub struct HlHeaderExtras { pub logs_bloom_with_system_txs: Bloom, pub system_tx_count: u64, - pub read_precompile_calls: HlExtras, } + impl HlHeader { - pub(crate) fn from_ethereum_header(header: Header, receipts: &[EthereumReceipt]) -> HlHeader { + pub(crate) fn from_ethereum_header(header: Header, receipts: &[EthereumReceipt], system_tx_count: u64) -> HlHeader { let logs_bloom = logs_bloom(receipts.iter().flat_map(|r| &r.logs)); - let system_tx_count = receipts.iter().filter(|r| r.cumulative_gas_used == 0).count() as u64; HlHeader { inner: header, - logs_bloom_with_system_txs: logs_bloom, - system_tx_count, - read_precompile_calls: Default::default(), + extras: HlHeaderExtras { logs_bloom_with_system_txs: logs_bloom, system_tx_count }, } } } @@ -101,7 +102,7 @@ impl alloy_consensus::BlockHeader for HlHeader { } fn logs_bloom(&self) -> Bloom { - self.inner.logs_bloom() + self.extras.logs_bloom_with_system_txs } fn difficulty(&self) -> U256 { @@ -155,14 +156,21 @@ impl alloy_consensus::BlockHeader for HlHeader { fn extra_data(&self) -> &Bytes { self.inner.extra_data() } + + fn is_empty(&self) -> bool { + self.extras.system_tx_count == 0 && self.inner.is_empty() + } } impl InMemorySize for HlHeader { fn size(&self) -> usize { - self.inner.size() - + self.logs_bloom_with_system_txs.data().len() - + self.system_tx_count.size() - + self.read_precompile_calls.size() + self.inner.size() + self.extras.size() + } +} + +impl InMemorySize for HlHeaderExtras { + fn size(&self) -> usize { + self.logs_bloom_with_system_txs.data().len() + self.system_tx_count.size() } } @@ -171,15 +179,20 @@ impl reth_codecs::Compact for HlHeader { where B: alloy_rlp::bytes::BufMut + AsMut<[u8]>, { - // It's too tedious to implement to_compact for every field, so use rmp_serde to serialize - // This also helps the struct to be upgradable in future thanks to serde's flexibility. + // Because Header ends with extra_data which is `Bytes`, we can't use to_compact for extras, + // because Compact trait requires the Bytes field to be placed at the end of the struct. + // Bytes::from_compact just reads all trailing data as the Bytes field. + // + // Hence we need to use other form of serialization, since extra headers are not Compact-compatible. + // We just treat all header fields as rmp-serialized one `Bytes` field. let result: Bytes = rmp_serde::to_vec(&self).unwrap().into(); result.to_compact(buf) } - fn from_compact(buf: &[u8], identifier: usize) -> (Self, &[u8]) { - let header: HlHeader = rmp_serde::from_slice(&buf[identifier..]).unwrap(); - (header, &buf[identifier + buf.len()..]) + fn from_compact(buf: &[u8], len: usize) -> (Self, &[u8]) { + let (bytes, remaining) = Bytes::from_compact(buf, len); + let header: HlHeader = rmp_serde::from_slice(&bytes).unwrap(); + (header, remaining) } } diff --git a/src/node/types/reth_compat.rs b/src/node/types/reth_compat.rs index 7978767ef..11e93a89e 100644 --- a/src/node/types/reth_compat.rs +++ b/src/node/types/reth_compat.rs @@ -120,6 +120,11 @@ impl SealedBlock { let mut merged_txs = vec![]; merged_txs.extend(system_txs.iter().map(|tx| system_tx_to_reth_transaction(tx, chain_id))); merged_txs.extend(self.body.transactions.iter().map(|tx| tx.to_reth_transaction())); + + let mut merged_receipts = vec![]; + merged_receipts.extend(system_txs.iter().map(|tx| tx.receipt.clone().unwrap().into())); + merged_receipts.extend(receipts.into_iter().map(From::from)); + let block_body = HlBlockBody { inner: reth_primitives::BlockBody { transactions: merged_txs, @@ -131,10 +136,12 @@ impl SealedBlock { highest_precompile_address, }; + let system_tx_count = system_txs.len() as u64; HlBlock { header: HlHeader::from_ethereum_header( self.header.header.clone(), - &receipts.into_iter().map(From::from).collect::>(), + &merged_receipts, + system_tx_count, ), body: block_body, } From 9f73b1ede0d9d5117f30872ca2942906424fbf78 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Mon, 6 Oct 2025 06:43:17 +0000 Subject: [PATCH 5/9] refactor: Move BlockBody from transaction to body --- src/node/primitives/body.rs | 16 ++++++++++------ src/node/primitives/mod.rs | 4 ++-- src/node/primitives/transaction.rs | 4 +--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/node/primitives/body.rs b/src/node/primitives/body.rs index cdf7e196c..abe696282 100644 --- a/src/node/primitives/body.rs +++ b/src/node/primitives/body.rs @@ -3,8 +3,8 @@ use alloy_primitives::Address; use reth_primitives_traits::{BlockBody as BlockBodyTrait, InMemorySize}; use serde::{Deserialize, Serialize}; -use crate::node::primitives::{BlockBody, TransactionSigned}; -pub use crate::node::types::{ReadPrecompileCall, ReadPrecompileCalls}; +use crate::node::types::{ReadPrecompileCall, ReadPrecompileCalls}; +use crate::{HlHeader, node::primitives::TransactionSigned}; /// Block body for HL. It is equivalent to Ethereum [`BlockBody`] but additionally stores sidecars /// for blob transactions. @@ -29,13 +29,17 @@ pub struct HlBlockBody { pub highest_precompile_address: Option
, } +pub type BlockBody = alloy_consensus::BlockBody; + impl InMemorySize for HlBlockBody { fn size(&self) -> usize { - self.inner.size() + - self.sidecars + self.inner.size() + + self + .sidecars .as_ref() - .map_or(0, |s| s.capacity() * core::mem::size_of::()) + - self.read_precompile_calls + .map_or(0, |s| s.capacity() * core::mem::size_of::()) + + self + .read_precompile_calls .as_ref() .map_or(0, |s| s.0.capacity() * core::mem::size_of::()) } diff --git a/src/node/primitives/mod.rs b/src/node/primitives/mod.rs index c4622e617..0ad32b7c7 100644 --- a/src/node/primitives/mod.rs +++ b/src/node/primitives/mod.rs @@ -2,12 +2,12 @@ use reth_ethereum_primitives::Receipt; use reth_primitives::NodePrimitives; pub mod transaction; -pub use transaction::{BlockBody, TransactionSigned}; +pub use transaction::TransactionSigned; pub mod block; pub use block::HlBlock; pub mod body; -pub use body::HlBlockBody; +pub use body::{BlockBody, HlBlockBody}; pub mod header; pub use header::HlHeader; diff --git a/src/node/primitives/transaction.rs b/src/node/primitives/transaction.rs index 4e4f1bcb6..30bf1ffc8 100644 --- a/src/node/primitives/transaction.rs +++ b/src/node/primitives/transaction.rs @@ -2,7 +2,7 @@ //! except that it supports pseudo signer for system transactions. use std::convert::Infallible; -use crate::{evm::transaction::HlTxEnv, HlHeader}; +use crate::evm::transaction::HlTxEnv; use alloy_consensus::{ SignableTransaction, Signed, Transaction as TransactionTrait, TransactionEnvelope, TxEip1559, TxEip2930, TxEip4844, TxEip7702, TxLegacy, TxType, TypedTransaction, crypto::RecoveryError, @@ -181,8 +181,6 @@ impl SerdeBincodeCompat for TransactionSigned { } } -pub type BlockBody = alloy_consensus::BlockBody; - impl TryFrom for PooledTransactionVariant { type Error = >::Error; From 47aaad6ed91a71d4d14f5d0c7365a0b1777e7cfd Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:55:51 +0000 Subject: [PATCH 6/9] feat: add migrator --- src/node/cli.rs | 18 +- src/node/migrate.rs | 317 +++++++++++++++++++++++++++++ src/node/mod.rs | 1 + src/node/primitives/rlp.rs | 2 +- src/node/primitives/transaction.rs | 16 -- src/node/storage/mod.rs | 41 +--- src/node/types/mod.rs | 9 +- 7 files changed, 347 insertions(+), 57 deletions(-) create mode 100644 src/node/migrate.rs diff --git a/src/node/cli.rs b/src/node/cli.rs index fec922ef1..71072a222 100644 --- a/src/node/cli.rs +++ b/src/node/cli.rs @@ -1,12 +1,15 @@ use crate::{ chainspec::{HlChainSpec, parser::HlChainSpecParser}, - node::{HlNode, consensus::HlConsensus, evm::config::HlEvmConfig, storage::tables::Tables}, + node::{ + HlNode, consensus::HlConsensus, evm::config::HlEvmConfig, migrate::Migrator, + storage::tables::Tables, + }, pseudo_peer::BlockSourceArgs, }; use clap::{Args, Parser}; use reth::{ CliRunner, - args::LogArgs, + args::{DatabaseArgs, DatadirArgs, LogArgs}, builder::{NodeBuilder, WithLaunchContext}, cli::Commands, prometheus_exporter::install_prometheus_recorder, @@ -142,6 +145,8 @@ where match self.command { Commands::Node(command) => runner.run_command_until_exit(|ctx| { + Self::migrate_db(&command.chain, &command.datadir, &command.db) + .expect("Failed to migrate database"); command.execute(ctx, FnLauncher::new::(launcher)) }), Commands::Init(command) => { @@ -188,4 +193,13 @@ where init_db_for::<_, Tables>(db_path, env.db.database_args())?; Ok(()) } + + fn migrate_db( + chain: &HlChainSpec, + datadir: &DatadirArgs, + db: &DatabaseArgs, + ) -> eyre::Result<()> { + Migrator::::new(chain.clone(), datadir.clone(), *db)?.migrate_db()?; + Ok(()) + } } diff --git a/src/node/migrate.rs b/src/node/migrate.rs new file mode 100644 index 000000000..ca96fbf80 --- /dev/null +++ b/src/node/migrate.rs @@ -0,0 +1,317 @@ +use alloy_consensus::Header; +use alloy_primitives::{b256, hex::ToHexExt, BlockHash, B256, U256}; +use reth::{ + api::{NodeTypes, NodeTypesWithDBAdapter}, + args::{DatabaseArgs, DatadirArgs}, + dirs::{ChainPath, DataDirPath}, +}; +use reth_chainspec::EthChainSpec; +use reth_db::{ + mdbx::{tx::Tx, RO}, + models::CompactU256, + static_file::iter_static_files, + table::Decompress, + DatabaseEnv, +}; +use reth_errors::ProviderResult; +use reth_provider::{ + providers::{NodeTypesForProvider, StaticFileProvider}, + static_file::SegmentRangeInclusive, + DatabaseProvider, ProviderFactory, ReceiptProvider, StaticFileProviderFactory, + StaticFileSegment, StaticFileWriter, +}; +use std::{marker::PhantomData, ops::RangeInclusive, path::PathBuf, sync::Arc}; +use tracing::{info, warn}; + +use crate::{chainspec::HlChainSpec, HlHeader, HlPrimitives}; + +pub(super) struct Migrator { + data_dir: ChainPath, + provider_factory: ProviderFactory>>, + _nt: PhantomData, +} + +impl Migrator +where + N: NodeTypes, +{ + const MIGRATION_PATH_SUFFIX: &'static str = "migration-tmp"; + + pub fn new( + chain_spec: HlChainSpec, + datadir: DatadirArgs, + database_args: DatabaseArgs, + ) -> eyre::Result { + let data_dir = datadir.clone().resolve_datadir(chain_spec.chain()); + let provider_factory = Self::provider_factory(chain_spec, datadir, database_args)?; + Ok(Self { data_dir, provider_factory, _nt: PhantomData }) + } + + pub fn sf_provider(&self) -> StaticFileProvider { + self.provider_factory.static_file_provider() + } + + pub fn migrate_db(&self) -> eyre::Result<()> { + let is_empty = Self::highest_block_number(&self.sf_provider()).is_none(); + + if is_empty { + return Ok(()); + } + + self.migrate_db_inner() + } + + fn highest_block_number(sf_provider: &StaticFileProvider) -> Option { + sf_provider.get_highest_static_file_block(StaticFileSegment::Headers) + } + + fn migrate_db_inner(&self) -> eyre::Result<()> { + self.migrate_static_files()?; + self.migrate_mdbx()?; + info!("Database migrated successfully"); + Ok(()) + } + + fn conversion_tmp_dir(&self) -> PathBuf { + self.data_dir.data_dir().join(Self::MIGRATION_PATH_SUFFIX) + } + + fn iterate_files_for_segment( + &self, + block_range: SegmentRangeInclusive, + dir: &PathBuf, + ) -> eyre::Result> { + let prefix = StaticFileSegment::Headers.filename(&block_range); + + let entries = std::fs::read_dir(dir)? + .map(|res| res.map(|e| e.path())) + .collect::, _>>()?; + + Ok(entries + .into_iter() + .filter_map(|path| { + let file_name = path.file_name().and_then(|f| f.to_str())?; + if file_name.starts_with(&prefix) { + Some((path.clone(), file_name.to_string())) + } else { + None + } + }) + .collect()) + } + + fn create_placeholder(&self, block_range: SegmentRangeInclusive) -> eyre::Result<()> { + // The direction is opposite here + let src = self.data_dir.static_files(); + let dst = self.conversion_tmp_dir(); + + for (src_path, file_name) in self.iterate_files_for_segment(block_range, &src)? { + let dst_path = dst.join(file_name); + if dst_path.exists() { + std::fs::remove_file(&dst_path)?; + } + std::os::unix::fs::symlink(src_path, dst_path)?; + } + + Ok(()) + } + + fn move_static_files_for_segment( + &self, + block_range: SegmentRangeInclusive, + ) -> eyre::Result<()> { + let src = self.conversion_tmp_dir(); + let dst = self.data_dir.static_files(); + + for (src_path, file_name) in self.iterate_files_for_segment(block_range, &src)? { + let dst_path = dst.join(file_name); + std::fs::remove_file(&dst_path)?; + std::fs::rename(&src_path, &dst_path)?; + } + + // Still StaticFileProvider needs the file to exist, so we create a symlink + self.create_placeholder(block_range) + } + + fn migrate_static_files(&self) -> eyre::Result<()> { + let conversion_tmp = self.conversion_tmp_dir(); + let old_path = self.data_dir.static_files(); + + if conversion_tmp.exists() { + std::fs::remove_dir_all(&conversion_tmp)?; + } + std::fs::create_dir_all(&conversion_tmp)?; + + let mut all_static_files = iter_static_files(&old_path)?; + let all_static_files = + all_static_files.remove(&StaticFileSegment::Headers).unwrap_or_default(); + let provider = self.provider_factory.provider()?; + + let mut first = true; + + for (block_range, _tx_ranges) in all_static_files { + let migration_needed = self.using_old_header(block_range.start())? || + self.using_old_header(block_range.end())?; + if !migration_needed { + // Create a placeholder symlink + self.create_placeholder(block_range)?; + continue; + } + + if first { + info!("Old database detected, migrating database..."); + first = false; + } + + let sf_provider = self.sf_provider(); + let sf_tmp_provider = StaticFileProvider::::read_write(&conversion_tmp)?; + let block_range_for_filename = sf_provider.find_fixed_range(block_range.start()); + migrate_single_static_file( + &sf_tmp_provider, + &sf_provider, + &provider, + block_range, + )?; + + self.move_static_files_for_segment(block_range_for_filename)?; + } + + Ok(()) + } + + fn provider_factory( + chain_spec: HlChainSpec, + datadir: DatadirArgs, + database_args: DatabaseArgs, + ) -> eyre::Result>>> { + let data_dir = datadir.clone().resolve_datadir(chain_spec.chain()); + let db_env = reth_db::init_db(data_dir.db(), database_args.database_args())?; + let static_file_provider = StaticFileProvider::read_only(data_dir.static_files(), false)?; + let db = Arc::new(db_env); + Ok(ProviderFactory::new(db, Arc::new(chain_spec), static_file_provider)) + } + + fn migrate_mdbx(&self) -> eyre::Result<()> { + // Actually not much here, all of blocks should be in the static files + Ok(()) + } + + fn using_old_header(&self, number: u64) -> eyre::Result { + let sf_provider = self.sf_provider(); + let content = old_headers_range(&sf_provider, number..=number)?; + + let &[row] = &content.as_slice() else { + warn!("No header found for block {}", number); + return Ok(false); + }; + let header = &row[0]; + + let deserialized_old = is_old_header(header); + let deserialized_new = is_new_header(header); + + assert!( + deserialized_old ^ deserialized_new, + "Header is not valid: {} {}\ndeserialized_old: {}\ndeserialized_new: {}", + number, + header.encode_hex(), + deserialized_old, + deserialized_new + ); + Ok(deserialized_old && !deserialized_new) + } +} + +// Problem is that decompress just panics when the header is not valid +// So we need heuristics... +fn is_old_header(header: &[u8]) -> bool { + const SHA3_UNCLE_OFFSET: usize = 0x24; + const SHA3_UNCLE_HASH: B256 = + b256!("1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"); + const GENESIS_PREFIX: [u8; 4] = [0x01, 0x20, 0x00, 0xf8]; + let Some(sha3_uncle_hash) = header.get(SHA3_UNCLE_OFFSET..SHA3_UNCLE_OFFSET + 32) else { + return false; + }; + if sha3_uncle_hash == SHA3_UNCLE_HASH { + return true; + } + + // genesis block might be different + if header.starts_with(&GENESIS_PREFIX) { + return true; + } + + false +} + +fn is_new_header(header: &[u8]) -> bool { + rmp_serde::from_slice::(header).is_ok() +} + +fn migrate_single_static_file>( + sf_out: &StaticFileProvider, + sf_in: &StaticFileProvider, + provider: &DatabaseProvider, NodeTypesWithDBAdapter>>, + block_range: SegmentRangeInclusive, +) -> Result<(), eyre::Error> { + let block_range: RangeInclusive = block_range.into(); + info!("Migrating block range {:?}...", block_range); + info!("Loading headers"); + let headers = old_headers_range(sf_in, block_range.clone())?; + info!("Loading receipts"); + let receipts = provider.receipts_by_block_range(block_range.clone())?; + assert_eq!(headers.len(), receipts.len()); + let mut writer = sf_out.get_writer(*block_range.start(), StaticFileSegment::Headers)?; + let new_headers = std::iter::zip(headers, receipts) + .map(|(header, receipts)| { + let system_tx_count = receipts.iter().filter(|r| r.cumulative_gas_used == 0).count(); + let eth_header = Header::decompress(&header[0]).unwrap(); + let hl_header = + HlHeader::from_ethereum_header(eth_header, &receipts, system_tx_count as u64); + + let difficulty: U256 = CompactU256::decompress(&header[1]).unwrap().into(); + let hash = BlockHash::decompress(&header[2]).unwrap(); + (hl_header, difficulty, hash) + }) + .collect::>(); + for header in new_headers { + writer.append_header(&header.0, header.1, &header.2)?; + } + writer.commit().unwrap(); + Ok(()) +} + +fn old_headers_range( + provider: &StaticFileProvider, + block_range: impl std::ops::RangeBounds, +) -> ProviderResult>>> { + Ok(provider + .fetch_range_with_predicate( + StaticFileSegment::Headers, + to_range(block_range), + |cursor, number| { + cursor.get(number.into(), 0b111).map(|rows| { + rows.map(|columns| columns.into_iter().map(|column| column.to_vec()).collect()) + }) + }, + |_| true, + )? + .into_iter() + .collect()) +} + +// Copied from reth +fn to_range>(bounds: R) -> std::ops::Range { + let start = match bounds.start_bound() { + std::ops::Bound::Included(&v) => v, + std::ops::Bound::Excluded(&v) => v + 1, + std::ops::Bound::Unbounded => 0, + }; + + let end = match bounds.end_bound() { + std::ops::Bound::Included(&v) => v + 1, + std::ops::Bound::Excluded(&v) => v, + std::ops::Bound::Unbounded => u64::MAX, + }; + + start..end +} diff --git a/src/node/mod.rs b/src/node/mod.rs index 51a1c213e..48761ccb9 100644 --- a/src/node/mod.rs +++ b/src/node/mod.rs @@ -33,6 +33,7 @@ pub mod cli; pub mod consensus; pub mod engine; pub mod evm; +pub mod migrate; pub mod network; pub mod primitives; pub mod rpc; diff --git a/src/node/primitives/rlp.rs b/src/node/primitives/rlp.rs index fb9c9975a..43cdaf640 100644 --- a/src/node/primitives/rlp.rs +++ b/src/node/primitives/rlp.rs @@ -95,7 +95,7 @@ impl Decodable for HlBlockBody { Ok(Self { inner: BlockBody { transactions: transactions.into_owned(), - ommers: ommers.into_owned().into_iter().map(Into::into).collect(), + ommers: ommers.into_owned(), withdrawals: withdrawals.map(|w| w.into_owned()), }, sidecars: sidecars.map(|s| s.into_owned()), diff --git a/src/node/primitives/transaction.rs b/src/node/primitives/transaction.rs index 30bf1ffc8..cb4710281 100644 --- a/src/node/primitives/transaction.rs +++ b/src/node/primitives/transaction.rs @@ -209,22 +209,6 @@ impl Decompress for TransactionSigned { } } -pub fn convert_to_eth_block_body(value: BlockBody) -> alloy_consensus::BlockBody { - alloy_consensus::BlockBody { - transactions: value.transactions.into_iter().map(|tx| tx.into_inner()).collect(), - ommers: value.ommers.into_iter().map(|ommer| ommer.into()).collect(), - withdrawals: value.withdrawals, - } -} - -pub fn convert_to_hl_block_body(value: alloy_consensus::BlockBody) -> BlockBody { - BlockBody { - transactions: value.transactions.into_iter().map(TransactionSigned::Default).collect(), - ommers: value.ommers, - withdrawals: value.withdrawals, - } -} - impl TryIntoSimTx for TransactionRequest { fn try_into_sim_tx(self) -> Result> { let tx = self diff --git a/src/node/storage/mod.rs b/src/node/storage/mod.rs index b492bff1b..d6549cf31 100644 --- a/src/node/storage/mod.rs +++ b/src/node/storage/mod.rs @@ -1,9 +1,6 @@ use crate::{ HlBlock, HlBlockBody, HlHeader, HlPrimitives, - node::{ - primitives::transaction::{convert_to_eth_block_body, convert_to_hl_block_body}, - types::HlExtras, - }, + node::{primitives::TransactionSigned, types::HlExtras}, }; use alloy_consensus::BlockHeader; use alloy_primitives::Bytes; @@ -13,7 +10,6 @@ use reth_db::{ cursor::{DbCursorRO, DbCursorRW}, transaction::{DbTx, DbTxMut}, }; -use reth_primitives::TransactionSigned; use reth_primitives_traits::Block; use reth_provider::{ BlockBodyReader, BlockBodyWriter, ChainSpecProvider, ChainStorageReader, ChainStorageWriter, @@ -91,30 +87,17 @@ where let mut read_precompile_calls = Vec::with_capacity(bodies.len()); for (block_number, body) in bodies { - match body { + let (inner_opt, extras) = match body { Some(HlBlockBody { inner, sidecars: _, - read_precompile_calls: rpc, + read_precompile_calls, highest_precompile_address, - }) => { - eth_bodies.push((block_number, Some(convert_to_eth_block_body(inner)))); - read_precompile_calls.push(( - block_number, - HlExtras { read_precompile_calls: rpc, highest_precompile_address }, - )); - } - None => { - eth_bodies.push((block_number, None)); - read_precompile_calls.push(( - block_number, - HlExtras { - read_precompile_calls: Default::default(), - highest_precompile_address: None, - }, - )); - } - } + }) => (Some(inner), HlExtras { read_precompile_calls, highest_precompile_address }), + None => Default::default(), + }; + eth_bodies.push((block_number, inner_opt)); + read_precompile_calls.push((block_number, extras)); } self.0.write_block_bodies(provider, eth_bodies, write_to)?; @@ -148,12 +131,6 @@ where inputs: Vec>, ) -> ProviderResult> { let read_precompile_calls = self.read_precompile_calls(provider, &inputs)?; - let inputs: Vec<(&HlHeader, _)> = inputs - .into_iter() - .map(|(header, transactions)| { - (header, transactions.into_iter().map(|tx| tx.into_inner()).collect()) - }) - .collect(); let inputs: Vec<(&::Header, _)> = inputs; let eth_bodies = self.0.read_block_bodies(provider, inputs)?; let eth_bodies: Vec> = eth_bodies; @@ -163,7 +140,7 @@ where .into_iter() .zip(read_precompile_calls) .map(|(inner, extra)| HlBlockBody { - inner: convert_to_hl_block_body(inner), + inner, sidecars: None, read_precompile_calls: extra.read_precompile_calls, highest_precompile_address: extra.highest_precompile_address, diff --git a/src/node/types/mod.rs b/src/node/types/mod.rs index bdfcf572c..aaf112b31 100644 --- a/src/node/types/mod.rs +++ b/src/node/types/mod.rs @@ -19,10 +19,7 @@ pub struct ReadPrecompileCalls(pub Vec); pub(crate) mod reth_compat; -#[derive( - Debug, Clone, Serialize, Deserialize, Default, RlpEncodable, RlpDecodable, Eq, PartialEq, Hash, -)] -#[rlp(trailing)] +#[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct HlExtras { pub read_precompile_calls: Option, pub highest_precompile_address: Option
, @@ -30,8 +27,8 @@ pub struct HlExtras { impl InMemorySize for HlExtras { fn size(&self) -> usize { - self.read_precompile_calls.as_ref().map_or(0, |s| s.0.len()) - + self.highest_precompile_address.as_ref().map_or(0, |_| 20) + self.read_precompile_calls.as_ref().map_or(0, |s| s.0.len()) + + self.highest_precompile_address.as_ref().map_or(0, |_| 20) } } From 7e169d409d2dee44d0a93c3b300762443df17f78 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:04:11 +0000 Subject: [PATCH 7/9] chore: Change branch to v1.8.2-fork-hl-header --- Cargo.lock | 218 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 86 ++++++++++----------- 2 files changed, 152 insertions(+), 152 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dbccf15f2..f08024203 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6744,7 +6744,7 @@ checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" [[package]] name = "reth" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-rpc-types", "aquamarine", @@ -6790,7 +6790,7 @@ dependencies = [ [[package]] name = "reth-basic-payload-builder" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6814,7 +6814,7 @@ dependencies = [ [[package]] name = "reth-chain-state" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6845,7 +6845,7 @@ dependencies = [ [[package]] name = "reth-chainspec" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-chains", "alloy-consensus", @@ -6865,7 +6865,7 @@ dependencies = [ [[package]] name = "reth-cli" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-genesis", "clap", @@ -6879,7 +6879,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-chains", "alloy-consensus", @@ -6960,7 +6960,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "reth-tasks", "tokio", @@ -6970,7 +6970,7 @@ dependencies = [ [[package]] name = "reth-cli-util" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -6988,7 +6988,7 @@ dependencies = [ [[package]] name = "reth-codecs" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7008,7 +7008,7 @@ dependencies = [ [[package]] name = "reth-codecs-derive" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "convert_case", "proc-macro2", @@ -7019,7 +7019,7 @@ dependencies = [ [[package]] name = "reth-config" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "eyre", "humantime-serde", @@ -7034,7 +7034,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7047,7 +7047,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7059,7 +7059,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7085,7 +7085,7 @@ dependencies = [ [[package]] name = "reth-db" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "derive_more", @@ -7111,7 +7111,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -7139,7 +7139,7 @@ dependencies = [ [[package]] name = "reth-db-common" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-genesis", @@ -7169,7 +7169,7 @@ dependencies = [ [[package]] name = "reth-db-models" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -7184,7 +7184,7 @@ dependencies = [ [[package]] name = "reth-discv4" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -7210,7 +7210,7 @@ dependencies = [ [[package]] name = "reth-discv5" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -7234,7 +7234,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "data-encoding", @@ -7258,7 +7258,7 @@ dependencies = [ [[package]] name = "reth-downloaders" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7288,7 +7288,7 @@ dependencies = [ [[package]] name = "reth-ecies" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "aes", "alloy-primitives", @@ -7319,7 +7319,7 @@ dependencies = [ [[package]] name = "reth-engine-local" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7341,7 +7341,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7366,7 +7366,7 @@ dependencies = [ [[package]] name = "reth-engine-service" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "futures", "pin-project", @@ -7389,7 +7389,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7438,7 +7438,7 @@ dependencies = [ [[package]] name = "reth-engine-util" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -7466,7 +7466,7 @@ dependencies = [ [[package]] name = "reth-era" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7482,7 +7482,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "bytes", @@ -7497,7 +7497,7 @@ dependencies = [ [[package]] name = "reth-era-utils" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7519,7 +7519,7 @@ dependencies = [ [[package]] name = "reth-errors" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -7530,7 +7530,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-chains", "alloy-primitives", @@ -7559,7 +7559,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-chains", "alloy-consensus", @@ -7583,7 +7583,7 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "clap", "eyre", @@ -7605,7 +7605,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7621,7 +7621,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -7639,7 +7639,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -7653,7 +7653,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7682,7 +7682,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7702,7 +7702,7 @@ dependencies = [ [[package]] name = "reth-etl" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "rayon", "reth-db-api", @@ -7712,7 +7712,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7735,7 +7735,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7756,7 +7756,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-evm", "alloy-primitives", @@ -7769,7 +7769,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7787,7 +7787,7 @@ dependencies = [ [[package]] name = "reth-exex" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7825,7 +7825,7 @@ dependencies = [ [[package]] name = "reth-exex-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -7839,7 +7839,7 @@ dependencies = [ [[package]] name = "reth-fs-util" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "serde", "serde_json", @@ -7849,7 +7849,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -7876,7 +7876,7 @@ dependencies = [ [[package]] name = "reth-ipc" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "bytes", "futures", @@ -7896,7 +7896,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "bitflags 2.9.2", "byteorder", @@ -7912,7 +7912,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "bindgen 0.71.1", "cc", @@ -7921,7 +7921,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "futures", "metrics", @@ -7933,7 +7933,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", ] @@ -7941,7 +7941,7 @@ dependencies = [ [[package]] name = "reth-net-nat" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "futures-util", "if-addrs", @@ -7955,7 +7955,7 @@ dependencies = [ [[package]] name = "reth-network" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8010,7 +8010,7 @@ dependencies = [ [[package]] name = "reth-network-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8035,7 +8035,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8057,7 +8057,7 @@ dependencies = [ [[package]] name = "reth-network-peers" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -8072,7 +8072,7 @@ dependencies = [ [[package]] name = "reth-network-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -8086,7 +8086,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "anyhow", "bincode", @@ -8103,7 +8103,7 @@ dependencies = [ [[package]] name = "reth-node-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -8127,7 +8127,7 @@ dependencies = [ [[package]] name = "reth-node-builder" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8195,7 +8195,7 @@ dependencies = [ [[package]] name = "reth-node-core" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8247,7 +8247,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-network", @@ -8285,7 +8285,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8309,7 +8309,7 @@ dependencies = [ [[package]] name = "reth-node-events" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8333,7 +8333,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "eyre", "http 1.3.1", @@ -8354,7 +8354,7 @@ dependencies = [ [[package]] name = "reth-node-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "reth-chainspec", "reth-db-api", @@ -8366,7 +8366,7 @@ dependencies = [ [[package]] name = "reth-optimism-primitives" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8385,7 +8385,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8406,7 +8406,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "pin-project", "reth-payload-primitives", @@ -8418,7 +8418,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8438,7 +8438,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-rpc-types-engine", @@ -8448,7 +8448,7 @@ dependencies = [ [[package]] name = "reth-primitives" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "c-kzg", @@ -8462,7 +8462,7 @@ dependencies = [ [[package]] name = "reth-primitives-traits" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8495,7 +8495,7 @@ dependencies = [ [[package]] name = "reth-provider" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8540,7 +8540,7 @@ dependencies = [ [[package]] name = "reth-prune" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8568,7 +8568,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "arbitrary", @@ -8582,7 +8582,7 @@ dependencies = [ [[package]] name = "reth-ress-protocol" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8601,7 +8601,7 @@ dependencies = [ [[package]] name = "reth-ress-provider" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -8628,7 +8628,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "reth-primitives-traits", @@ -8641,7 +8641,7 @@ dependencies = [ [[package]] name = "reth-rpc" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -8720,7 +8720,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-genesis", @@ -8748,7 +8748,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-network", "alloy-provider", @@ -8787,7 +8787,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-json-rpc", @@ -8808,7 +8808,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8838,7 +8838,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -8882,7 +8882,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -8929,7 +8929,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-rpc-types-engine", "http 1.3.1", @@ -8943,7 +8943,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -8959,7 +8959,7 @@ dependencies = [ [[package]] name = "reth-stages" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9003,7 +9003,7 @@ dependencies = [ [[package]] name = "reth-stages-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9030,7 +9030,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "arbitrary", @@ -9044,7 +9044,7 @@ dependencies = [ [[package]] name = "reth-static-file" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "parking_lot", @@ -9064,7 +9064,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "clap", @@ -9076,7 +9076,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9099,7 +9099,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-eips", "alloy-primitives", @@ -9115,7 +9115,7 @@ dependencies = [ [[package]] name = "reth-tasks" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "auto_impl", "dyn-clone", @@ -9133,7 +9133,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "tokio", "tokio-stream", @@ -9143,7 +9143,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "clap", "eyre", @@ -9158,7 +9158,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9198,7 +9198,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-eips", @@ -9223,7 +9223,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -9249,7 +9249,7 @@ dependencies = [ [[package]] name = "reth-trie-db" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "reth-db-api", @@ -9262,7 +9262,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9287,7 +9287,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9306,7 +9306,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse-parallel" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9324,7 +9324,7 @@ dependencies = [ [[package]] name = "reth-zstd-compressors" version = "1.8.2" -source = "git+https://github.com/hl-archive-node/reth?rev=83baf84bcb6d88081fc1b39f97733b8ec345cb88#83baf84bcb6d88081fc1b39f97733b8ec345cb88" +source = "git+https://github.com/hl-archive-node/reth?rev=416c2e26756f1c8ee86e6b8e4081f434952b3a1a#416c2e26756f1c8ee86e6b8e4081f434952b3a1a" dependencies = [ "zstd", ] diff --git a/Cargo.toml b/Cargo.toml index e88824a2b..8b2e56969 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,49 +26,49 @@ lto = "fat" codegen-units = 1 [dependencies] -reth = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-cli = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-cli-commands = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-basic-payload-builder = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-db = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-db-api = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-chainspec = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-cli-util = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-discv4 = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-engine-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-ethereum-forks = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-ethereum-payload-builder = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-ethereum-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-eth-wire = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-eth-wire-types = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-evm = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-evm-ethereum = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-node-core = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-revm = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-network = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-network-p2p = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-network-api = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-node-ethereum = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-network-peers = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-payload-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-primitives-traits = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-provider = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88", features = ["test-utils"] } -reth-rpc = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-rpc-eth-api = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-rpc-engine-api = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-tracing = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-trie-common = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-trie-db = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-codecs = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-transaction-pool = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-stages-types = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-storage-api = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-errors = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-rpc-convert = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-rpc-eth-types = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-rpc-server-types = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } -reth-metrics = { git = "https://github.com/hl-archive-node/reth", rev = "83baf84bcb6d88081fc1b39f97733b8ec345cb88" } +reth = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-cli = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-cli-commands = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-basic-payload-builder = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-db = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-db-api = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-chainspec = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-cli-util = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-discv4 = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-engine-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-ethereum-forks = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-ethereum-payload-builder = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-ethereum-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-eth-wire = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-eth-wire-types = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-evm = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-evm-ethereum = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-node-core = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-revm = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-network = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-network-p2p = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-network-api = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-node-ethereum = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-network-peers = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-payload-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-primitives = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-primitives-traits = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-provider = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a", features = ["test-utils"] } +reth-rpc = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-rpc-eth-api = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-rpc-engine-api = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-tracing = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-trie-common = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-trie-db = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-codecs = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-transaction-pool = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-stages-types = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-storage-api = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-errors = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-rpc-convert = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-rpc-eth-types = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-rpc-server-types = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } +reth-metrics = { git = "https://github.com/hl-archive-node/reth", rev = "416c2e26756f1c8ee86e6b8e4081f434952b3a1a" } revm = { version = "29.0.1", default-features = false } # alloy dependencies From 233026871f7fbca693fdcf32a9e7e8f941c34561 Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Wed, 8 Oct 2025 13:54:16 +0000 Subject: [PATCH 8/9] perf: chunkify block ranges --- src/node/migrate.rs | 59 +++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/src/node/migrate.rs b/src/node/migrate.rs index ca96fbf80..7d3634a68 100644 --- a/src/node/migrate.rs +++ b/src/node/migrate.rs @@ -20,7 +20,7 @@ use reth_provider::{ DatabaseProvider, ProviderFactory, ReceiptProvider, StaticFileProviderFactory, StaticFileSegment, StaticFileWriter, }; -use std::{marker::PhantomData, ops::RangeInclusive, path::PathBuf, sync::Arc}; +use std::{marker::PhantomData, path::PathBuf, sync::Arc}; use tracing::{info, warn}; use crate::{chainspec::HlChainSpec, HlHeader, HlPrimitives}; @@ -166,12 +166,7 @@ where let sf_provider = self.sf_provider(); let sf_tmp_provider = StaticFileProvider::::read_write(&conversion_tmp)?; let block_range_for_filename = sf_provider.find_fixed_range(block_range.start()); - migrate_single_static_file( - &sf_tmp_provider, - &sf_provider, - &provider, - block_range, - )?; + migrate_single_static_file(&sf_tmp_provider, &sf_provider, &provider, block_range)?; self.move_static_files_for_segment(block_range_for_filename)?; } @@ -253,30 +248,36 @@ fn migrate_single_static_file provider: &DatabaseProvider, NodeTypesWithDBAdapter>>, block_range: SegmentRangeInclusive, ) -> Result<(), eyre::Error> { - let block_range: RangeInclusive = block_range.into(); - info!("Migrating block range {:?}...", block_range); - info!("Loading headers"); - let headers = old_headers_range(sf_in, block_range.clone())?; - info!("Loading receipts"); - let receipts = provider.receipts_by_block_range(block_range.clone())?; - assert_eq!(headers.len(), receipts.len()); - let mut writer = sf_out.get_writer(*block_range.start(), StaticFileSegment::Headers)?; - let new_headers = std::iter::zip(headers, receipts) - .map(|(header, receipts)| { - let system_tx_count = receipts.iter().filter(|r| r.cumulative_gas_used == 0).count(); - let eth_header = Header::decompress(&header[0]).unwrap(); - let hl_header = - HlHeader::from_ethereum_header(eth_header, &receipts, system_tx_count as u64); + info!("Migrating block range {}...", block_range); - let difficulty: U256 = CompactU256::decompress(&header[1]).unwrap().into(); - let hash = BlockHash::decompress(&header[2]).unwrap(); - (hl_header, difficulty, hash) - }) - .collect::>(); - for header in new_headers { - writer.append_header(&header.0, header.1, &header.2)?; + // block_ranges into chunks of 100000 blocks + const CHUNK_SIZE: u64 = 100000; + for chunk in (0..=block_range.end()).step_by(CHUNK_SIZE as usize) { + let end = std::cmp::min(chunk + CHUNK_SIZE - 1, block_range.end()); + let block_range = chunk..=end; + let headers = old_headers_range(sf_in, block_range.clone())?; + let receipts = provider.receipts_by_block_range(block_range.clone())?; + assert_eq!(headers.len(), receipts.len()); + let mut writer = sf_out.get_writer(*block_range.start(), StaticFileSegment::Headers)?; + let new_headers = std::iter::zip(headers, receipts) + .map(|(header, receipts)| { + let system_tx_count = + receipts.iter().filter(|r| r.cumulative_gas_used == 0).count(); + let eth_header = Header::decompress(&header[0]).unwrap(); + let hl_header = + HlHeader::from_ethereum_header(eth_header, &receipts, system_tx_count as u64); + + let difficulty: U256 = CompactU256::decompress(&header[1]).unwrap().into(); + let hash = BlockHash::decompress(&header[2]).unwrap(); + (hl_header, difficulty, hash) + }) + .collect::>(); + for header in new_headers { + writer.append_header(&header.0, header.1, &header.2)?; + } + writer.commit().unwrap(); + info!("Migrated block range {:?}...", block_range); } - writer.commit().unwrap(); Ok(()) } From 13b63ff136fee19191cd9c199fe81e9c31f536bb Mon Sep 17 00:00:00 2001 From: sprites0 <199826320+sprites0@users.noreply.github.com> Date: Thu, 9 Oct 2025 06:35:56 +0000 Subject: [PATCH 9/9] feat: add migrator for mdbx as well --- src/node/migrate.rs | 209 +++++++++++++++++++++++++++++++------------- 1 file changed, 148 insertions(+), 61 deletions(-) diff --git a/src/node/migrate.rs b/src/node/migrate.rs index 7d3634a68..650e098a6 100644 --- a/src/node/migrate.rs +++ b/src/node/migrate.rs @@ -1,7 +1,7 @@ use alloy_consensus::Header; -use alloy_primitives::{b256, hex::ToHexExt, BlockHash, B256, U256}; +use alloy_primitives::{b256, hex::ToHexExt, BlockHash, Bytes, B256, U256}; use reth::{ - api::{NodeTypes, NodeTypesWithDBAdapter}, + api::NodeTypesWithDBAdapter, args::{DatabaseArgs, DatadirArgs}, dirs::{ChainPath, DataDirPath}, }; @@ -11,30 +11,37 @@ use reth_db::{ models::CompactU256, static_file::iter_static_files, table::Decompress, - DatabaseEnv, + tables, DatabaseEnv, +}; +use reth_db_api::{ + cursor::{DbCursorRO, DbCursorRW}, + transaction::{DbTx, DbTxMut}, }; use reth_errors::ProviderResult; +use reth_ethereum_primitives::EthereumReceipt; use reth_provider::{ providers::{NodeTypesForProvider, StaticFileProvider}, static_file::SegmentRangeInclusive, DatabaseProvider, ProviderFactory, ReceiptProvider, StaticFileProviderFactory, StaticFileSegment, StaticFileWriter, }; -use std::{marker::PhantomData, path::PathBuf, sync::Arc}; +use std::{fs::File, io::Write, path::PathBuf, sync::Arc}; use tracing::{info, warn}; use crate::{chainspec::HlChainSpec, HlHeader, HlPrimitives}; -pub(super) struct Migrator { +pub(crate) trait HlNodeType: + NodeTypesForProvider +{ +} +impl> HlNodeType for N {} + +pub(super) struct Migrator { data_dir: ChainPath, provider_factory: ProviderFactory>>, - _nt: PhantomData, } -impl Migrator -where - N: NodeTypes, -{ +impl Migrator { const MIGRATION_PATH_SUFFIX: &'static str = "migration-tmp"; pub fn new( @@ -44,7 +51,7 @@ where ) -> eyre::Result { let data_dir = datadir.clone().resolve_datadir(chain_spec.chain()); let provider_factory = Self::provider_factory(chain_spec, datadir, database_args)?; - Ok(Self { data_dir, provider_factory, _nt: PhantomData }) + Ok(Self { data_dir, provider_factory }) } pub fn sf_provider(&self) -> StaticFileProvider { @@ -66,9 +73,12 @@ where } fn migrate_db_inner(&self) -> eyre::Result<()> { - self.migrate_static_files()?; - self.migrate_mdbx()?; - info!("Database migrated successfully"); + let migrated_mdbx = MigratorMdbx::(self).migrate_mdbx()?; + let migrated_static_files = MigrateStaticFiles::(self).migrate_static_files()?; + + if migrated_mdbx || migrated_static_files { + info!("Database migrated successfully"); + } Ok(()) } @@ -76,6 +86,95 @@ where self.data_dir.data_dir().join(Self::MIGRATION_PATH_SUFFIX) } + fn provider_factory( + chain_spec: HlChainSpec, + datadir: DatadirArgs, + database_args: DatabaseArgs, + ) -> eyre::Result>>> { + let data_dir = datadir.clone().resolve_datadir(chain_spec.chain()); + let db_env = reth_db::init_db(data_dir.db(), database_args.database_args())?; + let static_file_provider = StaticFileProvider::read_only(data_dir.static_files(), false)?; + let db = Arc::new(db_env); + Ok(ProviderFactory::new(db, Arc::new(chain_spec), static_file_provider)) + } +} + +struct MigratorMdbx<'a, N: HlNodeType>(&'a Migrator); + +impl<'a, N: HlNodeType> MigratorMdbx<'a, N> { + fn migrate_mdbx(&self) -> eyre::Result { + // if any header is in old format, we need to migrate it, so we pick the first and last one + let db_env = self.0.provider_factory.provider()?; + let mut cursor = db_env.tx_ref().cursor_read::>()?; + + let migration_needed = { + let first_is_old = match cursor.first()? { + Some((number, header)) => using_old_header(number, &header), + None => false, + }; + let last_is_old = match cursor.last()? { + Some((number, header)) => using_old_header(number, &header), + None => false, + }; + first_is_old || last_is_old + }; + + if !migration_needed { + return Ok(false); + } + + self.migrate_mdbx_inner()?; + Ok(true) + } + + fn migrate_mdbx_inner(&self) -> eyre::Result<()> { + // There shouldn't be many headers in mdbx, but using file for safety + info!("Old database detected, migrating mdbx..."); + let tmp_path = self.0.conversion_tmp_dir().join("headers.rmp"); + let count = self.export_old_headers(&tmp_path)?; + self.import_new_headers(tmp_path, count)?; + Ok(()) + } + + fn export_old_headers(&self, tmp_path: &PathBuf) -> Result { + let db_env = self.0.provider_factory.provider()?; + let mut cursor_read = db_env.tx_ref().cursor_read::>()?; + let mut tmp_writer = File::create(tmp_path)?; + let mut count = 0; + let old_headers = cursor_read.walk(None)?.filter_map(|row| { + let (block_number, header) = row.ok()?; + if !using_old_header(block_number, &header) { + None + } else { + Some((block_number, Header::decompress(&header).ok()?)) + } + }); + for (block_number, header) in old_headers { + let receipt = + db_env.receipts_by_block(block_number.into())?.expect("Receipt not found"); + let new_header = to_hl_header(receipt, header); + tmp_writer.write_all(&rmp_serde::to_vec(&(block_number, new_header))?)?; + count += 1; + } + Ok(count) + } + + fn import_new_headers(&self, tmp_path: PathBuf, count: i32) -> Result<(), eyre::Error> { + let mut tmp_reader = File::open(tmp_path)?; + let db_env = self.0.provider_factory.provider_rw()?; + let mut cursor_write = db_env.tx_ref().cursor_write::>()?; + for _ in 0..count { + let (number, header) = rmp_serde::from_read::<_, (u64, HlHeader)>(&mut tmp_reader)?; + cursor_write.upsert(number, &rmp_serde::to_vec(&header)?.into())?; + } + db_env.commit()?; + Ok(()) + } +} + +struct MigrateStaticFiles<'a, N: HlNodeType>(&'a Migrator); + +impl<'a, N: HlNodeType> MigrateStaticFiles<'a, N> { fn iterate_files_for_segment( &self, block_range: SegmentRangeInclusive, @@ -102,8 +201,8 @@ where fn create_placeholder(&self, block_range: SegmentRangeInclusive) -> eyre::Result<()> { // The direction is opposite here - let src = self.data_dir.static_files(); - let dst = self.conversion_tmp_dir(); + let src = self.0.data_dir.static_files(); + let dst = self.0.conversion_tmp_dir(); for (src_path, file_name) in self.iterate_files_for_segment(block_range, &src)? { let dst_path = dst.join(file_name); @@ -120,8 +219,8 @@ where &self, block_range: SegmentRangeInclusive, ) -> eyre::Result<()> { - let src = self.conversion_tmp_dir(); - let dst = self.data_dir.static_files(); + let src = self.0.conversion_tmp_dir(); + let dst = self.0.data_dir.static_files(); for (src_path, file_name) in self.iterate_files_for_segment(block_range, &src)? { let dst_path = dst.join(file_name); @@ -133,9 +232,9 @@ where self.create_placeholder(block_range) } - fn migrate_static_files(&self) -> eyre::Result<()> { - let conversion_tmp = self.conversion_tmp_dir(); - let old_path = self.data_dir.static_files(); + fn migrate_static_files(&self) -> eyre::Result { + let conversion_tmp = self.0.conversion_tmp_dir(); + let old_path = self.0.data_dir.static_files(); if conversion_tmp.exists() { std::fs::remove_dir_all(&conversion_tmp)?; @@ -145,7 +244,7 @@ where let mut all_static_files = iter_static_files(&old_path)?; let all_static_files = all_static_files.remove(&StaticFileSegment::Headers).unwrap_or_default(); - let provider = self.provider_factory.provider()?; + let provider = self.0.provider_factory.provider()?; let mut first = true; @@ -159,11 +258,11 @@ where } if first { - info!("Old database detected, migrating database..."); + info!("Old database detected, migrating static files..."); first = false; } - let sf_provider = self.sf_provider(); + let sf_provider = self.0.sf_provider(); let sf_tmp_provider = StaticFileProvider::::read_write(&conversion_tmp)?; let block_range_for_filename = sf_provider.find_fixed_range(block_range.start()); migrate_single_static_file(&sf_tmp_provider, &sf_provider, &provider, block_range)?; @@ -171,48 +270,19 @@ where self.move_static_files_for_segment(block_range_for_filename)?; } - Ok(()) - } - - fn provider_factory( - chain_spec: HlChainSpec, - datadir: DatadirArgs, - database_args: DatabaseArgs, - ) -> eyre::Result>>> { - let data_dir = datadir.clone().resolve_datadir(chain_spec.chain()); - let db_env = reth_db::init_db(data_dir.db(), database_args.database_args())?; - let static_file_provider = StaticFileProvider::read_only(data_dir.static_files(), false)?; - let db = Arc::new(db_env); - Ok(ProviderFactory::new(db, Arc::new(chain_spec), static_file_provider)) - } - - fn migrate_mdbx(&self) -> eyre::Result<()> { - // Actually not much here, all of blocks should be in the static files - Ok(()) + Ok(!first) } fn using_old_header(&self, number: u64) -> eyre::Result { - let sf_provider = self.sf_provider(); + let sf_provider = self.0.sf_provider(); let content = old_headers_range(&sf_provider, number..=number)?; let &[row] = &content.as_slice() else { warn!("No header found for block {}", number); return Ok(false); }; - let header = &row[0]; - let deserialized_old = is_old_header(header); - let deserialized_new = is_new_header(header); - - assert!( - deserialized_old ^ deserialized_new, - "Header is not valid: {} {}\ndeserialized_old: {}\ndeserialized_new: {}", - number, - header.encode_hex(), - deserialized_old, - deserialized_new - ); - Ok(deserialized_old && !deserialized_new) + Ok(using_old_header(number, &row[0])) } } @@ -242,7 +312,7 @@ fn is_new_header(header: &[u8]) -> bool { rmp_serde::from_slice::(header).is_ok() } -fn migrate_single_static_file>( +fn migrate_single_static_file( sf_out: &StaticFileProvider, sf_in: &StaticFileProvider, provider: &DatabaseProvider, NodeTypesWithDBAdapter>>, @@ -261,11 +331,8 @@ fn migrate_single_static_file let mut writer = sf_out.get_writer(*block_range.start(), StaticFileSegment::Headers)?; let new_headers = std::iter::zip(headers, receipts) .map(|(header, receipts)| { - let system_tx_count = - receipts.iter().filter(|r| r.cumulative_gas_used == 0).count(); let eth_header = Header::decompress(&header[0]).unwrap(); - let hl_header = - HlHeader::from_ethereum_header(eth_header, &receipts, system_tx_count as u64); + let hl_header = to_hl_header(receipts, eth_header); let difficulty: U256 = CompactU256::decompress(&header[1]).unwrap().into(); let hash = BlockHash::decompress(&header[2]).unwrap(); @@ -281,6 +348,11 @@ fn migrate_single_static_file Ok(()) } +fn to_hl_header(receipts: Vec, eth_header: Header) -> HlHeader { + let system_tx_count = receipts.iter().filter(|r| r.cumulative_gas_used == 0).count(); + HlHeader::from_ethereum_header(eth_header, &receipts, system_tx_count as u64) +} + fn old_headers_range( provider: &StaticFileProvider, block_range: impl std::ops::RangeBounds, @@ -316,3 +388,18 @@ fn to_range>(bounds: R) -> std::ops::Range { start..end } + +fn using_old_header(number: u64, header: &[u8]) -> bool { + let deserialized_old = is_old_header(header); + let deserialized_new = is_new_header(header); + + assert!( + deserialized_old ^ deserialized_new, + "Header is not valid: {} {}\ndeserialized_old: {}\ndeserialized_new: {}", + number, + header.encode_hex(), + deserialized_old, + deserialized_new + ); + deserialized_old && !deserialized_new +}