Skip to content

BM-3066: Feature gate any risc0 specific stuff in boundless-market#2050

Open
bobbobbio wants to merge 14 commits into
mainfrom
bobbobbio/risc0-feature
Open

BM-3066: Feature gate any risc0 specific stuff in boundless-market#2050
bobbobbio wants to merge 14 commits into
mainfrom
bobbobbio/risc0-feature

Conversation

@bobbobbio

@bobbobbio bobbobbio commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This moves some remaining things to be behind the ZkvmOps and features gates the rest.
It adds a new risc0 feature to boundless-market and makes the risc0 crates optional based on that feature.

bobbobbio and others added 8 commits June 24, 2026 12:54
Adds `SetInclusionReceipt` as an associated type and
`fetch_set_inclusion_receipt` as an async method on `ZkvmOps`, keeping
risc0 imports confined to the risc0 module. `Risc0ZkvmOps` now owns an
`Option<SetVerifierService>` (wired in via `with_set_verifier`) and
implements the method. `Client::fetch_set_inclusion_receipt` delegates to
`zkvm_ops` and returns `Z::SetInclusionReceipt` instead of the concrete
risc0 type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The field was only used by fetch_set_inclusion_receipt, which now
delegates to ZkvmOps. Client::new() now takes an Address directly
instead of a full SetVerifierService.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace Risc0Digest::from_hex with crate::Digest::from_hex, which
already exists and has a From impl for the risc0 type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Production code only calls LocalExecutor methods (execute_program,
insert_execution_data). The Prover methods were only needed in one
test, which now accesses the concrete Risc0LocalExecutor directly
via a new Risc0ZkvmOps::local_executor() accessor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All risc0_* crates are now optional and activated by the new `risc0`
feature. The feature is included in `default` so nothing changes for
existing dependents. blake3-groth16 now implies risc0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ExecutorResp, ProverError, and ProofResult remain ungated as they are
generic types not coupled to any specific zkvm.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace Selector::* enum discriminants with their literal u32 values
so SelectorExt needs no risc0 deps. Gate TryFrom<Selector> impl and
the internals of with_set_builder_image_id; without risc0 the method
is a no-op returning self unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot changed the title Feature gate any risc0 specific stuff in boundless-market BM-3066: Feature gate any risc0 specific stuff in boundless-market Jun 24, 2026
@linear

linear Bot commented Jun 24, 2026

Copy link
Copy Markdown

BM-3066

@bobbobbio bobbobbio force-pushed the bobbobbio/risc0-feature branch from e2b9c6f to 49eb2b2 Compare June 24, 2026 20:21
bobbobbio and others added 5 commits June 24, 2026 13:34
Gate risc0_zkvm imports and the risc0_ethereum_contracts re-exports.
ReceiptClaim::ok() predicate eval falls back to None without risc0.

Makes `TxnErr::SetVerifierErr` variant and `IRiscZeroSetVerifierErrors::abi_decode`
call conditional on `all(feature = "risc0", not(target_os = "zkvm"))`, so
`cargo check -p boundless-market --no-default-features` now compiles cleanly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
try_extract_cycle_count falls back to None without risc0, with a
debug log message consistent with the other early-return paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a regression guard that ensures boundless-market compiles without
the risc0 feature enabled, preventing accidental re-introduction of
ungated risc0 imports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ProofResult, PreflightErrorKind, PreflightCache, ImageUploadCacheKey,
ImageUploadCache, and PriorityRequestorCheck are only consumed by risc0/
code, so gate their definitions (and the moka Cache import) behind
accordingly. Eliminates all dead_code warnings from
`cargo check -p boundless-market --no-default-features`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bobbobbio bobbobbio force-pushed the bobbobbio/risc0-feature branch from 49eb2b2 to 62b7a38 Compare June 24, 2026 20:34
@bobbobbio bobbobbio marked this pull request as ready for review June 26, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants