Add section about API

This commit is contained in:
Paul Hauner 2021-12-14 16:11:40 +11:00
parent 3f6e5b9c3a
commit ffc2c405c4
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF
1 changed files with 17 additions and 0 deletions

View File

@ -193,3 +193,20 @@ The fields are, as seen by the client at the time of sending the message:
- `finalized_epoch`: `state.finalized_checkpoint.epoch` for the state corresponding to the latest valid ancestor block.
- `head_root`: The `hash_tree_root` root of the current latest valid ancestor block (`BeaconBlock`).
- `head_slot`: The slot of the block corresponding to `latest_valid_ancestor(head)`.
## Ethereum Beacon APIs
Consensus engines which provide an implementation of the [Ethereum Beacon
APIs](https://github.com/ethereum/beacon-APIs) must take care to avoid
presenting optimistic blocks as fully-verified blocks.
When information about an optimistic block is requested, the consensus engine:
- MUST NOT return a "success"-type response (e.g., 2xx).
- MAY return an "empty"-type response (e.g., 404).
- MAY return a "beacon node is currently syncing"-type response (e.g., 503).
When `is_optimistic(head) == True`, the consensus engine:
- MAY substitute the head block with `latest_valid_ancestor(block)`.
- MAY return a "beacon node is currently syncing"-type response (e.g., 503).