-
Notifications
You must be signed in to change notification settings - Fork 302
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: add TransactionParameters
and DetectionData
fields in TransactionBody
#2839
Conversation
In this commit I also modified the `TransactionBodyView` such that it represents the same structure as the current `TransactionBody`. Since there is no private data in either the `DetectionData` or the `TransactionParameters`, there are no view structures added for those structs.
047a0cd
to
eb2ddfd
Compare
proto/penumbra/penumbra/core/transaction/v1alpha1/transaction.proto
Outdated
Show resolved
Hide resolved
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 looks good, but I think we should pull out the encrypted memo into another proto message so that the TransactionBody
only has sub-messages as fields. (We don't have to do anything on the domain types, I think just changing the protos is sufficient for forward compatibility).
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 agree with @hdevalence about the protobuf comments.
Had a very minor nit in terms of code simplification as well.
Otherwise, looks good to me! :)
This has had review comments addressed - lmk if there is any other feedback else I'll plan to merge in the next few hours |
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 to me!
Closes #2784
The scope of this is refactoring the
TransactionBody
to contain two new fields:TransactionParameters
(new struct) that contains the expiry height and chain ID (both previously fields directly on theTransactionBody
).DetectionData
(new struct) that contains the Fuzzy Message Detection (FMD) clues for that transaction (previously a field directly on theTransactionBody
).In this PR I have not modified the EffectHash implementation (see #2808). The idea is (per the comment at the end of #2784):
Note: CI job
Protobuf / Lint protobuf (pull_request)
will fail during the check for breaking changes to the protobufs, but breaking changes to the protobufs are unavoidable here.