Conversation
🦋 Changeset detectedLatest commit: d559b36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
39e4df4 to
2c2d626
Compare
Coverage Report
📁 File Coverage (11 files)
|
a7da1d3 to
71d8c01
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
71d8c01 to
4982e0f
Compare
|
Depending on the chosen fork-url the deployed contracts can have different addresses. So the CLI needs to use the correct address during application deployment, and also report the correct address in the So it should know not only the addresses on local deployment, but also the addresses on all supported live networks, which can potentially be forked. So I had to modify the devnet package to also package the deployments from all networks, which is maintained at cannon registry. So I changed to devnet packaging to call When merged the devnet package will need to be released first, then SDK, then CLI. |
70df749 to
feb831d
Compare
f39a101 to
e580d99
Compare
e580d99 to
8224b62
Compare
Allow forking from a live chain instead of using pre-baked devnet state. Adds --fork, --fork-url, and --fork-block-number options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8224b62 to
d559b36
Compare
So, are these devnet changes in some other PR? Also, I tried building the CLI from this branch, but it fails on the devnet package. Building it in isolation, here are the logs I received. Is there a specific version that is expected? Currently, my system is using 1.5.0-stable. @cartesi/devnet:build:
@cartesi/devnet:build: IPFS Availability Score(# of nodes): Run IPFS Locally to get this score
@cartesi/devnet:build:
✖ Failed to parse anvil version. Is anvil installed?
@cartesi/devnet:build: ✔ Download dependencies
@cartesi/devnet:build: ✔ Anvil started (PID: 98596)
@cartesi/devnet:build: ✔ Contracts deployed
@cartesi/devnet:build: ✔ Local deployments written to deployments/anvil.json
@cartesi/devnet:build: ✔ Export cannon packages
@cartesi/devnet:build: ✔ Anvil stopped -> anvil_state.json
@cartesi/devnet:build: error: script "build:dump" exited with code 1
@cartesi/devnet:build: ERROR: "build:dump" exited with 1.
@cartesi/devnet:build: error: script "build" exited with code 1
@cartesi/devnet:build: ERROR: command finished with error: command (/Users/--x--/cartesi/public/cli/packages/devnet) /opt/homebrew/bin/bun run build exited (1)
@cartesi/devnet#build: command (/Users/--x--/cartesi/public/cli/packages/devnet) /opt/homebrew/bin/bun run build exited (1)
Tasks: 0 successful, 1 total └───────────────────┘
Cached: 0 cached, 1 total
Time: 7.866s
Failed: @cartesi/devnet#build |
brunomenezes
left a comment
There was a problem hiding this comment.
I made the dry-runs suggested and also create/build/run an dapp. No hiccups.
Summary
--forkflag tocartesi runto fork from a live chain instead of using pre-baked devnet state--fork-url <url>option to specify a custom RPC endpoint (implies--fork, defaults tohttps://ethereum.reth.rs/rpc)--fork-block-number <number>option to pin the fork to a specific blockIn fork mode, Anvil runs directly with
--fork-urland--chain-id 31337instead of thedevnetwrapper that loadsanvil_state.json. All other services (node, explorer, bundler, paymaster) continue working unchanged since the chain ID remains 31337.Test plan
cartesi run --dry-run— verify normal devnet mode is unchanged (no regression)cartesi run --fork --dry-run— verify anvil command uses fork with default URLcartesi run --fork-url https://custom-rpc.example.com --dry-run— verify fork with custom URL (implies--fork)cartesi run --fork --fork-block-number 12345 --dry-run— verify fork at specific block numbercartesi run --fork— verify full environment starts and is healthy against a forked chain🤖 Generated with Claude Code