Update ToC

This commit is contained in:
Hsiao-Wei Wang 2019-11-05 23:44:15 +08:00 committed by Danny Ryan
parent 03ab1d5785
commit 1fdd0332cc
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 17 additions and 10 deletions

View File

@ -12,29 +12,36 @@
- [Configuration](#configuration) - [Configuration](#configuration)
- [Misc](#misc) - [Misc](#misc)
- [Containers](#containers) - [Containers](#containers)
- [Aliases](#aliases) - [`ShardBlockWrapper`](#shardblockwrapper)
- [`ShardSignedHeader`](#shardsignedheader)
- [`ShardState`](#shardstate)
- [`AttestationData`](#attestationdata) - [`AttestationData`](#attestationdata)
- [`AttestationShardData`](#attestationsharddata) - [`ShardTransition`](#shardtransition)
- [`ReducedAttestationData`](#reducedattestationdata)
- [`Attestation`](#attestation) - [`Attestation`](#attestation)
- [`ReducedAttestation`](#reducedattestation)
- [`IndexedAttestation`](#indexedattestation) - [`IndexedAttestation`](#indexedattestation)
- [`CompactCommittee`](#compactcommittee) - [`CompactCommittee`](#compactcommittee)
- [`AttestationCustodyBitWrapper`](#attestationcustodybitwrapper) - [`AttestationCustodyBitWrapper`](#attestationcustodybitwrapper)
- [`PendingAttestation`](#pendingattestation)
- [Helpers](#helpers) - [Helpers](#helpers)
- [`get_online_validators`](#get_online_validators) - [`get_online_validators`](#get_online_validators)
- [`pack_compact_validator`](#pack_compact_validator) - [`pack_compact_validator`](#pack_compact_validator)
- [`committee_to_compact_committee`](#committee_to_compact_committee) - [`committee_to_compact_committee`](#committee_to_compact_committee)
- [`get_light_client_committee`](#get_light_client_committee) - [`get_light_client_committee`](#get_light_client_committee)
- [`get_indexed_attestation`](#get_indexed_attestation) - [`get_indexed_attestation`](#get_indexed_attestation)
- [`update_gasprice`](#update_gasprice)
- [`is_valid_indexed_attestation`](#is_valid_indexed_attestation) - [`is_valid_indexed_attestation`](#is_valid_indexed_attestation)
- [`get_attestation_shard`](#get_attestation_shard)
- [Beacon Chain Changes](#beacon-chain-changes) - [Beacon Chain Changes](#beacon-chain-changes)
- [New beacon state fields](#new-beacon-state-fields) - [New beacon state fields](#new-beacon-state-fields)
- [New beacon block data fields](#new-beacon-block-data-fields) - [New beacon block data fields](#new-beacon-block-data-fields)
- [Attestation processing](#attestation-processing) - [Attestation processing](#attestation-processing)
- [`validate_attestation`](#validate_attestation)
- [`apply_shard_transition`](#apply_shard_transition)
- [`process_attestations`](#process_attestations)
- [Misc block post-processing](#misc-block-post-processing)
- [Light client processing](#light-client-processing) - [Light client processing](#light-client-processing)
- [Epoch transition](#epoch-transition) - [Epoch transition](#epoch-transition)
- [Fraud proofs](#fraud-proofs) - [Fraud proofs](#fraud-proofs)
- [Shard state transition function](#shard-state-transition-function) - [Shard state transition function](#shard-state-transition-function)
- [Honest committee member behavior](#honest-committee-member-behavior) - [Honest committee member behavior](#honest-committee-member-behavior)
@ -306,9 +313,9 @@ def get_shard(state: BeaconState, attestation: Attestation):
light_client_signature: BLSSignature light_client_signature: BLSSignature
``` ```
## Attestation processing ### Attestation processing
### `validate_attestation` #### `validate_attestation`
```python ```python
def validate_attestation(state: BeaconState, attestation: Attestation) -> bool: def validate_attestation(state: BeaconState, attestation: Attestation) -> bool:
@ -336,7 +343,7 @@ def validate_attestation(state: BeaconState, attestation: Attestation) -> bool:
assert len(attestation.custody_bits) == 0 assert len(attestation.custody_bits) == 0
``` ```
### `apply_shard_transition` #### `apply_shard_transition`
```python ```python
def apply_shard_transition(state: BeaconState, shard: Shard, transition: ShardTransition) -> None: def apply_shard_transition(state: BeaconState, shard: Shard, transition: ShardTransition) -> None:
@ -388,7 +395,7 @@ def apply_shard_transition(state: BeaconState, shard: Shard, transition: ShardTr
state.shard_states[shard].slot = state.slot - 1 state.shard_states[shard].slot = state.slot - 1
``` ```
### `process_attestations` #### `process_attestations`
```python ```python
def process_attestations(state: BeaconState, block: BeaconBlock, attestations: Sequence[Attestation]) -> None: def process_attestations(state: BeaconState, block: BeaconBlock, attestations: Sequence[Attestation]) -> None:
@ -498,7 +505,7 @@ def phase_1_epoch_transition(state):
state.next_light_committee = committee_to_compact_committee(state, new_committee) state.next_light_committee = committee_to_compact_committee(state, new_committee)
``` ```
### Fraud proofs ## Fraud proofs
TODO. The intent is to have a single universal fraud proof type, which contains the following parts: TODO. The intent is to have a single universal fraud proof type, which contains the following parts: