Skip to content

Commit df27a8f

Browse files
authored
chore: change revme deps (#63)
1 parent a65b85a commit df27a8f

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

guest-program/revme/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ zkm-runtime = { git = "https://github.com/zkMIPS/zkm" }
99
##just testing
1010
#zkm-runtime = { path = "../../../zkm/runtime/entrypoint" }
1111

12-
revm = { git = "https://github.com/zkMIPS/revm", branch = "serde-no-std", default-features = false, features = [ "serde" ] }
13-
models = { git = "https://github.com/zkMIPS/powdr-revme", branch = "continuations", package = "models" }
12+
revm = { git = "https://github.com/zkMIPS/revm", branch = "zkm", default-features = false, features = [ "serde" ] }
13+
models = { git = "https://github.com/zkMIPS/revme", branch = "feat/zkm", package = "models" }
1414
serde = { version = "1.0", default-features = false, features = ["alloc", "derive", "rc"] }
1515
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
1616
k256 = { version = "0.13.3", features = ["ecdsa"], default-features = false }

guest-program/revme/src/main.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
use revm::{
55
db::CacheState,
6-
interpreter::CreateScheme,
7-
primitives::{calc_excess_blob_gas, Bytecode, Env, SpecId, TransactTo, U256, B256},
6+
primitives::{calc_excess_blob_gas, Bytecode, Env, SpecId, TransactTo, B256},
87
Evm,
98
};
109
extern crate libc;
@@ -128,20 +127,15 @@ fn execute_test_suite(suite: TestSuite) -> Result<(), String> {
128127
.and_then(Option::as_deref)
129128
.unwrap_or_default()
130129
.iter()
131-
.map(|item| {
132-
(
133-
item.address,
134-
item.storage_keys
135-
.iter()
136-
.map(|key| U256::from_be_bytes(key.0))
137-
.collect::<Vec<_>>(),
138-
)
130+
.map(|item| revm::primitives::AccessListItem {
131+
address: item.address,
132+
storage_keys: item.storage_keys.clone(),
139133
})
140134
.collect();
141135

142136
let to = match unit.transaction.to {
143137
Some(add) => TransactTo::Call(add),
144-
None => TransactTo::Create(CreateScheme::Create),
138+
None => TransactTo::Create,
145139
};
146140
env.tx.transact_to = to;
147141

@@ -156,8 +150,8 @@ fn execute_test_suite(suite: TestSuite) -> Result<(), String> {
156150
.build();
157151
let mut evm = Evm::builder()
158152
.with_db(&mut state)
159-
.modify_env(|e| *e = env.clone())
160-
.spec_id(spec_id)
153+
.modify_env(|e| **e = env.clone())
154+
.with_spec_id(spec_id)
161155
.build();
162156

163157
// do the deed

0 commit comments

Comments
 (0)