11from typing import List
2- from eth2spec .phase0 .mainnet import (
2+ from eth2spec .altair .mainnet import (
33 Attestation ,
44 AttestationData ,
55 BeaconBlock ,
88
99from .networking import (
1010 broadcast_threshold_signed_attestation ,
11- broadcast_threshold_signed_block
11+ broadcast_threshold_signed_block ,
12+ broadcast_threshold_signed_sync_committee_signature ,
1213)
1314from .utils .types import (
1415 AttestationDuty ,
1718 CommitteeIndex ,
1819 Epoch ,
1920 ProposerDuty ,
21+ Root ,
2022 Slot ,
23+ SyncCommitteeContribution ,
24+ SyncCommitteeDuty ,
25+ SyncCommitteeSignature ,
2126 ValidatorIndex ,
2227)
2328
@@ -68,11 +73,34 @@ def bn_submit_block(block: SignedBeaconBlock) -> None:
6873 pass
6974
7075
76+ def bn_get_sync_committee_duties_for_epoch (validator_indices : List [ValidatorIndex ],
77+ epoch : Epoch ) -> List [SyncCommitteeDuty ]:
78+ """Fetch sync committee duties for all validator indices in the epoch.
79+ Uses https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/submitPoolSyncCommitteeSignatures
80+ """
81+ pass
82+
83+
84+ def bn_produce_sync_committee_contribution (slot : Slot ,
85+ subcommittee_index : ValidatorIndex ,
86+ beacon_block_root : Root ) -> SyncCommitteeContribution :
87+ """Produces the sync committee contribution for the given params from the BN.
88+ Uses https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/produceSyncCommitteeContribution
89+ """
90+ pass
91+
92+
93+ def bn_submit_sync_committee_signature (sync_committee_signature : SyncCommitteeSignature ) -> None :
94+ """Submit sync committee signatures to the BN for Ethereum p2p gossip.
95+ Uses https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/submitPoolSyncCommitteeSignatures
96+ """
97+ pass
98+
99+
71100# Validator Client Interface
72101
73102"""
74- The VC is connected to the BN through the DVC. The DVC pretends to be a proxy for the BN, except
75- when:
103+ The VC is connected to the BN through the DVC. The DVC pretends to be a proxy for the BN, except when:
76104- VC asks for its attestation, block proposal, or sync duties using the following methods:
77105 - https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/getAttesterDuties
78106 - https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/getProposerDuties
@@ -102,6 +130,14 @@ def cache_block_for_vc(block: BeaconBlock, proposer_duty: ProposerDuty) -> None:
102130 pass
103131
104132
133+ def cache_sync_committee_contribution_for_vc (sync_committee_contribution : SyncCommitteeContribution ,
134+ sync_committee_duty : SyncCommitteeDuty ) -> None :
135+ """Cache sync committee contribution to provide to VC when it seeks new data using the following method:
136+ https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/produceSyncCommitteeContribution
137+ """
138+ pass
139+
140+
105141def capture_threshold_signed_attestation (threshold_signed_attestation : Attestation ) -> None :
106142 """Captures a threshold signed attestation provided by the VC and starts the recombination process to
107143 construct a complete signed attestation to submit to the BN. The VC submits the attestation using the
@@ -110,9 +146,18 @@ def capture_threshold_signed_attestation(threshold_signed_attestation: Attestati
110146 broadcast_threshold_signed_attestation (threshold_signed_attestation )
111147
112148
113- def capture_threhold_signed_block (threshold_signed_block : SignedBeaconBlock ) -> None :
149+ def capture_threshold_signed_block (threshold_signed_block : SignedBeaconBlock ) -> None :
114150 """Captures a threshold signed block provided by the VC and starts the recombination process to
115151 construct a complete signed block to submit to the BN. The VC submits the block using the following method:
116152 https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/publishBlock
117153 """
118154 broadcast_threshold_signed_block (threshold_signed_block )
155+
156+
157+ def capture_threshold_signed_sync_committee_signature (
158+ threshold_signed_sync_committee_signature : SyncCommitteeSignature ) -> None :
159+ """Captures a threshold signed block provided by the VC and starts the recombination process to
160+ construct a complete signed block to submit to the BN. The VC submits the block using the following method:
161+ https://ethereum.github.io/beacon-APIs/#/ValidatorRequiredApi/publishBlock
162+ """
163+ broadcast_threshold_signed_sync_committee_signature (threshold_signed_sync_committee_signature )
0 commit comments