Commit Graph

28 Commits

Author SHA1 Message Date
Echo 0c5ad81145
Fix merkle multiproof documentation (#3928) 2024-09-19 20:34:14 -05:00
Matt Kocubinski 088f77161b fix spec error in get_generalized_index function 2024-07-09 21:26:12 +02:00
danny 9f533cfde1
Merge pull request #3506 from status-im/canonical-json-byte
ssz: `byte` type and canonical JSON mapping
2024-01-11 08:45:20 -07:00
Jacek Sieka 04f5ec595d
remove obsolete comment 2023-11-09 07:51:39 +01:00
Hsiao-Wei Wang 51343f54fe
Fix typing and delete the `signed_sidecar` 2023-10-30 18:28:12 +08:00
Jacek Sieka f2ad012cef
spelling bee and lint torture 2023-09-19 14:23:08 +02:00
Jacek Sieka fe95d7cb6d
ssz: `byte` type and canonical JSON mapping
This PR introduces a new `byte` type equivalent in all aspects to
`uint8` except that it has additional intent and display semantics
attached.

On top of this, the PR adds a canonical JSON mapping to the SSZ
specification, documenting current usage of JSON in tests, API:s and
simplifying future interop work between clients and adjacent
specifications such as the Beacon API. The encoding is appropriate to
use with YAML as well.

As an important property, this mapping contains a 1:1 mapping of SSZ
type to JSON encoding - this allows round-tripping any object between
JSON and SSZ based on the SSZ schema and usage of the core SSZ types
alone.

The encoding presented in this PR is used in tests and API:s with one
exception: the `ParticipationFlags` type from the Altair spec - it is
recommended we switch encoding in tests and eventually the beacon API to
address this irregularity, so as to avoid a proliferation "special"
primitive types in the SSZ spec that only appear in particular schemas
(and thus making validating general-purpose `SSZ/JSON` parsers more
complex) as well as differences in encoding between fields of the same
SSZ type.

The PR also clarifies that the introduction of new aliases does not lead
to changes in their canonical JSON specification - this allows building
general SSZ/JSON libraries that do not further depend on open-ended
knowledge about aliases.

This PR should be seen as an alternative to
https://github.com/ethereum/consensus-specs/pull/2983.
2023-09-19 14:11:42 +02:00
Alex Stokes fa09d89648
Update simple-serialize.md 2021-05-28 18:13:22 -07:00
Alex Stokes b763416a6b
remove unnecessary defn of `null` 2021-05-28 12:27:29 -07:00
Alex Stokes ef9b7125c2
whitespace 2021-05-28 12:27:19 -07:00
protolambda d71c50f656
Union type update 2021-05-25 19:57:09 +02:00
Hsiao-Wei Wang a83a2f1bc7
Add note for ByteList and ByteVector 2021-04-20 20:22:39 +08:00
Hsiao-Wei Wang 64412be0d7
Minor update ToC 2020-12-07 11:10:19 +08:00
Micah Zoltu bf48c1ce79
Redirects implementation list to one that is actually maintained.
Unmaintained lists are bad, especially when there is a maintained one elsewhere.  Lets keep a single list.

@protolambda
2020-11-22 14:12:32 +08:00
Danny Ryan 7589af8e8d
remove wip notice on phase 0 specs 2020-11-04 09:30:29 -06:00
Andrew Redden 8fa3efe0d3
Update simple-serialize.md
Fix the Lighthouse implementation link
2020-10-08 16:02:43 -03:00
protolambda 6c6f180e0e
clarify offsets serialization, thanks @imnisen, fix #1963 2020-09-09 13:04:53 +02:00
Danny Ryan 5f9112ad42
Merge pull request #1934 from booleanfunction/clarify_ssz_pack_packbits_merkleise
Clarify wording of pack, pack_bits and merkleize
2020-06-29 08:31:37 -06:00
Danny Ryan e06bbd14f7
Merge pull request #1907 from ethereum/fix_deprecated_merkle_util
Fix deprecated utility code, avoid wrong helper function name, add tests
2020-06-29 08:31:05 -06:00
Joanne Fuller 588fcd0a65
Update ssz/simple-serialize.md
Co-authored-by: Hsiao-Wei Wang <hwwang156@gmail.com>
2020-06-26 13:33:23 +10:00
Joanne Fuller 7f3e6564eb
Update ssz/simple-serialize.md
Co-authored-by: Hsiao-Wei Wang <hwwang156@gmail.com>
2020-06-26 13:32:56 +10:00
Joanne Fuller cc130990b6
Clarify wording of pack, pack_bits and merkleize 2020-06-25 13:20:57 +10:00
Lion - dapplion 593ed032f3
SSZ Typescript Lodestar implementation repo moved 2020-06-24 17:09:58 +02:00
Joanne Fuller 974ef47c03 Clarification of types. 2020-06-18 14:47:10 +10:00
protolambda 3f765f55ca
Fix deprecated utility code, avoid wrong helper function name, add tests 2020-06-17 22:34:43 +02:00
Hsiao-Wei Wang 84cea96c42
Fix typo
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-05-14 15:01:03 +08:00
Hsiao-Wei Wang b9e4bccb21
Fix type error 2020-05-13 16:26:20 +08:00
Danny Ryan 676e216beb
reorg specs by fork and move ssz out to own folder. make all of the build and link changes to support move 2020-01-10 11:55:13 -07:00