Skip to content

fix(rust-client): use delegated (remote) proving in the delegated-proving tutorial#207

Merged
BrianSeong99 merged 1 commit into
mainfrom
kbg/fix/delegated-prover-remote-proving
Jul 11, 2026
Merged

fix(rust-client): use delegated (remote) proving in the delegated-proving tutorial#207
BrianSeong99 merged 1 commit into
mainfrom
kbg/fix/delegated-prover-remote-proving

Conversation

@Keinberger

Copy link
Copy Markdown
Collaborator

Overview

The "Delegated Proving" tutorial (delegated_prover.rs + delegated_proving_tutorial.md) is supposed to teach delegated proving, but it actually proved locally: it built a LocalTransactionProver, and the doc even admitted "to keep this tutorial runnable without external services, the code below uses a local prover." Miden runs a public testnet delegated prover, so the tutorial can just do the real thing.

This PR points the tutorial at the hosted testnet delegated prover so it performs actual delegated (remote) proving.

Key Changes

  • rust-client/src/bin/delegated_prover.rs: build RemoteTransactionProver::new("https://tx-prover.testnet.miden.io") instead of LocalTransactionProver, and drop it into the existing prove_transaction_with(...) call. Both implement TransactionProver, so the execute, prove, submit, apply flow is unchanged. Updated the "local prover" comment/print strings to say delegated.
  • docs/src/rust-client/delegated_proving_tutorial.md: the same change inside the rust no_run block, corrected the prose that said the tutorial uses a local prover, and replaced the expected-output transcript, which was wrong (it showed account-balance lines this binary never prints) with the real nonce output.

Rationale

No new dependency: RemoteTransactionProver already ships with the miden-client the tutorial depends on (it is the same type ClientBuilder::for_testnet() uses). I used the URL as a string literal rather than the TESTNET_PROVER_ENDPOINT constant so a reader can see the endpoint and knows they can point it at their own prover. The privacy caveat (delegated proving reveals the transaction inputs, so it is not appropriate for the hash-preimage note tutorial) stays.

Tests

Ran delegated_prover against testnet: the remote prover generated the proof and Alice's nonce went 0 to 1 (exit 0). cargo test --doc (17 passed, 0 failed) and prettier --check are green.

@Keinberger

Copy link
Copy Markdown
Collaborator Author

@brianseong could you give this one a review when you get a chance? 🙏

@Keinberger Keinberger requested a review from BrianSeong99 July 10, 2026 12:20

@BrianSeong99 BrianSeong99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 👍

@BrianSeong99 BrianSeong99 merged commit 4940486 into main Jul 11, 2026
6 checks passed
@BrianSeong99 BrianSeong99 deleted the kbg/fix/delegated-prover-remote-proving branch July 11, 2026 22:28
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