-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Updates to ADR-020 (protobuf signing) #6359
Conversation
I'm on board with 1) and having additional documentation for clarity. I don't think the reduction of |
Okay, so if you are a transaction verifier, you get a |
As a transaction verifier you decode |
Aha – that's interestion. Does it mean that |
|
I don't think this is the case. They store the same content but
This might be the case but I think we need to be able to specify how this encoding works in order to not depend on the implementation specifics of one library. The two clean solutions are:
In a call we decided to go for the later. It is okay to switch back to 1. but please let's not create a specification by reference implementation.
This was my motivation as well, which is why I proposed the structure of |
I agree we should be explicit and using
I'd prefer to stick with 2 as canonicalization has other problems, notably the inability to have non-critical extension fields, malleability when proto2 semantics are used, and implementation complexity.
I honestly think the best compromise is having two tx types - |
Sure, fine for me. I'll update this PR accordingly. |
I added a commit that splits the type into the more convenient @alexanderbez I marked your comment as resolved since it is the same that is discussed here in the main discussion. I guess the 3rd commit addresses it. If not, please feel free to follow up in the latest diff. |
I'll delegate approval/merge/close to @aaronc here 👍 |
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.
@webmaster128 this looks pretty good. I just made a few grammar suggestions and a couple suggestions that hopefully improve clarity. Other than that, I'm fine to merge.
Thanks for your contribution by the way!
Co-authored-by: Aaron Craelius <aaron@regen.network>
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.
Thanks!
Co-authored-by: Aaron Craelius <aaron@regen.network>
All suggestions committed |
Thanks @webmaster128! Can you merge master in please? |
I updated this but the bot refused to merge 🤷♂️. I now set Allow edits by maintainers to true – have fun |
Hmm... I don't see a way to update the base branch myself. Maybe @Mergifyio update. @alexanderbez taking your last comment as an implicit ACK, so when this is up to date, I'm planning to merge. |
Command
|
|
Merged master again. @Mergifyio update? Is this the magic word? |
@webmaster128 is not allowed to run commands |
😝 |
Description
This PR makes two independent changes (one commit each) to ADR-020:
SignDoc
for signing and verification. Before the default way was to assumeserialize_signer(a: SignDoc) == serialize_verifier(b: SignDocRaw)
. This not only assumes that two different protobuf implementations produce the same bytes but also that the two document types have the same binary representation, which (even if true in some cases) makes many assumptions on the binary representation of protobuf and is very hard to understand and review. With this change, we just needserialize_signer(a: SignDoc) == serialize_verifier(b: SignDoc)
, which we agreed is managable to get right in many different implementations. Along the way the outdated typesTxRaw
andSignDocRaw
got obsolete.Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorer