Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove API restrictions for optimistic sync #2869

Merged
merged 2 commits into from
May 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 3 additions & 34 deletions sync/optimistic.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,40 +270,9 @@ An optimistic validator MUST NOT participate in sync committees (i.e., sign acro
## 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.

### Helpers

Let the following response types be defined as any response with the
corresponding HTTP status code:

- "Success" Response: Status Codes 200-299.
- "Not Found" Response: Status Code 404.
- "Syncing" Response: Status Code 503.

### Requests for Optimistic Blocks

When information about an optimistic block is requested, the consensus engine:

- MUST NOT respond with success.
- MAY respond with not found.
- MAY respond with syncing.

### Requests for an Optimistic Head

When `is_optimistic(opt_store, head) is True`, the consensus engine:

- MUST NOT return an optimistic `head`.
- MAY substitute the head block with `latest_verified_ancestor(block)`.
- MAY return syncing.

### Requests to Validators Endpoints
mkalinin marked this conversation as resolved.
Show resolved Hide resolved

When `is_optimistic(opt_store, head) is True`, the consensus engine MUST return syncing to
all endpoints which match the following pattern:

- `eth/*/validator/*`
APIs](https://github.com/ethereum/beacon-APIs) must take care to ensure the
`execution_optimistic` value is set to `True` whenever the request references
optimistic blocks (and vice-versa).

## Design Decision Rationale

Expand Down