Skip to content

Commit

Permalink
Fix jump_to (#453)
Browse files Browse the repository at this point in the history
* Fix jump_to

* Apply comments
  • Loading branch information
LindaGuiga authored and Nashtare committed Aug 1, 2024
1 parent b0cda17 commit 096386c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions evm_arithmetization/src/generation/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ impl<F: Field> GenerationState<F> {
/// we're jumping to a special location.
pub(crate) fn jump_to(&mut self, dst: usize) -> Result<(), ProgramError> {
self.registers.program_counter = dst;
if self.stack().is_empty() {
// We cannot observe anything as the stack is empty.
return Ok(());
}
if dst == KERNEL.global_labels["observe_new_address"] {
let tip_u256 = stack_peek(self, 0)?;
let tip_h256 = H256::from_uint(&tip_u256);
Expand Down

0 comments on commit 096386c

Please sign in to comment.