From 9b9836e426228461e04e9cae790401c5adeed809 Mon Sep 17 00:00:00 2001 From: NC <17676176+ensi321@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:45:13 +0900 Subject: [PATCH] Add todos --- packages/api/src/beacon/routes/beacon/pool.ts | 4 ++-- packages/beacon-node/src/api/impl/validator/index.ts | 1 + packages/validator/src/services/attestation.ts | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/api/src/beacon/routes/beacon/pool.ts b/packages/api/src/beacon/routes/beacon/pool.ts index 497bdfe98a17..4b512c242465 100644 --- a/packages/api/src/beacon/routes/beacon/pool.ts +++ b/packages/api/src/beacon/routes/beacon/pool.ts @@ -30,9 +30,9 @@ const SignedVoluntaryExitListType = ArrayOf(ssz.phase0.SignedVoluntaryExit); const SignedBLSToExecutionChangeListType = ArrayOf(ssz.capella.SignedBLSToExecutionChange); const SyncCommitteeMessageListType = ArrayOf(ssz.altair.SyncCommitteeMessage); -export type AttestationListPhase0 = ValueOf; +type AttestationListPhase0 = ValueOf; type AttestationListElectra = ValueOf; -export type AttestationList = AttestationListPhase0 | AttestationListElectra; +type AttestationList = AttestationListPhase0 | AttestationListElectra; type AttesterSlashingListPhase0 = ValueOf; type AttesterSlashingListElectra = ValueOf; diff --git a/packages/beacon-node/src/api/impl/validator/index.ts b/packages/beacon-node/src/api/impl/validator/index.ts index 574205e82926..543831c778a6 100644 --- a/packages/beacon-node/src/api/impl/validator/index.ts +++ b/packages/beacon-node/src/api/impl/validator/index.ts @@ -1067,6 +1067,7 @@ export function getValidatorApi( }; }, + // TODO Electra: Implement getAggregatedAttestation to properly handle pre-electra async getAggregatedAttestation() { throw new Error("Not implemented. Use getAggregatedAttestationV2 for now."); }, diff --git a/packages/validator/src/services/attestation.ts b/packages/validator/src/services/attestation.ts index 577454b3b878..cadcef04758c 100644 --- a/packages/validator/src/services/attestation.ts +++ b/packages/validator/src/services/attestation.ts @@ -225,6 +225,7 @@ export class AttestationService { ...(this.opts?.disableAttestationGrouping && {index: attestationNoCommittee.index}), }; try { + // TODO Electra: Ensure calling V2 works in pre-electra (await this.api.beacon.submitPoolAttestationsV2({signedAttestations})).assertOk(); this.logger.info("Published attestations", {...logCtx, count: signedAttestations.length}); this.metrics?.publishedAttestations.inc(signedAttestations.length);