diff --git a/.github/workflows/cross_docker.yaml b/.github/workflows/cross_docker.yaml index 59c56f062..1810a6bb2 100644 --- a/.github/workflows/cross_docker.yaml +++ b/.github/workflows/cross_docker.yaml @@ -13,7 +13,7 @@ jobs: packages: write strategy: matrix: - target: ["cannon", "asterisc"] + target: ["mips32", "riscv64g"] env: IMAGE_NAME: ${{ github.repository }}/${{ matrix.target }}-builder steps: diff --git a/.github/workflows/kona_fpp_docker.yaml b/.github/workflows/kona_fpp_docker.yaml index a6efccc79..b0cd29382 100644 --- a/.github/workflows/kona_fpp_docker.yaml +++ b/.github/workflows/kona_fpp_docker.yaml @@ -23,7 +23,7 @@ jobs: packages: write strategy: matrix: - fpvm: ["asterisc"] + fpvm: ["riscv64g"] env: IMAGE_NAME: ${{ github.repository }}/kona-fpp-${{ matrix.fpvm }} steps: diff --git a/.github/workflows/rust_ci.yaml b/.github/workflows/rust_ci.yaml index e8addfdb1..e6c4b40ff 100644 --- a/.github/workflows/rust_ci.yaml +++ b/.github/workflows/rust_ci.yaml @@ -30,7 +30,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - target: ["native", "cannon", "asterisc"] + target: ["native", "mips32", "riscv64g"] name: lint-${{ matrix.target }} steps: - name: Checkout sources @@ -83,7 +83,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - target: ["native", "cannon", "asterisc"] + target: ["native", "mips32", "riscv64g"] name: build-${{ matrix.target }} continue-on-error: true steps: diff --git a/bin/client/justfile b/bin/client/justfile index 7eb03331b..66102bdc5 100644 --- a/bin/client/justfile +++ b/bin/client/justfile @@ -14,7 +14,7 @@ run-client-asterisc block_number l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc ver OP_NODE_ADDRESS="{{rollup_node_rpc}}" HOST_BIN_PATH="./target/release/kona-host" - CLIENT_BIN_PATH="./target/riscv64gc-unknown-none-elf/release-client-lto/kona" + CLIENT_BIN_PATH="./target/riscv64g-unknown-none-elf/release-client-lto/kona" STATE_PATH="./state.bin.gz" CLAIMED_L2_BLOCK_NUMBER={{block_number}} @@ -34,7 +34,7 @@ run-client-asterisc block_number l1_rpc l1_beacon_rpc l2_rpc rollup_node_rpc ver cd $(git rev-parse --show-toplevel) echo "Building client program for RISC-V target..." - just build-asterisc --bin kona --profile release-client-lto + just build-riscv64g --bin kona --profile release-client-lto echo "Loading client program into Asterisc state format..." asterisc load-elf --path=$CLIENT_BIN_PATH @@ -147,7 +147,7 @@ run-client-asterisc-offline block_number l2_claim l2_output_root l2_head l1_head cd $(git rev-parse --show-toplevel) echo "Building client program for RISC-V target..." - just build-asterisc --bin kona --profile release-client-lto + just build-riscv64g --bin kona --profile release-client-lto echo "Loading client program into Asterisc state format..." asterisc load-elf --path=$CLIENT_BIN_PATH diff --git a/build/justfile b/build/justfile index 1bf29796f..c64c77b6a 100644 --- a/build/justfile +++ b/build/justfile @@ -4,12 +4,12 @@ set fallback := true default: @just --list -all: cannon asterisc +all: mips32 riscv64g -# Build the `cannon` program builder image -cannon: - docker build -t cannon-pipeline:latest -f cannon/cannon.dockerfile ./cannon +# Build the `mips32` program builder image +mips32: + docker build -t mips32-pipeline:latest -f mips32/mips32.dockerfile ./mips32 -# Build the `asterisc` program builder image -asterisc: - docker build -t asterisc-pipeline:latest -f asterisc/asterisc.dockerfile ./asterisc +# Build the `riscv64g` program builder image +riscv64g: + docker build -t riscv64g-pipeline:latest -f riscv64g/riscv64g.dockerfile ./riscv64g diff --git a/build/cannon/mips-unknown-none.json b/build/mips32/mips-unknown-none.json similarity index 100% rename from build/cannon/mips-unknown-none.json rename to build/mips32/mips-unknown-none.json diff --git a/build/cannon/cannon.dockerfile b/build/mips32/mips32.dockerfile similarity index 100% rename from build/cannon/cannon.dockerfile rename to build/mips32/mips32.dockerfile diff --git a/build/asterisc/asterisc-repro.dockerfile b/build/riscv64g/riscv64g-repro.dockerfile similarity index 97% rename from build/asterisc/asterisc-repro.dockerfile rename to build/riscv64g/riscv64g-repro.dockerfile index a644df173..6d053a5ee 100644 --- a/build/asterisc/asterisc-repro.dockerfile +++ b/build/riscv64g/riscv64g-repro.dockerfile @@ -46,7 +46,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends git # Build kona-client on the selected tag RUN git checkout $CLIENT_TAG && \ - cargo build -Zbuild-std=core,alloc --workspace --bin kona --locked --profile release-client-lto --exclude kona-host --exclude kona-derive-alloy && \ + cargo build -Zbuild-std=core,alloc --workspace --bin kona --locked --profile release-client-lto --exclude kona-host && \ mv ./target/riscv64gc-unknown-none-elf/release-client-lto/kona /kona-client-elf ################################################################ diff --git a/build/asterisc/asterisc.dockerfile b/build/riscv64g/riscv64g.dockerfile similarity index 100% rename from build/asterisc/asterisc.dockerfile rename to build/riscv64g/riscv64g.dockerfile diff --git a/justfile b/justfile index 2678f06ab..df0ccbb77 100644 --- a/justfile +++ b/justfile @@ -48,7 +48,7 @@ clean-actions: rm -rf monorepo/ # Lint the workspace for all available targets -lint-all: lint-native lint-cannon lint-asterisc lint-docs +lint-all: lint-native lint-mips32 lint-riscv64g lint-docs # Runs `cargo hack check` against the workspace hack: @@ -67,22 +67,22 @@ lint-native: fmt-native-check lint-docs cargo +nightly clippy --workspace --all --all-features --all-targets -- -D warnings # Lint the workspace (mips arch). Currently, only the `kona-std-fpvm` crate is linted for the `cannon` target, as it is the only crate with architecture-specific code. -lint-cannon: +lint-mips32: docker run \ --rm \ --platform linux/amd64 \ -v `pwd`/:/workdir \ -w="/workdir" \ - ghcr.io/anton-rs/kona/cannon-builder:main cargo +nightly clippy -p kona-std-fpvm --all-features --target /mips-unknown-none.json -Zbuild-std=core,alloc -- -D warnings + ghcr.io/anton-rs/kona/mips32-builder:main cargo +nightly clippy -p kona-std-fpvm --all-features --target /mips-unknown-none.json -Zbuild-std=core,alloc -- -D warnings # Lint the workspace (risc-v arch). Currently, only the `kona-std-fpvm` crate is linted for the `asterisc` target, as it is the only crate with architecture-specific code. -lint-asterisc: +lint-riscv64g: docker run \ --rm \ --platform linux/amd64 \ -v `pwd`/:/workdir \ -w="/workdir" \ - ghcr.io/anton-rs/kona/asterisc-builder:main cargo +nightly clippy -p kona-std-fpvm --all-features --target riscv64gc-unknown-linux-gnu -Zbuild-std=core,alloc -- -D warnings + ghcr.io/anton-rs/kona/riscv64g-builder:main cargo +nightly clippy -p kona-std-fpvm --all-features --target riscv64gc-unknown-linux-gnu -Zbuild-std=core,alloc -- -D warnings # Lint the Rust documentation lint-docs: @@ -93,34 +93,34 @@ test-docs: cargo test --doc --all --locked # Build the workspace for all available targets -build: build-native build-cannon build-asterisc +build: build-native build-mips32 build-riscv64g # Build for the native target build-native *args='': cargo build --workspace $@ # Build for the `cannon` target. Any crates that require the stdlib are excluded from the build for this target. -build-cannon *args='': +build-mips32 *args='': docker run \ --rm \ --platform linux/amd64 \ -v `pwd`/:/workdir \ -w="/workdir" \ - ghcr.io/anton-rs/kona/cannon-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-host + ghcr.io/anton-rs/kona/mips32-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-host # Build for the `asterisc` target. Any crates that require the stdlib are excluded from the build for this target. -build-asterisc *args='': +build-riscv64g *args='': docker run \ --rm \ --platform linux/amd64 \ -v `pwd`/:/workdir \ -w="/workdir" \ - ghcr.io/anton-rs/kona/asterisc-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-host + ghcr.io/anton-rs/kona/riscv64g-builder:main cargo build --workspace -Zbuild-std=core,alloc $@ --exclude kona-host # Build the `kona-client` prestate artifacts for the latest release. build-client-prestate-asterisc-artifacts kona_tag asterisc_tag out='./prestate-artifacts-asterisc': #!/bin/bash - PATH_TO_REPRO_BUILDER=./build/asterisc/asterisc-repro.dockerfile + PATH_TO_REPRO_BUILDER=./build/riscv64g/riscv64g-repro.dockerfile OUTPUT_DIR={{out}} echo "Building kona-client prestate artifacts for the asterisc target. 🐚 Kona Tag: {{kona_tag}} | 🎇 Asterisc Tag: {{asterisc_tag}}" @@ -136,7 +136,7 @@ build-client-prestate-asterisc-artifacts kona_tag asterisc_tag out='./prestate-a # binaries. build-client-prestate-asterisc-image kona_tag asterisc_tag out='./prestate-artifacts-asterisc': #!/bin/bash - PATH_TO_REPRO_BUILDER=./build/asterisc/asterisc-repro.dockerfile + PATH_TO_REPRO_BUILDER=./build/riscv64g/riscv64g-repro.dockerfile OUTPUT_DIR={{out}} echo "Building kona-client prestate artifacts for the asterisc target. 🐚 Kona Tag: {{kona_tag}} | 🎇 Asterisc Tag: {{asterisc_tag}}"