-
Notifications
You must be signed in to change notification settings - Fork 26
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(levm): error handling ef_tests (Part 1) #1319
Merged
Merged
Changes from 23 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
49a1967
add errors
JereSalo 8c0088a
add is_internal function to vmerror
JereSalo cfeee50
remove previous validate_transaction
JereSalo 3167f2c
change execute, mainly for propagating internal errors
JereSalo 74e4923
add validate_transaction (not working yet) and gas_price_or_max_fee_p…
JereSalo 1e0449d
change return type of has_code in Account
JereSalo c62cfad
add intrinsic gas function
JereSalo f4566c9
add necessary constants
JereSalo d24ec11
add some fields to environment and think of gas_price as effective ga…
JereSalo 6ac5c20
add unwraps to execute
JereSalo b01ec97
change blob hashes type and add other paremeters in vm.rs
JereSalo e5196ec
make small changes in type 3 validations
JereSalo 99a1e21
fix behavior for op_blobhash
JereSalo 88c50c3
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
JereSalo 40b6b8a
fix ef_tests environment for levm
JereSalo 8d62d29
stop using effective gas price in levm
JereSalo 85b7dd6
comment some stuff in validate transaction
JereSalo d94a98a
delete add_intrinsic_gas (out of scope), and change some things in va…
JereSalo 2f71d26
last commit was wrong, this one is the real one :)
JereSalo d13cf3b
remove import gas price
JereSalo 0f2f7a1
Merge branch 'main' into levm/ef-tests-error-handling
JereSalo 68a3191
add unwrap() to execute in edge cases tests
JereSalo 79b14d6
merge main into branch
JereSalo 8e882bc
return error when not finding transaction levm_runner
JereSalo 8981d83
remove storage constants that were not used
JereSalo c9b747f
remove comment from revert create
JereSalo fc1c17d
Merge branch 'main' into levm/ef-tests-error-handling
JereSalo ba57edf
fix clippy lint in execute
JereSalo 793d6ad
Merge branch 'main' into levm/ef-tests-error-handling
JereSalo f80c900
merge
JereSalo 7455a1d
change rust version levm workflow
JereSalo 4897293
Merge branch 'main' into levm/ef-tests-error-handling
JereSalo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ pub const MEMORY_EXPANSION_QUOTIENT: usize = 512; | |
pub const TX_BASE_COST: U256 = U256([21000, 0, 0, 0]); | ||
|
||
pub const MAX_CODE_SIZE: usize = 0x6000; | ||
pub const INIT_CODE_MAX_SIZE: usize = 49152; | ||
pub const MAX_CREATE_CODE_SIZE: usize = 2 * MAX_CODE_SIZE; | ||
|
||
pub const INVALID_CONTRACT_PREFIX: u8 = 0xef; | ||
|
@@ -44,6 +45,12 @@ pub const MAX_BLOB_NUMBER_PER_BLOCK: usize = 6; | |
pub const TARGET_BLOB_GAS_PER_BLOCK: U256 = U256([393216, 0, 0, 0]); // TARGET_BLOB_NUMBER_PER_BLOCK * GAS_PER_BLOB | ||
pub const MIN_BASE_FEE_PER_BLOB_GAS: U256 = U256([1, 0, 0, 0]); | ||
pub const BLOB_BASE_FEE_UPDATE_FRACTION: U256 = U256([3338477, 0, 0, 0]); | ||
pub const MAX_BLOB_COUNT: usize = 6; | ||
pub const VALID_BLOB_PREFIXES: [u8; 2] = [0x01, 0x02]; | ||
// Storage constants | ||
pub const COLD_STORAGE_ACCESS_COST: U256 = U256([2100, 0, 0, 0]); | ||
pub const WARM_ADDRESS_ACCESS_COST: U256 = U256([100, 0, 0, 0]); | ||
pub const BALANCE_COLD_ADDRESS_ACCESS_COST: U256 = U256([2600, 0, 0, 0]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This cost constants should be in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ended up removing them cause they were not used. |
||
|
||
// Block constants | ||
pub const LAST_AVAILABLE_BLOCK_LIMIT: U256 = U256([256, 0, 0, 0]); | ||
|
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Here instead of using
.unwrap()
you can return anEFTestRunnerError
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.
8e882bc