-
Notifications
You must be signed in to change notification settings - Fork 1k
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
rm signing root (fixes #1487) #1491
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.
- IMHO It’s a bit annoying to see
msg
/Msg
instead ofmessage
/Message
in the spec.- Reason:
msg
is usually coming withsig
, but we usesignature
in the spec. - However, the longer name may be verbose. I'd like to hear what other people's taste is.
- Reason:
- I think the complexity of implementing this change won't be too scary and painful. Mostly many search and replace commands.
(editted)
@hwwhww renamed
|
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.
Although I'm resistant to change, this is very good
specs/core/0_beacon-chain.md
Outdated
@@ -360,6 +372,13 @@ class BeaconBlockHeader(Container): | |||
parent_root: Root | |||
state_root: Root | |||
body_root: Root | |||
``` | |||
|
|||
#### `SignedBeaconBlockHeader` |
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.
Let's group all signed containers in a sub-section below the declaration of other containers. Let's put a brief explanatory text at the top of the sub-section
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.
bump, still prefer this method. The spec building fixes topological ordering so that's fine
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.
See afb9a1d, you can change the wording if you like.
f9f9d30
to
103a66b
Compare
Changed |
LGTM - generally, naming has been brought up as a potential area of improvement and I'd generally agree that it would be good to do a holistic rename round once something like this is merged so that there is structure to the naming ( |
The reasoning for the signing-root removal can be found in #1487
This is a proposal. So far there was reasonable support expressed, but more discussion/suggestions are welcome.
Changelog:
(msg, signature)
type wrappers.SignedContainer[MsgType]
helper type construction. Just want to see it working first.DepositMsg
type to sign the contents over, replicating the exact old signature of signing root. I don't think this is much of a problem, asDepositData
is not a message anyway, and withinDeposit
it is indeed more like data (with a proof) than a message (with a signature).Signed
variants to (block/header intomsg
field, and add thesignature field
)validate_state_root
to just "checked
": the signature signs over the state root. It makes no sense to ignore the state root, but then enforce it partially with the signature check (testing infra previously signed twice: one dummy signature for missing state root, then the real one once the state root could be computed).process_blockheader
is now so clean it could have been aBeaconBlockHeader
as input type. But kept it as block, as scoping it to just the header data only requires the spec to convert from normal block to header. Clients can abstract/interface this nicely how they like it (or nearly keep it as is).SignedBeaconBlock.msg
is aBeaconBlock
, and thehash_tree_root
of thisBeaconBlock
msg is signed over to create signaturesignature
.(msg, signature)
pair.hash_tree_root
everywheresigningroot
🎉Note: left old Phase 1 use of signing root as-is, it's changing anyway with the new PR (see #1483 )
We may want to squash this PR when merging. Or I can rebase and split the test work from the spec changes.