From 40d019b1d8399d20c49d9b0e9769cb007c39e4b8 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Sat, 24 Feb 2024 10:44:27 -0500 Subject: [PATCH 01/20] fix(release): fix release pipeline --- .github/workflows/docker-release.yaml | 10 +++++----- Cargo.lock | 11 +++++++++++ Cross.toml | 2 +- Dockerfile | 11 +++++------ Dockerfile.build | 26 +++++++++++++++----------- Makefile | 4 ++-- bin/rundler/Cargo.toml | 2 ++ 7 files changed, 41 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docker-release.yaml b/.github/workflows/docker-release.yaml index f14b14b3a..ddf8bb61d 100644 --- a/.github/workflows/docker-release.yaml +++ b/.github/workflows/docker-release.yaml @@ -31,7 +31,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: clippy - toolchain: 1.71.0 + toolchain: 1.75.0 - name: Install toolchain (nightly) run: rustup toolchain add nightly --component rustfmt --profile minimal @@ -40,6 +40,8 @@ jobs: with: cache-on-failure: true + - uses: taiki-e/install-action@cross + - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -53,10 +55,8 @@ jobs: - name: Build and push image run: | - cargo install cross --git https://github.com/cross-rs/cross - if [ -n "${{ github.event.inputs.version }}" ]; then - make GIT_TAG="${{ github.event.inputs.version }}" docker-build + sudo -E env "PATH=$PATH" make GIT_TAG="${{ github.event.inputs.version }}" docker-build else - make docker-build-latest + sudo -E env "PATH=$PATH" make docker-build-latest fi diff --git a/Cargo.lock b/Cargo.lock index 42c2a301c..1746d6a4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3239,6 +3239,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.2.3+3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.100" @@ -3247,6 +3256,7 @@ checksum = "ae94056a791d0e1217d18b6cbdccb02c61e3054fc69893607f4067e3bb0b1fd1" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -4188,6 +4198,7 @@ dependencies = [ "metrics-exporter-prometheus", "metrics-process", "metrics-util", + "openssl", "paste", "rundler-builder", "rundler-pool", diff --git a/Cross.toml b/Cross.toml index 76c3e817f..a69f5ecaf 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,2 +1,2 @@ [build] -dockerfile = "Dockerfile.build" +dockerfile = "./Dockerfile.build" diff --git a/Dockerfile b/Dockerfile index 095574321..5f73c6970 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,18 @@ # Adapted from https://github.com/paradigmxyz/reth/blob/main/Dockerfile # syntax=docker/dockerfile:1.4 +FROM ghcr.io/foundry-rs/foundry:latest as foundry + FROM --platform=$TARGETPLATFORM rust:1.75.0 AS chef-builder # Install system dependencies +COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge +SHELL ["/bin/bash", "-c"] RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list 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_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list -RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn rsync - -SHELL ["/bin/bash", "-c"] -RUN curl -L https://foundry.paradigm.xyz | bash -ENV PATH="/root/.foundry/bin:${PATH}" -RUN foundryup +RUN apt-get update && apt-get -y upgrade && apt-get install -y protobuf-compiler nodejs yarn rsync RUN cargo install cargo-chef --locked diff --git a/Dockerfile.build b/Dockerfile.build index 7b8f19e4e..fb8f60483 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,18 +1,22 @@ ARG CROSS_BASE_IMAGE -# Dockerfile.forge + FROM ghcr.io/foundry-rs/foundry:latest as foundry FROM $CROSS_BASE_IMAGE COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge -ARG DEBIAN_FRONTEND=noninteractive +# Install Node.js 14.x and Yarn +RUN apt-get update \ + && apt-get install -y curl \ + && curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \ + && apt-get install -y nodejs \ + && npm install -g yarn \ + && apt-get clean + +RUN apt-get update && apt-get install -y unzip + +# Install Protobuf compiler v3 +RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip \ + && unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local \ + && chmod +x /usr/local/bin/protoc -RUN apt-get update && apt-get install -y gnupg2 apt-transport-https ca-certificates software-properties-common -RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list -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_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list -RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn -RUN add-apt-repository ppa:ethereum/ethereum -RUN apt-get update -RUN apt-get install -y solc diff --git a/Makefile b/Makefile index c176f6a86..073c87048 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ submodule-update: ## Update git submodules git submodule update build-%: - cross build --bin rundler --target $* --profile "$(PROFILE)" + cross build --target $* --profile "$(PROFILE)" .PHONY: fmt fmt: ## format code with nightly rust @@ -71,6 +71,6 @@ define build_docker_image --platform linux/arm64,linux/amd64 \ --tag $(DOCKER_IMAGE_NAME):$(1) \ $(if $(2),--tag $(DOCKER_IMAGE_NAME):$(2)) \ - --provenance=false + --provenance=false --push endef diff --git a/bin/rundler/Cargo.toml b/bin/rundler/Cargo.toml index 75d085d52..2d7e49f3f 100644 --- a/bin/rundler/Cargo.toml +++ b/bin/rundler/Cargo.toml @@ -44,3 +44,5 @@ tracing.workspace = true tracing-appender = "0.2.2" tracing-log = "0.2.0" tracing-subscriber = { version = "0.3.16", features = ["env-filter", "fmt", "json"] } +openssl = { version = "0.10", features = ["vendored"] } + From b278e151337bb11a7995051d6a0d1b9ced3eedf3 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Sat, 24 Feb 2024 11:42:26 -0500 Subject: [PATCH 02/20] feat(release): change back to curl on local docker image --- Dockerfile | 11 ++++++----- Dockerfile.build | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f73c6970..095574321 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,19 @@ # Adapted from https://github.com/paradigmxyz/reth/blob/main/Dockerfile # syntax=docker/dockerfile:1.4 -FROM ghcr.io/foundry-rs/foundry:latest as foundry - FROM --platform=$TARGETPLATFORM rust:1.75.0 AS chef-builder # Install system dependencies -COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge -SHELL ["/bin/bash", "-c"] RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list 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_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list -RUN apt-get update && apt-get -y upgrade && apt-get install -y protobuf-compiler nodejs yarn rsync +RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn rsync + +SHELL ["/bin/bash", "-c"] +RUN curl -L https://foundry.paradigm.xyz | bash +ENV PATH="/root/.foundry/bin:${PATH}" +RUN foundryup RUN cargo install cargo-chef --locked diff --git a/Dockerfile.build b/Dockerfile.build index fb8f60483..2324e2af4 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,6 +1,6 @@ ARG CROSS_BASE_IMAGE -FROM ghcr.io/foundry-rs/foundry:latest as foundry +FROM ghcr.io/foundry-rs/foundry:nightly-ac802618e15039b31e464ae6d1fe3ee39f87cefd as foundry FROM $CROSS_BASE_IMAGE COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge From 4da08ab794ea09970246240b2318a74f37af6060 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Sat, 24 Feb 2024 11:49:22 -0500 Subject: [PATCH 03/20] feat(release): change back to curl on local docker image --- bin/rundler/Cargo.toml | 3 +-- deny.toml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/rundler/Cargo.toml b/bin/rundler/Cargo.toml index 2d7e49f3f..86a58c87b 100644 --- a/bin/rundler/Cargo.toml +++ b/bin/rundler/Cargo.toml @@ -27,7 +27,7 @@ dotenv = "0.15.0" ethers.workspace = true itertools = "0.12.1" metrics = "0.22.1" -metrics-exporter-prometheus = "0.13.1" +metrics-exporter-prometheus = { version = "0.13.1", default-features = false, features = ["http-listener"] } metrics-process = "1.0.10" metrics-util = "0.16.2" paste = "1.0" @@ -44,5 +44,4 @@ tracing.workspace = true tracing-appender = "0.2.2" tracing-log = "0.2.0" tracing-subscriber = { version = "0.3.16", features = ["env-filter", "fmt", "json"] } -openssl = { version = "0.10", features = ["vendored"] } diff --git a/deny.toml b/deny.toml index c6cb720f9..b00691538 100644 --- a/deny.toml +++ b/deny.toml @@ -22,6 +22,7 @@ deny = [ # Each entry the name of a crate and a version range. If version is # not specified, all versions will be matched. #{ name = "ansi_term", version = "=0.11.0" }, + { name = "openssl" } ] # Certain crates/versions that will be skipped when doing duplicate detection. skip = [] From 80e6e3a3779256642a0d49d171e297be7173b23c Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Mon, 26 Feb 2024 11:52:32 -0500 Subject: [PATCH 04/20] feat(release): fixes --- Cargo.lock | 113 ----------------------------------------------------- 1 file changed, 113 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1746d6a4d..47801fbc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1792,21 +1792,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.0" @@ -2259,19 +2244,6 @@ dependencies = [ "tokio-io-timeout", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "iana-time-zone" version = "0.1.53" @@ -2907,7 +2879,6 @@ checksum = "9bf4e7146e30ad172c42c39b3246864bd2d3c6396780711a1baf749cfe423e21" dependencies = [ "base64 0.21.0", "hyper", - "hyper-tls", "indexmap 2.2.3", "ipnet", "metrics 0.22.1", @@ -2915,7 +2886,6 @@ dependencies = [ "quanta", "thiserror", "tokio", - "tracing", ] [[package]] @@ -3037,24 +3007,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -3207,60 +3159,12 @@ dependencies = [ "syn 1.0.107", ] -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.50", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.2.3+3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae94056a791d0e1217d18b6cbdccb02c61e3054fc69893607f4067e3bb0b1fd1" -dependencies = [ - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" @@ -4198,7 +4102,6 @@ dependencies = [ "metrics-exporter-prometheus", "metrics-process", "metrics-util", - "openssl", "paste", "rundler-builder", "rundler-pool", @@ -5549,16 +5452,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.23.4" @@ -6071,12 +5964,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.4" From 6085c9e04af8c9c7cf4c55261996b91e8bd0be91 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:13:03 -0500 Subject: [PATCH 05/20] feat(release): fix if statement --- .github/workflows/release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c3d7d9c5f..d358d23cd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -75,7 +75,7 @@ jobs: # ============================== - name: Apple Silicon setup - if: ${{ matrix.job.target == 'aarch64-apple-darwin' }} + if: matrix.target == 'aarch64-apple-darwin' run: | echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV @@ -90,10 +90,10 @@ jobs: env PROFILE=${{ matrix.profile }} make build-${{ matrix.arch }} - name: Move cross-compiled binary - if: matrix.arch != 'x86_64-pc-windows-gnu' run: | mkdir artifacts - mv target/${{ matrix.arch }}/${{ matrix.profile }}/rundler ./artifacts + [[ "${{ matrix.target }}" == *windows* ]] && ext=".exe" + mv "target/${{ matrix.target }}/${{ matrix.profile }}/rundler${ext}" ./artifacts - name: Move cross-compiled binary (Windows) if: matrix.arch == 'x86_64-pc-windows-gnu' From 8de70b6034b91d84259c27177b8b79ad0e0f3768 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:23:05 -0500 Subject: [PATCH 06/20] feat(release): change release build --- .github/workflows/release.yaml | 65 +++++++++++++--------------------- 1 file changed, 25 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d358d23cd..2091742fc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -30,42 +30,33 @@ jobs: build: name: build release + runs-on: ${{ matrix.os }} + needs: extract-version strategy: matrix: - arch: - [ - aarch64-unknown-linux-gnu, - x86_64-unknown-linux-gnu, - x86_64-apple-darwin, - aarch64-apple-darwin, - x86_64-pc-windows-gnu, - ] include: - - arch: aarch64-unknown-linux-gnu - platform: ubuntu-latest + - target: aarch64-unknown-linux-gnu + os: ubuntu-20.04 profile: release - - arch: x86_64-unknown-linux-gnu - platform: ubuntu-latest + - target: x86_64-unknown-linux-gnu + os: ubuntu-20.04 profile: release - - arch: x86_64-apple-darwin - platform: macos-latest + - target: x86_64-apple-darwin + os: macos-latest profile: release - - arch: aarch64-apple-darwin - platform: macos-latest + - target: aarch64-apple-darwin + os: macos-latest profile: release - - arch: x86_64-pc-windows-gnu - platform: ubuntu-latest + - target: x86_64-pc-windows-gnu + os: ubuntu-20.04 profile: release - runs-on: ${{ matrix.platform }} - needs: extract-version steps: - - name: Checkout sources - uses: actions/checkout@v3 - - name: Get latest version of stable Rust - run: rustup update stable - - name: Install target - run: rustup target add ${{ matrix.arch }} + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + target: ${{ matrix.target }} + - uses: taiki-e/install-action@cross - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true @@ -84,10 +75,10 @@ jobs: # Builds # ============================== - - name: Build rundler for ${{ matrix.arch }} + - name: Build rundler for ${{ matrix.target }} run: | cargo install cross - env PROFILE=${{ matrix.profile }} make build-${{ matrix.arch }} + env PROFILE=${{ matrix.profile }} make build-${{ matrix.target }} - name: Move cross-compiled binary run: | @@ -95,12 +86,6 @@ jobs: [[ "${{ matrix.target }}" == *windows* ]] && ext=".exe" mv "target/${{ matrix.target }}/${{ matrix.profile }}/rundler${ext}" ./artifacts - - name: Move cross-compiled binary (Windows) - if: matrix.arch == 'x86_64-pc-windows-gnu' - run: | - mkdir artifacts - mv target/${{ matrix.arch }}/${{ matrix.profile }}/rundler.exe ./artifacts - # ============================== # Signing # ============================== @@ -113,8 +98,8 @@ jobs: export GPG_TTY=$(tty) echo -n "$GPG_SIGNING_KEY" | gpg --batch --import cd artifacts - tar -czf rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz rundler* - echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz + tar -czf rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz rundler* + echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz mv *tar.gz* .. shell: bash @@ -125,14 +110,14 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz - path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz + name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz + path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz - name: Upload signature uses: actions/upload-artifact@v3 with: - name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc - path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc + name: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc + path: rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc draft-release: name: draft release From 0df3c376683006fbb6ab6780e854f8bea704726c Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:25:33 -0500 Subject: [PATCH 07/20] feat(release): remove install script --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2091742fc..7c11bb300 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -77,7 +77,6 @@ jobs: - name: Build rundler for ${{ matrix.target }} run: | - cargo install cross env PROFILE=${{ matrix.profile }} make build-${{ matrix.target }} - name: Move cross-compiled binary From c3ca2b4fece482e0baca44e37e2869e6a3b0f052 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:33:31 -0500 Subject: [PATCH 08/20] feat(release): get recursive dependencies --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7c11bb300..c6eda0cd9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -53,6 +53,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: dtolnay/rust-toolchain@stable with: target: ${{ matrix.target }} From 084882642eac59d8661689c9afd4e708b2aea4d6 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:39:07 -0500 Subject: [PATCH 09/20] feat(release): add foundry --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c6eda0cd9..744465e28 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,6 +62,8 @@ jobs: - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true + - name: Foundry install + uses: foundry-rs/foundry-toolchain@v1 # ============================== # Apple Silicon SDK setup From 691cef6a97e915530d5628963ae7ff82b279cf7b Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:44:54 -0500 Subject: [PATCH 10/20] feat(release): add protobuf for images not using cross builder --- .github/workflows/release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 744465e28..83113f85f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,6 +64,8 @@ jobs: cache-on-failure: true - name: Foundry install uses: foundry-rs/foundry-toolchain@v1 + - name: Install protobuf + run: sudo apt-get install -y protobuf-compiler # ============================== # Apple Silicon SDK setup From 19983b067ccbd33fa6af631201648eca0323a187 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:52:08 -0500 Subject: [PATCH 11/20] feat(release): add protobuf for images not using cross builder --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 83113f85f..ce1b1aefa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -62,9 +62,12 @@ jobs: - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true + - name: Foundry install + if: contains(matrix.target, "apple") uses: foundry-rs/foundry-toolchain@v1 - name: Install protobuf + if: contains(matrix.target, "apple") run: sudo apt-get install -y protobuf-compiler # ============================== From cd017c2de833ff35dcfe2e31d2236bd959b8b8a5 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 11:56:37 -0500 Subject: [PATCH 12/20] feat(release): add protobuf for images not using cross builder --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ce1b1aefa..c5384f8a7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -64,10 +64,10 @@ jobs: cache-on-failure: true - name: Foundry install - if: contains(matrix.target, "apple") + if: contains( ${{ matrix.target }}, 'apple') uses: foundry-rs/foundry-toolchain@v1 - name: Install protobuf - if: contains(matrix.target, "apple") + if: contains( ${{ matrix.target }}, 'apple') run: sudo apt-get install -y protobuf-compiler # ============================== From f40af8389dd8e919f7fa57a3094090b6419a8f1e Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 12:07:53 -0500 Subject: [PATCH 13/20] feat(release): add protobuf for images not using cross builder --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c5384f8a7..1f88fcb27 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -68,7 +68,7 @@ jobs: uses: foundry-rs/foundry-toolchain@v1 - name: Install protobuf if: contains( ${{ matrix.target }}, 'apple') - run: sudo apt-get install -y protobuf-compiler + uses: arduino/setup-protoc@v3 # ============================== # Apple Silicon SDK setup From 401ae16f70aa4f5772ca12fcefced363374ab958 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 12:17:17 -0500 Subject: [PATCH 14/20] feat(release): make release sudo for solc install --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1f88fcb27..784ad9124 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -86,7 +86,7 @@ jobs: - name: Build rundler for ${{ matrix.target }} run: | - env PROFILE=${{ matrix.profile }} make build-${{ matrix.target }} + sudo -E env "PATH=$PATH" make build-${{ matrix.target }} - name: Move cross-compiled binary run: | From d4170bb3c42743504bc85ea3183f719c26b1569a Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 12:29:23 -0500 Subject: [PATCH 15/20] feat(release): update gpg script --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 784ad9124..692877200 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -104,7 +104,7 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} run: | export GPG_TTY=$(tty) - echo -n "$GPG_SIGNING_KEY" | gpg --batch --import + echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --batch --import cd artifacts tar -czf rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz rundler* echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab rundler-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz From 35dbc4e01cab347871671ef3048829d5e5b04c2e Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 15:19:21 -0500 Subject: [PATCH 16/20] feat(paymaster): remove java common chain utils --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 692877200..8b8f125c3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -92,7 +92,7 @@ jobs: run: | mkdir artifacts [[ "${{ matrix.target }}" == *windows* ]] && ext=".exe" - mv "target/${{ matrix.target }}/${{ matrix.profile }}/rundler${ext}" ./artifacts + sudo mv "target/${{ matrix.target }}/${{ matrix.profile }}/rundler${ext}" ./artifacts # ============================== # Signing From 93d971a0e3c768e2673becf7a2ef4a5f79049adc Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Wed, 28 Feb 2024 16:39:53 -0500 Subject: [PATCH 17/20] feat(release): fix loop --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8b8f125c3..da7626c7c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -213,7 +213,7 @@ jobs: ) assets=() for asset in ./rundler-*.tar.gz*; do - assets+=("-a" "$asset/$asset") + assets+=("$asset/$asset") done tag_name="${{ env.VERSION }}" - echo "$body" | gh release create --draft "${assets[@]}" -F "-" "$tag_name" + echo "$body" | gh release create --draft -t "Rundler $tag_name" -F "-" "$tag_name" "${assets[@]}" From 65399a8ed9e2b0313ce43d8414b3e94fe5e49ce2 Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Mon, 4 Mar 2024 13:15:16 -0500 Subject: [PATCH 18/20] feat(version): change version back --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e490b1678..e63fd78b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ default-members = ["bin/rundler"] resolver = "2" [workspace.package] -version = "0.2.0-alpha.0" +version = "0.1.0-beta" edition = "2021" rust-version = "1.75" license = "MIT OR Apache-2.0" From 5e6c5341b524808fe0ad71addcfe383f5e47702a Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Mon, 4 Mar 2024 14:13:04 -0500 Subject: [PATCH 19/20] feat(version): change version back --- Cargo.lock | 22 +++++++++++----------- Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 47801fbc1..ffd4bfb78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4090,7 +4090,7 @@ dependencies = [ [[package]] name = "rundler" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "clap", @@ -4128,7 +4128,7 @@ dependencies = [ [[package]] name = "rundler-builder" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "async-trait", @@ -4169,7 +4169,7 @@ dependencies = [ [[package]] name = "rundler-dev" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "ethers", @@ -4178,7 +4178,7 @@ dependencies = [ [[package]] name = "rundler-pool" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "async-stream", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "rundler-provider" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "async-trait", @@ -4231,7 +4231,7 @@ dependencies = [ [[package]] name = "rundler-rpc" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "async-trait", @@ -4260,7 +4260,7 @@ dependencies = [ [[package]] name = "rundler-sim" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "arrayvec", @@ -4287,7 +4287,7 @@ dependencies = [ [[package]] name = "rundler-task" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "async-trait", @@ -4307,7 +4307,7 @@ dependencies = [ [[package]] name = "rundler-tools" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "clap", @@ -4324,7 +4324,7 @@ dependencies = [ [[package]] name = "rundler-types" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "chrono", @@ -4339,7 +4339,7 @@ dependencies = [ [[package]] name = "rundler-utils" -version = "0.2.0-alpha.0" +version = "0.1.0-beta" dependencies = [ "anyhow", "derive_more", diff --git a/Cargo.toml b/Cargo.toml index e63fd78b9..d1ae4a4f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ default-members = ["bin/rundler"] resolver = "2" [workspace.package] -version = "0.1.0-beta" +version = "0.1.0-rc0" edition = "2021" rust-version = "1.75" license = "MIT OR Apache-2.0" From 12869637f58ca7f93b28c2cd5329edb785b040ee Mon Sep 17 00:00:00 2001 From: 0xfourzerofour Date: Mon, 4 Mar 2024 14:13:45 -0500 Subject: [PATCH 20/20] feat(version): update --- Cargo.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffd4bfb78..a178358ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4090,7 +4090,7 @@ dependencies = [ [[package]] name = "rundler" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "clap", @@ -4128,7 +4128,7 @@ dependencies = [ [[package]] name = "rundler-builder" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "async-trait", @@ -4169,7 +4169,7 @@ dependencies = [ [[package]] name = "rundler-dev" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "ethers", @@ -4178,7 +4178,7 @@ dependencies = [ [[package]] name = "rundler-pool" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "async-stream", @@ -4212,7 +4212,7 @@ dependencies = [ [[package]] name = "rundler-provider" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "async-trait", @@ -4231,7 +4231,7 @@ dependencies = [ [[package]] name = "rundler-rpc" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "async-trait", @@ -4260,7 +4260,7 @@ dependencies = [ [[package]] name = "rundler-sim" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "arrayvec", @@ -4287,7 +4287,7 @@ dependencies = [ [[package]] name = "rundler-task" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "async-trait", @@ -4307,7 +4307,7 @@ dependencies = [ [[package]] name = "rundler-tools" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "clap", @@ -4324,7 +4324,7 @@ dependencies = [ [[package]] name = "rundler-types" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "chrono", @@ -4339,7 +4339,7 @@ dependencies = [ [[package]] name = "rundler-utils" -version = "0.1.0-beta" +version = "0.1.0-rc0" dependencies = [ "anyhow", "derive_more",