@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.
- package/lib/block/index.d.ts.map +1 -1
- package/lib/block/index.js +3 -2
- package/lib/block/index.js.map +1 -1
- package/lib/block/processExecutionPayloadBid.d.ts +2 -2
- package/lib/block/processExecutionPayloadBid.d.ts.map +1 -1
- package/lib/block/processExecutionPayloadBid.js +0 -2
- package/lib/block/processExecutionPayloadBid.js.map +1 -1
- package/lib/block/processOperations.d.ts.map +1 -1
- package/lib/block/processOperations.js +2 -18
- package/lib/block/processOperations.js.map +1 -1
- package/lib/block/processParentExecutionPayload.d.ts.map +1 -1
- package/lib/block/processParentExecutionPayload.js +2 -16
- package/lib/block/processParentExecutionPayload.js.map +1 -1
- package/lib/block/processPayloadAttestation.d.ts +1 -1
- package/lib/block/processPayloadAttestation.d.ts.map +1 -1
- package/lib/block/processPayloadAttestation.js +2 -2
- package/lib/block/processPayloadAttestation.js.map +1 -1
- package/lib/epoch/processPtcWindow.js +1 -1
- package/lib/epoch/processPtcWindow.js.map +1 -1
- package/lib/rewards/blockRewards.d.ts.map +1 -1
- package/lib/rewards/blockRewards.js +1 -3
- package/lib/rewards/blockRewards.js.map +1 -1
- package/lib/signatureSets/index.d.ts.map +1 -1
- package/lib/signatureSets/index.js +8 -0
- package/lib/signatureSets/index.js.map +1 -1
- package/lib/slot/upgradeStateToGloas.js +1 -1
- package/lib/slot/upgradeStateToGloas.js.map +1 -1
- package/lib/stateView/beaconStateView.d.ts +4 -0
- package/lib/stateView/beaconStateView.d.ts.map +1 -1
- package/lib/stateView/beaconStateView.js +9 -0
- package/lib/stateView/beaconStateView.js.map +1 -1
- package/lib/stateView/interface.d.ts +1 -0
- package/lib/stateView/interface.d.ts.map +1 -1
- package/lib/stateView/interface.js.map +1 -1
- package/lib/stateView/nativeBeaconStateView.d.ts +1 -0
- package/lib/stateView/nativeBeaconStateView.d.ts.map +1 -1
- package/lib/stateView/nativeBeaconStateView.js +3 -0
- package/lib/stateView/nativeBeaconStateView.js.map +1 -1
- package/package.json +8 -8
- package/src/block/index.ts +5 -2
- package/src/block/processExecutionPayloadBid.ts +2 -5
- package/src/block/processOperations.ts +2 -29
- package/src/block/processParentExecutionPayload.ts +2 -27
- package/src/block/processPayloadAttestation.ts +3 -2
- package/src/epoch/processPtcWindow.ts +1 -1
- package/src/rewards/blockRewards.ts +1 -3
- package/src/signatureSets/index.ts +17 -3
- package/src/slot/upgradeStateToGloas.ts +1 -1
- package/src/stateView/beaconStateView.ts +12 -0
- package/src/stateView/interface.ts +1 -0
- 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
|
}
|