-
Notifications
You must be signed in to change notification settings - Fork 257
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 serialization comprehensiveness #518
Comments
Enable - Attestation - Beaconstate (minimal only) - Deposit - DepositData - ProposerSlashing Updates #518
Enable - Attestation - Beaconstate (minimal only) - Deposit - DepositData - ProposerSlashing Updates #518
Enable - Attestation - Beaconstate (minimal only) - Deposit - DepositData - ProposerSlashing Updates #518
* SSZ signature from EF are always opaque blobs (security issue - #555) Enable - Attestation - Beaconstate (minimal only) - Deposit - DepositData - ProposerSlashing Updates #518 * mv debug_ssz to helpers * Small reorg of the list types * Fix IndexedAttestation, AttesterSlashing and BeaconBlock * Deactivate on mainnet: AttesterSlashing, BeaconBlockBody, IndexedAttestation, Attestation, BeaconBlock * Fix Validators on minimal and mainnet
Update on closing criteria. Currently we are at the "Minimum viable SSZ" state, i.e. serializing/deserializing of consensus objects. To close this issue we need to pass atleast the full SSZ test suite, in particular the one for generic objects: |
How much of this is resolved between: ? |
The Stint types are probably the only thing we are not testing yet |
Stint support was removed a month ago: #1046 |
I know, but it's part of the SSZ spec and there are test cases in the official test suite. I think Mamy's intention for this issue is to mainly track the tests that we are still skipping. |
stint is supported in the stand-alone library: https://github.com/status-im/nim-ssz-serialization/blob/master/ssz_serialization/types.nim#L30 tests cover it too:
Although we don't do value testing in general, we check the computed hash which is equivalent. |
Keeping track of SSZ serialization test suite status.
Generic containers
Those are the container unaffected by mainnet/minimal presets
hashTreeRoot
Serialization of standalone distinct types like
BitList[maxLen] = distinct BitSeq
is not supportedFails
ssz_generic/bitlist/valid/...
. The fix should be a branch for BitList at https://github.com/status-im/nim-beacon-chain/blob/a417edb5fff9d6610e6d149b6fd49f6b107caf44/beacon_chain/ssz/bytes_reader.nim#L61-L160Stack trace
Some are deserialized incorrectly, the hashTreeRoot() is wrong
Some are deserialized correctly
semcheck issue due to Nim generics and bind-once/bind-many on line 146 https://github.com/status-im/nim-beacon-chain/blob/e2b3f0dadb7576c738c86d4f96e65c9599db7436/beacon_chain/ssz/bytes_reader.nim#L123-L147
with added type trace:
samecheck issue on line 146 as well
ssz_generic/boolean/invalid/byte_0x80
.Value
The value is stored in a YAML file and ideally we would need a yaml deserializer extension for nim-serialization.
The obvious ways to test the value would be:
That would require playing with NimYAML formatting and may never work
We would need to implement some mappings between:
Consensus objects
Some types work on minimal but not on mainnet.
Value
TODO: YAML deserializer
Fuzzing
TODO
The text was updated successfully, but these errors were encountered: