-
-
Notifications
You must be signed in to change notification settings - Fork 416
Open
Labels
meta-feature-requestIssues to track feature requests.Issues to track feature requests.
Description
Problem description
as in #8650 we will not have a full beacon state at typescript anymore so the ShufflingCache.build() function will not work
current implementation:
/**
* Queue asynchronous build for an EpochShuffling, triggered from state-transition
*/
build(epoch: number, decisionRoot: string, state: BeaconStateAllForks, activeIndices: Uint32Array): void {
this.insertPromise(epoch, decisionRoot);
/**
* TODO: (@matthewkeil) This will get replaced by a proper build queue and a worker to do calculations
* on a NICE thread
*/
const timer = this.metrics?.shufflingCache.shufflingCalculationTime.startTimer({source: "build"});
computeEpochShufflingAsync(state, activeIndices, epoch)
.then((shuffling) => {
this.set(shuffling, decisionRoot);
})
.catch((err) =>
this.logger?.error(`error building shuffling for epoch ${epoch} at decisionRoot ${decisionRoot}`, {}, err)
)
.finally(() => {
timer?.();
});also the lazy build() does not work after fulu since we add proposerLookahead to EpochCache
Solution description
- remove
build()method - after every epoch transition, add a Shuffling to this cache
- revert feat: async shuffling refactor #6938 since it's not helpful anymore postfulu and it prevents Decouple beacon-node and state-transition #8650
Additional context
No response
Metadata
Metadata
Assignees
Labels
meta-feature-requestIssues to track feature requests.Issues to track feature requests.