@lodestar/beacon-node 1.35.0-dev.47470aab65 → 1.35.0-dev.549f58dd39
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/beacon/blocks/index.js +1 -1
- package/lib/api/impl/beacon/blocks/index.js.map +1 -1
- package/lib/api/impl/lodestar/index.js +1 -1
- package/lib/api/impl/lodestar/index.js.map +1 -1
- package/lib/api/impl/validator/index.d.ts.map +1 -1
- package/lib/api/impl/validator/index.js +6 -5
- package/lib/api/impl/validator/index.js.map +1 -1
- package/lib/chain/blocks/importBlock.d.ts.map +1 -1
- package/lib/chain/blocks/importBlock.js +3 -3
- package/lib/chain/blocks/importBlock.js.map +1 -1
- package/lib/chain/chain.js +1 -1
- package/lib/chain/chain.js.map +1 -1
- package/lib/chain/validatorMonitor.d.ts.map +1 -1
- package/lib/chain/validatorMonitor.js +5 -5
- package/lib/chain/validatorMonitor.js.map +1 -1
- package/lib/network/gossip/gossipsub.js +1 -1
- package/lib/network/gossip/gossipsub.js.map +1 -1
- package/lib/network/gossip/scoringParameters.js +4 -4
- package/lib/network/gossip/scoringParameters.js.map +1 -1
- package/lib/network/peers/peerManager.d.ts.map +1 -1
- package/lib/network/peers/peerManager.js +1 -2
- package/lib/network/peers/peerManager.js.map +1 -1
- package/lib/network/processor/gossipHandlers.js +1 -1
- package/lib/network/processor/gossipHandlers.js.map +1 -1
- package/lib/network/subnets/attnetsService.d.ts.map +1 -1
- package/lib/network/subnets/attnetsService.js +1 -1
- package/lib/network/subnets/attnetsService.js.map +1 -1
- package/lib/node/notifier.js +1 -1
- package/lib/node/notifier.js.map +1 -1
- package/lib/sync/unknownBlock.d.ts.map +1 -1
- package/lib/sync/unknownBlock.js +1 -2
- package/lib/sync/unknownBlock.js.map +1 -1
- package/lib/util/clock.d.ts +3 -3
- package/lib/util/clock.js +6 -6
- package/lib/util/clock.js.map +1 -1
- package/package.json +14 -14
- package/src/api/impl/beacon/blocks/index.ts +1 -1
- package/src/api/impl/lodestar/index.ts +1 -1
- package/src/api/impl/validator/index.ts +5 -6
- package/src/chain/blocks/importBlock.ts +2 -4
- package/src/chain/chain.ts +1 -1
- package/src/chain/validatorMonitor.ts +4 -5
- package/src/network/gossip/gossipsub.ts +1 -1
- package/src/network/gossip/scoringParameters.ts +4 -4
- package/src/network/peers/peerManager.ts +1 -2
- package/src/network/processor/gossipHandlers.ts +1 -1
- package/src/network/subnets/attnetsService.ts +6 -3
- package/src/node/notifier.ts +1 -1
- package/src/sync/unknownBlock.ts +1 -2
- package/src/util/clock.ts +7 -7
package/lib/util/clock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clock.js","sourceRoot":"","sources":["../../src/util/clock.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,aAAa,CAAC;AAGvC,OAAO,EAAC,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAEjG,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAC,8BAA8B,EAAC,MAAM,2BAA2B,CAAC;AAEzE,MAAM,CAAN,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB;;;OAGG;IACH,iCAAmB,CAAA;IACnB;;;OAGG;IACH,mCAAqB,CAAA;AACvB,CAAC,EAXW,UAAU,KAAV,UAAU,QAWrB;AA+CD;;GAEG;AACH,MAAM,OAAO,KAAM,SAAQ,YAAY;IAC5B,WAAW,CAAS;IACZ,MAAM,CAAkB;IACjC,SAAS,CAA0B;IAC1B,MAAM,CAAc;IAC7B,YAAY,CAAS;IAE7B,YAAY,EAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAsE;QAC5G,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,IA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e,EAAE,CAAC,CAAC;QACvE,CAAC;IACH,CAAC,CAAC;IAEM,eAAe;QACrB,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAChE,MAAM,kBAAkB,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAChE,OAAO,mBAAmB,GAAG,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
13
13
|
},
|
|
14
|
-
"version": "1.35.0-dev.
|
|
14
|
+
"version": "1.35.0-dev.549f58dd39",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -134,18 +134,18 @@
|
|
|
134
134
|
"@libp2p/peer-id": "^5.1.0",
|
|
135
135
|
"@libp2p/prometheus-metrics": "^4.3.15",
|
|
136
136
|
"@libp2p/tcp": "^10.1.8",
|
|
137
|
-
"@lodestar/api": "1.35.0-dev.
|
|
138
|
-
"@lodestar/config": "1.35.0-dev.
|
|
139
|
-
"@lodestar/db": "1.35.0-dev.
|
|
140
|
-
"@lodestar/fork-choice": "1.35.0-dev.
|
|
141
|
-
"@lodestar/light-client": "1.35.0-dev.
|
|
142
|
-
"@lodestar/logger": "1.35.0-dev.
|
|
143
|
-
"@lodestar/params": "1.35.0-dev.
|
|
144
|
-
"@lodestar/reqresp": "1.35.0-dev.
|
|
145
|
-
"@lodestar/state-transition": "1.35.0-dev.
|
|
146
|
-
"@lodestar/types": "1.35.0-dev.
|
|
147
|
-
"@lodestar/utils": "1.35.0-dev.
|
|
148
|
-
"@lodestar/validator": "1.35.0-dev.
|
|
137
|
+
"@lodestar/api": "1.35.0-dev.549f58dd39",
|
|
138
|
+
"@lodestar/config": "1.35.0-dev.549f58dd39",
|
|
139
|
+
"@lodestar/db": "1.35.0-dev.549f58dd39",
|
|
140
|
+
"@lodestar/fork-choice": "1.35.0-dev.549f58dd39",
|
|
141
|
+
"@lodestar/light-client": "1.35.0-dev.549f58dd39",
|
|
142
|
+
"@lodestar/logger": "1.35.0-dev.549f58dd39",
|
|
143
|
+
"@lodestar/params": "1.35.0-dev.549f58dd39",
|
|
144
|
+
"@lodestar/reqresp": "1.35.0-dev.549f58dd39",
|
|
145
|
+
"@lodestar/state-transition": "1.35.0-dev.549f58dd39",
|
|
146
|
+
"@lodestar/types": "1.35.0-dev.549f58dd39",
|
|
147
|
+
"@lodestar/utils": "1.35.0-dev.549f58dd39",
|
|
148
|
+
"@lodestar/validator": "1.35.0-dev.549f58dd39",
|
|
149
149
|
"@multiformats/multiaddr": "^12.1.3",
|
|
150
150
|
"datastore-core": "^10.0.2",
|
|
151
151
|
"datastore-fs": "^10.0.6",
|
|
@@ -180,5 +180,5 @@
|
|
|
180
180
|
"beacon",
|
|
181
181
|
"blockchain"
|
|
182
182
|
],
|
|
183
|
-
"gitHead": "
|
|
183
|
+
"gitHead": "d7746f3e99d2e8b5d20fe6e9c7c516e1ed92699c"
|
|
184
184
|
}
|
|
@@ -256,7 +256,7 @@ export function getBeaconBlockApi({
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
// TODO: Validate block
|
|
259
|
-
const delaySec = seenTimestampSec -
|
|
259
|
+
const delaySec = seenTimestampSec - (chain.genesisTime + slot * config.SECONDS_PER_SLOT);
|
|
260
260
|
metrics?.gossipBlock.elapsedTimeTillReceived.observe({source: OpSource.api}, delaySec);
|
|
261
261
|
chain.validatorMonitor?.registerBeaconBlock(OpSource.api, delaySec, signedBlock.message);
|
|
262
262
|
|
|
@@ -26,7 +26,7 @@ export function getLodestarApi({
|
|
|
26
26
|
}: Pick<ApiModules, "chain" | "config" | "db" | "network" | "sync">): ApplicationMethods<routes.lodestar.Endpoints> {
|
|
27
27
|
let writingHeapdump = false;
|
|
28
28
|
let writingProfile = false;
|
|
29
|
-
const defaultProfileMs = SLOTS_PER_EPOCH * config.
|
|
29
|
+
const defaultProfileMs = SLOTS_PER_EPOCH * config.SECONDS_PER_SLOT * 1000;
|
|
30
30
|
|
|
31
31
|
return {
|
|
32
32
|
async writeHeapdump({thread = "main", dirpath = "."}) {
|
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
calculateCommitteeAssignments,
|
|
23
23
|
computeEpochAtSlot,
|
|
24
24
|
computeStartSlotAtEpoch,
|
|
25
|
-
computeTimeAtSlot,
|
|
26
25
|
createCachedBeaconState,
|
|
27
26
|
getBlockRootAtSlot,
|
|
28
27
|
getCurrentSlot,
|
|
@@ -181,7 +180,7 @@ export function getValidatorApi(
|
|
|
181
180
|
* This value is the same to MAXIMUM_GOSSIP_CLOCK_DISPARITY_SEC.
|
|
182
181
|
* For very fast networks, reduce clock disparity to half a slot.
|
|
183
182
|
*/
|
|
184
|
-
const MAX_API_CLOCK_DISPARITY_SEC = Math.min(0.5, config.
|
|
183
|
+
const MAX_API_CLOCK_DISPARITY_SEC = Math.min(0.5, config.SECONDS_PER_SLOT / 2);
|
|
185
184
|
const MAX_API_CLOCK_DISPARITY_MS = MAX_API_CLOCK_DISPARITY_SEC * 1000;
|
|
186
185
|
|
|
187
186
|
/** Compute and cache the genesis block root */
|
|
@@ -214,7 +213,7 @@ export function getValidatorApi(
|
|
|
214
213
|
return;
|
|
215
214
|
}
|
|
216
215
|
|
|
217
|
-
const slotStartSec =
|
|
216
|
+
const slotStartSec = chain.genesisTime + slot * config.SECONDS_PER_SLOT;
|
|
218
217
|
const msToSlot = slotStartSec * 1000 - Date.now();
|
|
219
218
|
|
|
220
219
|
if (msToSlot > MAX_API_CLOCK_DISPARITY_MS) {
|
|
@@ -245,7 +244,7 @@ export function getValidatorApi(
|
|
|
245
244
|
*/
|
|
246
245
|
function msToNextEpoch(): number {
|
|
247
246
|
const nextEpoch = chain.clock.currentEpoch + 1;
|
|
248
|
-
const secPerEpoch =
|
|
247
|
+
const secPerEpoch = SLOTS_PER_EPOCH * config.SECONDS_PER_SLOT;
|
|
249
248
|
const nextEpochStartSec = chain.genesisTime + nextEpoch * secPerEpoch;
|
|
250
249
|
return nextEpochStartSec * 1000 - Date.now();
|
|
251
250
|
}
|
|
@@ -1019,8 +1018,8 @@ export function getValidatorApi(
|
|
|
1019
1018
|
const head = chain.forkChoice.getHead();
|
|
1020
1019
|
let state: CachedBeaconStateAllForks | undefined = undefined;
|
|
1021
1020
|
const startSlot = computeStartSlotAtEpoch(epoch);
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1021
|
+
const slotMs = config.SECONDS_PER_SLOT * 1000;
|
|
1022
|
+
const prepareNextSlotLookAheadMs = slotMs - config.getSlotComponentDurationMs(PREPARE_NEXT_SLOT_BPS);
|
|
1024
1023
|
const toNextEpochMs = msToNextEpoch();
|
|
1025
1024
|
// validators may request next epoch's duties when it's close to next epoch
|
|
1026
1025
|
// this is to avoid missed block proposal due to 0 epoch look ahead
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
RootCache,
|
|
15
15
|
computeEpochAtSlot,
|
|
16
16
|
computeStartSlotAtEpoch,
|
|
17
|
-
computeTimeAtSlot,
|
|
18
17
|
isExecutionStateType,
|
|
19
18
|
isStartSlotOfEpoch,
|
|
20
19
|
isStateValidatorsNodesPopulated,
|
|
@@ -79,8 +78,7 @@ export async function importBlock(
|
|
|
79
78
|
const currentEpoch = computeEpochAtSlot(currentSlot);
|
|
80
79
|
const blockEpoch = computeEpochAtSlot(blockSlot);
|
|
81
80
|
const prevFinalizedEpoch = this.forkChoice.getFinalizedCheckpoint().epoch;
|
|
82
|
-
const blockDelaySec =
|
|
83
|
-
fullyVerifiedBlock.seenTimestampSec - computeTimeAtSlot(this.config, blockSlot, postState.genesisTime);
|
|
81
|
+
const blockDelaySec = (fullyVerifiedBlock.seenTimestampSec - postState.genesisTime) % this.config.SECONDS_PER_SLOT;
|
|
84
82
|
const recvToValLatency = Date.now() / 1000 - (opts.seenTimestampSec ?? Date.now() / 1000);
|
|
85
83
|
const fork = this.config.getForkSeq(blockSlot);
|
|
86
84
|
|
|
@@ -260,7 +258,7 @@ export async function importBlock(
|
|
|
260
258
|
this.metrics.headSlot.set(newHead.slot);
|
|
261
259
|
// Only track "recent" blocks. Otherwise sync can distort this metrics heavily.
|
|
262
260
|
// We want to track recent blocks coming from gossip, unknown block sync, and API.
|
|
263
|
-
if (delaySec <
|
|
261
|
+
if (delaySec < SLOTS_PER_EPOCH * this.config.SECONDS_PER_SLOT) {
|
|
264
262
|
this.metrics.importBlock.elapsedTimeTillBecomeHead.observe(delaySec);
|
|
265
263
|
const cutOffSec = this.config.getAttestationDueMs(this.config.getForkName(blockSlot)) / 1000;
|
|
266
264
|
if (delaySec > cutOffSec) {
|
package/src/chain/chain.ts
CHANGED
|
@@ -1139,7 +1139,7 @@ export class BeaconChain implements IBeaconChain {
|
|
|
1139
1139
|
const metrics = this.metrics;
|
|
1140
1140
|
if (metrics && (slot + 1) % SLOTS_PER_EPOCH === 0) {
|
|
1141
1141
|
// On the last slot of the epoch
|
|
1142
|
-
sleep(this.config.
|
|
1142
|
+
sleep((1000 * this.config.SECONDS_PER_SLOT) / 2)
|
|
1143
1143
|
.then(() => this.validatorMonitor?.onceEveryEndOfEpoch(this.getHeadState()))
|
|
1144
1144
|
.catch((e) => {
|
|
1145
1145
|
if (!isErrorAborted(e)) this.logger.error("Error on validator monitor onceEveryEndOfEpoch", {slot}, e);
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
ParticipationFlags,
|
|
7
7
|
computeEpochAtSlot,
|
|
8
8
|
computeStartSlotAtEpoch,
|
|
9
|
-
computeTimeAtSlot,
|
|
10
9
|
getBlockRootAtSlot,
|
|
11
10
|
getCurrentSlot,
|
|
12
11
|
parseAttesterFlags,
|
|
@@ -456,7 +455,7 @@ export function createValidatorMonitor(
|
|
|
456
455
|
// Returns the duration between when the attestation `data` could be produced (ATTESTATION_DUE_BPS through the slot) and `seenTimestamp`.
|
|
457
456
|
const delaySec =
|
|
458
457
|
seenTimestampSec -
|
|
459
|
-
(
|
|
458
|
+
(genesisTime + data.slot * config.SECONDS_PER_SLOT + config.getAttestationDueMs(fork) / 1000);
|
|
460
459
|
for (const index of indexedAttestation.attestingIndices) {
|
|
461
460
|
const validator = validators.get(index);
|
|
462
461
|
if (validator) {
|
|
@@ -492,7 +491,7 @@ export function createValidatorMonitor(
|
|
|
492
491
|
// Returns the duration between when the attestation `data` could be produced (ATTESTATION_DUE_BPS through the slot) and `seenTimestamp`.
|
|
493
492
|
const delaySec =
|
|
494
493
|
seenTimestampSec -
|
|
495
|
-
(
|
|
494
|
+
(genesisTime + data.slot * config.SECONDS_PER_SLOT + config.getAttestationDueMs(fork) / 1000);
|
|
496
495
|
|
|
497
496
|
for (const index of indexedAttestation.attestingIndices) {
|
|
498
497
|
const validator = validators.get(index);
|
|
@@ -511,7 +510,7 @@ export function createValidatorMonitor(
|
|
|
511
510
|
const fork = config.getForkName(data.slot);
|
|
512
511
|
// Returns the duration between when a `AggregateAndproof` with `data` could be produced (AGGREGATE_DUE_BPS through the slot) and `seenTimestamp`.
|
|
513
512
|
const delaySec =
|
|
514
|
-
seenTimestampSec - (
|
|
513
|
+
seenTimestampSec - (genesisTime + data.slot * config.SECONDS_PER_SLOT + config.getAggregateDueMs(fork) / 1000);
|
|
515
514
|
|
|
516
515
|
for (const index of indexedAttestation.attestingIndices) {
|
|
517
516
|
const validator = validators.get(index);
|
|
@@ -540,7 +539,7 @@ export function createValidatorMonitor(
|
|
|
540
539
|
const fork = config.getForkName(data.slot);
|
|
541
540
|
// Returns the duration between when a `AggregateAndproof` with `data` could be produced (AGGREGATE_DUE_BPS through the slot) and `seenTimestamp`.
|
|
542
541
|
const delaySec =
|
|
543
|
-
seenTimestampSec - (
|
|
542
|
+
seenTimestampSec - (genesisTime + data.slot * config.SECONDS_PER_SLOT + config.getAggregateDueMs(fork) / 1000);
|
|
544
543
|
|
|
545
544
|
const aggregatorIndex = signedAggregateAndProof.message.aggregatorIndex;
|
|
546
545
|
const validatorAggregator = validators.get(aggregatorIndex);
|
|
@@ -105,7 +105,7 @@ export class Eth2Gossipsub extends GossipSub {
|
|
|
105
105
|
mcacheLength: 6,
|
|
106
106
|
mcacheGossip: 3,
|
|
107
107
|
// this should be in ms
|
|
108
|
-
seenTTL: config.
|
|
108
|
+
seenTTL: config.SECONDS_PER_SLOT * SLOTS_PER_EPOCH * 2 * 1000,
|
|
109
109
|
scoreParams,
|
|
110
110
|
scoreThresholds: gossipScoreThresholds,
|
|
111
111
|
// For a single stream, await processing each RPC before processing the next
|
|
@@ -84,10 +84,10 @@ export function computeGossipPeerScoreParams({
|
|
|
84
84
|
config: BeaconConfig;
|
|
85
85
|
eth2Context: Eth2Context;
|
|
86
86
|
}): Partial<PeerScoreParams> {
|
|
87
|
-
const decayIntervalMs = config.
|
|
87
|
+
const decayIntervalMs = config.SECONDS_PER_SLOT * 1000;
|
|
88
88
|
const decayToZero = 0.01;
|
|
89
|
-
const epochDurationMs = config.
|
|
90
|
-
const slotDurationMs = config.
|
|
89
|
+
const epochDurationMs = config.SECONDS_PER_SLOT * SLOTS_PER_EPOCH * 1000;
|
|
90
|
+
const slotDurationMs = config.SECONDS_PER_SLOT * 1000;
|
|
91
91
|
const scoreParameterDecayFn = (decayTimeMs: number): number => {
|
|
92
92
|
return scoreParameterDecayWithBase(decayTimeMs, decayIntervalMs, decayToZero);
|
|
93
93
|
};
|
|
@@ -265,7 +265,7 @@ function getTopicScoreParams(
|
|
|
265
265
|
|
|
266
266
|
if (meshMessageInfo) {
|
|
267
267
|
const {decaySlots, capFactor, activationWindow, currentSlot} = meshMessageInfo;
|
|
268
|
-
const decayTimeMs = config.
|
|
268
|
+
const decayTimeMs = config.SECONDS_PER_SLOT * decaySlots * 1000;
|
|
269
269
|
params.meshMessageDeliveriesDecay = scoreParameterDecayFn(decayTimeMs);
|
|
270
270
|
params.meshMessageDeliveriesThreshold = threshold(params.meshMessageDeliveriesDecay, expectedMessageRate / 50);
|
|
271
271
|
params.meshMessageDeliveriesCap = Math.max(capFactor * params.meshMessageDeliveriesThreshold, 2);
|
|
@@ -3,7 +3,6 @@ import {BitArray} from "@chainsafe/ssz";
|
|
|
3
3
|
import {BeaconConfig} from "@lodestar/config";
|
|
4
4
|
import {LoggerNode} from "@lodestar/logger/node";
|
|
5
5
|
import {ForkSeq, SLOTS_PER_EPOCH, SYNC_COMMITTEE_SUBNET_COUNT} from "@lodestar/params";
|
|
6
|
-
import {computeTimeAtSlot} from "@lodestar/state-transition";
|
|
7
6
|
import {Metadata, Status, altair, fulu, phase0} from "@lodestar/types";
|
|
8
7
|
import {prettyPrintIndices, toHex, withTimeout} from "@lodestar/utils";
|
|
9
8
|
import {GOODBYE_KNOWN_CODES, GoodByeReasonCode, Libp2pEvent} from "../../constants/index.js";
|
|
@@ -600,7 +599,7 @@ export class PeerManager {
|
|
|
600
599
|
subnet: query.subnet,
|
|
601
600
|
type,
|
|
602
601
|
maxPeersToDiscover: query.maxPeersToDiscover,
|
|
603
|
-
toUnixMs:
|
|
602
|
+
toUnixMs: 1000 * (this.clock.genesisTime + query.toSlot * this.config.SECONDS_PER_SLOT),
|
|
604
603
|
});
|
|
605
604
|
}
|
|
606
605
|
|
|
@@ -379,7 +379,7 @@ function getSequentialHandlers(modules: ValidatorFnsModules, options: GossipHand
|
|
|
379
379
|
|
|
380
380
|
// Handler - MUST NOT `await`, to allow validation result to be propagated
|
|
381
381
|
|
|
382
|
-
const delaySec = seenTimestampSec -
|
|
382
|
+
const delaySec = seenTimestampSec - (chain.genesisTime + slot * config.SECONDS_PER_SLOT);
|
|
383
383
|
metrics?.gossipBlock.elapsedTimeTillReceived.observe({source: OpSource.gossip}, delaySec);
|
|
384
384
|
chain.validatorMonitor?.registerBeaconBlock(OpSource.gossip, delaySec, signedBlock.message);
|
|
385
385
|
if (!blockInput.hasBlockAndAllData()) {
|
|
@@ -163,9 +163,12 @@ export class AttnetsService implements IAttnetsService {
|
|
|
163
163
|
*/
|
|
164
164
|
private onSlot = (clockSlot: Slot): void => {
|
|
165
165
|
try {
|
|
166
|
-
setTimeout(
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
setTimeout(
|
|
167
|
+
() => {
|
|
168
|
+
this.onHalfSlot(clockSlot);
|
|
169
|
+
},
|
|
170
|
+
this.config.SECONDS_PER_SLOT * 0.5 * 1000
|
|
171
|
+
);
|
|
169
172
|
|
|
170
173
|
for (const [dutiedSlot, dutiedInfo] of this.aggregatorSlotSubnet.entries()) {
|
|
171
174
|
if (dutiedSlot === clockSlot + this.opts.slotsToSubscribeBeforeAggregatorDuty) {
|
package/src/node/notifier.ts
CHANGED
|
@@ -157,7 +157,7 @@ export async function runNodeNotifier(modules: NodeNotifierModules): Promise<voi
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
function timeToNextHalfSlot(config: BeaconConfig, chain: IBeaconChain, isFirstTime: boolean): number {
|
|
160
|
-
const msPerSlot = config.
|
|
160
|
+
const msPerSlot = config.SECONDS_PER_SLOT * 1000;
|
|
161
161
|
const msPerHalfSlot = msPerSlot / 2;
|
|
162
162
|
const msFromGenesis = Date.now() - chain.genesisTime * 1000;
|
|
163
163
|
const msToNextSlot =
|
package/src/sync/unknownBlock.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
2
|
import {ForkSeq} from "@lodestar/params";
|
|
3
3
|
import {RequestError, RequestErrorCode} from "@lodestar/reqresp";
|
|
4
|
-
import {computeTimeAtSlot} from "@lodestar/state-transition";
|
|
5
4
|
import {RootHex} from "@lodestar/types";
|
|
6
5
|
import {Logger, prettyPrintIndices, pruneSetToMax, sleep} from "@lodestar/utils";
|
|
7
6
|
import {isBlockInputBlobs, isBlockInputColumns} from "../chain/blocks/blockInput/blockInput.js";
|
|
@@ -330,7 +329,7 @@ export class BlockInputSync {
|
|
|
330
329
|
this.pendingBlocks.set(pending.blockInput.blockRootHex, pending);
|
|
331
330
|
const blockSlot = pending.blockInput.slot;
|
|
332
331
|
const finalizedSlot = this.chain.forkChoice.getFinalizedBlock().slot;
|
|
333
|
-
const delaySec = Date.now() / 1000 -
|
|
332
|
+
const delaySec = Date.now() / 1000 - (this.chain.genesisTime + blockSlot * this.config.SECONDS_PER_SLOT);
|
|
334
333
|
this.metrics?.blockInputSync.elapsedTimeTillReceived.observe(delaySec);
|
|
335
334
|
|
|
336
335
|
const parentInForkChoice = this.chain.forkChoice.hasBlockHex(pending.blockInput.parentRootHex);
|
package/src/util/clock.ts
CHANGED
|
@@ -9,12 +9,12 @@ import {MAXIMUM_GOSSIP_CLOCK_DISPARITY} from "../constants/constants.js";
|
|
|
9
9
|
export enum ClockEvent {
|
|
10
10
|
/**
|
|
11
11
|
* This event signals the start of a new slot, and that subsequent calls to `clock.currentSlot` will equal `slot`.
|
|
12
|
-
* This event is guaranteed to be emitted every `
|
|
12
|
+
* This event is guaranteed to be emitted every `SECONDS_PER_SLOT` seconds.
|
|
13
13
|
*/
|
|
14
14
|
slot = "clock:slot",
|
|
15
15
|
/**
|
|
16
16
|
* This event signals the start of a new epoch, and that subsequent calls to `clock.currentEpoch` will return `epoch`.
|
|
17
|
-
* This event is guaranteed to be emitted every `
|
|
17
|
+
* This event is guaranteed to be emitted every `SECONDS_PER_SLOT * SLOTS_PER_EPOCH` seconds.
|
|
18
18
|
*/
|
|
19
19
|
epoch = "clock:epoch",
|
|
20
20
|
}
|
|
@@ -29,7 +29,7 @@ export type ClockEvents = {
|
|
|
29
29
|
*
|
|
30
30
|
* The time is dependent on:
|
|
31
31
|
* - `state.genesisTime` - the genesis time
|
|
32
|
-
* - `
|
|
32
|
+
* - `SECONDS_PER_SLOT` - # of seconds per slot
|
|
33
33
|
* - `SLOTS_PER_EPOCH` - # of slots per epoch
|
|
34
34
|
*/
|
|
35
35
|
export type IClock = StrictEventEmitter<EventEmitter, ClockEvents> & {
|
|
@@ -174,16 +174,16 @@ export class Clock extends EventEmitter implements IClock {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
secFromSlot(slot: Slot, toSec = Date.now() / 1000): number {
|
|
177
|
-
return toSec -
|
|
177
|
+
return toSec - (this.genesisTime + slot * this.config.SECONDS_PER_SLOT);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
msFromSlot(slot: Slot, toMs = Date.now()): number {
|
|
181
|
-
return toMs -
|
|
181
|
+
return toMs - (this.genesisTime * 1000 + slot * this.config.SLOT_DURATION_MS);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
private onNextSlot = (slot?: Slot): void => {
|
|
185
185
|
const clockSlot = slot ?? getCurrentSlot(this.config, this.genesisTime);
|
|
186
|
-
// process multiple clock slots in the case the main thread has been saturated for >
|
|
186
|
+
// process multiple clock slots in the case the main thread has been saturated for > SECONDS_PER_SLOT
|
|
187
187
|
while (this._currentSlot < clockSlot && !this.signal.aborted) {
|
|
188
188
|
const previousSlot = this._currentSlot;
|
|
189
189
|
this._currentSlot++;
|
|
@@ -205,7 +205,7 @@ export class Clock extends EventEmitter implements IClock {
|
|
|
205
205
|
};
|
|
206
206
|
|
|
207
207
|
private msUntilNextSlot(): number {
|
|
208
|
-
const milliSecondsPerSlot = this.config.
|
|
208
|
+
const milliSecondsPerSlot = this.config.SECONDS_PER_SLOT * 1000;
|
|
209
209
|
const diffInMilliSeconds = Date.now() - this.genesisTime * 1000;
|
|
210
210
|
return milliSecondsPerSlot - (diffInMilliSeconds % milliSecondsPerSlot);
|
|
211
211
|
}
|