Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Sunodo SDK to 0.4.0 #81

Merged
merged 6 commits into from
Apr 19, 2024
Merged

Bump Sunodo SDK to 0.4.0 #81

merged 6 commits into from
Apr 19, 2024

Conversation

guidanoli
Copy link
Contributor

Closes #71

@guidanoli guidanoli requested a review from edubart April 18, 2024 00:52
@guidanoli guidanoli self-assigned this Apr 18, 2024
@guidanoli
Copy link
Contributor Author

Running sunodo build currently raises the following error:

id: unknown user dapp
chown: unknown group 
id: unknown user dapp
chown: unknown group 
su: unknown user dapp

Halted with payload: 1
Cycles: 43872128
43872128: b9f13b6df3b8868c9b8f921cf4cfc937f64de8ee0e8148815c59796aa74574c6
Storing machine: please wait
    Error: Command failed with exit code 2: docker container exec 17ad6da549d06d490c66408c132cb89c1a556fbc9e4ecb41463e385d71df169e cartesi-machine --assert-rolling-template --ram-length=128Mi 
    --flash-drive=label:root,filename:/tmp/.sunodo/image.ext2 --final-hash --store=/tmp/.sunodo/image --append-bootargs=no4lvl --append-init=WORKDIR=/opt/cartesi/dapp --append-entrypoint=export 
    PATH=/opt/cartesi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --append-entrypoint=rollup-init /opt/cartesi/dapp/dapp

Here is the output of sunodo --version:

@sunodo/cli/0.12.0 linux-x64 node-v20.12.0

@guidanoli guidanoli force-pushed the feature/bump-sunodo branch 3 times, most recently from 8f05f14 to a2d4f88 Compare April 18, 2024 02:15
Dockerfile Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
skel/cartesi-init Outdated Show resolved Hide resolved
@guidanoli guidanoli marked this pull request as ready for review April 18, 2024 02:16
Makefile Show resolved Hide resolved
Base automatically changed from feature/migrate-to-rollmelette to main April 19, 2024 12:25
@guidanoli guidanoli force-pushed the feature/bump-sunodo branch from a2d4f88 to c2fc2a2 Compare April 19, 2024 12:39
@guidanoli
Copy link
Contributor Author

The tests are failing, but I'm leaving the bare minimum for a future PR to fix just the tests, and not the infrastructure around the test environment.

@guidanoli
Copy link
Contributor Author

I've created #82 for us to fix the Lua tests later.

Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still building and testing to make a final review, but already have some comments that could be considered.

Dockerfile Show resolved Hide resolved
Makefile Show resolved Hide resolved
Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting this erro when trying to send a bounty via cli.

❯ go run ./cli send bounty \
    -n "Lua Bounty" \
    -d "Description of Lua bounty" \
    -c ./tests/bounties/lua-bounty/lua-5.4.3-bounty_riscv64.tar.xz
INF fork/exec /usr/local/bin/cast: argument list too long
exit status 1

Co-authored-by: Enderson Maia <[email protected]>
@guidanoli
Copy link
Contributor Author

I'm getting this erro when trying to send a bounty via cli.

❯ go run ./cli send bounty \
    -n "Lua Bounty" \
    -d "Description of Lua bounty" \
    -c ./tests/bounties/lua-bounty/lua-5.4.3-bounty_riscv64.tar.xz
INF fork/exec /usr/local/bin/cast: argument list too long
exit status 1

This is a known issue with the CLI.
With the migration from EggRoll to Rollmelette, we unfortunately don't have suport to a low-level send transaction feature. So, instead of using go-ethereum indirectly, we are (for the time being) calling cast from Go.
We plan to have a Typescript CLI in the future which will use viem to perform these kinds of L1 transactions. You can see there is now a notice in the README stating that the CLI and, therefore, the populate script, are unstable for now. Tests should be done manually through the web front-end for now.
See #76 and #79

@guidanoli guidanoli requested a review from endersonmaia April 19, 2024 15:13
Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, I suggest this patch

diff --git a/Dockerfile b/Dockerfile
index 31efcf9..912d908 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,9 @@
 # cross build stage
 FROM ubuntu:22.04 as build-stage
 
+ARG DEBIAN_FRONTEND=noninteractive
 RUN <<EOF
+set -e
 apt update
 apt upgrade -y
 apt install -y --no-install-recommends \
@@ -39,7 +41,9 @@ RUN go build -o ./dapp ./contract
 # riscv64 build stage
 FROM --platform=linux/riscv64 riscv64/ubuntu:22.04 as riscv64-build-stage
 
+ARG DEBIAN_FRONTEND=noninteractive
 RUN <<EOF
+set -e
 apt update
 apt upgrade -y
 apt install -y --no-install-recommends \
@@ -87,7 +91,13 @@ RUN <<EOF
 set -e
 apt-get update
 apt-get upgrade -y
-apt-get install -y --no-install-recommends busybox-static ca-certificates curl xz-utils libasan8 libasan6
+apt-get install -y --no-install-recommends \
+    busybox-static \
+    ca-certificates \
+    curl \
+    libasan6 \
+    libasan8 \
+    xz-utils
 curl -o ${MACHINE_EMULATOR_TOOLS_DEB} -fsSL https://github.com/cartesi/machine-emulator-tools/releases/download/v${MACHINE_EMULATOR_TOOLS_VERSION}/${MACHINE_EMULATOR_TOOLS_DEB}
 dpkg -i ${MACHINE_EMULATOR_TOOLS_DEB}
 rm ${MACHINE_EMULATOR_TOOLS_DEB}

@guidanoli guidanoli requested a review from endersonmaia April 19, 2024 15:47
@guidanoli guidanoli merged commit a8ec17c into main Apr 19, 2024
@guidanoli guidanoli deleted the feature/bump-sunodo branch April 19, 2024 16:12
@guidanoli
Copy link
Contributor Author

Thanks a bunch, guys! 🙏

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.

Bump sunodo/sdk to 0.4.0
3 participants