@lodestar/types 1.48.0-dev.b6386729a9 → 1.48.0-dev.b71ab45af3

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.
Files changed (46) hide show
  1. package/lib/bellatrix/sszTypes.d.ts +0 -18
  2. package/lib/bellatrix/sszTypes.d.ts.map +1 -1
  3. package/lib/bellatrix/sszTypes.js +0 -3
  4. package/lib/bellatrix/sszTypes.js.map +1 -1
  5. package/lib/bellatrix/types.d.ts +0 -1
  6. package/lib/bellatrix/types.d.ts.map +1 -1
  7. package/lib/capella/sszTypes.d.ts +0 -24
  8. package/lib/capella/sszTypes.d.ts.map +1 -1
  9. package/lib/capella/sszTypes.js +0 -3
  10. package/lib/capella/sszTypes.js.map +1 -1
  11. package/lib/capella/types.d.ts +0 -1
  12. package/lib/capella/types.d.ts.map +1 -1
  13. package/lib/deneb/sszTypes.d.ts +0 -29
  14. package/lib/deneb/sszTypes.d.ts.map +1 -1
  15. package/lib/deneb/sszTypes.js +0 -6
  16. package/lib/deneb/sszTypes.js.map +1 -1
  17. package/lib/deneb/types.d.ts +0 -2
  18. package/lib/deneb/types.d.ts.map +1 -1
  19. package/lib/electra/sszTypes.d.ts +0 -47
  20. package/lib/electra/sszTypes.d.ts.map +1 -1
  21. package/lib/electra/sszTypes.js +0 -4
  22. package/lib/electra/sszTypes.js.map +1 -1
  23. package/lib/electra/types.d.ts +0 -1
  24. package/lib/electra/types.d.ts.map +1 -1
  25. package/lib/gloas/sszTypes.d.ts +0 -59
  26. package/lib/gloas/sszTypes.d.ts.map +1 -1
  27. package/lib/gloas/sszTypes.js +12 -64
  28. package/lib/gloas/sszTypes.js.map +1 -1
  29. package/lib/gloas/types.d.ts +0 -1
  30. package/lib/gloas/types.d.ts.map +1 -1
  31. package/lib/sszTypes.d.ts +0 -574
  32. package/lib/sszTypes.d.ts.map +1 -1
  33. package/lib/types.d.ts +0 -8
  34. package/lib/types.d.ts.map +1 -1
  35. package/package.json +4 -4
  36. package/src/bellatrix/sszTypes.ts +0 -7
  37. package/src/bellatrix/types.ts +0 -1
  38. package/src/capella/sszTypes.ts +0 -7
  39. package/src/capella/types.ts +0 -1
  40. package/src/deneb/sszTypes.ts +0 -10
  41. package/src/deneb/types.ts +0 -2
  42. package/src/electra/sszTypes.ts +0 -8
  43. package/src/electra/types.ts +0 -1
  44. package/src/gloas/sszTypes.ts +11 -88
  45. package/src/gloas/types.ts +0 -1
  46. package/src/types.ts +0 -8
@@ -18,33 +18,13 @@ import {
18
18
  EXECUTION_BLOCK_HASH_DEPTH_GLOAS,
19
19
  FINALIZED_ROOT_DEPTH_GLOAS,
20
20
  HISTORICAL_ROOTS_LIMIT,
21
- MAX_ATTESTATIONS_ELECTRA,
22
- MAX_ATTESTER_SLASHINGS_ELECTRA,
23
- MAX_BLOB_COMMITMENTS_PER_BLOCK,
24
- MAX_BLS_TO_EXECUTION_CHANGES,
25
21
  MAX_BUILDER_AUTH_DATA_SIZE,
26
- MAX_BUILDER_DEPOSIT_REQUESTS_PER_PAYLOAD,
27
- MAX_BUILDER_EXIT_REQUESTS_PER_PAYLOAD,
28
- MAX_BYTES_PER_TRANSACTION,
29
- MAX_COMMITTEES_PER_SLOT,
30
- MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD,
31
- MAX_PAYLOAD_ATTESTATIONS,
32
- MAX_PROPOSER_SLASHINGS,
33
- MAX_TRANSACTIONS_PER_PAYLOAD,
34
- MAX_VALIDATORS_PER_COMMITTEE,
35
- MAX_VOLUNTARY_EXITS,
36
- MAX_WITHDRAWALS_PER_PAYLOAD,
37
- MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD,
38
22
  MIN_SEED_LOOKAHEAD,
39
23
  NEXT_SYNC_COMMITTEE_DEPTH_GLOAS,
40
24
  NUMBER_OF_COLUMNS,
41
- PENDING_CONSOLIDATIONS_LIMIT,
42
- PENDING_DEPOSITS_LIMIT,
43
- PENDING_PARTIAL_WITHDRAWALS_LIMIT,
44
25
  PTC_SIZE,
45
26
  SLOTS_PER_EPOCH,
46
27
  SLOTS_PER_HISTORICAL_ROOT,
47
- VALIDATOR_REGISTRY_LIMIT,
48
28
  } from "@lodestar/params";
