-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add codec id to message formats #479
Conversation
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.
👍
@@ -84,46 +109,53 @@ library StakingMessages { | |||
pure |
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.
@minghinmatthewlam pointed out that it's kind of odd for the pack/unpackRegisterSubnetValidatorMessage
use different message types (one the request to the P-Chain, and the other the response).
To match the updated ACP-77 spec, maybe we should go with packRegisterSubnetValidtorMessage
and unpackSubnetValidatorRegistrationMessage
? Not opposed to adding the request/response nomenclature otherwise either if people think that's more clear.
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.
Generally makes sense to me. The ACP-77 spec has updated these message format and defined the actual type IDs to be used, so we'll need to update them further here to be functional.
Given this PR doesn't actually match the current spec as is, I'd lean towards including those updates here, but not opposed to doing it in a follow up either.
Given the active iteration on the spec, I've marked this PR as draft and will bring it up to date once the spec is stable. |
Closing in favor of #492 |
Why this should be merged
Fixes #470
Updates the message formats in
StakingMessages
to reflect the latest iteration of ACP-77: avalanche-foundation/ACPs#135How this works
codecID
to all Warp message fields.packRegisterSubnetValidatorMessage
andpackValidationInfo
.packValidationInfo
previously did not include thecodecID
andtypeID
in thevalidationID
calculation.packRegisterSubnetValidatorMessage
packs the full message, including thecodecID
andtypeID
.How this was tested
forge test
How is this documented
n/a