From ac1d20b00fb9dcf9b361770fd45e72630f6282f5 Mon Sep 17 00:00:00 2001 From: evalir Date: Tue, 17 Dec 2024 14:34:18 +0100 Subject: [PATCH] feat(deps): upgrade to alloy for reth 1.1.4 (#67) * feat(deps): upgrade to alloy for reth 1.1.4 * chore: fix test --- Cargo.toml | 8 ++++---- src/fill/alloy.rs | 6 +++--- src/lifecycle/output.rs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 60fd5e1..6a8ede5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,12 +27,12 @@ option-if-let-else = "warn" redundant-clone = "warn" [dependencies] -alloy-rlp = { version = "0.3", default-features = false } +alloy-rlp = { version = "0.3.10", default-features = false } -alloy-primitives = { version = "0.8.8", default-features = false } -alloy-sol-types = { version = "0.8.8", default-features = false } +alloy-primitives = { version = "0.8.11", default-features = false } +alloy-sol-types = { version = "0.8.11", default-features = false } -alloy = { version = "=0.5.4", default-features = false, features = ["consensus", "rpc-types-mev", "eips", "k256"] } +alloy = { version = "=0.7.3", default-features = false, features = ["consensus", "rpc-types-mev", "eips", "k256"] } revm = { version = "18.0.0", default-features = false } diff --git a/src/fill/alloy.rs b/src/fill/alloy.rs index 58b962f..20c9db5 100644 --- a/src/fill/alloy.rs +++ b/src/fill/alloy.rs @@ -262,12 +262,12 @@ impl Block for alloy::rpc::types::eth::Header { blob_excess_gas_and_price, } = block_env; *number = U256::from(self.number); - *coinbase = self.miner; + *coinbase = self.beneficiary; *timestamp = U256::from(self.timestamp); *gas_limit = U256::from(self.gas_limit); *basefee = U256::from(self.base_fee_per_gas.unwrap_or_default()); *difficulty = U256::from(self.difficulty); - *prevrandao = self.mix_hash; + *prevrandao = Some(self.mix_hash); *blob_excess_gas_and_price = self.blob_gas_used.map(BlobExcessGasAndPrice::new); } } @@ -336,7 +336,7 @@ mod tests { #[test] fn test_header_fill() { - let raw = r#"{"parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","ommersHash":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","beneficiary":"0x0000000000000000000000000000000000000000","stateRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","withdrawalsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0x0","number":"0x0","gasLimit":"0x0","gasUsed":"0x0","timestamp":"0x0","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","baseFeePerGas":"0x1","extraData":"0x"}"#; + let raw = r#"{"parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","miner":"0x0000000000000000000000000000000000000000","stateRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0x0","number":"0x0","gasLimit":"0x0","gasUsed":"0x0","timestamp":"0x0","extraData":"0x","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","baseFeePerGas":"0x1","withdrawalsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"}"#; let header = Header { base_fee_per_gas: Some(1), withdrawals_root: Some(EMPTY_ROOT_HASH), diff --git a/src/lifecycle/output.rs b/src/lifecycle/output.rs index 2c4d2fa..aa55fd6 100644 --- a/src/lifecycle/output.rs +++ b/src/lifecycle/output.rs @@ -25,7 +25,7 @@ impl Default for BlockOutput { } } -impl BlockOutput { +impl> BlockOutput { /// Create a new block output with memory allocated to hold `capacity` /// transaction outcomes. pub fn with_capacity(capacity: usize) -> Self {