@chainsafe/lodestar 1.51.0-dev.f33a955402 → 1.51.0-dev.f41cd750ac

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 (72) hide show
  1. package/.git-data.json +1 -1
  2. package/README.md +9 -7
  3. package/lib/cmds/beacon/handler.d.ts.map +1 -1
  4. package/lib/cmds/beacon/handler.js +3 -3
  5. package/lib/cmds/beacon/handler.js.map +1 -1
  6. package/lib/cmds/beacon/initBeaconState.d.ts.map +1 -1
  7. package/lib/cmds/beacon/initBeaconState.js +1 -1
  8. package/lib/cmds/beacon/initBeaconState.js.map +1 -1
  9. package/lib/cmds/beacon/pubkeysFile.d.ts +1 -1
  10. package/lib/cmds/beacon/pubkeysFile.d.ts.map +1 -1
  11. package/lib/cmds/builder/loadKeypair.d.ts.map +1 -1
  12. package/lib/cmds/builder/loadKeypair.js +1 -1
  13. package/lib/cmds/builder/loadKeypair.js.map +1 -1
  14. package/lib/cmds/dev/handler.js +6 -6
  15. package/lib/cmds/dev/handler.js.map +1 -1
  16. package/lib/cmds/dev/options.d.ts.map +1 -1
  17. package/lib/cmds/dev/options.js +1 -3
  18. package/lib/cmds/dev/options.js.map +1 -1
  19. package/lib/cmds/validator/blsToExecutionChange.js +1 -1
  20. package/lib/cmds/validator/blsToExecutionChange.js.map +1 -1
  21. package/lib/cmds/validator/keymanager/decryptKeystoreDefinitions.js +1 -1
  22. package/lib/cmds/validator/keymanager/decryptKeystoreDefinitions.js.map +1 -1
  23. package/lib/cmds/validator/keymanager/decryptKeystores/threadPool.d.ts +1 -1
  24. package/lib/cmds/validator/keymanager/decryptKeystores/threadPool.d.ts.map +1 -1
  25. package/lib/cmds/validator/keymanager/decryptKeystores/threadPool.js.map +1 -1
  26. package/lib/cmds/validator/keymanager/impl.d.ts.map +1 -1
  27. package/lib/cmds/validator/keymanager/impl.js +1 -1
  28. package/lib/cmds/validator/keymanager/impl.js.map +1 -1
  29. package/lib/cmds/validator/keymanager/keystoreCache.js +1 -1
  30. package/lib/cmds/validator/keymanager/keystoreCache.js.map +1 -1
  31. package/lib/cmds/validator/keymanager/persistedKeys.d.ts +1 -1
  32. package/lib/cmds/validator/keymanager/persistedKeys.d.ts.map +1 -1
  33. package/lib/cmds/validator/keymanager/persistedKeys.js +1 -1
  34. package/lib/cmds/validator/keymanager/persistedKeys.js.map +1 -1
  35. package/lib/cmds/validator/options.d.ts.map +1 -1
  36. package/lib/cmds/validator/options.js +3 -9
  37. package/lib/cmds/validator/options.js.map +1 -1
  38. package/lib/cmds/validator/signers/index.js +1 -1
  39. package/lib/cmds/validator/signers/index.js.map +1 -1
  40. package/lib/cmds/validator/slashingProtection/export.d.ts.map +1 -1
  41. package/lib/cmds/validator/slashingProtection/export.js +1 -3
  42. package/lib/cmds/validator/slashingProtection/export.js.map +1 -1
  43. package/lib/cmds/validator/slashingProtection/import.js +2 -2
  44. package/lib/cmds/validator/slashingProtection/import.js.map +1 -1
  45. package/lib/cmds/validator/voluntaryExit.d.ts.map +1 -1
  46. package/lib/cmds/validator/voluntaryExit.js +2 -4
  47. package/lib/cmds/validator/voluntaryExit.js.map +1 -1
  48. package/lib/util/file.d.ts.map +1 -1
  49. package/lib/util/file.js +3 -2
  50. package/lib/util/file.js.map +1 -1
  51. package/lib/util/format.js +1 -1
  52. package/lib/util/format.js.map +1 -1
  53. package/package.json +15 -16
  54. package/src/cmds/beacon/handler.ts +3 -3
  55. package/src/cmds/beacon/initBeaconState.ts +1 -1
  56. package/src/cmds/beacon/pubkeysFile.ts +1 -1
  57. package/src/cmds/builder/loadKeypair.ts +1 -1
  58. package/src/cmds/dev/handler.ts +6 -6
  59. package/src/cmds/dev/options.ts +1 -3
  60. package/src/cmds/validator/blsToExecutionChange.ts +1 -1
  61. package/src/cmds/validator/keymanager/decryptKeystoreDefinitions.ts +1 -1
  62. package/src/cmds/validator/keymanager/decryptKeystores/threadPool.ts +1 -1
  63. package/src/cmds/validator/keymanager/impl.ts +1 -1
  64. package/src/cmds/validator/keymanager/keystoreCache.ts +1 -1
  65. package/src/cmds/validator/keymanager/persistedKeys.ts +1 -1
  66. package/src/cmds/validator/options.ts +3 -9
  67. package/src/cmds/validator/signers/index.ts +1 -1
  68. package/src/cmds/validator/slashingProtection/export.ts +1 -3
  69. package/src/cmds/validator/slashingProtection/import.ts +2 -2
  70. package/src/cmds/validator/voluntaryExit.ts +2 -4
  71. package/src/util/file.ts +3 -2
  72. package/src/util/format.ts +1 -1
