@chainsafe/lodestar 1.43.0 → 1.44.0-dev.552cdce8d0

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/.git-data.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "branch": "HEAD",
3
- "commit": "5cb87b7632ff76f9f93947147967618b26da2d0c"
2
+ "branch": "unstable",
3
+ "commit": "552cdce8d02ac5ba902e8450573cc94d2d8d23b0"
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cmds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAO/C,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAMtF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cmds/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAM/C,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAKtF,CAAC"}
package/lib/cmds/index.js CHANGED
@@ -1,12 +1,10 @@
1
1
  import { beacon } from "./beacon/index.js";
2
2
  import { bootnode } from "./bootnode/index.js";
3
3
  import { dev } from "./dev/index.js";
4
- import { lightclient } from "./lightclient/index.js";
5
4
  import { validator } from "./validator/index.js";
6
5
  export const cmds = [
7
6
  beacon,
8
7
  validator,
9
- lightclient,
10
8
  dev,
11
9
  bootnode,
12
10
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cmds/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAE/C,MAAM,CAAC,MAAM,IAAI,GAA0E;IACzF,MAAM;IACN,SAAS;IACT,WAAW;IACX,GAAG;IACH,QAAQ;CACT,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cmds/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAC,GAAG,EAAC,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAE/C,MAAM,CAAC,MAAM,IAAI,GAA0E;IACzF,MAAM;IACN,SAAS;IACT,GAAG;IACH,QAAQ;CACT,CAAC"}
package/lib/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainsafe/lodestar",
3
- "version": "1.43.0",
3
+ "version": "1.44.0-dev.552cdce8d0",
4
4
  "description": "Command line interface for lodestar",
5
5
  "author": "ChainSafe Systems",
6
6
  "license": "Apache-2.0",
@@ -69,17 +69,16 @@
69
69
  "@libp2p/crypto": "^5.1.13",
70
70
  "@libp2p/interface": "^3.1.0",
71
71
  "@libp2p/peer-id": "^6.0.4",
72
- "@lodestar/api": "^1.43.0",
73
- "@lodestar/beacon-node": "^1.43.0",
74
- "@lodestar/config": "^1.43.0",
75
- "@lodestar/db": "^1.43.0",
76
- "@lodestar/light-client": "^1.43.0",
77
- "@lodestar/logger": "^1.43.0",
78
- "@lodestar/params": "^1.43.0",
79
- "@lodestar/state-transition": "^1.43.0",
80
- "@lodestar/types": "^1.43.0",
81
- "@lodestar/utils": "^1.43.0",
82
- "@lodestar/validator": "^1.43.0",
72
+ "@lodestar/api": "^1.44.0-dev.552cdce8d0",
73
+ "@lodestar/beacon-node": "^1.44.0-dev.552cdce8d0",
74
+ "@lodestar/config": "^1.44.0-dev.552cdce8d0",
75
+ "@lodestar/db": "^1.44.0-dev.552cdce8d0",
76
+ "@lodestar/logger": "^1.44.0-dev.552cdce8d0",
77
+ "@lodestar/params": "^1.44.0-dev.552cdce8d0",
78
+ "@lodestar/state-transition": "^1.44.0-dev.552cdce8d0",
79
+ "@lodestar/types": "^1.44.0-dev.552cdce8d0",
80
+ "@lodestar/utils": "^1.44.0-dev.552cdce8d0",
81
+ "@lodestar/validator": "^1.44.0-dev.552cdce8d0",
83
82
  "@multiformats/multiaddr": "^13.0.1",
84
83
  "deepmerge": "^4.3.1",
85
84
  "ethers": "^6.7.0",
@@ -96,7 +95,7 @@
96
95
  "devDependencies": {
97
96
  "@chainsafe/as-sha256": "^1.2.0",
98
97
  "@ethereumjs/rlp": "^4.0.1",
99
- "@lodestar/test-utils": "^1.43.0",
98
+ "@lodestar/test-utils": "^1.44.0-dev.552cdce8d0",
100
99
  "@types/debug": "^4.1.7",
101
100
  "@types/inquirer": "^9.0.3",
102
101
  "@types/js-yaml": "^4.0.5",
@@ -109,5 +108,5 @@
109
108
  "web3": "^4.0.3",
110
109
  "web3-eth-accounts": "^4.0.3"
111
110
  },
112
- "gitHead": "5cb87b7632ff76f9f93947147967618b26da2d0c"
111
+ "gitHead": "fed08b6217ae9e76ec2ce7b28016620c41faba4f"
113
112
  }
package/src/cmds/index.ts CHANGED
@@ -3,13 +3,11 @@ import {GlobalArgs} from "../options/index.js";
3
3
  import {beacon} from "./beacon/index.js";
4
4
  import {bootnode} from "./bootnode/index.js";
5
5
  import {dev} from "./dev/index.js";
6
- import {lightclient} from "./lightclient/index.js";
7
6
  import {validator} from "./validator/index.js";
