-
Notifications
You must be signed in to change notification settings - Fork 320
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: committed tx may not have been executed #2525
Conversation
75b9c2a
to
e8a5f54
Compare
e8a5f54
to
6487f28
Compare
The code looks good to me, but can you enlighten me re: the higher level context? Is this setting the stage for async execution? Charging fees for transactions we don't execute? Something else? |
Yup, charging fees for transactions that we didn't execute which is a step on the way to async execution. You can see how the code will be used here: https://github.com/anza-xyz/agave/pull/2425/files#diff-ed47b4a0198313377e091bb3957bbbc63d937805426d1b2b6de39d0a50d32a0cR3901 |
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.
Looks good, makes sense to me
@@ -51,7 +50,7 @@ impl ExecutedTransaction { | |||
} | |||
} | |||
|
|||
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] | |||
#[derive(Clone, Debug, Eq, PartialEq)] | |||
pub struct TransactionExecutionDetails { |
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 would be nice if we could remove this struct entirely, now that we have struct CommittedTransaction
which is almost identical.
I think we've got too many struct types :)
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.
Sorry I'm a struct maxi
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.
LGTM
Problem
Refactor
CommittedTransaction
struct to allow representing transactions that were not executed but still committedSummary of Changes
execution_details
field inCommittedTransaction
to remove the notion that those fields came from an executionTransactionCommitResultExtensions::transaction_result
method since it is easy to misuse given that it flattens processing and execution errorsTransactionCommitDetails
struct for thebank_hash_details
module that mirrorsCommittedTransaction
so thatCommittedTransaction
itself doesn't need to be serializableFixes #