-
Notifications
You must be signed in to change notification settings - Fork 68
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
Implement gasLimit Precheck #304
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
2cfb8ad
gasLimit precheck
330060c
Merge branch 'main' into 128-gasLimit-precheck
38dbb4f
fix bignumber comparison issue
b12bfc7
Merge branch 'main' into 128-gasLimit-precheck
56bebbf
Merge branch 'main' into 128-gasLimit-precheck
b3d5a15
Merge branch 'main' into 128-gasLimit-precheck
Ivo-Yankov c8ffccc
test: add acceptance tests
Ivo-Yankov f53ffe8
test: add unit tests
Ivo-Yankov 69b3305
Merge branch 'main' into 128-gasLimit-precheck
Ivo-Yankov 121f46b
chore: resolve merge conflicts
Ivo-Yankov d837526
chore: code smells
Ivo-Yankov 9f80bac
fix: simplify test logic
Ivo-Yankov d29e963
Merge branch 'main' into 128-gasLimit-precheck
Ivo-Yankov 926ace9
chore: resolve conflicts
Ivo-Yankov cbd43e3
nit: resolving comments
Ivo-Yankov 7d54430
Merge branch 'main' into 128-gasLimit-precheck
Ivo-Yankov 877f7ae
gasLimit precheck
f523ed5
test: add acceptance tests
Ivo-Yankov 779a789
test: add unit tests
Ivo-Yankov 18bbc84
chore: resolve merge conflicts
Ivo-Yankov e423acb
fix: simplify test logic
Ivo-Yankov db2a476
chore: resolve conflicts
Ivo-Yankov 2c95d4a
nit: resolving comments
Ivo-Yankov c5d20bd
Rebased and addressed own feedback
Nana-EC 5a08c82
Fix merge conflict
Nana-EC a79c0a3
Merge remote-tracking branch 'origin/128-gasLimit-precheck' into 128-…
Ivo-Yankov df46ede
chore: resolve conflicts
Ivo-Yankov b91cf8c
Merge branch 'main' into 128-gasLimit-precheck
Ivo-Yankov 2998412
test: disable precheck to check if that fixes dapp ci
Ivo-Yankov 8f4c303
test: enable nonce and chainId prechecks
Ivo-Yankov fe35006
test: enable gasLimit precheck
Ivo-Yankov 116672d
fix: wrong intrinsic gas cost for tx with empty data
Ivo-Yankov 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
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.
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.
This was causing a wrong calculation of the gas cost. If
0x
is not removed fromdata
, that counts as 2nonZero
bytes, and the calculated gas cost isTX_BASE_COST + 2 * ISTANBUL_TX_DATA_NON_ZERO_COST
, which meant that transactions with empty data (hbar transfer transactions) could not pass the precheck if the default gasLimit (21000) was used.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.
Nice catch