Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/publish_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: sequencer_service-mdns
dockerfile: ./lez/sequencer/service/Dockerfile
build_args: |
FEATURES=mdns
FEATURES=prove,mdns
- name: indexer_service
dockerfile: ./lez/indexer/service/Dockerfile
build_args: ""
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ sequencer_core = { workspace = true, features = ["test-utils"] }

[features]
cucumber = ["dep:cucumber"]
# In-process guest execution with a memoized memory image, via `lee`.
prove = ["lee/prove"]

[[test]]
harness = false # Cucumber has its own main() function to run tests.
Expand Down
5 changes: 5 additions & 0 deletions lez/chain_state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ serde.workspace = true
thiserror.workspace = true
tokio.workspace = true

[features]
default = []
# In-process guest execution with a memoized memory image, via `lee`.
prove = ["lee/prove"]

[dev-dependencies]
testnet_initial_state.workspace = true
serde_json.workspace = true
2 changes: 2 additions & 0 deletions lez/indexer/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ workspace = true

[features]
default = []
# In-process guest execution with a memoized memory image, via `lee`.
prove = ["lee/prove", "chain_state/prove", "storage/prove"]

[dependencies]
chain_state.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions lez/indexer/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ arc-swap = "1.8.1"
[features]
# Return mock responses with generated data for testing purposes
mock-responses = []
# In-process guest execution with a memoized memory image, via `lee`.
prove = ["indexer_core/prove"]
11 changes: 9 additions & 2 deletions lez/indexer/service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,27 @@ FROM risc0_base AS chef

WORKDIR /indexer_service

# Comma-separated extra cargo features. Defaults to `prove`, which selects the
# in-process guest executor with a memoized memory image instead of spawning an
# r0vm subprocess per execution.
ARG FEATURES="prove"

# Planner stage - generates dependency recipe
FROM chef AS planner
COPY . .
RUN cargo chef prepare --bin indexer_service --recipe-path recipe.json

# Builder stage - builds dependencies and application
FROM chef AS builder
ARG FEATURES
COPY --from=planner /indexer_service/recipe.json recipe.json
# Build dependencies only (this layer will be cached)
RUN --mount=type=cache,target=/usr/local/cargo/registry/index \
--mount=type=cache,target=/usr/local/cargo/registry/cache \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/indexer_service/target \
cargo chef cook --bin indexer_service --release --recipe-path recipe.json
cargo chef cook --bin indexer_service ${FEATURES:+--features "$FEATURES"} \
--release --recipe-path recipe.json

# Copy source code
COPY . .
Expand All @@ -26,7 +33,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry/index \
--mount=type=cache,target=/usr/local/cargo/registry/cache \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/indexer_service/target \
cargo build --release --bin indexer_service \
cargo build --release ${FEATURES:+--features "$FEATURES"} --bin indexer_service \
&& strip /indexer_service/target/release/indexer_service \
&& cp /indexer_service/target/release/indexer_service /usr/local/bin/indexer_service

Expand Down
2 changes: 2 additions & 0 deletions lez/sequencer/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ thiserror.workspace = true

[features]
default = []
# In-process guest execution with a memoized memory image, via `lee`.
prove = ["lee/prove", "chain_state/prove"]
# Generate mock external clients implementations for testing
mock = []
# Enable mDNS-based local peer discovery for gossip.
Expand Down
2 changes: 2 additions & 0 deletions lez/sequencer/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ required-features = ["submit_stake"]

[features]
default = []
# In-process guest execution with a memoized memory image, via `lee`.
prove = ["sequencer_core/prove"]
# Runs the sequencer in standalone mode without depending on Bedrock and Indexer services.
standalone = ["sequencer_core/mock"]
# Enable mDNS-based local peer discovery for gossip.
Expand Down
6 changes: 4 additions & 2 deletions lez/sequencer/service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ WORKDIR /sequencer_service

# Build argument to enable standalone feature (defaults to false)
ARG STANDALONE=false
# Comma-separated extra cargo features, e.g. FEATURES=mdns for LAN peer discovery
ARG FEATURES=""
# Comma-separated extra cargo features, e.g. FEATURES=mdns for LAN peer discovery.
# Defaults to `prove`, which selects the in-process guest executor with a memoized
# memory image instead of spawning an r0vm subprocess per execution.
ARG FEATURES="prove"

# Planner stage - generates dependency recipe
FROM chef AS planner
Expand Down
Loading