Skip to content

Commit

Permalink
Merge pull request #135 from rolfyone/sync_committees
Browse files Browse the repository at this point in the history
add POST `/eth/v1/beacon/pool/sync_committees`
  • Loading branch information
mpetrunic authored May 24, 2021
2 parents 67074b5 + 57faa1b commit 33eb8a9
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
34 changes: 34 additions & 0 deletions apis/beacon/pool/sync_committees.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
post:
operationId: submitPoolSyncCommitteeSignatures
summary: Submit sync committee signatures to node
description: |
Submits sync committee signature objects to the node.
Sync committee signatures are not present in phase0, but are required for Altair networks.
If a sync committee signature is validated successfully the node MUST publish that sync committee signature on all applicable subnets.
If one or more sync committee signatures fail validation the node MUST return a 400 error with details of which sync committee signatures have failed, and why.
tags:
- Beacon
- ValidatorRequiredApi
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: '../../../beacon-node-oapi.yaml#/components/schemas/Altair.SyncCommitteeSignature'
responses:
"200":
description: Sync committee signatures are stored in pool and broadcast on appropriate subnet
"400":
description: "Errors with one or more sync committee signatures"
content:
application/json:
schema:
$ref: "../../../beacon-node-oapi.yaml#/components/schemas/IndexedErrorMessage"
"500":
$ref: '../../../beacon-node-oapi.yaml#/components/responses/InternalError'
4 changes: 4 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ paths:
$ref: "./apis/beacon/pool/attester_slashings.yaml"
/eth/v1/beacon/pool/proposer_slashings:
$ref: "./apis/beacon/pool/proposer_slashings.yaml"
/eth/v1/beacon/pool/sync_committees:
$ref: "./apis/beacon/pool/sync_committees.yaml"
/eth/v1/beacon/pool/voluntary_exits:
$ref: "./apis/beacon/pool/voluntary_exists.yaml"

Expand Down Expand Up @@ -217,6 +219,8 @@ components:
$ref: './types/altair/block.yaml#/Altair/BeaconBlock'
Altair.BeaconState:
$ref: './types/altair/state.yaml#/Altair/BeaconState'
Altair.SyncCommitteeSignature:
$ref: './types/altair/sync_committee.yaml#/Altair/SyncCommitteeSignature'
Altair.SyncCommitteeSubscription:
$ref: './types/altair/sync_committee.yaml#/Altair/SyncCommitteeSubscription'
Altair.ContributionAndProof:
Expand Down
11 changes: 11 additions & 0 deletions types/altair/sync_committee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ Altair:
- $ref: '../primitive.yaml#/Pubkey'
minItems: 16
maxItems: 16
SyncCommitteeSignature:
type: object
properties:
slot:
$ref: '../primitive.yaml#/Uint64'
beacon_block_root:
$ref: '../primitive.yaml#/Root'
validator_index:
$ref: '../primitive.yaml#/Uint64'
signature:
$ref: '../primitive.yaml#/Signature'
SyncCommitteeSubscription:
type: object
properties:
Expand Down

0 comments on commit 33eb8a9

Please sign in to comment.