Skip to content

Commit

Permalink
docs: add spec docs and todo for OP (#10171)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Aug 7, 2024
1 parent 48d4c79 commit aa533da
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,19 @@ where
// 3. check if the head is already part of the canonical chain
if let Ok(Some(canonical_header)) = self.find_canonical_header(state.head_block_hash) {
debug!(target: "engine", head = canonical_header.number, "fcu head block is already canonical");
// the head block is already canonical

// TODO(mattsse): for optimism we'd need to trigger a build job as well because on
// Optimism, the proposers are allowed to reorg their own chain at will.

// 2. Client software MAY skip an update of the forkchoice state and MUST NOT begin a
// payload build process if `forkchoiceState.headBlockHash` references a `VALID`
// ancestor of the head of canonical chain, i.e. the ancestor passed payload
// validation process and deemed `VALID`. In the case of such an event, client
// software MUST return `{payloadStatus: {status: VALID, latestValidHash:
// forkchoiceState.headBlockHash, validationError: null}, payloadId: null}`

// the head block is already canonical, so we're not triggering a payload job and can
// return right away
return Ok(valid_outcome(state.head_block_hash))
}

Expand Down

0 comments on commit aa533da

Please sign in to comment.