@lodestar/fork-choice 1.51.0-dev.8391040477 → 1.51.0-dev.83aae9f53e
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/forkChoice/fastConfirmation/utils.d.ts.map +1 -1
- package/lib/forkChoice/fastConfirmation/utils.js +19 -24
- package/lib/forkChoice/fastConfirmation/utils.js.map +1 -1
- package/lib/forkChoice/forkChoice.d.ts +14 -18
- package/lib/forkChoice/forkChoice.d.ts.map +1 -1
- package/lib/forkChoice/forkChoice.js +36 -35
- package/lib/forkChoice/forkChoice.js.map +1 -1
- package/lib/forkChoice/interface.d.ts +4 -2
- package/lib/forkChoice/interface.d.ts.map +1 -1
- package/lib/protoArray/protoArray.d.ts.map +1 -1
- package/lib/protoArray/protoArray.js +7 -0
- package/lib/protoArray/protoArray.js.map +1 -1
- package/package.json +7 -7
- package/src/forkChoice/fastConfirmation/utils.ts +21 -20
- package/src/forkChoice/forkChoice.ts +40 -37
- package/src/forkChoice/interface.ts +5 -3
- package/src/protoArray/protoArray.ts +9 -0
|
@@ -123,7 +123,7 @@ export interface IForkChoice {
|
|
|
123
123
|
*/
|
|
124
124
|
shouldOverrideForkChoiceUpdate(
|
|
125
125
|
headBlock: ProtoBlock,
|
|
126
|
-
|
|
126
|
+
msFromSlot: number,
|
|
127
127
|
currentSlot: Slot
|
|
128
128
|
): ShouldOverrideForkChoiceUpdateResult;
|
|
129
129
|
/**
|
|
@@ -159,8 +159,8 @@ export interface IForkChoice {
|
|
|
159
159
|
onBlock(
|
|
160
160
|
block: BeaconBlock,
|
|
161
161
|
state: IBeaconStateView,
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
receiveDelayMs: number,
|
|
163
|
+
importDelayMs: number,
|
|
164
164
|
currentSlot: Slot,
|
|
165
165
|
executionStatus: BlockExecutionStatus,
|
|
166
166
|
dataAvailabilityStatus: DataAvailabilityStatus
|
|
@@ -350,7 +350,9 @@ export interface IForkChoice {
|
|
|
350
350
|
* `CheckpointWithHex` / finalized root without a specific payload-status variant in mind.
|
|
351
351
|
*/
|
|
352
352
|
forwardIterateDescendantsDefaultStatus(blockRoot: RootHex): IterableIterator<ProtoBlock>;
|
|
353
|
+
/** One summary per block, its default variant (FULL pre-Gloas, PENDING for Gloas) */
|
|
353
354
|
getBlockSummariesByParentRoot(parentRoot: RootHex): ProtoBlock[];
|
|
355
|
+
/** One summary per block, its default variant (FULL pre-Gloas, PENDING for Gloas) */
|
|
354
356
|
getBlockSummariesAtSlot(slot: Slot): ProtoBlock[];
|
|
355
357
|
/** Returns the distance of common ancestor of nodes to the max of the newNode and the prevNode. */
|
|
356
358
|
getCommonAncestorDepth(prevBlock: ProtoBlock, newBlock: ProtoBlock): AncestorResult;
|
|
@@ -1295,6 +1295,15 @@ export class ProtoArray {
|
|
|
1295
1295
|
|
|
1296
1296
|
// For Gloas: check if from previous slot
|
|
1297
1297
|
if (node.slot + 1 !== currentSlot) {
|
|
1298
|
+
// During the block's own slot a payload known to not satisfy the inclusion list
|
|
1299
|
+
// constraints ranks below its EMPTY variant, as it will from the next slot on
|
|
1300
|
+
if (
|
|
1301
|
+
node.slot === currentSlot &&
|
|
1302
|
+
node.payloadStatus === PayloadStatus.FULL &&
|
|
1303
|
+
this.payloadInclusionListSatisfaction.get(node.blockRoot) === false
|
|
1304
|
+
) {
|
|
1305
|
+
return PayloadStatus.PENDING;
|
|
1306
|
+
}
|
|
1298
1307
|
return node.payloadStatus;
|
|
1299
1308
|
}
|
|
1300
1309
|
|