Skip to main content

Migrate to Mainnet

Migrate to using the Succinct Prover Network mainnet.

If you're currently using reserved capacity or an old version of the network with FulfillmentStrategy::Hosted, you can migrate to using the Succinct Prover Network mainnet by following this guide.

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 Code Dependencies

You need to update to sp1-sdk >= v5.2.1, disable default features, and turn on the network feature.

[dependencies]
sp1-sdk = { version = "5.2.1", default-features = false, features = ["network"] }
warning

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 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.

Update Fulfillment Strategy

Specifically, since the mainnet prover 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().

warning

If you have skip_simulation(true), it's important to set gas_limit() to reasonable upper bound value for your proof request. The actual prover gas used will always be less than or equal to the limit. You can look at previous proof requests on the explorer to determine a reasonable value. Please see the Advanced Usage section for more details.

This is an example of previous reserved capacity code:

self.prover
.prove(&self.pk, &stdin)
.strategy(FulfillmentStrategy::Reserved)
.gas_limit(50_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 FulfillmentStrategy::Auction with gas_limit() defined:

self.prover
.prove(&self.pk, &stdin)
.strategy(FulfillmentStrategy::Auction)
.skip_simulation(true)
.gas_limit(50_000_000_000)
.plonk()
.timeout(Duration::from_secs(1800))
.run_async()
.await

Update RPC URL

Additionally, you will want to double-check that you're using the correct RPC URL for the mainnet prover network.

If you were not specifying an RPC URL before migrating, simply updating to sp1-sdk >= v5.2.1 and configuring features (Step 2) will automatically use the correct mainnet RPC URL.

If you were explicitly setting the RPC URL via the NETWORK_RPC_URL environment variable or through the ProverClient setup, you will need to update it to https://rpc.mainnet.succinct.xyz.

let client = ProverClient::builder()
.network()
.private_key("<PRIVATE_KEY>")
.rpc_url("<RPC_URL>")
.build();

Step 4: Request Proofs

You have now successfully migrated to the mainnet Succinct Prover Network and are ready to request proofs.