Skip to content

Commit

Permalink
Merge pull request #1360 from ethereum/JustinDrake-patch-23
Browse files Browse the repository at this point in the history
Add summaries and expansions to simple-serialize.md
  • Loading branch information
djrtwo authored Aug 14, 2019
2 parents 931c51c + 5d8c31c commit 107c1b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions specs/simple-serialize.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ We now define Merkleization `hash_tree_root(value)` of an object `value` recursi

Let `value` be a self-signed container object. The convention is that the signature (e.g. a `"bytes96"` BLS12-381 signature) be the last field of `value`. Further, the signed message for `value` is `signing_root(value) = hash_tree_root(truncate_last(value))` where `truncate_last` truncates the last element of `value`.

## Summaries and expansions

Let `A` be an object derived from another object `B` by replacing some of the (possibly nested) values of `B` by their `hash_tree_root`. We say `A` is a "summary" of `B`, and that `B` is an "expansion" of `A`. Notice `hash_tree_root(A) == hash_tree_root(B)`.

We similarly define "summary types" and "expansion types". For example, [`BeaconBlock`](./core/0_beacon-chain.md#beaconblock) is an expansion type of [`BeaconBlockHeader`](./core/0_beacon-chain.md#beaconblockheader). Notice that objects expand to at most one object of a given expansion type. For example, `BeaconBlockHeader` objects uniquely expand to `BeaconBlock` objects.

## Implementations

| Language | Project | Maintainer | Implementation |
Expand Down

0 comments on commit 107c1b4

Please sign in to comment.