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.
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
Changes for predicate gas metering #448
Changes for predicate gas metering #448
Changes from 6 commits
192182d
ba67f10
5dc89a8
a1c74f6
a48a01e
28f65ce
f4a249b
2a6660a
2a77c61
69aeabc
1dd020c
3bb55b4
9b568f8
50919fb
f8a432d
60429a9
150118e
c69d49a
8fa27e9
0e0c427
6457457
ef45cbe
6f9c9e6
9d4ad6b
bce51d3
130d345
17150f2
cb85d59
941dd11
f7883b7
f9f941c
908cce7
994e528
d2cabd4
13acab2
fb4d390
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Hmmm. There's a few issues with this:
Overall, I'd prefer something like a fixed max gas for each predicate, independently. And this max gas can be a consensus rule.
If the gas schedule is changed, then predicates may become invalid. But that's the case even if we allow users to define the max gas since there's a hard cap in the form of the block 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.
Good points. Having a per predicate gas limit would be better for parallelization. Would there be both a user provided per-predicate gasLimit + consensus rule max gas per predicate? Or would each predicate always assume it has the consensus based max gas, potentially locking up more funds than needed for execution?
The main benefits of using the tx-level gas limit as opposed to predicate level is:
Some ways to do parallel execution with this approach could be:
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.
We had a call with @FuelLabs/client and @adlerjohn to discuss this in more detail - summarizing the notes here:
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.
And we can execute the predicate without a
dry-run
on the SDK side potentially in the future(because we don't need access to the on-chain state)