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

Multivm tests for era_vm #234

Merged
merged 24 commits into from
Aug 20, 2024
Merged

Multivm tests for era_vm #234

merged 24 commits into from
Aug 20, 2024

Conversation

MarcosNicolau
Copy link

What ❔

This pr makes the necessary changes to test the era_vm integration with the bootloader:

  • Adds a basic tester module for managing the tests and comparing final states with the original vm.
  • Adds the most basic bootloader test to check that everything works.

To run the tests do: cargo test era_vm under core/lib/multivm. You should see:

running 4 tests
test versions::era_vm::transaction_data::tests::test_consistency_with_encoding_length ... ok
test versions::era_vm::bootloader_state::utils::tests::test_basic_pubdata_building ... ok
test versions::era_vm::tests::bootloader::test_bootloader_out_of_gas ... ok
test versions::era_vm::tests::bootloader::test_dummy_bootloader ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 143 filtered out; finished in 0.83s

This pr depends on the adaptation on era_vm, see here.

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.

@MarcosNicolau MarcosNicolau changed the title Add basic test setup for era_vm Multivm tests for era_vm Aug 20, 2024
@MarcosNicolau
Copy link
Author

This pr has grown and now should include the fixes for all remaining tests. The following changes have been made to the era_vm bootloader:

  • Implements get_current_execution_state.
  • Returns vm execution logs and statistics in inspect.
  • Implements refunds.
  • Implements all remaining hooks: PubdataRequested, AskOperatorForRefund, PostResult and NotifyAboutRefund.
  • Implements snapshots and rollbacks.

This make all tests pass except for:

  • transfer: the two of them.
  • refunds: only test_predetermined_gas_refund.
  • simple_execution.

I believe these tests have little to do with the bootloader, I think we are doing something wrong on the era_vm.

@MarcosNicolau MarcosNicolau merged commit 9cd4f22 into era_vm_integration_v2 Aug 20, 2024
9 of 44 checks passed
@MarcosNicolau MarcosNicolau deleted the tests/era_vm branch August 20, 2024 18:03
@MarcosNicolau MarcosNicolau mentioned this pull request Aug 21, 2024
4 tasks
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