-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new endpoint to fetch fork choice context from a client. (#232)
Co-authored-by: Enrico Del Fante <enrico.delfante@consensys.net> Co-authored-by: Michael Sproul <micsproul@gmail.com>
- Loading branch information
1 parent
c071f04
commit ff89656
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_block_hash: | ||
allOf: | ||
- $ref: './primitive.yaml#/Root' | ||
- description: "The `block_hash` from the `execution_payload` of the `BeaconBlock`" | ||
extra_data: | ||
$ref: '#/ExtraData' | ||
|
||
ExtraData: | ||
type: object | ||
description: 'Optional extra data that clients may provide, which could differ from client to client.' |