Skip to content

Commit

Permalink
fix: EOF validation in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Aug 9, 2024
1 parent 0b5aec1 commit e3424da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/revmc/src/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ impl<B: Backend> EvmCompiler<B> {
if !self.config.validate_eof {
return Ok(());
}
revm_interpreter::analysis::validate_eof(eof).map_err(|e| match e {
revm_interpreter::analysis::validate_eof_inner(eof, None).map_err(|e| match e {
revm_interpreter::analysis::EofError::Decode(e) => e.into(),
revm_interpreter::analysis::EofError::Validation(e) => {
eyre!("validation error: {e:?}")
Expand Down
2 changes: 1 addition & 1 deletion crates/revmc/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ tests! {
expected_stack: &[U256::from_be_slice(&DEF_DATA[..32])],
expected_gas: 3,
}),
// TODO: Revm does not allow out-of-bounds `DATALOADN`. Is this right?
// NOTE: out-of-bounds `DATALOADN` is not allowed.
// dataloadn2(@raw {
// bytecode: &eof(&[op::DATALOADN, 0x00, 63, op::STOP]),
// spec_id: SpecId::PRAGUE_EOF,
Expand Down

0 comments on commit e3424da

Please sign in to comment.