@lodestar/prover 1.16.0-dev.d01c5425cd → 1.16.0-dev.d1dc217d00
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/README.md +4 -5
- package/lib/cli/cmds/start/handler.js +2 -10
- package/lib/cli/cmds/start/handler.js.map +1 -1
- package/lib/cli/cmds/start/options.d.ts +2 -6
- package/lib/cli/cmds/start/options.js +3 -14
- package/lib/cli/cmds/start/options.js.map +1 -1
- package/lib/utils/command.js +0 -1
- package/lib/utils/command.js.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
A set of tools allowing to verify EL client JSON-RPC calls.
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
@@ -37,13 +37,12 @@ console.log({balance, address});
|
|
|
37
37
|
You can also invoke the package as binary.
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npm
|
|
40
|
+
npm i -g @lodestar/prover
|
|
41
41
|
|
|
42
42
|
lodestar-prover proxy \
|
|
43
43
|
--network sepolia \
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--beacon-rpc https://lodestar-sepolia.chainsafe.io \
|
|
44
|
+
--executionRpcUrl https://lodestar-sepoliarpc.chainsafe.io \
|
|
45
|
+
--beaconUrls https://lodestar-sepolia.chainsafe.io \
|
|
47
46
|
--port 8080
|
|
48
47
|
```
|
|
49
48
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { chainConfigFromJson } from "@lodestar/config";
|
|
2
|
-
import { LCTransport } from "../../../interfaces.js";
|
|
3
2
|
import { readFile } from "../../../utils/file.js";
|
|
4
3
|
import { createVerifiedExecutionProxy } from "../../../web3_proxy.js";
|
|
5
4
|
import { parseGlobalArgs } from "../../options.js";
|
|
@@ -10,21 +9,14 @@ import { parseStartArgs } from "./options.js";
|
|
|
10
9
|
export async function proverProxyStartHandler(args) {
|
|
11
10
|
const { network, logLevel, paramsFile } = parseGlobalArgs(args);
|
|
12
11
|
const opts = parseStartArgs(args);
|
|
13
|
-
const { executionRpcUrl, port, wsCheckpoint } = opts;
|
|
14
12
|
const config = paramsFile ? chainConfigFromJson(readFile(paramsFile)) : {};
|
|
15
13
|
const options = {
|
|
14
|
+
...opts,
|
|
16
15
|
logLevel,
|
|
17
|
-
executionRpcUrl,
|
|
18
|
-
wsCheckpoint,
|
|
19
|
-
unverifiedWhitelist: opts.unverifiedWhitelist,
|
|
20
|
-
requestTimeout: opts.requestTimeout,
|
|
21
16
|
...(network ? { network } : { config }),
|
|
22
|
-
...(opts.transport === LCTransport.Rest
|
|
23
|
-
? { transport: LCTransport.Rest, urls: opts.urls }
|
|
24
|
-
: { transport: LCTransport.P2P, bootnodes: opts.bootnodes }),
|
|
25
17
|
};
|
|
26
18
|
const { server, proofProvider } = createVerifiedExecutionProxy(options);
|
|
27
|
-
server.listen(port);
|
|
19
|
+
server.listen(opts.port);
|
|
28
20
|
await proofProvider.waitToBeReady();
|
|
29
21
|
}
|
|
30
22
|
//# sourceMappingURL=handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/cli/cmds/start/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../../src/cli/cmds/start/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAC,4BAA4B,EAAuB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAa,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAC,cAAc,EAAY,MAAM,cAAc,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAA4B;IACxE,MAAM,EAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9D,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAElC,MAAM,MAAM,GAAyB,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEjG,MAAM,OAAO,GAAyB;QACpC,GAAG,IAAI;QACP,QAAQ;QACR,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC,CAAC,EAAC,MAAM,EAAC,CAAC;KACpC,CAAC;IAEF,MAAM,EAAC,MAAM,EAAE,aAAa,EAAC,GAAG,4BAA4B,CAAC,OAAO,CAAC,CAAC;IAEtE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzB,MAAM,aAAa,CAAC,aAAa,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -4,7 +4,6 @@ export type StartArgs = {
|
|
|
4
4
|
port: number;
|
|
5
5
|
executionRpcUrl: string;
|
|
6
6
|
beaconUrls?: string[];
|
|
7
|
-
beaconBootnodes?: string[];
|
|
8
7
|
wsCheckpoint?: string;
|
|
9
8
|
unverifiedWhitelist?: string[];
|
|
10
9
|
requestTimeout: number;
|
|
@@ -15,13 +14,10 @@ export type StartOptions = {
|
|
|
15
14
|
wsCheckpoint?: string;
|
|
16
15
|
unverifiedWhitelist?: string[];
|
|
17
16
|
requestTimeout: number;
|
|
18
|
-
} &
|
|
17
|
+
} & {
|
|
19
18
|
transport: LCTransport.Rest;
|
|
20
19
|
urls: string[];
|
|
21
|
-
}
|
|
22
|
-
transport: LCTransport.P2P;
|
|
23
|
-
bootnodes: string[];
|
|
24
|
-
});
|
|
20
|
+
};
|
|
25
21
|
export declare const startOptions: CliCommandOptions<StartArgs>;
|
|
26
22
|
export declare function parseStartArgs(args: StartArgs): StartOptions;
|
|
27
23
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -27,17 +27,10 @@ export const startOptions = {
|
|
|
27
27
|
group: "execution",
|
|
28
28
|
},
|
|
29
29
|
beaconUrls: {
|
|
30
|
-
description: "
|
|
31
|
-
type: "string",
|
|
32
|
-
array: true,
|
|
33
|
-
conflicts: ["beaconBootnodes"],
|
|
34
|
-
group: "beacon",
|
|
35
|
-
},
|
|
36
|
-
beaconBootnodes: {
|
|
37
|
-
description: "The beacon node PRC urls for 'p2p' mode.",
|
|
30
|
+
description: "Urls of the beacon nodes to connect to.",
|
|
38
31
|
type: "string",
|
|
32
|
+
demandOption: true,
|
|
39
33
|
array: true,
|
|
40
|
-
conflicts: ["beaconUrls"],
|
|
41
34
|
group: "beacon",
|
|
42
35
|
},
|
|
43
36
|
wsCheckpoint: {
|
|
@@ -48,16 +41,12 @@ export const startOptions = {
|
|
|
48
41
|
},
|
|
49
42
|
};
|
|
50
43
|
export function parseStartArgs(args) {
|
|
51
|
-
if (!args.beaconUrls && !args.beaconBootnodes) {
|
|
52
|
-
throw new Error("Either --beaconUrls or --beaconBootnodes must be provided");
|
|
53
|
-
}
|
|
54
44
|
// Remove undefined values to allow deepmerge to inject default values downstream
|
|
55
45
|
return {
|
|
56
46
|
port: args.port,
|
|
57
47
|
executionRpcUrl: args.executionRpcUrl,
|
|
58
|
-
transport:
|
|
48
|
+
transport: LCTransport.Rest,
|
|
59
49
|
urls: args.beaconUrls ?? [],
|
|
60
|
-
bootnodes: args.beaconBootnodes ?? [],
|
|
61
50
|
wsCheckpoint: args.wsCheckpoint,
|
|
62
51
|
unverifiedWhitelist: args.unverifiedWhitelist,
|
|
63
52
|
requestTimeout: args.requestTimeout ?? DEFAULT_PROXY_REQUEST_TIMEOUT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/cli/cmds/start/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/cli/cmds/start/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,6BAA6B,EAAC,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,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,QAAQ;QACd,YAAY,EAAE,IAAI;QAClB,KAAK,EAAE,IAAI;QACX,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/utils/command.js
CHANGED
package/lib/utils/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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"}
|
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.16.0-dev.
|
|
14
|
+
"version": "1.16.0-dev.d1dc217d00",
|
|
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": "1.16.0-dev.
|
|
74
|
-
"@lodestar/config": "1.16.0-dev.
|
|
75
|
-
"@lodestar/light-client": "1.16.0-dev.
|
|
76
|
-
"@lodestar/logger": "1.16.0-dev.
|
|
77
|
-
"@lodestar/params": "1.16.0-dev.
|
|
78
|
-
"@lodestar/types": "1.16.0-dev.
|
|
79
|
-
"@lodestar/utils": "1.16.0-dev.
|
|
73
|
+
"@lodestar/api": "1.16.0-dev.d1dc217d00",
|
|
74
|
+
"@lodestar/config": "1.16.0-dev.d1dc217d00",
|
|
75
|
+
"@lodestar/light-client": "1.16.0-dev.d1dc217d00",
|
|
76
|
+
"@lodestar/logger": "1.16.0-dev.d1dc217d00",
|
|
77
|
+
"@lodestar/params": "1.16.0-dev.d1dc217d00",
|
|
78
|
+
"@lodestar/types": "1.16.0-dev.d1dc217d00",
|
|
79
|
+
"@lodestar/utils": "1.16.0-dev.d1dc217d00",
|
|
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": "1.16.0-dev.
|
|
88
|
+
"@lodestar/test-utils": "1.16.0-dev.d1dc217d00",
|
|
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": "9845c7490603e9ec480880682de0fdc6a71885bd"
|
|
104
104
|
}
|