-
Notifications
You must be signed in to change notification settings - Fork 997
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
Signing root problems #1487
Labels
Comments
Yes! +1 for alternative 1
|
+1 for alternative 1 |
1 similar comment
+1 for alternative 1 |
Support alternative 1.
This would definitely be useful! |
protolambda
added a commit
that referenced
this issue
Nov 22, 2019
This was referenced Nov 22, 2019
protolambda
added a commit
that referenced
this issue
Dec 3, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quick definition
hash_tree_root
merkleizes all fieldssigning_root
merkleizes all fields except the last.Example:
hash_tree_root
:H(H(slot, parent_root), H(state_root, body))
signing_root
:H(H(H(slot, parent_root), H(state_root, body)), H(H(signature, Z[0]), Z[1]))
Why?
signing_root
on-chain in case of data types with a signature, since the signature is already verified (as part of block processing)signing_root
provides the hash to sign and createsignature
with.Why not?
block_root
, but expanding it into a block header or full block is not possible without knowing that it's a signing root.some_msg_root: Root[FieldTypeWithoutSig]
some_msg_root: SigRoot[FieldTypeWithSig]
,some_signed_msg_root: HashRoot[FieldTypeWithSig]
.BeaconBlock
as a tree you havehash_tree_root
andsinging_root
trees.a
andb
, cacheH(a,b)
at the tree node.BeaconBlock
, but only as a by-product of current field count).Alternatives?
signing_root
:BeaconBlock
andSignedBeaconBlock
.hash_tree_root(SignedBeaconBlock) == H(hash_tree_root(BeaconBlock), signature)
SigRoot
/HashRoot
confusion or duplicate choices of representation.Signed[MsgType]
helper type to wrap any container with a signaturesigning_root
stays.HashRoot
andSigRoot
, both derived fromBytes32
HashRoot
/SigRoot
BeaconBlock
still has two different tree representations.SigRoot
does not fit due to different message / signature requirements.Edge cases
DepositData
in the spec: hash-tree-roots with signatures included are part of the deposits list root. But processing the signature is done with signing root.process_deposit
: We do not like to change the spec here: but removal of signing root doesn't require a change to the deposit contract. We just need to define aDepositMsg
with the fields that were signed over, functionally producing the same old signing_root behavior.Related
Expansions/summaries are difficult with two root variants and effectively different trees:
Root[UnderlyingType]
to easily expand toUnderlyingType
(and its further expansions). With two root types this gets difficult.Proposal
Since SSZ itself is not quite frozen, but the core functionality for Phase 0 was, so this proposal will go slower and through more review.
The text was updated successfully, but these errors were encountered: