@lodestar/validator 1.51.0-dev.4157a0dec4 → 1.51.0-dev.5e25b73306

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.
Files changed (45) hide show
  1. package/lib/services/chainHeaderTracker.d.ts.map +1 -1
  2. package/lib/services/chainHeaderTracker.js +6 -1
  3. package/lib/services/chainHeaderTracker.js.map +1 -1
  4. package/lib/services/emitter.d.ts +10 -1
  5. package/lib/services/emitter.d.ts.map +1 -1
  6. package/lib/services/emitter.js +4 -0
  7. package/lib/services/emitter.js.map +1 -1
  8. package/lib/services/inclusionList.d.ts +25 -0
  9. package/lib/services/inclusionList.d.ts.map +1 -0
  10. package/lib/services/inclusionList.js +101 -0
  11. package/lib/services/inclusionList.js.map +1 -0
  12. package/lib/services/inclusionListDuties.d.ts +59 -0
  13. package/lib/services/inclusionListDuties.d.ts.map +1 -0
  14. package/lib/services/inclusionListDuties.js +252 -0
  15. package/lib/services/inclusionListDuties.js.map +1 -0
  16. package/lib/services/validatorStore.d.ts +7 -1
  17. package/lib/services/validatorStore.d.ts.map +1 -1
  18. package/lib/services/validatorStore.js +27 -2
  19. package/lib/services/validatorStore.js.map +1 -1
  20. package/lib/slashingProtection/attestation/index.d.ts +1 -0
  21. package/lib/slashingProtection/attestation/index.d.ts.map +1 -1
  22. package/lib/slashingProtection/attestation/index.js +77 -44
  23. package/lib/slashingProtection/attestation/index.js.map +1 -1
  24. package/lib/slashingProtection/index.d.ts +2 -0
  25. package/lib/slashingProtection/index.d.ts.map +1 -1
  26. package/lib/slashingProtection/index.js +48 -5
  27. package/lib/slashingProtection/index.js.map +1 -1
  28. package/lib/util/externalSignerClient.d.ts +6 -2
  29. package/lib/util/externalSignerClient.d.ts.map +1 -1
  30. package/lib/util/externalSignerClient.js +4 -0
  31. package/lib/util/externalSignerClient.js.map +1 -1
  32. package/lib/validator.d.ts +4 -1
  33. package/lib/validator.d.ts.map +1 -1
  34. package/lib/validator.js +7 -1
  35. package/lib/validator.js.map +1 -1
  36. package/package.json +12 -12
  37. package/src/services/chainHeaderTracker.ts +8 -1
  38. package/src/services/emitter.ts +10 -0
  39. package/src/services/inclusionList.ts +140 -0
  40. package/src/services/inclusionListDuties.ts +306 -0
  41. package/src/services/validatorStore.ts +41 -2
  42. package/src/slashingProtection/attestation/index.ts +81 -46
  43. package/src/slashingProtection/index.ts +50 -6
  44. package/src/util/externalSignerClient.ts +8 -1
  45. package/src/validator.ts +18 -0
package/src/validator.ts CHANGED
@@ -27,6 +27,7 @@ import {ChainHeaderTracker} from "./services/chainHeaderTracker.js";
27
27
  import {DoppelgangerService} from "./services/doppelgangerService.js";
28
28
  import {ValidatorEventEmitter} from "./services/emitter.js";
29
29
  import {ExternalSignerOptions, pollExternalSignerPubkeys} from "./services/externalSignerSync.js";
30
+ import {InclusionListService} from "./services/inclusionList.js";
30
31
  import {IndicesService} from "./services/indices.js";
31
32
  import {pollBuilderValidatorRegistration, pollPrepareBeaconProposer} from "./services/prepareBeaconProposer.js";
32
33
  import {ProposalPreferencesService} from "./services/proposalPreferences.js";
@@ -53,6 +54,7 @@ export type ValidatorModules = {
53
54
  blockProposingService: BlockProposingService;
54
55
  attestationService: AttestationService;
55
56
  ptcService: PtcService;
57
+ inclusionListService: InclusionListService;
56
58
  syncCommitteeService: SyncCommitteeService;
57
59
  config: BeaconConfig;
58
60
  api: ApiClient;
@@ -109,6 +111,7 @@ export class Validator {
109
111
  private readonly blockProposingService: BlockProposingService;
110
112
  private readonly attestationService: AttestationService;
111
113
  private readonly ptcService: PtcService;
114
+ private readonly inclusionListService: InclusionListService;
112
115
  private readonly syncCommitteeService: SyncCommitteeService;
113
116
  private readonly config: BeaconConfig;
114
117
  private readonly api: ApiClient;
@@ -128,6 +131,7 @@ export class Validator {
128
131
  blockProposingService,
129
132
  attestationService,
130
133
  ptcService,
134
+ inclusionListService,
131
135
  syncCommitteeService,
132
136
  config,
133
137
  api,
@@ -145,6 +149,7 @@ export class Validator {
145
149
  this.blockProposingService = blockProposingService;
146
150
  this.attestationService = attestationService;
147
151
  this.ptcService = ptcService;
152
+ this.inclusionListService = inclusionListService;
148
153
  this.syncCommitteeService = syncCommitteeService;
149
154
  this.config = config;
150
155
  this.api = api;
@@ -312,6 +317,17 @@ export class Validator {
312
317
  metrics
313
318
  );
314
319
 
320
+ const inclusionListService = new InclusionListService(
321
+ config,
322
+ loggerVc,
323
+ api,
324
+ clock,
325
+ validatorStore,
326
+ chainHeaderTracker,
327
+ syncingStatusTracker,
328
+ emitter
329
+ );
330
+
315
331
  const syncCommitteeService = new SyncCommitteeService(
316
332
  config,
317
333
  loggerVc,
@@ -347,6 +363,7 @@ export class Validator {
347
363
  blockProposingService,
348
364
  attestationService,
349
365
  ptcService,
366
+ inclusionListService,
350
367
  syncCommitteeService,
351
368
  config,
352
369
  api,
@@ -433,6 +450,7 @@ export class Validator {
433
450
  this.blockProposingService.removeDutiesForKey(pubkey);
434
451
  this.attestationService.removeDutiesForKey(pubkey);
435
452
  this.ptcService.removeDutiesForKey(pubkey);
453
+ this.inclusionListService.removeDutiesForKey(pubkey);
436
454
  this.syncCommitteeService.removeDutiesForKey(pubkey);
437
455
  }
438
456