Skip to content

Commit

Permalink
Add AGGREGATE_AND_PROOF_V2 to support EIP-7549 (#17)
Browse files Browse the repository at this point in the history
* Add AGGREGATE_AND_PROOF_V2 to support EIP-7549

* Use enums for type to avoid matching multiple schemas

---------

Co-authored-by: Jason Frame <jasonwframe@gmail.com>
  • Loading branch information
nflaig and jframe authored Sep 23, 2024
1 parent c45c163 commit ccc90e1
Show file tree
Hide file tree
Showing 3 changed files with 341 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/
.idea/
deploy/
173 changes: 172 additions & 1 deletion signing/paths/sign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ post:
oneOf:
- $ref: '../schemas.yaml#/components/schemas/AggregationSlotSigning'
- $ref: '../schemas.yaml#/components/schemas/AggregateAndProofSigning'
- $ref: '../schemas.yaml#/components/schemas/AggregateAndProofSigningV2'
- $ref: '../schemas.yaml#/components/schemas/AttestationSigning'
- $ref: '../schemas.yaml#/components/schemas/BlockSigning'
- $ref: '../schemas.yaml#/components/schemas/BeaconBlockSigning'
Expand All @@ -35,6 +36,7 @@ post:
mapping:
AGGREGATION_SLOT: '../schemas.yaml#/components/schemas/AggregationSlotSigning'
AGGREGATE_AND_PROOF: '../schemas.yaml#/components/schemas/AggregateAndProofSigning'
AGGREGATE_AND_PROOF_V2: '../schemas.yaml#/components/schemas/AggregateAndProofSigningV2'
ATTESTATION: '../schemas.yaml#/components/schemas/AttestationSigning'
BLOCK: '../schemas.yaml#/components/schemas/BlockSigning'
BLOCK_V2: '../schemas.yaml#/components/schemas/BeaconBlockSigning'
Expand Down Expand Up @@ -493,7 +495,176 @@ post:
genesis_validators_root: '0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673'
aggregation_slot:
slot: "119"
AGGREGATE_AND_PROOF:
AGGREGATE_AND_PROOF_V2 (ELECTRA):
value:
type: "AGGREGATE_AND_PROOF_V2"
signingRoot: "0x247535806f76143fe4798427b2a79b85340c1a029a9e08581995b60e4e45c9e0"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
aggregate_and_proof:
version: "ELECTRA"
data:
aggregator_index: "1"
aggregate:
aggregation_bits: "0x0000000000000000000000000000000000000000000101"
data:
slot: "0"
index: "0"
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
source:
epoch: "0"
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
target:
epoch: "0"
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
committee_bits: "0x0000000000000001"
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
AGGREGATE_AND_PROOF_V2 (DENEB):
value:
type: "AGGREGATE_AND_PROOF_V2"
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
aggregate_and_proof:
version: "DENEB"
data:
aggregator_index: "1"
aggregate:
aggregation_bits: "0x00000101"
data:
slot: "0"
index: "0"
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
source:
epoch: "0"
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
target:
epoch: "0"
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
AGGREGATE_AND_PROOF_V2 (CAPELLA):
value:
type: "AGGREGATE_AND_PROOF_V2"
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
aggregate_and_proof:
version: "CAPELLA"
data:
aggregator_index: "1"
aggregate:
aggregation_bits: "0x00000101"
data:
slot: "0"
index: "0"
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
source:
epoch: "0"
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
target:
epoch: "0"
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
AGGREGATE_AND_PROOF_V2 (BELLATRIX):
value:
type: "AGGREGATE_AND_PROOF_V2"
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
aggregate_and_proof:
version: "BELLATRIX"
data:
aggregator_index: "1"
aggregate:
aggregation_bits: "0x00000101"
data:
slot: "0"
index: "0"
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
source:
epoch: "0"
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
target:
epoch: "0"
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
AGGREGATE_AND_PROOF_V2 (ALTAIR):
value:
type: "AGGREGATE_AND_PROOF_V2"
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
aggregate_and_proof:
version: "ALTAIR"
data:
aggregator_index: "1"
aggregate:
aggregation_bits: "0x00000101"
data:
slot: "0"
index: "0"
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
source:
epoch: "0"
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
target:
epoch: "0"
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
AGGREGATE_AND_PROOF_V2 (PHASE 0):
value:
type: "AGGREGATE_AND_PROOF_V2"
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
fork_info:
fork:
previous_version: "0x00000001"
current_version: "0x00000001"
epoch: "1"
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
aggregate_and_proof:
version: "PHASE0"
data:
aggregator_index: "1"
aggregate:
aggregation_bits: "0x00000101"
data:
slot: "0"
index: "0"
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
source:
epoch: "0"
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
target:
epoch: "0"
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
AGGREGATE_AND_PROOF (DEPRECATED):
value:
type: "AGGREGATE_AND_PROOF"
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
Expand Down
Loading

0 comments on commit ccc90e1

Please sign in to comment.