@lodestar/validator 1.43.0-rc.5 → 1.44.0-dev.055b83cb3d
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/services/block.d.ts +2 -1
- package/lib/services/block.d.ts.map +1 -1
- package/lib/services/block.js +42 -27
- package/lib/services/block.js.map +1 -1
- package/lib/services/blockDuties.d.ts +85 -7
- package/lib/services/blockDuties.d.ts.map +1 -1
- package/lib/services/blockDuties.js +186 -74
- package/lib/services/blockDuties.js.map +1 -1
- package/lib/services/proposerPreferences.d.ts +25 -0
- package/lib/services/proposerPreferences.d.ts.map +1 -0
- package/lib/services/proposerPreferences.js +101 -0
- package/lib/services/proposerPreferences.js.map +1 -0
- package/lib/services/validatorStore.d.ts +1 -0
- package/lib/services/validatorStore.d.ts.map +1 -1
- package/lib/services/validatorStore.js +25 -1
- package/lib/services/validatorStore.js.map +1 -1
- package/lib/util/externalSignerClient.d.ts +5 -1
- package/lib/util/externalSignerClient.d.ts.map +1 -1
- package/lib/util/externalSignerClient.js +4 -0
- package/lib/util/externalSignerClient.js.map +1 -1
- package/lib/util/params.js +1 -0
- package/lib/util/params.js.map +1 -1
- package/lib/validator.d.ts.map +1 -1
- package/lib/validator.js +5 -1
- package/lib/validator.js.map +1 -1
- package/package.json +12 -12
- package/src/services/block.ts +49 -35
- package/src/services/blockDuties.ts +212 -79
- package/src/services/proposerPreferences.ts +124 -0
- package/src/services/validatorStore.ts +37 -0
- package/src/util/externalSignerClient.ts +7 -1
- package/src/util/params.ts +1 -0
- package/src/validator.ts +27 -4
package/src/validator.ts
CHANGED
|
@@ -9,12 +9,14 @@ import {Metrics} from "./metrics.js";
|
|
|
9
9
|
import {MetaDataRepository} from "./repositories/metaDataRepository.js";
|
|
10
10
|
import {AttestationService} from "./services/attestation.js";
|
|
11
11
|
import {BlockProposingService} from "./services/block.js";
|
|
12
|
+
import {BlockDutiesService} from "./services/blockDuties.js";
|
|
12
13
|
import {ChainHeaderTracker} from "./services/chainHeaderTracker.js";
|
|
13
14
|
import {DoppelgangerService} from "./services/doppelgangerService.js";
|
|
14
15
|
import {ValidatorEventEmitter} from "./services/emitter.js";
|
|
15
16
|
import {ExternalSignerOptions, pollExternalSignerPubkeys} from "./services/externalSignerSync.js";
|
|
16
17
|
import {IndicesService} from "./services/indices.js";
|
|
17
18
|
import {pollBuilderValidatorRegistration, pollPrepareBeaconProposer} from "./services/prepareBeaconProposer.js";
|
|
19
|
+
import {ProposerPreferencesService} from "./services/proposerPreferences.js";
|
|
18
20
|
import {PtcService} from "./services/ptc.js";
|
|
19
21
|
import {SyncCommitteeService} from "./services/syncCommittee.js";
|
|
20
22
|
import {SyncingStatusTracker} from "./services/syncingStatusTracker.js";
|
|
@@ -233,10 +235,29 @@ export class Validator {
|
|
|
233
235
|
const chainHeaderTracker = new ChainHeaderTracker(config, logger, api, emitter);
|
|
234
236
|
const syncingStatusTracker = new SyncingStatusTracker(logger, api, clock, metrics);
|
|
235
237
|
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
const blockDutiesService = new BlockDutiesService(
|
|
239
|
+
config,
|
|
240
|
+
loggerVc,
|
|
241
|
+
api,
|
|
242
|
+
clock,
|
|
243
|
+
validatorStore,
|
|
244
|
+
chainHeaderTracker,
|
|
245
|
+
metrics
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
const blockProposingService = new BlockProposingService(
|
|
249
|
+
config,
|
|
250
|
+
loggerVc,
|
|
251
|
+
api,
|
|
252
|
+
clock,
|
|
253
|
+
validatorStore,
|
|
254
|
+
blockDutiesService,
|
|
255
|
+
metrics,
|
|
256
|
+
{
|
|
257
|
+
broadcastValidation: opts.broadcastValidation ?? defaultOptions.broadcastValidation,
|
|
258
|
+
blindedLocal: opts.blindedLocal ?? defaultOptions.blindedLocal,
|
|
259
|
+
}
|
|
260
|
+
);
|
|
240
261
|
|
|
241
262
|
const attestationService = new AttestationService(
|
|
242
263
|
loggerVc,
|
|
@@ -282,6 +303,8 @@ export class Validator {
|
|
|
282
303
|
}
|
|
283
304
|
);
|
|
284
305
|
|
|
306
|
+
new ProposerPreferencesService(config, loggerVc, api, clock, validatorStore, blockDutiesService, metrics);
|
|
307
|
+
|
|
285
308
|
return new Validator({
|
|
286
309
|
opts,
|
|
287
310
|
genesis,
|