-
Notifications
You must be signed in to change notification settings - Fork 23
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
refactor to comply to specs + SSZ enc/dec of spec types #54
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.
LGTM great job on the SSZ madness
Signature phase0.BLSSignature `ssz-size:"96"` | ||
ProposerIndex uint64 | ||
const ( | ||
MAX_CONSTRAINTS_PER_SLOT = 256 |
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.
This should be documented, maybe on our docs website?
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.
I've added a comment above the constant that says this is not final yet, and a related issue #61.
|
||
type SignedConstraints struct { | ||
Message *ConstraintsMessage `json:"message"` | ||
Signature phase0.BLSSignature `ssz-size:"96" json:"signature"` |
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 mark somewhere the fact that we are moving to ECDSA signatures for constraints
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.
I think we're now using 2 different signature types in the relay and mev-boost right?
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.
damn, this is insane, good job
This PR aligns as much as possible the relay codebase to the Bolt specs and closes #49 and #21 . It consists of three main parts:
SignedConstraints
and its inner types (with some tests!). This has been necessary in order to produce a compliant (to consensus-specs) signature digest of the typeConstraintsMessage
.Fortunately, the SSZ work can be re-used in various part of the stack if needed.
NOTE: this PR doesn't introduce Merkle Multiproofs yet. See #55 for more details.