Commit Graph

87 Commits

Author SHA1 Message Date
Justin 390ece7fbe
Rename "vector" to "tuple" in SSZ spec (#794)
To be done in combination with #777.

Also:

* Define "fixed-size" and "variable-size" more rigorously
* Use `"` vs `'` consistently
* Add missing `"`
2019-03-17 11:33:29 +00:00
Danny Ryan 175dde7cf7
Merge branch 'dev' into patch-1 2019-03-06 15:56:35 -07:00
Dankrad Feist 37b77725d8 Make basic/non-basic for bytes explicit 2019-03-06 22:32:26 +01:00
Dankrad Feist eece029cdf Array spec to [type] and tuple to [type, N]. Also make notation consistent: use "base" for base types 2019-03-06 17:46:40 +01:00
Justin 57971aacb4
Update simple-serialize.md 2019-03-05 15:20:36 +01:00
Justin 25ef2553c7
Update simple-serialize.md 2019-03-01 12:02:29 +01:00
Justin 67793edc8d
Update simple-serialize.md 2019-02-28 11:34:24 +01:00
Justin 7ab7abe2ca
Update simple-serialize.md 2019-02-28 11:32:54 +01:00
Justin 3e6934b602
Update simple-serialize.md 2019-02-27 22:44:20 +01:00
Justin 74349eacd2
Update simple-serialize.md 2019-02-27 22:33:36 +01:00
Danny Ryan 8176cc4cf0
Apply suggestions from code review
Co-Authored-By: JustinDrake <drakefjustin@gmail.com>
2019-02-27 22:23:42 +01:00
Justin bac352e70f
Update simple-serialize.md 2019-02-27 18:02:53 +01:00
Justin 99074d09ec
Update simple-serialize.md 2019-02-27 18:00:49 +01:00
Justin e766193588
Update simple-serialize.md 2019-02-27 17:59:49 +01:00
Justin 54a81a8ebf
Update simple-serialize.md 2019-02-27 17:56:51 +01:00
Justin aa676354a0
Update simple-serialize.md 2019-02-27 17:54:19 +01:00
Justin 95fa9d56b8
Update simple-serialize.md 2019-02-27 17:35:26 +01:00
jannikluhn 828146cbf8
Apply suggestions from code review
Co-Authored-By: JustinDrake <drakefjustin@gmail.com>
2019-02-27 17:15:46 +01:00
Justin 0df8f8b3c6
Update simple-serialize.md 2019-02-27 13:04:36 +01:00
Justin e698d7e29b
Update simple-serialize.md 2019-02-27 12:57:06 +01:00
Justin 07922a63fb
Update simple-serialize.md 2019-02-27 12:54:56 +01:00
Justin 28cf5860ea
Update simple-serialize.md 2019-02-27 12:53:24 +01:00
Justin 5116645dfa
Update simple-serialize.md 2019-02-27 12:40:08 +01:00
Justin 313fe46a94
Update simple-serialize.md 2019-02-27 12:06:06 +01:00
Justin df50ac1adc
Update simple-serialize.md 2019-02-27 12:03:27 +01:00
Justin 5c5f15c82c
Rewrite SSZ spec
* Implement tuples and a chunk-size reduction to 32 bytes (see #665 and #679)
* Simplify presentation where appropriate. For example, deserialisation is implicit from serialisation (similar to `bls_sign` being implicit from `bls_verify`) and is left as an implementation exercise.
* Dramatically reduce spec size and hopefully improve readability.
2019-02-27 11:54:23 +01:00
sigmoid 00aa553fee updated SSZ implementation list (#653)
* updated SSZ implementation list

Signed-off-by: sigmoid <alphabet@hotmail.co.kr>

* Update specs/simple-serialize.md

Co-Authored-By: NAKsir-melody <alphabet@hotmail.co.kr>
2019-02-20 00:47:15 +08:00
vbuterin 59ade930d6 Signature hashing proposal (#625)
If this is accepted, then we can replace all uses of signing in the protocol, which are currently done in a relatively inconsistent way (see proposer signatures, attester signatures, shard proposer signatures, exit message signatures.....) could be unified.
2019-02-16 21:44:27 +00:00
Justin 3459515c2c
Merkleise SSZ container elements (#595)
Reasons to use `merkle_hash` instead of  `hash` for containers:

1) **Smaller witnesses**: `BeaconState` is a somewhat wide container (26 fields as of now, likely 30+ in phase 2). With concatenation and plain concatenation the size of the Merkle witnesses for the top level are ~32 bytes per field element.
2) **Faster incremental hashing**
3) **Consistency**: Consistent with `merkle_hash` for lists/vectors.
2019-02-12 21:57:54 +00:00
Justin 9a4f4d5344
Fix SSZ merkleisation bug (#602) 2019-02-12 11:12:29 +00:00
Justin 0069241b9c
Alias `bytes` to `List[bytes1]` 2019-02-11 14:49:11 +00:00
Jordan Andrews afca1e2127 Add C# implementation 2019-02-11 22:01:05 +11:00
vbuterin 2ac420c5ea
Merge pull request #538 from ethereum/vbuterin-patch-1
SSZ list Merkle hashing change
2019-02-03 14:37:30 -06:00
vbuterin 197fa18893
Zpad is already in #543 2019-02-03 14:26:07 -06:00
Hsiao-Wei Wang dd197e46a6
Fix `zpad` 2019-02-01 22:31:00 +08:00
vbuterin 8ffd9adcaf
Hash_tree_root -> hash_tree_root_internal
Clarifies the distinction between "internal" hash roots (may be < 32 bytes for trivial objects) and "external" ones (zpadded to 32).
2019-01-31 18:03:23 -06:00
Hsiao-Wei Wang acb432ef3a
Update specs/simple-serialize.md
Co-Authored-By: vbuterin <v@buterin.com>
2019-01-31 17:49:51 -06:00
Hsiao-Wei Wang 9271e6e318
Update specs/simple-serialize.md
Co-Authored-By: vbuterin <v@buterin.com>
2019-01-31 17:47:09 -06:00
vbuterin 5488e7b6a4
SSZ list Merkle hashing change
The current spec is arguably inconsistent, in that if a set of N values gets chunked into M chunks where M is not an exact power of 2, the chunks between M and next_power_of_2(M) are filled with SSZ_CHUNK_SIZE zero bytes each, but the last chunk is not padded, and could be arbitrarily short (eg. if the values are 4 bytes and there are 257 of them, then that gets serialized into eight chunks chunks where the first four are 64 values each, the fifth is 4 bytes corresponding to the last value, and the last three chunks are SSZ_CHUNK_SIZE zero bytes). This PR fills every chunk up to exactly SSZ_CHUNK_SIZE bytes for consistency.
2019-01-31 10:12:43 -06:00
jannikluhn 4bedb16e21
Merge branch 'master' into ssz-var-length-list 2019-01-28 10:53:04 +01:00
Chih Cheng Liang 45c064a2d6
remove all unnecessary newline 2019-01-24 16:24:05 +08:00
Chih Cheng Liang 5dfa4e005b
rename byte_order to byteorder 2019-01-24 16:12:43 +08:00
Chih Cheng Liang d41215aeec
rename Terminology to Variables and Functions 2019-01-24 16:11:45 +08:00
Chih Cheng Liang 14432e91a3
add code block to variable in the table 2019-01-24 16:11:04 +08:00
Chih Cheng Liang 88ffae6335
define deserialized_object and new_index 2019-01-24 16:08:56 +08:00
Chih Cheng Liang c2112f0bfc
PR feedback: remove unnecessary newline 2019-01-24 15:58:34 +08:00
Hsiao-Wei Wang 5bb02a9d09
Update specs/simple-serialize.md
Co-Authored-By: ChihChengLiang <chihchengliang@gmail.com>
2019-01-24 15:53:52 +08:00
Chih Cheng Liang 6ac5608d0b
Explicit check bytes end 2019-01-23 20:14:25 +08:00
Jannik Luhn f8670e8069 SSZ: Remove note on efficiency 2019-01-22 17:18:21 +01:00
Jannik Luhn a5519a7d3b SSZ: List serialization with variable element size
Fix #232
2019-01-22 17:14:25 +01:00