Skip to content

Commit ccc90e1

Browse files
nflaigjframe
andauthored
Add AGGREGATE_AND_PROOF_V2 to support EIP-7549 (#17)
* Add AGGREGATE_AND_PROOF_V2 to support EIP-7549 * Use enums for type to avoid matching multiple schemas --------- Co-authored-by: Jason Frame <[email protected]>
1 parent c45c163 commit ccc90e1

File tree

3 files changed

+341
-19
lines changed

3 files changed

+341
-19
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.idea/
1+
.idea/
2+
deploy/

signing/paths/sign.yaml

Lines changed: 172 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ post:
2020
oneOf:
2121
- $ref: '../schemas.yaml#/components/schemas/AggregationSlotSigning'
2222
- $ref: '../schemas.yaml#/components/schemas/AggregateAndProofSigning'
23+
- $ref: '../schemas.yaml#/components/schemas/AggregateAndProofSigningV2'
2324
- $ref: '../schemas.yaml#/components/schemas/AttestationSigning'
2425
- $ref: '../schemas.yaml#/components/schemas/BlockSigning'
2526
- $ref: '../schemas.yaml#/components/schemas/BeaconBlockSigning'
@@ -35,6 +36,7 @@ post:
3536
mapping:
3637
AGGREGATION_SLOT: '../schemas.yaml#/components/schemas/AggregationSlotSigning'
3738
AGGREGATE_AND_PROOF: '../schemas.yaml#/components/schemas/AggregateAndProofSigning'
39+
AGGREGATE_AND_PROOF_V2: '../schemas.yaml#/components/schemas/AggregateAndProofSigningV2'
3840
ATTESTATION: '../schemas.yaml#/components/schemas/AttestationSigning'
3941
BLOCK: '../schemas.yaml#/components/schemas/BlockSigning'
4042
BLOCK_V2: '../schemas.yaml#/components/schemas/BeaconBlockSigning'
@@ -493,7 +495,176 @@ post:
493495
genesis_validators_root: '0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673'
494496
aggregation_slot:
495497
slot: "119"
496-
AGGREGATE_AND_PROOF:
498+
AGGREGATE_AND_PROOF_V2 (ELECTRA):
499+
value:
500+
type: "AGGREGATE_AND_PROOF_V2"
501+
signingRoot: "0x247535806f76143fe4798427b2a79b85340c1a029a9e08581995b60e4e45c9e0"
502+
fork_info:
503+
fork:
504+
previous_version: "0x00000001"
505+
current_version: "0x00000001"
506+
epoch: "1"
507+
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
508+
aggregate_and_proof:
509+
version: "ELECTRA"
510+
data:
511+
aggregator_index: "1"
512+
aggregate:
513+
aggregation_bits: "0x0000000000000000000000000000000000000000000101"
514+
data:
515+
slot: "0"
516+
index: "0"
517+
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
518+
source:
519+
epoch: "0"
520+
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
521+
target:
522+
epoch: "0"
523+
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
524+
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
525+
committee_bits: "0x0000000000000001"
526+
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
527+
AGGREGATE_AND_PROOF_V2 (DENEB):
528+
value:
529+
type: "AGGREGATE_AND_PROOF_V2"
530+
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
531+
fork_info:
532+
fork:
533+
previous_version: "0x00000001"
534+
current_version: "0x00000001"
535+
epoch: "1"
536+
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
537+
aggregate_and_proof:
538+
version: "DENEB"
539+
data:
540+
aggregator_index: "1"
541+
aggregate:
542+
aggregation_bits: "0x00000101"
543+
data:
544+
slot: "0"
545+
index: "0"
546+
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
547+
source:
548+
epoch: "0"
549+
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
550+
target:
551+
epoch: "0"
552+
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
553+
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
554+
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
555+
AGGREGATE_AND_PROOF_V2 (CAPELLA):
556+
value:
557+
type: "AGGREGATE_AND_PROOF_V2"
558+
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
559+
fork_info:
560+
fork:
561+
previous_version: "0x00000001"
562+
current_version: "0x00000001"
563+
epoch: "1"
564+
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
565+
aggregate_and_proof:
566+
version: "CAPELLA"
567+
data:
568+
aggregator_index: "1"
569+
aggregate:
570+
aggregation_bits: "0x00000101"
571+
data:
572+
slot: "0"
573+
index: "0"
574+
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
575+
source:
576+
epoch: "0"
577+
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
578+
target:
579+
epoch: "0"
580+
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
581+
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
582+
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
583+
AGGREGATE_AND_PROOF_V2 (BELLATRIX):
584+
value:
585+
type: "AGGREGATE_AND_PROOF_V2"
586+
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
587+
fork_info:
588+
fork:
589+
previous_version: "0x00000001"
590+
current_version: "0x00000001"
591+
epoch: "1"
592+
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
593+
aggregate_and_proof:
594+
version: "BELLATRIX"
595+
data:
596+
aggregator_index: "1"
597+
aggregate:
598+
aggregation_bits: "0x00000101"
599+
data:
600+
slot: "0"
601+
index: "0"
602+
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
603+
source:
604+
epoch: "0"
605+
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
606+
target:
607+
epoch: "0"
608+
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
609+
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
610+
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
611+
AGGREGATE_AND_PROOF_V2 (ALTAIR):
612+
value:
613+
type: "AGGREGATE_AND_PROOF_V2"
614+
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
615+
fork_info:
616+
fork:
617+
previous_version: "0x00000001"
618+
current_version: "0x00000001"
619+
epoch: "1"
620+
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
621+
aggregate_and_proof:
622+
version: "ALTAIR"
623+
data:
624+
aggregator_index: "1"
625+
aggregate:
626+
aggregation_bits: "0x00000101"
627+
data:
628+
slot: "0"
629+
index: "0"
630+
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
631+
source:
632+
epoch: "0"
633+
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
634+
target:
635+
epoch: "0"
636+
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
637+
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
638+
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
639+
AGGREGATE_AND_PROOF_V2 (PHASE 0):
640+
value:
641+
type: "AGGREGATE_AND_PROOF_V2"
642+
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"
643+
fork_info:
644+
fork:
645+
previous_version: "0x00000001"
646+
current_version: "0x00000001"
647+
epoch: "1"
648+
genesis_validators_root: "0x04700007fabc8282644aed6d1c7c9e21d38a03a0c4ba193f3afe428824b3a673"
649+
aggregate_and_proof:
650+
version: "PHASE0"
651+
data:
652+
aggregator_index: "1"
653+
aggregate:
654+
aggregation_bits: "0x00000101"
655+
data:
656+
slot: "0"
657+
index: "0"
658+
beacon_block_root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
659+
source:
660+
epoch: "0"
661+
root: "0x0000000000000000000000000000000000000000000000000000000000000000"
662+
target:
663+
epoch: "0"
664+
root: "0x100814c335d0ced5014cfa9d2e375e6d9b4e197381f8ce8af0473200fdc917fd"
665+
signature: "0xa627242e4a5853708f4ebf923960fb8192f93f2233cd347e05239d86dd9fb66b721ceec1baeae6647f498c9126074f1101a87854d674b6eebc220fd8c3d8405bdfd8e286b707975d9e00a56ec6cbbf762f23607d490f0bbb16c3e0e483d51875"
666+
selection_proof: "0xa63f73a03f1f42b1fd0a988b614d511eb346d0a91c809694ef76df5ae021f0f144d64e612d735bc8820950cf6f7f84cd0ae194bfe3d4242fe79688f83462e3f69d9d33de71aab0721b7dab9d6960875e5fdfd26b171a75fb51af822043820c47"
667+
AGGREGATE_AND_PROOF (DEPRECATED):
497668
value:
498669
type: "AGGREGATE_AND_PROOF"
499670
signingRoot: "0x8d777156899cb02e0e66217afd832886239752a59a393218f6c603bcf615b4f8"

0 commit comments

Comments
 (0)