@lodestar/validator 1.35.0-dev.98d359db41 → 1.35.0-dev.a70bac5bd3

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 (169) hide show
  1. package/lib/index.d.ts +7 -7
  2. package/lib/index.js +5 -5
  3. package/lib/index.js.map +1 -1
  4. package/lib/repositories/metaDataRepository.js +3 -4
  5. package/lib/repositories/metaDataRepository.js.map +1 -1
  6. package/lib/services/attestation.js +44 -53
  7. package/lib/services/attestation.js.map +1 -1
  8. package/lib/services/attestationDuties.js +98 -104
  9. package/lib/services/attestationDuties.js.map +1 -1
  10. package/lib/services/block.js +56 -64
  11. package/lib/services/block.js.map +1 -1
  12. package/lib/services/blockDuties.js +23 -31
  13. package/lib/services/blockDuties.js.map +1 -1
  14. package/lib/services/chainHeaderTracker.js +27 -30
  15. package/lib/services/chainHeaderTracker.js.map +1 -1
  16. package/lib/services/doppelgangerService.js +45 -52
  17. package/lib/services/doppelgangerService.js.map +1 -1
  18. package/lib/services/emitter.d.ts +1 -1
  19. package/lib/services/externalSignerSync.js.map +1 -1
  20. package/lib/services/indices.js +5 -8
  21. package/lib/services/indices.js.map +1 -1
  22. package/lib/services/prepareBeaconProposer.js.map +1 -1
  23. package/lib/services/syncCommittee.js +49 -60
  24. package/lib/services/syncCommittee.js.map +1 -1
  25. package/lib/services/syncCommitteeDuties.js +23 -28
  26. package/lib/services/syncCommitteeDuties.js.map +1 -1
  27. package/lib/services/syncingStatusTracker.js +27 -32
  28. package/lib/services/syncingStatusTracker.js.map +1 -1
  29. package/lib/services/validatorStore.js +3 -9
  30. package/lib/services/validatorStore.js.map +1 -1
  31. package/lib/slashingProtection/attestation/attestationByTargetRepository.js +3 -7
  32. package/lib/slashingProtection/attestation/attestationByTargetRepository.js.map +1 -1
  33. package/lib/slashingProtection/attestation/attestationLowerBoundRepository.js +3 -5
  34. package/lib/slashingProtection/attestation/attestationLowerBoundRepository.js.map +1 -1
  35. package/lib/slashingProtection/attestation/index.js +0 -3
  36. package/lib/slashingProtection/attestation/index.js.map +1 -1
  37. package/lib/slashingProtection/block/blockBySlotRepository.js +3 -7
  38. package/lib/slashingProtection/block/blockBySlotRepository.js.map +1 -1
  39. package/lib/slashingProtection/block/index.js +0 -1
  40. package/lib/slashingProtection/block/index.js.map +1 -1
  41. package/lib/slashingProtection/index.d.ts +1 -1
  42. package/lib/slashingProtection/index.js +0 -3
  43. package/lib/slashingProtection/index.js.map +1 -1
  44. package/lib/slashingProtection/minMaxSurround/distanceStoreRepository.js +0 -8
  45. package/lib/slashingProtection/minMaxSurround/distanceStoreRepository.js.map +1 -1
  46. package/lib/slashingProtection/minMaxSurround/minMaxSurround.js +0 -2
  47. package/lib/slashingProtection/minMaxSurround/minMaxSurround.js.map +1 -1
  48. package/lib/slashingProtection/utils.d.ts +1 -1
  49. package/lib/util/clock.js +1 -5
  50. package/lib/util/clock.js.map +1 -1
  51. package/lib/util/params.js +0 -9
  52. package/lib/util/params.js.map +1 -1
  53. package/lib/validator.js +0 -15
  54. package/lib/validator.js.map +1 -1
  55. package/package.json +16 -19
  56. package/lib/buckets.d.ts.map +0 -1
  57. package/lib/defaults.d.ts.map +0 -1
  58. package/lib/genesis.d.ts.map +0 -1
  59. package/lib/index.d.ts.map +0 -1
  60. package/lib/metrics.d.ts.map +0 -1
  61. package/lib/repositories/index.d.ts.map +0 -1
  62. package/lib/repositories/metaDataRepository.d.ts.map +0 -1
  63. package/lib/services/attestation.d.ts.map +0 -1
  64. package/lib/services/attestationDuties.d.ts.map +0 -1
  65. package/lib/services/block.d.ts.map +0 -1
  66. package/lib/services/blockDuties.d.ts.map +0 -1
  67. package/lib/services/chainHeaderTracker.d.ts.map +0 -1
  68. package/lib/services/doppelgangerService.d.ts.map +0 -1
  69. package/lib/services/emitter.d.ts.map +0 -1
  70. package/lib/services/externalSignerSync.d.ts.map +0 -1
  71. package/lib/services/indices.d.ts.map +0 -1
  72. package/lib/services/prepareBeaconProposer.d.ts.map +0 -1
  73. package/lib/services/syncCommittee.d.ts.map +0 -1
  74. package/lib/services/syncCommitteeDuties.d.ts.map +0 -1
  75. package/lib/services/syncingStatusTracker.d.ts.map +0 -1
  76. package/lib/services/utils.d.ts.map +0 -1
  77. package/lib/services/validatorStore.d.ts.map +0 -1
  78. package/lib/slashingProtection/attestation/attestationByTargetRepository.d.ts.map +0 -1
  79. package/lib/slashingProtection/attestation/attestationLowerBoundRepository.d.ts.map +0 -1
  80. package/lib/slashingProtection/attestation/errors.d.ts.map +0 -1
  81. package/lib/slashingProtection/attestation/index.d.ts.map +0 -1
  82. package/lib/slashingProtection/block/blockBySlotRepository.d.ts.map +0 -1
  83. package/lib/slashingProtection/block/errors.d.ts.map +0 -1
  84. package/lib/slashingProtection/block/index.d.ts.map +0 -1
  85. package/lib/slashingProtection/index.d.ts.map +0 -1
  86. package/lib/slashingProtection/interchange/errors.d.ts.map +0 -1
  87. package/lib/slashingProtection/interchange/formats/completeV4.d.ts.map +0 -1
  88. package/lib/slashingProtection/interchange/formats/index.d.ts.map +0 -1
  89. package/lib/slashingProtection/interchange/formats/v5.d.ts.map +0 -1
  90. package/lib/slashingProtection/interchange/index.d.ts.map +0 -1
  91. package/lib/slashingProtection/interchange/parseInterchange.d.ts.map +0 -1
  92. package/lib/slashingProtection/interchange/serializeInterchange.d.ts.map +0 -1
  93. package/lib/slashingProtection/interchange/types.d.ts.map +0 -1
  94. package/lib/slashingProtection/interface.d.ts.map +0 -1
  95. package/lib/slashingProtection/minMaxSurround/distanceStoreRepository.d.ts.map +0 -1
  96. package/lib/slashingProtection/minMaxSurround/errors.d.ts.map +0 -1
  97. package/lib/slashingProtection/minMaxSurround/index.d.ts.map +0 -1
  98. package/lib/slashingProtection/minMaxSurround/interface.d.ts.map +0 -1
  99. package/lib/slashingProtection/minMaxSurround/minMaxSurround.d.ts.map +0 -1
  100. package/lib/slashingProtection/types.d.ts.map +0 -1
  101. package/lib/slashingProtection/utils.d.ts.map +0 -1
  102. package/lib/types.d.ts.map +0 -1
  103. package/lib/util/batch.d.ts.map +0 -1
  104. package/lib/util/clock.d.ts.map +0 -1
  105. package/lib/util/difference.d.ts.map +0 -1
  106. package/lib/util/externalSignerClient.d.ts.map +0 -1
  107. package/lib/util/format.d.ts.map +0 -1
  108. package/lib/util/index.d.ts.map +0 -1
  109. package/lib/util/logger.d.ts.map +0 -1
  110. package/lib/util/params.d.ts.map +0 -1
  111. package/lib/util/url.d.ts.map +0 -1
  112. package/lib/validator.d.ts.map +0 -1
  113. package/src/buckets.ts +0 -30
  114. package/src/defaults.ts +0 -8
  115. package/src/genesis.ts +0 -19
  116. package/src/index.ts +0 -22
  117. package/src/metrics.ts +0 -417
  118. package/src/repositories/index.ts +0 -1
  119. package/src/repositories/metaDataRepository.ts +0 -42
  120. package/src/services/attestation.ts +0 -349
  121. package/src/services/attestationDuties.ts +0 -405
  122. package/src/services/block.ts +0 -261
  123. package/src/services/blockDuties.ts +0 -215
  124. package/src/services/chainHeaderTracker.ts +0 -89
  125. package/src/services/doppelgangerService.ts +0 -286
  126. package/src/services/emitter.ts +0 -43
  127. package/src/services/externalSignerSync.ts +0 -81
  128. package/src/services/indices.ts +0 -165
  129. package/src/services/prepareBeaconProposer.ts +0 -119
  130. package/src/services/syncCommittee.ts +0 -317
  131. package/src/services/syncCommitteeDuties.ts +0 -337
  132. package/src/services/syncingStatusTracker.ts +0 -74
  133. package/src/services/utils.ts +0 -58
  134. package/src/services/validatorStore.ts +0 -830
  135. package/src/slashingProtection/attestation/attestationByTargetRepository.ts +0 -77
  136. package/src/slashingProtection/attestation/attestationLowerBoundRepository.ts +0 -44
  137. package/src/slashingProtection/attestation/errors.ts +0 -66
  138. package/src/slashingProtection/attestation/index.ts +0 -171
  139. package/src/slashingProtection/block/blockBySlotRepository.ts +0 -78
  140. package/src/slashingProtection/block/errors.ts +0 -28
  141. package/src/slashingProtection/block/index.ts +0 -94
  142. package/src/slashingProtection/index.ts +0 -95
  143. package/src/slashingProtection/interchange/errors.ts +0 -15
  144. package/src/slashingProtection/interchange/formats/completeV4.ts +0 -125
  145. package/src/slashingProtection/interchange/formats/index.ts +0 -7
  146. package/src/slashingProtection/interchange/formats/v5.ts +0 -120
  147. package/src/slashingProtection/interchange/index.ts +0 -5
  148. package/src/slashingProtection/interchange/parseInterchange.ts +0 -55
  149. package/src/slashingProtection/interchange/serializeInterchange.ts +0 -35
  150. package/src/slashingProtection/interchange/types.ts +0 -18
  151. package/src/slashingProtection/interface.ts +0 -28
  152. package/src/slashingProtection/minMaxSurround/distanceStoreRepository.ts +0 -57
  153. package/src/slashingProtection/minMaxSurround/errors.ts +0 -27
  154. package/src/slashingProtection/minMaxSurround/index.ts +0 -4
  155. package/src/slashingProtection/minMaxSurround/interface.ts +0 -23
  156. package/src/slashingProtection/minMaxSurround/minMaxSurround.ts +0 -104
  157. package/src/slashingProtection/types.ts +0 -12
  158. package/src/slashingProtection/utils.ts +0 -42
  159. package/src/types.ts +0 -31
  160. package/src/util/batch.ts +0 -15
  161. package/src/util/clock.ts +0 -164
  162. package/src/util/difference.ts +0 -10
  163. package/src/util/externalSignerClient.ts +0 -277
  164. package/src/util/format.ts +0 -3
  165. package/src/util/index.ts +0 -6
  166. package/src/util/logger.ts +0 -51
  167. package/src/util/params.ts +0 -313
  168. package/src/util/url.ts +0 -16
  169. package/src/validator.ts +0 -418
