Skip to content

Commit

Permalink
feat(sdk): add alto bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Jul 19, 2024
1 parent dfebf04 commit 2f6cf0c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-spiders-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/sdk": minor
---

add alto bundler
8 changes: 8 additions & 0 deletions packages/sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -72,6 +77,7 @@ apt-get install -y --no-install-recommends \
jq \
libarchive-tools \
locales \
nodejs \
squashfs-tools \
xxd \
xz-utils
Expand Down Expand Up @@ -102,13 +108,15 @@ 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
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/
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/alto
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
node "/usr/local/lib/node_modules/@pimlico/alto/esm/cli/index.js" $@
1 change: 1 addition & 0 deletions packages/sdk/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2f6cf0c

Please sign in to comment.