diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..656e08b0 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[net] +git-fetch-with-cli = true \ No newline at end of file diff --git a/.dockerignore b/.dockerignore index 2aca05db..6bb5824c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,2 @@ -/target /data /execution-reports \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4797fa3b..9c9d5942 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ artifact_* *.egg-info/ +# SP1 Testing Suite Artifacts sp1-testing-suite-artifacts/ # Contracts diff --git a/Cargo.lock b/Cargo.lock index a4966d11..d57c6101 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5326,15 +5326,22 @@ dependencies = [ "axum", "base64 0.22.1", "bincode", + "csv", "dotenv", + "hashbrown 0.14.5", "log", "op-succinct-build-utils", "op-succinct-client-utils", "op-succinct-host-utils", + "p3-baby-bear", + "p3-field", + "p3-fri", "serde", "serde_json", "serde_repr", + "sp1-core-executor", "sp1-sdk", + "sp1-stark", "tokio", "tower-http", ] @@ -7568,7 +7575,7 @@ dependencies = [ [[package]] name = "sp1-core-executor" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "bincode", "bytemuck", @@ -7601,7 +7608,7 @@ dependencies = [ [[package]] name = "sp1-core-machine" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "bincode", "cfg-if", @@ -7648,7 +7655,7 @@ dependencies = [ [[package]] name = "sp1-curves" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "cfg-if", "curve25519-dalek", @@ -7669,7 +7676,7 @@ dependencies = [ [[package]] name = "sp1-derive" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "quote", "syn 1.0.109", @@ -7687,7 +7694,7 @@ dependencies = [ [[package]] name = "sp1-primitives" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "bincode", "hex", @@ -7721,7 +7728,7 @@ dependencies = [ [[package]] name = "sp1-prover" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "anyhow", "bincode", @@ -7762,7 +7769,7 @@ dependencies = [ [[package]] name = "sp1-recursion-circuit" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "hashbrown 0.14.5", "itertools 0.13.0", @@ -7795,7 +7802,7 @@ dependencies = [ [[package]] name = "sp1-recursion-compiler" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "backtrace", "itertools 0.13.0", @@ -7816,7 +7823,7 @@ dependencies = [ [[package]] name = "sp1-recursion-core" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "backtrace", "ff 0.13.0", @@ -7851,7 +7858,7 @@ dependencies = [ [[package]] name = "sp1-recursion-derive" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "quote", "syn 1.0.109", @@ -7860,7 +7867,7 @@ dependencies = [ [[package]] name = "sp1-recursion-gnark-ffi" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "anyhow", "bincode", @@ -7885,7 +7892,7 @@ dependencies = [ [[package]] name = "sp1-sdk" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "alloy-primitives 0.8.14", "alloy-signer 0.3.6", @@ -7932,7 +7939,7 @@ dependencies = [ [[package]] name = "sp1-stark" version = "3.3.0" -source = "git+https://github.com/succinctlabs/sp1.git?rev=3ef33280f638d080a1ceda6de597867e720df660#3ef33280f638d080a1ceda6de597867e720df660" +source = "git+https://github.com/succinctlabs/sp1.git?rev=bb1fade9f0b3aa66637dd5af3657fd007d5f72d1#bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" dependencies = [ "arrayref", "getrandom", diff --git a/Cargo.toml b/Cargo.toml index 523681b3..9bb0a87b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,10 +92,15 @@ sp1-lib = { version = "3.3.0", features = ["verify"] } sp1-zkvm = { git = "https://github.com/succinctlabs/sp1-wip.git", branch = "ratan/allocators", features = ["verify", "embedded", "libm", "lib"], default-features = false } # Note: This rev includes the SP1 mock groth16 bytes fix, skipping deferred verification, executor opts and network-v2 changes. Also turn off debug assertions on the executor. # ratan/v3.3.0-network-v2-with-features branch includes the network-v2 changes from `19ae3e1`. -sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "3ef33280f638d080a1ceda6de597867e720df660", features = [ +sp1-sdk = { git = "https://github.com/succinctlabs/sp1.git", rev = "bb1fade9f0b3aa66637dd5af3657fd007d5f72d1", features = [ "network-v2", ] } sp1-build = { version = "3.3.0" } +sp1-core-executor = { git = "https://github.com/succinctlabs/sp1.git", rev = "bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" } +sp1-stark = { git = "https://github.com/succinctlabs/sp1.git", rev = "bb1fade9f0b3aa66637dd5af3657fd007d5f72d1" } +p3-baby-bear = "0.1.4-succinct" +p3-fri = "0.1.4-succinct" +p3-field = "0.1.4-succinct" [profile.release-client-lto] inherits = "release" diff --git a/contracts/opsuccinctl2ooconfig.json b/contracts/opsuccinctl2ooconfig.json index 723b8ec4..7413afb3 100644 --- a/contracts/opsuccinctl2ooconfig.json +++ b/contracts/opsuccinctl2ooconfig.json @@ -4,12 +4,12 @@ "l2BlockTime": 2, "owner": "0xDEd0000E32f8F40414d3ab3a830f735a3553E18e", "proposer": "0xDEd0000E32f8F40414d3ab3a830f735a3553E18e", - "rollupConfigHash": "0x0d7101e2acc7eae1fb42cfce5c604d14da561726e4e01b509315e5a9f97a9816", - "startingBlockNumber": 5726082, - "startingOutputRoot": "0x88cf50185686c85146bdfd3aa17c9624b13a7c3ec912f68026c54171735a0be3", - "startingTimestamp": 1733804652, - "submissionInterval": 1200, + "rollupConfigHash": "0x08b1efa3b7fffb2cd455c9da85e032866e03f281e8957dd651c41f7480af36b7", + "startingBlockNumber": 7329701, + "startingOutputRoot": "0xed41adc7ca1cdaaf5300743ebbc29dd2ec1ff338a2bfc2903bd50211682b4515", + "startingTimestamp": 1733995041, + "submissionInterval": 100000000, "verifier": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B", "aggregationVkey": "0x00ea4171dbd0027768055bee7f6d64e17e9cec99b29aad5d18e5d804b967775b", - "rangeVkeyCommitment": "0x51decb4a49105f2a1403423f560bc55d6d02e5eb57f21d0c5bd6a661555a8e53" + "rangeVkeyCommitment": "0x30551a8d53294391723baf2344d23d0d18cc0fc856fe43db303f9d94447127fa" } \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f7aaff21..a5c43447 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,27 +1,80 @@ services: # OP Succinct Server - op-succinct-server: + op-succinct-server-bob-testnet: build: context: . dockerfile: ./proposer/succinct/Dockerfile env_file: - - ${ENV_FILE:-.env} + - ${ENV_FILE:-.env.bobtestnet} restart: unless-stopped ports: - - "3000:3000" + - "3001:3001" # OP Succinct Proposer - op-succinct-proposer: + op-succinct-proposer-bob-testnet: build: context: . dockerfile: ./proposer/op/Dockerfile.op_proposer env_file: - - ${ENV_FILE:-.env} + - ${ENV_FILE:-.env.bobtestnet} restart: unless-stopped depends_on: - - op-succinct-server + - op-succinct-server-bob-testnet volumes: - ./db:/usr/local/bin/dbdata # The metrics port is the default port for the OP Proposer. ports: - - "7300:7300" + - "7301:7301" + # OP Succinct Server + op-succinct-server-conduit-10s: + build: + context: . + dockerfile: ./proposer/succinct/Dockerfile + env_file: + - ${ENV_FILE:-.env.conduit10s} + restart: unless-stopped + ports: + - "3005:3005" + + # OP Succinct Proposer + op-succinct-proposer-conduit-10s: + build: + context: . + dockerfile: ./proposer/op/Dockerfile.op_proposer + env_file: + - ${ENV_FILE:-.env.conduit10s} + restart: unless-stopped + depends_on: + - op-succinct-server-conduit-10s + volumes: + - ./db:/usr/local/bin/dbdata + # The metrics port is the default port for the OP Proposer. + ports: + - "7305:7305" + + # Worldchain Mainnet + op-succinct-server-worldchain-mainnet: + build: + context: . + dockerfile: ./proposer/succinct/Dockerfile + env_file: + - .env.worldchainmainnet + restart: unless-stopped + volumes: + - ./execution-reports/docker:/usr/local/bin/execution-reports + ports: + - "3003:3003" + + op-succinct-proposer-worldchain-mainnet: + build: + context: . + dockerfile: ./proposer/op/Dockerfile.op_proposer + env_file: + - .env.worldchainmainnet + restart: unless-stopped + depends_on: + - op-succinct-server-worldchain-mainnet + volumes: + - ./db:/usr/local/bin/dbdata + ports: + - "7302:7302" \ No newline at end of file diff --git a/elf/range-elf b/elf/range-elf new file mode 100755 index 00000000..1dfca51e Binary files /dev/null and b/elf/range-elf differ diff --git a/proposer/op/bindings/opsuccinctl2outputoracle.go b/proposer/op/bindings/opsuccinctl2outputoracle.go index d4b6709a..f892633b 100644 --- a/proposer/op/bindings/opsuccinctl2outputoracle.go +++ b/proposer/op/bindings/opsuccinctl2outputoracle.go @@ -55,8 +55,8 @@ type TypesOutputProposal struct { // OPSuccinctL2OutputOracleMetaData contains all meta data concerning the OPSuccinctL2OutputOracle contract. var OPSuccinctL2OutputOracleMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CHALLENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L2_BLOCK_TIME\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROPOSER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SUBMISSION_INTERVAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"aggregationVkey\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approvedProposers\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"challenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpointBlockHash\",\"inputs\":[{\"name\":\"_blockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"computeL2Timestamp\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteL2Outputs\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizationPeriodSeconds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2Output\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputIndexAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"historicBlockHashes\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initParams\",\"type\":\"tuple\",\"internalType\":\"structOPSuccinctL2OutputOracle.InitParams\",\"components\":[{\"name\":\"challenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"proposer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"finalizationPeriodSeconds\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"l2BlockTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingOutputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startingTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifier\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"l2BlockTime\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeL2Output\",\"inputs\":[{\"name\":\"_outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l1BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"proposer\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"rangeVkeyCommitment\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rollupConfigHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAggregationVkey\",\"inputs\":[{\"name\":\"_aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRangeVkeyCommitment\",\"inputs\":[{\"name\":\"_rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRollupConfigHash\",\"inputs\":[{\"name\":\"_rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateSubmissionInterval\",\"inputs\":[{\"name\":\"_submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateVerifier\",\"inputs\":[{\"name\":\"_verifier\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AggregationVkeyUpdated\",\"inputs\":[{\"name\":\"oldAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputProposed\",\"inputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l1Timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputsDeleted\",\"inputs\":[{\"name\":\"prevNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"newNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposerUpdated\",\"inputs\":[{\"name\":\"proposer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"added\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RangeVkeyCommitmentUpdated\",\"inputs\":[{\"name\":\"oldRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RollupConfigHashUpdated\",\"inputs\":[{\"name\":\"oldRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SubmissionIntervalUpdated\",\"inputs\":[{\"name\":\"oldSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"VerifierUpdated\",\"inputs\":[{\"name\":\"oldVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"L1BlockHashNotAvailable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1BlockHashNotCheckpointed\",\"inputs\":[]}]", - Bin: "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611c57806100ed6000396000f3fe60806040526004361061023a5760003560e01c806393991af31161012e578063c4cb03ec116100ab578063db1470f51161006f578063db1470f5146106be578063dcec3348146106de578063e1a41bcf146106f3578063f2fde38b14610709578063f4daa2911461072957600080fd5b8063c4cb03ec14610608578063ce5db8d614610628578063cf8e5cf01461063e578063d1de856c1461065e578063d46512761461067e57600080fd5b8063a8e4fb90116100f2578063a8e4fb9014610574578063b03cd41814610594578063bc91ce33146105b4578063bffa7f0f146105d4578063c32e4e3e146105f257600080fd5b806393991af3146104ab57806397fc007c146104c15780639ad84880146104e1578063a196b525146104f4578063a25ae5571461052157600080fd5b806354fd4d50116101bc57806370872aa51161018057806370872aa51461041f5780637f00642014610435578063887862721461045557806389c44cbb1461046b5780638da5cb5b1461048b57600080fd5b806354fd4d501461037d57806369f16eec146103c15780636abcf563146103d65780636b4d98dd146103eb5780636d9a1c8b1461040957600080fd5b80632b7ac3f3116102035780632b7ac3f3146102db578063336c9e81146103135780634599c78814610333578063529933df14610348578063534db0e21461035d57600080fd5b80622134cc1461023f57806309d632d3146102635780631bdd450c146102855780631e856800146102a55780632b31841e146102c5575b600080fd5b34801561024b57600080fd5b506005545b6040519081526020015b60405180910390f35b34801561026f57600080fd5b5061028361027e366004611888565b61073e565b005b34801561029157600080fd5b506102836102a03660046118aa565b6107c7565b3480156102b157600080fd5b506102836102c03660046118aa565b610825565b3480156102d157600080fd5b50610250600a5481565b3480156102e757600080fd5b50600b546102fb906001600160a01b031681565b6040516001600160a01b03909116815260200161025a565b34801561031f57600080fd5b5061028361032e3660046118aa565b610857565b34801561033f57600080fd5b506102506108c2565b34801561035457600080fd5b50600454610250565b34801561036957600080fd5b506006546102fb906001600160a01b031681565b34801561038957600080fd5b506103b46040518060400160405280600b81526020016a0626574612d76302e342e360ac1b81525081565b60405161025a9190611910565b3480156103cd57600080fd5b5061025061091f565b3480156103e257600080fd5b50600354610250565b3480156103f757600080fd5b506006546001600160a01b03166102fb565b34801561041557600080fd5b50610250600c5481565b34801561042b57600080fd5b5061025060015481565b34801561044157600080fd5b506102506104503660046118aa565b610931565b34801561046157600080fd5b5061025060025481565b34801561047757600080fd5b506102836104863660046118aa565b610acf565b34801561049757600080fd5b50600d546102fb906001600160a01b031681565b3480156104b757600080fd5b5061025060055481565b3480156104cd57600080fd5b506102836104dc366004611888565b610cd4565b6102836104ef366004611994565b610d5a565b34801561050057600080fd5b5061025061050f3660046118aa565b600f6020526000908152604090205481565b34801561052d57600080fd5b5061054161053c3660046118aa565b6111cc565b60408051825181526020808401516001600160801b0390811691830191909152928201519092169082015260600161025a565b34801561058057600080fd5b506007546102fb906001600160a01b031681565b3480156105a057600080fd5b506102836105af366004611888565b61124a565b3480156105c057600080fd5b506102836105cf3660046118aa565b6112cb565b3480156105e057600080fd5b506007546001600160a01b03166102fb565b3480156105fe57600080fd5b5061025060095481565b34801561061457600080fd5b506102836106233660046118aa565b611329565b34801561063457600080fd5b5061025060085481565b34801561064a57600080fd5b506105416106593660046118aa565b611387565b34801561066a57600080fd5b506102506106793660046118aa565b6113bf565b34801561068a57600080fd5b506106ae610699366004611888565b600e6020526000908152604090205460ff1681565b604051901515815260200161025a565b3480156106ca57600080fd5b506102836106d9366004611a46565b6113ef565b3480156106ea57600080fd5b506102506117cf565b3480156106ff57600080fd5b5061025060045481565b34801561071557600080fd5b50610283610724366004611888565b6117e6565b34801561073557600080fd5b50600854610250565b600d546001600160a01b031633146107715760405162461bcd60e51b815260040161076890611b09565b60405180910390fd5b6001600160a01b0381166000818152600e60209081526040808320805460ff19169055519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91015b60405180910390a250565b600d546001600160a01b031633146107f15760405162461bcd60e51b815260040161076890611b09565b600c546040518291907f5d9ebe9f09b0810b3546b30781ba9a51092b37dd6abada4b830ce54a41ac6a4b90600090a3600c55565b804080610845576040516321301a1960e21b815260040160405180910390fd5b6000918252600f602052604090912055565b600d546001600160a01b031633146108815760405162461bcd60e51b815260040161076890611b09565b60045460408051918252602082018390527fc1bf9abfb57ea01ed9ecb4f45e9cefa7ba44b2e6778c3ce7281409999f1af1b2910160405180910390a1600455565b6003546000901561091657600380546108dd90600190611b66565b815481106108ed576108ed611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b0316919050565b6001545b905090565b60035460009061091a90600190611b66565b600061093b6108c2565b8211156109c15760405162461bcd60e51b815260206004820152604860248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f7420666f72206120626c6f636b207468617420686173206e6f74206265656e206064820152671c1c9bdc1bdcd95960c21b608482015260a401610768565b600354610a455760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f74206173206e6f206f7574707574732068617665206265656e2070726f706f736064820152651959081e595d60d21b608482015260a401610768565b6003546000905b80821015610ac85760006002610a628385611b93565b610a6c9190611bab565b90508460038281548110610a8257610a82611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b03161015610abe57610ab7816001611b93565b9250610ac2565b8091505b50610a4c565b5092915050565b6006546001600160a01b03163314610b4f5760405162461bcd60e51b815260206004820152603e60248201527f4c324f75747075744f7261636c653a206f6e6c7920746865206368616c6c656e60448201527f67657220616464726573732063616e2064656c657465206f75747075747300006064820152608401610768565b6003548110610bd25760405162461bcd60e51b815260206004820152604360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f747075747320616674657220746865206c6174657374206f757470757420696e6064820152620c8caf60eb1b608482015260a401610768565b60085460038281548110610be857610be8611b7d565b6000918252602090912060016002909202010154610c0f906001600160801b031642611b66565b10610c915760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f74707574732074686174206861766520616c7265616479206265656e2066696e606482015265185b1a5e995960d21b608482015260a401610768565b6000610c9c60035490565b90508160035581817f4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b660405160405180910390a35050565b600d546001600160a01b03163314610cfe5760405162461bcd60e51b815260040161076890611b09565b600b546040516001600160a01b038084169216907f0243549a92b2412f7a3caf7a2e56d65b8821b91345363faa5f57195384065fcc90600090a3600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205460ff1680610da2575060008052600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c5460ff165b610e145760405162461bcd60e51b815260206004820152603f60248201527f4c324f75747075744f7261636c653a206f6e6c7920617070726f76656420707260448201527f6f706f736572732063616e2070726f706f7365206e6577206f757470757473006064820152608401610768565b610e1c6117cf565b831015610eb75760405162461bcd60e51b815260206004820152605860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f742062652067726561746572207468616e206f7220657175616c20746f206e6560648201527f787420657870656374656420626c6f636b206e756d6265720000000000000000608482015260a401610768565b42610ec1846113bf565b10610f2d5760405162461bcd60e51b815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527532206f757470757420696e207468652066757475726560501b6064820152608401610768565b83610fa05760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f20686173680000000000006064820152608401610768565b6000828152600f602052604090205480610fcd57604051630455475360e31b815260040160405180910390fd5b60006040518060c001604052808381526020016003610fea61091f565b81548110610ffa57610ffa611b7d565b60009182526020918290206002909102015482528181018990526040808301899052600c54606080850191909152600a54608094850152600b5460095483518751818701529487015185850152928601518483015290850151838501529284015160a08084019190915284015160c08301529293506001600160a01b03909116916341493c609160e001604051602081830303815290604052866040518463ffffffff1660e01b81526004016110b293929190611bcd565b60006040518083038186803b1580156110ca57600080fd5b505afa1580156110de573d6000803e3d6000fd5b50505050846110ec60035490565b877fa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e24260405161111e91815260200190565b60405180910390a45050604080516060810182529485526001600160801b034281166020870190815294811691860191825260038054600181018255600091909152955160029096027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810196909655935190518416600160801b029316929092177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909301929092555050565b6040805160608101825260008082526020820181905291810191909152600382815481106111fc576111fc611b7d565b600091825260209182902060408051606081018252600290930290910180548352600101546001600160801b0380821694840194909452600160801b90049092169181019190915292915050565b600d546001600160a01b031633146112745760405162461bcd60e51b815260040161076890611b09565b6001600160a01b0381166000818152600e6020908152604091829020805460ff1916600190811790915591519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91016107bc565b600d546001600160a01b031633146112f55760405162461bcd60e51b815260040161076890611b09565b600a546040518291907fbf8cab6317796bfa97fea82b6d27c9542a08fa0821813cf2a57e7cff7fdc815690600090a3600a55565b600d546001600160a01b031633146113535760405162461bcd60e51b815260040161076890611b09565b6009546040518291907f390b73b2b067afcef04d30b573e4590c6e565519e370927dd777ca0ce8a55db090600090a3600955565b604080516060810182526000808252602082018190529181019190915260036113af83610931565b815481106111fc576111fc611b7d565b6000600554600154836113d29190611b66565b6113dc9190611c02565b6002546113e99190611b93565b92915050565b600054610100900460ff161580801561140f5750600054600160ff909116105b806114295750303b158015611429575060005460ff166001145b61148c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610768565b6000805460ff1916600117905580156114af576000805461ff0019166101001790555b60008261016001511161152a5760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a207375626d697373696f6e20696e74657260448201527f76616c206d7573742062652067726561746572207468616e20300000000000006064820152608401610768565b600082608001511161159b5760405162461bcd60e51b815260206004820152603460248201527f4c324f75747075744f7261636c653a204c3220626c6f636b2074696d65206d75604482015273073742062652067726561746572207468616e20360641b6064820152608401610768565b4282610140015111156116245760405162461bcd60e51b8152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201526374696d6560e01b608482015260a401610768565b61016082015160045560808201516005556003546000036116fb57604080516060810182526101008401518152610140840180516001600160801b03908116602084019081526101208701805183169585019586526003805460018181018355600092909252955160029687027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810191909155925196518416600160801b0296909316959095177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909101559251909255905190555b8151600680546001600160a01b039283166001600160a01b031991821617909155606084015160085560208085015183166000908152600e909152604090819020805460ff1916600117905560a085015160095560c0850151600a55610180850151600b805491851691841691909117905560e0850151600c55840151600d805491909316911617905580156117cb576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006004546117dc6108c2565b61091a9190611b93565b600d546001600160a01b031633146118105760405162461bcd60e51b815260040161076890611b09565b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461188357600080fd5b919050565b60006020828403121561189a57600080fd5b6118a38261186c565b9392505050565b6000602082840312156118bc57600080fd5b5035919050565b6000815180845260005b818110156118e9576020818501810151868301820152016118cd565b818111156118fb576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006118a360208301846118c3565b634e487b7160e01b600052604160045260246000fd5b6040516101a0810167ffffffffffffffff8111828210171561195d5761195d611923565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561198c5761198c611923565b604052919050565b600080600080608085870312156119aa57600080fd5b84359350602080860135935060408601359250606086013567ffffffffffffffff808211156119d857600080fd5b818801915088601f8301126119ec57600080fd5b8135818111156119fe576119fe611923565b611a10601f8201601f19168501611963565b91508082528984828501011115611a2657600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006101a08284031215611a5957600080fd5b611a61611939565b611a6a8361186c565b8152611a786020840161186c565b6020820152611a896040840161186c565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358183015250610160808401358183015250610180611afe81850161186c565b908201529392505050565b60208082526027908201527f4c324f75747075744f7261636c653a2063616c6c6572206973206e6f74207468604082015266329037bbb732b960c91b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611b7857611b78611b50565b500390565b634e487b7160e01b600052603260045260246000fd5b60008219821115611ba657611ba6611b50565b500190565b600082611bc857634e487b7160e01b600052601260045260246000fd5b500490565b838152606060208201526000611be660608301856118c3565b8281036040840152611bf881856118c3565b9695505050505050565b6000816000190483118215151615611c1c57611c1c611b50565b50029056fea264697066735822122017b7a0f745d54c124937ede48b12c01b01c1385bea76e9816bd47dbb830539d464736f6c634300080f0033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"CHALLENGER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"FINALIZATION_PERIOD_SECONDS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"L2_BLOCK_TIME\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PROPOSER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"SUBMISSION_INTERVAL\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"aggregationVkey\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approvedProposers\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"challenger\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"checkpointBlockHash\",\"inputs\":[{\"name\":\"_blockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"computeL2Timestamp\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"deleteL2Outputs\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"finalizationPeriodSeconds\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2Output\",\"inputs\":[{\"name\":\"_l2OutputIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputProposal\",\"components\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint128\",\"internalType\":\"uint128\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint128\",\"internalType\":\"uint128\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getL2OutputIndexAfter\",\"inputs\":[{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"historicBlockHashes\",\"inputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_initParams\",\"type\":\"tuple\",\"internalType\":\"structOPSuccinctL2OutputOracle.InitParams\",\"components\":[{\"name\":\"challenger\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"proposer\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"finalizationPeriodSeconds\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"l2BlockTime\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingOutputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"startingBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"startingTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"verifier\",\"type\":\"address\",\"internalType\":\"address\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"initializerVersion\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"l2BlockTime\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"latestOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"nextOutputIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proposeL2Output\",\"inputs\":[{\"name\":\"_outputRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_l2BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_l1BlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"proposer\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"rangeVkeyCommitment\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"removeProposer\",\"inputs\":[{\"name\":\"_proposer\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"rollupConfigHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingBlockNumber\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"startingTimestamp\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"submissionInterval\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateAggregationVkey\",\"inputs\":[{\"name\":\"_aggregationVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRangeVkeyCommitment\",\"inputs\":[{\"name\":\"_rangeVkeyCommitment\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateRollupConfigHash\",\"inputs\":[{\"name\":\"_rollupConfigHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateSubmissionInterval\",\"inputs\":[{\"name\":\"_submissionInterval\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateVerifier\",\"inputs\":[{\"name\":\"_verifier\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"verifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"AggregationVkeyUpdated\",\"inputs\":[{\"name\":\"oldAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAggregationVkey\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint8\",\"indexed\":false,\"internalType\":\"uint8\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputProposed\",\"inputs\":[{\"name\":\"outputRoot\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"l2OutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l2BlockNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"l1Timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OutputsDeleted\",\"inputs\":[{\"name\":\"prevNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"newNextOutputIndex\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProposerUpdated\",\"inputs\":[{\"name\":\"proposer\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"added\",\"type\":\"bool\",\"indexed\":false,\"internalType\":\"bool\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RangeVkeyCommitmentUpdated\",\"inputs\":[{\"name\":\"oldRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRangeVkeyCommitment\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RollupConfigHashUpdated\",\"inputs\":[{\"name\":\"oldRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newRollupConfigHash\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"SubmissionIntervalUpdated\",\"inputs\":[{\"name\":\"oldSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"newSubmissionInterval\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"VerifierUpdated\",\"inputs\":[{\"name\":\"oldVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newVerifier\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"L1BlockHashNotAvailable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"L1BlockHashNotCheckpointed\",\"inputs\":[]}]", + Bin: "0x608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611c57806100ed6000396000f3fe6080604052600436106102455760003560e01c80638da5cb5b11610139578063c32e4e3e116100b6578063d46512761161007a578063d4651276146106b0578063db1470f5146106f0578063dcec334814610710578063e1a41bcf14610725578063f2fde38b1461073b578063f4daa2911461075b57600080fd5b8063c32e4e3e14610624578063c4cb03ec1461063a578063ce5db8d61461065a578063cf8e5cf014610670578063d1de856c1461069057600080fd5b8063a25ae557116100fd578063a25ae55714610553578063a8e4fb90146105a6578063b03cd418146105c6578063bc91ce33146105e6578063bffa7f0f1461060657600080fd5b80638da5cb5b146104bd57806393991af3146104dd57806397fc007c146104f35780639ad8488014610513578063a196b5251461052657600080fd5b806354fd4d50116101c757806370872aa51161018b57806370872aa51461042a5780637f006420146104405780637f01ea6814610460578063887862721461048757806389c44cbb1461049d57600080fd5b806354fd4d501461038857806369f16eec146103cc5780636abcf563146103e15780636b4d98dd146103f65780636d9a1c8b1461041457600080fd5b80632b7ac3f31161020e5780632b7ac3f3146102e6578063336c9e811461031e5780634599c7881461033e578063529933df14610353578063534db0e21461036857600080fd5b80622134cc1461024a57806309d632d31461026e5780631bdd450c146102905780631e856800146102b05780632b31841e146102d0575b600080fd5b34801561025657600080fd5b506005545b6040519081526020015b60405180910390f35b34801561027a57600080fd5b5061028e610289366004611888565b610770565b005b34801561029c57600080fd5b5061028e6102ab3660046118aa565b6107f9565b3480156102bc57600080fd5b5061028e6102cb3660046118aa565b610857565b3480156102dc57600080fd5b5061025b600a5481565b3480156102f257600080fd5b50600b54610306906001600160a01b031681565b6040516001600160a01b039091168152602001610265565b34801561032a57600080fd5b5061028e6103393660046118aa565b610889565b34801561034a57600080fd5b5061025b6108f4565b34801561035f57600080fd5b5060045461025b565b34801561037457600080fd5b50600654610306906001600160a01b031681565b34801561039457600080fd5b506103bf6040518060400160405280600b81526020016a0626574612d76302e342e360ac1b81525081565b6040516102659190611910565b3480156103d857600080fd5b5061025b610951565b3480156103ed57600080fd5b5060035461025b565b34801561040257600080fd5b506006546001600160a01b0316610306565b34801561042057600080fd5b5061025b600c5481565b34801561043657600080fd5b5061025b60015481565b34801561044c57600080fd5b5061025b61045b3660046118aa565b610963565b34801561046c57600080fd5b50610475600181565b60405160ff9091168152602001610265565b34801561049357600080fd5b5061025b60025481565b3480156104a957600080fd5b5061028e6104b83660046118aa565b610b01565b3480156104c957600080fd5b50600d54610306906001600160a01b031681565b3480156104e957600080fd5b5061025b60055481565b3480156104ff57600080fd5b5061028e61050e366004611888565b610d06565b61028e610521366004611994565b610d8c565b34801561053257600080fd5b5061025b6105413660046118aa565b600f6020526000908152604090205481565b34801561055f57600080fd5b5061057361056e3660046118aa565b6111fe565b60408051825181526020808401516001600160801b03908116918301919091529282015190921690820152606001610265565b3480156105b257600080fd5b50600754610306906001600160a01b031681565b3480156105d257600080fd5b5061028e6105e1366004611888565b61127c565b3480156105f257600080fd5b5061028e6106013660046118aa565b6112fd565b34801561061257600080fd5b506007546001600160a01b0316610306565b34801561063057600080fd5b5061025b60095481565b34801561064657600080fd5b5061028e6106553660046118aa565b61135b565b34801561066657600080fd5b5061025b60085481565b34801561067c57600080fd5b5061057361068b3660046118aa565b6113b9565b34801561069c57600080fd5b5061025b6106ab3660046118aa565b6113f1565b3480156106bc57600080fd5b506106e06106cb366004611888565b600e6020526000908152604090205460ff1681565b6040519015158152602001610265565b3480156106fc57600080fd5b5061028e61070b366004611a46565b611421565b34801561071c57600080fd5b5061025b6117cf565b34801561073157600080fd5b5061025b60045481565b34801561074757600080fd5b5061028e610756366004611888565b6117e6565b34801561076757600080fd5b5060085461025b565b600d546001600160a01b031633146107a35760405162461bcd60e51b815260040161079a90611b09565b60405180910390fd5b6001600160a01b0381166000818152600e60209081526040808320805460ff19169055519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91015b60405180910390a250565b600d546001600160a01b031633146108235760405162461bcd60e51b815260040161079a90611b09565b600c546040518291907f5d9ebe9f09b0810b3546b30781ba9a51092b37dd6abada4b830ce54a41ac6a4b90600090a3600c55565b804080610877576040516321301a1960e21b815260040160405180910390fd5b6000918252600f602052604090912055565b600d546001600160a01b031633146108b35760405162461bcd60e51b815260040161079a90611b09565b60045460408051918252602082018390527fc1bf9abfb57ea01ed9ecb4f45e9cefa7ba44b2e6778c3ce7281409999f1af1b2910160405180910390a1600455565b60035460009015610948576003805461090f90600190611b66565b8154811061091f5761091f611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b0316919050565b6001545b905090565b60035460009061094c90600190611b66565b600061096d6108f4565b8211156109f35760405162461bcd60e51b815260206004820152604860248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f7420666f72206120626c6f636b207468617420686173206e6f74206265656e206064820152671c1c9bdc1bdcd95960c21b608482015260a40161079a565b600354610a775760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f7420676574206f7574707560448201527f74206173206e6f206f7574707574732068617665206265656e2070726f706f736064820152651959081e595d60d21b608482015260a40161079a565b6003546000905b80821015610afa5760006002610a948385611b93565b610a9e9190611bab565b90508460038281548110610ab457610ab4611b7d565b6000918252602090912060029091020160010154600160801b90046001600160801b03161015610af057610ae9816001611b93565b9250610af4565b8091505b50610a7e565b5092915050565b6006546001600160a01b03163314610b815760405162461bcd60e51b815260206004820152603e60248201527f4c324f75747075744f7261636c653a206f6e6c7920746865206368616c6c656e60448201527f67657220616464726573732063616e2064656c657465206f7574707574730000606482015260840161079a565b6003548110610c045760405162461bcd60e51b815260206004820152604360248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f747075747320616674657220746865206c6174657374206f757470757420696e6064820152620c8caf60eb1b608482015260a40161079a565b60085460038281548110610c1a57610c1a611b7d565b6000918252602090912060016002909202010154610c41906001600160801b031642611b66565b10610cc35760405162461bcd60e51b815260206004820152604660248201527f4c324f75747075744f7261636c653a2063616e6e6f742064656c657465206f7560448201527f74707574732074686174206861766520616c7265616479206265656e2066696e606482015265185b1a5e995960d21b608482015260a40161079a565b6000610cce60035490565b90508160035581817f4ee37ac2c786ec85e87592d3c5c8a1dd66f8496dda3f125d9ea8ca5f657629b660405160405180910390a35050565b600d546001600160a01b03163314610d305760405162461bcd60e51b815260040161079a90611b09565b600b546040516001600160a01b038084169216907f0243549a92b2412f7a3caf7a2e56d65b8821b91345363faa5f57195384065fcc90600090a3600b80546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205460ff1680610dd4575060008052600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c5460ff165b610e465760405162461bcd60e51b815260206004820152603f60248201527f4c324f75747075744f7261636c653a206f6e6c7920617070726f76656420707260448201527f6f706f736572732063616e2070726f706f7365206e6577206f75747075747300606482015260840161079a565b610e4e6117cf565b831015610ee95760405162461bcd60e51b815260206004820152605860248201527f4c324f75747075744f7261636c653a20626c6f636b206e756d626572206d757360448201527f742062652067726561746572207468616e206f7220657175616c20746f206e6560648201527f787420657870656374656420626c6f636b206e756d6265720000000000000000608482015260a40161079a565b42610ef3846113f1565b10610f5f5760405162461bcd60e51b815260206004820152603660248201527f4c324f75747075744f7261636c653a2063616e6e6f742070726f706f7365204c60448201527532206f757470757420696e207468652066757475726560501b606482015260840161079a565b83610fd25760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a204c32206f75747075742070726f706f7360448201527f616c2063616e6e6f7420626520746865207a65726f2068617368000000000000606482015260840161079a565b6000828152600f602052604090205480610fff57604051630455475360e31b815260040160405180910390fd5b60006040518060c00160405280838152602001600361101c610951565b8154811061102c5761102c611b7d565b60009182526020918290206002909102015482528181018990526040808301899052600c54606080850191909152600a54608094850152600b5460095483518751818701529487015185850152928601518483015290850151838501529284015160a08084019190915284015160c08301529293506001600160a01b03909116916341493c609160e001604051602081830303815290604052866040518463ffffffff1660e01b81526004016110e493929190611bcd565b60006040518083038186803b1580156110fc57600080fd5b505afa158015611110573d6000803e3d6000fd5b505050508461111e60035490565b877fa7aaf2512769da4e444e3de247be2564225c2e7a8f74cfe528e46e17d24868e24260405161115091815260200190565b60405180910390a45050604080516060810182529485526001600160801b034281166020870190815294811691860191825260038054600181018255600091909152955160029096027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810196909655935190518416600160801b029316929092177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909301929092555050565b60408051606081018252600080825260208201819052918101919091526003828154811061122e5761122e611b7d565b600091825260209182902060408051606081018252600290930290910180548352600101546001600160801b0380821694840194909452600160801b90049092169181019190915292915050565b600d546001600160a01b031633146112a65760405162461bcd60e51b815260040161079a90611b09565b6001600160a01b0381166000818152600e6020908152604091829020805460ff1916600190811790915591519182527f5df38d395edc15b669d646569bd015513395070b5b4deb8a16300abb060d1b5a91016107ee565b600d546001600160a01b031633146113275760405162461bcd60e51b815260040161079a90611b09565b600a546040518291907fbf8cab6317796bfa97fea82b6d27c9542a08fa0821813cf2a57e7cff7fdc815690600090a3600a55565b600d546001600160a01b031633146113855760405162461bcd60e51b815260040161079a90611b09565b6009546040518291907f390b73b2b067afcef04d30b573e4590c6e565519e370927dd777ca0ce8a55db090600090a3600955565b604080516060810182526000808252602082018190529181019190915260036113e183610963565b8154811061122e5761122e611b7d565b6000600554600154836114049190611b66565b61140e9190611c02565b60025461141b9190611b93565b92915050565b600054600190610100900460ff16158015611443575060005460ff8083169116105b6114a65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161079a565b6000805461ffff191660ff8316176101001790556101608201516115325760405162461bcd60e51b815260206004820152603a60248201527f4c324f75747075744f7261636c653a207375626d697373696f6e20696e74657260448201527f76616c206d7573742062652067726561746572207468616e2030000000000000606482015260840161079a565b60008260800151116115a35760405162461bcd60e51b815260206004820152603460248201527f4c324f75747075744f7261636c653a204c3220626c6f636b2074696d65206d75604482015273073742062652067726561746572207468616e20360641b606482015260840161079a565b42826101400151111561162c5760405162461bcd60e51b8152602060048201526044602482018190527f4c324f75747075744f7261636c653a207374617274696e67204c322074696d65908201527f7374616d70206d757374206265206c657373207468616e2063757272656e742060648201526374696d6560e01b608482015260a40161079a565b610160820151600455608082015160055560035460000361170357604080516060810182526101008401518152610140840180516001600160801b03908116602084019081526101208701805183169585019586526003805460018181018355600092909252955160029687027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810191909155925196518416600160801b0296909316959095177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c909101559251909255905190555b8151600680546001600160a01b03199081166001600160a01b0393841617909155606084015160085560208085015183166000908152600e82526040808220805460ff1916600117905560a087015160095560c0870151600a55610180870151600b8054861691871691909117905560e0870151600c5580870151600d8054909516951694909417909255815461ff001916909155905160ff831681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498910160405180910390a15050565b60006004546117dc6108f4565b61094c9190611b93565b600d546001600160a01b031633146118105760405162461bcd60e51b815260040161079a90611b09565b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461188357600080fd5b919050565b60006020828403121561189a57600080fd5b6118a38261186c565b9392505050565b6000602082840312156118bc57600080fd5b5035919050565b6000815180845260005b818110156118e9576020818501810151868301820152016118cd565b818111156118fb576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006118a360208301846118c3565b634e487b7160e01b600052604160045260246000fd5b6040516101a0810167ffffffffffffffff8111828210171561195d5761195d611923565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561198c5761198c611923565b604052919050565b600080600080608085870312156119aa57600080fd5b84359350602080860135935060408601359250606086013567ffffffffffffffff808211156119d857600080fd5b818801915088601f8301126119ec57600080fd5b8135818111156119fe576119fe611923565b611a10601f8201601f19168501611963565b91508082528984828501011115611a2657600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006101a08284031215611a5957600080fd5b611a61611939565b611a6a8361186c565b8152611a786020840161186c565b6020820152611a896040840161186c565b6040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e083013560e0820152610100808401358183015250610120808401358183015250610140808401358183015250610160808401358183015250610180611afe81850161186c565b908201529392505050565b60208082526027908201527f4c324f75747075744f7261636c653a2063616c6c6572206973206e6f74207468604082015266329037bbb732b960c91b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015611b7857611b78611b50565b500390565b634e487b7160e01b600052603260045260246000fd5b60008219821115611ba657611ba6611b50565b500190565b600082611bc857634e487b7160e01b600052601260045260246000fd5b500490565b838152606060208201526000611be660608301856118c3565b8281036040840152611bf881856118c3565b9695505050505050565b6000816000190483118215151615611c1c57611c1c611b50565b50029056fea2646970667358221220bf8e637a202941c60be51bb7d778e740e0b3d5b9b982530a2527f2d45f00fd2864736f6c634300080f0033", } // OPSuccinctL2OutputOracleABI is the input ABI used to generate the binding from. @@ -660,6 +660,37 @@ func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleCallerSession) Historic return _OPSuccinctL2OutputOracle.Contract.HistoricBlockHashes(&_OPSuccinctL2OutputOracle.CallOpts, arg0) } +// InitializerVersion is a free data retrieval call binding the contract method 0x7f01ea68. +// +// Solidity: function initializerVersion() view returns(uint8) +func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleCaller) InitializerVersion(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _OPSuccinctL2OutputOracle.contract.Call(opts, &out, "initializerVersion") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// InitializerVersion is a free data retrieval call binding the contract method 0x7f01ea68. +// +// Solidity: function initializerVersion() view returns(uint8) +func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleSession) InitializerVersion() (uint8, error) { + return _OPSuccinctL2OutputOracle.Contract.InitializerVersion(&_OPSuccinctL2OutputOracle.CallOpts) +} + +// InitializerVersion is a free data retrieval call binding the contract method 0x7f01ea68. +// +// Solidity: function initializerVersion() view returns(uint8) +func (_OPSuccinctL2OutputOracle *OPSuccinctL2OutputOracleCallerSession) InitializerVersion() (uint8, error) { + return _OPSuccinctL2OutputOracle.Contract.InitializerVersion(&_OPSuccinctL2OutputOracle.CallOpts) +} + // L2BlockTime is a free data retrieval call binding the contract method 0x93991af3. // // Solidity: function l2BlockTime() view returns(uint256) diff --git a/proposer/op/op_proposer.sh b/proposer/op/op_proposer.sh index 1b15402a..59c6c84d 100644 --- a/proposer/op/op_proposer.sh +++ b/proposer/op/op_proposer.sh @@ -10,7 +10,7 @@ --rollup-rpc=${L2_NODE_RPC} \ --l2oo-address=${L2OO_ADDRESS} \ --private-key=${PRIVATE_KEY} \ - --l1-eth-rpc=${L1_RPC} \ + --l1-eth-rpc=${L1_RPC_PROPOSER} \ --beacon-rpc=${L1_BEACON_RPC} \ --max-concurrent-proof-requests=${MAX_CONCURRENT_PROOF_REQUESTS:-10} \ --db-path=${DB_PATH:-/usr/local/bin/dbdata} \ diff --git a/proposer/op/proposer/prove.go b/proposer/op/proposer/prove.go index 41cc2daf..ab309d9f 100644 --- a/proposer/op/proposer/prove.go +++ b/proposer/op/proposer/prove.go @@ -21,7 +21,7 @@ const WITNESS_GEN_TIMEOUT = 20 * time.Minute // This limit is set to prevent overloading the witness generation server. Until Kona improves their native I/O API (https://github.com/anton-rs/kona/issues/553) // the maximum number of concurrent witness generation requests is roughly num_cpu / 2. Set it to 5 for now to be safe. -const MAX_CONCURRENT_WITNESS_GEN = 5 +const MAX_CONCURRENT_WITNESS_GEN = 3 // Process all of the pending proofs. func (l *L2OutputSubmitter) ProcessPendingProofs() error { diff --git a/proposer/op/proposer/range.go b/proposer/op/proposer/range.go index 5b2e504f..b04c9547 100644 --- a/proposer/op/proposer/range.go +++ b/proposer/op/proposer/range.go @@ -205,7 +205,6 @@ func (l *L2OutputSubmitter) GetRangeProofBoundaries(ctx context.Context) error { } } - // Add each span to the DB. If there are no spans, we will not create any proofs. for _, span := range spans { err := l.db.NewEntry(proofrequest.TypeSPAN, span.Start, span.End) diff --git a/proposer/succinct/Cargo.toml b/proposer/succinct/Cargo.toml index b9421cd2..6143c4e6 100644 --- a/proposer/succinct/Cargo.toml +++ b/proposer/succinct/Cargo.toml @@ -17,12 +17,18 @@ path = "bin/server.rs" tokio = { workspace = true } alloy-primitives = { workspace = true } alloy = { workspace = true } +csv = { workspace = true } # local op-succinct-host-utils.workspace = true # sp1 sp1-sdk = { workspace = true } +sp1-stark = { workspace = true } +sp1-core-executor = { workspace = true } +p3-baby-bear = { workspace = true } +p3-fri = { workspace = true } +p3-field = { workspace = true } anyhow.workspace = true dotenv.workspace = true @@ -37,6 +43,7 @@ log.workspace = true base64.workspace = true tower-http.workspace = true serde_repr = "0.1.19" +hashbrown = "0.14.5" [build-dependencies] op-succinct-build-utils.workspace = true diff --git a/proposer/succinct/Dockerfile b/proposer/succinct/Dockerfile index e045e1de..d095ed44 100644 --- a/proposer/succinct/Dockerfile +++ b/proposer/succinct/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1.4 # Build stage -FROM ubuntu:22.04 AS builder +FROM ubuntu:24.04 AS builder WORKDIR /build @@ -26,27 +26,32 @@ RUN curl -L https://sp1.succinct.xyz | bash && \ ~/.sp1/bin/sp1up && \ ~/.sp1/bin/cargo-prove prove --version -# Copy only what's needed for the build -COPY Cargo.toml Cargo.lock ./ -COPY scripts/prove ./scripts/prove -COPY proposer/succinct ./proposer/succinct -COPY scripts/witnessgen ./scripts/witnessgen -COPY elf ./elf -COPY utils ./utils -COPY programs ./programs - -# Build the server -RUN --mount=type=ssh \ - --mount=type=cache,target=/root/.cargo/registry \ - --mount=type=cache,target=/build/target \ - cargo build --bin server --release && \ - cp target/release/server /build/server && \ - cp target/release-client-lto/fault-proof /build/fault_proof && \ - cp target/release-client-lto/range /build/range && \ - cp target/native_host_runner/release/native_host_runner /build/native_host_runner +# # Copy only what's needed for the build +# COPY Cargo.toml Cargo.lock ./ +# COPY scripts/prove ./scripts/prove +# COPY proposer/succinct ./proposer/succinct +# COPY scripts/witnessgen ./scripts/witnessgen +# COPY elf ./elf +# COPY utils ./utils +# COPY programs ./programs + +# # Build the server +# RUN --mount=type=ssh \ +# --mount=type=cache,target=/root/.cargo/registry \ +# --mount=type=cache,target=/build/target \ +# cargo build --bin server --release && \ +# cp target/release/server /build/server && \ +# cp target/release-client-lto/fault-proof /build/fault_proof && \ +# cp target/release-client-lto/range /build/range && \ +# cp target/native_host_runner/release/native_host_runner /build/native_host_runner + +COPY target/release/server /build/server +COPY target/release-client-lto/fault-proof /build/fault_proof +COPY target/release-client-lto/range /build/range +COPY target/native_host_runner/release/native_host_runner /build/native_host_runner # Final stage -FROM ubuntu:22.04 +FROM ubuntu:24.04 WORKDIR /app diff --git a/proposer/succinct/bin/server.rs b/proposer/succinct/bin/server.rs index c4d4d75f..64bfe52e 100644 --- a/proposer/succinct/bin/server.rs +++ b/proposer/succinct/bin/server.rs @@ -1,3 +1,4 @@ +use alloy::providers::ProviderBuilder; use alloy_primitives::{hex, Address, B256}; use anyhow::Result; use axum::{ @@ -7,6 +8,7 @@ use axum::{ routing::{get, post}, Json, Router, }; +use hashbrown::HashMap; use log::info; use op_succinct_client_utils::{ boot::{hash_rollup_config, BootInfoStruct}, @@ -15,6 +17,7 @@ use op_succinct_client_utils::{ use op_succinct_host_utils::{ fetcher::{CacheMode, OPSuccinctDataFetcher, RunContext}, get_agg_proof_stdin, get_proof_stdin, + stats::ExecutionStats, witnessgen::{WitnessGenExecutor, WITNESSGEN_TIMEOUT}, L2OutputOracle, ProgramType, }; @@ -22,14 +25,28 @@ use op_succinct_proposer::{ AggProofRequest, ContractConfig, ProofResponse, ProofStatus, SpanProofRequest, ValidateConfigRequest, ValidateConfigResponse, }; +use p3_baby_bear::BabyBear; +use p3_field::AbstractField; +use p3_fri::{FriProof, TwoAdicFriPcsProof}; +use sp1_core_executor::SP1ReduceProof; use sp1_sdk::{ network_v2::{ client::NetworkClient, proto::network::{FulfillmentStatus, FulfillmentStrategy, ProofMode}, }, - utils, HashableKey, NetworkProverV2, ProverClient, SP1Proof, SP1ProofWithPublicValues, + utils, ExecutionReport, HashableKey, MockProver, NetworkProverV2, Prover, ProverClient, + SP1Context, SP1Proof, SP1ProofWithPublicValues, SP1Stdin, +}; +use sp1_stark::StarkVerifyingKey; +use sp1_stark::{ShardCommitment, ShardOpenedValues, ShardProof}; +use std::{ + env, + fs::OpenOptions, + io::Seek, + path::PathBuf, + str::FromStr, + time::{Duration, Instant}, }; -use std::{env, str::FromStr, time::Duration}; use tower_http::limit::RequestBodyLimitLayer; pub const MULTI_BLOCK_ELF: &[u8] = include_bytes!("../../../elf/range-elf"); @@ -92,10 +109,10 @@ async fn validate_config( Json(payload): Json, ) -> Result<(StatusCode, Json), AppError> { info!("Received validate config request: {:?}", payload); - let fetcher = OPSuccinctDataFetcher::default(); - let address = Address::from_str(&payload.address).unwrap(); - let l2_output_oracle = L2OutputOracle::new(address, fetcher.l1_provider); + let l1_proposer_provider = + ProviderBuilder::new().on_http(env::var("L1_RPC_PROPOSER").unwrap().parse().unwrap()); + let l2_output_oracle = L2OutputOracle::new(address, l1_proposer_provider); let agg_vkey = l2_output_oracle.aggregationVkey().call().await?; let range_vkey = l2_output_oracle.rangeVkeyCommitment().call().await?; @@ -255,59 +272,60 @@ async fn request_agg_proof( .map(|proof| proof.proof.clone()) .collect(); - let l1_head_bytes = hex::decode( + let l1_head_bytes = match hex::decode( payload .head .strip_prefix("0x") .expect("Invalid L1 head, no 0x prefix."), - )?; + ) { + Ok(bytes) => bytes, + Err(e) => return Err(AppError(anyhow::anyhow!("Failed to decode L1 head: {}", e))), + }; let l1_head: [u8; 32] = l1_head_bytes.try_into().unwrap(); - let fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await?; - let res = fetcher - .get_header_preimages(&boot_infos, l1_head.into()) - .await; - let headers = match res { - Ok(headers) => headers, + let private_key = match env::var("SP1_PRIVATE_KEY") { + Ok(key) => key, + Err(e) => return Err(AppError(anyhow::anyhow!("Failed to get SP1_PRIVATE_KEY: {}", e))), + }; + let rpc_url = match env::var("PROVER_NETWORK_RPC") { + Ok(url) => url, + Err(e) => return Err(AppError(anyhow::anyhow!("Failed to get PROVER_NETWORK_RPC: {}", e))), + }; + + let fetcher = match OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await { + Ok(f) => f, + Err(e) => return Err(AppError(anyhow::anyhow!("Failed to create fetcher: {}", e))), + }; + + let headers = match fetcher.get_header_preimages(&boot_infos, l1_head.into()).await { + Ok(h) => h, Err(e) => { log::error!("Failed to get header preimages: {}", e); - return Err(AppError(anyhow::anyhow!( - "Failed to get header preimages: {}", - e - ))); + return Err(AppError(anyhow::anyhow!("Failed to get header preimages: {}", e))); } }; - let private_key = env::var("SP1_PRIVATE_KEY")?; - let rpc_url = env::var("PROVER_NETWORK_RPC")?; let mut prover = NetworkProverV2::new(&private_key, Some(rpc_url.to_string()), false); // Use the reserved strategy to route to a specific cluster. prover.with_strategy(FulfillmentStrategy::Reserved); - let stdin = - match get_agg_proof_stdin(proofs, boot_infos, headers, &state.range_vk, l1_head.into()) { - Ok(stdin) => stdin, - Err(e) => { - log::error!("Failed to get agg proof stdin: {}", e); - return Err(AppError(anyhow::anyhow!( - "Failed to get agg proof stdin: {}", - e - ))); - } - }; + let stdin = match get_agg_proof_stdin(proofs, boot_infos, headers, &state.range_vk, l1_head.into()) { + Ok(s) => s, + Err(e) => { + log::error!("Failed to get agg proof stdin: {}", e); + return Err(AppError(anyhow::anyhow!("Failed to get agg proof stdin: {}", e))); + } + }; - let res = prover.register_program(&state.agg_vk, AGG_ELF).await; - let vk_hash = match res { - Ok(vk_hash) => vk_hash, + let vk_hash = match prover.register_program(&state.agg_vk, AGG_ELF).await { + Ok(hash) => hash, Err(e) => { log::error!("Failed to register program: {}", e); - return Err(AppError(anyhow::anyhow!( - "Failed to register program: {}", - e - ))); + return Err(AppError(anyhow::anyhow!("Failed to register program: {}", e))); } }; - let res = prover + + let proof_id = match prover .request_proof( &vk_hash, &stdin, @@ -315,27 +333,81 @@ async fn request_agg_proof( 1_000_000_000_000, None, ) - .await; + .await { + Ok(id) => id, + Err(e) => { + log::error!("Failed to request proof: {}", e); + return Err(AppError(anyhow::anyhow!("Failed to request proof: {}", e))); + } + }; - // Check if error, otherwise get proof ID. - let proof_id = match res { - Ok(proof_id) => proof_id, - Err(e) => { - log::error!("Failed to request proof: {}", e); - return Err(AppError(anyhow::anyhow!("Failed to request proof: {}", e))); - } + Ok((StatusCode::OK, Json(ProofResponse { proof_id }))) +} + +// Sourced from /crates/sdk/src/provers/mock.rs, because the normal prove doesn't expose the ExecutionReport. +// TODO: If the original mock method exposed the execution report, or there was a default method, we wouldn't need these imports. +fn generate_mock_compressed_proof( + elf: &[u8], + stdin: SP1Stdin, +) -> Result<(SP1ProofWithPublicValues, ExecutionReport)> { + let mock_prover = MockProver::new(); + let context = SP1Context::builder() + .set_skip_deferred_proof_verification(true) + .build(); + let (public_values, report) = mock_prover.sp1_prover().execute(elf, &stdin, context)?; + + // TODO: Rather than using this type, we can just return the public values, sp1 version and sp1 stdin + let shard_proof = ShardProof { + commitment: ShardCommitment { + global_main_commit: [BabyBear::zero(); 8].into(), + local_main_commit: [BabyBear::zero(); 8].into(), + permutation_commit: [BabyBear::zero(); 8].into(), + quotient_commit: [BabyBear::zero(); 8].into(), + }, + opened_values: ShardOpenedValues { chips: vec![] }, + opening_proof: TwoAdicFriPcsProof { + fri_proof: FriProof { + commit_phase_commits: vec![], + query_proofs: vec![], + final_poly: Default::default(), + pow_witness: BabyBear::zero(), + }, + query_openings: vec![], + }, + chip_ordering: HashMap::new(), + public_values: vec![], }; - Ok((StatusCode::OK, Json(ProofResponse { proof_id }))) + let reduce_vk = StarkVerifyingKey { + commit: [BabyBear::zero(); 8].into(), + pc_start: BabyBear::zero(), + chip_information: vec![], + chip_ordering: HashMap::new(), + }; + + let proof = SP1Proof::Compressed(Box::new(SP1ReduceProof { + vk: reduce_vk, + proof: shard_proof, + })); + + Ok(( + SP1ProofWithPublicValues { + proof, + stdin, + public_values, + sp1_version: mock_prover.version().to_string(), + }, + report, + )) } /// Request a proof for a span of blocks. async fn request_mock_span_proof( - State(state): State, Json(payload): Json, ) -> Result<(StatusCode, Json), AppError> { info!("Received mock span proof request: {:?}", payload); let fetcher = OPSuccinctDataFetcher::new_with_rollup_config(RunContext::Docker).await?; + let l2_chain_id = fetcher.get_l2_chain_id().await?; let host_cli = fetcher .get_host_cli_args( @@ -349,6 +421,7 @@ async fn request_mock_span_proof( // Start the server and native client with a timeout. // Note: Ideally, the server should call out to a separate process that executes the native // host, and return an ID that the client can poll on to check if the proof was submitted. + let start_witnessgen = Instant::now(); let mut witnessgen_executor = WitnessGenExecutor::new(WITNESSGEN_TIMEOUT, RunContext::Docker); witnessgen_executor.spawn_witnessgen(&host_cli).await?; // Log any errors from running the witness generation process. @@ -360,15 +433,55 @@ async fn request_mock_span_proof( e ))); } + let witnessgen_duration = start_witnessgen.elapsed(); let sp1_stdin = get_proof_stdin(&host_cli)?; - let prover = ProverClient::mock(); - let proof = prover - .prove(&state.range_pk, sp1_stdin) - .set_skip_deferred_proof_verification(true) - .compressed() - .run()?; + let start_prove = Instant::now(); + let res = generate_mock_compressed_proof(MULTI_BLOCK_ELF, sp1_stdin); + let (proof, report) = if let Ok(result) = res { + result + } else { + return Err(AppError(anyhow::anyhow!( + "Failed to generate mock compressed proof: {}", + res.err().unwrap() + ))); + }; + let prove_duration = start_prove.elapsed(); + // Save the report to execution-reports/ with .csv + let report_path: PathBuf = PathBuf::from(format!( + "/usr/local/bin/execution-reports/{}/{}-{}.csv", + l2_chain_id, payload.start, payload.end + )); + std::fs::create_dir_all(report_path.parent().unwrap()).unwrap(); + let mut file = OpenOptions::new() + .read(true) + .append(true) + .create(true) + .open(&report_path) + .unwrap(); + + // Writes the headers only if the file is empty. + let needs_header = file.seek(std::io::SeekFrom::End(0)).unwrap() == 0; + + let mut csv_writer = csv::WriterBuilder::new() + .has_headers(needs_header) + .from_writer(file); + + let block_data = fetcher + .get_l2_block_data_range(payload.start, payload.end) + .await?; + let execution_stats = ExecutionStats::new( + &block_data, + &report, + witnessgen_duration.as_secs(), + prove_duration.as_secs(), + ); + + csv_writer + .serialize(execution_stats) + .expect("Failed to write execution stats to CSV."); + csv_writer.flush().expect("Failed to flush CSV writer."); let proof_bytes = bincode::serialize(&proof).unwrap();