@lodestar/beacon-node 1.46.0-dev.cdb6b1a0d2 → 1.46.0-dev.d9065a2b16

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 (87) hide show
  1. package/lib/api/impl/config/constants.d.ts +1 -0
  2. package/lib/api/impl/config/constants.d.ts.map +1 -1
  3. package/lib/api/impl/config/constants.js +2 -1
  4. package/lib/api/impl/config/constants.js.map +1 -1
  5. package/lib/api/impl/lodestar/index.d.ts.map +1 -1
  6. package/lib/api/impl/lodestar/index.js +2 -3
  7. package/lib/api/impl/lodestar/index.js.map +1 -1
  8. package/lib/chain/archiveStore/archiveStore.d.ts.map +1 -1
  9. package/lib/chain/archiveStore/archiveStore.js +17 -3
  10. package/lib/chain/archiveStore/archiveStore.js.map +1 -1
  11. package/lib/chain/archiveStore/historicalState/historicalStateRegen.d.ts.map +1 -1
  12. package/lib/chain/archiveStore/historicalState/historicalStateRegen.js +0 -1
  13. package/lib/chain/archiveStore/historicalState/historicalStateRegen.js.map +1 -1
  14. package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js +1 -1
  15. package/lib/chain/blocks/verifyExecutionPayloadEnvelope.js.map +1 -1
  16. package/lib/chain/bls/multithread/index.d.ts.map +1 -1
  17. package/lib/chain/bls/multithread/index.js +0 -1
  18. package/lib/chain/bls/multithread/index.js.map +1 -1
  19. package/lib/chain/chain.d.ts.map +1 -1
  20. package/lib/chain/chain.js +26 -44
  21. package/lib/chain/chain.js.map +1 -1
  22. package/lib/chain/opPools/aggregatedAttestationPool.d.ts.map +1 -1
  23. package/lib/chain/opPools/aggregatedAttestationPool.js +2 -1
  24. package/lib/chain/opPools/aggregatedAttestationPool.js.map +1 -1
  25. package/lib/chain/produceBlock/produceBlockBody.js +1 -1
  26. package/lib/chain/produceBlock/produceBlockBody.js.map +1 -1
  27. package/lib/chain/validation/blobSidecar.js +1 -1
  28. package/lib/chain/validation/executionPayloadBid.d.ts +5 -0
  29. package/lib/chain/validation/executionPayloadBid.d.ts.map +1 -1
  30. package/lib/chain/validation/executionPayloadBid.js +30 -2
  31. package/lib/chain/validation/executionPayloadBid.js.map +1 -1
  32. package/lib/chain/validation/proposerPreferences.js +8 -8
  33. package/lib/chain/validation/proposerPreferences.js.map +1 -1
  34. package/lib/chain/validatorMonitor.js +1 -1
  35. package/lib/chain/validatorMonitor.js.map +1 -1
  36. package/lib/metrics/nodeJsMetrics.js +1 -1
  37. package/lib/metrics/nodeJsMetrics.js.map +1 -1
  38. package/lib/network/core/networkCoreWorkerHandler.d.ts.map +1 -1
  39. package/lib/network/core/networkCoreWorkerHandler.js +2 -7
  40. package/lib/network/core/networkCoreWorkerHandler.js.map +1 -1
  41. package/lib/network/discv5/index.d.ts.map +1 -1
  42. package/lib/network/discv5/index.js +1 -4
  43. package/lib/network/discv5/index.js.map +1 -1
  44. package/lib/network/gossip/topic.d.ts +2 -2
  45. package/lib/network/libp2p/index.d.ts.map +1 -1
  46. package/lib/network/libp2p/index.js +2 -9
  47. package/lib/network/libp2p/index.js.map +1 -1
  48. package/lib/network/peers/datastore.d.ts +1 -1
  49. package/lib/network/peers/datastore.d.ts.map +1 -1
  50. package/lib/network/peers/datastore.js +1 -1
  51. package/lib/network/peers/datastore.js.map +1 -1
  52. package/lib/util/profile.d.ts +3 -0
  53. package/lib/util/profile.d.ts.map +1 -1
  54. package/lib/util/profile.js +1 -27
  55. package/lib/util/profile.js.map +1 -1
  56. package/lib/util/sszBytes.js +1 -1
  57. package/package.json +25 -36
  58. package/src/api/impl/config/constants.ts +2 -0
  59. package/src/api/impl/lodestar/index.ts +2 -3
  60. package/src/chain/archiveStore/archiveStore.ts +20 -3
  61. package/src/chain/archiveStore/historicalState/historicalStateRegen.ts +0 -1
  62. package/src/chain/blocks/verifyExecutionPayloadEnvelope.ts +1 -1
  63. package/src/chain/bls/multithread/index.ts +0 -1
  64. package/src/chain/chain.ts +33 -49
  65. package/src/chain/opPools/aggregatedAttestationPool.ts +3 -1
  66. package/src/chain/produceBlock/produceBlockBody.ts +1 -1
  67. package/src/chain/validation/blobSidecar.ts +1 -1
  68. package/src/chain/validation/executionPayloadBid.ts +32 -2
  69. package/src/chain/validation/proposerPreferences.ts +8 -8
  70. package/src/chain/validatorMonitor.ts +1 -1
  71. package/src/metrics/nodeJsMetrics.ts +1 -1
  72. package/src/network/core/networkCoreWorkerHandler.ts +2 -6
  73. package/src/network/discv5/index.ts +1 -4
  74. package/src/network/libp2p/index.ts +2 -10
  75. package/src/network/peers/datastore.ts +1 -1
  76. package/src/util/profile.ts +1 -31
  77. package/src/util/sszBytes.ts +1 -1
  78. package/lib/bun-wrappers/prometheus-gc-stats.d.ts +0 -2
  79. package/lib/bun-wrappers/prometheus-gc-stats.d.ts.map +0 -1
  80. package/lib/bun-wrappers/prometheus-gc-stats.js +0 -8
  81. package/lib/bun-wrappers/prometheus-gc-stats.js.map +0 -1
  82. package/lib/network/peers/datastore_bun.d.ts +0 -3
  83. package/lib/network/peers/datastore_bun.d.ts.map +0 -1
  84. package/lib/network/peers/datastore_bun.js +0 -3
  85. package/lib/network/peers/datastore_bun.js.map +0 -1
  86. package/src/bun-wrappers/prometheus-gc-stats.ts +0 -7
  87. package/src/network/peers/datastore_bun.ts +0 -3