@@ -1,313 +0,0 @@
1
- import {BlobScheduleEntry, ChainConfig, SpecJson, chainConfigToJson, deserializeBlobSchedule} from "@lodestar/config";
2
- import {BeaconPreset, activePreset, presetToJson} from "@lodestar/params";
3
-
4
- export class NotEqualParamsError extends Error {}
5
-
6
- type ConfigWithPreset = ChainConfig & BeaconPreset;
7
-
8
- /**
9
- * Assert localConfig values match externalSpecJson. externalSpecJson may contain more values than localConfig.
10
- *
11
- * This check ensures that the validator is connected to a beacon node of the exact same network and params.
12
- * Otherwise, signatures may be rejected, time may be un-equal and other bugs that are harder to debug caused
13
- * by different parameters.
14
- *
15
- * This check however can't compare the full config as is, since some parameters are not critical to the spec and
16
- * can be changed un-expectedly. Also, fork parameters can change un-expectedly, like their _FORK_VERSION or _EPOCH.
17
- * Note that the config API endpoint is not precisely specified, so each clients can return a different set of
18
- * parameters.
19
- *
20
- * So this check only compares a specific list of parameters that are consensus critical, ignoring the rest. Typed
21
- * config and preset ensure new parameters are labeled critical or ignore, facilitating maintenance of the list.
22
- */
23
- export function assertEqualParams(localConfig: ChainConfig, externalSpecJson: SpecJson): void {
24
- // Before comparing, add preset which is bundled in api impl config route.
25
- // config and preset must be serialized to JSON for safe comparisions.
26
- const localSpecJson = {
27
- ...chainConfigToJson(localConfig),
28
- ...presetToJson(activePreset),
29
- };
30
-
31
- // Get list of keys to check, and keys to ignore. Otherwise this function throws for false positives
32
- const criticalParams = getSpecCriticalParams(localConfig);
33
-
34
- // Accumulate errors first and print all of them at once
35
- const errors: string[] = [];
36
-
37
- for (const key of Object.keys(criticalParams) as (keyof typeof criticalParams)[]) {
38
- if (
39
- // Ignore non-critical params
40
- !criticalParams[key] ||
41
- // This condition should never be true, but just in case
42
- localSpecJson[key] === undefined ||
43
- // The config/spec endpoint is poorly specified, so in practice each client returns a custom selection of keys.
44
- // For example Lighthouse returns a manually selected list of keys that may be updated at any time.
45
- // https://github.com/sigp/lighthouse/blob/bac7c3fa544495a257722aaad9cd8f72fee2f2b4/consensus/types/src/chain_spec.rs#L941
46
- //
47
- // So if we assert that spec critical keys are present in the spec we may break interoperability unexpectedly.
48
- // So it's best to ignore keys are not defined in both specs and trust that the ones defined are sufficient
49
- // to detect spec discrepancies in all cases.
50
- externalSpecJson[key] === undefined
51
- ) {
52
- continue;
53
- }
54
-
55
- if (key === "BLOB_SCHEDULE") {
56
- const localBlobSchedule = deserializeBlobSchedule(localSpecJson[key]).sort((a, b) => a.EPOCH - b.EPOCH);
57
- const remoteBlobSchedule = deserializeBlobSchedule(externalSpecJson[key]).sort((a, b) => a.EPOCH - b.EPOCH);
58
-
59
- if (localBlobSchedule.length !== remoteBlobSchedule.length) {
60
- errors.push(`BLOB_SCHEDULE different length: ${localBlobSchedule.length} != ${remoteBlobSchedule.length}`);
61
-
62
- // Skip per entry comparison
63
- continue;
64
- }
65
-
66
- for (let i = 0; i < localBlobSchedule.length; i++) {
67
- const localEntry = localBlobSchedule[i];
68
- const remoteEntry = remoteBlobSchedule[i];
69
-
70
- for (const entryKey of ["EPOCH", "MAX_BLOBS_PER_BLOCK"] as Array<keyof BlobScheduleEntry>) {
71
- const localValue = String(localEntry[entryKey]);
72
- const remoteValue = String(remoteEntry[entryKey]);
73
-
74
- if (localValue !== remoteValue) {
75
- errors.push(`BLOB_SCHEDULE[${i}].${entryKey} different value: ${localValue} != ${remoteValue}`);
76
- }
77
- }
78
- }
79
-
80
- // Skip generic string comparison
81
- continue;
82
- }
83
-
84
- // Must compare JSON serialized specs, to ensure all strings are rendered in the same way
85
- // Must compare as lowercase to ensure checksum addresses and names have same capilatization
86
- const localValue = String(localSpecJson[key]).toLocaleLowerCase();
87
- const remoteValue = String(externalSpecJson[key]).toLocaleLowerCase();
88
- if (localValue !== remoteValue) {
89
- errors.push(`${key} different value: ${localValue} != ${remoteValue}`);
90
- }
91
- }
92
-
93
- if (errors.length > 0) {
94
- throw new NotEqualParamsError("Local and remote configs are different\n" + errors.join("\n"));
95
- }
96
- }
97
-
98
- function getSpecCriticalParams(localConfig: ChainConfig): Record<keyof ConfigWithPreset, boolean> {
99
- const altairForkRelevant = localConfig.ALTAIR_FORK_EPOCH < Infinity;
100
- const bellatrixForkRelevant = localConfig.BELLATRIX_FORK_EPOCH < Infinity;
101
- const capellaForkRelevant = localConfig.CAPELLA_FORK_EPOCH < Infinity;
102
- const denebForkRelevant = localConfig.DENEB_FORK_EPOCH < Infinity;
103
- const electraForkRelevant = localConfig.ELECTRA_FORK_EPOCH < Infinity;
104
- const fuluForkRelevant = localConfig.FULU_FORK_EPOCH < Infinity;
105
- const gloasForkRelevant = localConfig.GLOAS_FORK_EPOCH < Infinity;
106
-
107
- return {
108
- // # Config
109
- ///////////
110
-
111
- PRESET_BASE: false, // Not relevant, each preset value is checked below
112
- CONFIG_NAME: false, // Arbitrary string, not relevant
113
- // validator client behaviour does not change with this parameters, so it's not concerned about them.
114
- // However, with the override ttd flag, the validator and beacon could be out of sync and prevent it from running.
115
- TERMINAL_TOTAL_DIFFICULTY: false,
116
- TERMINAL_BLOCK_HASH: false,
117
- TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: false,
118
-
119
- // Genesis
120
- MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: true,
121
- MIN_GENESIS_TIME: true,
122
- GENESIS_FORK_VERSION: true,
123
- GENESIS_DELAY: true,
124
-
125
- // Forking
126
- // Altair
127
- ALTAIR_FORK_VERSION: altairForkRelevant,
128
- ALTAIR_FORK_EPOCH: altairForkRelevant,
129
- // Bellatrix
130
- BELLATRIX_FORK_VERSION: bellatrixForkRelevant,
131
- BELLATRIX_FORK_EPOCH: bellatrixForkRelevant,
132
- // Capella
133
- CAPELLA_FORK_VERSION: capellaForkRelevant,
134
- CAPELLA_FORK_EPOCH: capellaForkRelevant,
135
- // Deneb
136
- DENEB_FORK_VERSION: denebForkRelevant,
137
- DENEB_FORK_EPOCH: denebForkRelevant,
138
- // electra
139
- ELECTRA_FORK_VERSION: electraForkRelevant,
140
- ELECTRA_FORK_EPOCH: electraForkRelevant,
141
- // fulu
142
- FULU_FORK_VERSION: fuluForkRelevant,
143
- FULU_FORK_EPOCH: fuluForkRelevant,
144
- // gloas
145
- GLOAS_FORK_VERSION: gloasForkRelevant,
146
- GLOAS_FORK_EPOCH: gloasForkRelevant,
147
-
148
- // Time parameters
149
- SECONDS_PER_SLOT: true,
150
- SECONDS_PER_ETH1_BLOCK: false, // Legacy
151
- MIN_VALIDATOR_WITHDRAWABILITY_DELAY: true,
152
- SHARD_COMMITTEE_PERIOD: true,
153
- ETH1_FOLLOW_DISTANCE: true,
154
-
155
- // Validator cycle
156
- INACTIVITY_SCORE_BIAS: true,
157
- INACTIVITY_SCORE_RECOVERY_RATE: true,
158
- EJECTION_BALANCE: true,
159
- MIN_PER_EPOCH_CHURN_LIMIT: true,
160
- MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: denebForkRelevant,
161
- CHURN_LIMIT_QUOTIENT: true,
162
-
163
- // Fork choice
164
- PROPOSER_SCORE_BOOST: false, // Ignored as it's changing https://github.com/ethereum/consensus-specs/pull/2895
165
- REORG_HEAD_WEIGHT_THRESHOLD: false, // Non-critical since proposer boost reorg is optional feature
166
- REORG_PARENT_WEIGHT_THRESHOLD: false, // Non-critical since proposer boost reorg is optional feature
167
- REORG_MAX_EPOCHS_SINCE_FINALIZATION: false, // Non-critical since proposer boost reorg is optional feature
168
-
169
- // Deposit contract
170
- DEPOSIT_CHAIN_ID: false, // Non-critical
171
- DEPOSIT_NETWORK_ID: false, // Non-critical
172
- DEPOSIT_CONTRACT_ADDRESS: true,
173
-
174
- // Networking (non-critical as those do not affect consensus)
175
- MAX_REQUEST_BLOCKS: false,
176
- MAX_REQUEST_BLOCKS_DENEB: false,
177
- MIN_EPOCHS_FOR_BLOCK_REQUESTS: false,
178
- MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: false,
179
- MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: false,
180
- BLOB_SIDECAR_SUBNET_COUNT: false,
181
- BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: false,
182
- DATA_COLUMN_SIDECAR_SUBNET_COUNT: false,
183
- MAX_REQUEST_BLOB_SIDECARS: false,
184
- MAX_REQUEST_BLOB_SIDECARS_ELECTRA: false,
185
- MAX_REQUEST_DATA_COLUMN_SIDECARS: false,
186
-
187
- // # Phase0Preset
188
- /////////////////
189
-
190
- MAX_COMMITTEES_PER_SLOT: true,
191
- TARGET_COMMITTEE_SIZE: true,
192
- MAX_VALIDATORS_PER_COMMITTEE: true,
193
-
194
- SHUFFLE_ROUND_COUNT: true,
195
-
196
- HYSTERESIS_QUOTIENT: true,
197
- HYSTERESIS_DOWNWARD_MULTIPLIER: true,
198
- HYSTERESIS_UPWARD_MULTIPLIER: true,
199
-
200
- // Gwei Values
201
- MIN_DEPOSIT_AMOUNT: true,
202
- MAX_EFFECTIVE_BALANCE: true,
203
- EFFECTIVE_BALANCE_INCREMENT: true,
204
-
205
- // Time parameters
206
- MIN_ATTESTATION_INCLUSION_DELAY: true,
207
- SLOTS_PER_EPOCH: true,
208
- MIN_SEED_LOOKAHEAD: true,
209
- MAX_SEED_LOOKAHEAD: true,
210
- EPOCHS_PER_ETH1_VOTING_PERIOD: true,
211
- SLOTS_PER_HISTORICAL_ROOT: true,
212
- MIN_EPOCHS_TO_INACTIVITY_PENALTY: true,
213
-
214
- // State vector lengths
215
- EPOCHS_PER_HISTORICAL_VECTOR: true,
216
- EPOCHS_PER_SLASHINGS_VECTOR: true,
217
- HISTORICAL_ROOTS_LIMIT: true,
218
- VALIDATOR_REGISTRY_LIMIT: true,
219
-
220
- // Reward and penalty quotients
221
- BASE_REWARD_FACTOR: true,
222
- WHISTLEBLOWER_REWARD_QUOTIENT: true,
223
- PROPOSER_REWARD_QUOTIENT: true,
224
- INACTIVITY_PENALTY_QUOTIENT: true,
225
- MIN_SLASHING_PENALTY_QUOTIENT: true,
226
- PROPORTIONAL_SLASHING_MULTIPLIER: true,
227
-
228
- // Max operations per block
229
- MAX_PROPOSER_SLASHINGS: true,
230
- MAX_ATTESTER_SLASHINGS: true,
231
- MAX_ATTESTATIONS: true,
232
- MAX_DEPOSITS: true,
233
- MAX_VOLUNTARY_EXITS: true,
234
-
235
- // # AltairPreset
236
- /////////////////
237
-
238
- SYNC_COMMITTEE_SIZE: altairForkRelevant,
239
- EPOCHS_PER_SYNC_COMMITTEE_PERIOD: altairForkRelevant,
240
- INACTIVITY_PENALTY_QUOTIENT_ALTAIR: altairForkRelevant,
241
- MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: altairForkRelevant,
242
- PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: altairForkRelevant,
243
- MIN_SYNC_COMMITTEE_PARTICIPANTS: false, // Only relevant for lightclients
244
- UPDATE_TIMEOUT: false, // Only relevant for lightclients
245
-
246
- // # BellatrixPreset
247
- /////////////////
248
-
249
- INACTIVITY_PENALTY_QUOTIENT_BELLATRIX: bellatrixForkRelevant,
250
- MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX: bellatrixForkRelevant,
251
- PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX: bellatrixForkRelevant,
252
- MAX_BYTES_PER_TRANSACTION: bellatrixForkRelevant,
253
- MAX_TRANSACTIONS_PER_PAYLOAD: bellatrixForkRelevant,
254
- BYTES_PER_LOGS_BLOOM: bellatrixForkRelevant,
255
- MAX_EXTRA_DATA_BYTES: bellatrixForkRelevant,
256
-
257
- // # CapellaPreset
258
- /////////////////
259
- MAX_BLS_TO_EXECUTION_CHANGES: capellaForkRelevant,
260
- MAX_WITHDRAWALS_PER_PAYLOAD: capellaForkRelevant,
261
- MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP: capellaForkRelevant,
262
-
263
- // # DenebPreset
264
- /////////////////
265
- FIELD_ELEMENTS_PER_BLOB: denebForkRelevant,
266
- MAX_BLOB_COMMITMENTS_PER_BLOCK: denebForkRelevant,
267
- KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: denebForkRelevant,
268
- MAX_BLOBS_PER_BLOCK: denebForkRelevant,
269
-
270
- // ELECTRA
271
- MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: electraForkRelevant,
272
- MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: electraForkRelevant,
273
- MAX_ATTESTER_SLASHINGS_ELECTRA: electraForkRelevant,
274
- MAX_ATTESTATIONS_ELECTRA: electraForkRelevant,
275
- MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: electraForkRelevant,
276
- MAX_PENDING_DEPOSITS_PER_EPOCH: electraForkRelevant,
277
- MAX_EFFECTIVE_BALANCE_ELECTRA: electraForkRelevant,
278
- MIN_SLASHING_PENALTY_QUOTIENT_ELECTRA: electraForkRelevant,
279
- MIN_ACTIVATION_BALANCE: electraForkRelevant,
280
- PENDING_DEPOSITS_LIMIT: electraForkRelevant,
281
- PENDING_PARTIAL_WITHDRAWALS_LIMIT: electraForkRelevant,
282
- PENDING_CONSOLIDATIONS_LIMIT: electraForkRelevant,
283
- MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: electraForkRelevant,
284
- WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA: electraForkRelevant,
285
- MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: electraForkRelevant,
286
- MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: electraForkRelevant,
287
- MAX_BLOBS_PER_BLOCK_ELECTRA: electraForkRelevant,
288
-
289
- // FULU
290
- /////////////////
291
- CELLS_PER_EXT_BLOB: fuluForkRelevant,
292
- FIELD_ELEMENTS_PER_CELL: fuluForkRelevant,
293
- FIELD_ELEMENTS_PER_EXT_BLOB: fuluForkRelevant,
294
- KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH: fuluForkRelevant,
295
- NUMBER_OF_COLUMNS: fuluForkRelevant,
296
- NUMBER_OF_CUSTODY_GROUPS: fuluForkRelevant,
297
- SAMPLES_PER_SLOT: fuluForkRelevant,
298
- CUSTODY_REQUIREMENT: fuluForkRelevant,
299
- VALIDATOR_CUSTODY_REQUIREMENT: fuluForkRelevant,
300
- BALANCE_PER_ADDITIONAL_CUSTODY_GROUP: fuluForkRelevant,
301
- BLOB_SCHEDULE: fuluForkRelevant,
302
-
303
- // GLOAS
304
- ATTESTATION_DUE_BPS_GLOAS: gloasForkRelevant,
305
- AGGREGATE_DUE_BPS_GLOAS: gloasForkRelevant,
306
- SYNC_MESSAGE_DUE_BPS_GLOAS: gloasForkRelevant,
307
- CONTRIBUTION_DUE_BPS_GLOAS: gloasForkRelevant,
308
- PAYLOAD_ATTESTATION_DUE_BPS: gloasForkRelevant,
309
- PTC_SIZE: gloasForkRelevant,
310
- MAX_PAYLOAD_ATTESTATIONS: gloasForkRelevant,
311
- BUILDER_PENDING_WITHDRAWALS_LIMIT: gloasForkRelevant,
312
- };
313
- }
package/src/util/url.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * Joins multiple url parts safely
3
- * - Does not break the protocol double slash //
4
- * - Cleans double slashes at any point
5
- * @param args ("http://localhost/", "/node/", "/genesis_time")
6
- * @return "http://localhost/node/genesis_time"
7
- */
8
- export function urlJoin(...args: string[]): string {
9
- return (
10
- args
11
- .join("/")
12
- .replace(/([^:]\/)\/+/g, "$1")
13
- // Remove duplicate slashes in the front
14
- .replace(/^(\/)+/, "/")
15
- );
16
- }