Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 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
31 changes: 31 additions & 0 deletions apis/debug/fork_choice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
get:
operationId: getDebugForkChoice
summary: Get fork choice array
description: Retrieves all current fork choice context.
tags:
- Debug
responses:
"200":
description: Success
content:
application/json:
schema:
title: GetForkChoiceResponse
type: object
description: "Debugging context of fork choice"
required: [justified_checkpoint, finalized_checkpoint]
properties:
justified_checkpoint:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/Checkpoint'
finalized_checkpoint:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/Checkpoint'
fork_choice_nodes:
type: array
description: "Fork choice nodes"
minItems: 1
items:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/Node"
extra_data:
$ref: "../../beacon-node-oapi.yaml#/components/schemas/ExtraData"
"500":
$ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError"
6 changes: 6 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ paths:
$ref: './apis/debug/heads.yaml'
/eth/v2/debug/beacon/heads:
$ref: './apis/debug/heads.v2.yaml'
/eth/v1/debug/fork_choice:
$ref: './apis/debug/fork_choice.yaml'

/eth/v1/node/identity:
$ref: "./apis/node/identity.yaml"
Expand Down Expand Up @@ -292,6 +294,10 @@ components:
example: "phase0"
SignedValidatorRegistration:
$ref: './types/registration.yaml#/SignedValidatorRegistration'
Node:
$ref: './types/fork_choice.yaml#/Node'
ExtraData:
$ref: './types/fork_choice.yaml#/ExtraData'

parameters:
StateId:
Expand Down
35 changes: 35 additions & 0 deletions types/fork_choice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Node:
type: object
description: "fork choice node attributes"
properties:
slot:
allOf:
- $ref: './primitive.yaml#/Uint64'
- description: "The slot to which this block corresponds."
block_root:
allOf:
- $ref: './primitive.yaml#/Root'
- description: "The signing merkle root of the `BeaconBlock`."
parent_root:
allOf:
- $ref: './primitive.yaml#/Root'
- description: "The signing merkle root of the parent `BeaconBlock`."
justified_epoch:
$ref: './primitive.yaml#/Uint64'
finalized_epoch:
$ref: './primitive.yaml#/Uint64'
weight:
$ref: './primitive.yaml#/Uint64'
validity:
type: string
enum: [VALID, INVALID, OPTIMISTIC]
execution_payload_root:
allOf:
- $ref: './primitive.yaml#/Root'
- description: "The tree hash merkle root of the `execution_payload` for the `BeaconBlock`."
extra_data:
$ref: '#/ExtraData'

ExtraData:
type: object
description: 'Optional extra data that clients may provide, which could differ from client to client.'