Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
b07338b
feat(zk): implement DexCircuit with AppCircuit trait for token transfers
Zena-park Feb 23, 2026
47a498f
feat(zk): add app-specific circuit framework (AppCircuit, AppState, i…
Zena-park Feb 23, 2026
0f71dea
feat(zk): add SP1 cycle-tracker instrumentation to guest program bina…
Zena-park Feb 23, 2026
ada4a17
feat(zk): add SP1 benchmark binary for guest program performance comp…
Zena-park Feb 23, 2026
30419df
feat(zk): wire configurable guest_program_id through sequencer and CLI
Zena-park Feb 23, 2026
89b5033
feat(zk): add programs.toml config and docker-compose guest program o…
Zena-park Feb 23, 2026
3516754
feat(platform): add /launch and /guide pages, rename Deployments to L2s
Zena-park Feb 23, 2026
d9a87fe
feat(platform): seed official programs in DB and enrich deployment query
Zena-park Feb 23, 2026
af9668d
docs(zk): add GP Store guide and notes on L2 platform, SP1 perf, and …
Zena-park Feb 23, 2026
ddb2c5a
chore: add build artifacts and local files to .gitignore
Zena-park Feb 23, 2026
6aa5949
feat(zk-dex): rewrite SP1 binary to use DexCircuit + AppProgramInput
Zena-park Feb 23, 2026
a291554
feat(zk-dex): convert ProgramInput to AppProgramInput in serialize_input
Zena-park Feb 23, 2026
b7668bc
fix(zk): fix build_trie_from_proofs and add signed tx benchmark
Zena-park Feb 23, 2026
f04dfd0
perf(zk-dex): add SP1 crypto precompile patches for 182x cycle reduction
Zena-park Feb 23, 2026
65a2730
feat(zk-dex): rewrite SP1 binary to use DexCircuit + AppProgramInput
Zena-park Feb 23, 2026
c8e0150
feat(zk-dex): convert ProgramInput to AppProgramInput in serialize_input
Zena-park Feb 23, 2026
e41c3e6
docs(zk): add ZK-DEX project progress summary
Zena-park Feb 23, 2026
edd4764
feat(zk-dex): add L1 deployer pipeline for ZK-DEX guest program regis…
Zena-park Feb 23, 2026
48329d5
fix(zk-dex): resolve SP1 guest crash and add Timelock VK registration
Zena-park Feb 24, 2026
63263c5
feat(zk-dex): add one-command localnet setup script
Zena-park Feb 24, 2026
48cb576
fix(zk-dex): increase localnet timeouts and fix output formatting
Zena-park Feb 24, 2026
9bdb341
feat(zk-dex): add Docker-based E2E localnet with real SP1 ZK proofs
Zena-park Feb 24, 2026
466b91a
feat(zk-dex): add withdrawal tracker page and permissionless batch ve…
Zena-park Feb 24, 2026
2675405
fix(zk-dex): resolve SP1 proof verification failure (00e) and add Doc…
Zena-park Feb 24, 2026
4fae4e0
fix(zk-dex): modularize handlers and fix SP1 proof verification (00e)
Zena-park Feb 24, 2026
ce4098b
test(zk-dex): add byte-level tests for withdrawal, deposit, and gas f…
Zena-park Feb 24, 2026
0753b82
fix(zk-dex): use block header gas for fee distribution and conditiona…
Zena-park Feb 24, 2026
d68aa1d
feat(l2): add empty batch auto-verification without ZK proof
Zena-park Feb 24, 2026
6b7716d
fix(l2): fix empty batch handling in committer and proof sender
Zena-park Feb 24, 2026
2e9f7ce
feat(zk-dex): implement full circuit with 7 new operations
Zena-park Feb 24, 2026
de7081b
fix(zk-dex): add settleOrder old-note slots to witness analyzer
Zena-park Feb 24, 2026
80b8801
fix(zk-dex): resolve missing storage proofs for dependent slots in wi…
Zena-park Feb 24, 2026
ac027c0
test(zk-dex): add settleOrder lifecycle test and harden input validation
Zena-park Feb 24, 2026
3bb463c
docs(zk-dex): add L2 genesis deployment plan for ZkDex contracts
Zena-park Feb 24, 2026
566f73a
feat(zk-dex): add L2 genesis deployment pipeline and fix storage slot…
Zena-park Feb 26, 2026
9578b34
fix(zk-dex): fix localnet L2 startup (--no-monitor, P2P port conflict)
Zena-park Feb 26, 2026
185a2dd
fix(zk-dex): set ETHREX_GUEST_PROGRAM_ID env var for correct programT…
Zena-park Feb 26, 2026
0908f67
docs(zk-dex): add E2E benchmark results and update progress document
Zena-park Feb 26, 2026
795e829
fix(l2): add genesis state root verification and fix prover version m…
Zena-park Feb 26, 2026
ce38bf2
feat(l2): trigger early batch commit on pending withdrawals
Zena-park Feb 26, 2026
7f2c47a
style(l2): run cargo fmt on zk-dex e2e code
Zena-park Mar 1, 2026
005072e
feat(zk-dex): rewrite SP1 binary to use DexCircuit + AppProgramInput
Zena-park Feb 23, 2026
881c302
feat(zk-dex): convert ProgramInput to AppProgramInput in serialize_input
Zena-park Feb 23, 2026
8f74865
fix(zk-dex): resolve SP1 guest crash and add Timelock VK registration
Zena-park Feb 24, 2026
33e976c
fix(zk-dex): modularize handlers and fix SP1 proof verification (00e)
Zena-park Feb 24, 2026
7049b9d
feat(zk-dex): implement full circuit with 7 new operations
Zena-park Feb 24, 2026
4012cd5
feat(zk-dex): improve Docker tools stability, add withdrawal claim UI…
Zena-park Feb 26, 2026
dfabc7d
docs(zk-dex): add SP1 ZK-DEX infrastructure cost analysis
Zena-park Feb 26, 2026
82bb70d
docs(zk-dex): update progress and E2E design docs with Phase 4 work
Zena-park Feb 26, 2026
170cd9a
feat(l2): make early batch commit conditional on prover idle state
Zena-park Feb 26, 2026
6b604b2
feat(zk-dex): add on-chain claim status check to withdrawal tracker
Zena-park Feb 26, 2026
817f3b5
fix(docker): improve build caching and fix compilation errors
Zena-park Feb 26, 2026
a2b2c8d
refactor(docker): rename Docker services from ethrex to tokamak-app
Zena-park Feb 27, 2026
db37d1d
style(l2): run cargo fmt on docker polish code
Zena-park Mar 1, 2026
1cfd5e7
docs(zk): clarify apply_gas_deduction docstring for app-specific circ…
Zena-park Mar 1, 2026
ee15114
fix(ci): resolve lint, fmt, and link check failures
Zena-park Mar 1, 2026
62eeb0d
fix(zk): address PR review feedback from Gemini Code Assist
Zena-park Mar 1, 2026
8f47dea
style(docker): simplify solc installation in Dockerfile.sp1
Zena-park Mar 1, 2026
e4795d9
fix(zk): remove duplicate code outside cfg(feature = "l2") in zk_dex …
Zena-park Mar 1, 2026
163f68a
fix(ci): regenerate zisk Cargo.lock for ethrex-trie dependency
Zena-park Mar 1, 2026
020f31a
fix(ci): regenerate all guest program Cargo.lock files
Zena-park Mar 1, 2026
d35cc41
fix(ci): regenerate remaining Cargo.lock files (tee/quote-gen, tooling)
Zena-park Mar 1, 2026
79913a6
fix(ci): fix Link Check by reverting legacy URLs and excluding stale …
Zena-park Mar 2, 2026
95a6854
style(l2): fix rustfmt formatting for CI nightly compatibility
Zena-park Mar 2, 2026
a5a709c
fix(ci): resolve sp1 backend clippy errors in sp1_benchmark
Zena-park Mar 2, 2026
e2315ce
fix(ci): exclude timeout-prone external URLs from link checker
Zena-park Mar 2, 2026
69910ec
style: format #[expect] attribute for CI nightly rustfmt
Zena-park Mar 2, 2026
da10c80
Merge branch 'pr/zk/02-circuit-framework' into pr/zk/04-docker-polish
Zena-park Mar 2, 2026
7b68cdb
fix(ci): resolve compilation errors after merging CI fixes from PR #7
Zena-park Mar 2, 2026
e610a90
fix(l2): replace unwrap_or with explicit error handling in early comm…
Zena-park Mar 2, 2026
08df3fd
Merge remote-tracking branch 'origin/pr/zk/02-circuit-framework' into…
Zena-park Mar 3, 2026
b4143d4
style: fix clippy warnings for CI lint pass
Zena-park Mar 3, 2026
856de48
fix(l2): include empty blocks in blob for KZG proof consistency
Zena-park Mar 3, 2026
9c8eaa5
fix(l2): regenerate blob bundle for empty blocks and fix Makefile env
Zena-park Mar 3, 2026
a0f3d97
style: fix rustfmt formatting
Zena-park Mar 3, 2026
0f7495e
fix(l2): skip early withdrawal commit in based mode
Zena-park Mar 3, 2026
153faaf
Merge branch 'pr/zk/04-docker-polish' into pr/zk/03-zk-dex-e2e
Zena-park Mar 3, 2026
955998c
fix(zk-dex): correct storage slots, restore witness trie and tests
Zena-park Mar 3, 2026
a088def
fix(zk-dex): fix cfg-gated test and remove unused imports
Zena-park Mar 3, 2026
eb4ca8c
fix(l2): update Makefile container names to match docker-compose
Zena-park Mar 3, 2026
f6e9c6b
fix(l2): resolve clippy errors in sp1_benchmark.rs
Zena-park Mar 3, 2026
8322066
fix(l2): replace expect() with context()? in sp1_benchmark.rs
Zena-park Mar 3, 2026
73ce6b8
fix(l2): update TDX workflow service name to match docker-compose
Zena-park Mar 3, 2026
7c6c800
fix(l2): update all container names in L2 workflow to match docker-co…
Zena-park Mar 3, 2026
21d629c
fix(l2): update contract_deployer references to tokamak-app-deployer …
Zena-park Mar 3, 2026
eaefe55
fix(l1): add flaky hive test to known-flaky list (Transaction Nonce P9)
Zena-park Mar 4, 2026
c3a9c1a
ci(l2): disable shared bridge test for single app chain
Zena-park Mar 4, 2026
9447efd
fix(ci): use expression syntax for disabled shared bridge condition
Zena-park Mar 4, 2026
1ed4c58
fix(ci): use repository variable to control shared bridge test
Zena-park Mar 4, 2026
3860887
ci(l2): disable Validium, Web3signer, Based, TDX integration tests
Zena-park Mar 4, 2026
bcfab9c
ci(l2): use repository variables to control all disabled tests
Zena-park Mar 4, 2026
f1e682f
ci: disable docs publish workflow on pull requests
Zena-park Mar 4, 2026
1d34845
ci: disable unnecessary PR workflows for app chain
Zena-park Mar 4, 2026
a572db1
fix(ci): allow skipped integration tests in L2 gate job
Zena-park Mar 4, 2026
13f7e58
fix(ci): remove broken exclude from integration test matrix
Zena-park Mar 4, 2026
ae8f1bd
perf(ci): aggressive L2 test optimization - parallel execution + comp…
Zena-park Mar 4, 2026
c542a7d
fix(ci): correct container names in L2 integration tests
Zena-park Mar 4, 2026
1e19a2e
fix(ci): remove orphaned shell code causing YAML syntax error
Zena-park Mar 4, 2026
81c83a0
ci: add flaky hive test variant to known-flaky allowlist
Zena-park Mar 4, 2026
cc8be11
Merge pull request #11 from tokamak-network/pr/zk/03-zk-dex-e2e
Zena-park Mar 4, 2026
f715bca
merge: resolve .gitignore conflict with feat/app-customized-framework
Zena-park Mar 4, 2026
d948e98
fix(guest-program): pass missing native_token_scale_factor arg to get…
Zena-park Mar 4, 2026
de8ecf6
refactor: improve RLP error messages and consolidate resolve_program_…
Zena-park Mar 4, 2026
a537ab0
fix(prover): add missing native_token_scale_factor field to ProgramIn…
Zena-park Mar 4, 2026
60749c8
fix(prover): use correct Option<U256> type for native_token_scale_factor
Zena-park Mar 4, 2026
f9de983
style: apply rustfmt to zk_dex orders.rs
Zena-park Mar 4, 2026
a773830
fix(guest-program): add missing native_token_scale_factor in test helper
Zena-park Mar 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
# Documentation
docs/

# Git history (not needed in Docker builds, vergen uses env var fallback)
.git/

# Local development
hive/
ethereum-package/
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/check-hive-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ KNOWN_FLAKY_TESTS=(
"Invalid Missing Ancestor Syncing ReOrg, Timestamp, EmptyTxs=False, CanonicalReOrg=False, Invalid P8"
"Invalid Missing Ancestor Syncing ReOrg, Timestamp, EmptyTxs=False, CanonicalReOrg=True, Invalid P8"
"Invalid Missing Ancestor Syncing ReOrg, Transaction Value, EmptyTxs=False, CanonicalReOrg=False, Invalid P9"
"Invalid Missing Ancestor Syncing ReOrg, Transaction Value, EmptyTxs=False, CanonicalReOrg=True, Invalid P9"
"Invalid Missing Ancestor Syncing ReOrg, Transaction Nonce, EmptyTxs=False, CanonicalReOrg=False, Invalid P9"
)

# Build a jq filter that excludes known-flaky tests.
Expand Down
187 changes: 110 additions & 77 deletions .github/workflows/pr-main_l2.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .github/workflows/pr-main_l2_tdx_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["**"]
# Disabled: not needed for app chain
# pull_request:
# branches: ["**"]

permissions:
contents: read
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pr-main_mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- main
paths:
- "docs/**"
pull_request:
paths:
- "docs/**"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -53,7 +50,7 @@ jobs:
- name: Check links
uses: lycheeverse/lychee-action@v2
with:
args: --no-progress --exclude 'localhost' docs/
args: --no-progress --timeout 30 --exclude 'localhost' --exclude 'medium\.com' --exclude 'github\.com/lambdaclass/ethrex' --exclude 'docs\.taiko\.xyz' --exclude 'ephema\.io' --exclude 'share\.firefox\.dev' docs/
fail: true

deploy:
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/pr_github_status_l1.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: PR Status

on:
pull_request:
types:
[
opened,
reopened,
synchronize,
edited,
ready_for_review,
converted_to_draft,
]
pull_request_review:
types: [submitted]
# Disabled: lambdaclass project status tracking
# pull_request:
# types: [opened, reopened, synchronize, edited, ready_for_review, converted_to_draft]
# pull_request_review:
# types: [submitted]
workflow_dispatch:

permissions:
contents: read
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr_loc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: PR Lines of Code Analysis

on:
pull_request:
branches: ["**"]
# Disabled: not needed for app chain
# pull_request:
# branches: ["**"]
workflow_dispatch:

permissions:
contents: read
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr_perf_blocks_exec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Benchmark Block execution

on:
pull_request:
branches: ["**"]
# Disabled: not needed for app chain
# pull_request:
# branches: ["**"]
workflow_dispatch:

permissions:
contents: read
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr_perf_changelog.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Perf Changelog
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
# Disabled: not needed for app chain
# pull_request:
# types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
workflow_dispatch:

permissions:
contents: read
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/pr_perf_levm.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Benchmark LEVM vs REVM

on:
pull_request:
branches: ["**"]
paths:
- "crates/vm/levm/**"
- ".github/workflows/pr_perf_levm.yaml"
# Disabled: not needed for app chain
# pull_request:
# branches: ["**"]
# paths:
# - "crates/vm/levm/**"
# - ".github/workflows/pr_perf_levm.yaml"
workflow_dispatch:

permissions:
Expand Down
24 changes: 15 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ GEMINI.md
dev_ethrex_l1/
dev_ethrex_l2/

# ZK-DEX localnet runtime directory
.zk-dex-localnet/

# Logs
logs/

Expand Down Expand Up @@ -137,17 +140,20 @@ core.*

__pycache__/

# Next.js build artifacts
# Next.js build output
.next/

# SP1 guest program build artifacts
crates/guest-program/bin/sp1/out/
crates/guest-program/bin/sp1-tokamon/
crates/guest-program/bin/sp1-zk-dex/
# SP1 guest program build artifacts (ELF/VK binaries)
crates/guest-program/bin/*/out/

# Local L2 config files
zk-dex-l2-*.toml
# SP1 guest program lock files (generated per build)
crates/guest-program/bin/sp1-tokamon/Cargo.lock
crates/guest-program/bin/sp1-zk-dex/Cargo.lock

# Platform build artifacts
platform/
# Platform local SQLite WAL/SHM files
platform/server/db/*.sqlite-shm
platform/server/db/*.sqlite-wal

# Generated L2 config files
zk-dex-l2-*.toml

4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@ COPY cmd ./cmd
COPY metrics ./metrics
COPY tooling ./tooling
COPY fixtures/genesis ./fixtures/genesis
COPY .git ./.git
COPY Cargo.* ./
COPY fixtures ./fixtures
COPY .cargo/ ./.cargo

ENV COMPILE_CONTRACTS=true

# Fallback git info for Docker builds without .git directory.
# vergen build scripts check these env vars before trying to open .git.
ENV VERGEN_GIT_SHA=docker-build
ENV VERGEN_GIT_BRANCH=docker-build

RUN cargo build --profile $PROFILE $BUILD_FLAGS

RUN mkdir -p /ethrex/bin && \
Expand Down
131 changes: 131 additions & 0 deletions Dockerfile.sp1
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Dockerfile.sp1 — SP1 ZK-DEX prover image with GPU support
#
# Extends the standard ethrex Dockerfile with SP1 toolchain installation
# for building and proving with real ZK proofs.
#
# Build:
# docker build -f Dockerfile.sp1 -t ethrex:sp1 .
#
# Build args:
# GUEST_PROGRAMS: Comma-separated guest programs (default: evm-l2,zk-dex)

FROM rust:1.90 AS chef

RUN apt-get update && apt-get install -y \
build-essential \
clang \
libclang-dev \
libc6 \
libssl-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN cargo install cargo-chef

WORKDIR /ethrex


# --- Planner Stage ---
FROM chef AS planner

COPY benches ./benches
COPY crates ./crates
COPY metrics ./metrics
COPY cmd ./cmd
COPY test ./test
COPY tooling ./tooling
COPY Cargo.* .
COPY .cargo/ ./.cargo

RUN cargo chef prepare --recipe-path recipe.json


# --- Builder Stage ---
FROM chef AS builder

ARG PROFILE="release"
ARG BUILD_FLAGS="--features l2,l2-sql,sp1"
ARG GUEST_PROGRAMS="evm-l2,zk-dex"

# Install SP1 toolchain (succinct)
ENV SP1_DIR=/root/.sp1
RUN curl -L https://sp1.succinct.xyz | bash \
&& ${SP1_DIR}/bin/sp1up

# Add succinct toolchain to PATH
ENV PATH="${SP1_DIR}/bin:${PATH}"
ENV RUSTUP_TOOLCHAIN=succinct

# Dependency cache
COPY --from=planner /ethrex/recipe.json recipe.json
RUN RUSTUP_TOOLCHAIN=stable cargo chef cook --release --recipe-path recipe.json $BUILD_FLAGS

# Install solc 0.8.31
RUN SOLC_URL="https://github.com/ethereum/solidity/releases/download/v0.8.31/solc-static-linux"; \
if [ "$(uname -m)" = "aarch64" ]; then SOLC_URL="${SOLC_URL}-arm"; fi; \
curl -L -o /usr/bin/solc "$SOLC_URL" && chmod +x /usr/bin/solc

# Copy source
COPY benches ./benches
COPY crates ./crates
COPY cmd ./cmd
COPY metrics ./metrics
COPY tooling ./tooling
COPY fixtures/genesis ./fixtures/genesis
COPY Cargo.* ./
COPY fixtures ./fixtures
COPY .cargo/ ./.cargo

ENV COMPILE_CONTRACTS=true
ENV GUEST_PROGRAMS=${GUEST_PROGRAMS}

# Fallback git info for Docker builds without .git directory.
# vergen build scripts check these env vars before trying to open .git.
ENV VERGEN_GIT_SHA=docker-build
ENV VERGEN_GIT_BRANCH=docker-build

# Build with SP1 features and guest programs
# RUSTUP_TOOLCHAIN=stable ensures the host build uses stable,
# while sp1_build internally uses the succinct toolchain for guest programs
RUN RUSTUP_TOOLCHAIN=stable cargo build --profile $PROFILE $BUILD_FLAGS

RUN mkdir -p /ethrex/bin && \
cp /ethrex/target/${PROFILE}/ethrex /ethrex/bin/ethrex


# --- Final Image ---
FROM ubuntu:24.04
WORKDIR /usr/local/bin

RUN apt-get update && apt-get install -y --no-install-recommends \
libssl3 \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*

# Install Docker CLI (needed by SP1 Groth16 gnark wrapper)
RUN curl -fsSL https://download.docker.com/linux/static/stable/$(uname -m)/docker-27.5.1.tgz \
| tar xz --strip-components=1 -C /usr/local/bin docker/docker

COPY cmd/ethrex/networks ./cmd/ethrex/networks
COPY --from=builder /ethrex/bin/ethrex .

# Copy guest program VK files so the deployer can register them on L1.
# The deployer resolves VK paths via canonicalize() on:
# env!("CARGO_MANIFEST_DIR")/../../crates/guest-program/bin/sp1-zk-dex/out/...
# where CARGO_MANIFEST_DIR = /ethrex/cmd/ethrex (baked at compile time).
# We need /ethrex/cmd/ethrex/ to exist for canonicalize() to resolve "../..".
RUN mkdir -p /ethrex/cmd/ethrex
COPY --from=builder /ethrex/crates/guest-program/bin/sp1/out/riscv32im-succinct-zkvm-vk-* \
/ethrex/crates/guest-program/bin/sp1/out/
COPY --from=builder /ethrex/crates/guest-program/bin/sp1-zk-dex/out/riscv32im-succinct-zkvm-vk-* \
/ethrex/crates/guest-program/bin/sp1-zk-dex/out/

EXPOSE 8545
EXPOSE 8551
EXPOSE 30303/tcp
EXPOSE 30303/udp
EXPOSE 9090
EXPOSE 1729
EXPOSE 3900

ENTRYPOINT [ "./ethrex" ]
23 changes: 16 additions & 7 deletions cmd/ethrex/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,22 @@ fn main() -> Result<(), Box<dyn Error>> {
.host_triple(true)
.build()?;

// Export git commit hash and branch name as environment variables
let git2 = Git2Builder::default().branch(true).sha(false).build()?;

Emitter::default()
.add_instructions(&rustc)?
.add_instructions(&git2)?
.emit()?;
// Export git commit hash and branch name as environment variables.
// In Docker builds without .git, fall back to env vars (set in Dockerfile).
if let (Ok(branch), Ok(sha)) = (
std::env::var("VERGEN_GIT_BRANCH"),
std::env::var("VERGEN_GIT_SHA"),
) {
Emitter::default().add_instructions(&rustc)?.emit()?;
println!("cargo:rustc-env=VERGEN_GIT_BRANCH={}", branch.trim());
println!("cargo:rustc-env=VERGEN_GIT_SHA={}", sha.trim());
} else {
let git2 = Git2Builder::default().branch(true).sha(true).build()?;
Emitter::default()
.add_instructions(&rustc)?
.add_instructions(&git2)?
.emit()?;
}

#[cfg(feature = "l2")]
{
Expand Down
Loading
Loading