@lodestar/beacon-node 1.51.0-dev.5e25b73306 → 1.51.0-dev.708700cdf6
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/api/impl/validator/index.js +7 -5
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.d.ts.map +1 -1
- package/lib/chain/blocks/importExecutionPayload.js +2 -1
- package/lib/chain/blocks/importExecutionPayload.js.map +1 -1
- package/lib/chain/opPools/inclusionListStore.d.ts.map +1 -1
- package/lib/chain/opPools/inclusionListStore.js +2 -2
- package/lib/chain/opPools/inclusionListStore.js.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.d.ts.map +1 -1
- package/lib/chain/produceBlock/produceBlockBody.js +0 -1
- package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
- package/lib/chain/validation/inclusionList.d.ts.map +1 -1
- package/lib/chain/validation/inclusionList.js +11 -2
- package/lib/chain/validation/inclusionList.js.map +1 -1
- package/lib/execution/engine/blobVersionedHashes.d.ts +1 -1
- package/lib/execution/engine/blobVersionedHashes.d.ts.map +1 -1
- package/lib/execution/engine/blobVersionedHashes.js.map +1 -1
- package/lib/execution/engine/http.d.ts.map +1 -1
- package/lib/execution/engine/http.js +0 -1
- package/lib/execution/engine/http.js.map +1 -1
- package/lib/execution/engine/mock.d.ts.map +1 -1
- package/lib/execution/engine/mock.js +6 -4
- package/lib/execution/engine/mock.js.map +1 -1
- package/lib/execution/engine/payloadIdCache.d.ts +1 -2
- package/lib/execution/engine/payloadIdCache.d.ts.map +1 -1
- package/lib/execution/engine/payloadIdCache.js +3 -3
- package/lib/execution/engine/payloadIdCache.js.map +1 -1
- package/lib/execution/engine/sszTypes.d.ts +38 -38
- package/lib/execution/engine/types.d.ts +1 -1
- package/lib/execution/engine/types.d.ts.map +1 -1
- package/lib/execution/engine/types.js +7 -6
- package/lib/execution/engine/types.js.map +1 -1
- package/lib/network/gossip/topic.d.ts +6 -6
- package/lib/network/processor/index.d.ts.map +1 -1
- package/lib/network/processor/index.js +26 -25
- package/lib/network/processor/index.js.map +1 -1
- package/package.json +30 -30
- package/src/api/impl/validator/index.ts +7 -7
- package/src/chain/blocks/importExecutionPayload.ts +2 -1
- package/src/chain/opPools/inclusionListStore.ts +3 -3
- package/src/chain/produceBlock/produceBlockBody.ts +0 -1
- package/src/chain/validation/inclusionList.ts +11 -2
- package/src/execution/engine/blobVersionedHashes.ts +1 -1
- package/src/execution/engine/http.ts +0 -1
- package/src/execution/engine/mock.ts +6 -4
- package/src/execution/engine/payloadIdCache.ts +6 -7
- package/src/execution/engine/types.ts +8 -8
- package/src/network/processor/index.ts +22 -23
- package/src/network/processor/types.ts +1 -1
|
@@ -867,19 +867,20 @@ export class NetworkProcessor {
|
|
|
867
867
|
const nowSec = Date.now() / 1000;
|
|
868
868
|
const minSlot = clockSlot - MAX_UNKNOWN_ROOTS_SLOT_CACHE_SIZE;
|
|
869
869
|
|
|
870
|
-
for (const [slot,
|
|
870
|
+
for (const [slot, bufferedRoots] of this.bufferedRootsBySlot) {
|
|
871
871
|
if (slot > minSlot) continue;
|
|
872
872
|
|
|
873
|
-
|
|
874
|
-
// for (blockPeerIds set) have block waits keyed here; skipping the rest avoids deleting a payload wait
|
|
875
|
-
// that a newer slot created for the same root (block/envelope searches share searchedRootsBySlot).
|
|
876
|
-
for (const [rootHex, entry] of searchedRoots) {
|
|
877
|
-
if (entry.blockPeerIds === undefined) continue;
|
|
873
|
+
for (const rootHex of bufferedRoots) {
|
|
878
874
|
const messagesByTopic = this.awaitingMessagesByBlockRoot.get(rootHex);
|
|
879
875
|
if (messagesByTopic === undefined) continue;
|
|
880
|
-
let
|
|
876
|
+
let remaining = 0;
|
|
881
877
|
for (const messages of messagesByTopic.values()) {
|
|
882
878
|
for (const message of messages) {
|
|
879
|
+
// the same root may be buffered again from a newer slot, keep those messages.
|
|
880
|
+
// msgSlot is always set before buffering, a missing one expires rather than leaks
|
|
881
|
+
if ((message.msgSlot ?? minSlot) > minSlot) continue;
|
|
882
|
+
messages.delete(message);
|
|
883
|
+
this.awaitingBlockMessageCount--;
|
|
883
884
|
const topicType = message.topic.type;
|
|
884
885
|
this.metrics?.awaitingBlockGossipMessages.reject.inc({
|
|
885
886
|
topic: topicType,
|
|
@@ -891,22 +892,22 @@ export class NetworkProcessor {
|
|
|
891
892
|
);
|
|
892
893
|
// No need to report the dropped job to gossip. It will be eventually pruned from the mcache
|
|
893
894
|
}
|
|
894
|
-
|
|
895
|
-
}
|
|
896
|
-
if (this.awaitingMessagesByBlockRoot.delete(rootHex)) {
|
|
897
|
-
this.awaitingBlockMessageCount -= removed;
|
|
895
|
+
remaining += messages.size;
|
|
898
896
|
}
|
|
897
|
+
if (remaining === 0) this.awaitingMessagesByBlockRoot.delete(rootHex);
|
|
899
898
|
}
|
|
900
899
|
|
|
901
|
-
|
|
902
|
-
// only roots this slot did an ENVELOPE search for (envelopePeerIds set) have payload waits keyed here.
|
|
903
|
-
for (const [rootHex, entry] of searchedRoots) {
|
|
904
|
-
if (entry.envelopePeerIds === undefined) continue;
|
|
900
|
+
for (const rootHex of bufferedRoots) {
|
|
905
901
|
const messagesByTopic = this.awaitingMessagesByPayloadBlockRoot.get(rootHex);
|
|
906
902
|
if (messagesByTopic === undefined) continue;
|
|
907
|
-
let
|
|
903
|
+
let remaining = 0;
|
|
908
904
|
for (const messages of messagesByTopic.values()) {
|
|
909
905
|
for (const message of messages) {
|
|
906
|
+
// the same root may be buffered again from a newer slot, keep those messages.
|
|
907
|
+
// msgSlot is always set before buffering, a missing one expires rather than leaks
|
|
908
|
+
if ((message.msgSlot ?? minSlot) > minSlot) continue;
|
|
909
|
+
messages.delete(message);
|
|
910
|
+
this.awaitingPayloadMessageCount--;
|
|
910
911
|
const topicType = message.topic.type;
|
|
911
912
|
this.metrics?.awaitingPayloadGossipMessages.reject.inc({
|
|
912
913
|
topic: topicType,
|
|
@@ -918,18 +919,16 @@ export class NetworkProcessor {
|
|
|
918
919
|
);
|
|
919
920
|
// No need to report the dropped job to gossip. It will be eventually pruned from the mcache
|
|
920
921
|
}
|
|
921
|
-
|
|
922
|
-
}
|
|
923
|
-
if (this.awaitingMessagesByPayloadBlockRoot.delete(rootHex)) {
|
|
924
|
-
this.awaitingPayloadMessageCount -= removed;
|
|
922
|
+
remaining += messages.size;
|
|
925
923
|
}
|
|
924
|
+
if (remaining === 0) this.awaitingMessagesByPayloadBlockRoot.delete(rootHex);
|
|
926
925
|
}
|
|
927
926
|
|
|
928
|
-
this.
|
|
927
|
+
this.bufferedRootsBySlot.delete(slot);
|
|
929
928
|
}
|
|
930
929
|
|
|
931
|
-
for (const slot of this.
|
|
932
|
-
if (slot <= minSlot) this.
|
|
930
|
+
for (const slot of this.searchedRootsBySlot.keys()) {
|
|
931
|
+
if (slot <= minSlot) this.searchedRootsBySlot.delete(slot);
|
|
933
932
|
}
|
|
934
933
|
|
|
935
934
|
for (const [peer, slot] of this.fatalPeers) {
|
|
@@ -11,7 +11,7 @@ export type GossipAttestationsWork = {
|
|
|
11
11
|
export type PendingGossipsubMessage = {
|
|
12
12
|
topic: GossipTopic;
|
|
13
13
|
msg: Message;
|
|
14
|
-
//
|
|
14
|
+
// set for every topic with a slot, held messages expire by it
|
|
15
15
|
msgSlot?: Slot;
|
|
16
16
|
msgId: string;
|
|
17
17
|
propagationSource: PeerIdStr;
|