From 455df506e41ca9b517a6c7c635dc06f4cf37a7f8 Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Fri, 19 Jul 2024 00:51:45 -0300 Subject: [PATCH 1/3] feat(sdk): new anvil version with correct dumpState --- .changeset/young-cycles-add.md | 5 +++++ packages/sdk/Dockerfile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/young-cycles-add.md diff --git a/.changeset/young-cycles-add.md b/.changeset/young-cycles-add.md new file mode 100644 index 00000000..4e01ad57 --- /dev/null +++ b/.changeset/young-cycles-add.md @@ -0,0 +1,5 @@ +--- +"@cartesi/sdk": minor +--- + +new anvil version with correct dumpState diff --git a/packages/sdk/Dockerfile b/packages/sdk/Dockerfile index a92427fd..3d6d9510 100644 --- a/packages/sdk/Dockerfile +++ b/packages/sdk/Dockerfile @@ -97,7 +97,7 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en # download anvil pre-compiled binaries -ARG ANVIL_VERSION=8b694bbcabaedffc0337bf8dea9a135da5694ef9 +ARG ANVIL_VERSION=e90348416c3a831ab75bb43f6fa5f0a0be4106c4 RUN curl -sSL https://github.com/foundry-rs/foundry/releases/download/nightly-${ANVIL_VERSION}/foundry_nightly_linux_$(dpkg --print-architecture).tar.gz | \ tar -zx -C /usr/local/bin From dfebf04a46f46c88fda31a6f3fe94da7d328a96a Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Fri, 19 Jul 2024 12:26:59 -0300 Subject: [PATCH 2/3] feat(sdk): bump devnet version to include ERC-4337 smart contracts --- .changeset/short-oranges-happen.md | 5 +++++ packages/sdk/docker-bake.hcl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/short-oranges-happen.md diff --git a/.changeset/short-oranges-happen.md b/.changeset/short-oranges-happen.md new file mode 100644 index 00000000..0098f195 --- /dev/null +++ b/.changeset/short-oranges-happen.md @@ -0,0 +1,5 @@ +--- +"@cartesi/sdk": minor +--- + +bump devnet version to include ERC-4337 smart contracts diff --git a/packages/sdk/docker-bake.hcl b/packages/sdk/docker-bake.hcl index 9a0bb42d..ae3146b1 100644 --- a/packages/sdk/docker-bake.hcl +++ b/packages/sdk/docker-bake.hcl @@ -9,7 +9,7 @@ target "default" { SERVER_MANAGER_ORG = "cartesi" SERVER_MANAGER_VERSION = "0.9.1" CARTESI_IMAGE_KERNEL_VERSION = "0.19.1" - DEVNET_VERSION = "1.7.0" + DEVNET_VERSION = "1.8.0" LINUX_KERNEL_VERSION = "6.5.9-ctsi-1-v0.19.1" XGENEXT2_VERSION = "1.5.6" } From 2f6cf0ce5381fd8096ecdc2cb38e728bb609a1a3 Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Wed, 10 Jul 2024 00:24:48 -0400 Subject: [PATCH 3/3] feat(sdk): add alto bundler --- .changeset/hot-spiders-cover.md | 5 +++++ packages/sdk/Dockerfile | 8 ++++++++ packages/sdk/alto | 2 ++ packages/sdk/docker-bake.hcl | 1 + 4 files changed, 16 insertions(+) create mode 100644 .changeset/hot-spiders-cover.md create mode 100755 packages/sdk/alto diff --git a/.changeset/hot-spiders-cover.md b/.changeset/hot-spiders-cover.md new file mode 100644 index 00000000..86e989fb --- /dev/null +++ b/.changeset/hot-spiders-cover.md @@ -0,0 +1,5 @@ +--- +"@cartesi/sdk": minor +--- + +add alto bundler diff --git a/packages/sdk/Dockerfile b/packages/sdk/Dockerfile index 3d6d9510..0506826d 100644 --- a/packages/sdk/Dockerfile +++ b/packages/sdk/Dockerfile @@ -47,6 +47,11 @@ curl -sSL https://github.com/google/go-containerregistry/releases/download/v${CR tar -zx -C /usr/local/bin EOF +# alto +FROM node:18.19.0-bookworm AS alto +ARG ALTO_VERSION +RUN npm install -g @pimlico/alto@${ALTO_VERSION} + # devnet files FROM node:slim as devnet ARG DEVNET_VERSION @@ -72,6 +77,7 @@ apt-get install -y --no-install-recommends \ jq \ libarchive-tools \ locales \ + nodejs \ squashfs-tools \ xxd \ xz-utils @@ -102,6 +108,7 @@ RUN curl -sSL https://github.com/foundry-rs/foundry/releases/download/nightly-${ tar -zx -C /usr/local/bin # healthcheck script using net_listening JSON-RPC method +COPY alto /usr/local/bin COPY devnet /usr/local/bin COPY eth_isready /usr/local/bin COPY eth_dump /usr/local/bin @@ -109,6 +116,7 @@ COPY eth_load /usr/local/bin COPY create_machine_snapshot /usr/local/bin COPY entrypoint.sh /usr/local/bin/ +COPY --from=alto /usr/local/lib/node_modules/@pimlico/alto /usr/local/lib/node_modules/@pimlico/alto COPY --from=su-exec /usr/local/src/su-exec /usr/local/bin/ COPY --from=crane /usr/local/bin/crane /usr/local/bin/ COPY --from=devnet /usr/local/lib/node_modules/@cartesi/devnet/export/abi/localhost.json /usr/share/cartesi/ diff --git a/packages/sdk/alto b/packages/sdk/alto new file mode 100755 index 00000000..1fab71c2 --- /dev/null +++ b/packages/sdk/alto @@ -0,0 +1,2 @@ +#!/bin/sh +node "/usr/local/lib/node_modules/@pimlico/alto/esm/cli/index.js" $@ diff --git a/packages/sdk/docker-bake.hcl b/packages/sdk/docker-bake.hcl index ae3146b1..2c825fb7 100644 --- a/packages/sdk/docker-bake.hcl +++ b/packages/sdk/docker-bake.hcl @@ -9,6 +9,7 @@ target "default" { SERVER_MANAGER_ORG = "cartesi" SERVER_MANAGER_VERSION = "0.9.1" CARTESI_IMAGE_KERNEL_VERSION = "0.19.1" + ALTO_VERSION = "0.0.4" DEVNET_VERSION = "1.8.0" LINUX_KERNEL_VERSION = "6.5.9-ctsi-1-v0.19.1" XGENEXT2_VERSION = "1.5.6"