Skip to content
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

Revert breaking encoding changes #361

Closed
wants to merge 4 commits into from

Conversation

moshe-blox
Copy link
Contributor

fastssz was upgraded in #324 and it changed the roots for ConsensusData, SignedMessage and SSVMessage, which would be a fork.

This fastssz upgrade included a crucial hashing fix, replacing PutBytes with Append in order to prevent double-merkleization in HashTreeRoot methods, thereby changing roots for []byte fields exceeding 32 bytes.

It's noted that Beacon spec tests appear unaffected by this change, as they don't contain fields exceeding the threshold for the double-merkleization bug. However, we don't know that Beacon messages are absolutely not impacted.

Therefore, we propose inspecting the changes in _encoding.go files between the currently and previously imported versions of go-eth2-client, to ensure that any change from PutBytes to Append is encoding a field which can not exceed 32 bytes in size.

Two more changes were done to preserve backwards-compatibility:

  • Encoding of types.Contribution was copied over from v0.3.4
  • spec.DataVersion is now being decremented in encodings and incremented in decodings, because all of the values were incremented by 1 in go-eth2-client.

@GalRogozinski
Copy link
Contributor

Replaced by #362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants