Closed jtraglia closed 2 months ago
Extra data of 0x
is an empty value. In YAML strings don't have to be quoted, as far as I'm aware. You will find that consensus and execution nodes are a little lax when it comes to formatting, so it's likely that you will have to handle that situation.
@mcdee I'm not entirely sure how to fix this 0x
issue. I can fix our marshaled output, but the test code will marshal it to a string, which has a different value. It will marshal it to 0
(not 0x
) there.
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?
Ah I found that you did this for Capella. I'll copy this:
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: