From 28afc55ba2a0f989b4c93bd5ea22e24f18a5acc9 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Sat, 28 Oct 2023 18:45:33 +0200 Subject: [PATCH] fix: docker image --- .github/workflows/ci.yml | 4 ++-- Cargo.toml | 6 +++++- Dockerfile | 10 ++++++---- README.md | 2 +- bundler-spec-tests/launcher.sh | 1 + 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7332527..67816068 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,14 @@ jobs: - name: Setup Yarn cache - submodule "thirdparty/account-abstraction" uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '16.17' cache: 'yarn' cache-dependency-path: crates/contracts/thirdparty/account-abstraction - name: Setup Yarn cache - submodule "thirdparty/bundler" uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '16.17' cache: 'yarn' cache-dependency-path: tests/thirdparty/bundler diff --git a/Cargo.toml b/Cargo.toml index 56d65b4e..4a5123ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,17 @@ members = [ ] default-members = ["bin/silius"] +# Explicitly set the resolver to version 2, which is the default for packages with edition >= 2021 +# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html +resolver = "2" + [workspace.package] authors = ["Vid Kersic "] version = "0.3.0-alpha" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/silius-rs/silius" -rust-version = "1.71.1" +rust-version = "1.73.0" [workspace.dependencies] async-stream = "0.3.5" diff --git a/Dockerfile b/Dockerfile index 18dd0a09..eaed4349 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ # build FROM ubuntu:18.04 AS builder -RUN apt-get update && apt-get -y upgrade && apt-get install -y build-essential software-properties-common curl git clang pkg-config libclang-dev libssl-dev +RUN apt-get update && apt-get -y upgrade && apt-get install -y build-essential software-properties-common ca-certificates curl gnupg git clang pkg-config libclang-dev libssl-dev RUN add-apt-repository ppa:ethereum/ethereum && apt-get update && apt-get install -y solc -RUN curl -sL https://deb.nodesource.com/setup_14.x | sh - +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list @@ -23,7 +25,7 @@ RUN make setup-thirdparty RUN make build # run -FROM frolvlad/alpine-glibc +FROM frolvlad/alpine-glibc:alpine-3.17 RUN mkdir -p /data/silius @@ -33,6 +35,6 @@ COPY --from=builder /silius/target/release/silius /usr/local/bin/silius EXPOSE 3000 3001 -ENTRYPOINT ["usr/local/bin/silius"] +ENTRYPOINT ["/usr/local/bin/silius"] LABEL org.opencontainers.image.source=https://github.com/silius-rs/silius diff --git a/README.md b/README.md index d21e4cbd..46885831 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ For more information: https://hackmd.io/@Vid201/aa-bundler-rust Prerequisites: -Rust version: 1.71.1 +Rust version: 1.73.0 1. `libclang-dev`, `pkg-config` and `libssl-dev` on Debian/Ubuntu. 2. Ethereum execution client JSON-RPC API with enabled [`debug_traceCall`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#debug_tracecall). For production, you can use [Geth](https://github.com/ethereum/go-ethereum) or [Erigon](https://github.com/ledgerwatch/erigon). For testing, we are using Geth dev mode (tested with [v1.12.0](https://github.com/ethereum/go-ethereum/releases/tag/v1.12.0)); so you need to install [Geth](https://geth.ethereum.org/docs/getting-started/installing-geth) for running tests. diff --git a/bundler-spec-tests/launcher.sh b/bundler-spec-tests/launcher.sh index 36dfe3be..09d03b04 100755 --- a/bundler-spec-tests/launcher.sh +++ b/bundler-spec-tests/launcher.sh @@ -10,6 +10,7 @@ case $1 in start) docker-compose up -d + sleep 2 silius bundler \ --verbosity 4 \ --eth-client-address http://127.0.0.1:8545 \