@@ -8,21 +8,10 @@ export enum ProfileThread {
8
8
  DISC5 = "discv5",
9
9
  }
10
10
 
11
- /**
12
- * The time to take a Bun profile.
13
- * If we increase this time it'll potentiall cause the app to crash.
14
- * If we decrease this time, profile recorded will be fragmented and hard to analyze.
15
- */
16
- const BUN_PROFILE_MS = 3 * 1000;
17
-
18
- export async function profileThread(thread: ProfileThread, durationMs: number, dirpath: string): Promise<string> {
19
- return globalThis.Bun ? profileBun(thread, durationMs) : profileNodeJS(thread, durationMs, dirpath);
20
- }
21
-
22
11
  /**
23
12
  * Take `durationMs` profile of the current thread and return the persisted file path.
24
13
  */
25
- async function profileNodeJS(thread: ProfileThread, durationMs: number, dirpath: string): Promise<string> {
14
+ export async function profileThread(thread: ProfileThread, durationMs: number, dirpath: string): Promise<string> {
26
15
  const inspector = await import("node:inspector");
27
16
 
28
17
  // due to some typing issues, not able to use promisify here
@@ -54,25 +43,6 @@ async function profileNodeJS(thread: ProfileThread, durationMs: number, dirpath:
54
43
  return filePath;
55
44
  }
56
45
 
57
- /**
58
- * Unlike NodeJS, Bun console.profile() api flush data to the inspector,
59
- * so this api returns ms taken of this profile instead of file path.
60
- */
61
- async function profileBun(thread: ProfileThread, durationMs: number): Promise<string> {
62
- const start = Date.now();
63
- let now = Date.now();
64
- while (now - start < durationMs) {
65
- // biome-ignore lint/suspicious/noConsole: need to use console api to profile in Bun
66
- console.profile(String(now));
67
- await sleep(BUN_PROFILE_MS);
68
- // biome-ignore lint/suspicious/noConsole: need to use console api to profile in Bun
69
- console.profileEnd(String(now));
70
- now = Date.now();
71
- }
72
-
73
- return `Successfully take Bun ${thread} thread profile in ${now - start}ms. Check your inspector to see the profile.`;
74
- }
75
-
76
46
  /**
77
47
  * Write heap snapshot of the current thread to the specified file.
78
48
  */
@@ -706,7 +706,7 @@ export function getBlockRootFromPayloadAttestationMessageSerialized(data: Uint8A
706
706
  * blockHash: Bytes32 (32 bytes)
707
707
  * prevRandao: Bytes32 (32 bytes)
708
708
  * feeRecipient: ExecutionAddress(20 bytes)
709
- * gasLimit: UintNum64 (8 bytes)
709
+ * gasLimit: UintBn64 (8 bytes)
710
710
  * builderIndex: BuilderIndex (8 bytes)
711
711
  * slot: Slot (8 bytes) ← absolute offset 264
712
712
  */
@@ -1,2 +0,0 @@
1
- export declare function gcStats(): () => void;
2
- //# sourceMappingURL=prometheus-gc-stats.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prometheus-gc-stats.d.ts","sourceRoot":"","sources":["../../src/bun-wrappers/prometheus-gc-stats.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,eAEtB"}
@@ -1,8 +0,0 @@
1
- // Bun does not support `GCProfiler` from `node:v8`a
2
- // Which is exposed from `@chainsafe/prometheus-gc-stats` and used in `packages/beacon-node/src/metrics/nodeJsMetrics.ts`
3
- // So we expose a dummy function for Bun runtime which do nothing for now
4
- // TODO: May look get some useful data from `bun:jsc`
5
- export function gcStats() {
6
- return () => { };
7
- }
8
- //# sourceMappingURL=prometheus-gc-stats.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prometheus-gc-stats.js","sourceRoot":"","sources":["../../src/bun-wrappers/prometheus-gc-stats.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,yHAAyH;AACzH,yEAAyE;AACzE,qDAAqD;AACrD,MAAM,UAAU,OAAO,GAAG;IACxB,OAAO,GAAG,EAAE,CAAC,EAAC,CAAC,CAAC;AAAA,CACjB"}
@@ -1,3 +0,0 @@
1
- import { FsDatastore } from "datastore-fs";
2
- export declare const LevelDatastore: typeof FsDatastore;
3
- //# sourceMappingURL=datastore_bun.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datastore_bun.d.ts","sourceRoot":"","sources":["../../../src/network/peers/datastore_bun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,cAAc,oBAAc,CAAC"}
@@ -1,3 +0,0 @@
1
- import { FsDatastore } from "datastore-fs";
2
- export const LevelDatastore = FsDatastore;
3
- //# sourceMappingURL=datastore_bun.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datastore_bun.js","sourceRoot":"","sources":["../../../src/network/peers/datastore_bun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAC"}
@@ -1,7 +0,0 @@
1
- // Bun does not support `GCProfiler` from `node:v8`a
2
- // Which is exposed from `@chainsafe/prometheus-gc-stats` and used in `packages/beacon-node/src/metrics/nodeJsMetrics.ts`
3
- // So we expose a dummy function for Bun runtime which do nothing for now
4
- // TODO: May look get some useful data from `bun:jsc`
5
- export function gcStats() {
6
- return () => {};
7
- }
@@ -1,3 +0,0 @@
1
- import {FsDatastore} from "datastore-fs";
2
-
3
- export const LevelDatastore = FsDatastore;