fork choice error note

This commit is contained in:
Danny Ryan 2020-03-11 16:41:27 -06:00
parent 42499a01e7
commit c894f5ecec
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ class Store(object):
The provided anchor-state will be regarded as a trusted state, to not roll back beyond. The provided anchor-state will be regarded as a trusted state, to not roll back beyond.
This should be the genesis state for a full client. This should be the genesis state for a full client.
*Note* With regards to fork choice, block headers are interchangeable with blocks. The spec is likely to move to headers for reduced overhead in test vectors and better encapsulation. Full implementations store blocks as part of their database and will often use full blocks when dealing with production fork choice.
_The block for `anchor_root` is incorrectly initialized to the block header, rather than the full block. This does not affect functionality but will be cleaned up in subsequent releases._
```python ```python
def get_forkchoice_store(anchor_state: BeaconState) -> Store: def get_forkchoice_store(anchor_state: BeaconState) -> Store:
anchor_block_header = anchor_state.latest_block_header.copy() anchor_block_header = anchor_state.latest_block_header.copy()