Skip to content

Commit

Permalink
Cosmetic changes from #1737
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinDrake authored and hwwhww committed Apr 22, 2020
1 parent 5b4f5c3 commit 5929aac
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions specs/phase0/beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
- [`DepositMessage`](#depositmessage)
- [`DepositData`](#depositdata)
- [`BeaconBlockHeader`](#beaconblockheader)
- [`SigningRoot`](#signingroot)
- [`SigningData`](#signingdata)
- [Beacon operations](#beacon-operations)
- [`ProposerSlashing`](#proposerslashing)
- [`AttesterSlashing`](#attesterslashing)
Expand Down Expand Up @@ -191,7 +191,6 @@ The following values are (non-configurable) constants used throughout the specif
| `HYSTERESIS_DOWNWARD_MULTIPLIER` | `1` |
| `HYSTERESIS_UPWARD_MULTIPLIER` | `5` |


- For the safety of committees, `TARGET_COMMITTEE_SIZE` exceeds [the recommended minimum committee size of 111](http://web.archive.org/web/20190504131341/https://vitalik.ca/files/Ithaca201807_Sharding.pdf); with sufficient active validators (at least `SLOTS_PER_EPOCH * TARGET_COMMITTEE_SIZE`), the shuffling algorithm ensures committee sizes of at least `TARGET_COMMITTEE_SIZE`. (Unbiasable randomness with a Verifiable Delay Function (VDF) will improve committee robustness and lower the safe minimum committee size.)

### Gwei values
Expand Down Expand Up @@ -269,7 +268,6 @@ The following values are (non-configurable) constants used throughout the specif
| `DOMAIN_SELECTION_PROOF` | `DomainType('0x05000000')` |
| `DOMAIN_AGGREGATE_AND_PROOF` | `DomainType('0x06000000')` |


## Containers

The following types are [SimpleSerialize (SSZ)](../../ssz/simple-serialize.md) containers.
Expand Down Expand Up @@ -399,10 +397,10 @@ class BeaconBlockHeader(Container):
body_root: Root
```

#### `SigningRoot`
#### `SigningData`

```python
class SigningRoot(Container):
class SigningData(Container):
object_root: Root
domain: Domain
```
Expand Down Expand Up @@ -852,13 +850,12 @@ def compute_domain(domain_type: DomainType, fork_version: Version=None, genesis_
```python
def compute_signing_root(ssz_object: SSZObject, domain: Domain) -> Root:
"""
Return the signing root of an object by calculating the root of the object-domain tree.
Return the signing root for the corresponding signing data.
"""
domain_wrapped_object = SigningRoot(
return hash_tree_root(SigningData(
object_root=hash_tree_root(ssz_object),
domain=domain,
)
return hash_tree_root(domain_wrapped_object)
))
```

### Beacon state accessors
Expand Down

0 comments on commit 5929aac

Please sign in to comment.