49
29
  import {ssz as altairSsz} from "../altair/index.js";
50
30
  import {ssz as capellaSsz} from "../capella/index.js";
@@ -87,35 +67,16 @@ export const FinalityBranch = new VectorCompositeType(Bytes32, FINALIZED_ROOT_DE
87
67
 
88
68
  export const NextSyncCommitteeBranch = new VectorCompositeType(Bytes32, NEXT_SYNC_COMMITTEE_DEPTH_GLOAS);
89
69
 
90
- export const AggregationBits = new ProgressiveBitListType({
91
- typeName: "AggregationBits",
92
- limit: MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT,
93
- });
94
- export const AttestingIndices = new ProgressiveListBasicType(ValidatorIndex, {
95
- typeName: "AttestingIndices",
96
- limit: MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT,
97
- });
98
- export const Transaction = new ProgressiveByteListType({typeName: "Transaction", limit: MAX_BYTES_PER_TRANSACTION});
99
- export const Transactions = new ProgressiveListCompositeType(Transaction, {
100
- typeName: "Transactions",
101
- limit: MAX_TRANSACTIONS_PER_PAYLOAD,
102
- });
103
- export const Withdrawals = new ProgressiveListCompositeType(capellaSsz.Withdrawal, {
104
- typeName: "Withdrawals",
105
- limit: MAX_WITHDRAWALS_PER_PAYLOAD,
106
- });
70
+ export const AggregationBits = new ProgressiveBitListType({typeName: "AggregationBits"});
71
+ export const AttestingIndices = new ProgressiveListBasicType(ValidatorIndex, {typeName: "AttestingIndices"});
72
+ export const Transaction = new ProgressiveByteListType({typeName: "Transaction"});
73
+ export const Transactions = new ProgressiveListCompositeType(Transaction, {typeName: "Transactions"});
74
+ export const Withdrawals = new ProgressiveListCompositeType(capellaSsz.Withdrawal, {typeName: "Withdrawals"});
107
75
  export const BlobKzgCommitments = new ProgressiveListCompositeType(denebSsz.KZGCommitment, {
108
76
  typeName: "BlobKzgCommitments",
109
- limit: MAX_BLOB_COMMITMENTS_PER_BLOCK,
110
- });
111
- export const KZGProofs = new ProgressiveListCompositeType(denebSsz.KZGProof, {
112
- typeName: "KZGProofs",
113
- limit: MAX_BLOB_COMMITMENTS_PER_BLOCK,
114
- });
115
- export const DataColumn = new ProgressiveListCompositeType(fuluSsz.Cell, {
116
- typeName: "DataColumn",
117
- limit: MAX_BLOB_COMMITMENTS_PER_BLOCK,
118
77
  });
78
+ export const KZGProofs = new ProgressiveListCompositeType(denebSsz.KZGProof, {typeName: "KZGProofs"});
79
+ export const DataColumn = new ProgressiveListCompositeType(fuluSsz.Cell, {typeName: "DataColumn"});
119
80
 
120
81
  export const Attestation = new ProgressiveContainerType(
121
82
  {
@@ -179,12 +140,10 @@ export const DepositRequests = new ProgressiveListCompositeType(DepositRequest,
179
140
  export const WithdrawalRequest = electraSsz.WithdrawalRequest;
180
141
  export const WithdrawalRequests = new ProgressiveListCompositeType(WithdrawalRequest, {
181
142
  typeName: "WithdrawalRequests",
182
- limit: MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD,
183
143
  });
184
144
  export const ConsolidationRequest = electraSsz.ConsolidationRequest;
185
145
  export const ConsolidationRequests = new ProgressiveListCompositeType(ConsolidationRequest, {
186
146
  typeName: "ConsolidationRequests",
187
- limit: MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD,
188
147
  });
189
148
 
190
149
  // New in GLOAS:EIP8282
@@ -199,7 +158,6 @@ export const BuilderDepositRequest = new ContainerType(
199
158
  );
200
159
  export const BuilderDepositRequests = new ProgressiveListCompositeType(BuilderDepositRequest, {
201
160
  typeName: "BuilderDepositRequests",
202
- limit: MAX_BUILDER_DEPOSIT_REQUESTS_PER_PAYLOAD,
203
161
  });
204
162
 
205
163
  // New in GLOAS:EIP8282
@@ -212,7 +170,6 @@ export const BuilderExitRequest = new ContainerType(
212
170
  );
213
171
  export const BuilderExitRequests = new ProgressiveListCompositeType(BuilderExitRequest, {
214
172
  typeName: "BuilderExitRequests",
215
- limit: MAX_BUILDER_EXIT_REQUESTS_PER_PAYLOAD,
216
173
  });
217
174
 
218
175
  export const ExecutionRequests = new ProgressiveContainerType(
@@ -229,53 +186,33 @@ export const ExecutionRequests = new ProgressiveContainerType(
229
186
 
230
187
  export const ProposerSlashings = new ProgressiveListCompositeType(phase0Ssz.ProposerSlashing, {
231
188
  typeName: "ProposerSlashings",
232
- limit: MAX_PROPOSER_SLASHINGS,
233
189
  });
234
190
  export const AttesterSlashings = new ProgressiveListCompositeType(AttesterSlashing, {
235
191
  typeName: "AttesterSlashings",
236
- limit: MAX_ATTESTER_SLASHINGS_ELECTRA,
237
- });
238
- export const Attestations = new ProgressiveListCompositeType(Attestation, {
239
- typeName: "Attestations",
240
- limit: MAX_ATTESTATIONS_ELECTRA,
241
192
  });
193
+ export const Attestations = new ProgressiveListCompositeType(Attestation, {typeName: "Attestations"});
242
194
  export const Deposits = new ProgressiveListCompositeType(phase0Ssz.Deposit, {typeName: "Deposits"});
243
195
  export const VoluntaryExits = new ProgressiveListCompositeType(phase0Ssz.SignedVoluntaryExit, {
244
196
  typeName: "VoluntaryExits",
245
- limit: MAX_VOLUNTARY_EXITS,
246
197
  });
247
198
  export const BlsToExecutionChanges = new ProgressiveListCompositeType(capellaSsz.SignedBLSToExecutionChange, {
248
199
  typeName: "BLSToExecutionChanges",
249
- limit: MAX_BLS_TO_EXECUTION_CHANGES,
250
200
  });
251
201
 
252
- export const Validators = new ProgressiveListCompositeType(phase0Ssz.Validator, {
253
- typeName: "Validators",
254
- limit: VALIDATOR_REGISTRY_LIMIT,
255
- });
256
- export const Balances = new ProgressiveListBasicType(UintNum64, {
257
- typeName: "Balances",
258
- limit: VALIDATOR_REGISTRY_LIMIT,
259
- });
202
+ export const Validators = new ProgressiveListCompositeType(phase0Ssz.Validator, {typeName: "Validators"});
203
+ export const Balances = new ProgressiveListBasicType(UintNum64, {typeName: "Balances"});
260
204
  export const EpochParticipation = new ProgressiveListBasicType(ParticipationFlags, {
261
205
  typeName: "EpochParticipation",
262
- limit: VALIDATOR_REGISTRY_LIMIT,
263
- });
264
- export const InactivityScores = new ProgressiveListBasicType(UintNum64, {
265
- typeName: "InactivityScores",
266
- limit: VALIDATOR_REGISTRY_LIMIT,
267
206
  });
207
+ export const InactivityScores = new ProgressiveListBasicType(UintNum64, {typeName: "InactivityScores"});
268
208
  export const PendingDeposits = new ProgressiveListCompositeType(electraSsz.PendingDeposit, {
269
209
  typeName: "PendingDeposits",
270
- limit: PENDING_DEPOSITS_LIMIT,
271
210
  });
272
211
  export const PendingPartialWithdrawals = new ProgressiveListCompositeType(electraSsz.PendingPartialWithdrawal, {
273
212
  typeName: "PendingPartialWithdrawals",
274
- limit: PENDING_PARTIAL_WITHDRAWALS_LIMIT,
275
213
  });
276
214
  export const PendingConsolidations = new ProgressiveListCompositeType(electraSsz.PendingConsolidation, {
277
215
  typeName: "PendingConsolidations",
278
- limit: PENDING_CONSOLIDATIONS_LIMIT,
279
216
  });
280
217
 
281
218
  export const Builder = new ContainerType(
@@ -301,9 +238,6 @@ export const BuilderPendingWithdrawal = new ContainerType(
301
238
 
302
239
  export const BuilderPendingPayment = new ContainerType(
303
240
  {
304
- // weight sums attesting validators' effective balances, which are multiples of 1e9 Gwei;
305
- // such multiples stay exactly representable as JS numbers far beyond any reachable Ethereum
306
- // stake, so UintNum64 is safe here.
307
241
  weight: UintNum64,
308
242
  withdrawal: BuilderPendingWithdrawal,
309
243
  proposerIndex: ValidatorIndex,
@@ -346,7 +280,6 @@ export const PayloadAttestation = new ProgressiveContainerType(
346
280
 
347
281
  export const PayloadAttestations = new ProgressiveListCompositeType(PayloadAttestation, {
348
282
  typeName: "PayloadAttestations",
349
- limit: MAX_PAYLOAD_ATTESTATIONS,
350
283
  });
351
284
 
352
285
  export const PayloadAttestationMessage = new ContainerType(
@@ -475,16 +408,6 @@ export const ExecutionPayload = new ProgressiveContainerType(
475
408
  {typeName: "ExecutionPayload", jsonCase: "eth2"}
476
409
  );
477
410
 
478
- export const NewPayloadRequest = new ProgressiveContainerType(
479
- {
480
- ...electraSsz.NewPayloadRequest.fields,
481
- executionPayload: ExecutionPayload,
482
- executionRequests: ExecutionRequests,
483
- },
484
- activeFields(4),
485
- {typeName: "NewPayloadRequest", jsonCase: "eth2"}
486
- );
487
-
488
411
  export const ExecutionPayloadEnvelope = new ProgressiveContainerType(
489
412
  {
490
413
  payload: ExecutionPayload,
@@ -44,7 +44,6 @@ export type IndexedPayloadAttestation = ValueOf<typeof ssz.IndexedPayloadAttesta
44
44
  export type ProposerPreferences = ValueOf<typeof ssz.ProposerPreferences>;
45
45
  export type SignedProposerPreferences = ValueOf<typeof ssz.SignedProposerPreferences>;
46
46
  export type ExecutionPayload = ValueOf<typeof ssz.ExecutionPayload>;
47
- export type NewPayloadRequest = ValueOf<typeof ssz.NewPayloadRequest>;
48
47
  export type ExecutionPayloadBid = ValueOf<typeof ssz.ExecutionPayloadBid>;
49
48
  export type SignedExecutionPayloadBid = ValueOf<typeof ssz.SignedExecutionPayloadBid>;
50
49
  export type BuilderRequestAuth = ValueOf<typeof ssz.BuilderRequestAuth>;
package/src/types.ts CHANGED
@@ -121,7 +121,6 @@ type TypesByFork = {
121
121
  BlindedBeaconBlockBody: bellatrix.BlindedBeaconBlockBody;
122
122
  SignedBlindedBeaconBlock: bellatrix.SignedBlindedBeaconBlock;
123
123
  ExecutionPayload: bellatrix.ExecutionPayload;
124
- NewPayloadRequest: bellatrix.NewPayloadRequest;
125
124
  ExecutionPayloadHeader: bellatrix.ExecutionPayloadHeader;
126
125
  BuilderBid: bellatrix.BuilderBid;
127
126
  SignedBuilderBid: bellatrix.SignedBuilderBid;
@@ -157,7 +156,6 @@ type TypesByFork = {
157
156
  BlindedBeaconBlockBody: capella.BlindedBeaconBlockBody;
158
157
  SignedBlindedBeaconBlock: capella.SignedBlindedBeaconBlock;
159
158
  ExecutionPayload: capella.ExecutionPayload;
160
- NewPayloadRequest: capella.NewPayloadRequest;
161
159
  ExecutionPayloadHeader: capella.ExecutionPayloadHeader;
162
160
  BuilderBid: capella.BuilderBid;
163
161
  SignedBuilderBid: capella.SignedBuilderBid;
@@ -193,7 +191,6 @@ type TypesByFork = {
193
191
  BlindedBeaconBlockBody: deneb.BlindedBeaconBlockBody;
194
192
  SignedBlindedBeaconBlock: deneb.SignedBlindedBeaconBlock;
195
193
  ExecutionPayload: deneb.ExecutionPayload;
196
- NewPayloadRequest: deneb.NewPayloadRequest;
197
194
  ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
198
195
  BuilderBid: deneb.BuilderBid;
199
196
  SignedBuilderBid: deneb.SignedBuilderBid;
@@ -231,7 +228,6 @@ type TypesByFork = {
231
228
  BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
232
229
  SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
233
230
  ExecutionPayload: deneb.ExecutionPayload;
234
- NewPayloadRequest: electra.NewPayloadRequest;
235
231
  ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
236
232
  BuilderBid: electra.BuilderBid;
237
233
  SignedBuilderBid: electra.SignedBuilderBid;
@@ -270,7 +266,6 @@ type TypesByFork = {
270
266
  BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
271
267
  SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
272
268
  ExecutionPayload: deneb.ExecutionPayload;
273
- NewPayloadRequest: electra.NewPayloadRequest;
274
269
  ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
275
270
  BuilderBid: electra.BuilderBid;
276
271
  SignedBuilderBid: electra.SignedBuilderBid;
@@ -311,7 +306,6 @@ type TypesByFork = {
311
306
  BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
312
307
  SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
313
308
  ExecutionPayload: gloas.ExecutionPayload;
314
- NewPayloadRequest: gloas.NewPayloadRequest;
315
309
  ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
316
310
  BuilderBid: electra.BuilderBid;
317
311
  SignedBuilderBid: electra.SignedBuilderBid;
@@ -353,7 +347,6 @@ type TypesByFork = {
353
347
  BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
354
348
  SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
355
349
  ExecutionPayload: gloas.ExecutionPayload;
356
- NewPayloadRequest: gloas.NewPayloadRequest;
357
350
  ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
358
351
  BuilderBid: electra.BuilderBid;
359
352
  SignedBuilderBid: electra.SignedBuilderBid;
@@ -401,7 +394,6 @@ export type SignedBlockContents<F extends ForkAll = ForkAll> = TypesByFork[F]["S
401
394
  export type SignedOrUnsignedBlockContents<F extends ForkAll = ForkAll> = BlockContents<F> | SignedBlockContents<F>;
402
395
 
403
396
  export type ExecutionPayload<F extends ForkPostBellatrix = ForkPostBellatrix> = TypesByFork[F]["ExecutionPayload"];
404
- export type NewPayloadRequest<F extends ForkPostBellatrix = ForkPostBellatrix> = TypesByFork[F]["NewPayloadRequest"];
405
397
  export type ExecutionPayloadHeader<F extends ForkPostBellatrix = ForkPostBellatrix> =
406
398
  TypesByFork[F]["ExecutionPayloadHeader"];
407
399
  export type ExecutionRequests<F extends ForkPostElectra = ForkPostElectra> = TypesByFork[F]["ExecutionRequests"];