Proposer

The op-succinct service consists of two containers:

  • op-succinct-server: Receives proof requests from the op-succinct-proposer, generates the witness for the proof, and submits the proof to the Succinct Prover Network. Handles the communication with the Succinct's Prover Network to fetch the proof status and completed proof data.
  • op-succinct-proposer: Monitors L1 state to determine when to request a proof. Sends proof requests to the op-succinct-server. Once proofs have been generated for a sufficiently large range, aggregates range proofs into an aggregation proof. Submits the aggregation proof to the OPSuccinctL2OutputOracle contract which includes the L2 state outputs.

We've packaged the op-succinct service in a docker compose file to make it easier to run.

Prerequisites

RPC Requirements

Confirm that your RPC's have all of the required endpoints. More details can be found in the prerequisites section.

Hardware Requirements

We recommend the following hardware configuration for the op-succinct service containers:

Using the docker compose file:

  • Full op-succinct service: 16 vCPUs, 64GB RAM.
  • Mock op-succinct service: 32 vCPUs, 128GB RAM. Increased memory because the machine is executing the proofs locally.

Running as separate containers:

  • op-succinct-server
    • Full op-succinct service: 16 vCPUs, 64GB RAM.
    • Mock op-succinct service: 32 vCPUs, 128GB RAM. Increased memory because the machine is executing the proofs locally.
  • op-succinct-proposer: 1 vCPU, 4GB RAM

For advanced configurations, depending on the number of concurrent requests you expect, you may need to increase the number of vCPUs and memory allocated to the op-succinct-server container.

Environment Setup

Required Environment Variables

Before starting the proposer, the following environment variables should be in your .env file. You should have already set up your environment when you deployed the L2 Output Oracle. If you have not done so, follow the steps in the Contract Configuration section.

ParameterDescription
L1_RPCL1 Archive Node.
L1_BEACON_RPCL1 Consensus (Beacon) Node.
L2_RPCL2 Execution Node (op-geth).
L2_NODE_RPCL2 Rollup Node (op-node).
PROVER_NETWORK_RPCDefault: rpc.succinct.xyz.
SP1_PRIVATE_KEYKey for the Succinct Prover Network. Get access here.
SP1_PROVERDefault: network. Set to network to use the Succinct Prover Network.
PRIVATE_KEYPrivate key for the account that will be deploying the contract and posting output roots to L1.
L2OO_ADDRESSAddress of the OPSuccinctL2OutputOracle contract.

Advanced Environment Variables

The following environment variables are optional.

ParameterDescription
MAX_CONCURRENT_PROOF_REQUESTSDefault: 10. The maximum number of concurrent proof requests to send to the op-succinct-server.
MAX_BLOCK_RANGE_PER_SPAN_PROOFDefault: 300. The maximum number of blocks to include in each span proof. For chains with high throughput, you need to decrease this value.
OP_SUCCINCT_MOCKDefault: false. Set to true to run in mock proof mode. The OPSuccinctL2OutputOracle contract must be configured to use an SP1MockVerifier.
OP_SUCCINCT_SERVER_URLDefault: http://op-succinct-server:3000. The URL of the op-succinct-server service which the op-succinct-proposer will send proof requests to.
METRICS_ENABLEDDefault: true. Set to false to disable metrics collection.
METRICS_PORTDefault: 7300. The port to run the metrics server on.
DB_PATHDefault: /usr/local/bin/dbdata. The path to the database directory within the container.
POLL_INTERVALDefault: 20s. The interval at which the op-succinct-proposer service runs.
USE_CACHED_DBDefault: false. Set to true to use cached proofs from previous runs when restarting the service, avoiding regeneration of unused proofs.

Build the Proposer Service

Build the docker images for the op-succinct-proposer service.

docker compose build

Run the Proposer

This command launches the op-succinct-proposer service in the background. It launches two containers: one container that manages proof generation and another container that is a small fork of the original op-proposer service.

After a few minutes, you should see the op-succinct-proposer service start to generate range proofs. Once enough range proofs have been generated, they will be verified in an aggregate proof and submitted to the L1.

docker compose up

To see the logs of the op-succinct-proposer service, run:

docker compose logs -f

and to stop the op-succinct-proposer service, run:

docker compose stop