Skip to content

Commit 12557ed

Browse files
authored
feat: bump revm dep (#17)
1 parent 863b547 commit 12557ed

File tree

6 files changed

+57
-41
lines changed

6 files changed

+57
-41
lines changed

Cargo.lock

Lines changed: 46 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ kzg-rs = ["revm/kzg-rs"]
3131
blst = ["revm/blst"]
3232

3333
[patch.crates-io]
34-
revm = { git = "https://github.com/bluealloy/revm", rev = "a8a9893b" }
35-
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "a8a9893b" }
34+
revm = { git = "https://github.com/bluealloy/revm", rev = "19a5f3b" }
35+
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "19a5f3b" }
36+
revm-inspector = { git = "https://github.com/bluealloy/revm", rev = "19a5f3b" }

src/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ mod tests {
290290
#[test]
291291
fn test_deduct_caller() -> Result<(), Box<dyn core::error::Error>> {
292292
let ctx = context().modify_db_chained(|db| {
293-
db.accounts.insert(
293+
db.cache.accounts.insert(
294294
CALLER,
295295
DbAccount {
296296
info: AccountInfo {

src/precompile/bn128.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ pub mod pair {
4444
/// length is greater than 768 bytes.
4545
fn bernoulli_run(input: &Bytes, gas_limit: u64) -> PrecompileResult {
4646
if input.len() > N_PAIRING_PER_OP * N_BYTES_PER_PAIR {
47-
return Err(
48-
PrecompileError::Other("BN128PairingInputOverflow: input overflow".into()).into()
49-
);
47+
return Err(PrecompileError::Other("BN128PairingInputOverflow: input overflow".into()));
5048
}
5149
run_pair(input, ISTANBUL_PAIR_PER_POINT, ISTANBUL_PAIR_BASE, gas_limit)
5250
}

src/precompile/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use revm::{
66
context::{Cfg, ContextTr},
77
handler::{EthPrecompiles, PrecompileProvider},
88
interpreter::InterpreterResult,
9-
precompile::{self, PrecompileError, PrecompileErrors, PrecompileWithAddress, Precompiles},
9+
precompile::{self, PrecompileError, PrecompileWithAddress, Precompiles},
1010
primitives::{Address, Bytes},
1111
};
1212

@@ -50,7 +50,7 @@ impl<CTX> ScrollPrecompileProvider<CTX> {
5050
/// implemented".into())` for a given address.
5151
const fn precompile_not_implemented(address: Address) -> PrecompileWithAddress {
5252
PrecompileWithAddress(address, |_input: &Bytes, _gas_limit: u64| {
53-
Err(PrecompileError::Other("NotImplemented: Precompile not implemented".into()).into())
53+
Err(PrecompileError::Other("NotImplemented: Precompile not implemented".into()))
5454
})
5555
}
5656

@@ -105,7 +105,7 @@ where
105105
address: &Address,
106106
bytes: &Bytes,
107107
gas_limit: u64,
108-
) -> Result<Option<Self::Output>, PrecompileErrors> {
108+
) -> Result<Option<Self::Output>, PrecompileError> {
109109
self.precompile_provider.run(context, address, bytes, gas_limit)
110110
}
111111

src/precompile/modexp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ fn bernoulli_run(input: &Bytes, gas_limit: u64) -> PrecompileResult {
4343

4444
// modexp temporarily only accepts inputs of 32 bytes (256 bits) or less
4545
if base_len > SCROLL_LEN_LIMIT {
46-
return Err(PrecompileError::Other("ModexpBaseOverflow: modexp base overflow".into()).into());
46+
return Err(PrecompileError::Other("ModexpBaseOverflow: modexp base overflow".into()));
4747
}
4848
if exp_len > SCROLL_LEN_LIMIT {
49-
return Err(PrecompileError::Other("ModexpExpOverflow: modexp exp overflow".into()).into());
49+
return Err(PrecompileError::Other("ModexpExpOverflow: modexp exp overflow".into()));
5050
}
5151
if mod_len > SCROLL_LEN_LIMIT {
52-
return Err(PrecompileError::Other("ModexpModOverflow: modexp mod overflow".into()).into());
52+
return Err(PrecompileError::Other("ModexpModOverflow: modexp mod overflow".into()));
5353
}
5454

5555
run_inner(input, gas_limit, 200, berlin_gas_calc)

0 commit comments

Comments
 (0)