-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add verification on transaction dry_run that they don't spend more than block gas limit #2151
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
9bea61a
Add verification on transaction dry_run that they don't spend more th…
AurelienFT b3eb785
Remove block production check max gas
AurelienFT 821a50d
Merge branch 'master' into add_limit_dryrun_tx
AurelienFT 4aadb2e
Add test dry_run above limit API.
AurelienFT e0b3c14
Merge branch 'add_limit_dryrun_tx' of github.com:FuelLabs/fuel-core i…
AurelienFT 103abe9
Update CHANGELOG
AurelienFT e2512fb
format
AurelienFT 576ea31
Clippy fix.
AurelienFT 62cd5c5
Fix usage of saturating_add
AurelienFT d5093b5
Apply suggestions from code review
AurelienFT 462ea8f
Reorganise code and better match on tests
AurelienFT 27b466e
Merge branch 'master' into add_limit_dryrun_tx
AurelienFT 2548ebd
Add gas_limit check in executor
AurelienFT 53aa5ab
try to gather data on test failing
AurelienFT 8449263
temp disable wasm check
AurelienFT 7efd477
readd wasm
AurelienFT ff0d5e0
format
AurelienFT 3fa8626
fix dbg
AurelienFT 72ca9b7
remove added test
AurelienFT 8647dc6
Fix test in wasm
AurelienFT 2904e99
Reduce duplication of the code
xgreenx fb36a9a
Change order
xgreenx 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
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.
I was thinking maybe to add this logic directly into the
dry_run
method of the executor=)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.
From my point of view, the issue mentionned API AND in the executor. I placed it in the API and block producer, I have removed the block producer part in order to add it to the executor.
But when looking at the executor code it seems that it already handfle the case correctly in
process_l2_txs()
fuel-core/crates/services/executor/src/executor.rs
Lines 566 to 570 in f5240cb
The problem is that it doesn't return an error but just doesn't execute remaning transactions so I think it's great to have the check in the API also to avoid uncessary precompute etc.. and also return a meaningful error.
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.
In the case of dry run we currently ignore
remaining_gas_limit
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.
@xgreenx Could you point me to this ? Because I don't see where is the behavior difference
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.
Done.