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
Conditional CU metering #1
base: main
Are you sure you want to change the base?
Conditional CU metering #1
Changes from 1 commit
55e4924
989a88f
6f6e049
19a48f1
08a9f56
9a22dfc
d307391
30f088c
d439937
a69ec93
0aed128
0dfaa4d
7350797
5194227
e8c74ac
100c980
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check failure on line 18 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 196]
Check failure on line 24 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 389]
Check failure on line 28 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 322]
Check failure on line 30 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 341]
Check failure on line 32 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 564]
Check failure on line 34 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 315]
Check failure on line 38 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 127]
Check failure on line 40 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 272]
Check failure on line 41 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 333]
Check failure on line 43 in proposals/simd-XXXX-vm-consume-budget-for-percise-failure.md
GitHub Actions / Markdown Linter
Line length [Expected: 80; Actual: 286]
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.
Not too familiar with InstructionError, wondering if correct to use Requested_cu for any error but
TransactionError::CustomError(_)
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 is the most important part to get right. In Agave's VM, I think it's
I'm not sure exactly what these translate to as
TransactionError
s though.In firedancer, it's maybe something like
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.
indeed, what about
AccessViolation
in agave's VM, should it also be considered as "irregular failure"?I failed to find where EbpfError converted to InstructionError, there are some casting at
bpf_loader
, is it the right place to look at @Lichtso ?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.
It happens here: https://github.com/anza-xyz/agave/blob/7741b250a6e76afc9e7385ceb64c341f4bc21622/programs/bpf_loader/src/lib.rs#L1473
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.
alternatively, instead of charging different CUs based on
TransactionError
at call sites, we could make VM to consume CUs differently - deplete CU meter in case of "irregular failure"; so the call sites (banking stage or replay) don't need to change. I thought this is what @Lichtso implied somewhere.