diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3af5eb5b7..64960a227 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,7 +110,7 @@ jobs: - name: Build Espresso Dev Node # Espresso Dev Node currently requires testing feature, so it is built separately. run: | - cargo build --locked --release --features testing --bin espresso-dev-node + cargo build --locked --release --features "embedded-db testing" --bin espresso-dev-node - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/docker-compose.yaml b/docker-compose.yaml index a036ee88d..1e0fe5e8b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -229,6 +229,7 @@ services: - ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_MAX_CONNECTIONS - ESPRESSO_SEQUENCER_HOTSHOT_EVENT_STREAMING_API_PORT + - ESPRESSO_SEQUENCER_API_PEERS=http://sequencer1:$ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_STATE_PEERS=http://sequencer1:$ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_POSTGRES_HOST=sequencer-db-0 - ESPRESSO_SEQUENCER_POSTGRES_USER=root @@ -285,7 +286,7 @@ services: - ESPRESSO_SEQUENCER_CDN_ENDPOINT - ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_MAX_CONNECTIONS - - ESPRESSO_SEQUENCER_API_PEERS=http://sequencer2:$ESPRESSO_SEQUENCER_API_PORT + - ESPRESSO_SEQUENCER_API_PEERS=http://sequencer4:$ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_STATE_PEERS=http://sequencer2:$ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_POSTGRES_HOST=sequencer-db-1 - ESPRESSO_SEQUENCER_POSTGRES_USER=root @@ -342,7 +343,6 @@ services: - ESPRESSO_SEQUENCER_CDN_ENDPOINT - ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_MAX_CONNECTIONS - - ESPRESSO_SEQUENCER_API_PEERS=http://sequencer4:$ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_STATE_PEERS=http://sequencer3:$ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_SEQUENCER_L1_PROVIDER - ESPRESSO_SEQUENCER_L1_EVENTS_MAX_BLOCK_RANGE diff --git a/scripts/build-docker-images-native b/scripts/build-docker-images-native index 31f0222f2..e047d6c98 100755 --- a/scripts/build-docker-images-native +++ b/scripts/build-docker-images-native @@ -48,7 +48,12 @@ esac # Compile binaries case $KERNEL in linux) + CARGO_TARGET_DIR=target cargo build --release + # espresso-dev-node requires embedded-db feature to build so we build it separately + cargo build --bin espresso-dev-node --release --all-features + # building sequencer-sqlite binary + cargo build --release --manifest-path ./sequencer-sqlite/Cargo.toml ;; darwin) # Use a different target directory for docker builds to avoid conflicts with @@ -74,7 +79,9 @@ case $KERNEL in -v "$CARGO_HOME/registry:/usr/local/cargo/registry" \ -v "$CARGO_HOME/git:/usr/local/cargo/git" \ -it ghcr.io/espressosystems/devops-rust:stable \ - bash -c "cd /work && cargo build --release" + bash -c "cd /work && cargo build --release \ + && cargo build --bin espresso-dev-node --release --all-features \ + && cargo build --release --manifest-path ./sequencer-sqlite/Cargo.toml" ;; esac @@ -92,7 +99,7 @@ mkdir -p ${WORKDIR}/data cp -rv data/genesis ${WORKDIR}/data/ mkdir -p "${WORKDIR}/target/$ARCH/release" - for binary in "orchestrator" "cdn-broker" "cdn-marshal" "cdn-whitelist" "sequencer" "submit-transactions" "reset-storage" "state-relay-server" "state-prover" "deploy" "keygen" "permissionless-builder" "nasty-client" "pub-key" "espresso-bridge" "espresso-dev-node" "marketplace-solver" "marketplace-builder" "dev-rollup" "utils" "sequencer-sqlite"; do + for binary in "cdn-broker" "cdn-marshal" "cdn-whitelist" "deploy" "dev-rollup" "espresso-bridge" "espresso-dev-node" "keygen" "marketplace-builder" "marketplace-solver" "nasty-client" "node-metrics" "orchestrator" "permissionless-builder" "pub-key" "reset-storage" "sequencer" "sequencer-sqlite" "state-prover" "state-relay-server" "submit-transactions" "utils"; do cp -v "${CARGO_TARGET_DIR}/release/$binary" "${WORKDIR}/target/$ARCH/release" # Patch the interpreter for running without nix inside the ubuntu based docker image. if [ $KERNEL == "linux" ]; then diff --git a/scripts/build-docker-images-static b/scripts/build-docker-images-static index af87a0a2b..9f892328a 100755 --- a/scripts/build-docker-images-static +++ b/scripts/build-docker-images-static @@ -7,8 +7,13 @@ fi set -euxo pipefail -nix develop .#crossShell --ignore-environment --command cargo build --release -nix develop .#armCrossShell --ignore-environment --command cargo build --release +nix develop .#crossShell --ignore-environment --command bash -c "cargo build --release \ +&& cargo build --release --manifest-path ./sequencer-sqlite/Cargo.toml \ +&& cargo build --bin espresso-dev-node --release --all-features" + +nix develop .#armCrossShell --ignore-environment --command bash -c "cargo build --release \ +&& cargo build --release --manifest-path ./sequencer-sqlite/Cargo.toml \ +&& cargo build --bin espresso-dev-node --release --all-features" # The rest of the script doesn't run in a nix shell but we need to know where # the binaries are. @@ -41,7 +46,7 @@ for ARCH in "amd64" "arm64"; do ;; esac mkdir -p ${WORKDIR}/target/$ARCH/release - for binary in "orchestrator" "cdn-broker" "cdn-marshal" "cdn-whitelist" "sequencer" "submit-transactions" "reset-storage" "state-relay-server" "state-prover" "deploy" "keygen" "permissionless-builder" "nasty-client" "pub-key" "espresso-bridge" "espresso-dev-node" "marketplace-solver" "marketplace-builder" "dev-rollup" "utils" "sequencer-sqlite"; do + for binary in "cdn-broker" "cdn-marshal" "cdn-whitelist" "deploy" "dev-rollup" "espresso-bridge" "espresso-dev-node" "keygen" "marketplace-builder" "marketplace-solver" "nasty-client" "node-metrics" "orchestrator" "permissionless-builder" "pub-key" "reset-storage" "sequencer" "sequencer-sqlite" "state-prover" "state-relay-server" "submit-transactions" "utils"; do cp -v "${CARGO_TARGET_DIR}/${TARGET}/release/$binary" ${WORKDIR}/target/$ARCH/release done done