8
7
 
9
8
  export const cmds: Required<CliCommand<GlobalArgs, Record<never, never>>>["subcommands"] = [
10
9
  beacon,
11
10
  validator,
12
- lightclient,
13
11
  dev,
14
12
  bootnode,
15
13
  ];
@@ -1,4 +0,0 @@
1
- import { GlobalArgs } from "../../options/index.js";
2
- import { ILightClientArgs } from "./options.js";
3
- export declare function lightclientHandler(args: ILightClientArgs & GlobalArgs): Promise<void>;
4
- //# sourceMappingURL=handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/cmds/lightclient/handler.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAGlD,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB3F"}
@@ -1,28 +0,0 @@
1
- import path from "node:path";
2
- import { getClient } from "@lodestar/api";
3
- import { Lightclient } from "@lodestar/light-client";
4
- import { LightClientRestTransport } from "@lodestar/light-client/transport";
5
- import { getNodeLogger } from "@lodestar/logger/node";
6
- import { fromHex } from "@lodestar/utils";
7
- import { getBeaconConfigFromArgs } from "../../config/beaconParams.js";
8
- import { getGlobalPaths } from "../../paths/global.js";
9
- import { parseLoggerArgs } from "../../util/logger.js";
10
- export async function lightclientHandler(args) {
11
- const { config, network } = getBeaconConfigFromArgs(args);
12
- const globalPaths = getGlobalPaths(args, network);
13
- const logger = getNodeLogger(parseLoggerArgs(args, { defaultLogFilepath: path.join(globalPaths.dataDir, "lightclient.log") }, config));
14
- const api = getClient({ baseUrl: args.beaconApiUrl }, { config });
15
- const { genesisTime, genesisValidatorsRoot } = (await api.beacon.getGenesis()).value();
16
- const client = await Lightclient.initializeFromCheckpointRoot({
17
- config,
18
- logger,
19
- genesisData: {
20
- genesisTime,
21
- genesisValidatorsRoot,
22
- },
23
- checkpointRoot: fromHex(args.checkpointRoot),
24
- transport: new LightClientRestTransport(api),
25
- });
26
- void client.start();
27
- }
28
- //# sourceMappingURL=handler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/cmds/lightclient/handler.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AACxC,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAC,wBAAwB,EAAC,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAGrD,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAmC,EAAiB;IAC3F,MAAM,EAAC,MAAM,EAAE,OAAO,EAAC,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,aAAa,CAC1B,eAAe,CAAC,IAAI,EAAE,EAAC,kBAAkB,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,iBAAiB,CAAC,EAAC,EAAE,MAAM,CAAC,CACvG,CAAC;IAEF,MAAM,GAAG,GAAG,SAAS,CAAC,EAAC,OAAO,EAAE,IAAI,CAAC,YAAY,EAAC,EAAE,EAAC,MAAM,EAAC,CAAC,CAAC;IAC9D,MAAM,EAAC,WAAW,EAAE,qBAAqB,EAAC,GAAG,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAErF,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,4BAA4B,CAAC;QAC5D,MAAM;QACN,MAAM;QACN,WAAW,EAAE;YACX,WAAW;YACX,qBAAqB;SACtB;QACD,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC;QAC5C,SAAS,EAAE,IAAI,wBAAwB,CAAC,GAAG,CAAC;KAC7C,CAAC,CAAC;IAEH,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC;AAAA,CACrB"}
@@ -1,5 +0,0 @@
1
- import { CliCommand } from "@lodestar/utils";
2
- import { GlobalArgs } from "../../options/index.js";
3
- import { ILightClientArgs } from "./options.js";
4
- export declare const lightclient: CliCommand<ILightClientArgs, GlobalArgs>;
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmds/lightclient/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAC,gBAAgB,EAAqB,MAAM,cAAc,CAAC;AAElE,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,gBAAgB,EAAE,UAAU,CAYhE,CAAC"}
@@ -1,16 +0,0 @@
1
- import { lightclientHandler } from "./handler.js";
2
- import { lightclientOptions } from "./options.js";
3
- export const lightclient = {
4
- command: "lightclient",
5
- describe: "Run lightclient",
6
- docsFolder: "libraries/lightclient-prover",
7
- examples: [
8
- {
9
- command: "lightclient --network hoodi",
10
- description: "Run lightclient with hoodi network",
11
- },
12
- ],
13
- options: lightclientOptions,
14
- handler: lightclientHandler,
15
- };
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cmds/lightclient/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAChD,OAAO,EAAmB,kBAAkB,EAAC,MAAM,cAAc,CAAC;AAElE,MAAM,CAAC,MAAM,WAAW,GAA6C;IACnE,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,iBAAiB;IAC3B,UAAU,EAAE,8BAA8B;IAC1C,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,6BAA6B;YACtC,WAAW,EAAE,oCAAoC;SAClD;KACF;IACD,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,kBAAkB;CAC5B,CAAC"}
@@ -1,8 +0,0 @@
1
- import { CliCommandOptions } from "@lodestar/utils";
2
- import { LogArgs } from "../../options/logOptions.js";
3
- export type ILightClientArgs = LogArgs & {
4
- beaconApiUrl: string;
5
- checkpointRoot: string;
6
- };
7
- export declare const lightclientOptions: CliCommandOptions<ILightClientArgs>;
8
- //# sourceMappingURL=options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cmds/lightclient/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAC,OAAO,EAAa,MAAM,6BAA6B,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,gBAAgB,CAYlE,CAAC"}
@@ -1,15 +0,0 @@
1
- import { logOptions } from "../../options/logOptions.js";
2
- export const lightclientOptions = {
3
- ...logOptions,
4
- beaconApiUrl: {
5
- description: "Url to a beacon node that support lightclient API",
6
- type: "string",
7
- demandOption: true,
8
- },
9
- checkpointRoot: {
10
- description: "Checkpoint root hex string to sync the lightclient from, start with 0x",
11
- type: "string",
12
- demandOption: true,
13
- },
14
- };
15
- //# sourceMappingURL=options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/cmds/lightclient/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAOhE,MAAM,CAAC,MAAM,kBAAkB,GAAwC;IACrE,GAAG,UAAU;IACb,YAAY,EAAE;QACZ,WAAW,EAAE,mDAAmD;QAChE,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI;KACnB;IACD,cAAc,EAAE;QACd,WAAW,EAAE,wEAAwE;QACrF,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI;KACnB;CACF,CAAC"}
@@ -1,36 +0,0 @@
1
- import path from "node:path";
2
- import {getClient} from "@lodestar/api";
3
- import {Lightclient} from "@lodestar/light-client";
4
- import {LightClientRestTransport} from "@lodestar/light-client/transport";
5
- import {getNodeLogger} from "@lodestar/logger/node";
6
- import {fromHex} from "@lodestar/utils";
7
- import {getBeaconConfigFromArgs} from "../../config/beaconParams.js";
8
- import {GlobalArgs} from "../../options/index.js";
9
- import {getGlobalPaths} from "../../paths/global.js";
10
- import {parseLoggerArgs} from "../../util/logger.js";
11
- import {ILightClientArgs} from "./options.js";
12
-
13
- export async function lightclientHandler(args: ILightClientArgs & GlobalArgs): Promise<void> {
14
- const {config, network} = getBeaconConfigFromArgs(args);
15
- const globalPaths = getGlobalPaths(args, network);
16
-
17
- const logger = getNodeLogger(
18
- parseLoggerArgs(args, {defaultLogFilepath: path.join(globalPaths.dataDir, "lightclient.log")}, config)
19
- );
20
-
21
- const api = getClient({baseUrl: args.beaconApiUrl}, {config});
22
- const {genesisTime, genesisValidatorsRoot} = (await api.beacon.getGenesis()).value();
23
-
24
- const client = await Lightclient.initializeFromCheckpointRoot({
25
- config,
26
- logger,
27
- genesisData: {
28
- genesisTime,
29
- genesisValidatorsRoot,
30
- },
31
- checkpointRoot: fromHex(args.checkpointRoot),
32
- transport: new LightClientRestTransport(api),
33
- });
34
-
35
- void client.start();
36
- }
@@ -1,18 +0,0 @@
1
- import {CliCommand} from "@lodestar/utils";
2
- import {GlobalArgs} from "../../options/index.js";
3
- import {lightclientHandler} from "./handler.js";
4
- import {ILightClientArgs, lightclientOptions} from "./options.js";
5
-
6
- export const lightclient: CliCommand<ILightClientArgs, GlobalArgs> = {
7
- command: "lightclient",
8
- describe: "Run lightclient",
9
- docsFolder: "libraries/lightclient-prover",
10
- examples: [
11
- {
12
- command: "lightclient --network hoodi",
13
- description: "Run lightclient with hoodi network",
14
- },
15
- ],
16
- options: lightclientOptions,
17
- handler: lightclientHandler,
18
- };
@@ -1,21 +0,0 @@
1
- import {CliCommandOptions} from "@lodestar/utils";
2
- import {LogArgs, logOptions} from "../../options/logOptions.js";
3
-
4
- export type ILightClientArgs = LogArgs & {
5
- beaconApiUrl: string;
6
- checkpointRoot: string;
7
- };
8
-
9
- export const lightclientOptions: CliCommandOptions<ILightClientArgs> = {
10
- ...logOptions,
11
- beaconApiUrl: {
12
- description: "Url to a beacon node that support lightclient API",
13
- type: "string",
14
- demandOption: true,
15
- },
16
- checkpointRoot: {
17
- description: "Checkpoint root hex string to sync the lightclient from, start with 0x",
18
- type: "string",
19
- demandOption: true,
20
- },
21
- };