Skip to content

feat(cli): cli changes to align with rollups-node [upcoming changes] - #529

Merged
brunomenezes merged 26 commits into
prerelease/v2-alphafrom
feat/rollups-node-changes
Oct 5, 2026
Merged

brunomenezes merged 26 commits into
prerelease/v2-alphafrom
feat/rollups-node-changes

Conversation

@brunomenezes

@brunomenezes brunomenezes commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Aligns the CLI with rollups-node 2.0.0-alpha.13 and rollups-contracts 3.0.0-alpha.10 / PRT 3.0.0-alpha.5, and moves the default SDK to the released 0.12.0-alpha.43.

The headline change: a guest exception or machine halt is now a terminal state — the node permanently stops processing inputs for that application, across restarts, while L1 indexing stays alive. So cartesi send keeps succeeding and inputs pile up unprocessed. cartesi run never re-read application status after deploying, so this was completely silent.

Supersedes #520, whose commits are included here.

Features

  • Terminal application states are surfaced. ApplicationStatus widened from 4 to the node's 9 values, adding GUEST_EXCEPTION, MACHINE_HALTED, MCYCLE_OVERFLOW, UNEXPECTED_YIELD and INVALID_OUTPUTS_ROOT. cartesi run polls status and warns the moment an application leaves OK, reporting the node's reason diagnostic; cartesi status colours terminal states and prints the reason under the table.
  • Node signer configuration is overridable. Both auth families are host-overridable and symmetric at six variables each, CARTESI_AUTH_* and CARTESI_PRT_AUTH_*. CARTESI_AUTH_KIND is the one that matters most: without it only plain-mnemonic signing was reachable for the Claimer, since the node picks its signing path from that value alone.
  • New devnet contracts in the address book — TestUsdc, RefundOutputBuilder and UsdWithdrawalOutputBuilderFactory.

Fixes

  • cartesi run silently skipped deploy(). getMachineHash() passed no image, so it always read snapshots with the default SDK. Against a snapshot written by a newer emulator it returned undefined, making cartesi hash report "snapshot not found" and cartesi run skip deployment with no error at all.
  • PRT could not start. alpha.13's standalone node always starts its PRT service, and with claim submission enabled by default that service needs its own signer — for which PRT has no default mnemonic. The devnet mnemonic is now passed unconditionally, not only under --prt.
  • The wait for healthy services was unbounded. The backoff had no maxTimeout, so a service that never started held the command for up to 19 hours. An exited container now fails fast instead of consuming the budget.
  • --claim-staging-period was dropped under --prt. It is a persistent flag on the node's whole deploy command, so a value passed alongside --prt was silently discarded.
  • cartesi deposit and fork validation were broken against contracts 3.0.0-alpha.10: renamed portal deposit functions, getInputBox removed in favour of probing version, and the new 6-argument calculateDaveAppAddress.

Refactoring

  • Contract codegen moved from @cartesi/devnet to @cartesi/wagmi-plugin, dropping that dependency from apps/cli and excluding the PRT internals from generation.
  • Deploy-argument assembly extracted into a pure function so the flag handling is testable without a running node.

CI and tooling

  • Default SDK bumped to 0.12.0-alpha.43 (cartesi-machine 0.21, rollups-node 2.0.0-alpha.13); requiredVersion now ^0.21.0.
  • The Foundry install step is removed from the cli workflow — apps/cli no longer depends on @cartesi/devnet, so nothing in that job needs forge or anvil.
  • Integration tests accept a CARTESI_TEST_SDK override for verifying against an unreleased image.

Verification

Full suite — unit and integration — against the released 0.12.0-alpha.43 images with no environment overrides: 184 pass / 1 skip / 0 fail across 15 files. The skip is pre-existing (docker.test.ts sqfs drive). tsc reports no errors under src/.

End to end on released artifacts: cartesi build → cartesi hash → cartesi run → application OK → cartesi address-book printing all 17 contracts. The node reports distinct Claimer and PRT signers, which alpha.13 requires.

@changeset-bot

changeset-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1840fd7

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

This PR includes changesets to release 1 package
Name Type
@cartesi/cli Patch

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

@brunomenezes brunomenezes moved this to 🧑‍💻 In Progress in Rollups Tooling Sep 29, 2026
@brunomenezes brunomenezes self-assigned this Sep 29, 2026
@socket-security

socket-security Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​cartesi/​wagmi-plugin@​1.0.0-alpha.7721009895100

View full report

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 94.71% (🎯 0%) 10961 / 11573
🔵 Statements 94.71% 10961 / 11573
🔵 Functions 81.07% 167 / 206
🔵 Branches 0% 0 / 0
📁 File Coverage (20 files)
File Lines Statements Functions Branches Uncovered Lines
apps/cli/src/base.ts 🔴 35.33% 🔴 35.33% 🟡 60% 🔴 0% 49, 70-71, 79-83, 88, 102, ...
apps/cli/src/builder/directory.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/docker.ts 🟢 86.72% 🟢 86.72% 🟡 66.67% 🔴 0% 75-77, 79, 109-111, 169-178
apps/cli/src/builder/empty.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/none.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/tar.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/compose/anvil.ts 🟡 79.25% 🟡 79.25% 🟢 100% 🔴 0% 19-29
apps/cli/src/compose/builder.ts 🟢 99.79% 🟢 99.79% 🟢 100% 🔴 0% 228
apps/cli/src/compose/bundler.ts 🔴 4.82% 🔴 4.82% 🔴 0% 🔴 0% 8-40, 44-75, 79-92
apps/cli/src/compose/common.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/compose/database.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/compose/explorer.ts 🔴 6.67% 🔴 6.67% 🔴 0% 🔴 0% 10-38, 43-55, 59-72
apps/cli/src/compose/node.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/compose/passkey.ts 🔴 8.33% 🔴 8.33% 🔴 0% 🔴 0% 9-18, 23-42, 46-59
apps/cli/src/compose/paymaster.ts 🔴 7.69% 🔴 7.69% 🔴 0% 🔴 0% 8-21, 25-44, 48-61
apps/cli/src/compose/proxy.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/config.ts 🟢 94.32% 🟢 94.32% 🟢 95.24% 🔴 0% 75-76, 251, 260, 269, 363, ...
apps/cli/src/contracts.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
...rc/errors/ForkChainValidationError.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
...c/errors/UnsupportedForkChainError.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -

@brunomenezes
brunomenezes force-pushed the feat/rollups-node-changes branch 4 times, most recently from 7a54a60 to 986212c Compare October 2, 2026 14:25
@tuler

tuler commented Oct 3, 2026

Copy link
Copy Markdown
Member

I don't know if I like the state polling by cartesi run. I'm not convinced it's necessary.

@brunomenezes
brunomenezes force-pushed the feat/rollups-node-changes branch 2 times, most recently from 6218eca to b805479 Compare October 3, 2026 12:42
@brunomenezes

Copy link
Copy Markdown
Member Author

I don't know if I like the state polling by cartesi run. I'm not convinced it's necessary.

Iteration. If is not good we drop in the coming versions.

@brunomenezes
brunomenezes force-pushed the feat/rollups-node-changes branch from ea69fc4 to 1840fd7 Compare October 5, 2026 17:40
@brunomenezes
brunomenezes marked this pull request as ready for review October 5, 2026 17:42
@brunomenezes
brunomenezes merged commit 37271db into prerelease/v2-alpha Oct 5, 2026
4 of 5 checks passed
@brunomenezes
brunomenezes deleted the feat/rollups-node-changes branch October 5, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 📦 Done

Development

Successfully merging this pull request may close these issues.

2 participants