Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/seven-moments-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/cli": minor
---

Require cartesi-machine 0.22. Machines stored by 0.21 can't be loaded by 0.22: rebuild and redeploy every application.
5 changes: 5 additions & 0 deletions .changeset/strict-grapes-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/cli": patch
---

Use the Dave 3.0.0-alpha.6 PRT contracts. Every PRT address moves, including the devnet DaveAppFactory. The rollups contract addresses are unchanged.
29 changes: 29 additions & 0 deletions .github/workflows/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ on:
pull_request:
paths:
- ".github/workflows/cli.yaml"
- ".github/workflows/sdk.yaml"
- "apps/cli/**"
- "packages/sdk/**"
- "packages/tsconfig/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
Expand All @@ -13,11 +15,21 @@ permissions:
packages: write
pull-requests: write
jobs:
sdk:
uses: ./.github/workflows/sdk.yaml
secrets: inherit
permissions:
contents: read
packages: write
id-token: write
actions: write
build:
needs: sdk
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
SDK_TAG: pr-${{ github.event.pull_request.number }}
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -28,6 +40,20 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

- name: Login to GitHub Container Registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Retag SDK images
run: |
for image in sdk rollups-runtime rollups-database; do
docker pull "ghcr.io/cartesi/$image:$SDK_TAG"
docker tag "ghcr.io/cartesi/$image:$SDK_TAG" "cartesi/$image:$SDK_TAG"
done

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0

- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
Expand All @@ -45,6 +71,9 @@ jobs:

- name: Test
run: bun test apps/cli/
env:
CARTESI_TEST_SDK: cartesi/sdk:${{ env.SDK_TAG }}
CARTESI_TEST_RUNTIME_VERSION: ${{ env.SDK_TAG }}

- name: Coverage Report
uses: 70-10/bun-coverage-report-action@6173866ce2a31456a726ff3f4c91f230bd94a9e9 # v1.0.3
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ on:
required: true
DOCKERHUB_TOKEN:
required: true
pull_request:
paths:
- ".github/workflows/sdk.yaml"
- "packages/sdk/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
group: sdk-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
Expand Down Expand Up @@ -83,6 +79,12 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Fetch rollups-node packages
run: ./packages/sdk/scripts/fetch-rollups-node.sh
env:
# rollups-node#815 (chore/bump-version-alpha14) at e9eebb72
ROLLUPS_NODE_RUN_ID: "41211121596"

- name: Build and push
uses: docker/bake-action@018cb6412ab401ebaa809aa5f85966b74628600f # v7.4.0
if: ${{ !startsWith(github.ref, 'refs/tags/sdk@') }}
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"/dist"
],
"devDependencies": {
"@cartesi/wagmi-plugin": "1.0.0-alpha.7",
"@cartesi/wagmi-plugin": "1.0.0-alpha.9",
"@commander-js/extra-typings": "^15.0.0",
"@inquirer/confirm": "^6.3.3",
"@inquirer/core": "^12.0.4",
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/exec/cartesi-machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type ExecaOptionsDockerFallback,
} from "./util.js";

export const requiredVersion = new Range("^0.21.0");
export const requiredVersion = new Range("^0.22.0");

export const boot = (
args: readonly string[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ export type Layout = {
at: number; // offset of data, the rest is zeros
data: Buffer;
};
// TODO: the machine-tool of rollups-node v2.0.0-alpha.13 only looks for the
// accounts drive among the flash drives, unskip once it finds nvrams too
skip?: boolean;
};

const scratchDrive = `
Expand Down Expand Up @@ -76,7 +73,6 @@ accounts_drive = true
`,
label: "accounts",
device: "/dev/uio0",
skip: true,
},
{
name: "the beginning of a larger nvram",
Expand All @@ -96,7 +92,6 @@ accounts_drive_size = "4Mi"
label: "state",
device: "/dev/uio1",
accountsSize: 4 * MiB,
skip: true,
},
{
// like a DEX, which memory-maps its state after the accounts, from an image
Expand All @@ -118,6 +113,5 @@ accounts_drive_size = "4Mi"
at: 4 * MiB,
data: Buffer.alloc(8 * MiB, 0xab),
},
skip: true,
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ handle_erc20_deposit() {
[[ "$token" == "$trusted_token" ]] || return 1
[[ "${amount_hex:0:49}" =~ ^0{48}[0-7]$ ]] || return 1

# a zero deposit opens an account with no balance, as one emptied by a debit would be
amount="$(uint64_be_to_dec "${amount_hex:48:16}")"
(( amount > 0 )) || return 1
credit_account "$sender" "$amount"
}

