@lodestar/beacon-node 1.34.0-dev.6398efaba5 → 1.34.0-dev.684db9fff1
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/network/gossip/topic.d.ts +79 -79
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js +45 -17
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRange.js.map +1 -1
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js +43 -21
- package/lib/network/reqresp/handlers/dataColumnSidecarsByRoot.js.map +1 -1
- package/lib/network/reqresp/utils/dataColumnResponseValidation.d.ts +14 -0
- package/lib/network/reqresp/utils/dataColumnResponseValidation.js +56 -0
- package/lib/network/reqresp/utils/dataColumnResponseValidation.js.map +1 -0
- package/lib/util/sszBytes.d.ts +2 -0
- package/lib/util/sszBytes.js +23 -0
- package/lib/util/sszBytes.js.map +1 -1
- package/package.json +14 -14
|
@@ -38,11 +38,44 @@ export declare function getGossipSSZType(topic: GossipTopic): import("@chainsafe
|
|
|
38
38
|
kzgCommitmentsInclusionProof: import("@chainsafe/ssz").VectorCompositeType<import("@chainsafe/ssz").ByteVectorType>;
|
|
39
39
|
}> | import("@chainsafe/ssz").ContainerType<{
|
|
40
40
|
message: import("@chainsafe/ssz").ContainerType<{
|
|
41
|
-
slot: import("@chainsafe/ssz").UintNumberType;
|
|
42
|
-
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
43
|
-
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
44
|
-
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
45
41
|
body: import("@chainsafe/ssz").ContainerType<{
|
|
42
|
+
executionPayload: import("@chainsafe/ssz").ContainerType<{
|
|
43
|
+
blobGasUsed: import("@chainsafe/ssz").UintBigintType;
|
|
44
|
+
excessBlobGas: import("@chainsafe/ssz").UintBigintType;
|
|
45
|
+
withdrawals: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ContainerType<{
|
|
46
|
+
index: import("@chainsafe/ssz").UintNumberType;
|
|
47
|
+
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
48
|
+
address: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
49
|
+
amount: import("@chainsafe/ssz").UintBigintType;
|
|
50
|
+
}>>;
|
|
51
|
+
transactions: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ByteListType>;
|
|
52
|
+
parentHash: import("@chainsafe/ssz").ByteVectorType;
|
|
53
|
+
feeRecipient: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
54
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
55
|
+
receiptsRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
56
|
+
logsBloom: import("@chainsafe/ssz").ByteVectorType;
|
|
57
|
+
prevRandao: import("@chainsafe/ssz").ByteVectorType;
|
|
58
|
+
blockNumber: import("@chainsafe/ssz").UintNumberType;
|
|
59
|
+
gasLimit: import("@chainsafe/ssz").UintNumberType;
|
|
60
|
+
gasUsed: import("@chainsafe/ssz").UintNumberType;
|
|
61
|
+
timestamp: import("@chainsafe/ssz").UintNumberType;
|
|
62
|
+
extraData: import("@chainsafe/ssz").ByteListType;
|
|
63
|
+
baseFeePerGas: import("@chainsafe/ssz").UintBigintType;
|
|
64
|
+
blockHash: import("@chainsafe/ssz").ByteVectorType;
|
|
65
|
+
}>;
|
|
66
|
+
blsToExecutionChanges: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ContainerType<{
|
|
67
|
+
message: import("@chainsafe/ssz").ContainerType<{
|
|
68
|
+
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
69
|
+
fromBlsPubkey: import("@chainsafe/ssz").ByteVectorType;
|
|
70
|
+
toExecutionAddress: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
71
|
+
}>;
|
|
72
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
73
|
+
}>>;
|
|
74
|
+
blobKzgCommitments: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ByteVectorType>;
|
|
75
|
+
syncAggregate: import("@chainsafe/ssz").ContainerType<{
|
|
76
|
+
syncCommitteeBits: import("@chainsafe/ssz").BitVectorType;
|
|
77
|
+
syncCommitteeSignature: import("@chainsafe/ssz").ByteVectorType;
|
|
78
|
+
}>;
|
|
46
79
|
randaoReveal: import("@chainsafe/ssz").ByteVectorType;
|
|
47
80
|
eth1Data: import("@chainsafe/ssz").ContainerType<{
|
|
48
81
|
depositRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
@@ -142,82 +175,19 @@ export declare function getGossipSSZType(topic: GossipTopic): import("@chainsafe
|
|
|
142
175
|
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
143
176
|
}>>;
|
|
144
177
|
}>;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
message: import("@chainsafe/ssz").ContainerType<{
|
|
150
|
-
slot: import("@chainsafe/ssz").UintBigintType;
|
|
151
|
-
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
152
|
-
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
153
|
-
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
154
|
-
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
155
|
-
}>;
|
|
156
|
-
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
157
|
-
}>;
|
|
158
|
-
signedHeader2: import("@chainsafe/ssz").ContainerType<{
|
|
159
|
-
message: import("@chainsafe/ssz").ContainerType<{
|
|
160
|
-
slot: import("@chainsafe/ssz").UintBigintType;
|
|
161
|
-
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
162
|
-
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
163
|
-
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
164
|
-
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
165
|
-
}>;
|
|
166
|
-
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
167
|
-
}>;
|
|
168
|
-
}> | import("@chainsafe/ssz").ContainerType<{
|
|
169
|
-
message: import("@chainsafe/ssz").ContainerType<{
|
|
170
|
-
epoch: import("@chainsafe/ssz").UintNumberType;
|
|
171
|
-
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
172
|
-
}>;
|
|
173
|
-
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
174
|
-
}> | import("@chainsafe/ssz").ContainerType<{
|
|
175
|
-
message: import("@chainsafe/ssz").ContainerType<{
|
|
176
|
-
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
177
|
-
fromBlsPubkey: import("@chainsafe/ssz").ByteVectorType;
|
|
178
|
-
toExecutionAddress: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
178
|
+
slot: import("@chainsafe/ssz").UintNumberType;
|
|
179
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
180
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
181
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
179
182
|
}>;
|
|
180
183
|
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
181
184
|
}> | import("@chainsafe/ssz").ContainerType<{
|
|
182
185
|
message: import("@chainsafe/ssz").ContainerType<{
|
|
186
|
+
slot: import("@chainsafe/ssz").UintNumberType;
|
|
187
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
188
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
189
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
183
190
|
body: import("@chainsafe/ssz").ContainerType<{
|
|
184
|
-
executionPayload: import("@chainsafe/ssz").ContainerType<{
|
|
185
|
-
blobGasUsed: import("@chainsafe/ssz").UintBigintType;
|
|
186
|
-
excessBlobGas: import("@chainsafe/ssz").UintBigintType;
|
|
187
|
-
withdrawals: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ContainerType<{
|
|
188
|
-
index: import("@chainsafe/ssz").UintNumberType;
|
|
189
|
-
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
190
|
-
address: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
191
|
-
amount: import("@chainsafe/ssz").UintBigintType;
|
|
192
|
-
}>>;
|
|
193
|
-
transactions: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ByteListType>;
|
|
194
|
-
parentHash: import("@chainsafe/ssz").ByteVectorType;
|
|
195
|
-
feeRecipient: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
196
|
-
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
197
|
-
receiptsRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
198
|
-
logsBloom: import("@chainsafe/ssz").ByteVectorType;
|
|
199
|
-
prevRandao: import("@chainsafe/ssz").ByteVectorType;
|
|
200
|
-
blockNumber: import("@chainsafe/ssz").UintNumberType;
|
|
201
|
-
gasLimit: import("@chainsafe/ssz").UintNumberType;
|
|
202
|
-
gasUsed: import("@chainsafe/ssz").UintNumberType;
|
|
203
|
-
timestamp: import("@chainsafe/ssz").UintNumberType;
|
|
204
|
-
extraData: import("@chainsafe/ssz").ByteListType;
|
|
205
|
-
baseFeePerGas: import("@chainsafe/ssz").UintBigintType;
|
|
206
|
-
blockHash: import("@chainsafe/ssz").ByteVectorType;
|
|
207
|
-
}>;
|
|
208
|
-
blsToExecutionChanges: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ContainerType<{
|
|
209
|
-
message: import("@chainsafe/ssz").ContainerType<{
|
|
210
|
-
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
211
|
-
fromBlsPubkey: import("@chainsafe/ssz").ByteVectorType;
|
|
212
|
-
toExecutionAddress: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
213
|
-
}>;
|
|
214
|
-
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
215
|
-
}>>;
|
|
216
|
-
blobKzgCommitments: import("@chainsafe/ssz").ListCompositeType<import("@chainsafe/ssz").ByteVectorType>;
|
|
217
|
-
syncAggregate: import("@chainsafe/ssz").ContainerType<{
|
|
218
|
-
syncCommitteeBits: import("@chainsafe/ssz").BitVectorType;
|
|
219
|
-
syncCommitteeSignature: import("@chainsafe/ssz").ByteVectorType;
|
|
220
|
-
}>;
|
|
221
191
|
randaoReveal: import("@chainsafe/ssz").ByteVectorType;
|
|
222
192
|
eth1Data: import("@chainsafe/ssz").ContainerType<{
|
|
223
193
|
depositRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
@@ -317,10 +287,40 @@ export declare function getGossipSSZType(topic: GossipTopic): import("@chainsafe
|
|
|
317
287
|
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
318
288
|
}>>;
|
|
319
289
|
}>;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
290
|
+
}>;
|
|
291
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
292
|
+
}> | import("@chainsafe/ssz").ContainerType<{
|
|
293
|
+
signedHeader1: import("@chainsafe/ssz").ContainerType<{
|
|
294
|
+
message: import("@chainsafe/ssz").ContainerType<{
|
|
295
|
+
slot: import("@chainsafe/ssz").UintBigintType;
|
|
296
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
297
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
298
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
299
|
+
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
300
|
+
}>;
|
|
301
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
302
|
+
}>;
|
|
303
|
+
signedHeader2: import("@chainsafe/ssz").ContainerType<{
|
|
304
|
+
message: import("@chainsafe/ssz").ContainerType<{
|
|
305
|
+
slot: import("@chainsafe/ssz").UintBigintType;
|
|
306
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
307
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
308
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
309
|
+
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
310
|
+
}>;
|
|
311
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
312
|
+
}>;
|
|
313
|
+
}> | import("@chainsafe/ssz").ContainerType<{
|
|
314
|
+
message: import("@chainsafe/ssz").ContainerType<{
|
|
315
|
+
epoch: import("@chainsafe/ssz").UintNumberType;
|
|
316
|
+
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
317
|
+
}>;
|
|
318
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
319
|
+
}> | import("@chainsafe/ssz").ContainerType<{
|
|
320
|
+
message: import("@chainsafe/ssz").ContainerType<{
|
|
321
|
+
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
322
|
+
fromBlsPubkey: import("@chainsafe/ssz").ByteVectorType;
|
|
323
|
+
toExecutionAddress: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
324
324
|
}>;
|
|
325
325
|
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
326
326
|
}> | import("@chainsafe/ssz").ContainerType<{
|
|
@@ -2,25 +2,41 @@ import { GENESIS_SLOT } from "@lodestar/params";
|
|
|
2
2
|
import { RespStatus, ResponseError } from "@lodestar/reqresp";
|
|
3
3
|
import { computeEpochAtSlot } from "@lodestar/state-transition";
|
|
4
4
|
import { fromHex } from "@lodestar/utils";
|
|
5
|
+
import { validateRequestedDataColumns } from "../utils/dataColumnResponseValidation.js";
|
|
5
6
|
export async function* onDataColumnSidecarsByRange(request, chain, db) {
|
|
6
7
|
// Non-finalized range of columns
|
|
7
|
-
const { startSlot, count, columns } = validateDataColumnSidecarsByRangeRequest(chain.config, request);
|
|
8
|
+
const { startSlot, count, columns: requestedColumns } = validateDataColumnSidecarsByRangeRequest(chain.config, request);
|
|
9
|
+
const availableColumns = validateRequestedDataColumns(chain, requestedColumns);
|
|
8
10
|
const endSlot = startSlot + count;
|
|
11
|
+
if (availableColumns.length === 0) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
9
14
|
const finalized = db.dataColumnSidecarArchive;
|
|
10
15
|
const unfinalized = db.dataColumnSidecar;
|
|
11
16
|
const finalizedSlot = chain.forkChoice.getFinalizedBlock().slot;
|
|
12
17
|
// Finalized range of columns
|
|
13
18
|
if (startSlot <= finalizedSlot) {
|
|
14
19
|
for (let slot = startSlot; slot < endSlot; slot++) {
|
|
15
|
-
const dataColumnSidecars = await finalized.getManyBinary(slot,
|
|
16
|
-
for (const
|
|
17
|
-
if (
|
|
18
|
-
|
|
20
|
+
const dataColumnSidecars = await finalized.getManyBinary(slot, availableColumns);
|
|
21
|
+
for (const dataColumnSidecarBytes of dataColumnSidecars) {
|
|
22
|
+
if (dataColumnSidecarBytes) {
|
|
23
|
+
yield {
|
|
24
|
+
data: dataColumnSidecarBytes,
|
|
25
|
+
boundary: chain.config.getForkBoundaryAtEpoch(computeEpochAtSlot(slot)),
|
|
26
|
+
};
|
|
19
27
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
// TODO: Check blobs for that block and respond resource_unavailable
|
|
29
|
+
// After we have consensus from other teams on the specs
|
|
30
|
+
// else {
|
|
31
|
+
// await handleColumnSidecarUnavailability({
|
|
32
|
+
// chain,
|
|
33
|
+
// db,
|
|
34
|
+
// unavailableColumnIndex: availableColumns[index],
|
|
35
|
+
// slot,
|
|
36
|
+
// requestedColumns,
|
|
37
|
+
// availableColumns,
|
|
38
|
+
// });
|
|
39
|
+
// }
|
|
24
40
|
}
|
|
25
41
|
}
|
|
26
42
|
}
|
|
@@ -37,15 +53,27 @@ export async function* onDataColumnSidecarsByRange(request, chain, db) {
|
|
|
37
53
|
// at the time of the start of the request. Spec is clear the chain of columns must be consistent, but on
|
|
38
54
|
// re-org there's no need to abort the request
|
|
39
55
|
// Spec: https://github.com/ethereum/consensus-specs/blob/ad36024441cf910d428d03f87f331fbbd2b3e5f1/specs/fulu/p2p-interface.md#L425-L429
|
|
40
|
-
const dataColumnSidecars = await unfinalized.getManyBinary(fromHex(block.blockRoot),
|
|
41
|
-
for (const
|
|
42
|
-
if (
|
|
43
|
-
|
|
56
|
+
const dataColumnSidecars = await unfinalized.getManyBinary(fromHex(block.blockRoot), availableColumns);
|
|
57
|
+
for (const dataColumnSidecarBytes of dataColumnSidecars) {
|
|
58
|
+
if (dataColumnSidecarBytes) {
|
|
59
|
+
yield {
|
|
60
|
+
data: dataColumnSidecarBytes,
|
|
61
|
+
boundary: chain.config.getForkBoundaryAtEpoch(computeEpochAtSlot(block.slot)),
|
|
62
|
+
};
|
|
44
63
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
// TODO: Check blobs for that block and respond resource_unavailable
|
|
65
|
+
// After we have consensus from other teams on the specs
|
|
66
|
+
// else {
|
|
67
|
+
// await handleColumnSidecarUnavailability({
|
|
68
|
+
// chain,
|
|
69
|
+
// db,
|
|
70
|
+
// unavailableColumnIndex: availableColumns[index],
|
|
71
|
+
// blockRoot: fromHex(block.blockRoot),
|
|
72
|
+
// slot: block.slot,
|
|
73
|
+
// requestedColumns,
|
|
74
|
+
// availableColumns,
|
|
75
|
+
// });
|
|
76
|
+
// }
|
|
49
77
|
}
|
|
50
78
|
}
|
|
51
79
|
// If block is after endSlot, stop iterating
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataColumnSidecarsByRange.js","sourceRoot":"","sources":["../../../../src/network/reqresp/handlers/dataColumnSidecarsByRange.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAE,aAAa,EAAmB,MAAM,mBAA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,CAAC;AACrC,CAAC"}
|
|
@@ -1,35 +1,57 @@
|
|
|
1
|
-
import { RespStatus, ResponseError } from "@lodestar/reqresp";
|
|
2
1
|
import { computeEpochAtSlot } from "@lodestar/state-transition";
|
|
3
|
-
import {
|
|
2
|
+
import { toRootHex } from "@lodestar/utils";
|
|
3
|
+
import { validateRequestedDataColumns } from "../utils/dataColumnResponseValidation.js";
|
|
4
4
|
export async function* onDataColumnSidecarsByRoot(requestBody, chain, db) {
|
|
5
|
-
// SPEC: minimum_request_epoch = max(
|
|
6
|
-
const finalizedEpoch = chain.forkChoice.getFinalizedCheckpoint().epoch;
|
|
5
|
+
// SPEC: minimum_request_epoch = max(current_epoch - MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS, FULU_FORK_EPOCH)
|
|
7
6
|
const currentEpoch = chain.clock.currentEpoch;
|
|
8
|
-
const minimumRequestEpoch = Math.max(
|
|
7
|
+
const minimumRequestEpoch = Math.max(currentEpoch - chain.config.MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS, chain.config.FULU_FORK_EPOCH);
|
|
9
8
|
for (const dataColumnsByRootIdentifier of requestBody) {
|
|
10
|
-
const { blockRoot, columns } = dataColumnsByRootIdentifier;
|
|
11
|
-
const
|
|
9
|
+
const { blockRoot, columns: requestedColumns } = dataColumnsByRootIdentifier;
|
|
10
|
+
const availableColumns = validateRequestedDataColumns(chain, requestedColumns);
|
|
11
|
+
if (availableColumns.length === 0) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const blockRootHex = toRootHex(blockRoot);
|
|
12
15
|
const block = chain.forkChoice.getBlockHex(blockRootHex);
|
|
13
|
-
//
|
|
16
|
+
// If the block is not in fork choice, it may be finalized. Attempt to find its slot in block archive
|
|
17
|
+
const slot = block ? block.slot : await db.blockArchive.getSlotByRoot(blockRoot);
|
|
18
|
+
if (slot === null) {
|
|
19
|
+
// We haven't seen the block
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const requestedEpoch = computeEpochAtSlot(slot);
|
|
14
23
|
// SPEC: Clients MUST support requesting sidecars since minimum_request_epoch.
|
|
15
24
|
// If any root in the request content references a block earlier than minimum_request_epoch, peers MAY respond with
|
|
16
25
|
// error code 3: ResourceUnavailable or not include the data column sidecar in the response.
|
|
17
|
-
// https://github.com/ethereum/consensus-specs/blob/
|
|
18
|
-
if (
|
|
26
|
+
// https://github.com/ethereum/consensus-specs/blob/v1.6.0-alpha.5/specs/fulu/p2p-interface.md#datacolumnsidecarsbyroot-v1
|
|
27
|
+
if (requestedEpoch < minimumRequestEpoch) {
|
|
19
28
|
continue;
|
|
20
29
|
}
|
|
21
|
-
const dataColumns =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
const dataColumns = block
|
|
31
|
+
? // Non-finalized sidecars are stored by block root
|
|
32
|
+
await db.dataColumnSidecar.getManyBinary(blockRoot, availableColumns)
|
|
33
|
+
: // Finalized sidecars are archived and stored by slot
|
|
34
|
+
await db.dataColumnSidecarArchive.getManyBinary(slot, availableColumns);
|
|
35
|
+
for (const dataColumnBytes of dataColumns) {
|
|
36
|
+
if (dataColumnBytes) {
|
|
37
|
+
yield {
|
|
38
|
+
data: dataColumnBytes,
|
|
39
|
+
boundary: chain.config.getForkBoundaryAtEpoch(requestedEpoch),
|
|
40
|
+
};
|
|
28
41
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
// TODO: Check blobs for that block and respond resource_unavailable
|
|
43
|
+
// After we have consensus from other teams on the specs
|
|
44
|
+
// else {
|
|
45
|
+
// await handleColumnSidecarUnavailability({
|
|
46
|
+
// chain,
|
|
47
|
+
// db,
|
|
48
|
+
// unavailableColumnIndex: availableColumns[index],
|
|
49
|
+
// slot: block.slot,
|
|
50
|
+
// blockRoot: fromHex(block.blockRoot),
|
|
51
|
+
// requestedColumns,
|
|
52
|
+
// availableColumns,
|
|
53
|
+
// });
|
|
54
|
+
// }
|
|
33
55
|
}
|
|
34
56
|
}
|
|
35
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataColumnSidecarsByRoot.js","sourceRoot":"","sources":["../../../../src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dataColumnSidecarsByRoot.js","sourceRoot":"","sources":["../../../../src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAI1C,OAAO,EAAC,4BAA4B,EAAC,MAAM,0CAA0C,CAAC;AAEtF,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,0BAA0B,CAC/C,WAA4C,EAC5C,KAAmB,EACnB,EAAa;IAEb,mHAAmH;IACnH,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC;IAC9C,MAAM,mBAAmB,GAAG,IAAI,CAAC,GAAG,CAClC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,4CAA4C,EACxE,KAAK,CAAC,MAAM,CAAC,eAAe,CAC7B,CAAC;IAEF,KAAK,MAAM,2BAA2B,IAAI,WAAW,EAAE,CAAC;QACtD,MAAM,EAAC,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAC,GAAG,2BAA2B,CAAC;QAC3E,MAAM,gBAAgB,GAAG,4BAA4B,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;QAC/E,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QAED,MAAM,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACzD,qGAAqG;QACrG,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAEjF,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YAClB,4BAA4B;YAC5B,SAAS;QACX,CAAC;QAED,MAAM,cAAc,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAEhD,8EAA8E;QAC9E,mHAAmH;QACnH,4FAA4F;QAC5F,0HAA0H;QAC1H,IAAI,cAAc,GAAG,mBAAmB,EAAE,CAAC;YACzC,SAAS;QACX,CAAC;QAED,MAAM,WAAW,GAAG,KAAK;YACvB,CAAC,CAAC,kDAAkD;gBAClD,MAAM,EAAE,CAAC,iBAAiB,CAAC,aAAa,CAAC,SAAS,EAAE,gBAAgB,CAAC;YACvE,CAAC,CAAC,qDAAqD;gBACrD,MAAM,EAAE,CAAC,wBAAwB,CAAC,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAE5E,KAAK,MAAM,eAAe,IAAI,WAAW,EAAE,CAAC;YAC1C,IAAI,eAAe,EAAE,CAAC;gBACpB,MAAM;oBACJ,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,sBAAsB,CAAC,cAAc,CAAC;iBAC9D,CAAC;YACJ,CAAC;YAED,oEAAoE;YACpE,wDAAwD;YACxD,SAAS;YACT,8CAA8C;YAC9C,aAAa;YACb,UAAU;YACV,uDAAuD;YACvD,wBAAwB;YACxB,2CAA2C;YAC3C,wBAAwB;YACxB,wBAAwB;YACxB,QAAQ;YACR,IAAI;QACN,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ColumnIndex, Slot } from "@lodestar/types";
|
|
2
|
+
import { IBeaconChain } from "../../../chain/interface.js";
|
|
3
|
+
import { IBeaconDb } from "../../../db/interface.js";
|
|
4
|
+
export declare function handleColumnSidecarUnavailability({ chain, db, unavailableColumnIndex, requestedColumns, availableColumns, slot, blockRoot, }: {
|
|
5
|
+
chain: IBeaconChain;
|
|
6
|
+
db: IBeaconDb;
|
|
7
|
+
slot: Slot;
|
|
8
|
+
blockRoot?: Uint8Array;
|
|
9
|
+
unavailableColumnIndex: ColumnIndex;
|
|
10
|
+
requestedColumns: ColumnIndex[];
|
|
11
|
+
availableColumns: ColumnIndex[];
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
export declare function validateRequestedDataColumns(chain: IBeaconChain, requestedColumns: ColumnIndex[]): ColumnIndex[];
|
|
14
|
+
//# sourceMappingURL=dataColumnResponseValidation.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { RespStatus, ResponseError } from "@lodestar/reqresp";
|
|
2
|
+
import { prettyBytes, prettyPrintIndices } from "@lodestar/utils";
|
|
3
|
+
import { getBlobKzgCommitmentsCountFromSignedBeaconBlockSerialized } from "../../../util/sszBytes.js";
|
|
4
|
+
export async function handleColumnSidecarUnavailability({ chain, db, unavailableColumnIndex, requestedColumns, availableColumns, slot, blockRoot, }) {
|
|
5
|
+
const logData = {
|
|
6
|
+
unavailableColumnIndex,
|
|
7
|
+
requestedColumns: prettyPrintIndices(requestedColumns),
|
|
8
|
+
availableColumns: prettyPrintIndices(availableColumns),
|
|
9
|
+
slot,
|
|
10
|
+
};
|
|
11
|
+
if (blockRoot) {
|
|
12
|
+
logData.blockRoot = prettyBytes(blockRoot);
|
|
13
|
+
}
|
|
14
|
+
chain.logger.debug("dataColumnSidecar requested unavailable", logData);
|
|
15
|
+
const blockBytes = blockRoot ? await db.block.getBinary(blockRoot) : await db.blockArchive.getBinary(slot);
|
|
16
|
+
if (!blockBytes) {
|
|
17
|
+
chain.logger.error(`Expected ${blockRoot ? "unfinalized" : "finalized"} block not found while handling unavailable dataColumnSidecar`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
// Check for blob count in actual block
|
|
21
|
+
const blobsCount = getBlobKzgCommitmentsCountFromSignedBeaconBlockSerialized(chain.config, blockBytes);
|
|
22
|
+
// There are zero blobs for that column index, so we can safely return without any error
|
|
23
|
+
if (blobsCount > 0)
|
|
24
|
+
return;
|
|
25
|
+
// There are blobs for that column index so we should have synced for it
|
|
26
|
+
// We need to inform to peers that we don't have that expected data
|
|
27
|
+
// NOTE: We may look to add some metrics to track such scenario
|
|
28
|
+
throw new ResponseError(RespStatus.RESOURCE_UNAVAILABLE, `dataColumnSidecar requested and within custody not available for columnIndex=${unavailableColumnIndex}`);
|
|
29
|
+
}
|
|
30
|
+
export function validateRequestedDataColumns(chain, requestedColumns) {
|
|
31
|
+
if (requestedColumns.length === 0) {
|
|
32
|
+
throw new ResponseError(RespStatus.INVALID_REQUEST, "dataColumnSidecar requested without column indices");
|
|
33
|
+
}
|
|
34
|
+
const custodyColumns = chain.custodyConfig.custodyColumns;
|
|
35
|
+
const availableColumns = requestedColumns.filter((c) => custodyColumns.includes(c));
|
|
36
|
+
const missingColumns = requestedColumns.filter((c) => !custodyColumns.includes(c));
|
|
37
|
+
if (missingColumns.length > 0) {
|
|
38
|
+
chain.logger.verbose("Requested dataColumnSidecar for non-custody columns", {
|
|
39
|
+
requestedColumns: prettyPrintIndices(requestedColumns),
|
|
40
|
+
custodyColumns: prettyPrintIndices(custodyColumns),
|
|
41
|
+
availableColumns: prettyPrintIndices(availableColumns),
|
|
42
|
+
missingColumns: prettyPrintIndices(missingColumns),
|
|
43
|
+
});
|
|
44
|
+
// TODO: We should throw error and only respond to valid requests
|
|
45
|
+
// A peer must check what we announced in our custody and only ask for those columns
|
|
46
|
+
// throw new ResponseError(RespStatus.INVALID_REQUEST, "dataColumnSidecar requested for non-custody columns");
|
|
47
|
+
}
|
|
48
|
+
if (availableColumns.length === 0) {
|
|
49
|
+
chain.logger.verbose("Requested dataColumnSidecars not available", {
|
|
50
|
+
requestedColumns: prettyPrintIndices(requestedColumns),
|
|
51
|
+
custodyColumns: prettyPrintIndices(custodyColumns),
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return availableColumns;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=dataColumnResponseValidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataColumnResponseValidation.js","sourceRoot":"","sources":["../../../../src/network/reqresp/utils/dataColumnResponseValidation.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAGhE,OAAO,EAAC,yDAAyD,EAAC,MAAM,2BAA2B,CAAC;AAEpG,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,EACtD,KAAK,EACL,EAAE,EACF,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,IAAI,EACJ,SAAS,GASV;IACC,MAAM,OAAO,GAAY;QACvB,sBAAsB;QACtB,gBAAgB,EAAE,kBAAkB,CAAC,gBAAgB,CAAC;QACtD,gBAAgB,EAAE,kBAAkB,CAAC,gBAAgB,CAAC;QACtD,IAAI;KACL,CAAC;IACF,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,yCAAyC,EAAE,OAAO,CAAC,CAAC;IAEvE,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC3G,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,KAAK,CAAC,MAAM,CAAC,KAAK,CAChB,YAAY,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,C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AoF;QACpF,8GAA8G;IAChH,CAAC;IAED,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,4CAA4C,EAAE;YACjE,gBAAgB,EAAE,kBAAkB,CAAC,gBAAgB,CAAC;YACtD,cAAc,EAAE,kBAAkB,CAAC,cAAc,CAAC;SACnD,CAAC,CAAC;IACL,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
package/lib/util/sszBytes.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BitArray } from "@chainsafe/ssz";
|
|
2
|
+
import { ChainForkConfig } from "@lodestar/config";
|
|
2
3
|
import { ForkName } from "@lodestar/params";
|
|
3
4
|
import { BLSSignature, CommitteeIndex, RootHex, Slot, ValidatorIndex } from "@lodestar/types";
|
|
4
5
|
export type BlockRootHex = RootHex;
|
|
@@ -103,4 +104,5 @@ export declare function getAttDataFromSignedAggregateAndProofPhase0(data: Uint8A
|
|
|
103
104
|
export declare function getSlotFromSignedBeaconBlockSerialized(data: Uint8Array): Slot | null;
|
|
104
105
|
export declare function getSlotFromBlobSidecarSerialized(data: Uint8Array): Slot | null;
|
|
105
106
|
export declare function getSlotFromDataColumnSidecarSerialized(data: Uint8Array): Slot | null;
|
|
107
|
+
export declare function getBlobKzgCommitmentsCountFromSignedBeaconBlockSerialized(config: ChainForkConfig, blockBytes: Uint8Array): number;
|
|
106
108
|
//# sourceMappingURL=sszBytes.d.ts.map
|
package/lib/util/sszBytes.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BitArray, deserializeUint8ArrayBitListFromBytes } from "@chainsafe/ssz";
|
|
2
2
|
import { BYTES_PER_FIELD_ELEMENT, FIELD_ELEMENTS_PER_BLOB, ForkSeq, MAX_COMMITTEES_PER_SLOT, isForkPostElectra, } from "@lodestar/params";
|
|
3
|
+
import { ssz } from "@lodestar/types";
|
|
3
4
|
// pre-electra
|
|
4
5
|
// class Attestation(Container):
|
|
5
6
|
// aggregation_bits: Bitlist[MAX_VALIDATORS_PER_COMMITTEE] - offset 4
|
|
@@ -347,4 +348,26 @@ function getSlotFromOffsetTrusted(data, offset) {
|
|
|
347
348
|
function checkSlotHighBytes(data, offset) {
|
|
348
349
|
return (data[offset + 4] | data[offset + 5] | data[offset + 6] | data[offset + 7]) === 0;
|
|
349
350
|
}
|
|
351
|
+
export function getBlobKzgCommitmentsCountFromSignedBeaconBlockSerialized(config, blockBytes) {
|
|
352
|
+
const slot = getSlotFromSignedBeaconBlockSerialized(blockBytes);
|
|
353
|
+
if (!slot)
|
|
354
|
+
throw new Error("Can not parse the slot from block bytes");
|
|
355
|
+
if (config.getForkSeq(slot) < ForkSeq.deneb)
|
|
356
|
+
return 0;
|
|
357
|
+
const { SignedBeaconBlock, BeaconBlock, BeaconBlockBody, KZGCommitment } = ssz[config.getForkName(slot)];
|
|
358
|
+
const view = new DataView(blockBytes.buffer, blockBytes.byteOffset, blockBytes.byteLength);
|
|
359
|
+
const singedBlockFieldRanges = SignedBeaconBlock.getFieldRanges(view, 0, blockBytes.length);
|
|
360
|
+
const messageIndex = Object.keys(SignedBeaconBlock.fields).indexOf("message");
|
|
361
|
+
const messageRange = singedBlockFieldRanges[messageIndex];
|
|
362
|
+
const blockFieldRanges = BeaconBlock.getFieldRanges(view, messageRange.start, messageRange.end);
|
|
363
|
+
const bodyIndex = Object.keys(BeaconBlock.fields).indexOf("body");
|
|
364
|
+
const bodyRange = blockFieldRanges[bodyIndex];
|
|
365
|
+
const bodyFieldRanges = BeaconBlockBody.getFieldRanges(view, messageRange.start + bodyRange.start, messageRange.end + bodyRange.end);
|
|
366
|
+
const kzgCommitmentsIndex = Object.keys(BeaconBlockBody.fields).indexOf("blobKzgCommitments");
|
|
367
|
+
const kzgCommitmentsRange = bodyFieldRanges[kzgCommitmentsIndex];
|
|
368
|
+
const commitmentSize = KZGCommitment.fixedSize;
|
|
369
|
+
const end = messageRange.end + bodyRange.end + kzgCommitmentsRange.end;
|
|
370
|
+
const start = messageRange.start + bodyRange.start + kzgCommitmentsRange.start;
|
|
371
|
+
return Math.round(((end > blockBytes.byteLength ? blockBytes.byteLength : end) - start) / commitmentSize);
|
|
372
|
+
}
|
|
350
373
|
//# sourceMappingURL=sszBytes.js.map
|
package/lib/util/sszBytes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sszBytes.js","sourceRoot":"","sources":["../../src/util/sszBytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,qCAAqC,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"sszBytes.js","sourceRoot":"","sources":["../../src/util/sszBytes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,qCAAqC,EAAC,MAAM,gBAAgB,CAAC;AAE/E,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EAGvB,OAAO,EACP,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAA8D,GAAG,EAAC,MAAM,iBAAiB,CAAC;AAQjG,cAAc;AACd,gCAAgC;AAChC,uEAAuE;AACvE,8CAA8C;AAC9C,iCAAiC;AAEjC,UAAU;AACV,gCAAgC;AAChC,iGAAiG;AACjG,8CAA8C;AAC9C,iCAAiC;AACjC,uDAAuD;AACvD,UAAU;AACV,sCAAsC;AACtC,4CAA4C;AAC5C,2CAA2C;AAC3C,qCAAqC;AACrC,sCAAsC;AACtC,EAAE;AACF,gBAAgB;AAChB,yDAAyD;AACzD,uCAAuC;AACvC,uCAAuC;AACvC,wCAAwC;AACxC,wCAAwC;AACxC,wCAAwC;AAExC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,oCAAoC,GAAG,qBAAqB,GAAG,CAAC,GAAG,CAAC,CAAC;AAC3E,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,SAAS,GAAG,CA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C,GAAG,CAAC,CAAC;IAChG,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,MAAM,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAE9C,MAAM,eAAe,GAAG,eAAe,CAAC,cAAc,CACpD,IAAI,EACJ,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,EACpC,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,CACjC,CAAC;IACF,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9F,MAAM,mBAAmB,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IACjE,MAAM,cAAc,GAAG,aAAa,CAAC,SAAS,CAAC;IAE/C,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,GAAG,mBAAmB,CAAC,GAAG,CAAC;IACvE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC;IAE/E,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,cAAc,CAAC,CAAC;AAC5G,CAAC"}
|
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.34.0-dev.
|
|
14
|
+
"version": "1.34.0-dev.684db9fff1",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -118,18 +118,18 @@
|
|
|
118
118
|
"@libp2p/peer-id": "^5.1.0",
|
|
119
119
|
"@libp2p/prometheus-metrics": "^4.3.15",
|
|
120
120
|
"@libp2p/tcp": "^10.1.8",
|
|
121
|
-
"@lodestar/api": "1.34.0-dev.
|
|
122
|
-
"@lodestar/config": "1.34.0-dev.
|
|
123
|
-
"@lodestar/db": "1.34.0-dev.
|
|
124
|
-
"@lodestar/fork-choice": "1.34.0-dev.
|
|
125
|
-
"@lodestar/light-client": "1.34.0-dev.
|
|
126
|
-
"@lodestar/logger": "1.34.0-dev.
|
|
127
|
-
"@lodestar/params": "1.34.0-dev.
|
|
128
|
-
"@lodestar/reqresp": "1.34.0-dev.
|
|
129
|
-
"@lodestar/state-transition": "1.34.0-dev.
|
|
130
|
-
"@lodestar/types": "1.34.0-dev.
|
|
131
|
-
"@lodestar/utils": "1.34.0-dev.
|
|
132
|
-
"@lodestar/validator": "1.34.0-dev.
|
|
121
|
+
"@lodestar/api": "1.34.0-dev.684db9fff1",
|
|
122
|
+
"@lodestar/config": "1.34.0-dev.684db9fff1",
|
|
123
|
+
"@lodestar/db": "1.34.0-dev.684db9fff1",
|
|
124
|
+
"@lodestar/fork-choice": "1.34.0-dev.684db9fff1",
|
|
125
|
+
"@lodestar/light-client": "1.34.0-dev.684db9fff1",
|
|
126
|
+
"@lodestar/logger": "1.34.0-dev.684db9fff1",
|
|
127
|
+
"@lodestar/params": "1.34.0-dev.684db9fff1",
|
|
128
|
+
"@lodestar/reqresp": "1.34.0-dev.684db9fff1",
|
|
129
|
+
"@lodestar/state-transition": "1.34.0-dev.684db9fff1",
|
|
130
|
+
"@lodestar/types": "1.34.0-dev.684db9fff1",
|
|
131
|
+
"@lodestar/utils": "1.34.0-dev.684db9fff1",
|
|
132
|
+
"@lodestar/validator": "1.34.0-dev.684db9fff1",
|
|
133
133
|
"@multiformats/multiaddr": "^12.1.3",
|
|
134
134
|
"datastore-core": "^10.0.2",
|
|
135
135
|
"datastore-level": "^11.0.3",
|
|
@@ -164,5 +164,5 @@
|
|
|
164
164
|
"beacon",
|
|
165
165
|
"blockchain"
|
|
166
166
|
],
|
|
167
|
-
"gitHead": "
|
|
167
|
+
"gitHead": "cfd95d996856958c7910c8bc715561824fc0945f"
|
|
168
168
|
}
|