From 947e2e11c90480df071ef59698749d8d368acb03 Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Wed, 28 Apr 2021 11:27:09 +1000 Subject: [PATCH 1/4] add POST /eth/v1/beacon/pool/sync_committees added based on https://hackmd.io/@QYHAVYiHRg65pdI_CEm7Eg/syncommitteeapi#POST-ethv1beaconpoolsync_committees --- apis/beacon/pool/sync_committees.yaml | 34 +++++++++++++++++++++++++++ beacon-node-oapi.yaml | 4 ++++ types/altair/sync_committee.yaml | 13 +++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 apis/beacon/pool/sync_committees.yaml diff --git a/apis/beacon/pool/sync_committees.yaml b/apis/beacon/pool/sync_committees.yaml new file mode 100644 index 00000000..bec055c9 --- /dev/null +++ b/apis/beacon/pool/sync_committees.yaml @@ -0,0 +1,34 @@ +post: + operationId: submitSyncCommitteeSignatures + 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 the appropriate subnet. + + If one or more sync committee signatures fail validation the node MUST return a 400 error with details of which sync committee signature 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' \ No newline at end of file diff --git a/beacon-node-oapi.yaml b/beacon-node-oapi.yaml index 2622bd40..ada85aa5 100644 --- a/beacon-node-oapi.yaml +++ b/beacon-node-oapi.yaml @@ -82,6 +82,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" @@ -207,6 +209,8 @@ components: $ref: './types/altair/block.yaml#/Altair/SignedBeaconBlock' Altair.BeaconState: $ref: './types/altair/state.yaml#/Altair/BeaconState' + Altair.SyncCommitteeSignature: + $ref: './types/altair/sync_committee.yaml#/Altair/SyncCommitteeSignature' parameters: StateId: diff --git a/types/altair/sync_committee.yaml b/types/altair/sync_committee.yaml index b105034c..8372aef4 100644 --- a/types/altair/sync_committee.yaml +++ b/types/altair/sync_committee.yaml @@ -15,4 +15,15 @@ Altair: allOf: - $ref: '../primitive.yaml#/Pubkey' minItems: 16 - maxItems: 16 \ No newline at end of file + 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' \ No newline at end of file From be37eed8f180a8eda5a9cc5a1555af31494b3ae6 Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Wed, 28 Apr 2021 11:34:25 +1000 Subject: [PATCH 2/4] grammar fix --- apis/beacon/pool/sync_committees.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/beacon/pool/sync_committees.yaml b/apis/beacon/pool/sync_committees.yaml index bec055c9..db73b945 100644 --- a/apis/beacon/pool/sync_committees.yaml +++ b/apis/beacon/pool/sync_committees.yaml @@ -8,7 +8,7 @@ post: If a sync committee signature is validated successfully the node MUST publish that sync committee signature on the appropriate subnet. - If one or more sync committee signatures fail validation the node MUST return a 400 error with details of which sync committee signature have failed, and why. + 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 From ec54d0c2cf2c41a3324761cef82c86edabbed184 Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Wed, 28 Apr 2021 11:36:09 +1000 Subject: [PATCH 3/4] update description to match spec more closely --- apis/beacon/pool/sync_committees.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/beacon/pool/sync_committees.yaml b/apis/beacon/pool/sync_committees.yaml index db73b945..daeac5ff 100644 --- a/apis/beacon/pool/sync_committees.yaml +++ b/apis/beacon/pool/sync_committees.yaml @@ -6,7 +6,7 @@ post: 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 the appropriate subnet. + 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. From c9a0619013f69a56119791ba3bf611a0dd0abcb7 Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Thu, 13 May 2021 07:12:03 +1000 Subject: [PATCH 4/4] review feedback --- apis/beacon/pool/sync_committees.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/beacon/pool/sync_committees.yaml b/apis/beacon/pool/sync_committees.yaml index daeac5ff..f153f95b 100644 --- a/apis/beacon/pool/sync_committees.yaml +++ b/apis/beacon/pool/sync_committees.yaml @@ -1,5 +1,5 @@ post: - operationId: submitSyncCommitteeSignatures + operationId: submitPoolSyncCommitteeSignatures summary: Submit sync committee signatures to node description: | Submits sync committee signature objects to the node.