@@ -42,9 +42,7 @@ export const exportCmd: CliCommand<ExportArgs, ISlashingProtectionArgs & Account
42
42
  string: true, // Ensures the pubkey string is not automatically converted to numbers
43
43
  coerce: (pubkeys: string[]): string[] =>
44
44
  // Parse ["0x11,0x22"] to ["0x11", "0x22"]
45
- pubkeys
46
- .flatMap((item) => item.split(","))
47
- .map(ensure0xPrefix),
45
+ pubkeys.flatMap((item) => item.split(",")).map(ensure0xPrefix),
48
46
  },
49
47
  },
50
48
 
@@ -1,4 +1,4 @@
1
- import fs from "node:fs";
1
+ import {readFile} from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import {getNodeLogger} from "@lodestar/logger/node";
4
4
  import {CliCommand} from "@lodestar/utils";
@@ -61,7 +61,7 @@ export const importCmd: CliCommand<ImportArgs, ISlashingProtectionArgs & Account
61
61
  (await metadata.getGenesisValidatorsRoot()) ?? (await getGenesisValidatorsRoot(args));
62
62
 
63
63
  logger.verbose("Reading slashing protection data", {file});
64
- const interchangeStr = await fs.promises.readFile(file, "utf8");
64
+ const interchangeStr = await readFile(file, "utf8");
65
65
  const interchangeJson = JSON.parse(interchangeStr) as Interchange;
66
66
 
67
67
  await slashingProtection.importInterchange(interchangeJson, genesisValidatorsRoot, logger);
@@ -1,9 +1,9 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import inquirer from "inquirer";
4
- import {Signature} from "@chainsafe/lodestar-z/blst";
5
4
  import {ApiClient, getClient} from "@lodestar/api";
6
5
  import {BeaconConfig, createBeaconConfig} from "@lodestar/config";
6
+ import {Signature} from "@lodestar/native/blst";
7
7
  import {
8
8
  computeEpochAtSlot,
9
9
  computeSigningRoot,
@@ -59,9 +59,7 @@ If no `pubkeys` are provided, it will exit all validators that have been importe
59
59
  string: true, // Ensures the pubkey string is not automatically converted to numbers
60
60
  coerce: (pubkeys: string[]): string[] =>
61
61
  // Parse ["0x11,0x22"] to ["0x11", "0x22"]
62
- pubkeys
63
- .flatMap((item) => item.split(","))
64
- .map(ensure0xPrefix),
62
+ pubkeys.flatMap((item) => item.split(",")).map(ensure0xPrefix),
65
63
  },
66
64
 
67
65
  yes: {
package/src/util/file.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import fs from "node:fs";
2
+ import {copyFile, readFile as fsReadFile} from "node:fs/promises";
2
3
  import path from "node:path";
3
4
  import {Readable} from "node:stream";
4
5
  import stream from "node:stream/promises";
@@ -120,7 +121,7 @@ export async function downloadOrCopyFile(pathDest: string, urlOrPathSrc: string)
120
121
  await downloadFile(pathDest, urlOrPathSrc);
121
122
  } else {
122
123
  mkdir(path.dirname(pathDest));
123
- await fs.promises.copyFile(urlOrPathSrc, pathDest);
124
+ await copyFile(urlOrPathSrc, pathDest);
124
125
  }
125
126
  }
126
127
 
@@ -159,7 +160,7 @@ export async function downloadOrLoadFile(pathOrUrl: string): Promise<Uint8Array>
159
160
  const arrayBuffer = await res.arrayBuffer();
160
161
  return new Uint8Array(arrayBuffer);
161
162
  }
162
- return fs.promises.readFile(pathOrUrl);
163
+ return fsReadFile(pathOrUrl);
163
164
  }
164
165
 
165
166
  /**
@@ -1,4 +1,4 @@
1
- import {PublicKey} from "@chainsafe/lodestar-z/blst";
1
+ import {PublicKey} from "@lodestar/native/blst";
2
2
  import {fromHex} from "@lodestar/utils";
3
3
 
4
4
  /**