@lodestar/validator 1.51.0-dev.bf4ea87c7b → 1.51.0-dev.c6e566f915
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/chainHeaderTracker.d.ts.map +1 -1
- package/lib/services/chainHeaderTracker.js +6 -1
- package/lib/services/chainHeaderTracker.js.map +1 -1
- package/lib/services/emitter.d.ts +10 -1
- package/lib/services/emitter.d.ts.map +1 -1
- package/lib/services/emitter.js +4 -0
- package/lib/services/emitter.js.map +1 -1
- package/lib/services/inclusionList.d.ts +25 -0
- package/lib/services/inclusionList.d.ts.map +1 -0
- package/lib/services/inclusionList.js +101 -0
- package/lib/services/inclusionList.js.map +1 -0
- package/lib/services/inclusionListDuties.d.ts +59 -0
- package/lib/services/inclusionListDuties.d.ts.map +1 -0
- package/lib/services/inclusionListDuties.js +252 -0
- package/lib/services/inclusionListDuties.js.map +1 -0
- package/lib/services/validatorStore.d.ts +7 -1
- package/lib/services/validatorStore.d.ts.map +1 -1
- package/lib/services/validatorStore.js +29 -3
- package/lib/services/validatorStore.js.map +1 -1
- package/lib/slashingProtection/attestation/index.d.ts +1 -0
- package/lib/slashingProtection/attestation/index.d.ts.map +1 -1
- package/lib/slashingProtection/attestation/index.js +77 -44
- package/lib/slashingProtection/attestation/index.js.map +1 -1
- package/lib/slashingProtection/index.d.ts +2 -0
- package/lib/slashingProtection/index.d.ts.map +1 -1
- package/lib/slashingProtection/index.js +48 -5
- package/lib/slashingProtection/index.js.map +1 -1
- package/lib/util/externalSignerClient.d.ts +6 -2
- 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/validator.d.ts +4 -1
- package/lib/validator.d.ts.map +1 -1
- package/lib/validator.js +7 -1
- package/lib/validator.js.map +1 -1
- package/package.json +12 -12
- package/src/services/chainHeaderTracker.ts +8 -1
- package/src/services/emitter.ts +10 -0
- package/src/services/inclusionList.ts +140 -0
- package/src/services/inclusionListDuties.ts +306 -0
- package/src/services/validatorStore.ts +43 -3
- package/src/slashingProtection/attestation/index.ts +81 -46
- package/src/slashingProtection/index.ts +50 -6
- package/src/util/externalSignerClient.ts +8 -1
- package/src/validator.ts +18 -0
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Slot,
|
|
13
13
|
altair,
|
|
14
14
|
gloas,
|
|
15
|
+
heze,
|
|
15
16
|
phase0,
|
|
16
17
|
ssz,
|
|
17
18
|
sszTypesFor,
|
|
@@ -37,6 +38,7 @@ export enum SignableMessageType {
|
|
|
37
38
|
PAYLOAD_ATTESTATION_MESSAGE = "PAYLOAD_ATTESTATION_MESSAGE",
|
|
38
39
|
PROPOSER_PREFERENCES = "PROPOSER_PREFERENCES",
|
|
39
40
|
BUILDER_REQUEST_AUTH = "BUILDER_REQUEST_AUTH",
|
|
41
|
+
INCLUSION_LIST = "INCLUSION_LIST",
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
const AggregationSlotType = new ContainerType({
|
|
@@ -89,7 +91,8 @@ export type SignableMessage =
|
|
|
89
91
|
| {type: SignableMessageType.EXECUTION_PAYLOAD_ENVELOPE; data: gloas.ExecutionPayloadEnvelope}
|
|
90
92
|
| {type: SignableMessageType.PAYLOAD_ATTESTATION_MESSAGE; data: gloas.PayloadAttestationData}
|
|
91
93
|
| {type: SignableMessageType.PROPOSER_PREFERENCES; data: gloas.ProposerPreferences}
|
|
92
|
-
| {type: SignableMessageType.BUILDER_REQUEST_AUTH; data: gloas.BuilderRequestAuth}
|
|
94
|
+
| {type: SignableMessageType.BUILDER_REQUEST_AUTH; data: gloas.BuilderRequestAuth}
|
|
95
|
+
| {type: SignableMessageType.INCLUSION_LIST; data: heze.InclusionList};
|
|
93
96
|
|
|
94
97
|
const requiresForkInfo: Record<SignableMessageType, boolean> = {
|
|
95
98
|
[SignableMessageType.AGGREGATION_SLOT]: true,
|
|
@@ -108,6 +111,7 @@ const requiresForkInfo: Record<SignableMessageType, boolean> = {
|
|
|
108
111
|
[SignableMessageType.PAYLOAD_ATTESTATION_MESSAGE]: true,
|
|
109
112
|
[SignableMessageType.PROPOSER_PREFERENCES]: true,
|
|
110
113
|
[SignableMessageType.BUILDER_REQUEST_AUTH]: false,
|
|
114
|
+
[SignableMessageType.INCLUSION_LIST]: true,
|
|
111
115
|
};
|
|
112
116
|
|
|
113
117
|
type Web3SignerSerializedRequest = {
|
|
@@ -319,6 +323,9 @@ function serializerSignableMessagePayload(config: BeaconConfig, payload: Signabl
|
|
|
319
323
|
},
|
|
320
324
|
};
|
|
321
325
|
}
|
|
326
|
+
|
|
327
|
+
case SignableMessageType.INCLUSION_LIST:
|
|
328
|
+
return {inclusion_list: ssz.heze.InclusionList.toJson(payload.data)};
|
|
322
329
|
}
|
|
323
330
|
}
|
|
324
331
|
|
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
|
|