Skip to content

Commit

Permalink
Deneb block signing (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
jframe authored Aug 18, 2023
1 parent 8e294a9 commit 5010d77
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 0 deletions.
39 changes: 39 additions & 0 deletions signing/paths/sign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ post:
- $ref: '../schemas.yaml#/components/schemas/SyncCommitteeSelectionProofSigning'
- $ref: '../schemas.yaml#/components/schemas/SyncCommitteeContributionAndProofSigning'
- $ref: '../schemas.yaml#/components/schemas/ValidatorRegistrationSigning'
- $ref: '../schemas.yaml#/components/schemas/BlobSidecarSigning'
discriminator:
propertyName: type
mapping:
Expand All @@ -45,7 +46,45 @@ post:
SYNC_COMMITTEE_SELECTION_PROOF: '../schemas.yaml#/components/schemas/SyncCommitteeSelectionProofSigning'
SYNC_COMMITTEE_CONTRIBUTION_AND_PROOF: '../schemas.yaml#/components/schemas/SyncCommitteeContributionAndProofSigning'
VALIDATOR_REGISTRATION: '../schemas.yaml#/components/schemas/ValidatorRegistrationSigning'
BLOB_SIDECAR: '../schemas.yaml#/components/schemas/BlobSidecarSigning'
examples:
BLOB_SIDECAR:
value:
type: "BLOB_SIDECAR"
signingRoot: "0xaa2e0c465c1a45d7b6637fcce4ad6ceb71fc12064b548078d619a411f0de8adc"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
blob_sidecar:
block_root: "0x235bc3400c2839fd856a524871200bd5e362db615fc4565e1870ed9a2a936464"
index: "0"
slot: "0"
block_parent_root: "0x367cbd40ac7318427aadb97345a91fa2e965daf3158d7f1846f1306305f41bef"
proposer_index: "4666673844721362956"
blob_root: "0xfd18cf40cc907a739be483f1ca0ee23ad65cdd3df23205eabc6d660a75d1f54e"
kzg_commitment: "0xa759d8029a69d4fdd8b3996086e9722983977e4efc1f12f4098ea3d93e868a6ba759d8029a69d4fdd8b3996086e97229"
kzg_proof: "0xfd18cf40cc907a739be483f1ca0ee23ad65cdd3df23205eabc6d660a75d1f54efd18cf40cc907a739be483f1ca0ee23a"
BLOCK_V2 (DENEB):
value:
type: "BLOCK_V2"
signingRoot: "0xaa2e0c465c1a45d7b6637fcce4ad6ceb71fc12064b548078d619a411f0de8adc"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
beacon_block:
version: "DENEB"
block_header:
slot: "0"
proposer_index: "4666673844721362956"
parent_root: "0x367cbd40ac7318427aadb97345a91fa2e965daf3158d7f1846f1306305f41bef"
state_root: "0xfd18cf40cc907a739be483f1ca0ee23ad65cdd3df23205eabc6d660a75d1f54e"
body_root: "0xa759d8029a69d4fdd8b3996086e9722983977e4efc1f12f4098ea3d93e868a6b"
BLOCK_V2 (CAPELLA):
value:
type: "BLOCK_V2"
Expand Down
57 changes: 57 additions & 0 deletions signing/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,33 @@ components:
type: "array"
items:
$ref: "#/components/schemas/SignedVoluntaryExit"
BlobSidecar:
type: "object"
properties:
block_root:
type: string
description: Bytes32 hexadecimal
index:
type: string
format: uint64
slot:
type: string
format: uint64
block_parent_root:
type: string
description: Bytes32 hexadecimal
proposer_index:
type: string
format: uint64
blob_root:
type: string
description: Bytes32 hexadecimal
kzg_commitment:
type: string
description: Bytes48 hexadecimal
kzg_proof:
type: string
description: Bytes48 hexadecimal
Eth1Data:
type: "object"
properties:
Expand Down Expand Up @@ -480,6 +507,21 @@ components:
type: "string"
description: Signing Request type
example: 'BLOCK_V2'
BlobSidecarSigning:
allOf:
- $ref: '#/components/schemas/Signing'
- type: object
properties:
type:
type: "string"
description: Signing Request type
example: 'BLOB_SIDECAR'
blob_sidecar:
$ref: '#/components/schemas/BlobSidecar'
required:
- type
- blob_sidecar

BeaconBlockRequest:
type: object
properties:
Expand All @@ -489,13 +531,15 @@ components:
- $ref: '#/components/schemas/BlockRequestAltair'
- $ref: '#/components/schemas/BlockRequestBellatrix'
- $ref: '#/components/schemas/BlockRequestCapella'
- $ref: '#/components/schemas/BlockRequestDeneb'
discriminator:
propertyName: version
mapping:
PHASE0: '#/components/schemas/BlockRequestPhase0'
ALTAIR: '#/components/schemas/BlockRequestAltair'
BELLATRIX: '#/components/schemas/BlockRequestBellatrix'
CAPELLA: '#/components/schemas/BlockRequestCapella'
DENEB: '#/components/schemas/BlockRequestDeneb'
required:
- beacon_block
BlockRequestPhase0:
Expand Down Expand Up @@ -550,6 +594,19 @@ components:
required:
- version
- block_header
BlockRequestDeneb:
type: object
properties:
version:
type: string
enum:
- DENEB
description: 'version to identify block request type.'
block_header:
$ref: "#/components/schemas/BeaconBlockHeader"
required:
- version
- block_header
BeaconBlockAltair:
type: "object"
properties:
Expand Down

0 comments on commit 5010d77

Please sign in to comment.