Skip to content

Commit 3c32f6c

Browse files
committed
chore: fix deps, remove eof things
1 parent 3fc30a4 commit 3c32f6c

File tree

13 files changed

+22
-158
lines changed

13 files changed

+22
-158
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ name = "fork_ref_transact"
3434
required-features = ["alloy-db"]
3535

3636
[dependencies]
37-
alloy = { version = "1.0.5", default-features = false, features = [
37+
alloy = { version = "1.0.13", default-features = false, features = [
3838
"consensus",
3939
"rpc-types-mev",
4040
"eips",
@@ -44,7 +44,7 @@ alloy = { version = "1.0.5", default-features = false, features = [
4444
"sol-types",
4545
] }
4646

47-
revm = { version = "23.1.0", default-features = false }
47+
revm = { version = "26.0.1", default-features = false }
4848

4949
dashmap = { version = "6.1.0", optional = true }
5050
tracing = { version = "0.1.41", optional = true }

src/driver/alloy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ struct BundleBlockFiller {
503503
impl Block for BundleBlockFiller {
504504
fn fill_block_env(&self, block_env: &mut revm::context::block::BlockEnv) {
505505
if let Some(timestamp) = self.timestamp {
506-
block_env.timestamp = timestamp;
506+
block_env.timestamp = U256::from(timestamp);
507507
} else {
508-
block_env.timestamp += 12;
508+
block_env.timestamp += U256::from(12);
509509
}
510510
if let Some(gas_limit) = self.gas_limit {
511511
block_env.gas_limit = gas_limit;
@@ -517,7 +517,7 @@ impl Block for BundleBlockFiller {
517517
block_env.basefee = base_fee.try_into().unwrap_or(u64::MAX);
518518
}
519519
if let Some(block_number) = self.block_number.as_number() {
520-
block_env.number = block_number;
520+
block_env.number = U256::from(block_number);
521521
}
522522
}
523523
}

src/evm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,12 +1129,12 @@ where
11291129
}
11301130

11311131
/// Get the current block number.
1132-
pub fn block_number(&self) -> u64 {
1132+
pub fn block_number(&self) -> U256 {
11331133
self.block().number()
11341134
}
11351135

11361136
/// Get the current block timestamp.
1137-
pub fn block_timestamp(&self) -> u64 {
1137+
pub fn block_timestamp(&self) -> U256 {
11381138
self.block().timestamp()
11391139
}
11401140

src/ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub trait EvmExtUnchecked<Db: Database> {
8383
let mut acct = self.account(address)?;
8484
let old = self.storage(address, index)?;
8585

86-
let change = EvmStorageSlot::new_changed(old, value);
86+
let change = EvmStorageSlot::new_changed(old, value, 0);
8787
acct.storage.insert(index, change);
8888
acct.mark_touch();
8989

src/fill/alloy.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ impl Block for alloy::consensus::Header {
288288
prevrandao,
289289
blob_excess_gas_and_price: _,
290290
} = block_env;
291-
*number = self.number;
291+
*number = U256::from(self.number);
292292
*beneficiary = self.beneficiary;
293-
*timestamp = self.timestamp;
293+
*timestamp = U256::from(self.timestamp);
294294
*gas_limit = self.gas_limit;
295295
*basefee = self.base_fee_per_gas.unwrap_or_default();
296296

@@ -320,9 +320,9 @@ impl Block for alloy::rpc::types::eth::Header {
320320
prevrandao,
321321
blob_excess_gas_and_price,
322322
} = block_env;
323-
*number = self.number;
323+
*number = U256::from(self.number);
324324
*beneficiary = self.beneficiary;
325-
*timestamp = self.timestamp;
325+
*timestamp = U256::from(self.timestamp);
326326
*gas_limit = self.gas_limit;
327327
*basefee = self.base_fee_per_gas.unwrap_or_default();
328328
*difficulty = self.difficulty;
@@ -408,7 +408,7 @@ impl Block for alloy::rpc::types::BlockOverrides {
408408
*difficulty = U256::from(*d);
409409
}
410410
if let Some(t) = &self.time {
411-
*timestamp = *t;
411+
*timestamp = U256::from(*t);
412412
}
413413
if let Some(g) = &self.gas_limit {
414414
*gas_limit = *g;

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub type Ctx<Db, J = Journal<Db>, C = ()> = Context<BlockEnv, TxEnv, CfgEnv, Db,
1212

1313
/// EVM with default env types and adjustable DB.
1414
pub type Evm<Db, Insp = NoOpInspector, Inst = Instructions<Db>, Prec = EthPrecompiles> =
15-
revm::context::Evm<Ctx<Db>, Insp, Inst, Prec>;
15+
revm::context::Evm<Ctx<Db>, Insp, Inst, Prec, Frame>;
1616

1717
/// Handler table for EVM opcodes.
1818
pub type Instructions<Db> = EthInstructions<EthInterpreter, Ctx<Db>>;

src/inspectors/layer.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use revm::{
22
interpreter::{
3-
CallInputs, CallOutcome, CreateInputs, CreateOutcome, EOFCreateInputs, Interpreter,
3+
CallInputs, CallOutcome, CreateInputs, CreateOutcome, Interpreter,
44
InterpreterTypes,
55
},
66
primitives::{Address, Log, U256},
@@ -117,27 +117,6 @@ where
117117
self.inner.create_end(context, inputs, outcome);
118118
}
119119

120-
fn eofcreate(
121-
&mut self,
122-
context: &mut Ctx,
123-
inputs: &mut EOFCreateInputs,
124-
) -> Option<CreateOutcome> {
125-
if let Some(outcome) = self.outer.eofcreate(context, inputs) {
126-
return Some(outcome);
127-
}
128-
self.inner.eofcreate(context, inputs)
129-
}
130-
131-
fn eofcreate_end(
132-
&mut self,
133-
context: &mut Ctx,
134-
inputs: &EOFCreateInputs,
135-
outcome: &mut CreateOutcome,
136-
) {
137-
self.outer.eofcreate_end(context, inputs, outcome);
138-
self.inner.eofcreate_end(context, inputs, outcome);
139-
}
140-
141120
fn selfdestruct(&mut self, contract: Address, target: Address, value: U256) {
142121
self.outer.selfdestruct(contract, target, value);
143122
self.inner.selfdestruct(contract, target, value);

src/inspectors/set.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::collections::VecDeque;
22

33
use revm::{
44
interpreter::{
5-
CallInputs, CallOutcome, CreateInputs, CreateOutcome, EOFCreateInputs, Interpreter,
5+
CallInputs, CallOutcome, CreateInputs, CreateOutcome, Interpreter,
66
InterpreterTypes,
77
},
88
primitives::{Address, Log, U256},
@@ -125,29 +125,6 @@ where
125125
self.inspectors.iter_mut().for_each(|i| i.create_end(context, inputs, outcome))
126126
}
127127

128-
fn eofcreate(
129-
&mut self,
130-
context: &mut Ctx,
131-
inputs: &mut EOFCreateInputs,
132-
) -> Option<CreateOutcome> {
133-
for inspector in self.inspectors.iter_mut() {
134-
let outcome = inspector.eofcreate(context, inputs);
135-
if outcome.is_some() {
136-
return outcome;
137-
}
138-
}
139-
None
140-
}
141-
142-
fn eofcreate_end(
143-
&mut self,
144-
context: &mut Ctx,
145-
inputs: &EOFCreateInputs,
146-
outcome: &mut CreateOutcome,
147-
) {
148-
self.inspectors.iter_mut().for_each(|i| i.eofcreate_end(context, inputs, outcome))
149-
}
150-
151128
fn selfdestruct(&mut self, contract: Address, target: Address, value: U256) {
152129
self.inspectors.iter_mut().for_each(|i| i.selfdestruct(contract, target, value))
153130
}

src/inspectors/spanning.rs

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use alloy::{consensus::constants::SELECTOR_LEN, hex};
22
use revm::{
33
context::{ContextTr, LocalContextTr},
44
interpreter::{
5-
CallInput, CallInputs, CallOutcome, CreateInputs, CreateOutcome, EOFCreateInputs,
5+
CallInput, CallInputs, CallOutcome, CreateInputs, CreateOutcome,
66
Interpreter, InterpreterTypes,
77
},
88
Inspector,
@@ -157,23 +157,6 @@ impl SpanningInspector {
157157
fn enter_create<Ctx>(&mut self, context: &Ctx, inputs: &CreateInputs) {
158158
self.active.push(self.span_create(context, inputs).entered())
159159
}
160-
161-
/// Create a span for an EOF `CREATE`-family opcode.
162-
fn span_eof_create<Ctx>(&self, _context: &Ctx, inputs: &EOFCreateInputs) -> Span {
163-
runtime_level_span!(
164-
self.level,
165-
"eof_create",
166-
caller = %inputs.caller,
167-
value = %inputs.value,
168-
gas_limit = inputs.gas_limit,
169-
kind = ?inputs.kind,
170-
)
171-
}
172-
173-
/// Create, enter, and store a span for an EOF `CREATE`-family opcode.
174-
fn enter_eof_create<Ctx>(&mut self, context: &Ctx, inputs: &EOFCreateInputs) {
175-
self.active.push(self.span_eof_create(context, inputs).entered())
176-
}
177160
}
178161

179162
impl<Ctx, Int> Inspector<Ctx, Int> for SpanningInspector
@@ -207,24 +190,6 @@ where
207190
) {
208191
self.exit_span();
209192
}
210-
211-
fn eofcreate(
212-
&mut self,
213-
context: &mut Ctx,
214-
inputs: &mut EOFCreateInputs,
215-
) -> Option<CreateOutcome> {
216-
self.enter_eof_create(context, inputs);
217-
None
218-
}
219-
220-
fn eofcreate_end(
221-
&mut self,
222-
_context: &mut Ctx,
223-
_inputs: &EOFCreateInputs,
224-
_outcome: &mut CreateOutcome,
225-
) {
226-
self.exit_span();
227-
}
228193
}
229194

230195
/// Resolve a selector from the [CallInputs].

src/inspectors/timeout.rs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::helpers::Ctx;
22
use revm::{
33
context_interface::context::ContextError,
44
interpreter::{
5-
CallInputs, CallOutcome, CreateInputs, CreateOutcome, EOFCreateInputs, Interpreter,
5+
CallInputs, CallOutcome, CreateInputs, CreateOutcome, Interpreter,
66
InterpreterTypes,
77
},
88
Database, Inspector,
@@ -108,23 +108,4 @@ impl<Db: Database, Int: InterpreterTypes> Inspector<Ctx<Db>, Int> for TimeLimit
108108
) {
109109
check_timeout!(self, ctx);
110110
}
111-
112-
fn eofcreate(
113-
&mut self,
114-
ctx: &mut Ctx<Db>,
115-
_inputs: &mut EOFCreateInputs,
116-
) -> Option<CreateOutcome> {
117-
check_timeout!(self, ctx);
118-
119-
None
120-
}
121-
122-
fn eofcreate_end(
123-
&mut self,
124-
ctx: &mut Ctx<Db>,
125-
_inputs: &EOFCreateInputs,
126-
_outcome: &mut CreateOutcome,
127-
) {
128-
check_timeout!(self, ctx);
129-
}
130-
}
111+
}

0 commit comments

Comments
 (0)