Expand Down
29 changes: 20 additions & 9 deletions apps/cli/tests/integration/commands/recovery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
* The runtime must ship a rollups node with the refund command, as the
* default SDK does.
*
* Inputs: alice (0), bob (1) and erin (2) are finalized in epoch 0; carol (3)
* and dave (4) stay in the open epoch 1 and are refunded.
* Inputs: alice (0), bob (1), erin (2) and frank (3) are finalized in epoch 0;
* carol (4) and dave (5) stay in the open epoch 1 and are refunded. frank
* deposits nothing, leaving an account with no balance in the drive, which
* must not stop the other accounts from being proven.
*/

const EPOCH_LENGTH = 720;
Expand All @@ -56,13 +58,21 @@
const carol = devnetAccount(3);
const dave = devnetAccount(4);
const erin = devnetAccount(5);
const frank = devnetAccount(6);

// the guardian comes from a mnemonic the node doesn't sign with
const guardianMnemonic =
"legal winner thank year wave sausage worth useful legal winner thank yellow";
const guardian = mnemonicToAccount(guardianMnemonic).address;

const amounts = { alice: 100n, bob: 50n, carol: 25n, dave: 15n, erin: 10n };
const amounts = {
alice: 100n,
bob: 50n,
carol: 25n,
dave: 15n,
erin: 10n,
frank: 0n,
};

const count = (text: string, part: string) => text.split(part).length - 1;

Expand Down Expand Up @@ -139,7 +149,7 @@

console.log("! Building the accounts-withdrawal application...");
const build = await buildApplication(appDir);
expect(build.exitCode, build.all).toBe(0);

Check failure on line 152 in apps/cli/tests/integration/commands/recovery.test.ts

View workflow job for this annotation

GitHub Actions / build

error: ❯ Build drives

❯ Building drive root › Building docker image with args: buildx build --platform linux/riscv64 --file Dockerfile --output type=docker --output type=tar,dest=/tmp/recovery-Ua2g6E/accounts-withdrawal/.cartesi/root.tar --progress plain --metadata-file /tmp/cartesi-buildx-NEn4Mr/metadata.json . ✔ Build drive accounts › #0 building with "builder-72aa8679-cac7-4de6-86de-0e2f2089a10f" instance using docker-container driver › #1 [internal] load build definition from Dockerfile › #1 transferring dockerfile: 1.28kB done › #1 DONE 0.0s › #2 resolve image config for docker-image://docker.io/docker/dockerfile:1 › #2 DONE 0.2s › #3 docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e › #3 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e done › #3 CACHED › #4 [internal] load metadata for docker.io/library/ubuntu:noble-20260610 › #4 DONE 0.1s › #5 [internal] load .dockerignore › #5 transferring context: 2B done › #5 DONE 0.0s › #6 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #6 DONE 0.0s › #7 [internal] load build context › #7 transferring context: 3.94kB done › #7 DONE 0.0s › #8 [1/4] FROM docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 › #8 resolve docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 done › #8 DONE 0.0s › #9 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #9 CACHED › #10 [3/4] RUN <<EOF (set -eu...) › #10 0.399 Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] › #10 0.571 Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] › #10 0.572 Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB] › #10 0.602 Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB] › #10 1.503 Get:5 http://ports.ubuntu.com/ubuntu-ports noble/restricted riscv64 Packages [3482 B] › #10 1.600 Get:6 http://ports.ubuntu.com/ubuntu-ports noble/universe riscv64 Packages [18.3 MB] › #10 2.684 Get:7 http://ports.ubuntu.com/ubuntu-ports noble/multiverse riscv64 Packages [204 kB] › #10 2.705 Get:8 http://ports.ubuntu.com/ubuntu-ports noble/main riscv64 Packages [1700 kB] › #10 2.871 Get:9 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe riscv64 Packages [1646 kB] › #10 3.029 Get:10 http://ports.ubuntu.com/ubuntu-ports noble-updates/main riscv64 Packages [909 kB] › #10 3.118 Get:11 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse riscv64 Packages [5111 B] › #10 3.120 Get:12 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted riscv64 Packages [14.1 kB] › #10 3.211 Get:13 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe riscv64 Packages [29.7 kB] › #10 3.245 Get:14 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse riscv64 Packages [669 B] › #10 3.249 Get:15 http://ports.ubuntu.com/ubuntu-ports noble-backports/main riscv64 Packages [49.0 kB] › #10 4.058 Get:16 http://ports.ubuntu.com/ubuntu-ports noble-security/main riscv64 Packages [620 kB] › #10 4.128 Get:17 http://ports.ubuntu.com/ubuntu-ports noble-security/universe riscv64 Packages [1190 kB] › #10 4.209 Get:18 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted riscv64 Packages [11.6 kB] › #10 4.212 Get:19 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse riscv64 Packages [3587 B] › #10 9.794 Fetched 25.3 MB in 10s (2666 kB/s) › #10 9.794 Reading package lists... › #10 15.44 Reading package lists... ��
console.log("✓ Built the accounts-withdrawal application");

