-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix problems with new Electra structs #136
Conversation
@@ -436,7 +436,7 @@ func (e *ExecutionPayload) HashTreeRootWith(hh ssz.HashWalker) (err error) { | |||
hh.MerkleizeWithMixin(elemIndx, byteLen, (1073741824+31)/32) | |||
} | |||
} | |||
hh.MerkleizeWithMixin(subIndx, num, 1073741824) | |||
hh.MerkleizeWithMixin(subIndx, num, 1048576) |
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.
It took me quite a while to find this issue. Why was this auto-generated value used? Have you been manually changing this for previous versions?
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 was addressed in sszgen as per ferranbt/fastssz#127 but not sure if it has made it into a release version yet.
Extra data of |
@mcdee I'm not entirely sure how to fix this func testYAMLFormat(input []byte) string {
val := make(map[string]any)
if err := yaml.UnmarshalWithOptions(input, &val, yaml.UseOrderedMap()); err != nil {
panic(err)
}
... For example, the following. The top line is the expected output, the bottom line is the actual output: Any advice here? |
Pushed a commit which handles that edge case. Also, Hsiao-Wei has acknowledged the issue. I'm going to make a PR to the consensus-specs to get that fixed. The fix might not make it into the next release though. |
This PR fixes the issues discovered by testing with the Electra reference structures.
electra.AggregationAndProof
structure.electra.SignedAggregationAndProof
structure.electra.AttesterSlashing
structure.VersionedAttesterSlashing
structure.VersionedIndexedAttestation
structure.CommitteeBits
(it's 8 bytes not 1 bit vector, confusing).SignedConsolidation
, make message a pointer.ExitsRoot
fromExecutionPayloadHeader
.Consolidations
.MerkleizeWithMixin
forExecutionPayload
.One of the tests is still failing, but I'm pretty sure the ref test is wrong here.
I sent this message to hww: