Skip to content

Commit

Permalink
remove last_precompile_cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
montekki committed Aug 29, 2024
1 parent 1855293 commit 72e7bdb
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 18 deletions.
6 changes: 0 additions & 6 deletions eravm-stable-interface/src/state_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ pub trait CallframeInterface {
fn set_aux_heap_bound(&mut self, value: u32);

fn read_code_page(&self, slot: u16) -> U256;

fn last_precompile_cycles(&self) -> usize;
}

#[derive(Copy, Clone, PartialEq, Debug)]
Expand Down Expand Up @@ -348,8 +346,4 @@ impl CallframeInterface for DummyState {
fn read_code_page(&self, _: u16) -> primitive_types::U256 {
unimplemented!()
}

fn last_precompile_cycles(&self) -> usize {
unimplemented!()
}
}
4 changes: 0 additions & 4 deletions src/callframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub struct Callframe<T, W> {
pub heap: HeapId,
pub aux_heap: HeapId,

pub last_precompile_cycles: usize,

/// The amount of heap that has been paid for. This should always be greater
/// or equal to the actual size of the heap in memory.
pub heap_size: u32,
Expand Down Expand Up @@ -112,7 +110,6 @@ impl<T, W> Callframe<T, W> {
exception_handler,
near_calls: vec![],
world_before_this_frame,
last_precompile_cycles: 0,
}
}

Expand Down Expand Up @@ -259,7 +256,6 @@ impl<T, W> Clone for Callframe<T, W> {
calldata_heap: self.calldata_heap,
heaps_i_am_keeping_alive: self.heaps_i_am_keeping_alive.clone(),
world_before_this_frame: self.world_before_this_frame.clone(),
last_precompile_cycles: self.last_precompile_cycles,
}
}
}
2 changes: 0 additions & 2 deletions src/instruction_handlers/far_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ fn far_call<
vm.world_diff.snapshot(),
);

vm.state.current_frame.last_precompile_cycles = program.1;

vm.state.flags = Flags::new(false, false, false);

if abi.is_system_call {
Expand Down
2 changes: 0 additions & 2 deletions src/single_instruction_test/callframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ impl<'a, T: Tracer, W: World<T>> Arbitrary<'a> for Callframe<T, W> {
calldata_heap,
heaps_i_am_keeping_alive: vec![],
world_before_this_frame: WorldDiff::default().snapshot(),
last_precompile_cycles: 0,
};
if u.arbitrary()? {
me.push_near_call(
Expand Down Expand Up @@ -95,7 +94,6 @@ impl<T: Tracer, W> Callframe<T, W> {
calldata_heap: HeapId::from_u32_unchecked(1),
heaps_i_am_keeping_alive: vec![],
world_before_this_frame: WorldDiff::default().snapshot(),
last_precompile_cycles: 0,
}
}
}
4 changes: 0 additions & 4 deletions src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ impl<T, W> CallframeInterface for CallframeWrapper<'_, T, W> {
self.frame.exception_handler
}
}

fn last_precompile_cycles(&self) -> usize {
self.frame.last_precompile_cycles
}
}

impl<T, W> CallframeWrapper<'_, T, W> {
Expand Down

0 comments on commit 72e7bdb

Please sign in to comment.