mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-11 00:08:13 -05:00
chore: bump revm (#14954)
This commit is contained in:
81
Cargo.lock
generated
81
Cargo.lock
generated
@@ -266,7 +266,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-evm"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/alloy-rs/evm?rev=8402f9c#8402f9c96026e8d37cad93782bb7d539a76dd751"
|
||||
source = "git+https://github.com/alloy-rs/evm?rev=a5722ee#a5722ee078c13338784ca41f89e93d5e73890458"
|
||||
dependencies = [
|
||||
"alloy-consensus",
|
||||
"alloy-eips",
|
||||
@@ -394,7 +394,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "alloy-op-evm"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/alloy-rs/evm?rev=8402f9c#8402f9c96026e8d37cad93782bb7d539a76dd751"
|
||||
source = "git+https://github.com/alloy-rs/evm?rev=a5722ee#a5722ee078c13338784ca41f89e93d5e73890458"
|
||||
dependencies = [
|
||||
"alloy-consensus",
|
||||
"alloy-eips",
|
||||
@@ -2091,7 +2091,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3017,7 +3017,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4607,7 +4607,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
|
||||
dependencies = [
|
||||
"hermit-abi 0.5.0",
|
||||
"libc",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4950,7 +4950,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5764,9 +5764,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "op-revm"
|
||||
version = "1.0.0-alpha.2"
|
||||
version = "1.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b0bce0ed6dd4f417e31ded4afa9dda6f9ee7c9c95c14f36f383f8bdc3af2356"
|
||||
checksum = "50a5d1edc7adb25c34869eaa5578d9c1a11eb03ffc0ba8555afa0844e4e52d2f"
|
||||
dependencies = [
|
||||
"auto_impl",
|
||||
"once_cell",
|
||||
@@ -5949,6 +5949,7 @@ checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
|
||||
dependencies = [
|
||||
"phf_macros",
|
||||
"phf_shared",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6375,7 +6376,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -9954,9 +9955,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm"
|
||||
version = "20.0.0-alpha.3"
|
||||
version = "20.0.0-alpha.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80e14f76761c84ee7256cbbd85666ba83f8345dd3180db1b56a837d262cf0072"
|
||||
checksum = "afdd8fcd919cbc149a81965cae6d60bc5d99d4ea3e5ed4d7154872a2004972f8"
|
||||
dependencies = [
|
||||
"revm-bytecode",
|
||||
"revm-context",
|
||||
@@ -9973,20 +9974,21 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-bytecode"
|
||||
version = "1.0.0-alpha.2"
|
||||
version = "1.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2c5f38796260529303918286869e66eff8c9d6892102652f7ea9c1f77110a63"
|
||||
checksum = "6ad4e81fd3d5241ba201d2514a21835d8d06fa8bb7a2fb5b733a424a4776f0c4"
|
||||
dependencies = [
|
||||
"bitvec",
|
||||
"phf",
|
||||
"revm-primitives",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "revm-context"
|
||||
version = "1.0.0-alpha.2"
|
||||
version = "1.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3513cebf0c298d396b7ba2d0ec552227366742e8e412d8b033aff33d3200f7ac"
|
||||
checksum = "532674640ae1d9619fe31b418f63a41fe3ad55bbb63665ff634e5ec95f09fc41"
|
||||
dependencies = [
|
||||
"auto_impl",
|
||||
"cfg-if",
|
||||
@@ -10001,9 +10003,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-context-interface"
|
||||
version = "1.0.0-alpha.2"
|
||||
version = "1.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98f57925129265cebccdc8ebb8f2cc6695f59dcf8850db9a2b07680395f1ae35"
|
||||
checksum = "f5f16203c3bf03b78f7604ea4880af307c655dc2946c6134c749952d4fa87064"
|
||||
dependencies = [
|
||||
"alloy-eip2930",
|
||||
"alloy-eip7702",
|
||||
@@ -10016,10 +10018,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-database"
|
||||
version = "1.0.0-alpha.2"
|
||||
version = "1.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7c9de4fccce40aa44ae01ecf3c1c878c006344404eabde32af5f07177b9c5cc"
|
||||
checksum = "cd8e7b21693b74dbd9ee824a00225aad6a4ec9db903625304ae1ce0f4c0940c4"
|
||||
dependencies = [
|
||||
"alloy-eips",
|
||||
"auto_impl",
|
||||
"revm-bytecode",
|
||||
"revm-database-interface",
|
||||
@@ -10030,9 +10033,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-database-interface"
|
||||
version = "1.0.0-alpha.2"
|
||||
version = "1.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f040b4185db4f1e5d564526be8a9ab49ce1ee9e5f158241b5e187e5ec038022"
|
||||
checksum = "bd54a44b415d510cffea16955888544ce54f987958578b40a52d15963462b259"
|
||||
dependencies = [
|
||||
"auto_impl",
|
||||
"revm-primitives",
|
||||
@@ -10042,9 +10045,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-handler"
|
||||
version = "1.0.0-alpha.3"
|
||||
version = "1.0.0-alpha.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9cc4e4d82d28abf324db310aa814f033fa6d4f11482bb853826e415c40bf275d"
|
||||
checksum = "06d0f306d5de38834abdd7c871c686c6e81721e527de87e8f2f73db79437e13e"
|
||||
dependencies = [
|
||||
"auto_impl",
|
||||
"revm-bytecode",
|
||||
@@ -10060,9 +10063,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-inspector"
|
||||
version = "1.0.0-alpha.3"
|
||||
version = "1.0.0-alpha.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04f1683c07741a337d1a157e6caeb56e512b95e91c43ffcb5a4ff9b07c06a7ea"
|
||||
checksum = "d871e7fa03ecc4ddbe91c17c63fe0c3a6d6f740d0ba213ea8600351b268db99f"
|
||||
dependencies = [
|
||||
"auto_impl",
|
||||
"revm-context",
|
||||
@@ -10079,7 +10082,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "revm-inspectors"
|
||||
version = "0.16.0"
|
||||
source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=3c6cca4#3c6cca4722a00c49a75c95ffa9605c7efab0e6a1"
|
||||
source = "git+https://github.com/paradigmxyz/revm-inspectors?rev=667180b#667180b4a3624b9630387276ff2e9a56745a093c"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"alloy-rpc-types-eth",
|
||||
@@ -10097,9 +10100,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-interpreter"
|
||||
version = "16.0.0-alpha.3"
|
||||
version = "16.0.0-alpha.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dcbc3f38a094a3dab6e2222a9501558b2e9f2647c0a1ae28e5eb125e56f5cc4a"
|
||||
checksum = "963145b74a8652afa04051ecb8dd5bd89f1d97fbe58883852359ac12872cddf5"
|
||||
dependencies = [
|
||||
"revm-bytecode",
|
||||
"revm-context-interface",
|
||||
@@ -10109,9 +10112,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-precompile"
|
||||
version = "17.0.0-alpha.3"
|
||||
version = "17.0.0-alpha.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c5428daaeec82f857c5d7c15a40e7289d5466b4bf7157295f25305fa3da4fce5"
|
||||
checksum = "5610cc025e936511898418d70d4bd2eaa3f772a9859585c950b23cd2dfbe8a16"
|
||||
dependencies = [
|
||||
"aurora-engine-modexp",
|
||||
"blst",
|
||||
@@ -10131,9 +10134,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-primitives"
|
||||
version = "16.0.0-alpha.2"
|
||||
version = "16.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a2757e2b6518cf8385dabbe13b88a5023b16c9ca2e06f3117456d4dc35cc7f0"
|
||||
checksum = "aa626cac49fb6bfdbfed2a1cd232eb5f54d36281703092eaeec859111b1a220e"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"enumn",
|
||||
@@ -10142,9 +10145,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "revm-state"
|
||||
version = "1.0.0-alpha.2"
|
||||
version = "1.0.0-alpha.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d4ff1756009a50a449e2afab1ebf04552897ed496996175f70dcebe023823f0"
|
||||
checksum = "d3869d401da38fcf76021a6f5e4182fa027976f54763bc6ab2c477e440c6cd8f"
|
||||
dependencies = [
|
||||
"bitflags 2.9.0",
|
||||
"revm-bytecode",
|
||||
@@ -10384,7 +10387,7 @@ dependencies = [
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys 0.4.15",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -10397,7 +10400,7 @@ dependencies = [
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys 0.9.2",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11302,7 +11305,7 @@ dependencies = [
|
||||
"getrandom 0.3.1",
|
||||
"once_cell",
|
||||
"rustix 1.0.1",
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11865,7 +11868,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -12312,7 +12315,7 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys 0.59.0",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
28
Cargo.toml
28
Cargo.toml
@@ -430,24 +430,24 @@ reth-trie-sparse = { path = "crates/trie/sparse" }
|
||||
reth-zstd-compressors = { path = "crates/storage/zstd-compressors", default-features = false }
|
||||
|
||||
# revm
|
||||
revm = { version = "20.0.0-alpha.3", default-features = false }
|
||||
revm-bytecode = { version = "1.0.0-alpha.2", default-features = false }
|
||||
revm-database = { version = "1.0.0-alpha.2", default-features = false }
|
||||
revm-state = { version = "1.0.0-alpha.2", default-features = false }
|
||||
revm-primitives = { version = "16.0.0-alpha.2", default-features = false }
|
||||
revm-interpreter = { version = "16.0.0-alpha.3", default-features = false }
|
||||
revm-inspector = { version = "1.0.0-alpha.3", default-features = false }
|
||||
revm-context = { version = "1.0.0-alpha.2", default-features = false }
|
||||
revm-context-interface = { version = "1.0.0-alpha.2", default-features = false }
|
||||
revm-database-interface = { version = "1.0.0-alpha.2", default-features = false }
|
||||
op-revm = { version = "1.0.0-alpha.2", default-features = false }
|
||||
revm = { version = "20.0.0-alpha.4", default-features = false }
|
||||
revm-bytecode = { version = "1.0.0-alpha.3", default-features = false }
|
||||
revm-database = { version = "1.0.0-alpha.3", default-features = false }
|
||||
revm-state = { version = "1.0.0-alpha.3", default-features = false }
|
||||
revm-primitives = { version = "16.0.0-alpha.3", default-features = false }
|
||||
revm-interpreter = { version = "16.0.0-alpha.4", default-features = false }
|
||||
revm-inspector = { version = "1.0.0-alpha.4", default-features = false }
|
||||
revm-context = { version = "1.0.0-alpha.3", default-features = false }
|
||||
revm-context-interface = { version = "1.0.0-alpha.3", default-features = false }
|
||||
revm-database-interface = { version = "1.0.0-alpha.3", default-features = false }
|
||||
op-revm = { version = "1.0.0-alpha.3", default-features = false }
|
||||
revm-inspectors = "0.16"
|
||||
|
||||
# eth
|
||||
alloy-chains = { version = "0.1.64", default-features = false }
|
||||
alloy-dyn-abi = "0.8.20"
|
||||
alloy-eip2124 = { version = "0.1.0", default-features = false }
|
||||
alloy-evm = { git = "https://github.com/alloy-rs/evm", rev = "8402f9c", default-features = false }
|
||||
alloy-evm = { git = "https://github.com/alloy-rs/evm", rev = "a5722ee", default-features = false }
|
||||
alloy-primitives = { version = "0.8.20", default-features = false, features = ["map-foldhash"] }
|
||||
alloy-rlp = { version = "0.3.10", default-features = false, features = ["core-net"] }
|
||||
alloy-sol-types = { version = "0.8.20", default-features = false }
|
||||
@@ -485,7 +485,7 @@ alloy-transport-ipc = { version = "0.12.4", default-features = false }
|
||||
alloy-transport-ws = { version = "0.12.4", default-features = false }
|
||||
|
||||
# op
|
||||
alloy-op-evm = { git = "https://github.com/alloy-rs/evm", rev = "8402f9c", default-features = false }
|
||||
alloy-op-evm = { git = "https://github.com/alloy-rs/evm", rev = "a5722ee", default-features = false }
|
||||
alloy-op-hardforks = { git = "https://github.com/alloy-rs/hardforks", rev = "ae4176c" }
|
||||
op-alloy-rpc-types = { version = "0.11.0", default-features = false }
|
||||
op-alloy-rpc-types-engine = { version = "0.11.0", default-features = false }
|
||||
@@ -677,7 +677,7 @@ visibility = "0.1.1"
|
||||
walkdir = "2.3.3"
|
||||
|
||||
[patch.crates-io]
|
||||
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "3c6cca4" }
|
||||
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "667180b" }
|
||||
|
||||
# alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "cfb13aa" }
|
||||
# alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "cfb13aa" }
|
||||
|
||||
@@ -13,4 +13,4 @@ reth-tracing = { path = "../../crates/tracing" }
|
||||
reth-node-api = { path = "../../crates/node/api" }
|
||||
|
||||
[patch.crates-io]
|
||||
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "3c6cca4" }
|
||||
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "667180b" }
|
||||
|
||||
@@ -50,7 +50,7 @@ pub struct MyEvmFactory;
|
||||
|
||||
impl EvmFactory for MyEvmFactory {
|
||||
type Evm<DB: Database, I: Inspector<EthEvmContext<DB>, EthInterpreter>> =
|
||||
EthEvm<DB, I, CustomPrecompiles<EthEvmContext<DB>>>;
|
||||
EthEvm<DB, I, CustomPrecompiles>;
|
||||
type Tx = TxEnv;
|
||||
type Error<DBError: core::error::Error + Send + Sync + 'static> = EVMError<DBError>;
|
||||
type HaltReason = HaltReason;
|
||||
@@ -139,11 +139,11 @@ where
|
||||
|
||||
/// A custom precompile that contains static precompiles.
|
||||
#[derive(Clone)]
|
||||
pub struct CustomPrecompiles<CTX> {
|
||||
pub precompiles: EthPrecompiles<CTX>,
|
||||
pub struct CustomPrecompiles {
|
||||
pub precompiles: EthPrecompiles,
|
||||
}
|
||||
|
||||
impl<CTX: ContextTr> CustomPrecompiles<CTX> {
|
||||
impl CustomPrecompiles {
|
||||
/// Given a [`PrecompileProvider`] and cache for a specific precompiles, create a
|
||||
/// wrapper that can be used inside Evm.
|
||||
fn new() -> Self {
|
||||
@@ -168,22 +168,21 @@ pub fn prague_custom() -> &'static Precompiles {
|
||||
})
|
||||
}
|
||||
|
||||
impl<CTX: ContextTr> PrecompileProvider for CustomPrecompiles<CTX> {
|
||||
type Context = CTX;
|
||||
impl<CTX: ContextTr> PrecompileProvider<CTX> for CustomPrecompiles {
|
||||
type Output = InterpreterResult;
|
||||
|
||||
fn set_spec(&mut self, spec: <<Self::Context as ContextTr>::Cfg as Cfg>::Spec) {
|
||||
fn set_spec(&mut self, spec: <CTX::Cfg as Cfg>::Spec) {
|
||||
let spec_id = spec.clone().into();
|
||||
if spec_id == SpecId::PRAGUE {
|
||||
self.precompiles = EthPrecompiles { precompiles: prague_custom(), ..Default::default() }
|
||||
self.precompiles = EthPrecompiles { precompiles: prague_custom() }
|
||||
} else {
|
||||
self.precompiles.set_spec(spec);
|
||||
PrecompileProvider::<CTX>::set_spec(&mut self.precompiles, spec);
|
||||
}
|
||||
}
|
||||
|
||||
fn run(
|
||||
&mut self,
|
||||
context: &mut Self::Context,
|
||||
context: &mut CTX,
|
||||
address: &Address,
|
||||
bytes: &Bytes,
|
||||
gas_limit: u64,
|
||||
@@ -195,7 +194,7 @@ impl<CTX: ContextTr> PrecompileProvider for CustomPrecompiles<CTX> {
|
||||
self.precompiles.contains(address)
|
||||
}
|
||||
|
||||
fn warm_addresses(&self) -> Box<impl Iterator<Item = Address> + '_> {
|
||||
fn warm_addresses(&self) -> Box<impl Iterator<Item = Address>> {
|
||||
self.precompiles.warm_addresses()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ use std::{collections::HashMap, sync::Arc};
|
||||
/// Type alias for the LRU cache used within the [`PrecompileCache`].
|
||||
type PrecompileLRUCache = LruMap<(SpecId, Bytes, u64), Result<InterpreterResult, PrecompileError>>;
|
||||
|
||||
type WrappedEthEvm<DB, I> = EthEvm<DB, I, WrappedPrecompile<EthPrecompiles<EthEvmContext<DB>>>>;
|
||||
type WrappedEthEvm<DB, I> = EthEvm<DB, I, WrappedPrecompile<EthPrecompiles>>;
|
||||
|
||||
/// A cache for precompile inputs / outputs.
|
||||
///
|
||||
@@ -93,7 +93,7 @@ impl EvmFactory for MyEvmFactory {
|
||||
|
||||
/// A custom precompile that contains the cache and precompile it wraps.
|
||||
#[derive(Clone)]
|
||||
pub struct WrappedPrecompile<P: PrecompileProvider> {
|
||||
pub struct WrappedPrecompile<P> {
|
||||
/// The precompile to wrap.
|
||||
precompile: P,
|
||||
/// The cache to use.
|
||||
@@ -102,7 +102,7 @@ pub struct WrappedPrecompile<P: PrecompileProvider> {
|
||||
spec: SpecId,
|
||||
}
|
||||
|
||||
impl<P: PrecompileProvider> WrappedPrecompile<P> {
|
||||
impl<P> WrappedPrecompile<P> {
|
||||
/// Given a [`PrecompileProvider`] and cache for a specific precompiles, create a
|
||||
/// wrapper that can be used inside Evm.
|
||||
fn new(precompile: P, cache: Arc<RwLock<PrecompileCache>>) -> Self {
|
||||
@@ -110,20 +110,19 @@ impl<P: PrecompileProvider> WrappedPrecompile<P> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<P: PrecompileProvider<Output = InterpreterResult>> PrecompileProvider
|
||||
impl<CTX: ContextTr, P: PrecompileProvider<CTX, Output = InterpreterResult>> PrecompileProvider<CTX>
|
||||
for WrappedPrecompile<P>
|
||||
{
|
||||
type Context = P::Context;
|
||||
type Output = P::Output;
|
||||
|
||||
fn set_spec(&mut self, spec: <<Self::Context as ContextTr>::Cfg as Cfg>::Spec) {
|
||||
fn set_spec(&mut self, spec: <CTX::Cfg as Cfg>::Spec) {
|
||||
self.precompile.set_spec(spec.clone());
|
||||
self.spec = spec.into();
|
||||
}
|
||||
|
||||
fn run(
|
||||
&mut self,
|
||||
context: &mut Self::Context,
|
||||
context: &mut CTX,
|
||||
address: &Address,
|
||||
bytes: &Bytes,
|
||||
gas_limit: u64,
|
||||
@@ -157,7 +156,7 @@ impl<P: PrecompileProvider<Output = InterpreterResult>> PrecompileProvider
|
||||
self.precompile.contains(address)
|
||||
}
|
||||
|
||||
fn warm_addresses(&self) -> Box<impl Iterator<Item = Address> + '_> {
|
||||
fn warm_addresses(&self) -> Box<impl Iterator<Item = Address>> {
|
||||
self.precompile.warm_addresses()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user