@cartesi/cli 2.0.0-alpha.3 → 2.0.0-alpha.4
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/dist/commands/run.d.ts +1 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +9 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/node/docker-compose-anvil.yaml +2 -2
- package/dist/node/docker-compose-bundler.yaml +1 -1
- package/dist/node/docker-compose-database.yaml +1 -1
- package/dist/node/docker-compose-espresso.yaml +127 -0
- package/dist/node/docker-compose-explorer.yaml +1 -1
- package/dist/node/docker-compose-paymaster.yaml +1 -1
- package/oclif.manifest.json +8 -1
- package/package.json +3 -3
package/dist/commands/run.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export default class Run extends BaseCommand<typeof Run> {
|
|
|
8
8
|
"disable-explorer": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
9
9
|
"disable-bundler": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
10
10
|
"disable-paymaster": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
11
|
+
"enable-espresso": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
11
12
|
"epoch-length": import("@oclif/core/lib/interfaces/parser.js").OptionFlag<number, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
12
13
|
"no-backend": import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
13
14
|
verbose: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACpD,MAAM,CAAC,OAAO,SAA2B;IAEzC,MAAM,CAAC,WAAW,SAAmD;IAErE,MAAM,CAAC,QAAQ,WAA2C;IAE1D,MAAM,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/commands/run.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACpD,MAAM,CAAC,OAAO,SAA2B;IAEzC,MAAM,CAAC,WAAW,SAAmD;IAErE,MAAM,CAAC,QAAQ,WAA2C;IAE1D,MAAM,CAAC,KAAK;;;;;;;;;;;;;MA8DV;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyJpC"}
|
package/dist/commands/run.js
CHANGED
|
@@ -71,6 +71,10 @@ class Run extends BaseCommand {
|
|
|
71
71
|
// only add paymaster if bundler is enabled
|
|
72
72
|
composeFiles.push("docker-compose-paymaster.yaml");
|
|
73
73
|
}
|
|
74
|
+
// espresso development node
|
|
75
|
+
if (flags["enable-espresso"]) {
|
|
76
|
+
composeFiles.push("docker-compose-espresso.yaml");
|
|
77
|
+
}
|
|
74
78
|
// load the no-backend compose file
|
|
75
79
|
if (flags["no-backend"]) {
|
|
76
80
|
composeFiles.push("docker-compose-host.yaml");
|
|
@@ -156,6 +160,11 @@ Run.flags = {
|
|
|
156
160
|
description: "disable local paymaster service to save machine resources",
|
|
157
161
|
summary: "disable paymaster service",
|
|
158
162
|
}),
|
|
163
|
+
"enable-espresso": Flags.boolean({
|
|
164
|
+
default: false,
|
|
165
|
+
description: "enable Espresso development node ",
|
|
166
|
+
summary: "enable Espresso development node",
|
|
167
|
+
}),
|
|
159
168
|
"epoch-length": Flags.integer({
|
|
160
169
|
description: "length of an epoch (in blocks)",
|
|
161
170
|
default: 720,
|
package/dist/config.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class RequiredFieldError extends Error {
|
|
|
29
29
|
export declare class InvalidStringArrayError extends Error {
|
|
30
30
|
constructor();
|
|
31
31
|
}
|
|
32
|
-
export declare const DEFAULT_SDK = "cartesi/sdk:0.12.0-alpha.
|
|
32
|
+
export declare const DEFAULT_SDK = "cartesi/sdk:0.12.0-alpha.3";
|
|
33
33
|
type DriveFormat = "ext2" | "sqfs";
|
|
34
34
|
export type ImageInfo = {
|
|
35
35
|
cmd: string[];
|
package/dist/config.js
CHANGED
|
@@ -64,7 +64,7 @@ export class InvalidStringArrayError extends Error {
|
|
|
64
64
|
const DEFAULT_FORMAT = "ext2";
|
|
65
65
|
const DEFAULT_RAM = "128Mi";
|
|
66
66
|
const DEFAULT_RAM_IMAGE = "/usr/share/cartesi-machine/images/linux.bin";
|
|
67
|
-
export const DEFAULT_SDK = "cartesi/sdk:0.12.0-alpha.
|
|
67
|
+
export const DEFAULT_SDK = "cartesi/sdk:0.12.0-alpha.3";
|
|
68
68
|
export const defaultRootDriveConfig = () => ({
|
|
69
69
|
builder: "docker",
|
|
70
70
|
context: ".",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
services:
|
|
2
2
|
anvil:
|
|
3
|
-
image: cartesi/sdk:0.12.0-alpha.
|
|
3
|
+
image: cartesi/sdk:0.12.0-alpha.3
|
|
4
4
|
command:
|
|
5
5
|
[
|
|
6
6
|
"devnet",
|
|
@@ -19,7 +19,7 @@ services:
|
|
|
19
19
|
- 8545:8545
|
|
20
20
|
|
|
21
21
|
dapp_deployer:
|
|
22
|
-
image: cartesi/sdk:0.12.0-alpha.
|
|
22
|
+
image: cartesi/sdk:0.12.0-alpha.3
|
|
23
23
|
restart: on-failure
|
|
24
24
|
depends_on:
|
|
25
25
|
anvil:
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
services:
|
|
2
|
+
espresso_database_creator:
|
|
3
|
+
image: postgres:16-alpine
|
|
4
|
+
command: ["createdb", "sequencer"]
|
|
5
|
+
depends_on:
|
|
6
|
+
database:
|
|
7
|
+
condition: service_healthy
|
|
8
|
+
environment:
|
|
9
|
+
PGHOST: ${PGHOST:-database}
|
|
10
|
+
PGPORT: ${PGPORT:-5432}
|
|
11
|
+
PGUSER: ${PGUSER:-postgres}
|
|
12
|
+
PGPASSWORD: ${PGPASSWORD:-password}
|
|
13
|
+
PGDATABASE: ${PGDATABASE:-postgres}
|
|
14
|
+
|
|
15
|
+
validator:
|
|
16
|
+
environment:
|
|
17
|
+
CARTESI_FEATURE_INPUT_READER_ENABLED: false
|
|
18
|
+
espresso:
|
|
19
|
+
image: cartesi/sdk:0.12.0-alpha.3
|
|
20
|
+
command: ["/usr/local/bin/espresso-dev-node"]
|
|
21
|
+
deploy:
|
|
22
|
+
resources:
|
|
23
|
+
limits:
|
|
24
|
+
cpus: "4"
|
|
25
|
+
memory: "1G"
|
|
26
|
+
ports:
|
|
27
|
+
- 8770:8770
|
|
28
|
+
- 8771:8771
|
|
29
|
+
- 8772:8772
|
|
30
|
+
- 20000:20000
|
|
31
|
+
depends_on:
|
|
32
|
+
espresso_database_creator:
|
|
33
|
+
condition: service_completed_successfully
|
|
34
|
+
database:
|
|
35
|
+
condition: service_healthy
|
|
36
|
+
environment:
|
|
37
|
+
ESPRESSO_SEQUENCER_L1_PROVIDER: ${CARTESI_BLOCKCHAIN_HTTP_ENDPOINT:-http://anvil:8545}
|
|
38
|
+
ESPRESSO_SEQUENCER_API_PORT: 8770
|
|
39
|
+
ESPRESSO_BUILDER_PORT: 8771
|
|
40
|
+
ESPRESSO_PROVER_PORT: 8772
|
|
41
|
+
ESPRESSO_DEV_NODE_PORT: 20000
|
|
42
|
+
ESPRESSO_SEQUENCER_POSTGRES_HOST: database
|
|
43
|
+
ESPRESSO_SEQUENCER_POSTGRES_PORT: 5432
|
|
44
|
+
ESPRESSO_SEQUENCER_POSTGRES_USER: postgres
|
|
45
|
+
ESPRESSO_SEQUENCER_POSTGRES_PASSWORD: password
|
|
46
|
+
ESPRESSO_SEQUENCER_POSTGRES_DATABASE: sequencer
|
|
47
|
+
ESPRESSO_SEQUENCER_ETH_MNEMONIC: ${CARTESI_AUTH_MNEMONIC:-test test test test test test test test test test test junk}
|
|
48
|
+
|
|
49
|
+
prompt:
|
|
50
|
+
image: debian:bookworm-slim
|
|
51
|
+
environment:
|
|
52
|
+
PROMPT_TXT_07_ESPRESSO: "Espresso running at http://localhost:${CARTESI_LISTEN_PORT}/espresso/"
|
|
53
|
+
|
|
54
|
+
traefik-config-generator:
|
|
55
|
+
environment:
|
|
56
|
+
TRAEFIK_CONFIG_ESPRESSO_DEV: |
|
|
57
|
+
http:
|
|
58
|
+
routers:
|
|
59
|
+
espresso-dev:
|
|
60
|
+
rule: "PathPrefix(`/espresso/dev`)"
|
|
61
|
+
middlewares:
|
|
62
|
+
- "remove-espresso-dev-prefix"
|
|
63
|
+
service: espresso-dev
|
|
64
|
+
middlewares:
|
|
65
|
+
remove-espresso-dev-prefix:
|
|
66
|
+
replacePathRegex:
|
|
67
|
+
regex: "^/espresso/dev/(.*)"
|
|
68
|
+
replacement: "/$1"
|
|
69
|
+
services:
|
|
70
|
+
espresso-dev:
|
|
71
|
+
loadBalancer:
|
|
72
|
+
servers:
|
|
73
|
+
- url: "http://espresso:20000"
|
|
74
|
+
TRAEFIK_CONFIG_ESPRESSO_SEQUENCER: |
|
|
75
|
+
http:
|
|
76
|
+
routers:
|
|
77
|
+
espresso-sequencer:
|
|
78
|
+
rule: "PathPrefix(`/espresso/sequencer`)"
|
|
79
|
+
middlewares:
|
|
80
|
+
- "remove-espresso-sequencer-prefix"
|
|
81
|
+
service: espresso-sequencer
|
|
82
|
+
middlewares:
|
|
83
|
+
remove-espresso-sequencer-prefix:
|
|
84
|
+
replacePathRegex:
|
|
85
|
+
regex: "^/espresso/sequencer/(.*)"
|
|
86
|
+
replacement: "/$1"
|
|
87
|
+
services:
|
|
88
|
+
espresso-sequencer:
|
|
89
|
+
loadBalancer:
|
|
90
|
+
servers:
|
|
91
|
+
- url: "http://espresso:8770"
|
|
92
|
+
TRAEFIK_CONFIG_ESPRESSO_BUILDER: |
|
|
93
|
+
http:
|
|
94
|
+
routers:
|
|
95
|
+
espresso-builder:
|
|
96
|
+
rule: "PathPrefix(`/espresso/builder`)"
|
|
97
|
+
middlewares:
|
|
98
|
+
- "remove-espresso-builder-prefix"
|
|
99
|
+
service: espresso-builder
|
|
100
|
+
middlewares:
|
|
101
|
+
remove-espresso-builder-prefix:
|
|
102
|
+
replacePathRegex:
|
|
103
|
+
regex: "^/espresso/builder/(.*)"
|
|
104
|
+
replacement: "/$1"
|
|
105
|
+
services:
|
|
106
|
+
espresso-builder:
|
|
107
|
+
loadBalancer:
|
|
108
|
+
servers:
|
|
109
|
+
- url: "http://espresso:8771"
|
|
110
|
+
TRAEFIK_CONFIG_ESPRESSO_PROVER: |
|
|
111
|
+
http:
|
|
112
|
+
routers:
|
|
113
|
+
espresso-prover:
|
|
114
|
+
rule: "PathPrefix(`/espresso/prover`)"
|
|
115
|
+
middlewares:
|
|
116
|
+
- "remove-espresso-prover-prefix"
|
|
117
|
+
service: espresso-prover
|
|
118
|
+
middlewares:
|
|
119
|
+
remove-espresso-prover-prefix:
|
|
120
|
+
replacePathRegex:
|
|
121
|
+
regex: "^/espresso/prover/(.*)"
|
|
122
|
+
replacement: "/$1"
|
|
123
|
+
services:
|
|
124
|
+
espresso-prover:
|
|
125
|
+
loadBalancer:
|
|
126
|
+
servers:
|
|
127
|
+
- url: "http://espresso:8772"
|
package/oclif.manifest.json
CHANGED
|
@@ -241,6 +241,13 @@
|
|
|
241
241
|
"allowNo": false,
|
|
242
242
|
"type": "boolean"
|
|
243
243
|
},
|
|
244
|
+
"enable-espresso": {
|
|
245
|
+
"description": "enable Espresso development node ",
|
|
246
|
+
"name": "enable-espresso",
|
|
247
|
+
"summary": "enable Espresso development node",
|
|
248
|
+
"allowNo": false,
|
|
249
|
+
"type": "boolean"
|
|
250
|
+
},
|
|
244
251
|
"epoch-length": {
|
|
245
252
|
"description": "length of an epoch (in blocks)",
|
|
246
253
|
"name": "epoch-length",
|
|
@@ -872,5 +879,5 @@
|
|
|
872
879
|
]
|
|
873
880
|
}
|
|
874
881
|
},
|
|
875
|
-
"version": "2.0.0-alpha.
|
|
882
|
+
"version": "2.0.0-alpha.4"
|
|
876
883
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cartesi/cli",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.4",
|
|
4
4
|
"description": "Cartesi CLI",
|
|
5
5
|
"author": "Danilo Tuler <tuler@pobox.com>",
|
|
6
6
|
"bin": {
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"tslib": "^2.8.0",
|
|
66
66
|
"typescript": "^5.6.3",
|
|
67
67
|
"vitest": "^2.1.3",
|
|
68
|
+
"@cartesi/devnet": "2.0.0-alpha.3",
|
|
68
69
|
"@cartesi/eslint-config": "0.0.0",
|
|
69
|
-
"tsconfig": "0.0.0"
|
|
70
|
-
"@cartesi/devnet": "2.0.0-alpha.2"
|
|
70
|
+
"tsconfig": "0.0.0"
|
|
71
71
|
},
|
|
72
72
|
"oclif": {
|
|
73
73
|
"bin": "cartesi",
|