Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions packages/api/src/beacon/routes/beacon/pool.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import {ValueOf} from "@chainsafe/ssz";
import {ChainForkConfig} from "@lodestar/config";
import {
ForkName,
ForkPostElectra,
ForkPreElectra,
MAX_PAYLOAD_ATTESTATIONS,
PTC_SIZE,
isForkPostElectra,
} from "@lodestar/params";
import {ForkName, ForkPostElectra, ForkPreElectra, PTC_SIZE, isForkPostElectra} from "@lodestar/params";
import {
ArrayOf,
AttesterSlashing,
Expand Down Expand Up @@ -44,7 +37,6 @@ const ProposerSlashingListType = ArrayOf(ssz.phase0.ProposerSlashing);
const SignedVoluntaryExitListType = ArrayOf(ssz.phase0.SignedVoluntaryExit);
const SignedBLSToExecutionChangeListType = ArrayOf(ssz.capella.SignedBLSToExecutionChange);
const SyncCommitteeMessageListType = ArrayOf(ssz.altair.SyncCommitteeMessage);
const PayloadAttestationListType = ArrayOf(ssz.gloas.PayloadAttestation, MAX_PAYLOAD_ATTESTATIONS);
const PayloadAttestationMessageListType = ArrayOf(ssz.gloas.PayloadAttestationMessage, PTC_SIZE);

type AttestationListPhase0 = ValueOf<typeof AttestationListTypePhase0>;
Expand All @@ -59,7 +51,7 @@ type ProposerSlashingList = ValueOf<typeof ProposerSlashingListType>;
type SignedVoluntaryExitList = ValueOf<typeof SignedVoluntaryExitListType>;
type SignedBLSToExecutionChangeList = ValueOf<typeof SignedBLSToExecutionChangeListType>;
type SyncCommitteeMessageList = ValueOf<typeof SyncCommitteeMessageListType>;
type PayloadAttestationList = ValueOf<typeof PayloadAttestationListType>;
type PayloadAttestationList = ValueOf<typeof ssz.gloas.PayloadAttestations>;
type PayloadAttestationMessageList = ValueOf<typeof PayloadAttestationMessageListType>;

export type Endpoints = {
Expand Down Expand Up @@ -252,7 +244,7 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
schema: {query: {slot: Schema.Uint}},
},
resp: {
data: PayloadAttestationListType,
data: ssz.gloas.PayloadAttestations,
meta: VersionCodec,
},
},
Expand Down
5 changes: 4 additions & 1 deletion packages/api/test/unit/beacon/testData/beacon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ export const testData: GenericServerTestCases<Endpoints> = {
},
getPoolPayloadAttestations: {
args: {slot: 1},
res: {data: [ssz.gloas.PayloadAttestation.defaultValue()], meta: {version: ForkName.gloas}},
res: {
data: Array.from({length: 5}, () => ssz.gloas.PayloadAttestation.defaultValue()),
meta: {version: ForkName.gloas},
},
},
getPoolAttesterSlashingsV2: {
args: undefined,
Expand Down
Loading