-
Notifications
You must be signed in to change notification settings - Fork 2
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
correct magic bytes values in readme #2
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
@@ -18,7 +18,7 @@ Note that we have only tested it on [AWS CloudHSM](https://aws.amazon.com/cloudh | |||
|
|||
Please note that this software does not provide any authentication or authorization. You will need to take care of that yourself. It simply returns the signature for valid payloads, after performing some checks: | |||
* Is the message a valid payload? | |||
* Does the message begin with a 0x01 or 0x02? Indicating it is a baking or endorsement, rather than a 0x03 transfer. | |||
* Does the message begin with a 0x11, 0x12 or 0x13? Indicating it is a baking or endorsement, rather than a 0x03 transfer. |
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.
0x03 could also be votes now and not just transfers. The signer checks for that:
tezos-kms-signer/src/sigreq.py
Lines 36 to 53 in 926601f
elif self.data[0] == 0x03: # Operation, for now, we only do ballots | |
self.chainid = None | |
self.type = "Unknown operation" | |
self.blockhash = self.data[1:32] # The block hash | |
if self.data[33] == 0x06: # 0x06 is a ballot | |
self.pkh_type = self.data[34] # Public Key Hash type | |
self.pkh = self.data[35:55] # Public Key Hash | |
self.period = self.data[55:59] | |
self.proposal = self.data[59:91] | |
if self.data[91] == 0x00: | |
self.type = "Ballot" | |
self.vote = "yay" | |
elif self.data[91] == 0x01: | |
self.type = "Ballot" | |
self.vote = "nay" | |
elif self.data[91] == 0x02: | |
self.type = "Ballot" | |
self.vote = "pass" |
Also maybe add
* Does the message begin with a 0x11, 0x12 or 0x13? Indicating it is a baking or endorsement, rather than a 0x03 transfer. | |
* Does the message begin with a 0x11, 0x12 or 0x13? Indicating it is a baking, preendorsement, or endorsement, rather than a 0x03 transfer. |
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.
actually we should forbid any 0x03 operation. With a consensus key baker, you vote with the baker key, not the consensus key.
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.
That's assuming all users would use a consensus key. But i don't think we need to restrict them to that. As far as i can tell, there is no issue with allowing votes. If we keep the voting we should add in that voting ops are accepted.
Co-authored-by: Aryeh Harris <[email protected]>
No description provided.