@lodestar/state-transition 1.48.0-dev.b5f4a8f2c6 → 1.48.0-dev.b62c97bb9f

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 (51) hide show
  1. package/lib/block/index.d.ts.map +1 -1
  2. package/lib/block/index.js +3 -2
  3. package/lib/block/index.js.map +1 -1
  4. package/lib/block/processExecutionPayloadBid.d.ts +2 -2
  5. package/lib/block/processExecutionPayloadBid.d.ts.map +1 -1
  6. package/lib/block/processExecutionPayloadBid.js +0 -2
  7. package/lib/block/processExecutionPayloadBid.js.map +1 -1
  8. package/lib/block/processOperations.d.ts.map +1 -1
  9. package/lib/block/processOperations.js +2 -18
  10. package/lib/block/processOperations.js.map +1 -1
  11. package/lib/block/processParentExecutionPayload.d.ts.map +1 -1
  12. package/lib/block/processParentExecutionPayload.js +2 -16
  13. package/lib/block/processParentExecutionPayload.js.map +1 -1
  14. package/lib/block/processPayloadAttestation.d.ts +1 -1
  15. package/lib/block/processPayloadAttestation.d.ts.map +1 -1
  16. package/lib/block/processPayloadAttestation.js +2 -2
  17. package/lib/block/processPayloadAttestation.js.map +1 -1
  18. package/lib/epoch/processPtcWindow.js +1 -1
  19. package/lib/epoch/processPtcWindow.js.map +1 -1
  20. package/lib/rewards/blockRewards.d.ts.map +1 -1
  21. package/lib/rewards/blockRewards.js +1 -3
  22. package/lib/rewards/blockRewards.js.map +1 -1
  23. package/lib/signatureSets/index.d.ts.map +1 -1
  24. package/lib/signatureSets/index.js +8 -0
  25. package/lib/signatureSets/index.js.map +1 -1
  26. package/lib/slot/upgradeStateToGloas.js +1 -1
  27. package/lib/slot/upgradeStateToGloas.js.map +1 -1
  28. package/lib/stateView/beaconStateView.d.ts +4 -0
  29. package/lib/stateView/beaconStateView.d.ts.map +1 -1
  30. package/lib/stateView/beaconStateView.js +9 -0
  31. package/lib/stateView/beaconStateView.js.map +1 -1
  32. package/lib/stateView/interface.d.ts +1 -0
  33. package/lib/stateView/interface.d.ts.map +1 -1
  34. package/lib/stateView/interface.js.map +1 -1
  35. package/lib/stateView/nativeBeaconStateView.d.ts +1 -0
  36. package/lib/stateView/nativeBeaconStateView.d.ts.map +1 -1
  37. package/lib/stateView/nativeBeaconStateView.js +3 -0
  38. package/lib/stateView/nativeBeaconStateView.js.map +1 -1
  39. package/package.json +8 -8
  40. package/src/block/index.ts +5 -2
  41. package/src/block/processExecutionPayloadBid.ts +2 -5
  42. package/src/block/processOperations.ts +2 -29
  43. package/src/block/processParentExecutionPayload.ts +2 -27
  44. package/src/block/processPayloadAttestation.ts +3 -2
  45. package/src/epoch/processPtcWindow.ts +1 -1
  46. package/src/rewards/blockRewards.ts +1 -3
  47. package/src/signatureSets/index.ts +17 -3
  48. package/src/slot/upgradeStateToGloas.ts +1 -1
  49. package/src/stateView/beaconStateView.ts +12 -0
  50. package/src/stateView/interface.ts +1 -0
  51. package/src/stateView/nativeBeaconStateView.ts +4 -0
@@ -456,6 +456,18 @@ export class BeaconStateView implements IBeaconStateViewLatestFork {
456
456
  }
457
457
  throw new Error(`PTC committees are not available for epoch=${epoch}`);
458
458
  }
459
+
460
+ /**
461
+ * Return the PTC for a slot in the previous, current or next epoch
462
+ */
463
+ getPayloadTimelinessCommittee(slot: Slot): Uint32Array {
464
+ if (this.config.getForkSeq(this.cachedState.slot) < ForkSeq.gloas) {
465
+ throw new Error("PTC committees are not supported before Gloas");
466
+ }
467
+
468
+ return (this.cachedState as CachedBeaconStateGloas).epochCtx.getPayloadTimelinessCommittee(slot);
469
+ }
470
+
459
471
  /**
460
472
  * Return all positions of the validator in the PTC committee for the given slot.
461
473
  *
@@ -285,6 +285,7 @@ export interface IBeaconStateViewGloas extends IBeaconStateViewFulu {
285
285
  getBuildersLength(): number;
286
286
  canBuilderCoverBid(builderIndex: BuilderIndex, bidAmount: number): boolean;
287
287
  getEpochPTCs(epoch: Epoch): Uint32Array[];
288
+ getPayloadTimelinessCommittee(slot: Slot): Uint32Array;
288
289
  getIndicesInPayloadTimelinessCommittee(validatorIndex: ValidatorIndex, slot: Slot): number[];
289
290
  /**
290
291
  * Clone the state and apply parent execution payload effects.
@@ -926,6 +926,10 @@ export class NativeBeaconStateView implements IBeaconStateViewLatestFork {
926
926
  return cached;
927
927
  }
928
928
 
929
+ getPayloadTimelinessCommittee(slot: Slot): Uint32Array {
930
+ return this.binding.getPayloadTimelinessCommittee(slot);
931
+ }
932
+
929
933
  getIndicesInPayloadTimelinessCommittee(validatorIndex: ValidatorIndex, slot: Slot): number[] {
930
934
  return this.binding.getIndicesInPayloadTimelinessCommittee(validatorIndex, slot);
931
935
  }