@lodestar/api 1.44.0-rc.0 → 1.44.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,18 +71,6 @@ type PayloadAttestationMessageList = ValueOf<typeof PayloadAttestationMessageLis
71
71
  type SignedProposerPreferencesList = ValueOf<typeof SignedProposerPreferencesListType>;
72
72
 
73
73
  export type Endpoints = {
74
- /**
75
- * Get Attestations from operations pool
76
- * Retrieves attestations known by the node but not necessarily incorporated into any block
77
- */
78
- getPoolAttestations: Endpoint<
79
- "GET",
80
- {slot?: Slot; committeeIndex?: CommitteeIndex},
81
- {query: {slot?: number; committee_index?: number}},
82
- AttestationListPhase0,
83
- EmptyMeta
84
- >;
85
-
86
74
  /**
87
75
  * Get Attestations from operations pool
88
76
  * Retrieves attestations known by the node but not necessarily incorporated into any block
@@ -119,19 +107,6 @@ export type Endpoints = {
119
107
  VersionMeta
120
108
  >;
121
109
 
122
- /**
123
- * Get AttesterSlashings from operations pool
124
- * Retrieves attester slashings known by the node but not necessarily incorporated into any block
125
- */
126
- getPoolAttesterSlashings: Endpoint<
127
- // ⏎
128
- "GET",
129
- EmptyArgs,
130
- EmptyRequest,
131
- AttesterSlashingListPhase0,
132
- EmptyMeta
133
- >;
134
-
135
110
  /**
136
111
  * Get AttesterSlashings from operations pool
137
112
  * Retrieves attester slashings known by the node but not necessarily incorporated into any block
@@ -184,22 +159,6 @@ export type Endpoints = {
184
159
  EmptyMeta
185
160
  >;
186
161
 
187
- /**
188
- * Submit Attestation objects to node
189
- * Submits Attestation objects to the node. Each attestation in the request body is processed individually.
190
- *
191
- * If an attestation is validated successfully the node MUST publish that attestation on the appropriate subnet.
192
- *
193
- * If one or more attestations fail validation the node MUST return a 400 error with details of which attestations have failed, and why.
194
- */
195
- submitPoolAttestations: Endpoint<
196
- "POST",
197
- {signedAttestations: SingleAttestation<ForkPreElectra>[]},
198
- {body: unknown},
199
- EmptyResponseData,
200
- EmptyMeta
201
- >;
202
-
203
162
  /**
204
163
  * Submit Attestation objects to node
205
164
  * Submits Attestation objects to the node. Each attestation in the request body is processed individually.
@@ -216,18 +175,6 @@ export type Endpoints = {
216
175
  EmptyMeta
217
176
  >;
218
177
 
219
- /**
220
- * Submit AttesterSlashing object to node's pool
221
- * Submits AttesterSlashing object to node's pool and if passes validation node MUST broadcast it to network.
222
- */
223
- submitPoolAttesterSlashings: Endpoint<
224
- "POST",
225
- {attesterSlashing: phase0.AttesterSlashing},
226
- {body: unknown},
227
- EmptyResponseData,
228
- EmptyMeta
229
- >;
230
-
231
178
  /**
232
179
  * Submit AttesterSlashing object to node's pool
233
180
  * Submits AttesterSlashing object to node's pool and if passes validation node MUST broadcast it to network.
@@ -315,19 +262,6 @@ export type Endpoints = {
315
262
 
316
263
  export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoints> {
317
264
  return {
318
- getPoolAttestations: {
319
- url: "/eth/v1/beacon/pool/attestations",
320
- method: "GET",
321
- req: {
322
- writeReq: ({slot, committeeIndex}) => ({query: {slot, committee_index: committeeIndex}}),
323
- parseReq: ({query}) => ({slot: query.slot, committeeIndex: query.committee_index}),
324
- schema: {query: {slot: Schema.Uint, committee_index: Schema.Uint}},
325
- },
326
- resp: {
327
- data: AttestationListTypePhase0,
328
- meta: EmptyMetaCodec,
329
- },
330
- },
331
265
  getPoolAttestationsV2: {
332
266
  url: "/eth/v2/beacon/pool/attestations",
333
267
  method: "GET",
@@ -367,15 +301,6 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
367
301
  meta: VersionCodec,
368
302
  },
369
303
  },
370
- getPoolAttesterSlashings: {
371
- url: "/eth/v1/beacon/pool/attester_slashings",
372
- method: "GET",
373
- req: EmptyRequestCodec,
374
- resp: {
375
- data: AttesterSlashingListTypePhase0,
376
- meta: EmptyMetaCodec,
377
- },
378
- },
379
304
  getPoolAttesterSlashingsV2: {
380
305
  url: "/eth/v2/beacon/pool/attester_slashings",
381
306
  method: "GET",
@@ -414,20 +339,6 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
414
339
  meta: EmptyMetaCodec,
415
340
  },
416
341
  },
417
- submitPoolAttestations: {
418
- url: "/eth/v1/beacon/pool/attestations",
419
- method: "POST",
420
- req: {
421
- writeReqJson: ({signedAttestations}) => ({body: SingleAttestationListTypePhase0.toJson(signedAttestations)}),
422
- parseReqJson: ({body}) => ({signedAttestations: SingleAttestationListTypePhase0.fromJson(body)}),
423
- writeReqSsz: ({signedAttestations}) => ({body: SingleAttestationListTypePhase0.serialize(signedAttestations)}),
424
- parseReqSsz: ({body}) => ({signedAttestations: SingleAttestationListTypePhase0.deserialize(body)}),
425
- schema: {
426
- body: Schema.ObjectArray,
427
- },
428
- },
429
- resp: EmptyResponseCodec,
430
- },
431
342
  submitPoolAttestationsV2: {
432
343
  url: "/eth/v2/beacon/pool/attestations",
433
344
  method: "POST",
@@ -473,20 +384,6 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
473
384
  },
474
385
  resp: EmptyResponseCodec,
475
386
  },
476
- submitPoolAttesterSlashings: {
477
- url: "/eth/v1/beacon/pool/attester_slashings",
478
- method: "POST",
479
- req: {
480
- writeReqJson: ({attesterSlashing}) => ({body: ssz.phase0.AttesterSlashing.toJson(attesterSlashing)}),
481
- parseReqJson: ({body}) => ({attesterSlashing: ssz.phase0.AttesterSlashing.fromJson(body)}),
482
- writeReqSsz: ({attesterSlashing}) => ({body: ssz.phase0.AttesterSlashing.serialize(attesterSlashing)}),
483
- parseReqSsz: ({body}) => ({attesterSlashing: ssz.phase0.AttesterSlashing.deserialize(body)}),
484
- schema: {
485
- body: Schema.Object,
486
- },
487
- },
488
- resp: EmptyResponseCodec,
489
- },
490
387
  submitPoolAttesterSlashingsV2: {
491
388
  url: "/eth/v2/beacon/pool/attester_slashings",
492
389
  method: "POST",
@@ -600,8 +600,6 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
600
600
  meta: ExecutionOptimisticFinalizedAndVersionCodec,
601
601
  },
602
602
  },
603
- // TODO GLOAS: this endpoint needs to be updated because post-gloas there could be two variants of the persisted checkpoint state (empty or full).
604
- // Either add a an additional parameter `payloadPresent`, or return one or both variants of state.
605
603
  getPersistedCheckpointState: {
606
604
  url: "/eth/v1/lodestar/persisted_checkpoint_state",
607
605
  method: "GET",
@@ -499,23 +499,6 @@ export type Endpoints = {
499
499
  EmptyMeta
500
500
  >;
501
501
 
502
- /**
503
- * Get aggregated attestation
504
- * Aggregates all attestations matching given attestation data root and slot
505
- * Returns an aggregated `Attestation` object with same `AttestationData` root.
506
- */
507
- getAggregatedAttestation: Endpoint<
508
- "GET",
509
- {
510
- /** HashTreeRoot of AttestationData that validator want's aggregated */
511
- attestationDataRoot: Root;
512
- slot: Slot;
513
- },
514
- {query: {attestation_data_root: string; slot: number}},
515
- phase0.Attestation,
516
- EmptyMeta
517
- >;
518
-
519
502
  /**
520
503
  * Get aggregated attestation
521
504
  * Aggregates all attestations matching given attestation data root, slot and committee index
@@ -534,18 +517,6 @@ export type Endpoints = {
534
517
  VersionMeta
535
518
  >;
536
519
 
537
- /**
538
- * Publish multiple aggregate and proofs
539
- * Verifies given aggregate and proofs and publishes them on appropriate gossipsub topic.
540
- */
541
- publishAggregateAndProofs: Endpoint<
542
- "POST",
543
- {signedAggregateAndProofs: SignedAggregateAndProofListPhase0},
544
- {body: unknown},
545
- EmptyResponseData,
546
- EmptyMeta
547
- >;
548
-
549
520
  /**
550
521
  * Publish multiple aggregate and proofs
551
522
  * Verifies given aggregate and proofs and publishes them on appropriate gossipsub topic.
@@ -1040,29 +1011,6 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
1040
1011
  meta: EmptyMetaCodec,
1041
1012
  },
1042
1013
  },
1043
- getAggregatedAttestation: {
1044
- url: "/eth/v1/validator/aggregate_attestation",
1045
- method: "GET",
1046
- req: {
1047
- writeReq: ({attestationDataRoot, slot}) => ({
1048
- query: {attestation_data_root: toRootHex(attestationDataRoot), slot},
1049
- }),
1050
- parseReq: ({query}) => ({
1051
- attestationDataRoot: fromHex(query.attestation_data_root),
1052
- slot: query.slot,
1053
- }),
1054
- schema: {
1055
- query: {
1056
- attestation_data_root: Schema.StringRequired,
1057
- slot: Schema.UintRequired,
1058
- },
1059
- },
1060
- },
1061
- resp: {
1062
- data: ssz.phase0.Attestation,
1063
- meta: EmptyMetaCodec,
1064
- },
1065
- },
1066
1014
  getAggregatedAttestationV2: {
1067
1015
  url: "/eth/v2/validator/aggregate_attestation",
1068
1016
  method: "GET",
@@ -1088,28 +1036,6 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
1088
1036
  meta: VersionCodec,
1089
1037
  },
1090
1038
  },
1091
- publishAggregateAndProofs: {
1092
- url: "/eth/v1/validator/aggregate_and_proofs",
1093
- method: "POST",
1094
- req: {
1095
- writeReqJson: ({signedAggregateAndProofs}) => ({
1096
- body: SignedAggregateAndProofListPhase0Type.toJson(signedAggregateAndProofs),
1097
- }),
1098
- parseReqJson: ({body}) => ({
1099
- signedAggregateAndProofs: SignedAggregateAndProofListPhase0Type.fromJson(body),
1100
- }),
1101
- writeReqSsz: ({signedAggregateAndProofs}) => ({
1102
- body: SignedAggregateAndProofListPhase0Type.serialize(signedAggregateAndProofs),
1103
- }),
1104
- parseReqSsz: ({body}) => ({
1105
- signedAggregateAndProofs: SignedAggregateAndProofListPhase0Type.deserialize(body),
1106
- }),
1107
- schema: {
1108
- body: Schema.ObjectArray,
1109
- },
1110
- },
1111
- resp: EmptyResponseCodec,
1112
- },
1113
1039
  publishAggregateAndProofsV2: {
1114
1040
  url: "/eth/v2/validator/aggregate_and_proofs",
1115
1041
  method: "POST",