@cartesi/cli 2.0.0-alpha.6 → 2.0.0-alpha.8

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 (31) hide show
  1. package/dist/commands/create.d.ts +1 -1
  2. package/dist/commands/create.d.ts.map +1 -1
  3. package/dist/commands/create.js +1 -1
  4. package/dist/commands/rollups/deploy.d.ts.map +1 -1
  5. package/dist/commands/rollups/deploy.js +21 -9
  6. package/dist/commands/rollups/start.d.ts.map +1 -1
  7. package/dist/commands/rollups/start.js +20 -18
  8. package/dist/commands/send.js +1 -1
  9. package/dist/compose/rollups/default.env +6 -7
  10. package/dist/compose/rollups/docker-compose-anvil.yaml +4 -2
  11. package/dist/compose/rollups/docker-compose-bundler.yaml +1 -4
  12. package/dist/compose/rollups/docker-compose-database.yaml +1 -1
  13. package/dist/compose/rollups/docker-compose-espresso.yaml +6 -41
  14. package/dist/compose/rollups/docker-compose-explorer.yaml +8 -26
  15. package/dist/compose/rollups/docker-compose-graphql.yaml +3 -32
  16. package/dist/compose/rollups/docker-compose-node.yaml +2 -15
  17. package/dist/compose/rollups/docker-compose-paymaster.yaml +0 -3
  18. package/dist/compose/rollups/docker-compose-proxy.yaml +2 -0
  19. package/dist/compose/rollups/proxy/anvil.yaml +17 -0
  20. package/dist/compose/rollups/proxy/espresso.yaml +8 -47
  21. package/dist/config.d.ts +2 -1
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/config.js +4 -3
  24. package/dist/contracts.d.ts +1695 -1636
  25. package/dist/contracts.d.ts.map +1 -1
  26. package/dist/contracts.js +632 -592
  27. package/dist/exec/rollups.js +6 -6
  28. package/dist/wallet.d.ts.map +1 -1
  29. package/dist/wallet.js +29 -11
  30. package/package.json +3 -3
  31. package/dist/compose/rollups/proxy/espresso-reader.yaml +0 -17
@@ -1,5 +1,5 @@
1
1
  import { Command } from "@commander-js/extra-typings";
2
- export declare const DEFAULT_TEMPLATES_BRANCH = "sdk-0.9";
2
+ export declare const DEFAULT_TEMPLATES_BRANCH = "prerelease/sdk-12";
3
3
  export declare const createCreateCommand: () => Command<[string], {
4
4
  template: "cpp" | "cpp-low-level" | "go" | "javascript" | "lua" | "python" | "ruby" | "rust" | "typescript";
5
5
  branch: string;
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AAM9D,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAmClD,eAAO,MAAM,mBAAmB;;;MA0B/B,CAAC"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AAM9D,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAmC5D,eAAO,MAAM,mBAAmB;;;MA0B/B,CAAC"}
@@ -2,7 +2,7 @@ import { Command, Option } from "@commander-js/extra-typings";
2
2
  import chalk from "chalk";
3
3
  import { downloadTemplate } from "giget";
4
4
  import ora from "ora";
5
- export const DEFAULT_TEMPLATES_BRANCH = "sdk-0.9";
5
+ export const DEFAULT_TEMPLATES_BRANCH = "prerelease/sdk-12";
6
6
  const TEMPLATES = [
7
7
  "cpp",
8
8
  "cpp-low-level",
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/rollups/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AA8N9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;EAqG/B,CAAC"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/commands/rollups/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AAoP9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;EAqG/B,CAAC"}
@@ -3,10 +3,10 @@ import input from "@inquirer/input";
3
3
  import chalk from "chalk";
4
4
  import { execa } from "execa";
5
5
  import ora from "ora";
6
- import { zeroHash } from "viem";
7
- import { anvil } from "viem/chains";
6
+ import { encodeFunctionData, zeroHash, } from "viem";
7
+ import { cannon } from "viem/chains";
8
8
  import { getContextPath, getMachineHash, parseAddress, parseHash, } from "../../base.js";
9
- import { applicationFactoryAbi, applicationFactoryAddress, authorityFactoryAbi, authorityFactoryAddress, } from "../../contracts.js";
9
+ import { applicationFactoryAbi, applicationFactoryAddress, authorityFactoryAbi, authorityFactoryAddress, dataAvailabilityAbi, inputBoxAddress, } from "../../contracts.js";
10
10
  import { addressInput } from "../../prompts.js";
