Migration Guide
Migrate to using the Succinct Prover Network mainnet.
If you've previously been using hosted or reserved capacity, you can migrate to mainnet by following these steps below.
Step 1: Get PROVE on the network
PROVE is used to pay for proof requests on the network. Follow the quickstart guide to deposit PROVE into your account on the network.
Step 2: Update your code dependencies
If you've previously been using reserved capacity, you will have some Rust code that uses the
sp1-sdk. This is defined in your Cargo.toml
file:
[dependencies]
sp1-sdk = "..."
You will need to update this version to version 5.2.1
. You will also need to disable default
features and turn on the network
feature.
[dependencies]
sp1-sdk = { version = "5.2.1", default-features = false, features = ["network"] }
If you previously had other features enabled in your sp1-sdk
dependency, such as native-gnark
,
you should also include them in your updated sp1-sdk dependency (e.g. features = ["network", "native-gnark"]
).
Step 3: Update your code logic
You'll likely have existing code that uses the ProverClient
to generate proofs. You'll need to
update this code to use mainnet.
Specifically, since the mainnet network uses an auction mechanism
to find you the best price for your proof request, you'll need prove()
calls to use
FulfillmentStrategy::Auction
for your request strategy()
.
If you have skip_simulation(true)
it's important to set gas_limit()
and cycle_limit()
to reasonable upper bound values for your
request. The actual values gas used and cycles used should always be less than or equal to these
limits. It's best to look at previous proof requests on the explorer to determine these numbers.
This is an example of previous reserved capacity code:
self.prover
.prove(&self.pk, &stdin)
.strategy(FulfillmentStrategy::Reserved)
.cycle_limit(10_000_000_000_000)
.skip_simulation(true)
.plonk()
.timeout(Duration::from_secs(1800))
.run_async()
.await
In this case, you would update the new code to use the FulfillmentStrategy::Auction
with gas_limit()
defined:
self.prover
.prove(&self.pk, &stdin)
.strategy(FulfillmentStrategy::Auction)
.skip_simulation(true)
.cycle_limit(10_000_000_000_000)
.gas_limit(50_000_000_000)
.plonk()
.timeout(Duration::from_secs(1800))
.run_async()
.await
Additionally, you will want to double-check that you're not overriding the RPC URL for the network,
which may be set during the ProverClient
setup:
let client = ProverClient::builder()
.network()
.private_key("<PRIVATE_KEY>")
.rpc_url("<RPC_URL>")
.build();
If you setup your network client using .rpc_url()
, you'll need to update this to use the new
RPC URL https://rpc.mainnet.succinct.xyz
. Often times if this is manually set, it's defined as an
environment variable such as NETWORK_RPC_URL
.
If you didn't have .rpc_url()
set, then no changes are needed for the ProverClient
setup, it
will automatically use the correct mainnet RPC URL.
Step 4: Run your code
Once you've made all the code changes, you can now run and deploy your code, replacing the previously deployed code.
Once this is complete, you will have successfully migrated to the Succinct Prover Network mainnet.