Repository navigation
Conversation
`cartesi run` no longer uses docker: anvil, postgres, the rollups node, the PRT sling nodes and the optional services (bundler, paymaster, passkey) run as child processes of the CLI, using the tools installed on the host, behind a reverse proxy the CLI serves itself on the environment's single port. `cartesi build` still uses docker. - postgres comes from the binaries of `@embedded-postgres` (optional dependencies, one per platform), or from the host for the standalone binaries, which can't carry them. The library's own class is not used: importing it installs SIGINT/SIGTERM exit hooks and runs postgres in the CLI's process group, so a Ctrl+C on "View logs" would stop the database. - the devnet state dump is downloaded from the PRT release on first use, checked against its checksum, and cached. - every process leads its own process group, so the machines the node spawns stop with it, and a Ctrl+C reaches only the CLI. - everything the environment keeps (database, logs, PRT node data, withdrawal replays) lives under one directory of the system temporary directory, removed when it stops. An exit hook stops the processes if the owner exits without stopping them, and the next run of a project reaps what a killed CLI left behind. The project is only read. - other commands find the environment through its `environment.json`: node commands run on the host with the node's environment, `logs` reads and follows the log files, `status` checks the processes. The explorer, only available as a docker image, is no longer offered; `--cpus` and `--memory` are ignored, and `logs` drops `--since`/`--until`. The mock paymaster listens on `PORT`, so it can share the host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YUPz4TUUDvyRkipma2hCD
`cartesi doctor` checks every tool `cartesi run` runs on the host, one line each with its version: anvil, the rollups node and its cli, the jsonrpc machine and postgres must be there, in a version the CLI is tested with; the machine tool, the sling node and the tools of the optional services are only a warning when missing, as not every run needs them. `cartesi run` checks the same before it says anything is starting: it names every missing tool at once, with what to install, warns of a version it is not tested with and runs anyway, and refuses to run as root, which postgres would only report once started. A sling node in the prt configuration adds the sling node to the tools checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YUPz4TUUDvyRkipma2hCD
🦋 Changeset detectedLatest commit: ba92f89 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Open
3 tasks
Contributor
Coverage Report
📁 File Coverage (20 files)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate
cartesi runfrom Docker Compose-based execution to running the local development environment as native processes on the host machine. This eliminates the Docker dependency for local development while maintaining feature parity.Key Changes
Removed Docker Compose infrastructure: Deleted all
src/compose/service builders (anvil, node, bundler, database, paymaster, passkey, proxy, explorer, prt-node) and the compose file type definitions (src/types/compose.ts). Removed associated unit tests.New host process management (
src/host/):process.ts: Core process lifecycle management (spawn, monitor, stop, log tailing)environment.ts: Main environment orchestration with service selection and startup/shutdownstate.ts: Persistent state tracking (processes, ports, fork config) in temp directoryhealth.ts: Service readiness checks (HTTP, JSON-RPC)anvil.ts: Anvil devnet process with state dump loadingnode.ts: Rollups node process with environment variable managementpostgres.ts: PostgreSQL startup using@embedded-postgresbinariesproxy.ts: Single-port HTTP proxy with route matching and CORS supportprt-node.ts: PRT node process managementservices.ts: Optional services (bundler, paymaster, passkey)tools.ts: Host tool detection and version checkingUpdated execution layer:
exec/node-container.ts: Adapted to use host state instead of Docker Composeexec/rollups.ts: Simplified to remove Docker Compose orchestrationapi/run.ts: Integrated new environment startup/shutdownapi/logs.ts: Updated to read from host process logs instead of DockerUpdated dependencies:
@embedded-postgres/*)Documentation: Added README section explaining local development environment architecture
Implementation Details