Skip to content

Conversation

@tuler
Copy link
Member

@tuler tuler commented May 22, 2025

This PR tries to speed up espresso-dev-node startup time by using a new option called ESPRESSO_DEV_NODE_L1_DEPLOYMENT=skip only currently available at the main unreleased version of espresso-dev-node. It expects the smart contract to already be deployed to the L1 provider (anvil).

For that to work we first created a cannon package for the espresso network smart contracts.
That is available at https://github.com/cartesi/espresso-network/tree/cartesi
So the first step to test this PR is to clone that repo, switch to branch cartesi and run cannon build (assuming cannon is installed).

Then we integrated the cannon package into our devnet, which can be built using

pnpm run build --filter @cartesi/devnet

That assumes the cannon package espresso-network:0.0.1@main was built locally.
ps: when a stable version exists, we can publish to cannon registry.

Then we changed the binary used by the SDK to a main unreleased version.
Copy the unreleased devnet into SDK and build it.

cp -R packages/devnet/deployments packages/sdk
cp packages/devnet/anvil_state.json packages/sdk
pnpm run build --filter @cartesi/sdk

Then run the CLI with a devel image:

tsx apps/cli/src/index.ts start --services espresso --runtime-version devel

@tuler tuler requested a review from endersonmaia May 22, 2025 18:31
@changeset-bot
Copy link

changeset-bot bot commented May 22, 2025

🦋 Changeset detected

Latest commit: 5da851a

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

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@github-actions
Copy link
Contributor

github-actions bot commented May 22, 2025

Coverage Report for ./apps/cli

Status Category Percentage Covered / Total
🔵 Lines 25.87% 295 / 1140
🔵 Statements 25.77% 300 / 1164
🔵 Functions 24.87% 51 / 205
🔵 Branches 23.44% 117 / 499
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/cli/src/commands/run.ts 0% 0% 0% 0% 25-335
apps/cli/src/exec/rollups.ts 0% 0% 0% 0% 40-554
Generated in workflow #580 for commit 5da851a by the Vitest Coverage Report Action

@tuler
Copy link
Member Author

tuler commented May 22, 2025

CI will keep failing while cannon package is not published to registry

@tuler tuler force-pushed the feature/espresso-startup branch from 6a60701 to 0ddb6c9 Compare May 22, 2025 19:42
@tuler tuler linked an issue May 22, 2025 that may be closed by this pull request
@tuler tuler force-pushed the feature/espresso-startup branch from 6601b6a to ff69f85 Compare May 23, 2025 23:59
@tuler
Copy link
Member Author

tuler commented May 30, 2025

My latest test showed this error (and a lot more after that).

ERROR hotshot_state_prover::service: Cannot sync the light client state, will retry: Error when communicating with the smart contract: error sending transaction: TransportError(ErrorResp(ErrorPayload { code: 3, message: "execution reverted: custom error 0x080ae8d9", data: Some(RawValue("0x080ae8d9")) }))

@tuler tuler force-pushed the feature/espresso-startup branch from 207efd6 to 9c42c33 Compare June 10, 2025 15:37
@tuler tuler force-pushed the feature/espresso-startup branch from 9c42c33 to 5da851a Compare June 16, 2025 19:00
@tuler
Copy link
Member Author

tuler commented Jun 16, 2025

Integrated into draft PR at #304

@tuler tuler closed this Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Long espresso-dev-node startup time

2 participants