11
11
  import { connect } from "../send.js";
12
12
  /**
@@ -60,6 +60,12 @@ const deployApplication = async (publicClient, walletClient, options) => {
60
60
  message: "Application Owner",
61
61
  default: walletClient.account?.address,
62
62
  }));
63
+ // create data availability descriptor for InputBox only
64
+ const dataAvailability = encodeFunctionData({
65
+ abi: dataAvailabilityAbi,
66
+ functionName: "InputBox",
67
+ args: [inputBoxAddress],
68
+ });
63
69
  const applicationAddress = await publicClient.readContract({
64
70
  abi: applicationFactoryAbi,
65
71
  address: applicationFactoryAddress,
@@ -68,7 +74,7 @@ const deployApplication = async (publicClient, walletClient, options) => {
68
74
  authorityAddress,
69
75
  applicationOwner,
70
76
  templateHash,
71
- // "0x", // XXX: update to latest rollups contract
77
+ dataAvailability,
72
78
  salt,
73
79
  ],
74
80
  });
@@ -83,7 +89,13 @@ const deployApplication = async (publicClient, walletClient, options) => {
83
89
  address: applicationFactoryAddress,
84
90
  account: walletClient.account,
85
91
  functionName: "newApplication",
86
- args: [authorityAddress, applicationOwner, templateHash, salt],
92
+ args: [
93
+ authorityAddress,
94
+ applicationOwner,
95
+ templateHash,
96
+ dataAvailability,
97
+ salt,
98
+ ],
87
99
  });
88
100
  progress.start("Deploying application...");
89
101
  const hash = await walletClient.writeContract(request);
@@ -151,8 +163,8 @@ const registerApplication = async (options) => {
151
163
  ]);
152
164
  const registration = stdout ? JSON.parse(stdout) : undefined;
153
165
  if (registration) {
154
- if (registration.State !== "ENABLED") {
155
- throw new Error(registration.Reason);
166
+ if (registration.state !== "ENABLED") {
167
+ throw new Error(registration.reason);
156
168
  }
157
169
  progress.succeed(`Registration ${chalk.cyan(name)}`);
158
170
  }
@@ -165,7 +177,7 @@ export const createDeployCommand = () => {
165
177
  return new Command("deploy")
166
178
  .description("Deploy a rollups application to a rollups node.")
167
179
  .configureHelp({ showGlobalOptions: true })
168
- .option("--chain-id <id>", "Chain ID", parseInt, 31337)
180
+ .option("--chain-id <id>", "Chain ID", parseInt, 13370)
169
181
  .option("--rpc-url <url>", "RPC URL")
170
182
  .option("--mnemonic <phrase>", "Mnemonic passphrase")
171
183
  .option("--mnemonic-index <index>", "Mnemonic account index", parseInt, 0)
@@ -198,7 +210,7 @@ export const createDeployCommand = () => {
198
210
  const authorityAddress = await deployAuthority(publicClient, walletClient, { progress, ...options });
199
211
  // deploy application contract
200
212
  const applicationAddress = await deployApplication(publicClient, walletClient, { authorityAddress, progress, templateHash, ...options });
201
- if (publicClient.chain?.id === anvil.id) {
213
+ if (publicClient.chain?.id === cannon.id) {
202
214
  // copy machine snapshot to rollups node container
203
215
  const containerSnapshotPath = await publishMachine({
204
216
  progress,
@@ -1 +1 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/rollups/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AA2I9D,eAAO,MAAM,kBAAkB;;;;;;;;;;;EAgK9B,CAAC"}
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/rollups/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,6BAA6B,CAAC;AA4I9D,eAAO,MAAM,kBAAkB;;;;;;;;;;;EAkK9B,CAAC"}
@@ -5,7 +5,7 @@ import { Listr } from "listr2";
5
5
  import pRetry from "p-retry";
6
6
  import path from "path";
7
7
  import { getServiceHealth } from "../../base.js";
8
- import { DEFAULT_SDK } from "../../config.js";
8
+ import { DEFAULT_SDK_IMAGE, DEFAULT_SDK_VERSION } from "../../config.js";
9
9
  const commaSeparatedList = (value) => value.split(",");
10
10
  const host = "http://127.0.0.1";
11
11
  // services configuration
@@ -14,7 +14,7 @@ const baseServices = [
14
14
  name: "anvil",
15
15
  file: "docker-compose-anvil.yaml",
16
16
  healthySemaphore: "anvil",
17
- healthyTitle: `${chalk.cyan("anvil")} service ready at ${chalk.cyan(`${host}:8545`)}`,
17
+ healthyTitle: (port) => `${chalk.cyan("anvil")} service ready at ${chalk.cyan(`${host}:${port}/anvil`)}`,
18
18
  waitTitle: `${chalk.cyan("anvil")} service starting...`,
19
19
  errorTitle: `${chalk.red("anvil")} service failed`,
20
20
  },
@@ -29,7 +29,7 @@ const baseServices = [
29
29
  {
30
30
  name: "rpc",
31
31
  file: "docker-compose-node.yaml",
32
- healthySemaphore: "proxy",
32
+ healthySemaphore: "rollups-node",
33
33
  healthyTitle: (port) => `${chalk.cyan("rpc")} service ready at ${chalk.cyan(`${host}:${port}/rpc`)}`,
34
34
  waitTitle: `${chalk.cyan("rpc")} service starting...`,
35
35
  errorTitle: `${chalk.red("rpc")} service failed`,
@@ -37,7 +37,7 @@ const baseServices = [
37
37
  {
38
38
  name: "inspect",
39
39
  file: "docker-compose-node.yaml",
40
- healthySemaphore: "proxy",
40
+ healthySemaphore: "rollups-node",
41
41
  healthyTitle: (port) => `${chalk.cyan("inspect")} service ready at ${chalk.cyan(`${host}:${port}/inspect/<application_address>`)}`,
42
42
  waitTitle: `${chalk.cyan("inspect")} service starting...`,
43
43
  errorTitle: `${chalk.red("inspect")} service failed`,
@@ -47,42 +47,42 @@ const availableServices = [
47
47
  {
48
48
  name: "bundler",
49
49
  file: "docker-compose-bundler.yaml",
50
- healthySemaphore: "proxy",
51
- healthyTitle: (port) => `Service ${chalk.cyan("bundler")} ready at ${chalk.cyan(`${host}:${port}/bundler/rpc`)}`,
50
+ healthySemaphore: "bundler",
51
+ healthyTitle: (port) => `${chalk.cyan("bundler")} service ready at ${chalk.cyan(`${host}:${port}/bundler/rpc`)}`,
52
52
  waitTitle: `${chalk.cyan("bundler")} service starting...`,
53
53
  errorTitle: `${chalk.red("bundler")} service failed`,
54
54
  },
55
55
  {
56
56
  name: "espresso",
57
57
  file: "docker-compose-espresso.yaml",
58
- healthySemaphore: "proxy",
59
- healthyTitle: (port) => `Service ${chalk.cyan("espresso")} ready at ${chalk.cyan(`${host}:${port}/espresso`)}`,
58
+ healthySemaphore: "espresso",
59
+ healthyTitle: (port) => `${chalk.cyan("espresso")} service ready at ${chalk.cyan(`${host}:${port}/transaction`)}`,
60
60
  waitTitle: `${chalk.cyan("espresso")} service starting...`,
61
61
  errorTitle: `${chalk.red("espresso")} service failed`,
62
62
  },
63
63
  {
64
64
  name: "explorer",
65
65
  file: "docker-compose-explorer.yaml",
66
- healthySemaphore: "proxy",
67
- healthyTitle: (port) => `Service ${chalk.cyan("explorer")} ready at ${chalk.cyan(`${host}:${port}/explorer`)}`,
66
+ healthySemaphore: "explorer_api",
67
+ healthyTitle: (port) => `${chalk.cyan("explorer")} service ready at ${chalk.cyan(`${host}:${port}/explorer`)}`,
68
68
  waitTitle: `${chalk.cyan("explorer")} service starting...`,
69
69
  errorTitle: `${chalk.red("explorer")} service failed`,
70
70
  },
71
71
  {
72
72
  name: "graphql",
73
73
  file: "docker-compose-graphql.yaml",
74
- healthySemaphore: "proxy",
75
- healthyTitle: (port) => `Service ${chalk.cyan("graphql")} ready at ${chalk.cyan(`${host}:${port}/graphql`)}`,
74
+ healthySemaphore: "graphql",
75
+ healthyTitle: (port) => `${chalk.cyan("graphql")} service ready at ${chalk.cyan(`${host}:${port}/graphql`)}`,
76
76
  waitTitle: `${chalk.cyan("graphql")} service starting...`,
77
77
  errorTitle: `${chalk.red("graphql")} service failed`,
78
78
  },
79
79
  {
80
80
  name: "paymaster",
81
81
  file: "docker-compose-paymaster.yaml",
82
- healthySemaphore: "proxy",
83
- healthyTitle: (port) => `Service ${chalk.cyan("paymaster")} ready at ${chalk.cyan(`${host}:${port}/paymaster`)}`,
84
- waitTitle: `Starting ${chalk.cyan("paymaster")}...`,
85
- errorTitle: `Service ${chalk.red("paymaster")} failed`,
82
+ healthySemaphore: "paymaster",
83
+ healthyTitle: (port) => `${chalk.cyan("paymaster")} service ready at ${chalk.cyan(`${host}:${port}/paymaster`)}`,
84
+ waitTitle: `${chalk.cyan("paymaster")} service starting...`,
85
+ errorTitle: `${chalk.red("paymaster")} service failed`,
86
86
  },
87
87
  ];
88
88
  const serviceMonitorTask = (options) => {
@@ -132,7 +132,8 @@ export const createStartCommand = () => {
132
132
  CARTESI_LISTEN_PORT: port.toString(),
133
133
  CARTESI_ROLLUPS_NODE_CPUS: cpus?.toString(),
134
134
  CARTESI_ROLLUPS_NODE_MEMORY: memory?.toString(),
135
- CARTESI_SDK_IMAGE: DEFAULT_SDK,
135
+ CARTESI_SDK_IMAGE: DEFAULT_SDK_IMAGE,
136
+ CARTESI_SDK_VERSION: DEFAULT_SDK_VERSION,
136
137
  };
137
138
  // build a list of unique compose files
138
139
  const composeFiles = [
@@ -178,7 +179,8 @@ export const createStartCommand = () => {
178
179
  console.warn(chalk.yellow(`WARNING: default block is set to '${defaultBlock}', production configuration will likely use 'finalized'`));
179
180
  }
180
181
  // pull images first
181
- await execa("docker", [...composeArgs, "pull"], {
182
+ const pullArgs = ["--policy", "missing"];
183
+ await execa("docker", [...composeArgs, "pull", ...pullArgs], {
182
184
  env,
183
185
  stdio: "inherit",
184
186
  });
@@ -37,7 +37,7 @@ export const getInputApplicationAddress = async (dapp) => {
37
37
  export const createSendCommand = () => {
38
38
  const command = new Command("send")
39
39
  .description("Sends different kinds of input to the application in interactive mode.")
40
- .option("--chain-id <id>", "Chain ID", parseInt, 31337)
40
+ .option("--chain-id <id>", "Chain ID", parseInt, 13370)
41
41
  .option("--rpc-url <url>", "RPC URL")
42
42
  .option("--mnemonic <phrase>", "Mnemonic passphrase")
43
43
  .option("--mnemonic-index <index>", "Mnemonic account index", parseInt, 0)
@@ -17,19 +17,18 @@ CARTESI_CLAIMER_POLLING_INTERVAL="${CARTESI_CLAIMER_POLLING_INTERVAL:-3}"
17
17
  CARTESI_MAX_STARTUP_TIME="${CARTESI_MAX_STARTUP_TIME:-15}"
18
18
 
19
19
  # blockchain
20
- CARTESI_BLOCKCHAIN_ID="${CARTESI_BLOCKCHAIN_ID:-31337}"
20
+ CARTESI_BLOCKCHAIN_ID="${CARTESI_BLOCKCHAIN_ID:-13370}"
21
21
  CARTESI_BLOCKCHAIN_HTTP_ENDPOINT="${CARTESI_BLOCKCHAIN_HTTP_ENDPOINT:-http://anvil:8545}"
22
22
  CARTESI_BLOCKCHAIN_WS_ENDPOINT="${CARTESI_BLOCKCHAIN_WS_ENDPOINT:-ws://anvil:8545}"
23
- CARTESI_BLOCKCHAIN_DEFAULT_BLOCK="${CARTESI_BLOCKCHAIN_DEFAULT_BLOCK:-finalized}"
23
+ CARTESI_BLOCKCHAIN_DEFAULT_BLOCK="${CARTESI_BLOCKCHAIN_DEFAULT_BLOCK:-latest}"
24
24
 
25
25
  # contracts
26
- CARTESI_CONTRACTS_INPUT_BOX_ADDRESS="${CARTESI_CONTRACTS_INPUT_BOX_ADDRESS:-0x593E5BCf894D6829Dd26D0810DA7F064406aebB6}"
27
- CARTESI_CONTRACTS_INPUT_BOX_DEPLOYMENT_BLOCK_NUMBER="${CARTESI_CONTRACTS_INPUT_BOX_DEPLOYMENT_BLOCK_NUMBER:-1}"
28
- CARTESI_CONTRACTS_APPLICATION_FACTORY_ADDRESS="${CARTESI_CONTRACTS_APPLICATION_FACTORY_ADDRESS:-0xd7d4d184b82b1a4e08f304DDaB0A2A7a301C2620}"
29
- CARTESI_CONTRACTS_AUTHORITY_FACTORY_ADDRESS="${CARTESI_CONTRACTS_AUTHORITY_FACTORY_ADDRESS:-0xB897F7Fe78f220aE34B7FA9493092701a873Ed45}"
26
+ CARTESI_CONTRACTS_APPLICATION_FACTORY_ADDRESS="${CARTESI_CONTRACTS_APPLICATION_FACTORY_ADDRESS:-0x2210ad1d9B0bD2D470c2bfA4814ab6253BC421A0}"
27
+ CARTESI_CONTRACTS_AUTHORITY_FACTORY_ADDRESS="${CARTESI_CONTRACTS_AUTHORITY_FACTORY_ADDRESS:-0x451f57Ca716046D114Ab9ff23269a2F9F4a1bdaF}"
28
+ CARTESI_CONTRACTS_SELF_HOSTED_APPLICATION_FACTORY_ADDRESS="${CARTESI_CONTRACTS_SELF_HOSTED_APPLICATION_FACTORY_ADDRESS:-0x4a409e1CaB9229711C4e1f68625DdbC75809e721}"
30
29
 
31
30
  # auth
32
31
  CARTESI_AUTH_MNEMONIC="${CARTESI_AUTH_MNEMONIC:-test test test test test test test test test test test junk}"
33
32
 
34
33
  # postgres
35
- CARTESI_DATABASE_CONNECTION="postgres://postgres:password@database:5432/postgres?sslmode=disable"
34
+ CARTESI_DATABASE_CONNECTION="postgres://postgres:password@database:5432/rollupsdb?sslmode=disable"
@@ -11,5 +11,7 @@ services:
11
11
  retries: 5
12
12
  environment:
13
13
  ANVIL_IP_ADDR: 0.0.0.0
14
- ports:
15
- - 8545:8545
14
+
15
+ proxy:
16
+ volumes:
17
+ - ./proxy/anvil.yaml:/etc/traefik/conf.d/anvil.yaml
@@ -1,5 +1,5 @@
1
1
  services:
2
- alto:
2
+ bundler:
3
3
  image: ${CARTESI_SDK_IMAGE}
4
4
  command:
5
5
  - "alto"
@@ -39,8 +39,5 @@ services:
39
39
  retries: 5
40
40
 
41
41
  proxy:
42
- depends_on:
43
- bundler:
44
- condition: service_healthy
45
42
  volumes:
46
43
  - ./proxy/bundler.yaml:/etc/traefik/conf.d/bundler.yaml
@@ -1,6 +1,6 @@
1
1
  services:
2
2
  database:
3
- image: postgres:16
3
+ image: cartesi/rollups-database:${CARTESI_SDK_VERSION}
4
4
  healthcheck:
5
5
  test: ["CMD-SHELL", "pg_isready -U postgres || exit 1"]
6
6
  start_period: 10s
@@ -1,17 +1,4 @@
1
1
  services:
2
- espresso_database_creator:
3
- image: postgres:16
4
- command: ["createdb", "sequencer"]
5
- depends_on:
6
- database:
7
- condition: service_healthy
8
- environment:
9
- PGHOST: database
10
- PGPORT: 5432
11
- PGUSER: postgres
12
- PGPASSWORD: password
13
- PGDATABASE: postgres
14
-
15
2
  espresso:
16
3
  image: ${CARTESI_SDK_IMAGE}
17
4
  command: ["espresso-dev-node"]
@@ -20,14 +7,9 @@ services:
20
7
  limits:
21
8
  cpus: "4"
22
9
  memory: "1G"
23
- ports:
24
- - 8770:8770
25
- - 8771:8771
26
- - 8772:8772
27
- - 20000:20000
28
10
  depends_on:
29
- espresso_database_creator:
30
- condition: service_completed_successfully
11
+ database:
12
+ condition: service_healthy
31
13
  anvil:
32
14
  condition: service_healthy
33
15
  environment:
@@ -40,7 +22,7 @@ services:
40
22
  ESPRESSO_SEQUENCER_POSTGRES_PORT: 5432
41
23
  ESPRESSO_SEQUENCER_POSTGRES_USER: postgres
42
24
  ESPRESSO_SEQUENCER_POSTGRES_PASSWORD: password
43
- ESPRESSO_SEQUENCER_POSTGRES_DATABASE: sequencer
25
+ ESPRESSO_SEQUENCER_POSTGRES_DATABASE: espresso
44
26
  ESPRESSO_SEQUENCER_ETH_MNEMONIC: ${CARTESI_AUTH_MNEMONIC:-test test test test test test test test test test test junk}
45
27
  ESPRESSO_SEQUENCER_L1_POLLING_INTERVAL: "1s"
46
28
  ESPRESSO_STATE_PROVER_UPDATE_INTERVAL: "1s"
@@ -62,19 +44,6 @@ services:
62
44
  environment:
63
45
  CARTESI_FEATURE_INPUT_READER_ENABLED: false
64
46
 
65
- espresso_reader_migration:
66
- image: ${CARTESI_SDK_IMAGE}
67
- command:
68
- - migrate
69
- - -source
70
- - file:///usr/share/cartesi/rollups-espresso-reader/migrations
71
- - -database
72
- - postgres://postgres:password@database:5432/postgres?sslmode=disable&x-migrations-table=espresso_schema_migrations
73
- - up
74
- depends_on:
75
- rollups-node-migration:
76
- condition: service_completed_successfully
77
-
78
47
  espresso_reader:
79
48
  image: ${CARTESI_SDK_IMAGE}
80
49
  command: ["cartesi-rollups-espresso-reader"]
@@ -83,21 +52,17 @@ services:
83
52
  ports:
84
53
  - 8081
85
54
  depends_on:
86
- espresso_reader_migration:
87
- condition: service_completed_successfully
55
+ database:
56
+ condition: service_healthy
88
57
  espresso:
89
58
  condition: service_healthy
90
59
  environment:
91
- CARTESI_POSTGRES_ENDPOINT: postgres://postgres:password@database:5432/postgres?sslmode=disable
60
+ CARTESI_POSTGRES_ENDPOINT: postgres://postgres:password@database:5432/rollupsdb?sslmode=disable
92
61
  ESPRESSO_SERVICE_ENDPOINT: ":8081"
93
62
  ESPRESSO_BASE_URL: http://espresso:8770
94
63
  ESPRESSO_NAMESPACE: 51025
95
64
  ESPRESSO_STARTING_BLOCK: 101
96
65
 
97
66
  proxy:
98
- depends_on:
99
- espresso:
100
- condition: service_healthy
101
67
  volumes:
102
68
  - ./proxy/espresso.yaml:/etc/traefik/conf.d/espresso.yaml
103
- - ./proxy/espresso-reader.yaml:/etc/traefik/conf.d/espresso-reader.yaml
@@ -1,17 +1,4 @@
1
1
  services:
2
- database_creator:
3
- image: postgres:16
4
- command: ["createdb", "squid"]
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
2
  explorer_api:
16
3
  image: cartesi/rollups-explorer-api:0.5.0
17
4
  environment:
@@ -37,38 +24,33 @@ services:
37
24
  timeout: 1s
38
25
  retries: 5
39
26
  depends_on:
40
- database_creator:
41
- condition: service_completed_successfully
27
+ database:
28
+ condition: service_healthy
42
29
 
43
30
  squid_processor:
44
31
  image: cartesi/rollups-explorer-api:0.5.0
45
32
  environment:
46
- CHAIN_ID: ${CHAIN_ID:-31337}
33
+ CHAIN_ID: ${CHAIN_ID:-13370}
47
34
  RPC_URL_31337: ${RPC_URL:-http://anvil:8545}
48
- BLOCK_CONFIRMATIONS_31337: 0
35
+ BLOCK_CONFIRMATIONS_13370: 0
49
36
  DB_NAME: ${PGDATABASE:-squid}
50
37
  DB_PORT: ${PGPORT:-5432}
51
38
  DB_HOST: ${PGHOST:-database}
52
39
  DB_PASS: ${PGPASSWORD:-password}
53
40
  command: ["sqd", "process:prod"]
54
41
  depends_on:
55
- database_creator:
56
- condition: service_completed_successfully
42
+ database:
43
+ condition: service_healthy
57
44
 
58
45
  explorer:
59
46
  image: cartesi/rollups-explorer:0.12.0
60
47
  expose:
61
48
  - 3000
62
49
  depends_on:
63
- database_creator:
64
- condition: service_completed_successfully
50
+ database:
51
+ condition: service_healthy
65
52
 
66
53
  proxy:
67
- depends_on:
68
- explorer_api:
69
- condition: service_healthy
70
- explorer:
71
- condition: service_healthy
72
54
  volumes:
73
55
  - ./proxy/explorer.yaml:/etc/traefik/conf.d/explorer.yaml
74
56
  - ./proxy/explorer-api.yaml:/etc/traefik/conf.d/explorer-api.yaml
@@ -1,35 +1,9 @@
1
1
  services:
2
- graphql_database_creator:
3
- image: postgres:16
4
- command: ["createdb", "graphql"]
5
- depends_on:
6
- database:
7
- condition: service_healthy
8
- environment:
9
- PGHOST: database
10
- PGPORT: 5432
11
- PGUSER: postgres
12
- PGPASSWORD: password
13
- PGDATABASE: postgres
14
-
15
- graphql_database_migration:
16
- image: ${CARTESI_SDK_IMAGE}
17
- command:
18
- - migrate
19
- - -path
20
- - /usr/share/cartesi/rollups-graphql/migrations
21
- - -database
22
- - postgres://postgres:password@database:5432/graphql?sslmode=disable
23
- - up
24
- depends_on:
25
- graphql_database_creator:
26
- condition: service_completed_successfully
27
-
28
2
  graphql:
29
3
  image: ${CARTESI_SDK_IMAGE}
30
4
  environment:
31
5
  POSTGRES_GRAPHQL_DB_URL: postgres://postgres:password@database:5432/graphql?sslmode=disable
32
- POSTGRES_NODE_DB_URL: postgres://postgres:password@database:5432/postgres?sslmode=disable
6
+ POSTGRES_NODE_DB_URL: postgres://postgres:password@database:5432/rollupsdb?sslmode=disable
33
7
  expose:
34
8
  - 8080
35
9
  command: ["cartesi-rollups-graphql"]
@@ -41,12 +15,9 @@ services:
41
15
  timeout: 1s
42
16
  retries: 5
43
17
  depends_on:
44
- graphql_database_migration:
45
- condition: service_completed_successfully
18
+ database:
19
+ condition: service_healthy
46
20
 
47
21
  proxy:
48
- depends_on:
49
- graphql:
50
- condition: service_healthy
51
22
  volumes:
52
23
  - ./proxy/graphql.yaml:/etc/traefik/conf.d/graphql.yaml
@@ -1,19 +1,9 @@
1
1
  services:
2
- rollups-node-migration:
3
- image: ${CARTESI_SDK_IMAGE}
4
- command: ["cartesi-rollups-cli", "db", "upgrade"]
2
+ rollups-node:
3
+ image: cartesi/rollups-runtime:${CARTESI_SDK_VERSION}
5
4
  depends_on:
6
5
  database:
7
6
  condition: service_healthy
8
- restart: "no"
9
- env_file:
10
- - ${CARTESI_BIN_PATH}/compose/rollups/default.env
11
-
12
- rollups-node:
13
- image: ${CARTESI_SDK_IMAGE}
14
- depends_on:
15
- rollups-node-migration:
16
- condition: service_completed_successfully
17
7
  anvil:
18
8
  condition: service_healthy
19
9
  expose:
@@ -32,8 +22,5 @@ services:
32
22
  - ${CARTESI_BIN_PATH}/compose/rollups/default.env
33
23
 
34
24
  proxy:
35
- depends_on:
36
- rollups-node:
37
- condition: service_healthy
38
25
  volumes:
39
26
  - ./proxy/rollups-node.yaml:/etc/traefik/conf.d/rollups-node.yaml
@@ -14,8 +14,5 @@ services:
14
14
  retries: 5
15
15
 
16
16
  proxy:
17
- depends_on:
18
- paymaster:
19
- condition: service_healthy
20
17
  volumes:
21
18
  - ./proxy/paymaster.yaml:/etc/traefik/conf.d/paymaster.yaml
@@ -17,6 +17,8 @@ services:
17
17
  "--metrics.prometheus.addServicesLabels=true",
18
18
  "--providers.file.directory=/etc/traefik/conf.d",
19
19
  "--providers.file.watch=true",
20
+ "--log",
21
+ "--log.level=INFO",
20
22
  ]
21
23
  ports:
22
24
  - ${CARTESI_LISTEN_PORT:-8080}:8088
@@ -0,0 +1,17 @@
1
+ http:
2
+ routers:
3
+ anvil:
4
+ rule: "PathPrefix(`/anvil`)"
5
+ middlewares:
6
+ - "remove-anvil-prefix"
7
+ service: anvil
8
+ middlewares:
9
+ remove-anvil-prefix:
10
+ replacePathRegex:
11
+ regex: "^/anvil(.*)"
12
+ replacement: "$1"
13
+ services:
14
+ anvil:
15
+ loadBalancer:
16
+ servers:
17
+ - url: "http://anvil:8545"
@@ -1,56 +1,17 @@
1
1
  http:
2
2
  routers:
3
- espresso-builder:
4
- rule: "PathPrefix(`/espresso/builder`)"
3
+ espresso-reader:
4
+ rule: "PathPrefix(`/transaction`)"
5
5
  middlewares:
6
- - "remove-espresso-builder-prefix"
7
- service: espresso-builder
8
- espresso-dev:
9
- rule: "PathPrefix(`/espresso/dev`)"
10
- middlewares:
11
- - "remove-espresso-dev-prefix"
12
- service: espresso-dev
13
- espresso-prover:
14
- rule: "PathPrefix(`/espresso/prover`)"
15
- middlewares:
16
- - "remove-espresso-prover-prefix"
17
- service: espresso-prover
18
- espresso-sequencer:
19
- rule: "PathPrefix(`/espresso/sequencer`)"
20
- middlewares:
21
- - "remove-espresso-sequencer-prefix"
22
- service: espresso-sequencer
6
+ - "remove-espresso-reader-prefix"
7
+ service: espresso-reader
23
8
  middlewares:
24
- remove-espresso-builder-prefix:
25
- replacePathRegex:
26
- regex: "^/espresso/builder/(.*)"
27
- replacement: "/$1"
28
- remove-espresso-dev-prefix:
29
- replacePathRegex:
30
- regex: "^/espresso/dev/(.*)"
31
- replacement: "/$1"
32
- remove-espresso-prover-prefix:
9
+ remove-espresso-reader-prefix:
33
10
  replacePathRegex:
34
- regex: "^/espresso/prover/(.*)"
35
- replacement: "/$1"
36
- remove-espresso-sequencer-prefix:
37
- replacePathRegex:
38
- regex: "^/espresso/sequencer/(.*)"
11
+ regex: "^/transaction/(.*)"
39
12
  replacement: "/$1"
40
13
  services:
41
- espresso-builder:
42
- loadBalancer:
43
- servers:
44
- - url: "http://espresso:8771"
45
- espresso-dev:
46
- loadBalancer:
47
- servers:
48
- - url: "http://espresso:20000"
49
- espresso-prover:
50
- loadBalancer:
51
- servers:
52
- - url: "http://espresso:8772"
53
- espresso-sequencer:
14
+ espresso-reader:
54
15
  loadBalancer:
55
16
  servers:
56
- - url: "http://espresso:8770"
17
+ - url: "http://espresso_reader:8081"
package/dist/config.d.ts CHANGED
@@ -29,7 +29,8 @@ 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.11";
32
+ export declare const DEFAULT_SDK_VERSION = "0.12.0-alpha.13";
33
+ export declare const DEFAULT_SDK_IMAGE = "cartesi/sdk:0.12.0-alpha.13";
33
34
  type DriveFormat = "ext2" | "sqfs";
34
35
  export type ImageInfo = {
35
36
  cmd: string[];