-
Notifications
You must be signed in to change notification settings - Fork 192
Add new endpoint to fetch fork choice context from a client. #232
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bb560e0
Add new endpoint to fetch fork choice context from a client.
rolfyone 5fbfdcc
removed state root as not all clients have it in this context.
rolfyone fb98c1e
fixed field name, pending further discussion this may change further
rolfyone 630fba5
update finalized and justified to be just epoch
rolfyone f21a766
Update types/fork_choice_response.yaml
rolfyone 7915bc0
Merge branch 'master' into fork-choice
rolfyone 02042af
incorporate latest changes
tbenr a065350
Merge branch 'master' into fork-choice
rolfyone c4605cd
Merge pull request #1 from tbenr/fork-choice
rolfyone 62d0263
fix lint error
rolfyone 15b6561
fix lint error
rolfyone 03a2b21
fix more lint errors
rolfyone 2903116
Merge branch 'master' into fork-choice
rolfyone 1b60fd8
Merge branch 'master' into fork-choice
rolfyone dae555a
rename payload root
rolfyone f1ffb31
Update types/fork_choice.yaml
rolfyone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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_payload_root: | ||
allOf: | ||
- $ref: './primitive.yaml#/Root' | ||
- description: "The tree hash merkle root of the `execution_payload` for the `BeaconBlock`." | ||
rolfyone marked this conversation as resolved.
Show resolved
Hide resolved
|
||
extra_data: | ||
$ref: '#/ExtraData' | ||
|
||
ExtraData: | ||
type: object | ||
description: 'Optional extra data that clients may provide, which could differ from client to client.' |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.