Skip to content
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

WIP: Add aggregation endpoints #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
38 changes: 38 additions & 0 deletions apis/validator/beacon_committee_selections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
post:
operationId: "submitBeaconCommitteeSelections"
summary: Submit beacon committee selections
description: |
Submit beacon committee selections to a DVT middleware client.
It returns the threshold aggregated beacon committee selection.
tags:
- Validator
requestBody:
content:
application/json:
schema:
title: BeaconCommitteeSelectionRequest
type: array
items:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconCommitteeSelection'

responses:
"200":
description: |
Returns the threshold aggregated beacon committee selection proofs.
content:
application/json:
schema:
title: BeaconCommitteeSelectionResponse
type: object
properties:
data:
type: array
items:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/BeaconCommitteeSelection'

"400":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InvalidRequest'
"500":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError'
"503":
$ref: '../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing'
36 changes: 36 additions & 0 deletions apis/validator/sync_committee_selections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
post:
operationId: "submitSyncCommitteeSelections"
summary: Submit sync committee selections
description: |
Submit sync committee selections to a DVT middleware client.
It returns the threshold aggregated sync committee selection.
tags:
- Validator
requestBody:
content:
application/json:
schema:
title: SyncCommitteeSelectionRequest
type: array
items:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/SyncCommitteeSelection'
responses:
"200":
description: |
Returns the threshold aggregated sync committee selection proofs.
content:
application/json:
schema:
title: SyncCommitteeSelectionResponse
type: object
properties:
data:
type: array
items:
$ref: '../../beacon-node-oapi.yaml#/components/schemas/SyncCommitteeSelection'
"400":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InvalidRequest'
"500":
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError'
"503":
$ref: '../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing'
8 changes: 8 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ paths:
$ref: "./apis/validator/beacon_committee_subscriptions.yaml"
/eth/v1/validator/sync_committee_subscriptions:
$ref: "./apis/validator/sync_committee_subscriptions.yaml"
/eth/v1/validator/beacon_committee_selections:
$ref: "./apis/validator/beacon_committee_selections.yaml"
/eth/v1/validator/sync_committee_contribution:
$ref: "./apis/validator/sync_committee_contribution.yaml"
/eth/v1/validator/sync_committee_selections:
$ref: "./apis/validator/sync_committee_selections.yaml"
/eth/v1/validator/contribution_and_proofs:
$ref: "./apis/validator/sync_committee_contribution_and_proof.yaml"
/eth/v1/validator/prepare_beacon_proposer:
Expand Down Expand Up @@ -213,6 +217,10 @@ components:
$ref: './types/attestation.yaml#/Attestation'
AttestationData:
$ref: './types/attestation.yaml#/AttestationData'
BeaconCommitteeSelection:
$ref: './types/selection.yaml#/BeaconCommitteeSelection'
SyncCommitteeSelection:
$ref: './types/selection.yaml#/SyncCommitteeSelection'
Fork:
$ref: './types/misc.yaml#/Fork'
Checkpoint:
Expand Down
35 changes: 35 additions & 0 deletions types/selection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
BeaconCommitteeSelection:
type: object
properties:
validator_index:
allOf:
- $ref: './primitive.yaml#/Uint64'
- description: "Index of the validator"
slot:
allOf:
- $ref: './primitive.yaml#/Uint64'
- description: "Should be the slot at which validator is assigned to attest"
selection_proof:
allOf:
- $ref: './primitive.yaml#/Signature'
- description: "The slot_signature calculated by the validator for the upcoming attestation slot"

SyncCommitteeSelection:
type: object
properties:
validator_index:
allOf:
- $ref: './primitive.yaml#/Uint64'
- description: "Index of the validator"
slot:
allOf:
- $ref: './primitive.yaml#/Uint64'
- description: "Should be the slot at which validator is assigned to produce sync committee contribution"
subcommittee_index:
allOf:
- $ref: './primitive.yaml#/Uint64'
- description: "SubcommitteeIndex to which the validator is assigned"
selection_proof:
allOf:
- $ref: './primitive.yaml#/Signature'
- description: "The slot_signature calculated by the validator for the upcoming sync committee slot"