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

SSZ impl fixes #960

Merged
merged 5 commits into from
Apr 18, 2019
Merged

SSZ impl fixes #960

merged 5 commits into from
Apr 18, 2019

Conversation

protolambda
Copy link
Collaborator

@protolambda protolambda commented Apr 18, 2019

Cleaned up the minimal_ssz.py a bit, and fixed some bugs in the progress.

  • vectors/lists where mixed up in serialization somewhere, incorrect serialization
  • vector <-> list typing unclear at times, resulting in more funny serialization
  • improved structure, generalized container encoding a bit using helper functions
  • documented the magic

@protolambda protolambda changed the title Ssz impl fixes SSZ impl fixes Apr 18, 2019
@protolambda protolambda requested a review from djrtwo April 18, 2019 04:55
@protolambda
Copy link
Collaborator Author

Tested the ssz implementation with my other SSZ work. I have ~10K generated test-cases (random, zeroed, nil-length, max value, chaotic mix, etc.) generated from this, and ZRNT (after a few bugfixes) produces the same SSZ serialization/tree-roots 🎉

@protolambda protolambda added the scope:SSZ Simple Serialize label Apr 18, 2019
test_libs/pyspec/eth2spec/utils/minimal_ssz.py Outdated Show resolved Hide resolved
test_libs/pyspec/eth2spec/utils/minimal_ssz.py Outdated Show resolved Hide resolved
test_libs/pyspec/eth2spec/utils/minimal_ssz.py Outdated Show resolved Hide resolved
test_libs/pyspec/eth2spec/utils/minimal_ssz.py Outdated Show resolved Hide resolved
@protolambda protolambda requested a review from hwwhww April 18, 2019 09:37
@JustinDrake JustinDrake merged commit d8a4a48 into dev Apr 18, 2019
@djrtwo djrtwo deleted the ssz-impl-fixes branch April 18, 2019 17:48
djrtwo added a commit that referenced this pull request Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:SSZ Simple Serialize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants