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

feat: EVM simulator as optional for the server #276

Merged
merged 12 commits into from
Sep 19, 2024

Conversation

IAvecilla
Copy link
Collaborator

@IAvecilla IAvecilla commented Sep 19, 2024

What ❔

List of changes:

  • Added the flag use_evm_simulator and make it configurable from a .toml file.
  • For the list GAS_TEST_SYSTEM_CONTRACTS we check if the evm simulator is on and used the default account bytecode hash and bytecode if it's not.
  • For the BaseSystemContracts struct, we check if the evm simulator is on and used the default account bytecode hash and bytecode if it's not.
  • We made the evm_deploy_tracer optional in the default tracers and use it if the evm simulator is enabled.
  • The EVM_SIMULATOR_HASH constant now checks if the evm simulator is on and used the default account bytecode hash and bytecode if it's not.
  • The SYSTEM_CONTRACTS vec now checks if evm simulator is and reads the bytecode of the EVM_GAS_MANAGER but skips it if it's off, same for the get_system_smart_contracts_from_dir function.
  • Checks if the evm simulator is enabled and add the correct token for the multicall3 in the get_multicall_data function.
  • Make the get_evm_simulator_bytecode_hash optional in the ZkSyncFunctions struct and use it if the evm simulator is enabled.

Why ❔

We need to be able to run zksync-era without the evm simulator contract and keep everything working.

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.

@IAvecilla IAvecilla changed the title EVM simulator as optional for the server feat: EVM simulator as optional for the server Sep 19, 2024
@jrchatruc jrchatruc merged commit f922068 into evm-simulator-base-sc Sep 19, 2024
9 of 24 checks passed
@jrchatruc jrchatruc deleted the optional-evm-simulator branch September 19, 2024 16:29
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.

2 participants