Repository: cartesi/cli
Pull request #150: feat(cli): add espresso-reader
Author: login: endersonmaia
Labels: name: cli
Created: 2025-02-03T19:23:54Z | Merged: 2025-03-18T16:34:12Z

You can test this with:

```
pnpm build --filter @cartesi/cli
alias cartesi-dev=$PWD/apps/cli/dist/index.js
cartesi-dev create --branch=prerelease/sdk-12 --template=go my-go-dapp-v2 
cd my-go-dapp-v2
cartesi-dev build
cartesi-dev rollups start --services espresso,graphql
cartesi-dev rollups deploy
```

The `rollups-espresso-reader` endpoints should be available at:

- http://localhost:8080/espresso/reader/nonce
- http://localhost:8080/espresso/reader/submit



Diff:
diff --git a/.changeset/tasty-chairs-doubt.md b/.changeset/tasty-chairs-doubt.md
new file mode 100644
index 00000000..33737f14
--- /dev/null
+++ b/.changeset/tasty-chairs-doubt.md
@@ -0,0 +1,5 @@
+---
+"@cartesi/cli": patch
+---
+
+add rollups-espresso-reader service
diff --git a/apps/cli/src/compose/rollups/docker-compose-espresso.yaml b/apps/cli/src/compose/rollups/docker-compose-espresso.yaml
index f989c630..f4c48b33 100644
--- a/apps/cli/src/compose/rollups/docker-compose-espresso.yaml
+++ b/apps/cli/src/compose/rollups/docker-compose-espresso.yaml
@@ -6,15 +6,11 @@ services:
             database:
                 condition: service_healthy
         environment:
-            PGHOST: ${PGHOST:-database}
-            PGPORT: ${PGPORT:-5432}
-            PGUSER: ${PGUSER:-postgres}
-            PGPASSWORD: ${PGPASSWORD:-password}
-            PGDATABASE: ${PGDATABASE:-postgres}
-
-    rollups-node:
-        environment:
-            CARTESI_FEATURE_INPUT_READER_ENABLED: false
+            PGHOST: database
+            PGPORT: 5432
+            PGUSER: postgres
+            PGPASSWORD: password
+            PGDATABASE: postgres
 
     espresso:
         image: ${CARTESI_SDK_IMAGE}
@@ -32,7 +28,7 @@ services:
         depends_on:
             espresso_database_creator:
                 condition: service_completed_successfully
