Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVM Simulator Flag #244

Merged
merged 8 commits into from
Aug 30, 2024
Merged

EVM Simulator Flag #244

merged 8 commits into from
Aug 30, 2024

Conversation

gianbelinche
Copy link

What ❔

This PR adds a flag for enabling the evm interpreter, it can be found on etc/env/base/use_evm_simulator.toml

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

UseEvmSimulator::from_env().expect("USE EVM SIMULATOR FLAG SHOULD BE SET");
if !use_evm_simulator.use_evm_simulator {
evm_simulator_bytecode = vec![];
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

let evm_simulator_bytecode = if UseEvmSimulator::from_env().expect("USE EVM SIMULATOR FLAG SHOULD BE SET").use_evm_simulator {
    read_sys_contract_bytecode("", "EvmInterpreter", ContractLanguage::Yul)
} else {
    vec![]
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not possible, because then we need to calculate the hash of that bytecode, if we try to calculate the hash of an empty bytecode it gives an error when running zk init:
Invalid bytecode: ()
We need to still have the hash of the actual interpreter bytecode, and then setting that bytecode to an empty vector.

Copy link

Hey there! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.
Examples of valid PR titles:

  • feat(eth_sender): Support new transaction type
  • fix(state_keeper): Correctly handle edge case
  • ci: Add new workflow for linting

Details:

No release type found in pull request title "EVM Simulator Flag". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@jrchatruc jrchatruc merged commit 35440d7 into evm-equivalence-yul-new Aug 30, 2024
6 of 9 checks passed
@jrchatruc jrchatruc deleted the evm-flag branch August 30, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants