Skip to content

Deploy a ProverSet

The recent protocol upgrade now requires that the address of the prover and proposer are the same. This can be achieved by simply using the same private keys to run the proposer and prover software, but this is not recommended as it can cause nonce issues.

This guide outlines how to achieve this with separate EOAs running prover and proposer through the ProverSet smart contract.

Prerequisites

  • You have TAIKO or TTKOh depending on which network you are proving on
  • You have enough ETH or holesky ETH for gas fees

Deploying a ProverSet

  1. Clone the Taiko monorepo

    The Taiko monorepo contains the scripts for deploying your ProverSet.

    Terminal window
    git clone https://github.com/taikoxyz/taiko-mono.git
    cd taiko-mono/packages/protocol
  2. Deploy the ProverSet

    Set ROLLUP_ADDRESS_MANAGER to the address of the RollupAddressManager contract on the network you are deploying to. You can find these values in our network reference docs.

    Set PROVER_SET_ADMIN to the address of your prover EOA. You will be able to withdraw TAIKO/TTKOh from the contract to this address.

    Run the DeployProverSet.s.sol script with your proposer’s private key. You can find the script here.

    Terminal window
    ROLLUP_ADDRESS_MANAGER={ADDRESS} PROVER_SET_ADMIN={ADDRESS} forge script --chain-id {CHAIN_ID} --rpc-url {YOUR_RPC_URL} --private-key {PRIVATE_KEY} --broadcast script/DeployProverSet.s.sol:DeployProverSet

    The script should print your implementation and proxy address with the log:

    Deployed ProverSet impl at address: 0x....
    Deployed ProverSet proxy at address: 0x....

    Use proxy address for the following steps.

  3. Verify the contract as a proxy on Etherscan

    Navigate to the proxyAddress logged as output of the script above in Etherscan.

    In the Contract tab, you can find the More options section as follows:

    Verify as Proxy

    Select the Is this a proxy? option and follow the instructions. This should verify the contract as a proxy to your ProverSet implementation.

  4. Write to the Proxy to enableProver()

    If the above step was completed correctly, you should be able to see the Write as Proxy option in the Contract tab.

    Connect to Etherscan with the EOA you used to deploy the ProverSet and send two enableProver() transactions, enabling both your proposer and prover EOAs as provers. Set isProver as true for both transactions. You can set these as false if you want to disable these provers in the future.

    This will allow both EOAs to send transactions to your ProverSet implementation which will act as a proxy to TaikoL1.

  5. Configure the contract as necessary

    Manage the contract’s allowance with approveAllowance(). TaikoL1’s contract allowance is by default set to UINT256.MAX in the init function.

  6. Deposit your tokens and run your proposer + prover as usual!

    If you’ve followed the instructions, send your TAIKO/TTKOh to the ProverSet proxy and begin running your prover and proposer as usual. Do not send it to the contract directly! Use the depositBond function.

    Ensure that you have set up the EOAs correctly to avoid problems.

Upgrading a ProverSet

If you’ve already deployed a ProverSet but would like to upgrade it through the Proxy, this guide is for you!

  1. Find your existing Proxy’s address

    This will be necessary for the following step.

  2. Navigate to the taiko monorepo

    Terminal window
    cd taiko-mono/packages/protocol
  3. Run the UpgradeProverSet.s.sol script

    Execute the following command, filling in the values in the curly braces appropriately.

    Terminal window
    PROXY_ADDRESS={YOUR_PROXY_ADDRESS} PRIVATE_KEY={YOUR_PRIVATE_KEY} forge script --chain-id 17000 --rpc-url {YOUR_RPC_URL} --broadcast script/upgrade/UpgradeProverSet.s.sol:UpgradeProverSet

FAQ

Where is my TTKOh/TAIKO?

If you’ve managed to propose and prove some blocks, it’s likely you’re wondering where your tokens went after.

It’s not missing, it’s just been deposited as bond in the TaikoL1 contract; you can withdraw it from the ProverSet contract with withdrawBond() manually.

Troubleshooting

If you run into any problems, please visit the node troubleshooting page for help. If you run into an error that isn’t yet listed, please reach out in our Discord!