-            database:
+            anvil:
                 condition: service_healthy
         environment:
             ESPRESSO_SEQUENCER_L1_PROVIDER: ${CARTESI_BLOCKCHAIN_HTTP_ENDPOINT:-http://anvil:8545}
@@ -46,6 +42,8 @@ services:
             ESPRESSO_SEQUENCER_POSTGRES_PASSWORD: password
             ESPRESSO_SEQUENCER_POSTGRES_DATABASE: sequencer
             ESPRESSO_SEQUENCER_ETH_MNEMONIC: ${CARTESI_AUTH_MNEMONIC:-test test test test test test test test test test test junk}
+            ESPRESSO_SEQUENCER_L1_POLLING_INTERVAL: "1s"
+            ESPRESSO_STATE_PROVER_UPDATE_INTERVAL: "1s"
         healthcheck:
             test:
                 [
@@ -60,9 +58,46 @@ services:
             timeout: 1s
             retries: 5
 
+    rollups-node:
+        environment:
+            CARTESI_FEATURE_INPUT_READER_ENABLED: false
+
+    espresso_reader_migration:
+        image: ${CARTESI_SDK_IMAGE}
+        command:
+            - migrate
+            - -source
+            - file:///usr/share/cartesi/rollups-espresso-reader/migrations
+            - -database
+            - postgres://postgres:password@database:5432/postgres?sslmode=disable&x-migrations-table=espresso_schema_migrations
+            - up
+        depends_on:
+            rollups-node-migration:
+                condition: service_completed_successfully
+
+    espresso_reader:
+        image: ${CARTESI_SDK_IMAGE}
+        command: ["cartesi-rollups-espresso-reader"]
+        env_file:
+            - ${CARTESI_BIN_PATH}/compose/rollups/default.env
+        ports:
+            - 8081
+        depends_on:
+            espresso_reader_migration:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        environment:
+            CARTESI_POSTGRES_ENDPOINT: postgres://postgres:password@database:5432/postgres?sslmode=disable
+            ESPRESSO_SERVICE_ENDPOINT: ":8081"
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
+
     proxy:
         depends_on:
             espresso:
                 condition: service_healthy
         volumes:
             - ./proxy/espresso.yaml:/etc/traefik/conf.d/espresso.yaml
+            - ./proxy/espresso-reader.yaml:/etc/traefik/conf.d/espresso-reader.yaml
diff --git a/apps/cli/src/compose/rollups/proxy/espresso-reader.yaml b/apps/cli/src/compose/rollups/proxy/espresso-reader.yaml
new file mode 100644
index 00000000..daacf317
--- /dev/null
+++ b/apps/cli/src/compose/rollups/proxy/espresso-reader.yaml
@@ -0,0 +1,17 @@
+http:
+    routers:
+        espresso-reader:
+            rule: "PathPrefix(`/espresso/reader`)"
+            middlewares:
+                - "remove-espresso-reader-prefix"
+            service: espresso-reader
+    middlewares:
+        remove-espresso-reader-prefix:
+            replacePathRegex:
+                regex: "^/espresso/reader/(.*)"
+                replacement: "/$1"
+    services:
+        espresso-reader:
+            loadBalancer:
+                servers:
+                    - url: "http://espresso_reader:8081"


Reviews:
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-04T14:13:56Z
user: login: tuler
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-04T14:33:04Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-04T14:57:54Z
user: login: miltonjonat
body: I couldn't access the espresso endpoint on http://localhost:8080/espresso, only directly on http://localhost:8770. Is that expected?
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-06T13:37:20Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-06T13:51:19Z
user: login: endersonmaia
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-06T13:55:29Z
user: login: endersonmaia
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-06T14:24:36Z
user: login: endersonmaia
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-06T20:19:58Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-06T21:43:21Z
user: login: tuler
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-06T22:00:48Z
user: login: tuler
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-06T22:05:01Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-07T14:13:06Z
user: login: endersonmaia
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-07T14:17:34Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-07T14:23:56Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-07T14:27:28Z
user: login: tuler
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-07T14:31:09Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-02-07T19:08:24Z
user: login: tuler
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-17T19:09:15Z
user: login: miltonjonat
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-17T19:36:39Z
user: login: tuler
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-18T16:30:28Z
user: login: tuler
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-18T16:32:22Z

Review comments:
diff_hunk: @@ -45,6 +91,11 @@ services:
             ESPRESSO_SEQUENCER_POSTGRES_PASSWORD: password
             ESPRESSO_SEQUENCER_POSTGRES_DATABASE: sequencer
             ESPRESSO_SEQUENCER_ETH_MNEMONIC: ${CARTESI_AUTH_MNEMONIC:-test test test test test test test test test test test junk}
+            ESPRESSO_STATE_PROVER_UPDATE_INTERVAL: "1s"
+            ESPRESSO_STATE_PROVER_RETRY_INTERVAL: "500ms"
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: what are these ESPRESSO_STATE_PROVER variables?
created_at: 2025-02-04T14:13:56Z
author_association: NONE
diff_hunk: @@ -45,6 +91,11 @@ services:
             ESPRESSO_SEQUENCER_POSTGRES_PASSWORD: password
             ESPRESSO_SEQUENCER_POSTGRES_DATABASE: sequencer
             ESPRESSO_SEQUENCER_ETH_MNEMONIC: ${CARTESI_AUTH_MNEMONIC:-test test test test test test test test test test test junk}
+            ESPRESSO_STATE_PROVER_UPDATE_INTERVAL: "1s"
+            ESPRESSO_STATE_PROVER_RETRY_INTERVAL: "500ms"
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: tuler
body: According to the docs at https://github.com/EspressoSystems/espresso-sequencer/blob/main/doc/espresso-dev-node.md

ESPRESSO_STATE_PROVER_UPDATE_INTERVAL: The frequency of updating the light client state
ESPRESSO_STATE_PROVER_RETRY_INTERVAL: Interval between retries if a state update fails.
created_at: 2025-02-04T14:33:03Z
author_association: MEMBER
diff_hunk: @@ -45,6 +91,11 @@ services:
             ESPRESSO_SEQUENCER_POSTGRES_PASSWORD: password
             ESPRESSO_SEQUENCER_POSTGRES_DATABASE: sequencer
             ESPRESSO_SEQUENCER_ETH_MNEMONIC: ${CARTESI_AUTH_MNEMONIC:-test test test test test test test test test test test junk}
+            ESPRESSO_STATE_PROVER_UPDATE_INTERVAL: "1s"
+            ESPRESSO_STATE_PROVER_RETRY_INTERVAL: "500ms"
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: Oh right. Sorry, I completely misread this and thought these were configs for our reader, not Espresso itself!
created_at: 2025-02-04T14:57:54Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: ```suggestion
        image: cartesi/sdk:0.12.0-alpha.5
```
created_at: 2025-02-06T13:21:38Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: The rollups-espresso-reader does a weird thing: it publishes two endpoints `/nonce` and `/submit`  on a port configurable with env ESPRESSO_SERVICE_ENDPOINT (default I think is 8080). We'd need to expose these too.
created_at: 2025-02-06T13:51:19Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: endersonmaia
body: What do you think about this format?

- `/espresso/reader/nonce`
- `/espresso/reader/submit`

If the developer interaction if gonna be focused on those endpoints, we could even hide everything from `espresso-dev-node` and only publish those at `/espresso/submit` and `/espresso/nonce`, also.


created_at: 2025-02-06T13:55:28Z
author_association: CONTRIBUTOR
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: endersonmaia
body: Already bumped to new sdk:0.12.0-alpha.6 that already containes espresso-dev-node with ;latest `patch5` tag.
created_at: 2025-02-06T14:24:36Z
author_association: CONTRIBUTOR
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: endersonmaia
body: @miltonjonat I sent a fixup where you can access those endpoints at:

 - `http://localhost:8080/espresso/reader/nonce`
- `http://localhost:8080/espresso/reader/submit`

Please, let me know if it works!
created_at: 2025-02-06T20:19:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: So, these endpoints are currently conveniences for the Espresso integration, and strictly speaking they could (or should?) be part of another component separate from the reader itself. So, no, I wouldn't use "reader" there.

Frankly, I think it's also quite odd to put it under "espresso" in this context, because that "espresso" there is meant to be the (local) Espresso Network, while these are endpoints on the Node itself.

Tbh, the idea here was also that the Node would provide `/nonce` and `/submit` functionalities as something more universal (i.e., to also be used when integrated with Avail, Celestia, etc). And that clients wouldn't even know which alt-DA was being used by the app/node.

**TL;DR**, I'd use http://localhost:8080/nonce and http://localhost:8080/submit directly; *or* we could come up with a nice namespace for convenience endpoints of this kind (maybe http://localhost:8080/tx/nonce?)
created_at: 2025-02-06T21:43:21Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: tuler
body: I understand there is no unified way to send a transaction. anvil expects ethereum transactions as specified by [eth_sendTransaction](https://docs.metamask.io/wallet/reference/json-rpc-methods/eth_sendtransaction/), espresso expects a [transaction](https://docs.espressosys.com/network/api-reference/sequencer-api#transaction) object, avail has its own [spec](https://docs.availproject.org/api-reference/avail-node-api/da-submit-data). 

So having a single `/nonce` and `/submit` at the root of the service, regardless the configured DA, with various formats will be extremely confusing.
created_at: 2025-02-06T22:00:43Z
author_association: MEMBER
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: tuler
body: If the only APIs the application developer will use in case he chooses espresso as DA are the `/nonce` and `/submit`, I wouldn't even expose the espresso-dev-node APIs to the host, as they would be used internally (inside docker network) by the `espresso-reader`.

The application developer APIs would be at http://localhost:8080/espresso/nonce and http://localhost:8080/espresso/submit

Does the developer need direct access to espresso-dev-node?
created_at: 2025-02-06T22:05:01Z
author_association: MEMBER
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: I agree, I don't expect the developer to have to access the Espresso Network directly (espresso-dev-node or Espresso Decaf Testnet in case he's using that). It's just part of the environment, may be somewhat useful to see how things are working if you want to debug deeper, but definitely not necessary.

created_at: 2025-02-07T14:13:06Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: endersonmaia
body: I'm exposing those espresso-dev-node ports to the host to test if thins are working, but they should be removed on the final version of this PR togethers with the `/espresso` endpoints for the proxy.

About the `/nonce` and `/submit` endpoints from the espresso-reader, I need a definition so I can apply in this PR.
created_at: 2025-02-07T14:17:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: > I understand there is no unified way to send a transaction. anvil expects ethereum transactions as specified by [eth_sendTransaction](https://docs.metamask.io/wallet/reference/json-rpc-methods/eth_sendtransaction/), espresso expects a [transaction](https://docs.espressosys.com/network/api-reference/sequencer-api#transaction) object, avail has its own [spec](https://docs.availproject.org/api-reference/avail-node-api/da-submit-data).
> 
> So having a single `/nonce` and `/submit` at the root of the service, regardless the configured DA, with various formats will be extremely confusing.

I see this differently. With Paio, we standardized an [EIP-712 structure to be used when submitting tx's](https://github.com/cartesi/rollups-espresso-reader/blob/main/docs/development.md#signing-a-transaction). This structure includes the target chainId and app address, nonce, and envisions payment info too. Avail and Celestia integrations would use this via Paio, and we adopted it for the Espresso integration as well (Espresso itself doesn't have any spec on the payload you submit, which doesn't even need to be signed atm). The idea is that you would use `/nonce` and `/submit` for all L2 tx submissions (i.e., that use Paio / alt-DA), while of course clients would still send direct L1 Eth tx's via the InputBox for L1->L2 messages.

Now, another interesting discussion would be to provide a standard Eth JSON-RPC API on the Node for these L2 tx's. I'd like that, but I don't know how viable it is. It would be part of that redesign discussion for all this architecture.
created_at: 2025-02-07T14:23:56Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: So, one path what would be very adherent to the current architecture would be something like `L2tx`, leading to http://localhost:8080/L2tx/nonce and http://localhost:8080/L2tx/submit (I suggested `tx` above, but I admit that `L2tx` would be more precise)
created_at: 2025-02-07T14:27:28Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: tuler
body: How are you going to use a single format for DAs with different requirements?
I.e. how do you define the namespace in case of Espresso?
created_at: 2025-02-07T14:31:09Z
author_association: MEMBER
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: In the current design, the client/user does not inform any DA-specific parameters in the payload it submits. Whatever is required to submit to the alt-DA configured for the application should be given by DA-specific parameters defined upon deployment of the app, and stored as on-chain app configuration. The Node will fetch that from the application contract (it's currently defined as an ABI encoded method+parameters), and thus know how to handle tx submission when `/submit` is called.

created_at: 2025-02-07T19:08:23Z
author_association: NONE
diff_hunk: @@ -66,3 +101,4 @@ services:
                 condition: service_healthy
         volumes:
             - ./proxy/espresso.yaml:/etc/traefik/conf.d/espresso.yaml
+            - ./proxy/espresso-reader.yaml:/etc/traefik/conf.d/expresso-reader.yaml
path: apps/cli/src/compose/rollups/docker-compose-espresso.yaml
user: login: tuler
body: ```suggestion
            - ./proxy/espresso-reader.yaml:/etc/traefik/conf.d/espresso-reader.yaml
```
created_at: 2025-03-17T19:07:17Z
author_association: MEMBER
diff_hunk: @@ -16,6 +16,39 @@ services:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
 
+    espresso_reader_migration:
+        image: cartesi/sdk:0.12.0-alpha.8
path: apps/cli/src/compose/rollups/docker-compose-espresso.yaml
user: login: tuler
body: ```suggestion
        image: ${CARTESI_SDK_IMAGE}
```
created_at: 2025-03-17T19:08:05Z
author_association: MEMBER
diff_hunk: @@ -16,6 +16,39 @@ services:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
 
+    espresso_reader_migration:
+        image: cartesi/sdk:0.12.0-alpha.8
+        command:
+            - /bin/bash
path: apps/cli/src/compose/rollups/docker-compose-espresso.yaml
user: login: tuler
body: I don't think we need bash
created_at: 2025-03-17T19:08:17Z
author_association: MEMBER
diff_hunk: @@ -16,6 +16,39 @@ services:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
 
+    espresso_reader_migration:
+        image: cartesi/sdk:0.12.0-alpha.8
+        command:
+            - /bin/bash
+            - -c
+            - |
+                migrate                                                                                                                         \
+                -source file:///usr/share/cartesi/rollups-espresso-reader/migrations                                                            \
+                -database "postgres://postgres:password@database:5432/postgres?sslmode=disable&x-migrations-table=espresso_schema_migrations"   \
+                up
+        depends_on:
+            rollups-node-migration:
+                condition: service_completed_successfully
+
+    espresso_reader:
+        image: cartesi/sdk:0.12.0-alpha.8
path: apps/cli/src/compose/rollups/docker-compose-espresso.yaml
user: login: tuler
body: ```suggestion
        image: ${CARTESI_SDK_IMAGE}
```
created_at: 2025-03-17T19:08:29Z
author_association: MEMBER
diff_hunk: @@ -16,6 +16,39 @@ services:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
 
+    espresso_reader_migration:
+        image: cartesi/sdk:0.12.0-alpha.8
+        command:
+            - /bin/bash
+            - -c
+            - |
+                migrate                                                                                                                         \
+                -source file:///usr/share/cartesi/rollups-espresso-reader/migrations                                                            \
+                -database "postgres://postgres:password@database:5432/postgres?sslmode=disable&x-migrations-table=espresso_schema_migrations"   \
+                up
+        depends_on:
+            rollups-node-migration:
+                condition: service_completed_successfully
+
+    espresso_reader:
+        image: cartesi/sdk:0.12.0-alpha.8
+        command: "cartesi-rollups-espresso-reader"
path: apps/cli/src/compose/rollups/docker-compose-espresso.yaml
user: login: tuler
body: ```suggestion
        command: ["cartesi-rollups-espresso-reader"]
```
created_at: 2025-03-17T19:08:41Z
author_association: MEMBER
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: miltonjonat
body: Coming back to this from the discussions on #171, I'm now thinking that a path that would make sense would be http://localhost:8080/eip712/nonce and http://localhost:8080/eip712/submit 

What do you think?
created_at: 2025-03-17T19:36:39Z
author_association: NONE
diff_hunk: @@ -15,9 +15,53 @@ services:
     validator:
         environment:
             CARTESI_FEATURE_INPUT_READER_ENABLED: false
+    espresso_reader_migrate:
+        image: golang:1.23
+        command:
+            - /bin/bash
+            - -c
+            - |
+                git clone --depth 1 https://github.com/cartesi/rollups-espresso-reader.git --branch v0.2.1-node-20250128
+                cd rollups-espresso-reader
+                make migrate
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        depends_on:
+            database:
+                condition: service_healthy
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+
+    espresso_reader:
+        image: cartesi/sdk:devel
+        command: "cartesi-rollups-espresso-reader"
+        depends_on:
+            espresso_reader_migrate:
+                condition: service_completed_successfully
+            espresso:
+                condition: service_healthy
+        env_file:
+            - ${CARTESI_BIN_PATH}/node/default.env
+        environment:
+            DATABASE_URL: postgres://postgres:password@database:5432/espresso_reader
+            ESPRESSO_BASE_URL: http://espresso:8770
+            ESPRESSO_NAMESPACE: 51025
+            ESPRESSO_STARTING_BLOCK: 101
path: apps/cli/src/node/docker-compose-espresso.yaml
user: login: tuler
body: EIP-712 is a typed structured data hashing and signing standard. I don't think it should be the name of the service.
created_at: 2025-03-18T16:30:28Z
author_association: MEMBER

PR comments:
user: login: changeset-bot[bot]
created_at: 2025-02-03T19:23:58Z
body: ###  🦋  Changeset detected

Latest commit: 79f7ac718449b953b2cf005ee96294407cf20112

**The changes in this PR will be included in the next version bump.**

<details><summary>This PR includes changesets to release 1 package</summary>

  | Name         | Type  |
| ------------ | ----- |
| @cartesi/cli | Patch |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/cartesi/cli/new/feature/add-espresso-reader-to-cli?filename=.changeset/perfect-scissors-design.md&value=---%0A%22%40cartesi%2Fcli%22%3A%20patch%0A---%0A%0Afeat(cli)%3A%20add%20espresso-reader%0A)


author_association: NONE
user: login: github-actions[bot]
created_at: 2025-02-03T19:25:32Z
body: <h2>Coverage Report for ./apps/cli</h2>
<table> <thead> <tr> <th align="center">Status</th> <th align="left">Category</th> <th align="right">Percentage</th> <th align="right">Covered / Total</th> </tr> </thead> <tbody> <tr> <td align="center">🔵</td> <td align="left">Lines</td> <td align="right">27.46%</td> <td align="right">293 / 1067</td> </tr> <tr> <td align="center">🔵</td> <td align="left">Statements</td> <td align="right">27.41%</td> <td align="right">298 / 1087</td> </tr> <tr> <td align="center">🔵</td> <td align="left">Functions</td> <td align="right">27.27%</td> <td align="right">51 / 187</td> </tr> <tr> <td align="center">🔵</td> <td align="left">Branches</td> <td align="right">25.74%</td> <td align="right">121 / 470</td> </tr> </tbody> </table><details><summary>File Coverage</summary>No changed files found.</details>
<em>Generated in workflow <a href=https://github.com/cartesi/cli/actions/runs/13927185854>#387</a> for commit <a href="https://github.com/cartesi/cli/commit/79f7ac718449b953b2cf005ee96294407cf20112">79f7ac7</a> by the <a href="https://github.com/davelosert/vitest-coverage-report-action">Vitest Coverage Report Action</a></em>

<!-- vitest-coverage-report-marker-./apps/cli -->
author_association: CONTRIBUTOR
user: login: miltonjonat
created_at: 2025-02-06T13:33:35Z
body: Instructions fixing typos :)
```
pnpm build --filter @cartesi/cli
alias cartesi-dev=$PWD/apps/cli/bin/run.js
cartesi-dev create --branch=prerelease/sdk-12 --template=go my-go-dapp-v2 
cd my-go-dapp-v2
cartesi-dev build
cartesi-dev run --enable-espresso
```
author_association: NONE
user: login: endersonmaia
created_at: 2025-02-06T13:44:23Z
body: > I couldn't access the espresso endpoint on http://localhost:8080/espresso, only directly on http://localhost:8770. Is that expected?

It's missing some instructions. We expose 4 espresso API endpoints via names PATHs, they are:

- `http://localhost:8080/espresso/sequencer`
- `http://localhost:8080/espresso/builder`
- `http://localhost:8080/espresso/prover`
- `http://localhost:8080/espresso/dev`

So if you wanna call the `/v0/status/block-height` you should call

`curl http://localhost:8080/espresso/sequencer/v0/status/block-height`
author_association: CONTRIBUTOR
user: login: miltonjonat
created_at: 2025-03-03T22:52:39Z
body: I tried it out, had some issues, and couldn't run in the end.
1. `./apps/cli/bin/run.js` is not being generated by `pnpm build`
2. If I go to that directory and run `pnpm build`, it generates output in the `dist` folder. It seems to work if I use `alias cartesi-dev=$PWD/apps/cli/dist/index.js`; using `cartesi-dev build` works
3. `cartesi-dev run --enable-espresso` fails, with message `service "espresso_reader_migration" didn't complete successfully: exit 1`. Full log (with verbose): [cartesi-dev.run.log.zip](https://github.com/user-attachments/files/19061500/cartesi-dev.run.log.zip)

author_association: NONE
user: login: endersonmaia
created_at: 2025-03-06T12:58:16Z
body: > I tried it out, had some issues, and couldn't run in the end.
> 
> 1. `./apps/cli/bin/run.js` is not being generated by `pnpm build`
> 2. If I go to that directory and run `pnpm build`, it generates output in the `dist` folder. It seems to work if I use `alias cartesi-dev=$PWD/apps/cli/dist/index.js`; using `cartesi-dev build` works
> 3. `cartesi-dev run --enable-espresso` fails, with message `service "espresso_reader_migration" didn't complete successfully: exit 1`. Full log (with verbose): [cartesi-dev.run.log.zip](https://github.com/user-attachments/files/19061500/cartesi-dev.run.log.zip)

The failure was `error: migration failed: type "ethereum_address" does not exist`.

The migration code doesn't mention the creation of this `ethereum_address` type.

https://github.com/cartesi/rollups-espresso-reader/blob/v0.2.1-node-20250128/internal/repository/postgres/schema/migrations/000001_espresso_db.up.sql
author_association: CONTRIBUTOR
user: login: miltonjonat
created_at: 2025-03-06T13:36:15Z
body: That's part of the Node migration, which has to be executed before the Espresso Reader's one.
https://github.com/cartesi/rollups-node//blob/feature/new-build-20250128/internal/repository/postgres/schema/migrations/000001_create_initial_schema.up.sql#L4
author_association: NONE
user: login: endersonmaia
created_at: 2025-03-06T14:22:16Z
body: > That's part of the Node migration, which has to be executed before the Espresso Reader's one. https://github.com/cartesi/rollups-node//blob/feature/new-build-20250128/internal/repository/postgres/schema/migrations/000001_create_initial_schema.up.sql#L4

Sent a fixup for that. [0fb7ac6](https://github.com/cartesi/cli/pull/150/commits/0fb7ac6ea701737a1798d8aeb3325e483f199a7f)

I'll have to rebase this on top of `feature/cli-run-v2`, it has a lot of braking changes, then I'll provide a cleaner commit history so we can go back to testing this again.
author_association: CONTRIBUTOR
user: login: miltonjonat
created_at: 2025-03-10T22:55:19Z
body: @endersonmaia cool new instructions! I like the `--services espresso,graphql` thing.
Unfortunately, it didn't run: migrations failed again. It seems that the database is dying for some reason, even when running without any extra services.

- Log with both espresso and graphql services: [start-espresso-graphql.log.gz](https://github.com/user-attachments/files/19171698/start-espresso-graphql.log.gz)
- Log with only espresso service: [start-espresso.log.gz](https://github.com/user-attachments/files/19171699/start-espresso.log.gz)
- Log without any extra service: [start-no-services.log.gz](https://github.com/user-attachments/files/19171700/start-no-services.log.gz)


author_association: NONE
user: login: tuler
created_at: 2025-03-10T23:02:38Z
body: > * Log without any extra service: [start-no-services.log.gz](https://github.com/user-attachments/files/19171700/start-no-services.log.gz)

Strange that it is reporting a database url as `postgres://postgres:password@localhost:5432/rollupsdb?sslmode=disable`, with database name as `rollupsdb`. It should be `postgres`.

Did you change any of that?
author_association: MEMBER
user: login: miltonjonat
created_at: 2025-03-10T23:49:10Z
body: > > * Log without any extra service: [start-no-services.log.gz](https://github.com/user-attachments/files/19171700/start-no-services.log.gz)
> 
> Strange that it is reporting a database url as `postgres://postgres:password@localhost:5432/rollupsdb?sslmode=disable`, with database name as `rollupsdb`. It should be `postgres`.
> 
> Did you change any of that?

I didn't change anything, but AFAIK in Node v2 the database is always called `rollupsdb` (e.g., https://github.com/cartesi/rollups-node/blob/feature/new-build/Makefile#L82)
Btw, which Node branch/tag are you guys using? The Espresso Reader is currently on https://github.com/cartesi/rollups-node/releases/tag/v2.0.0-dev-20250128
author_association: NONE
user: login: tuler
created_at: 2025-03-11T00:12:53Z
body: > Btw, which Node branch/tag are you guys using?

We are testing locally with branch `feature/new-build` while we wait for a tag.
author_association: MEMBER
user: login: tuler
created_at: 2025-03-11T00:16:11Z
body: > AFAIK in Node v2 the database is always called `rollupsdb

We define the env var https://github.com/cartesi/cli/blob/8c2ba890dcd66009ceb07545bdb5f1df2d0870ad/apps/cli/src/compose/rollups/default.env#L35
author_association: MEMBER
user: login: miltonjonat
created_at: 2025-03-11T00:20:54Z
body: Right.. maybe it's not going through, or not being respected by the Node code..?
author_association: NONE
user: login: endersonmaia
created_at: 2025-03-11T12:47:32Z
body: `rollups-node` v2 [changed](https://github.com/cartesi/rollups-node/commit/81b533fa44cb478cf0309624598176b0e90353ae) the ENV config from `CARTESI_POSTGRES_ENDPOINT` to `CARTESI_DATABASE_CONNECTION`

I'm already using `CARTESI_ENDPOINT_CONNECTION` where @tuler pointed out in his last comment.

For espresso-reader, I'm [using](https://github.com/cartesi/cli/blob/f6996c44434770157a257ed19b86a6a3ea3777be/apps/cli/src/compose/rollups/docker-compose-espresso.yaml#L46) `CARTESI_POSTGRES_ENDPOINT` still.


author_association: CONTRIBUTOR
user: login: endersonmaia
created_at: 2025-03-11T12:56:10Z
body: @miltonjonat my suggestion is that you go to the cartesi/rollups-node local repository at the `feature/new-build` branch and run `make image`.

Then you'll have a `cartesi/rollups-node:devel` available locally and your tests may run just fine. 

Let me know if anything changes.
author_association: CONTRIBUTOR
user: login: tuler
created_at: 2025-03-17T18:53:37Z
body: Time to rebase this one.
author_association: MEMBER