-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: vm2 account validation #2863
Merged
slowli
merged 53 commits into
main
from
jms-pla-908-account-validation-properly-handle-when-out-of-gas
Dec 19, 2024
Merged
feat: vm2 account validation #2863
slowli
merged 53 commits into
main
from
jms-pla-908-account-validation-properly-handle-when-out-of-gas
Dec 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joonazan
force-pushed
the
jms-pla-908-account-validation-properly-handle-when-out-of-gas
branch
2 times, most recently
from
September 12, 2024 16:45
5055b79
to
b3c6f60
Compare
joonazan
force-pushed
the
jms-pla-908-account-validation-properly-handle-when-out-of-gas
branch
4 times, most recently
from
October 8, 2024 19:04
a79945d
to
d3539bb
Compare
joonazan
changed the base branch from
main
to
aov-pla-1038-integrate-new-vm-into-api-server-no-tracers
October 10, 2024 11:47
joonazan
force-pushed
the
jms-pla-908-account-validation-properly-handle-when-out-of-gas
branch
from
October 10, 2024 16:07
02e190e
to
5c80c9c
Compare
joonazan
force-pushed
the
jms-pla-908-account-validation-properly-handle-when-out-of-gas
branch
from
October 22, 2024 17:01
71e56d8
to
372f76a
Compare
joonazan
commented
Oct 23, 2024
Base automatically changed from
aov-pla-1038-integrate-new-vm-into-api-server-no-tracers
to
main
October 25, 2024 14:07
joonazan
force-pushed
the
jms-pla-908-account-validation-properly-handle-when-out-of-gas
branch
from
October 25, 2024 20:13
d82c52a
to
0074bba
Compare
joonazan
changed the title
feat: vm2 account validation gas limit
feat: vm2 account validation
Oct 25, 2024
slowli
reviewed
Oct 28, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for a delayed review.
core/lib/multivm/src/versions/testonly/account_validation_rules.rs
Outdated
Show resolved
Hide resolved
core/lib/multivm/src/versions/testonly/account_validation_rules.rs
Outdated
Show resolved
Hide resolved
core/lib/multivm/src/versions/testonly/account_validation_rules.rs
Outdated
Show resolved
Hide resolved
etc/contracts-test-data/contracts/custom-account/validation-rule-breaker.sol
Outdated
Show resolved
Hide resolved
- even after out of gas, some calls are performed, so we have to assume that one out of gas anywhere means that is the reason for panic - reverts are considered successes in validation
…le-when-out-of-gas
joonazan
force-pushed
the
jms-pla-908-account-validation-properly-handle-when-out-of-gas
branch
from
November 14, 2024 12:10
2c8cd98
to
40484a7
Compare
slowli
reviewed
Nov 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some preliminary comments; will look through the PR once again tomorrow.
…le-when-out-of-gas
…le-when-out-of-gas
slowli
approved these changes
Dec 19, 2024
slowli
deleted the
jms-pla-908-account-validation-properly-handle-when-out-of-gas
branch
December 19, 2024 11:01
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 19, 2024
🤖 I have created a release *beep* *boop* --- ## [25.4.0](core-v25.3.0...core-v25.4.0) (2024-12-19) ### Features * add support for custom genesis state ([#3259](#3259)) ([3cffdb2](3cffdb2)) * **consensus:** Added view_timeout to consensus config ([#3383](#3383)) ([fc02a8f](fc02a8f)) * Support stable compiler for VM (and some other crates) ([#3248](#3248)) ([cbee99d](cbee99d)) * vm2 account validation ([#2863](#2863)) ([af149a0](af149a0)) ### Bug Fixes * **contract-verifier:** Fix version extraction in gh resolver ([#3378](#3378)) ([9a10dcf](9a10dcf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <zksync-era-bot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements an account validation gas limit and the validation tracer for vm2, along with better tests for validation.
Instead of a second gas limit like in vm_latest, the normal gas limit is used. Unfortunately this means that the VM is not safe to use in the sequencer until we forbid the use of gasleft. I didn't do it here because it requires something like taint analysis and could break existing contracts that didn't know that gasleft is forbidden.