From da6cad8767c43b72ee3380b97b4ae3f3356f1255 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 20 Dec 2021 10:32:45 +1100 Subject: [PATCH] Tidy --- sync/optimistic.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sync/optimistic.md b/sync/optimistic.md index 4a89e5118..15f94f636 100644 --- a/sync/optimistic.md +++ b/sync/optimistic.md @@ -14,7 +14,7 @@ blocks without verifying the execution payloads. This partial sync is called an |`SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY`| `96` | slots *Note: the `SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY` must be user-configurable. See -[Failure Recovery](#failure-recovery). +[Fork Choice Poisoning](#fork-choice-poisoning).* ## Helpers @@ -64,6 +64,9 @@ conditions are met: 1. The current slot (as per the system clock) is at least `SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY` ahead of the slot of the block being imported. I.e., `should_optimistically_import_block(current_slot) == True`. +*See [Fork Choice Poisoning](#fork-choice-poisoning) for the motivations behind +these conditions.* + ## How to optimistically import blocks To optimistically import a block: @@ -126,7 +129,14 @@ If the justified checkpoint transitions from `SYNCING` -> `INVALID`, a consensus engine MAY choose to alert the user and force the application to exit. -## Failure Recovery +## Fork Choice + +Consensus engines MUST support removing from fork choice blocks that transition +from `SYNCING` to `INVALID`. Specifically, a block deemed `INVALID` at any +point MUST NOT be included in the canonical chain and the weights from those +`INVALID` blocks MUST NOT be applied to any `VALID` or `SYNCING` ancestors. + +### Fork Choice Poisoning During the merge transition it is possible for an attacker to craft a `BeaconBlock` with an execution payload that references an @@ -158,13 +168,6 @@ disaster recovery: - `--safe_slots_to_import_optimistically`: modifies the `SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY`. -## Fork Choice - -Consensus engines MUST support removing from fork choice blocks that transition -from `SYNCING` to `INVALID`. Specifically, a block deemed `INVALID` at any -point MUST NOT be included in the canonical chain and the weights from those -`INVALID` blocks MUST NOT be applied to any `VALID` or `SYNCING` ancestors. - ## Checkpoint Sync (Weak Subjectivity Sync) A consensus engine MAY assume that the `ExecutionPayload` of a block used for