-
Notifications
You must be signed in to change notification settings - Fork 239
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
refactor: load transaction result supports fee only transactions #2527
Conversation
6182a23
to
194fc18
Compare
svm/src/account_loader.rs
Outdated
pub enum TransactionLoadResult { | ||
Loaded(LoadedTransaction), | ||
FeesOnly(FeesOnlyTransaction), | ||
NotLoaded(TransactionError), | ||
} |
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.
Having brief descriptions of each variant would be great here imo.
Particularly good to mention that FeesOnly
is still committed and also will affect nonce (not strictly fees only?).
edit: I guess rn they are not, so maybe we don't need to mention that 🤦♂️
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.
Let me know what you think of the description I added. I think you're right that documenting how nonces are handled for fees-only transactions is going to be really important to avoid confusion, probably during the PR that adds support for committing such transactions
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.
Nvm, I just added a bit more to the FeesOnly
comment to talk about nonces as well.
c32af39
to
5031885
Compare
Problem
In order to support fee validated transactions that aren't executable, transaction account loading needs to be able to indicate the difference between fee validation errors and other account loading errors that happen post-fee validation
Summary of Changes
TransactionLoadResult
type alias with an enum that includes a variant forFeeOnly
transactions which have passed fee validation but cannot be executed due to an account loading errorFeesOnlyTransaction
struct which holds all relevant details for committing the aforementioned "fee-only" transactions to the ledger. Note that these details aren't used yet since this PR doesn't actually change any behavior to allow such transactions to be committed, this is just plumbing for now.. we still reject transactions unless they are executable.Fixes #