({ application, run } = await startApplication({
Expand Down Expand Up @@ -177,6 +187,7 @@
await deposit(alice, amounts.alice);
await deposit(bob, amounts.bob);
await deposit(erin, amounts.erin);
await deposit(frank, amounts.frank);

// close the first epoch and wait for its claim to be accepted
await anvil.mine({ blocks: EPOCH_LENGTH });
Expand All @@ -193,7 +204,7 @@
await deposit(carol, amounts.carol);
await deposit(dave, amounts.dave);
await waitFor(() =>
getNodeInput({ application, inputIndex: 4n, projectName }),
getNodeInput({ application, inputIndex: 5n, projectName }),
);
},
TIMEOUT,
Expand All @@ -203,7 +214,7 @@
it(
"should pass the node's NotForeclosed error through on refund",
async () => {
const refund = await cli(["refund", "3", "--yes"]);
const refund = await cli(["refund", "4", "--yes"]);
expect(refund.exitCode).not.toBe(0);
expect(refund.all).toContain("NotForeclosed");
},
Expand Down Expand Up @@ -273,10 +284,10 @@
"should refund a deposit that was not finalized",
async () => {
expect(await usdcBalance(carol)).toBe(0n);
const refund = await cli(["refund", "3", "--yes", "--json"]);
const refund = await cli(["refund", "4", "--yes", "--json"]);
expect(refund.exitCode, refund.all).toBe(0);
expect(JSON.parse(refund.stdout)).toMatchObject({
input_index: "3",
input_index: "4",
});
expect(await usdcBalance(carol)).toBe(amounts.carol);
},
Expand All @@ -288,15 +299,15 @@
async () => {
const rawData = await getNodeInput({
application,
inputIndex: 4n,
inputIndex: 5n,
projectName,
});
const inputFile = path.join(appDir, "dave-input.hex");
await fs.writeFile(inputFile, rawData);
expect(await usdcBalance(dave)).toBe(0n);
const refund = await cli([
"refund",
"4",
"5",
"--input-file",
inputFile,
"--yes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@
};

layouts.forEach((layout, index) => {
const describeLayout = layout.skip ? describe.skip : describe;

describeLayout(`emergency withdrawal from ${layout.name}`, () => {
describe(`emergency withdrawal from ${layout.name}`, () => {
const projectName = `layouts-${index}-${process.pid}`;
let appDir: string;
let cleanup: () => void;
Expand All @@ -87,7 +85,7 @@

console.log(`! Building an application with ${layout.name}...`);
const build = await buildLayout(appDir, layout);
expect(build.exitCode, build.all).toBe(0);

Check failure on line 88 in apps/cli/tests/integration/commands/withdrawal-layouts.test.ts

View workflow job for this annotation

GitHub Actions / build

error: ❯ Build drives

❯ Building drive root › Building docker image with args: buildx build --platform linux/riscv64 --file Dockerfile --output type=docker --output type=tar,dest=/tmp/withdrawal-layout-ZUiXRd/accounts-withdrawal/.cartesi/root.tar --progress plain --metadata-file /tmp/cartesi-buildx-pGZ4hB/metadata.json . ✔ Build drive scratch › #0 building with "builder-72aa8679-cac7-4de6-86de-0e2f2089a10f" instance using docker-container driver › #1 [internal] load build definition from Dockerfile › #1 transferring dockerfile: 1.28kB done › #1 DONE 0.0s › #2 resolve image config for docker-image://docker.io/docker/dockerfile:1 › #2 DONE 0.2s › #3 docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e › #3 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e done › #3 CACHED › #4 [internal] load metadata for docker.io/library/ubuntu:noble-20260610 › #4 DONE 0.1s › #5 [internal] load .dockerignore › #5 transferring context: 2B done › #5 DONE 0.0s › #6 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #6 DONE 0.0s › #7 [internal] load build context › #7 transferring context: 3.94kB done › #7 DONE 0.0s › #8 [1/4] FROM docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 › #8 resolve docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 done › #8 DONE 0.0s › #9 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #9 CACHED › #10 [3/4] RUN <<EOF (set -eu...) › #10 0.398 Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] › #10 0.572 Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] › #10 0.573 Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB] › #10 0.606 Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB] › #10 1.485 Get:5 http://ports.ubuntu.com/ubuntu-ports noble/universe riscv64 Packages [18.3 MB] › #10 2.654 Get:6 http://ports.ubuntu.com/ubuntu-ports noble/main riscv64 Packages [1700 kB] › #10 2.788 Get:7 http://ports.ubuntu.com/ubuntu-ports noble/multiverse riscv64 Packages [204 kB] › #10 2.803 Get:8 http://ports.ubuntu.com/ubuntu-ports noble/restricted riscv64 Packages [3482 B] › #10 2.806 Get:9 http://ports.ubuntu.com/ubuntu-ports noble-updates/main riscv64 Packages [909 kB] › #10 2.874 Get:10 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted riscv64 Packages [14.1 kB] › #10 2.877 Get:11 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse riscv64 Packages [5111 B] › #10 2.879 Get:12 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe riscv64 Packages [1646 kB] › #10 3.300 Get:13 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe riscv64 Packages [29.7 kB] › #10 3.332 Get:14 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse riscv64 Packages [669 B] › #10 3.336 Get:15 http://ports.ubuntu.com/ubuntu-ports noble-backports/main riscv64 Packages [49.0 kB] › #10 4.143 Get:16 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse riscv64 Packages [3587 B] › #10 4.174 Get:17 http://ports.ubuntu.com/ubuntu-ports noble-security/main riscv64 Packages [620 kB] › #10 4.224 Get:18 http://ports.ubuntu.com/ubuntu-ports noble-security/universe riscv64 Packages [1190 kB] › #10 4.291 Get:19 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted riscv64 Packages [11.6 kB] › #10 9.580 Fetched 25.3 MB in 9s (2727 kB/s) › #10 9.580 Reading package lists... › #10 15.17 Reading package list

Check failure on line 88 in apps/cli/tests/integration/commands/withdrawal-layouts.test.ts

View workflow job for this annotation

GitHub Actions / build

error: ❯ Build drives

› Building docker image with args: buildx build --platform linux/riscv64 --file Dockerfile --output type=docker --output type=tar,dest=/tmp/withdrawal-layout-GvK7Iv/accounts-withdrawal/.cartesi/root.tar --progress plain --metadata-file /tmp/cartesi-buildx-jbbHcU/metadata.json . › #0 building with "builder-72aa8679-cac7-4de6-86de-0e2f2089a10f" instance using docker-container driver › #1 [internal] load build definition from Dockerfile › #1 transferring dockerfile: 1.28kB done › #1 DONE 0.0s › #2 [auth] docker/dockerfile:pull token for registry-1.docker.io › #2 DONE 0.0s › #3 resolve image config for docker-image://docker.io/docker/dockerfile:1 › #3 DONE 0.3s › #4 docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e › #4 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e done › #4 CACHED › #5 [auth] library/ubuntu:pull token for registry-1.docker.io › #5 DONE 0.0s › #6 [internal] load metadata for docker.io/library/ubuntu:noble-20260610 › #6 DONE 0.2s › #7 [internal] load .dockerignore › #7 transferring context: 2B done › #7 DONE 0.0s › #8 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #8 DONE 0.0s › #9 [internal] load build context › #9 transferring context: 3.94kB done › #9 DONE 0.0s › #10 [1/4] FROM docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 › #10 resolve docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 done › #10 DONE 0.0s › #11 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #11 CACHED › #12 [3/4] RUN <<EOF (set -eu...) › #12 0.519 Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] › #12 0.706 Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] › #12 0.712 Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB] › #12 0.753 Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB] › #12 1.639 Get:5 http://ports.ubuntu.com/ubuntu-ports noble/restricted riscv64 Packages [3482 B] › #12 1.738 Get:6 http://ports.ubuntu.com/ubuntu-ports noble/multiverse riscv64 Packages [204 kB] › #12 1.757 Get:7 http://ports.ubuntu.com/ubuntu-ports noble/main riscv64 Packages [1700 kB] › #12 1.896 Get:8 http://ports.ubuntu.com/ubuntu-ports noble/universe riscv64 Packages [18.3 MB] › #12 3.373 Get:9 http://ports.ubuntu.com/ubuntu-ports noble-updates/main riscv64 Packages [909 kB] › #12 3.445 Get:10 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe riscv64 Packages [1646 kB] › #12 3.550 Get:11 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse riscv64 Packages [5111 B] › #12 3.554 Get:12 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted riscv64 Packages [14.1 kB] › #12 3.555 Get:13 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe riscv64 Packages [29.7 kB] › #12 3.557 Get:14 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse riscv64 Packages [669 B] › #12 3.559 Get:15 http://ports.ubuntu.com/ubuntu-ports noble-backports/main riscv64 Packages [49.0 kB] › #12 4.255 Get:16 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse riscv64 Packages [3587 B] › #12 4.288 Get:17 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted riscv64 Packages [11.6 kB] › #12 4.317 Get:18 http://ports.ubuntu.com/ubuntu-ports noble-security/universe riscv64 Packages [1190 kB] › #12 4.390 Get:19 http://ports.ubuntu.com/ubuntu-ports noble-security/main riscv64 Packages [620 k

Check failure on line 88 in apps/cli/tests/integration/commands/withdrawal-layouts.test.ts

View workflow job for this annotation

GitHub Actions / build

error: ❯ Build drives

❯ Building drive root › Building docker image with args: buildx build --platform linux/riscv64 --file Dockerfile --output type=docker --output type=tar,dest=/tmp/withdrawal-layout-qnugT5/accounts-withdrawal/.cartesi/root.tar --progress plain --metadata-file /tmp/cartesi-buildx-UmlOG9/metadata.json . ✔ Build drive scratch › #0 building with "builder-72aa8679-cac7-4de6-86de-0e2f2089a10f" instance using docker-container driver › #1 [internal] load build definition from Dockerfile › #1 transferring dockerfile: 1.28kB 0.1s › #1 transferring dockerfile: 1.28kB 0.1s done › #1 DONE 0.1s › #2 resolve image config for docker-image://docker.io/docker/dockerfile:1 › #2 DONE 0.2s › #3 docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e › #3 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e done › #3 CACHED › #4 [internal] load metadata for docker.io/library/ubuntu:noble-20260610 › #4 DONE 0.1s › #5 [internal] load .dockerignore › #5 transferring context: 2B done › #5 DONE 0.0s › #6 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #6 DONE 0.0s › #7 [internal] load build context › #7 transferring context: 3.94kB done › #7 DONE 0.0s › #8 [1/4] FROM docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 › #8 resolve docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 done › #8 DONE 0.0s › #9 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #9 CACHED › #10 [3/4] RUN <<EOF (set -eu...) › #10 0.413 Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] › #10 0.601 Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] › #10 0.605 Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB] › #10 0.645 Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB] › #10 1.523 Get:5 http://ports.ubuntu.com/ubuntu-ports noble/restricted riscv64 Packages [3482 B] › #10 1.622 Get:6 http://ports.ubuntu.com/ubuntu-ports noble/universe riscv64 Packages [18.3 MB] › #10 2.778 Get:7 http://ports.ubuntu.com/ubuntu-ports noble/main riscv64 Packages [1700 kB] › #10 2.884 Get:8 http://ports.ubuntu.com/ubuntu-ports noble/multiverse riscv64 Packages [204 kB] › #10 2.898 Get:9 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe riscv64 Packages [1646 kB] › #10 3.012 Get:10 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse riscv64 Packages [5111 B] › #10 3.014 Get:11 http://ports.ubuntu.com/ubuntu-ports noble-updates/main riscv64 Packages [909 kB] › #10 3.092 Get:12 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted riscv64 Packages [14.1 kB] › #10 3.327 Get:13 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse riscv64 Packages [669 B] › #10 3.361 Get:14 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe riscv64 Packages [29.7 kB] › #10 3.366 Get:15 http://ports.ubuntu.com/ubuntu-ports noble-backports/main riscv64 Packages [49.0 kB] › #10 4.152 Get:16 http://ports.ubuntu.com/ubuntu-ports noble-security/universe riscv64 Packages [1190 kB] › #10 4.252 Get:17 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted riscv64 Packages [11.6 kB] › #10 4.281 Get:18 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse riscv64 Packages [3587 B] › #10 4.283 Get:19 http://ports.ubuntu.com/ubuntu-ports noble-security/main riscv64 Packages [620 kB] › #10 9.680 Fetched 25.3 MB in 9s (2699 kB/s) › #10 9.680 Reading pa

Check failure on line 88 in apps/cli/tests/integration/commands/withdrawal-layouts.test.ts

View workflow job for this annotation

GitHub Actions / build

error: ❯ Build drives

❯ Building drive state ❯ Building drive root › Building docker image with args: buildx build --platform linux/riscv64 --file Dockerfile --output type=docker --output type=tar,dest=/tmp/withdrawal-layout-istRDX/accounts-withdrawal/.cartesi/root.tar --progress plain --metadata-file /tmp/cartesi-buildx-Mw4qjG/metadata.json . ✔ Build drive scratch ✔ Build drive state › #0 building with "builder-72aa8679-cac7-4de6-86de-0e2f2089a10f" instance using docker-container driver › #1 [internal] load build definition from Dockerfile › #1 transferring dockerfile: 1.28kB done › #1 DONE 0.0s › #2 resolve image config for docker-image://docker.io/docker/dockerfile:1 › #2 DONE 0.1s › #3 docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e › #3 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e done › #3 CACHED › #4 [internal] load metadata for docker.io/library/ubuntu:noble-20260610 › #4 DONE 0.1s › #5 [internal] load .dockerignore › #5 transferring context: 2B done › #5 DONE 0.0s › #6 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #6 DONE 0.0s › #7 [internal] load build context › #7 transferring context: 3.94kB done › #7 DONE 0.0s › #8 [1/4] FROM docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 › #8 resolve docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 done › #8 DONE 0.0s › #9 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #9 CACHED › #10 [3/4] RUN <<EOF (set -eu...) › #10 0.405 Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] › #10 0.577 Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] › #10 0.578 Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB] › #10 0.612 Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB] › #10 1.489 Get:5 http://ports.ubuntu.com/ubuntu-ports noble/restricted riscv64 Packages [3482 B] › #10 1.582 Get:6 http://ports.ubuntu.com/ubuntu-ports noble/multiverse riscv64 Packages [204 kB] › #10 1.603 Get:7 http://ports.ubuntu.com/ubuntu-ports noble/universe riscv64 Packages [18.3 MB] › #10 2.706 Get:8 http://ports.ubuntu.com/ubuntu-ports noble/main riscv64 Packages [1700 kB] › #10 2.868 Get:9 http://ports.ubuntu.com/ubuntu-ports noble-updates/restricted riscv64 Packages [14.1 kB] › #10 2.871 Get:10 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe riscv64 Packages [1646 kB] › #10 3.029 Get:11 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse riscv64 Packages [5111 B] › #10 3.032 Get:12 http://ports.ubuntu.com/ubuntu-ports noble-updates/main riscv64 Packages [909 kB] › #10 3.185 Get:13 http://ports.ubuntu.com/ubuntu-ports noble-backports/universe riscv64 Packages [29.7 kB] › #10 3.217 Get:14 http://ports.ubuntu.com/ubuntu-ports noble-backports/main riscv64 Packages [49.0 kB] › #10 3.223 Get:15 http://ports.ubuntu.com/ubuntu-ports noble-backports/multiverse riscv64 Packages [669 B] › #10 4.017 Get:16 http://ports.ubuntu.com/ubuntu-ports noble-security/restricted riscv64 Packages [11.6 kB] › #10 4.047 Get:17 http://ports.ubuntu.com/ubuntu-ports noble-security/universe riscv64 Packages [1190 kB] › #10 4.131 Get:18 http://ports.ubuntu.com/ubuntu-ports noble-security/main riscv64 Packages [620 kB] › #10 4.167 Get:19 http://ports.ubuntu.com/ubuntu-ports noble-security/multiverse riscv64 Packages [3587 B] › #10 9.660 Fetched 25.3 MB in 9s (2704 kB/s) › #10 9.660 Reading pack

Check failure on line 88 in apps/cli/tests/integration/commands/withdrawal-layouts.test.ts

View workflow job for this annotation

GitHub Actions / build

error: ❯ Build drives

❯ Building drive accounts ❯ Building drive root › Building docker image with args: buildx build --platform linux/riscv64 --file Dockerfile --output type=docker --output type=tar,dest=/tmp/withdrawal-layout-sC5xwh/accounts-withdrawal/.cartesi/root.tar --progress plain --metadata-file /tmp/cartesi-buildx-Y29Hyz/metadata.json . ✔ Build drive accounts ✔ Build drive scratch › #0 building with "builder-72aa8679-cac7-4de6-86de-0e2f2089a10f" instance using docker-container driver › #1 [internal] load build definition from Dockerfile › #1 transferring dockerfile: 1.28kB done › #1 DONE 0.0s › #2 [auth] docker/dockerfile:pull token for registry-1.docker.io › #2 DONE 0.0s › #3 resolve image config for docker-image://docker.io/docker/dockerfile:1 › #3 DONE 0.4s › #4 docker-image://docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e › #4 resolve docker.io/docker/dockerfile:1@sha256:4edf897a3ffa55b89f906fc8cc78afdb3f1834cc9c7083565e611a8a7d5fe99e done › #4 sha256:9d2b4f57f9e20f33279375ce25c6ff14f30f64270ed5c7b613b2b30256754f62 14.28MB / 14.28MB 0.1s done › #4 extracting sha256:9d2b4f57f9e20f33279375ce25c6ff14f30f64270ed5c7b613b2b30256754f62 0.1s done › #4 DONE 0.3s › #5 [internal] load metadata for docker.io/library/ubuntu:noble-20260610 › #5 DONE 0.3s › #6 [internal] load .dockerignore › #6 transferring context: 2B done › #6 DONE 0.0s › #7 [internal] load build context › #7 transferring context: 3.94kB done › #7 DONE 0.0s › #8 [1/4] FROM docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 › #8 resolve docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 done › #8 sha256:d36d9a4ee5b21337a0038d06f00582b458b412ffa7aa3be4086c8692dfab4687 5.24MB / 30.97MB 0.2s › #8 sha256:d36d9a4ee5b21337a0038d06f00582b458b412ffa7aa3be4086c8692dfab4687 20.97MB / 30.97MB 0.3s › #8 sha256:d36d9a4ee5b21337a0038d06f00582b458b412ffa7aa3be4086c8692dfab4687 30.97MB / 30.97MB 0.5s › #8 ... › #9 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #9 DONE 0.5s › #8 [1/4] FROM docker.io/library/ubuntu:noble-20260610@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 › #8 sha256:d36d9a4ee5b21337a0038d06f00582b458b412ffa7aa3be4086c8692dfab4687 30.97MB / 30.97MB 0.5s done › #8 extracting sha256:d36d9a4ee5b21337a0038d06f00582b458b412ffa7aa3be4086c8692dfab4687 › #8 extracting sha256:d36d9a4ee5b21337a0038d06f00582b458b412ffa7aa3be4086c8692dfab4687 0.5s done › #8 DONE 1.0s › #10 [2/4] ADD --checksum=sha256:e21bf93d4858e95fe9078ef436e9c13a6616125a7f65629c2fd571d72307f59a https://github.com/cartesi/machine-guest-tools/releases/download/v0.18.0-test7/machine-guest-tools_riscv64.deb /tmp/machine-guest-tools_riscv64.deb › #10 DONE 0.4s › #11 [3/4] RUN <<EOF (set -eu...) › #11 0.607 Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] › #11 1.296 Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] › #11 1.466 Get:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease [126 kB] › #11 1.638 Get:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease [126 kB] › #11 2.262 Get:5 http://ports.ubuntu.com/ubuntu-ports noble/multiverse riscv64 Packages [204 kB] › #11 2.538 Get:6 http://ports.ubuntu.com/ubuntu-ports noble/universe riscv64 Packages [18.3 MB] › #11 3.901 Get:7 http://ports.ubuntu.com/ubuntu-ports noble/main riscv64 Packages [1700 kB] › #11 4.035 Get:8 http://ports.ubuntu.com/ubuntu-ports noble/restricted riscv64 Packages [3482 B] › #11 4.051 Get:9 http://ports.ubuntu.com/ubuntu-ports noble-updates/universe riscv64 Packages [1646 kB] › #11 4.217 Get:10 http://ports.ubuntu.com/ubuntu-ports noble-updates/multiverse riscv64 Packages [5111 B
const output = stripVTControlCharacters(build.all ?? "");
expect(output).toContain(
`accounts drive ${layout.label} (${layout.device.startsWith("/dev/uio") ? "nvram" : "flash drive"}) → ${layout.device}`,
Expand Down
8 changes: 4 additions & 4 deletions apps/cli/tests/unit/exec/cartesi-machine.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
const semver = (version: string) => parse(version) as SemVer;

describe("requiredVersion", () => {
it.each(["0.21.0", "0.21.3"])("should accept %s", (version) => {
it.each(["0.22.0", "0.22.3"])("should accept %s", (version) => {
expect(satisfies(version, requiredVersion)).toBeTruthy();
});

it.each(["0.20.0", "0.20.9", "0.22.0", "1.0.0"])(
it.each(["0.21.0", "0.21.9", "0.23.0", "1.0.0"])(
"should reject %s",
(version) => {
expect(satisfies(version, requiredVersion)).toBeFalsy();
Expand All @@ -22,11 +22,11 @@ describe("requiredVersion", () => {
});

describe("assertSupported", () => {
it.each(["0.21.0", "0.21.3"])("should accept %s", (version) => {
it.each(["0.22.0", "0.22.3"])("should accept %s", (version) => {
expect(() => assertSupported(semver(version))).not.toThrow();
});

it.each(["0.20.0", "0.22.0"])("should reject %s", (version) => {
it.each(["0.21.0", "0.23.0"])("should reject %s", (version) => {
expect(() => assertSupported(semver(version))).toThrowError(
new UnsupportedVersionError(semver(version)),
);
Expand Down
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build.json
rollups-node/
Loading
Loading