@lodestar/prover 1.16.0 → 1.17.0-dev.8943ab686d
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/cli/cli.js +1 -1
- package/lib/cli/cli.js.map +1 -1
- package/lib/cli/cmds/index.d.ts +1 -1
- package/lib/cli/cmds/start/index.d.ts +1 -1
- package/lib/cli/cmds/start/options.d.ts +2 -2
- package/lib/cli/cmds/start/options.js +5 -2
- package/lib/cli/cmds/start/options.js.map +1 -1
- package/lib/cli/options.d.ts +3 -4
- package/lib/cli/options.js +8 -4
- package/lib/cli/options.js.map +1 -1
- package/package.json +10 -10
- package/lib/utils/command.d.ts +0 -30
- package/lib/utils/command.js +0 -26
- package/lib/utils/command.js.map +0 -1
package/lib/cli/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Must not use `* as yargs`, see https://github.com/yargs/yargs/issues/1131
|
|
2
2
|
import yargs from "yargs";
|
|
3
3
|
import { hideBin } from "yargs/helpers";
|
|
4
|
-
import { registerCommandToYargs } from "
|
|
4
|
+
import { registerCommandToYargs } from "@lodestar/utils";
|
|
5
5
|
import { getVersionData } from "../utils/version.js";
|
|
6
6
|
import { cmds, proverProxyStartCommand } from "./cmds/index.js";
|
|
7
7
|
import { globalOptions } from "./options.js";
|
package/lib/cli/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,EAAC,sBAAsB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli/cli.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EA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AAE,EAAC,GAAG,uBAAuB,EAAE,OAAO,EAAE,GAAG,EAAC,CAAC,CAAC;IAE3E,+CAA+C;IAC/C,MAAM,CAAC,iBAAiB,EAAE,CAAC,MAAM,EAAE,CAAC;IAEpC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/lib/cli/cmds/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliCommand } from "
|
|
1
|
+
import { CliCommand } from "@lodestar/utils";
|
|
2
2
|
import { GlobalArgs } from "../options.js";
|
|
3
3
|
export { proverProxyStartCommand } from "./start/index.js";
|
|
4
4
|
export declare const cmds: Required<CliCommand<GlobalArgs, Record<never, never>>>["subcommands"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliCommand } from "
|
|
1
|
+
import { CliCommand } from "@lodestar/utils";
|
|
2
2
|
import { GlobalArgs } from "../../options.js";
|
|
3
3
|
import { StartArgs } from "./options.js";
|
|
4
4
|
export declare const proverProxyStartCommand: CliCommand<StartArgs, GlobalArgs>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { CliCommandOptions } from "@lodestar/utils";
|
|
1
2
|
import { LCTransport } from "../../../interfaces.js";
|
|
2
|
-
import { CliCommandOptions } from "../../../utils/command.js";
|
|
3
3
|
export type StartArgs = {
|
|
4
4
|
port: number;
|
|
5
5
|
executionRpcUrl: string;
|
|
6
|
-
beaconUrls
|
|
6
|
+
beaconUrls: string[];
|
|
7
7
|
wsCheckpoint?: string;
|
|
8
8
|
unverifiedWhitelist?: string[];
|
|
9
9
|
requestTimeout: number;
|
|
@@ -28,9 +28,12 @@ export const startOptions = {
|
|
|
28
28
|
},
|
|
29
29
|
beaconUrls: {
|
|
30
30
|
description: "Urls of the beacon nodes to connect to.",
|
|
31
|
-
type: "
|
|
31
|
+
type: "array",
|
|
32
|
+
string: true,
|
|
33
|
+
coerce: (urls) =>
|
|
34
|
+
// Parse ["url1,url2"] to ["url1", "url2"]
|
|
35
|
+
urls.map((item) => item.split(",")).flat(),
|
|
32
36
|
demandOption: true,
|
|
33
|
-
array: true,
|
|
34
37
|
group: "beacon",
|
|
35
38
|
},
|
|
36
39
|
wsCheckpoint: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/cli/cmds/start/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/cli/cmds/start/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAmB/D,MAAM,CAAC,MAAM,YAAY,GAAiC;IACxD,IAAI,EAAE;QACJ,WAAW,EAAE,iCAAiC;QAC9C,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,IAAI;KACd;IAED,eAAe,EAAE;QACf,WAAW,EAAE,iCAAiC;QAC9C,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,WAAW;KACnB;IAED,mBAAmB,EAAE;QACnB,WAAW,EAAE,mFAAmF,oBAAoB,CAAC,IAAI,CACvH,GAAG,CACJ,sBAAsB;QACvB,IAAI,EAAE,OAAO;QACb,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,WAAW;KACnB;IAED,cAAc,EAAE;QACd,WAAW,EAAE,8DAA8D;QAC3E,OAAO,EAAE,6BAA6B;QACtC,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,WAAW;KACnB;IAED,UAAU,EAAE;QACV,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,CAAC,IAAc,EAAY,EAAE;QACnC,0CAA0C;QAC1C,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;QAC5C,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,QAAQ;KAChB;IAED,YAAY,EAAE;QACZ,WAAW,EACT,2KAA2K;QAC7K,IAAI,EAAE,QAAQ;QACd,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,IAAe;IAC5C,iFAAiF;IACjF,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,SAAS,EAAE,WAAW,CAAC,IAAI;QAC3B,IAAI,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;QAC7C,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,6BAA6B;KACrE,CAAC;AACJ,CAAC"}
|
package/lib/cli/options.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { NetworkName } from "@lodestar/config/networks";
|
|
2
|
-
import { LogLevel } from "@lodestar/utils";
|
|
3
|
-
import { CliCommandOptions } from "../utils/command.js";
|
|
2
|
+
import { CliCommandOptions, LogLevel } from "@lodestar/utils";
|
|
4
3
|
export type GlobalArgs = {
|
|
5
|
-
network
|
|
4
|
+
network?: string;
|
|
6
5
|
logLevel: string;
|
|
7
6
|
presetFile?: string;
|
|
8
7
|
preset: string;
|
|
9
|
-
paramsFile
|
|
8
|
+
paramsFile?: string;
|
|
10
9
|
};
|
|
11
10
|
export type GlobalOptions = {
|
|
12
11
|
logLevel: LogLevel;
|
package/lib/cli/options.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { networksChainConfig } from "@lodestar/config/networks";
|
|
2
2
|
import { LogLevels } from "@lodestar/utils";
|
|
3
3
|
import { ACTIVE_PRESET } from "@lodestar/params";
|
|
4
|
+
import { YargsError } from "../utils/errors.js";
|
|
4
5
|
export const globalOptions = {
|
|
5
6
|
network: {
|
|
6
7
|
description: "Specify the network to connect.",
|
|
@@ -42,9 +43,12 @@ export function parseGlobalArgs(args) {
|
|
|
42
43
|
logLevel: args.logLevel,
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
if (args.paramsFile) {
|
|
47
|
+
return {
|
|
48
|
+
logLevel: args.logLevel,
|
|
49
|
+
paramsFile: args.paramsFile,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
throw new YargsError("Either --network or --paramsFile must be provided");
|
|
49
53
|
}
|
|
50
54
|
//# sourceMappingURL=options.js.map
|
package/lib/cli/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAC3E,OAAO,
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/cli/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAA8B,SAAS,EAAC,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAc9C,MAAM,CAAC,MAAM,aAAa,GAAkC;IAC1D,OAAO,EAAE;QACP,WAAW,EAAE,iCAAiC;QAC9C,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC;YACnC,KAAK;SACN;QACD,SAAS,EAAE,CAAC,YAAY,CAAC;KAC1B;IAED,UAAU,EAAE;QACV,WAAW,EAAE,4BAA4B;QACzC,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,CAAC,SAAS,CAAC;KACvB;IAED,QAAQ,EAAE;QACR,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,MAAM;KAChB;IAED,uDAAuD;IACvD,MAAM,EAAE;QACN,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,aAAa;KACvB;IAED,UAAU,EAAE;QACV,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,4EAA4E;QACzF,IAAI,EAAE,QAAQ;KACf;CACF,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,IAAgB;IAC9C,iFAAiF;IACjF,IAAI,IAAI,CAAC,OAAO,EAAE;QAChB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAsB;YACpC,QAAQ,EAAE,IAAI,CAAC,QAAoB;SACpC,CAAC;KACH;IAED,IAAI,IAAI,CAAC,UAAU,EAAE;QACnB,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAoB;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;KACH;IAED,MAAM,IAAI,UAAU,CAAC,mDAAmD,CAAC,CAAC;AAC5E,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.
|
|
14
|
+
"version": "1.17.0-dev.8943ab686d",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"@ethereumjs/tx": "^4.1.2",
|
|
71
71
|
"@ethereumjs/util": "^8.0.6",
|
|
72
72
|
"@ethereumjs/vm": "^6.4.2",
|
|
73
|
-
"@lodestar/api": "
|
|
74
|
-
"@lodestar/config": "
|
|
75
|
-
"@lodestar/light-client": "
|
|
76
|
-
"@lodestar/logger": "
|
|
77
|
-
"@lodestar/params": "
|
|
78
|
-
"@lodestar/types": "
|
|
79
|
-
"@lodestar/utils": "
|
|
73
|
+
"@lodestar/api": "1.17.0-dev.8943ab686d",
|
|
74
|
+
"@lodestar/config": "1.17.0-dev.8943ab686d",
|
|
75
|
+
"@lodestar/light-client": "1.17.0-dev.8943ab686d",
|
|
76
|
+
"@lodestar/logger": "1.17.0-dev.8943ab686d",
|
|
77
|
+
"@lodestar/params": "1.17.0-dev.8943ab686d",
|
|
78
|
+
"@lodestar/types": "1.17.0-dev.8943ab686d",
|
|
79
|
+
"@lodestar/utils": "1.17.0-dev.8943ab686d",
|
|
80
80
|
"ethereum-cryptography": "^2.0.0",
|
|
81
81
|
"find-up": "^6.3.0",
|
|
82
82
|
"http-proxy": "^1.18.1",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"yargs": "^17.7.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@lodestar/test-utils": "
|
|
88
|
+
"@lodestar/test-utils": "1.17.0-dev.8943ab686d",
|
|
89
89
|
"@types/http-proxy": "^1.17.10",
|
|
90
90
|
"@types/yargs": "^17.0.24",
|
|
91
91
|
"axios": "^1.3.4",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"blockchain",
|
|
101
101
|
"prover"
|
|
102
102
|
],
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "900d7f55fb195b86ca1b855d60955370bca9e5e5"
|
|
104
104
|
}
|
package/lib/utils/command.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Options, Argv } from "yargs";
|
|
2
|
-
export interface CliExample {
|
|
3
|
-
command: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface CliOptionDefinition extends Options {
|
|
8
|
-
example?: CliExample;
|
|
9
|
-
}
|
|
10
|
-
export type CliCommandOptions<OwnArgs> = Required<{
|
|
11
|
-
[key in keyof OwnArgs]: CliOptionDefinition;
|
|
12
|
-
}>;
|
|
13
|
-
export interface CliCommand<OwnArgs = Record<never, never>, ParentArgs = Record<never, never>, R = any> {
|
|
14
|
-
command: string;
|
|
15
|
-
describe: string;
|
|
16
|
-
examples?: {
|
|
17
|
-
command: string;
|
|
18
|
-
description: string;
|
|
19
|
-
}[];
|
|
20
|
-
options?: CliCommandOptions<OwnArgs>;
|
|
21
|
-
subcommands?: CliCommand<any, OwnArgs & ParentArgs>[];
|
|
22
|
-
handler?: (args: OwnArgs & ParentArgs) => Promise<R>;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Register a CliCommand type to yargs. Recursively registers subcommands too.
|
|
26
|
-
* @param yargs
|
|
27
|
-
* @param cliCommand
|
|
28
|
-
*/
|
|
29
|
-
export declare function registerCommandToYargs(yargs: Argv, cliCommand: CliCommand<any, any>): void;
|
|
30
|
-
//# sourceMappingURL=command.d.ts.map
|
package/lib/utils/command.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Register a CliCommand type to yargs. Recursively registers subcommands too.
|
|
3
|
-
* @param yargs
|
|
4
|
-
* @param cliCommand
|
|
5
|
-
*/
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
-
export function registerCommandToYargs(yargs, cliCommand) {
|
|
8
|
-
yargs.command({
|
|
9
|
-
command: cliCommand.command,
|
|
10
|
-
describe: cliCommand.describe,
|
|
11
|
-
builder: (yargsBuilder) => {
|
|
12
|
-
yargsBuilder.options(cliCommand.options || {});
|
|
13
|
-
for (const subcommand of cliCommand.subcommands || []) {
|
|
14
|
-
registerCommandToYargs(yargsBuilder, subcommand);
|
|
15
|
-
}
|
|
16
|
-
if (cliCommand.examples) {
|
|
17
|
-
for (const example of cliCommand.examples) {
|
|
18
|
-
yargsBuilder.example(`$0 ${example.command}`, example.description);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return yargs;
|
|
22
|
-
},
|
|
23
|
-
handler: cliCommand.handler || function emptyHandler() { },
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=command.js.map
|
package/lib/utils/command.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/utils/command.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,8DAA8D;AAC9D,MAAM,UAAU,sBAAsB,CAAC,KAAW,EAAE,UAAgC;IAClF,KAAK,CAAC,OAAO,CAAC;QACZ,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YACxB,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YAC/C,KAAK,MAAM,UAAU,IAAI,UAAU,CAAC,WAAW,IAAI,EAAE,EAAE;gBACrD,sBAAsB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;aAClD;YACD,IAAI,UAAU,CAAC,QAAQ,EAAE;gBACvB,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,QAAQ,EAAE;oBACzC,YAAY,CAAC,OAAO,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;iBACpE;aACF;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,SAAS,YAAY,KAAU,CAAC;KAChE,CAAC,CAAC;AACL,CAAC"}
|