@lodestar/state-transition 1.52.0-dev.693981c543 → 1.52.0-dev.6c1c955421
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 +1 -1
- package/lib/block/index.js.map +1 -1
- package/lib/block/processExecutionPayloadBid.d.ts +1 -1
- package/lib/block/processExecutionPayloadBid.d.ts.map +1 -1
- package/lib/block/processExecutionPayloadBid.js +2 -2
- package/lib/block/processExecutionPayloadBid.js.map +1 -1
- package/lib/signatureSets/index.d.ts.map +1 -1
- package/lib/signatureSets/index.js +13 -4
- package/lib/signatureSets/index.js.map +1 -1
- package/lib/slot/upgradeStateToGloas.d.ts.map +1 -1
- package/lib/slot/upgradeStateToGloas.js +22 -27
- package/lib/slot/upgradeStateToGloas.js.map +1 -1
- package/lib/slot/upgradeStateToHeze.d.ts.map +1 -1
- package/lib/slot/upgradeStateToHeze.js +0 -4
- package/lib/slot/upgradeStateToHeze.js.map +1 -1
- package/lib/stateView/beaconStateView.d.ts +1 -0
- package/lib/stateView/beaconStateView.d.ts.map +1 -1
- package/lib/stateView/beaconStateView.js +7 -1
- 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/lib/util/gloas.d.ts +5 -0
- package/lib/util/gloas.d.ts.map +1 -1
- package/lib/util/gloas.js +10 -0
- package/lib/util/gloas.js.map +1 -1
- package/lib/util/slot.d.ts.map +1 -1
- package/lib/util/slot.js +3 -7
- package/lib/util/slot.js.map +1 -1
- package/package.json +9 -9
- package/src/block/index.ts +2 -1
- package/src/block/processExecutionPayloadBid.ts +3 -2
- package/src/signatureSets/index.ts +26 -4
- package/src/slot/upgradeStateToGloas.ts +23 -31
- package/src/slot/upgradeStateToHeze.ts +0 -6
- package/src/stateView/beaconStateView.ts +9 -1
- package/src/stateView/interface.ts +1 -0
- package/src/stateView/nativeBeaconStateView.ts +4 -0
- package/src/util/gloas.ts +11 -0
- package/src/util/slot.ts +3 -7
package/src/util/slot.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {ChainConfig, ChainForkConfig} from "@lodestar/config";
|
|
2
|
-
import {GENESIS_EPOCH, GENESIS_SLOT} from "@lodestar/params";
|
|
2
|
+
import {GENESIS_EPOCH, GENESIS_SLOT, SLOTS_PER_EPOCH} from "@lodestar/params";
|
|
3
3
|
import {Epoch, Slot, TimeSeconds} from "@lodestar/types";
|
|
4
4
|
import {computeEpochAtSlot, computeStartSlotAtEpoch} from "./epoch.js";
|
|
5
5
|
|
|
@@ -8,11 +8,7 @@ import {computeEpochAtSlot, computeStartSlotAtEpoch} from "./epoch.js";
|
|
|
8
8
|
* A fork that changes the slot duration must add an entry here and in `ForkConfig.getSlotDurationMs`.
|
|
9
9
|
*/
|
|
10
10
|
export function getSlotDurations(config: ChainConfig): [Epoch, number][] {
|
|
11
|
-
|
|
12
|
-
if (config.HEZE_FORK_EPOCH !== Infinity) {
|
|
13
|
-
durations.push([config.HEZE_FORK_EPOCH, config.SLOT_DURATION_MS_HEZE]);
|
|
14
|
-
}
|
|
15
|
-
return durations;
|
|
11
|
+
return [[GENESIS_EPOCH, config.SLOT_DURATION_MS]];
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
/** Slot duration in ms in effect at a given epoch */
|
|
@@ -78,7 +74,7 @@ export function getCurrentSlot(config: ChainConfig, genesisTime: TimeSeconds): S
|
|
|
78
74
|
* across slot duration changes
|
|
79
75
|
*/
|
|
80
76
|
export function getBlobDataRetentionStartEpoch(config: ChainConfig, epoch: Epoch): Epoch {
|
|
81
|
-
const windowMs = config.
|
|
77
|
+
const windowMs = config.MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS * SLOTS_PER_EPOCH * config.SLOT_DURATION_MS;
|
|
82
78
|
const currentStartMs = computeTimeAtSlotMs(config, computeStartSlotAtEpoch(epoch), 0);
|
|
83
79
|
if (currentStartMs < windowMs) {
|
|
84
80
|
return GENESIS_EPOCH;
|