From 201e0b2e864f2619df5ee6f8d5e8fefcd6b5ba03 Mon Sep 17 00:00:00 2001 From: sm-stack Date: Wed, 18 Dec 2024 19:47:17 +0900 Subject: [PATCH 1/8] chore(bindings): add bindings of SP1 Verifier --- kroma-bindings/artifacts.json | 1 + kroma-bindings/bindings/sp1verifier.go | 356 ++++++++++++++++++++ kroma-bindings/bindings/sp1verifier_more.go | 26 ++ 3 files changed, 383 insertions(+) create mode 100644 kroma-bindings/bindings/sp1verifier.go create mode 100644 kroma-bindings/bindings/sp1verifier_more.go diff --git a/kroma-bindings/artifacts.json b/kroma-bindings/artifacts.json index b035a3205..bdf5027e3 100644 --- a/kroma-bindings/artifacts.json +++ b/kroma-bindings/artifacts.json @@ -28,6 +28,7 @@ "ProxyAdmin", "SecurityCouncil", "SecurityCouncilToken", + "SP1Verifier", "StandardBridge", "SystemConfig", "TimeLock", diff --git a/kroma-bindings/bindings/sp1verifier.go b/kroma-bindings/bindings/sp1verifier.go new file mode 100644 index 000000000..03e003a32 --- /dev/null +++ b/kroma-bindings/bindings/sp1verifier.go @@ -0,0 +1,356 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// SP1VerifierMetaData contains all meta data concerning the SP1Verifier contract. +var SP1VerifierMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"function\",\"name\":\"VERIFIER_HASH\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"Verify\",\"inputs\":[{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"public_inputs\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[{\"name\":\"success\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"hashPublicValues\",\"inputs\":[{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"verifyProof\",\"inputs\":[{\"name\":\"programVKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WrongVerifierSelector\",\"inputs\":[{\"name\":\"received\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"},{\"name\":\"expected\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}]}]", + Bin: "0x608060405234801561001057600080fd5b50612fab806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80636b61d8e7116100505780636b61d8e7146100b65780637e4f7a8a146100c9578063ffa1ad74146100ec57600080fd5b80632a5104361461006c57806341493c60146100a1575b600080fd5b7f54bdcae3adb83d4ce9ed91d99a31da3086e2b117abf3685164e9f28d78670b055b6040519081526020015b60405180910390f35b6100b46100af366004612c4b565b61012b565b005b61008e6100c4366004612cc5565b610342565b6100dc6100d7366004612d07565b6103c2565b6040519015158152602001610098565b604080518082018252600681527f76332e302e300000000000000000000000000000000000000000000000000000602082015290516100989190612da1565b600061013a6004828486612e14565b61014391612e3e565b90507f54bdcae3adb83d4ce9ed91d99a31da3086e2b117abf3685164e9f28d78670b057f54bdcae3000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610211576040517f988066a10000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000080841660048301528216602482015260440160405180910390fd5b600061021d8787610342565b60408051600280825260608201835292935060009290916020830190803683370190505090508860001c8160008151811061025a5761025a612e86565b6020026020010181815250508160001c8160018151811061027d5761027d612e86565b6020908102919091010152600030637e4f7a8a61029d886004818c612e14565b856040518463ffffffff1660e01b81526004016102bc93929190612eb5565b602060405180830381865afa1580156102d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102fd9190612f4c565b905080610336576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b60007f1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b6002848460405161037a929190612f75565b602060405180830381855afa158015610397573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906103ba9190612f85565b169392505050565b600060405161024081016103d584610866565b6103df8585610879565b6103e8866108c9565b6103f1876108df565b60006103fe86868a610a7a565b905061040981610db1565b90506104158189610e18565b90506104218189610ea7565b5060608201517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000061047884630100000085612b96565b086101c08401525061048b818587610f12565b61049682868a61128e565b91507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018183086101a0840152506104cd905061163b565b6104d686612786565b6104df866126d7565b6104e8866122fd565b6104f186611e28565b6104fa86611b8c565b6105038661178c565b61020001519050612bfa565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f77726f6e67206e756d626572206f66207075626c696320696e707574730000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6572726f72206d6f6420657870000000000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6572726f72206563206f7065726174696f6e00000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e707574732061726520626967676572207468616e207200000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f77726f6e672070726f6f662073697a65000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f70656e696e677320626967676572207468616e2072000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6572726f722070616972696e67000000000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6572726f722076657269667900000000000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6572726f722072616e646f6d2067656e206b7a670000000000000000000000006044820152606481fd5b600281146108765761087661050f565b50565b60005b818110156108c4577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000833511156108b5576108b561062c565b6020929092019160010161087c565b505050565b6103608181146108db576108db61068b565b5050565b61018081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000081351115610915576109156106ea565b506101a081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000008135111561094c5761094c6106ea565b506101c081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000081351115610983576109836106ea565b506101e081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000813511156109ba576109ba6106ea565b5061020081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000813511156109f1576109f16106ea565b5061026081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000081351115610a2857610a286106ea565b50610300810160005b60018110156108c4577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000082351115610a6b57610a6b6106ea565b60209190910190600101610a31565b600060405161024081016467616d6d6181527f231c22c1bdb73ea856c8df419a1a3d5cd64756eea7d3ff88445191766547df0a60208201527f26662addc27704fced94738f32c04a0ce7c738fdf192fc38c66ded0da05ff25e60408201527f274bc38569b26f0dbb6f68e765fd534e569e181510f7616a2d37a2ea9eaf117460608201527f16eee348cf12b860f9af358a2dd9a49947beb54d9d1aef8a40516f4f43a3d12b60808201527f2eb82c18a71af5619f50e44c2c9b8460c13989c9682bf96226041fc85cf3cbef60a08201527f0d8953351ec8c2b0d33b117538917cd78e61209d19af2619edec609fb4fd228660c08201527f0ecf753896753477637a37c8ec1ccdd1e5fe9c632a391598edd33812e6e64eb860e08201527edcf51acabe496ffa81d9105d7ce59e0c310db60373c8d16040548894bacfc66101008201527f231c051b766676ac5b0c5348e3d2811c28ac0092ecb0dc2a2d28115531262ecf6101208201527f08549442675c42a8bfd831e8153972dfe4805e358fff8c9a4e085a61a1895a1c6101408201527f0d004ee4d050057e4cd46126f4d2a6c9623a0ede72825fceed853f98d4cf69176101608201527f02b4d73b2f70de0117bbe5f9a509939400043d2c943965fda9a493ee964be7c26101808201527f17d7d1377050e977234a2303b1535fb4769fe6dc4d18cce3e0b7c7c94383a15c6101a08201527f29ccbb99014f4125fffb7c7e88ee167a7212c7e521e9dcebdc9fbfb0377d82096101c08201527f12161d51771ac2487cd60c594f07321d620d9375d6e44f1ffdf8e806a61545006101e08201527f01a748c5de58f154c506fa3e158b3d0e61907f0e3c26e1b6ad430be18445289f6102008201527f150d75d2df77de0c6fbae987a615ad86c1a4ef03ab5d741499d0f2885ae398a16102208201527f29cfa73470fc7a3cf075227c707b1af1ab2c44ca80224419715ca4c2ab3bcb61610240820152610260810160208602808883379081019060c0808784375061030501905060208282601b820160025afa905080610d7b57610d7b6107a8565b5080519250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182066040820152509392505050565b600060405161024060405101636265746181528360208201526020816024601c840160025afa80610de457610de46107a8565b5080519250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018206602082015250919050565b600060405161024060405101606564616c7068618252602082018681526020810190506103208601600160400280828437928301929190910190506040610220870182375060208282601b850160025afa905080610e7857610e786107a8565b50517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181069091529392505050565b60405161024060405101637a657461815283602082015260c0808401604083013760208160e4601c840160025afa80610ee257610ee26107a8565b50517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019006606091909101525050565b600060405160608101516101c0820151915085610f3181878585610fae565b60009250600091505b85821015610fa4577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001853582510992507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018385086020958601959094506001929092019101610f3a565b5050509392505050565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e427ce32d4886b01bfe313ba1dba6db8b2045d128178a7164500e0a6c11830960018560005b8681101561109d577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001837f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000103860882527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b8409925060209190910190600101610ff8565b506110a9818789611162565b50600190508560005b86811015611158577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001837f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001868551090982526020820191507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b840992506001016110b2565b5050505050505050565b600183526000805b838110156111b85781850151828401517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181830990506020840193508084880152505060018101905061116a565b5060208103820191508084019350506111f96020840160027f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001038551612b96565b60005b838110156112875760208503945082517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018651840984527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018184097fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909401939250506001016111fc565b5050505050565b600060405160608101516101c0820151915061032084016000806112b8896020850135853561143d565b91506112cb896288af5f8a018787611301565b90507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018082840987089998505050505050505050565b600061132e85857f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b612b96565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001817f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000103840894507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e427ce32d4886b01bfe313ba1dba6db8b2045d128178a7164500e0a6c11820990506113e7867f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff87612b96565b94507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000185820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018482099695505050505050565b600083526000602084015280604084015250806060830152506000608082015360306081820153600060828201536042608382015360536084820153604260858201536032608682015360326087820153602d608882015360506089820153606c608a820153606f608b820153606e608c820153606b608d820153600b608e8201536000602082608f8460025afa806114d8576114d86107a8565b8251600160208501536042602185015360536022850153604260238501536032602485015360326025850153602d602685015360506027850153606c6028850153606f6029850153606e602a850153606b602b850153600b602c850153602084602d8660025afa91508161154e5761154e6107a8565b8351186020840152600260408401536042604184015360536042840153604260438401536032604484015360326045840153602d604684015360506047840153606c6048840153606f6049840153606e604a840153606b604b840153600b604c84015360208301602081602d8360025afa915050806115cf576115cf6107a8565b507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017001000000000000000000000000000000008351099050602082015160801c7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018183089392505050565b604051610240604051016101c08201517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001036060850151086116c1837f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff83612b96565b90507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e427ce32d4886b01bfe313ba1dba6db8b2045d128178a7164500e0a6c11820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018282098451935091507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001905082820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018282099050806080840152505050565b60405161024081016101608201518152610180820151602082015261028083013560408201526102a08301356060820152610220830135608082015261024083013560a08201526102c083013560c08201526102e083013560e082015260608201516101008201526101e08201516101208201526020816101408360025afa8061181857611818610807565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182510690508160408101925061028085013581526102a0850135602082015261186883836102c0880184612afd565b610160840161187d8484610220890184612afd565b610140850161189184610260890183612b44565b7f1fa4be93b5e7f7e674d5059b63554fab99638b304ed8310e9fa44c281ac9b03b85527f1a01ae7fac6228e39d3cb5a5e71fd31160f3241e79a5f48ffb3737e6c389b7216020860152805160408087019182529095908160608160075afa9150816118fe576118fe6107a8565b60208101915081517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47038252611936868285866129f4565b5050836040850194506119538560608801516102808a0184612a8b565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b60608801510995507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000186850993506119d385856102c08a0184612afd565b6119df858284856129f4565b50602082810180517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd470381528251865291810151908501527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408501527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608501527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808501527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a0850152905160c0840152805160e08401527f22f1acbb03c4508760c2430af35865e7cdf9f3eb1224504fdcc3708ddb954a486101008401527f2a344fad01c2ed0ed73142ae1752429eaea515c6f3f6b941103cc21c2308e1cb6101208401527f159f15b842ba9c8449aa3268f981010d4c7142e5193473d80b464e964845c3f86101408401527f0efd30ac7b6f8d0d3ccbc2207587c2acbad1532dc0293f0d034cf8258cd428b361016084015292506108c4905081604051602060006101808460085afa80611b7d57611b7d610749565b50600051610200919091015250565b6040516102406040510160208101604082016101e084015180610160860160e08701518152610100870151610180880152610120870151610140880152611bd8868360008b0184612afd565b611beb826101808a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018383099150611c20868360408b0184612afd565b611c33826101a08a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018383099150611c68868360808b0184612afd565b611c7b826101c08a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000183830991507f231c22c1bdb73ea856c8df419a1a3d5cd64756eea7d3ff88445191766547df0a86527f26662addc27704fced94738f32c04a0ce7c738fdf192fc38c66ded0da05ff25e8552611cf384838884612ab6565b611d06826101e08a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000183830991507f274bc38569b26f0dbb6f68e765fd534e569e181510f7616a2d37a2ea9eaf117486527f16eee348cf12b860f9af358a2dd9a49947beb54d9d1aef8a40516f4f43a3d12b8552611d7e84838884612ab6565b611d91826102008a016101408a01612b44565b61030088017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184840992507f150d75d2df77de0c6fbae987a615ad86c1a4ef03ab5d741499d0f2885ae398a187527f29cfa73470fc7a3cf075227c707b1af1ab2c44ca80224419715ca4c2ab3bcb618652611e0e85848985612ab6565b611e1d83826101408b01612b44565b505050505050505050565b6040516467616d6d616102408201908152606082015161026083015260e08201516102808301526101008201516102a083015260c0836102c08401377f231c22c1bdb73ea856c8df419a1a3d5cd64756eea7d3ff88445191766547df0a6101408201527f26662addc27704fced94738f32c04a0ce7c738fdf192fc38c66ded0da05ff25e6101608201527f274bc38569b26f0dbb6f68e765fd534e569e181510f7616a2d37a2ea9eaf1174610180808301919091527f16eee348cf12b860f9af358a2dd9a49947beb54d9d1aef8a40516f4f43a3d12b6101a0808401919091527f150d75d2df77de0c6fbae987a615ad86c1a4ef03ab5d741499d0f2885ae398a16101c0808501919091527f29cfa73470fc7a3cf075227c707b1af1ab2c44ca80224419715ca4c2ab3bcb616101e0808601919091526101208601516102008087019190915293870135610220860152918601356102408501528501356102608401528401356102808301528301356102a08201526102c081016103008401602081833750610260840135602091820152601b906102e5906101e085018285850160025afa9250505080611fde57611fde6107a8565b506101e00180517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019006905250565b604051610240604051017f0ecf753896753477637a37c8ec1ccdd1e5fe9c632a391598edd33812e6e64eb881527edcf51acabe496ffa81d9105d7ce59e0c310db60373c8d16040548894bacfc66020820152612076604082016101808501358360e08601612a60565b7f231c051b766676ac5b0c5348e3d2811c28ac0092ecb0dc2a2d28115531262ecf81527f08549442675c42a8bfd831e8153972dfe4805e358fff8c9a4e085a61a1895a1c60208201526120d6604082016101a08501358360e08601612ab6565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a0840135610180850135097f0d004ee4d050057e4cd46126f4d2a6c9623a0ede72825fceed853f98d4cf691782527f02b4d73b2f70de0117bbe5f9a509939400043d2c943965fda9a493ee964be7c2602083015261215f60408301828460e08701612ab6565b507f17d7d1377050e977234a2303b1535fb4769fe6dc4d18cce3e0b7c7c94383a15c81527f29ccbb99014f4125fffb7c7e88ee167a7212c7e521e9dcebdc9fbfb0377d820960208201526121c0604082016101c08501358360e08601612ab6565b7f12161d51771ac2487cd60c594f07321d620d9375d6e44f1ffdf8e806a615450081527f01a748c5de58f154c506fa3e158b3d0e61907f0e3c26e1b6ad430be18445289f602082015261221b604082018260e08501806129f4565b6103008301610320840160005b60018110156122685781358452602082013560208501526122526040850184358660e08901612ab6565b6020929092019160409190910190600101612228565b5050507f2eb82c18a71af5619f50e44c2c9b8460c13989c9682bf96226041fc85cf3cbef81527f0d8953351ec8c2b0d33b117538917cd78e61209d19af2619edec609fb4fd228660208201526122c660408201858360e08601612ab6565b610220830135815261024083013560208201526122eb60408201868360e08601612ab6565b6112878160a0840160e08501806129f4565b60405160208101516040820151606083015160008401517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184610260880135097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101e088013586097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001610180890135820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000185820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161020089013587097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a08a0135820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000186820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000185820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001600580097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001878a0998507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101808c01358a0894507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000188860894507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160058a0993507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a08c0135850893507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000188850893507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001818a099250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101c08b0135830891507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000187830891507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000183850997507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018289097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001908103985085890997507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160808a01518908975061033688828c61200d565b6040516002630100000001610240604051016126f881836060860151612b96565b915061270d8183610140870160a08701612a8b565b61272081610100860160a0860180612a2a565b61272f818360a0860180612a60565b6127418160c0860160a0860180612a2a565b612758816101c085015160a0860160a08701612a60565b505060c00180517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4703905250565b60405160007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160208301516101e08501350990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016040830151820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101808401358208905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160208401516102008601350990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016040840151820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a08501358208905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160408501516101c08701350890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182840992507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018184099250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016000840151830991507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001610260850135830991507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a0840151830860808401519092507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190810391508183087f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001036101209390930192909252505050565b8151845260208201516020850152825160408501526020830151606085015260408160808660065afa80611287576112876105cd565b8151845260208201516020850152823560408501526020830135606085015260408160808660065afa80611287576112876105cd565b815184526020820151602085015282604085015260408160608660075afa80611287576112876105cd565b813584526020820135602085015282604085015260408160608660075afa80611287576112876105cd565b815184526020820151602085015282604085015260408460608660075afa815160408601526020820151606086015260408260808760065afa1680611287576112876105cd565b813584526020820135602085015282604085015260408460608660075afa815160408601526020820151606086015260408260808760065afa1680611287576112876105cd565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001838335097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181835108825250505050565b602083526020808401526020604084015280606084015250806080830152507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160a0820152600060208260c08460055afa80612bf457612bf461056e565b50505190565b949350505050565b60008083601f840112612c1457600080fd5b50813567ffffffffffffffff811115612c2c57600080fd5b602083019150836020828501011115612c4457600080fd5b9250929050565b600080600080600060608688031215612c6357600080fd5b85359450602086013567ffffffffffffffff80821115612c8257600080fd5b612c8e89838a01612c02565b90965094506040880135915080821115612ca757600080fd5b50612cb488828901612c02565b969995985093965092949392505050565b60008060208385031215612cd857600080fd5b823567ffffffffffffffff811115612cef57600080fd5b612cfb85828601612c02565b90969095509350505050565b60008060008060408587031215612d1d57600080fd5b843567ffffffffffffffff80821115612d3557600080fd5b612d4188838901612c02565b90965094506020870135915080821115612d5a57600080fd5b818701915087601f830112612d6e57600080fd5b813581811115612d7d57600080fd5b8860208260051b8501011115612d9257600080fd5b95989497505060200194505050565b600060208083528351808285015260005b81811015612dce57858101830151858201604001528201612db2565b81811115612de0576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60008085851115612e2457600080fd5b83861115612e3157600080fd5b5050820193919092039150565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015612e7e5780818660040360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b604081528260408201528284606083013760006060848301015260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501168201606081016020606085840301818601528186518084526080850191508288019450600093505b80841015612f3f5784518252938201936001939093019290820190612f1f565b5098975050505050505050565b600060208284031215612f5e57600080fd5b81518015158114612f6e57600080fd5b9392505050565b8183823760009101908152919050565b600060208284031215612f9757600080fd5b505191905056fea164736f6c634300080f000a", +} + +// SP1VerifierABI is the input ABI used to generate the binding from. +// Deprecated: Use SP1VerifierMetaData.ABI instead. +var SP1VerifierABI = SP1VerifierMetaData.ABI + +// SP1VerifierBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use SP1VerifierMetaData.Bin instead. +var SP1VerifierBin = SP1VerifierMetaData.Bin + +// DeploySP1Verifier deploys a new Ethereum contract, binding an instance of SP1Verifier to it. +func DeploySP1Verifier(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SP1Verifier, error) { + parsed, err := SP1VerifierMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(SP1VerifierBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &SP1Verifier{SP1VerifierCaller: SP1VerifierCaller{contract: contract}, SP1VerifierTransactor: SP1VerifierTransactor{contract: contract}, SP1VerifierFilterer: SP1VerifierFilterer{contract: contract}}, nil +} + +// SP1Verifier is an auto generated Go binding around an Ethereum contract. +type SP1Verifier struct { + SP1VerifierCaller // Read-only binding to the contract + SP1VerifierTransactor // Write-only binding to the contract + SP1VerifierFilterer // Log filterer for contract events +} + +// SP1VerifierCaller is an auto generated read-only Go binding around an Ethereum contract. +type SP1VerifierCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SP1VerifierTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SP1VerifierTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SP1VerifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SP1VerifierFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SP1VerifierSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SP1VerifierSession struct { + Contract *SP1Verifier // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SP1VerifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SP1VerifierCallerSession struct { + Contract *SP1VerifierCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SP1VerifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SP1VerifierTransactorSession struct { + Contract *SP1VerifierTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SP1VerifierRaw is an auto generated low-level Go binding around an Ethereum contract. +type SP1VerifierRaw struct { + Contract *SP1Verifier // Generic contract binding to access the raw methods on +} + +// SP1VerifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SP1VerifierCallerRaw struct { + Contract *SP1VerifierCaller // Generic read-only contract binding to access the raw methods on +} + +// SP1VerifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SP1VerifierTransactorRaw struct { + Contract *SP1VerifierTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSP1Verifier creates a new instance of SP1Verifier, bound to a specific deployed contract. +func NewSP1Verifier(address common.Address, backend bind.ContractBackend) (*SP1Verifier, error) { + contract, err := bindSP1Verifier(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SP1Verifier{SP1VerifierCaller: SP1VerifierCaller{contract: contract}, SP1VerifierTransactor: SP1VerifierTransactor{contract: contract}, SP1VerifierFilterer: SP1VerifierFilterer{contract: contract}}, nil +} + +// NewSP1VerifierCaller creates a new read-only instance of SP1Verifier, bound to a specific deployed contract. +func NewSP1VerifierCaller(address common.Address, caller bind.ContractCaller) (*SP1VerifierCaller, error) { + contract, err := bindSP1Verifier(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SP1VerifierCaller{contract: contract}, nil +} + +// NewSP1VerifierTransactor creates a new write-only instance of SP1Verifier, bound to a specific deployed contract. +func NewSP1VerifierTransactor(address common.Address, transactor bind.ContractTransactor) (*SP1VerifierTransactor, error) { + contract, err := bindSP1Verifier(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SP1VerifierTransactor{contract: contract}, nil +} + +// NewSP1VerifierFilterer creates a new log filterer instance of SP1Verifier, bound to a specific deployed contract. +func NewSP1VerifierFilterer(address common.Address, filterer bind.ContractFilterer) (*SP1VerifierFilterer, error) { + contract, err := bindSP1Verifier(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SP1VerifierFilterer{contract: contract}, nil +} + +// bindSP1Verifier binds a generic wrapper to an already deployed contract. +func bindSP1Verifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SP1VerifierMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SP1Verifier *SP1VerifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SP1Verifier.Contract.SP1VerifierCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SP1Verifier *SP1VerifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SP1Verifier.Contract.SP1VerifierTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SP1Verifier *SP1VerifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SP1Verifier.Contract.SP1VerifierTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SP1Verifier *SP1VerifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SP1Verifier.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SP1Verifier *SP1VerifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SP1Verifier.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SP1Verifier *SP1VerifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SP1Verifier.Contract.contract.Transact(opts, method, params...) +} + +// VERIFIERHASH is a free data retrieval call binding the contract method 0x2a510436. +// +// Solidity: function VERIFIER_HASH() pure returns(bytes32) +func (_SP1Verifier *SP1VerifierCaller) VERIFIERHASH(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SP1Verifier.contract.Call(opts, &out, "VERIFIER_HASH") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// VERIFIERHASH is a free data retrieval call binding the contract method 0x2a510436. +// +// Solidity: function VERIFIER_HASH() pure returns(bytes32) +func (_SP1Verifier *SP1VerifierSession) VERIFIERHASH() ([32]byte, error) { + return _SP1Verifier.Contract.VERIFIERHASH(&_SP1Verifier.CallOpts) +} + +// VERIFIERHASH is a free data retrieval call binding the contract method 0x2a510436. +// +// Solidity: function VERIFIER_HASH() pure returns(bytes32) +func (_SP1Verifier *SP1VerifierCallerSession) VERIFIERHASH() ([32]byte, error) { + return _SP1Verifier.Contract.VERIFIERHASH(&_SP1Verifier.CallOpts) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() pure returns(string) +func (_SP1Verifier *SP1VerifierCaller) VERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _SP1Verifier.contract.Call(opts, &out, "VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() pure returns(string) +func (_SP1Verifier *SP1VerifierSession) VERSION() (string, error) { + return _SP1Verifier.Contract.VERSION(&_SP1Verifier.CallOpts) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() pure returns(string) +func (_SP1Verifier *SP1VerifierCallerSession) VERSION() (string, error) { + return _SP1Verifier.Contract.VERSION(&_SP1Verifier.CallOpts) +} + +// Verify is a free data retrieval call binding the contract method 0x7e4f7a8a. +// +// Solidity: function Verify(bytes proof, uint256[] public_inputs) view returns(bool success) +func (_SP1Verifier *SP1VerifierCaller) Verify(opts *bind.CallOpts, proof []byte, public_inputs []*big.Int) (bool, error) { + var out []interface{} + err := _SP1Verifier.contract.Call(opts, &out, "Verify", proof, public_inputs) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Verify is a free data retrieval call binding the contract method 0x7e4f7a8a. +// +// Solidity: function Verify(bytes proof, uint256[] public_inputs) view returns(bool success) +func (_SP1Verifier *SP1VerifierSession) Verify(proof []byte, public_inputs []*big.Int) (bool, error) { + return _SP1Verifier.Contract.Verify(&_SP1Verifier.CallOpts, proof, public_inputs) +} + +// Verify is a free data retrieval call binding the contract method 0x7e4f7a8a. +// +// Solidity: function Verify(bytes proof, uint256[] public_inputs) view returns(bool success) +func (_SP1Verifier *SP1VerifierCallerSession) Verify(proof []byte, public_inputs []*big.Int) (bool, error) { + return _SP1Verifier.Contract.Verify(&_SP1Verifier.CallOpts, proof, public_inputs) +} + +// HashPublicValues is a free data retrieval call binding the contract method 0x6b61d8e7. +// +// Solidity: function hashPublicValues(bytes publicValues) pure returns(bytes32) +func (_SP1Verifier *SP1VerifierCaller) HashPublicValues(opts *bind.CallOpts, publicValues []byte) ([32]byte, error) { + var out []interface{} + err := _SP1Verifier.contract.Call(opts, &out, "hashPublicValues", publicValues) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// HashPublicValues is a free data retrieval call binding the contract method 0x6b61d8e7. +// +// Solidity: function hashPublicValues(bytes publicValues) pure returns(bytes32) +func (_SP1Verifier *SP1VerifierSession) HashPublicValues(publicValues []byte) ([32]byte, error) { + return _SP1Verifier.Contract.HashPublicValues(&_SP1Verifier.CallOpts, publicValues) +} + +// HashPublicValues is a free data retrieval call binding the contract method 0x6b61d8e7. +// +// Solidity: function hashPublicValues(bytes publicValues) pure returns(bytes32) +func (_SP1Verifier *SP1VerifierCallerSession) HashPublicValues(publicValues []byte) ([32]byte, error) { + return _SP1Verifier.Contract.HashPublicValues(&_SP1Verifier.CallOpts, publicValues) +} + +// VerifyProof is a free data retrieval call binding the contract method 0x41493c60. +// +// Solidity: function verifyProof(bytes32 programVKey, bytes publicValues, bytes proofBytes) view returns() +func (_SP1Verifier *SP1VerifierCaller) VerifyProof(opts *bind.CallOpts, programVKey [32]byte, publicValues []byte, proofBytes []byte) error { + var out []interface{} + err := _SP1Verifier.contract.Call(opts, &out, "verifyProof", programVKey, publicValues, proofBytes) + + if err != nil { + return err + } + + return err + +} + +// VerifyProof is a free data retrieval call binding the contract method 0x41493c60. +// +// Solidity: function verifyProof(bytes32 programVKey, bytes publicValues, bytes proofBytes) view returns() +func (_SP1Verifier *SP1VerifierSession) VerifyProof(programVKey [32]byte, publicValues []byte, proofBytes []byte) error { + return _SP1Verifier.Contract.VerifyProof(&_SP1Verifier.CallOpts, programVKey, publicValues, proofBytes) +} + +// VerifyProof is a free data retrieval call binding the contract method 0x41493c60. +// +// Solidity: function verifyProof(bytes32 programVKey, bytes publicValues, bytes proofBytes) view returns() +func (_SP1Verifier *SP1VerifierCallerSession) VerifyProof(programVKey [32]byte, publicValues []byte, proofBytes []byte) error { + return _SP1Verifier.Contract.VerifyProof(&_SP1Verifier.CallOpts, programVKey, publicValues, proofBytes) +} diff --git a/kroma-bindings/bindings/sp1verifier_more.go b/kroma-bindings/bindings/sp1verifier_more.go new file mode 100644 index 000000000..d90eb7390 --- /dev/null +++ b/kroma-bindings/bindings/sp1verifier_more.go @@ -0,0 +1,26 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "github.com/ethereum-optimism/optimism/op-bindings/solc" +) + +const SP1VerifierStorageLayoutJSON = "{\"storage\":null,\"types\":{}}" + +var SP1VerifierStorageLayout = new(solc.StorageLayout) + +var SP1VerifierDeployedBin = "0x608060405234801561001057600080fd5b50600436106100675760003560e01c80636b61d8e7116100505780636b61d8e7146100b65780637e4f7a8a146100c9578063ffa1ad74146100ec57600080fd5b80632a5104361461006c57806341493c60146100a1575b600080fd5b7f54bdcae3adb83d4ce9ed91d99a31da3086e2b117abf3685164e9f28d78670b055b6040519081526020015b60405180910390f35b6100b46100af366004612c4b565b61012b565b005b61008e6100c4366004612cc5565b610342565b6100dc6100d7366004612d07565b6103c2565b6040519015158152602001610098565b604080518082018252600681527f76332e302e300000000000000000000000000000000000000000000000000000602082015290516100989190612da1565b600061013a6004828486612e14565b61014391612e3e565b90507f54bdcae3adb83d4ce9ed91d99a31da3086e2b117abf3685164e9f28d78670b057f54bdcae3000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610211576040517f988066a10000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000080841660048301528216602482015260440160405180910390fd5b600061021d8787610342565b60408051600280825260608201835292935060009290916020830190803683370190505090508860001c8160008151811061025a5761025a612e86565b6020026020010181815250508160001c8160018151811061027d5761027d612e86565b6020908102919091010152600030637e4f7a8a61029d886004818c612e14565b856040518463ffffffff1660e01b81526004016102bc93929190612eb5565b602060405180830381865afa1580156102d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102fd9190612f4c565b905080610336576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b60007f1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60001b6002848460405161037a929190612f75565b602060405180830381855afa158015610397573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906103ba9190612f85565b169392505050565b600060405161024081016103d584610866565b6103df8585610879565b6103e8866108c9565b6103f1876108df565b60006103fe86868a610a7a565b905061040981610db1565b90506104158189610e18565b90506104218189610ea7565b5060608201517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000061047884630100000085612b96565b086101c08401525061048b818587610f12565b61049682868a61128e565b91507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018183086101a0840152506104cd905061163b565b6104d686612786565b6104df866126d7565b6104e8866122fd565b6104f186611e28565b6104fa86611b8c565b6105038661178c565b61020001519050612bfa565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f77726f6e67206e756d626572206f66207075626c696320696e707574730000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6572726f72206d6f6420657870000000000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6572726f72206563206f7065726174696f6e00000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e707574732061726520626967676572207468616e207200000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f77726f6e672070726f6f662073697a65000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6f70656e696e677320626967676572207468616e2072000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6572726f722070616972696e67000000000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6572726f722076657269667900000000000000000000000000000000000000006044820152606481fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6572726f722072616e646f6d2067656e206b7a670000000000000000000000006044820152606481fd5b600281146108765761087661050f565b50565b60005b818110156108c4577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000833511156108b5576108b561062c565b6020929092019160010161087c565b505050565b6103608181146108db576108db61068b565b5050565b61018081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000081351115610915576109156106ea565b506101a081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000008135111561094c5761094c6106ea565b506101c081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000081351115610983576109836106ea565b506101e081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000813511156109ba576109ba6106ea565b5061020081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000813511156109f1576109f16106ea565b5061026081017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000081351115610a2857610a286106ea565b50610300810160005b60018110156108c4577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000082351115610a6b57610a6b6106ea565b60209190910190600101610a31565b600060405161024081016467616d6d6181527f231c22c1bdb73ea856c8df419a1a3d5cd64756eea7d3ff88445191766547df0a60208201527f26662addc27704fced94738f32c04a0ce7c738fdf192fc38c66ded0da05ff25e60408201527f274bc38569b26f0dbb6f68e765fd534e569e181510f7616a2d37a2ea9eaf117460608201527f16eee348cf12b860f9af358a2dd9a49947beb54d9d1aef8a40516f4f43a3d12b60808201527f2eb82c18a71af5619f50e44c2c9b8460c13989c9682bf96226041fc85cf3cbef60a08201527f0d8953351ec8c2b0d33b117538917cd78e61209d19af2619edec609fb4fd228660c08201527f0ecf753896753477637a37c8ec1ccdd1e5fe9c632a391598edd33812e6e64eb860e08201527edcf51acabe496ffa81d9105d7ce59e0c310db60373c8d16040548894bacfc66101008201527f231c051b766676ac5b0c5348e3d2811c28ac0092ecb0dc2a2d28115531262ecf6101208201527f08549442675c42a8bfd831e8153972dfe4805e358fff8c9a4e085a61a1895a1c6101408201527f0d004ee4d050057e4cd46126f4d2a6c9623a0ede72825fceed853f98d4cf69176101608201527f02b4d73b2f70de0117bbe5f9a509939400043d2c943965fda9a493ee964be7c26101808201527f17d7d1377050e977234a2303b1535fb4769fe6dc4d18cce3e0b7c7c94383a15c6101a08201527f29ccbb99014f4125fffb7c7e88ee167a7212c7e521e9dcebdc9fbfb0377d82096101c08201527f12161d51771ac2487cd60c594f07321d620d9375d6e44f1ffdf8e806a61545006101e08201527f01a748c5de58f154c506fa3e158b3d0e61907f0e3c26e1b6ad430be18445289f6102008201527f150d75d2df77de0c6fbae987a615ad86c1a4ef03ab5d741499d0f2885ae398a16102208201527f29cfa73470fc7a3cf075227c707b1af1ab2c44ca80224419715ca4c2ab3bcb61610240820152610260810160208602808883379081019060c0808784375061030501905060208282601b820160025afa905080610d7b57610d7b6107a8565b5080519250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182066040820152509392505050565b600060405161024060405101636265746181528360208201526020816024601c840160025afa80610de457610de46107a8565b5080519250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018206602082015250919050565b600060405161024060405101606564616c7068618252602082018681526020810190506103208601600160400280828437928301929190910190506040610220870182375060208282601b850160025afa905080610e7857610e786107a8565b50517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181069091529392505050565b60405161024060405101637a657461815283602082015260c0808401604083013760208160e4601c840160025afa80610ee257610ee26107a8565b50517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019006606091909101525050565b600060405160608101516101c0820151915085610f3181878585610fae565b60009250600091505b85821015610fa4577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001853582510992507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018385086020958601959094506001929092019101610f3a565b5050509392505050565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e427ce32d4886b01bfe313ba1dba6db8b2045d128178a7164500e0a6c11830960018560005b8681101561109d577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001837f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000103860882527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b8409925060209190910190600101610ff8565b506110a9818789611162565b50600190508560005b86811015611158577f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001837f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001868551090982526020820191507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b840992506001016110b2565b5050505050505050565b600183526000805b838110156111b85781850151828401517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181830990506020840193508084880152505060018101905061116a565b5060208103820191508084019350506111f96020840160027f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001038551612b96565b60005b838110156112875760208503945082517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018651840984527f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018184097fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909401939250506001016111fc565b5050505050565b600060405160608101516101c0820151915061032084016000806112b8896020850135853561143d565b91506112cb896288af5f8a018787611301565b90507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018082840987089998505050505050505050565b600061132e85857f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b612b96565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001817f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000103840894507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e427ce32d4886b01bfe313ba1dba6db8b2045d128178a7164500e0a6c11820990506113e7867f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff87612b96565b94507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000185820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018482099695505050505050565b600083526000602084015280604084015250806060830152506000608082015360306081820153600060828201536042608382015360536084820153604260858201536032608682015360326087820153602d608882015360506089820153606c608a820153606f608b820153606e608c820153606b608d820153600b608e8201536000602082608f8460025afa806114d8576114d86107a8565b8251600160208501536042602185015360536022850153604260238501536032602485015360326025850153602d602685015360506027850153606c6028850153606f6029850153606e602a850153606b602b850153600b602c850153602084602d8660025afa91508161154e5761154e6107a8565b8351186020840152600260408401536042604184015360536042840153604260438401536032604484015360326045840153602d604684015360506047840153606c6048840153606f6049840153606e604a840153606b604b840153600b604c84015360208301602081602d8360025afa915050806115cf576115cf6107a8565b507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017001000000000000000000000000000000008351099050602082015160801c7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018183089392505050565b604051610240604051016101c08201517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001036060850151086116c1837f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff83612b96565b90507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f30644e427ce32d4886b01bfe313ba1dba6db8b2045d128178a7164500e0a6c11820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018282098451935091507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001905082820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018282099050806080840152505050565b60405161024081016101608201518152610180820151602082015261028083013560408201526102a08301356060820152610220830135608082015261024083013560a08201526102c083013560c08201526102e083013560e082015260608201516101008201526101e08201516101208201526020816101408360025afa8061181857611818610807565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182510690508160408101925061028085013581526102a0850135602082015261186883836102c0880184612afd565b610160840161187d8484610220890184612afd565b610140850161189184610260890183612b44565b7f1fa4be93b5e7f7e674d5059b63554fab99638b304ed8310e9fa44c281ac9b03b85527f1a01ae7fac6228e39d3cb5a5e71fd31160f3241e79a5f48ffb3737e6c389b7216020860152805160408087019182529095908160608160075afa9150816118fe576118fe6107a8565b60208101915081517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47038252611936868285866129f4565b5050836040850194506119538560608801516102808a0184612a8b565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000017f0c9fabc7845d50d2852e2a0371c6441f145e0db82e8326961c25f1e3e32b045b60608801510995507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000186850993506119d385856102c08a0184612afd565b6119df858284856129f4565b50602082810180517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd470381528251865291810151908501527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c260408501527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed60608501527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b60808501527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa60a0850152905160c0840152805160e08401527f22f1acbb03c4508760c2430af35865e7cdf9f3eb1224504fdcc3708ddb954a486101008401527f2a344fad01c2ed0ed73142ae1752429eaea515c6f3f6b941103cc21c2308e1cb6101208401527f159f15b842ba9c8449aa3268f981010d4c7142e5193473d80b464e964845c3f86101408401527f0efd30ac7b6f8d0d3ccbc2207587c2acbad1532dc0293f0d034cf8258cd428b361016084015292506108c4905081604051602060006101808460085afa80611b7d57611b7d610749565b50600051610200919091015250565b6040516102406040510160208101604082016101e084015180610160860160e08701518152610100870151610180880152610120870151610140880152611bd8868360008b0184612afd565b611beb826101808a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018383099150611c20868360408b0184612afd565b611c33826101a08a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018383099150611c68868360808b0184612afd565b611c7b826101c08a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000183830991507f231c22c1bdb73ea856c8df419a1a3d5cd64756eea7d3ff88445191766547df0a86527f26662addc27704fced94738f32c04a0ce7c738fdf192fc38c66ded0da05ff25e8552611cf384838884612ab6565b611d06826101e08a016101408a01612b44565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000183830991507f274bc38569b26f0dbb6f68e765fd534e569e181510f7616a2d37a2ea9eaf117486527f16eee348cf12b860f9af358a2dd9a49947beb54d9d1aef8a40516f4f43a3d12b8552611d7e84838884612ab6565b611d91826102008a016101408a01612b44565b61030088017f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184840992507f150d75d2df77de0c6fbae987a615ad86c1a4ef03ab5d741499d0f2885ae398a187527f29cfa73470fc7a3cf075227c707b1af1ab2c44ca80224419715ca4c2ab3bcb618652611e0e85848985612ab6565b611e1d83826101408b01612b44565b505050505050505050565b6040516467616d6d616102408201908152606082015161026083015260e08201516102808301526101008201516102a083015260c0836102c08401377f231c22c1bdb73ea856c8df419a1a3d5cd64756eea7d3ff88445191766547df0a6101408201527f26662addc27704fced94738f32c04a0ce7c738fdf192fc38c66ded0da05ff25e6101608201527f274bc38569b26f0dbb6f68e765fd534e569e181510f7616a2d37a2ea9eaf1174610180808301919091527f16eee348cf12b860f9af358a2dd9a49947beb54d9d1aef8a40516f4f43a3d12b6101a0808401919091527f150d75d2df77de0c6fbae987a615ad86c1a4ef03ab5d741499d0f2885ae398a16101c0808501919091527f29cfa73470fc7a3cf075227c707b1af1ab2c44ca80224419715ca4c2ab3bcb616101e0808601919091526101208601516102008087019190915293870135610220860152918601356102408501528501356102608401528401356102808301528301356102a08201526102c081016103008401602081833750610260840135602091820152601b906102e5906101e085018285850160025afa9250505080611fde57611fde6107a8565b506101e00180517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019006905250565b604051610240604051017f0ecf753896753477637a37c8ec1ccdd1e5fe9c632a391598edd33812e6e64eb881527edcf51acabe496ffa81d9105d7ce59e0c310db60373c8d16040548894bacfc66020820152612076604082016101808501358360e08601612a60565b7f231c051b766676ac5b0c5348e3d2811c28ac0092ecb0dc2a2d28115531262ecf81527f08549442675c42a8bfd831e8153972dfe4805e358fff8c9a4e085a61a1895a1c60208201526120d6604082016101a08501358360e08601612ab6565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a0840135610180850135097f0d004ee4d050057e4cd46126f4d2a6c9623a0ede72825fceed853f98d4cf691782527f02b4d73b2f70de0117bbe5f9a509939400043d2c943965fda9a493ee964be7c2602083015261215f60408301828460e08701612ab6565b507f17d7d1377050e977234a2303b1535fb4769fe6dc4d18cce3e0b7c7c94383a15c81527f29ccbb99014f4125fffb7c7e88ee167a7212c7e521e9dcebdc9fbfb0377d820960208201526121c0604082016101c08501358360e08601612ab6565b7f12161d51771ac2487cd60c594f07321d620d9375d6e44f1ffdf8e806a615450081527f01a748c5de58f154c506fa3e158b3d0e61907f0e3c26e1b6ad430be18445289f602082015261221b604082018260e08501806129f4565b6103008301610320840160005b60018110156122685781358452602082013560208501526122526040850184358660e08901612ab6565b6020929092019160409190910190600101612228565b5050507f2eb82c18a71af5619f50e44c2c9b8460c13989c9682bf96226041fc85cf3cbef81527f0d8953351ec8c2b0d33b117538917cd78e61209d19af2619edec609fb4fd228660208201526122c660408201858360e08601612ab6565b610220830135815261024083013560208201526122eb60408201868360e08601612ab6565b6112878160a0840160e08501806129f4565b60405160208101516040820151606083015160008401517f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184610260880135097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101e088013586097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001610180890135820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000185820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161020089013587097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a08a0135820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000186820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018284097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000185820990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001600580097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001878a0998507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101808c01358a0894507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000188860894507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160058a0993507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a08c0135850893507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000188850893507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001818a099250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101c08b0135830891507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000187830891507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000183850997507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018289097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001908103985085890997507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160808a01518908975061033688828c61200d565b6040516002630100000001610240604051016126f881836060860151612b96565b915061270d8183610140870160a08701612a8b565b61272081610100860160a0860180612a2a565b61272f818360a0860180612a60565b6127418160c0860160a0860180612a2a565b612758816101c085015160a0860160a08701612a60565b505060c00180517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4703905250565b60405160007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160208301516101e08501350990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016040830151820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101808401358208905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160208401516102008601350990507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016040840151820890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a08501358208905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160408501516101c08701350890507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000182840992507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018184099250507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016000840151830991507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001610260850135830991507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016101a0840151830860808401519092507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190810391508183087f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001036101209390930192909252505050565b8151845260208201516020850152825160408501526020830151606085015260408160808660065afa80611287576112876105cd565b8151845260208201516020850152823560408501526020830135606085015260408160808660065afa80611287576112876105cd565b815184526020820151602085015282604085015260408160608660075afa80611287576112876105cd565b813584526020820135602085015282604085015260408160608660075afa80611287576112876105cd565b815184526020820151602085015282604085015260408460608660075afa815160408601526020820151606086015260408260808760065afa1680611287576112876105cd565b813584526020820135602085015282604085015260408460608660075afa815160408601526020820151606086015260408260808760065afa1680611287576112876105cd565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001838335097f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181835108825250505050565b602083526020808401526020604084015280606084015250806080830152507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160a0820152600060208260c08460055afa80612bf457612bf461056e565b50505190565b949350505050565b60008083601f840112612c1457600080fd5b50813567ffffffffffffffff811115612c2c57600080fd5b602083019150836020828501011115612c4457600080fd5b9250929050565b600080600080600060608688031215612c6357600080fd5b85359450602086013567ffffffffffffffff80821115612c8257600080fd5b612c8e89838a01612c02565b90965094506040880135915080821115612ca757600080fd5b50612cb488828901612c02565b969995985093965092949392505050565b60008060208385031215612cd857600080fd5b823567ffffffffffffffff811115612cef57600080fd5b612cfb85828601612c02565b90969095509350505050565b60008060008060408587031215612d1d57600080fd5b843567ffffffffffffffff80821115612d3557600080fd5b612d4188838901612c02565b90965094506020870135915080821115612d5a57600080fd5b818701915087601f830112612d6e57600080fd5b813581811115612d7d57600080fd5b8860208260051b8501011115612d9257600080fd5b95989497505060200194505050565b600060208083528351808285015260005b81811015612dce57858101830151858201604001528201612db2565b81811115612de0576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60008085851115612e2457600080fd5b83861115612e3157600080fd5b5050820193919092039150565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015612e7e5780818660040360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b604081528260408201528284606083013760006060848301015260007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501168201606081016020606085840301818601528186518084526080850191508288019450600093505b80841015612f3f5784518252938201936001939093019290820190612f1f565b5098975050505050505050565b600060208284031215612f5e57600080fd5b81518015158114612f6e57600080fd5b9392505050565b8183823760009101908152919050565b600060208284031215612f9757600080fd5b505191905056fea164736f6c634300080f000a" + +func init() { + if err := json.Unmarshal([]byte(SP1VerifierStorageLayoutJSON), SP1VerifierStorageLayout); err != nil { + panic(err) + } + + layouts["SP1Verifier"] = SP1VerifierStorageLayout + deployedBytecodes["SP1Verifier"] = SP1VerifierDeployedBin + immutableReferences["SP1Verifier"] = false +} From 01fbc028ed9cf36341843593b6c9d670bc52b998 Mon Sep 17 00:00:00 2001 From: sm-stack Date: Wed, 18 Dec 2024 19:48:13 +0900 Subject: [PATCH 2/8] test(e2e): add deploy functions for SP1 verifier and ZK Proof verifier --- op-e2e/e2eutils/setup.go | 66 ++++++++++++++++++++++++++++++++++++++++ op-e2e/setup.go | 41 ++++++++++++++++++++----- 2 files changed, 99 insertions(+), 8 deletions(-) diff --git a/op-e2e/e2eutils/setup.go b/op-e2e/e2eutils/setup.go index 70b4d496c..29cd2d905 100644 --- a/op-e2e/e2eutils/setup.go +++ b/op-e2e/e2eutils/setup.go @@ -379,4 +379,70 @@ func ReplaceWithMockColosseum( return } +// DeploySP1Verifier deploys a SP!VerifierPlonk contract which is used in ZKProofVerifier. +func DeploySP1Verifier( + l1Client *ethclient.Client, + sysCfgOwner *ecdsa.PrivateKey, + l1ChainID *big.Int, +) (address common.Address, deployTx *types.Transaction, err error) { + txOpts, err := bind.NewKeyedTransactorWithChainID(sysCfgOwner, l1ChainID) + if err != nil { + return + } + + // Deploy a SP1Verifier implementation + address, deployTx, _, err = bindings.DeploySP1Verifier( + txOpts, + l1Client, + ) + if err != nil { + return + } + + return +} + +// RedeployZKProofVerifier deploys a new ZKProofVerifier with given SP1Verifier and zkVmProgramKey. +func RedeployZKProofVerifier( + l1Client *ethclient.Client, + sysCfgOwner *ecdsa.PrivateKey, + l1ChainID *big.Int, + l1Deployments *genesis.L1Deployments, + deployConfig *genesis.DeployConfig, + sp1Verifier common.Address, + zkVmProgramKey [32]byte, +) (deployTx, upgradeTx *types.Transaction, err error) { + txOpts, err := bind.NewKeyedTransactorWithChainID(sysCfgOwner, l1ChainID) + if err != nil { + return + } + + // Deploy a ZKProofVerifier implementation + implAddr, deployTx, _, err := bindings.DeployZKProofVerifier( + txOpts, + l1Client, + l1Deployments.ZKVerifier, + deployConfig.ColosseumDummyHash, + new(big.Int).SetUint64(deployConfig.ColosseumMaxTxs), + l1Deployments.ZKMerkleTrie, + sp1Verifier, + zkVmProgramKey, + ) + if err != nil { + return + } + + // Upgrade ZKProofVerifierProxy to the deployed implementation address + proxyAdmin, err := bindings.NewProxyAdminTransactor(l1Deployments.ProxyAdmin, l1Client) + if err != nil { + return + } + upgradeTx, err = proxyAdmin.Upgrade(txOpts, l1Deployments.ZKProofVerifierProxy, implAddr) + if err != nil { + return + } + + return +} + // [Kroma: END] diff --git a/op-e2e/setup.go b/op-e2e/setup.go index 087b0d096..7b8ce821c 100644 --- a/op-e2e/setup.go +++ b/op-e2e/setup.go @@ -1075,6 +1075,32 @@ func startChallengeSystem(sys *System, cfg *SystemConfig) error { return fmt.Errorf("unable to replace Colosseum: %w", err) } + // Deploy SP1Verifier contract + sp1Verifier, deployTx, err := e2eutils.DeploySP1Verifier( + l1Client, + cfg.Secrets.SysCfgOwner, + cfg.L1ChainIDBig(), + ) + if err != nil { + return fmt.Errorf("unable to deploy SP1Verifier: %w", err) + } + + err = waitDeployAndUpgradeTxs(l1Client, deployTx.Hash()) + + // Deploy new ZKProofVerifier impl and upgrade ZKProofVerifier proxy + deployTx, upgradeTx, err = e2eutils.RedeployZKProofVerifier( + l1Client, + cfg.Secrets.SysCfgOwner, + cfg.L1ChainIDBig(), + cfg.L1Deployments, + cfg.DeployConfig, + sp1Verifier, + cfg.DeployConfig.ZKProofVerifierVKey, + ) + if err != nil { + return fmt.Errorf("unable to redeploy ZKProofVerifier: %w", err) + } + // Check deploy tx and upgrade tx submission were successful err = waitDeployAndUpgradeTxs(l1Client, deployTx.Hash(), upgradeTx.Hash()) if err != nil { @@ -1190,16 +1216,15 @@ func startChallengeSystem(sys *System, cfg *SystemConfig) error { return nil } -func waitDeployAndUpgradeTxs(client *ethclient.Client, deployTx, upgradeTx common.Hash) error { +func waitDeployAndUpgradeTxs(client *ethclient.Client, txs ...common.Hash) error { ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() - _, err := wait.ForReceiptOK(ctx, client, deployTx) - if err != nil { - return fmt.Errorf("failed to wait deploy tx success: %w", err) - } - _, err = wait.ForReceiptOK(ctx, client, upgradeTx) - if err != nil { - return fmt.Errorf("failed to wait upgrade tx success: %w", err) + + for _, tx := range txs { + _, err := wait.ForReceiptOK(ctx, client, tx) + if err != nil { + return fmt.Errorf("failed to wait deploy/upgrade tx success: %w", err) + } } return nil } From fbc4c03c488f9f315f823ad1b46f6ff32168e2f5 Mon Sep 17 00:00:00 2001 From: sm-stack Date: Thu, 19 Dec 2024 00:26:00 +0900 Subject: [PATCH 3/8] test(e2e): enable zkVM fault proof test --- op-e2e/e2eutils/mock_proof_fetcher.go | 2 +- op-e2e/system_test.go | 15 +++-- op-e2e/testdata/challenge_test_data.go | 59 ++++++------------- .../contracts/L1/ZKProofVerifier.sol | 6 +- 4 files changed, 33 insertions(+), 49 deletions(-) diff --git a/op-e2e/e2eutils/mock_proof_fetcher.go b/op-e2e/e2eutils/mock_proof_fetcher.go index 1e973d2b8..c89c6b609 100644 --- a/op-e2e/e2eutils/mock_proof_fetcher.go +++ b/op-e2e/e2eutils/mock_proof_fetcher.go @@ -77,7 +77,7 @@ func (m *MockRPC) getWitness() *chal.WitnessResponse { func (m *MockRPC) getProof() *chal.ZkVMProofResponse { return &chal.ZkVMProofResponse{ VKeyHash: testdata.ZkVMVKeyHash, - PublicValues: testdata.ZkVMPublicVaules, + PublicValues: testdata.ZkVMPublicValues, Proof: testdata.ZkVMProof, } } diff --git a/op-e2e/system_test.go b/op-e2e/system_test.go index fa525677f..27d7c6ef5 100644 --- a/op-e2e/system_test.go +++ b/op-e2e/system_test.go @@ -2115,20 +2115,23 @@ func TestChallengerTimeoutByGuardian(t *testing.T) { } func TestZkVMChallenge(t *testing.T) { - t.Skip("Temporarily skip, enable when test data added") // TODO(seolaoh) InitParallel(t) - cfg := DefaultSystemConfig(t) genesisBlock := hexutil.Uint64(0) - mptTimeOffset := hexutil.Uint64(2) + ecotoneTimeOffset := hexutil.Uint64(2) + mptTimeOffset := hexutil.Uint64(16) + + cfg := DefaultSystemConfig(t) + cfg.SetupMPTMigration = true cfg.DeployConfig.L2GenesisDeltaTimeOffset = &genesisBlock - cfg.DeployConfig.L2GenesisEcotoneTimeOffset = &genesisBlock + cfg.DeployConfig.L2GenesisEcotoneTimeOffset = &ecotoneTimeOffset cfg.DeployConfig.L2GenesisKromaMPTTimeOffset = &mptTimeOffset cfg.DeployConfig.L1BlockTime = 3 cfg.DeployConfig.L2BlockTime = 2 // same config with L2OutputOracle cfg.EnableChallenge = true cfg.ChallengeProofType = testdata.ZkVMType cfg.NonFinalizedOutputs = true // speed up the time till we see checkpoint outputs + cfg.ValidatorVersion = valhelper.ValidatorV2 sys, err := cfg.Start(t) require.NoError(t, err, "Error starting up system") @@ -2140,6 +2143,10 @@ func TestZkVMChallenge(t *testing.T) { // Deposit to ValidatorPool to be a challenger validatorHelper.DepositToValPool(cfg.Secrets.Challenger1, big.NewInt(1_000_000_000)) + // Register to ValidatorManager to be a challenger + validatorHelper.RegisterToValMgr(cfg.Secrets.Challenger1, + cfg.DeployConfig.ValidatorManagerMinActivateAmount.ToInt(), cfg.Secrets.Addresses().Challenger1) + l2OutputOracle, err := bindings.NewL2OutputOracleCaller(cfg.L1Deployments.L2OutputOracleProxy, l1Client) require.NoError(t, err) diff --git a/op-e2e/testdata/challenge_test_data.go b/op-e2e/testdata/challenge_test_data.go index 70fec7f88..ca8954451 100644 --- a/op-e2e/testdata/challenge_test_data.go +++ b/op-e2e/testdata/challenge_test_data.go @@ -4,7 +4,6 @@ import ( "fmt" "math/big" - opbindings "github.com/ethereum-optimism/optimism/op-bindings/bindings" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum/go-ethereum/common" @@ -38,22 +37,18 @@ func ValidProofType(value ProofType) bool { var ( TargetBlockNumber = uint64(21) + EmptyHash = common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000") // for zkVM challenge - ZkVMVKeyHash = common.HexToHash("0x6c15e3bb696329c15f6b963e40ac4c3841e726ef6fcaea042daf4b3d056e8d2f") + ZkVMVKeyHash = common.HexToHash("0x00ad7cc293beb89796e8a9713ab7189b33faf6975325da0707d2d9cb129db055") + ZkVMProof = hexutil.MustDecode("0x54bdcae3256eaae3a90569ad01460800c08e2e06c3855ced450de49dd34e32854eb67a8816b72b8294ea24733d2b47253edf6796321dc105f65d4509ee27dcdf849c453327152d4769901e03502fb829cfb6712c6f6e1088feb007a2cea4d8ae37a055671a40948624b98a91069134ea8ea6226e2f6a1457abec73c7d54c3f84eae953650fff44bd6eb127f188b42cf0b4552d9332ab154323b704fce64a396882f54dab173beedccb24459be8ba08df8b8682b90bed088ca80581e6280ab0299e26a5440c0dea757e11484d1bfb9cc54cb5b999b3d9b82ac4106ad0beb705d2a40467061ec853e02449daa488a94aae8c9d1147065857a08c80ced9a04decd9d5f96d64001c6675f4f317af95829e40e3274101e9baa1e539111a0654c3628da41cc4610dd0dde84ff63c37fd213cb6ae5a86e22c0a088249aa3752ee4beb023777e02802629c8c5bfb2197357eb1566a77f4169177c826ba62d784693318795cea293e048bebd2ac5e88b24ff21e8547a3edf369173a0c3106ee2fef2d807103f9a1c91d7ef6307a47781f8ec796db6f3e1e6256b14aefb0be95d15818eaea4fa6b8ab2b2605cc47f8010abd47fabc7be65ea31096f26cbdc6ac2fd7fd8af7be18fa9e0a3500fb95305139353357d88322ec0d64026fe5a9b5c5f8a124de743207eb2a1dcf72d0168eae8a898ce3fec30a266d95ab8a8359547e7c56894f89f940d90e097cfe99058f651935fbe199211af862819d46cbb1722643447f9e5100714ddf2c3805f779b66f864138e7596ec5a224816bb75cb6a269387cb10bf269229d301fff5a2f5ef5191d95b89be192e5295bb20eb7f2b81bb48513cc2e1f389686da0eb207a4d13446c0b1482f1b1d1ff61fde440f4d194b2f1b9a4ea1bc2c394bc72be7e54c5ff0fff46f22939d5bb4f5e8e12683cbf26915f030efa53541e61583081eef0c4eef42367c3f341f6283fe706def1fd0b918c440144a12cb30fea3620db53fda424496de0e44526cb992e2071e8a4d7c3c427dfe45a1ad2ed61fac6b1d353e45fb0bb3371366931164f97d439a05a188e38673f2c9aba54e4677272c085ab877f90baf7e56a92c2ab2447d75b662fc04cccf3f9716dfaf575662e2a003d77395c3c8a90706526d8ed1dbfde71dde5739670a8bf30fecc98f6b2929fa1876db545698cfc3233f1101212ebe78c6db2460071fcce10504c35ff472738e") + ZkVMPublicValues = hexutil.MustDecode("0x20000000000000008906045a3f098db0d7a5f7d9400e1299718fc9563b30417e887cf0c91a375fea200000000000000053ae7b0c4ef070efb9bec7ae130edce19797b2283f020e085a69796ad43b6c512000000000000000c5f36b4618de22a58113263406f398342a7624d832fda0ccd05ab61b0ceb5352") ZkVMWitness = "0x" - ZkVMProof = []byte("0x097da0323fa72c64d59682d6991bab9a50c996336d5fd070f0d56ef3ecb9a5d00d489a87499d9b0026b1fecda38a6edd41d290ffd053a1abb0747b0dbb5b66ff1d35d77f6bcf425a06872e78d8c544966b577e1cbd63975a8d371766ec0b642b279a6d15b4d7b8dd3b47da0f02122e475d6b6a8f97422d56f18acc2184f245e50eae81146701d25724a5c2b9baf82ae93ca264d11c4a481dba73886b01c642932557ed9e6845c6e16562ba4521add47de2c5aa811502c73e8735c874c4db4ba90df225349e121ce92fe27aebb8e236ff905b9911df6f67b52c82a34fe8933c9b053cb8567250f35115a32ae989650483221ce6a4490f092f9543f30a89f065c3116de44ce1a7ca5f947b2557373d893c6989c7b5c2bc42be86f8b059dc6a5fa106bd0c0abd63686b42f3706a366f270767b050e1ba3ec5a454b520023fd40cd60fe55fe86edeea81ff5b7d32347b9c086e969db21bc20c635ca3f6462b52d65f0fc8f4b067b8d4ec08fc2bbf1c23bf0160488d3a828b73acf294b4d42cc1cf4112ca129ba4dca38719090f2be26e2af92380b3ddb339a50fd42fb66e9296c7471ee0f694e35863ed363a77c1ca0e0b3fe1c57f566d36542cb2ef47d3b1eb3daf25ebed15fd6a0adaaf2f37c105b5298d9113d5b2ba641d82bfad0ec4cac0827b1a2c814d228825f742cd68bcec14d229025f551a812af3657b69ecae33f360d00000000728afb9bcba40e0fbc85d775ae7ea50aff5f22ee0e77b7655e732e7a2ee068e1d1c3e5dd8edaa6fc4cd247b4589c8b94c3dac94e2f7a72888ca531087666a4b702eaae316ed0d4df9b072fe8c7392814a25eea4b2c4922d51fb0a6cf64d64968e1e25234f6c4639dbdd3d760ee52c7af731ca9faa84edff95112c335e02a4212d26b444f87cd3f4f831496168d34df8f467ba62b9593672ae25edfeb08b366c24192e1dc95648187b63d52615c37bb108358c6c49ce51bf3e2b77bb15b72efbb6283e36d4e0b3a80f18281201ab420a5a81efc7af8e3cdfb64c693b2ddedb94a21a7462dc9ec33d761306721c1f8d5e8f4b517724a01673bba4853d54591c6d8213b2d1456728311ec65f4f13f40c383f8e72f7890954051eccd05bc3c1fe44e6224c2e29bda437a135eba9ed261aa9a09ccb612dcf5c87dad3e60b3cdbb118d9000000011ae99cd49723c91c7c9001f4256a2c378b1896d5bdfb32f08ce2b329a5587ef720d4ab2bb8e82786d89e196bfe3043c9ffd38e1c622e3d41061c3ad7347dece5") - ZkVMPublicVaules = []byte("0x2000000000000000ee40a952b20e40f8911e64179baf6afe0cac0e6226f18719560efa55ee51e701200000000000000048f9fe8c248855f9da9e8f6e06f3215f57a6a96f684b5fc63232b565bdb98479200000000000000042c0d60066fbd229758f8deaee337afc6cd0a75ddf120896258a4fd846aafbfd") - zkVMPrevBlockhash = common.HexToHash("0x") - zkVMPrevStateRoot = common.HexToHash("0x") - zkVMPrevWithdrawalStorageRoot = common.HexToHash("0x") + zkVMPrevOutput = common.HexToHash("0x8906045a3f098db0d7a5f7d9400e1299718fc9563b30417e887cf0c91a375fea") + zkVMTargetOutput = common.HexToHash("0x53ae7b0c4ef070efb9bec7ae130edce19797b2283f020e085a69796ad43b6c51") - zkVMTargetBlockhash = common.HexToHash("0x") - zkVMTargetStateRoot = common.HexToHash("0x") - zkVMTargetWithdrawalStorageRoot = common.HexToHash("0x") - - ChallengeL1Head = common.HexToHash("0x") + ChallengeL1Head = common.HexToHash("0xc5f36b4618de22a58113263406f398342a7624d832fda0ccd05ab61b0ceb5352") // for zkEVM challenge coinbaseAddr = common.HexToAddress("0x0000000000000000000000000000000000000000") @@ -91,22 +86,13 @@ var ( func SetPrevOutputResponse(o *eth.OutputResponse, proofType ProofType) error { switch proofType { case ZkVMType: - outputRoot, err := rollup.ComputeL2OutputRoot(&opbindings.TypesOutputRootProof{ - Version: eth.OutputVersionV0, - StateRoot: zkVMPrevStateRoot, - MessagePasserStorageRoot: zkVMPrevWithdrawalStorageRoot, - LatestBlockhash: zkVMTargetBlockhash, - }) - if err != nil { - return fmt.Errorf("mocking error: %w", err) - } - - o.OutputRoot = outputRoot - o.WithdrawalStorageRoot = zkVMPrevWithdrawalStorageRoot - o.StateRoot = zkVMPrevStateRoot + o.OutputRoot = eth.Bytes32(zkVMPrevOutput) + // Other values than output root won't be used in zkVM challenge, so we can set them to empty hash + o.WithdrawalStorageRoot = EmptyHash + o.StateRoot = EmptyHash o.BlockRef = eth.L2BlockRef{ Number: TargetBlockNumber - 1, - Hash: zkVMPrevBlockhash, + Hash: EmptyHash, ParentHash: common.HexToHash("0x"), } case ZkEVMType: @@ -187,23 +173,14 @@ func SetPrevOutputWithProofResponse(o *eth.OutputWithProofResponse) error { func SetTargetOutputResponse(o *eth.OutputResponse, proofType ProofType) error { switch proofType { case ZkVMType: - outputRoot, err := rollup.ComputeL2OutputRoot(&opbindings.TypesOutputRootProof{ - Version: eth.OutputVersionV0, - StateRoot: zkVMTargetStateRoot, - MessagePasserStorageRoot: zkVMTargetWithdrawalStorageRoot, - LatestBlockhash: zkVMTargetBlockhash, - }) - if err != nil { - return fmt.Errorf("mocking error: %w", err) - } - - o.OutputRoot = outputRoot - o.WithdrawalStorageRoot = zkVMTargetWithdrawalStorageRoot - o.StateRoot = zkVMTargetStateRoot + o.OutputRoot = eth.Bytes32(zkVMTargetOutput) + // Other values than output root won't be used in zkVM challenge, so we can set them to empty hash + o.WithdrawalStorageRoot = EmptyHash + o.StateRoot = EmptyHash o.BlockRef = eth.L2BlockRef{ Number: TargetBlockNumber, - Hash: zkVMTargetBlockhash, - ParentHash: zkVMPrevBlockhash, + Hash: EmptyHash, + ParentHash: EmptyHash, } case ZkEVMType: nextBlockhash := common.HexToHash("0x6c4e19b1fc27f6a075c67f35bd15b21c40025a892e32cdb8d9b5f5d5ec60093a") diff --git a/packages/contracts/contracts/L1/ZKProofVerifier.sol b/packages/contracts/contracts/L1/ZKProofVerifier.sol index 7789a62b0..42596270b 100644 --- a/packages/contracts/contracts/L1/ZKProofVerifier.sol +++ b/packages/contracts/contracts/L1/ZKProofVerifier.sol @@ -200,11 +200,11 @@ contract ZKProofVerifier is ISemver { _validatePublicInputOutput( _storedSrcOutput, _storedDstOutput, - bytes32(_zkVmProof.publicValues[:32]), - bytes32(_zkVmProof.publicValues[32:64]) + bytes32(_zkVmProof.publicValues[8:40]), + bytes32(_zkVmProof.publicValues[48:80]) ); - if (bytes32(_zkVmProof.publicValues[64:96]) != _storedL1Head) revert InvalidPublicInput(); + if (bytes32(_zkVmProof.publicValues[88:120]) != _storedL1Head) revert InvalidPublicInput(); SP1_VERIFIER.verifyProof( ZKVM_PROGRAM_V_KEY, From a02dd62c70d18e84fc7942e1e45aa534947ac286 Mon Sep 17 00:00:00 2001 From: sm-stack Date: Thu, 19 Dec 2024 00:26:23 +0900 Subject: [PATCH 4/8] chore: update bindings and devnetL1 template --- kroma-bindings/bindings/zkproofverifier.go | 2 +- kroma-bindings/bindings/zkproofverifier_more.go | 3 +-- packages/contracts/deploy-config/devnetL1-template.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kroma-bindings/bindings/zkproofverifier.go b/kroma-bindings/bindings/zkproofverifier.go index 7fcff3220..7737c1473 100644 --- a/kroma-bindings/bindings/zkproofverifier.go +++ b/kroma-bindings/bindings/zkproofverifier.go @@ -32,7 +32,7 @@ var ( // ZKProofVerifierMetaData contains all meta data concerning the ZKProofVerifier contract. var ZKProofVerifierMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_zkVerifier\",\"type\":\"address\",\"internalType\":\"contractZKVerifier\"},{\"name\":\"_dummyHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_maxTxs\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_zkMerkleTrie\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_sp1Verifier\",\"type\":\"address\",\"internalType\":\"contractISP1Verifier\"},{\"name\":\"_zkVmProgramVKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"dummyHash\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"maxTxs\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"sp1Verifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISP1Verifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyZkEvmProof\",\"inputs\":[{\"name\":\"_zkEvmProof\",\"type\":\"tuple\",\"internalType\":\"structTypes.ZkEvmProof\",\"components\":[{\"name\":\"publicInputProof\",\"type\":\"tuple\",\"internalType\":\"structTypes.PublicInputProof\",\"components\":[{\"name\":\"srcOutputRootProof\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputRootProof\",\"components\":[{\"name\":\"version\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"messagePasserStorageRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"latestBlockhash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextBlockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"dstOutputRootProof\",\"type\":\"tuple\",\"internalType\":\"structTypes.OutputRootProof\",\"components\":[{\"name\":\"version\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"messagePasserStorageRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"latestBlockhash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextBlockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"publicInput\",\"type\":\"tuple\",\"internalType\":\"structTypes.PublicInput\",\"components\":[{\"name\":\"blockHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"parentHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"number\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"gasLimit\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"baseFee\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"transactionsRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"stateRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"withdrawalsRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"txHashes\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"blobGasUsed\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"excessBlobGas\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"parentBeaconRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"rlps\",\"type\":\"tuple\",\"internalType\":\"structTypes.BlockHeaderRLP\",\"components\":[{\"name\":\"uncleHash\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"coinbase\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"receiptsRoot\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"logsBloom\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"difficulty\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"gasUsed\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"extraData\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"mixHash\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"nonce\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"l2ToL1MessagePasserBalance\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"l2ToL1MessagePasserCodeHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"merkleProof\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}]},{\"name\":\"proof\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"},{\"name\":\"pair\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}]},{\"name\":\"_storedSrcOutput\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_storedDstOutput\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"publicInputHash_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyZkVmProof\",\"inputs\":[{\"name\":\"_zkVmProof\",\"type\":\"tuple\",\"internalType\":\"structTypes.ZkVmProof\",\"components\":[{\"name\":\"zkVmProgramVKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"_storedSrcOutput\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_storedDstOutput\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_storedL1Head\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"publicInputHash_\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"version\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zkMerkleTrie\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zkVerifier\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractZKVerifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zkVmProgramVKey\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"error\",\"name\":\"BlockHashMismatched\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BlockHashMismatchedBtwSrcAndDst\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"DstOutputMatched\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInclusionProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidPublicInput\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidZkProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidZkVmVKey\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SrcOutputMismatched\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"StateRootMismatched\",\"inputs\":[]}]", - Bin: "0x6101406040523480156200001257600080fd5b50604051620023bf380380620023bf83398101604081905262000035916200007e565b6001600160a01b0395861660805260a09490945260c092909252831660e0529091166101005261012052620000ef565b6001600160a01b03811681146200007b57600080fd5b50565b60008060008060008060c087890312156200009857600080fd5b8651620000a58162000065565b8096505060208701519450604087015193506060870151620000c78162000065565b6080880151909350620000da8162000065565b8092505060a087015190509295509295509295565b60805160a05160c05160e051610100516101205161224a620001756000396000818160aa0152818161041f015261055f01526000818160f2015261053801526000818161018201526108530152600081816101a80152818161094b01526109b90152600081816101e10152610985015260008181610207015261033a015261224a6000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80635747274b116100765780639a7ec1361161005b5780639a7ec136146101cc5780639aea2572146101df578063d6df096d1461020557600080fd5b80635747274b14610180578063816bf26d146101a657600080fd5b8063222ce122146100a85780633955d7a1146100dd57806352a07fa3146100f057806354fd4d5014610137575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040519081526020015b60405180910390f35b6100ca6100eb366004611504565b61022b565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d4565b6101736040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516100d491906115c8565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b6100ca6101da3660046115e2565b610419565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b6000366102388580611636565b905060808101356101008201351461027c576040517f3f126fab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102b2848461029861029336869003860186611740565b610616565b6102ad61029336879003870160a08801611740565b6106b8565b6102da60a082016102c76101408401846117b0565b6102d56101608501856117e4565b610736565b6103066102eb6101c0830183611818565b6101808401356101a085013560e086013560c08701356107fb565b610321602082013561031c6101408401846117b0565b610945565b915073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016634292dc3e61036c6020880188611818565b61037960408a018a611818565b876040518663ffffffff1660e01b815260040161039a9594939291906118d6565b602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190611910565b610411576040517fe1ac453100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509392505050565b600084357f000000000000000000000000000000000000000000000000000000000000000014610475576040517f2166766900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104c484846104876020890189611932565b61049691602091600091611997565b61049f916119c1565b6104ac60208a018a611932565b6104bb91604091602091611997565b6102ad916119c1565b816104d26020870187611932565b6104e191606091604091611997565b6104ea916119c1565b14610521576040517f7458ca2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166341493c607f000000000000000000000000000000000000000000000000000000000000000061058b6020890189611932565b61059860408b018b611932565b6040518663ffffffff1660e01b81526004016105b8959493929190611a28565b60006040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b506105f6925050506020860186611932565b604051610604929190611a61565b60405180910390209050949350505050565b60808101516000906106785781516020808401516040808601516060870151915161065b95949192910193845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b81516020808401516040808601516060808801516080808a01518551978801989098529386019490945284015282015260a081019190915260c00161065b565b8184146106f1576040517f8b10302800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821561073057808303610730576040517f4e15341500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b82602001358260e0013514610777576040517f4d9e774000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101808301356107a25761079d61078f84611b09565b61079884611c81565b610a02565b6107bc565b6107bc6107ae84611b09565b6107b784611c81565b610aa6565b905080846060013514610730576040517fb033950600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051600060208201528082018690526060810185905260808082018590528251808303909101815260a08201928390527f12e64a72000000000000000000000000000000000000000000000000000000009092527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906312e64a72906108c5907f42000000000000000000000000000000000000030000000000000000000000009085908c908c90899060a401611df7565b602060405180830381865afa1580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109069190611910565b61093c576040517ff35959c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b600060607f0000000000000000000000000000000000000000000000000000000000000000610978610120850185611818565b905010156109e5576109e27f00000000000000000000000000000000000000000000000000000000000000006109b2610120860186611818565b6109dd91507f0000000000000000000000000000000000000000000000000000000000000000611f1f565b610bb7565b90505b6109f8846109f285611b09565b83610c3b565b9150505b92915050565b6040805160118082526102408201909252600091829190816020015b6060815260200190600190039081610a1e579050509050610a40848483610cad565b610a6f846101000151604051602001610a5b91815260200190565b604051602081830303815290604052610f60565b81601081518110610a8257610a82611f36565b6020026020010181905250610a9681610fcb565b8051906020012091505092915050565b6040805160148082526102a08201909252600091829190816020015b6060815260200190600190039081610ac2579050509050610ae4848483610cad565b610aff846101000151604051602001610a5b91815260200190565b81601081518110610b1257610b12611f36565b6020026020010181905250610b3584610140015167ffffffffffffffff16610ff6565b81601181518110610b4857610b48611f36565b6020026020010181905250610b6b84610160015167ffffffffffffffff16610ff6565b81601281518110610b7e57610b7e611f36565b6020026020010181905250610ba4846101800151604051602001610a5b91815260200190565b81601381518110610a8257610a82611f36565b606060008267ffffffffffffffff811115610bd457610bd4611674565b604051908082528060200260200182016040528015610bfd578160200160208202803683370190505b50905060005b838110156104115784828281518110610c1e57610c1e611f36565b602090810291909101015280610c3381611f65565b915050610c03565b6000838360e001516000801b85600001518660200151876060015188604001518960a001518a608001518b6101200151518c61012001518c604051602001610c8e9c9b9a99989796959493929190611fb2565b6040516020818303038152906040528051906020012090509392505050565b610cc78360200151604051602001610a5b91815260200190565b81600081518110610cda57610cda611f36565b6020026020010181905250816000015181600181518110610cfd57610cfd611f36565b6020026020010181905250816020015181600281518110610d2057610d20611f36565b6020026020010181905250610d458360e00151604051602001610a5b91815260200190565b81600381518110610d5857610d58611f36565b6020026020010181905250610d7d8360c00151604051602001610a5b91815260200190565b81600481518110610d9057610d90611f36565b6020026020010181905250816040015181600581518110610db357610db3611f36565b6020026020010181905250816060015181600681518110610dd657610dd6611f36565b6020026020010181905250816080015181600781518110610df957610df9611f36565b6020026020010181905250610e1b836060015167ffffffffffffffff16610ff6565b81600881518110610e2e57610e2e611f36565b6020026020010181905250610e50836080015167ffffffffffffffff16610ff6565b81600981518110610e6357610e63611f36565b60200260200101819052508160a0015181600a81518110610e8657610e86611f36565b6020026020010181905250610ea8836040015167ffffffffffffffff16610ff6565b81600b81518110610ebb57610ebb611f36565b60200260200101819052508160c0015181600c81518110610ede57610ede611f36565b60200260200101819052508160e0015181600d81518110610f0157610f01611f36565b602002602001018190525081610100015181600e81518110610f2557610f25611f36565b6020026020010181905250610f3d8360a00151610ff6565b81600f81518110610f5057610f50611f36565b6020026020010181905250505050565b606081516001148015610f8d5750608082600081518110610f8357610f83611f36565b016020015160f81c105b15610f96575090565b610fa282516080611009565b82604051602001610fb492919061206b565b60405160208183030381529060405290505b919050565b6060610fd6826111fd565b9050610fe4815160c0611009565b81604051602001610fb492919061206b565b60606109fc61100483611332565b610f60565b60606038831015611087576040805160018082528183019092529060208201818036833701905050905061103d828461209a565b60f81b8160008151811061105357611053611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506109fc565b600060015b61109681866120ee565b156110bc57816110a581611f65565b92506110b5905061010082612102565b905061108c565b6110c7826001612121565b67ffffffffffffffff8111156110df576110df611674565b6040519080825280601f01601f191660200182016040528015611109576020820181803683370190505b509250611116848361209a565b61112190603761209a565b60f81b8360008151811061113757611137611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190505b8181116111f55761010061117f8284611f1f565b61118b9061010061221d565b61119590876120ee565b61119f9190612229565b60f81b8382815181106111b4576111b4611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806111ed81611f65565b91505061116b565b505092915050565b6060815160000361121c57505060408051600081526020810190915290565b6000805b83518110156112635783818151811061123b5761123b611f36565b6020026020010151518261124f9190612121565b91508061125b81611f65565b915050611220565b8167ffffffffffffffff81111561127c5761127c611674565b6040519080825280601f01601f1916602001820160405280156112a6576020820181803683370190505b50925060009050602083015b845182101561132a5760008583815181106112cf576112cf611f36565b6020026020010151905060006020820190506112ed8382845161148f565b8684815181106112ff576112ff611f36565b602002602001015151836113139190612121565b92505050818061132290611f65565b9250506112b2565b505050919050565b606060008260405160200161134991815260200190565b604051602081830303815290604052905060005b60208110156113b85781818151811061137857611378611f36565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036113b857806113b081611f65565b91505061135d565b6113c3816020611f1f565b67ffffffffffffffff8111156113db576113db611674565b6040519080825280601f01601f191660200182016040528015611405576020820181803683370190505b50925060005b835181101561132a57828261141f81611f65565b93508151811061143157611431611f36565b602001015160f81c60f81b84828151811061144e5761144e611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061148781611f65565b91505061140b565b8282825b602081106114cb57815183526114aa602084612121565b92506114b7602083612121565b91506114c4602082611f1f565b9050611493565b905182516020929092036101000a6000190180199091169116179052505050565b6000606082840312156114fe57600080fd5b50919050565b60008060006060848603121561151957600080fd5b833567ffffffffffffffff81111561153057600080fd5b61153c868287016114ec565b9660208601359650604090950135949350505050565b60005b8381101561156d578181015183820152602001611555565b838111156107305750506000910152565b60008151808452611596816020860160208601611552565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006115db602083018461157e565b9392505050565b600080600080608085870312156115f857600080fd5b843567ffffffffffffffff81111561160f57600080fd5b61161b878288016114ec565b97602087013597506040870135966060013595509350505050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2183360301811261166a57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101a0810167ffffffffffffffff811182821017156116c7576116c7611674565b60405290565b604051610120810167ffffffffffffffff811182821017156116c7576116c7611674565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561173857611738611674565b604052919050565b600060a0828403121561175257600080fd5b60405160a0810181811067ffffffffffffffff8211171561177557611775611674565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6183360301811261166a57600080fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261166a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261184d57600080fd5b83018035915067ffffffffffffffff82111561186857600080fd5b6020019150600581901b360382131561188057600080fd5b9250929050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156118b957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6060815260006118ea606083018789611887565b82810360208401526118fd818688611887565b9150508260408301529695505050505050565b60006020828403121561192257600080fd5b815180151581146115db57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261196757600080fd5b83018035915067ffffffffffffffff82111561198257600080fd5b60200191503681900382131561188057600080fd5b600080858511156119a757600080fd5b838611156119b457600080fd5b5050820193919092039150565b803560208310156109fc57600019602084900360031b1b1692915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b858152606060208201526000611a426060830186886119df565b8281036040840152611a558185876119df565b98975050505050505050565b8183823760009101908152919050565b803567ffffffffffffffff81168114610fc657600080fd5b600082601f830112611a9a57600080fd5b8135602067ffffffffffffffff821115611ab657611ab6611674565b8160051b611ac58282016116f1565b9283528481018201928281019087851115611adf57600080fd5b83870192505b84831015611afe57823582529183019190830190611ae5565b979650505050505050565b60006101a08236031215611b1c57600080fd5b611b246116a3565b8235815260208301356020820152611b3e60408401611a71565b6040820152611b4f60608401611a71565b6060820152611b6060808401611a71565b608082015260a083013560a082015260c083013560c082015260e083013560e08201526101008084013581830152506101208084013567ffffffffffffffff811115611bab57600080fd5b611bb736828701611a89565b828401525050610140611bcb818501611a71565b90820152610160611bdd848201611a71565b9082015261018092830135928101929092525090565b600082601f830112611c0457600080fd5b813567ffffffffffffffff811115611c1e57611c1e611674565b611c4f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016116f1565b818152846020838601011115611c6457600080fd5b816020850160208301376000918101602001919091529392505050565b60006101208236031215611c9457600080fd5b611c9c6116cd565b823567ffffffffffffffff80821115611cb457600080fd5b611cc036838701611bf3565b83526020850135915080821115611cd657600080fd5b611ce236838701611bf3565b60208401526040850135915080821115611cfb57600080fd5b611d0736838701611bf3565b60408401526060850135915080821115611d2057600080fd5b611d2c36838701611bf3565b60608401526080850135915080821115611d4557600080fd5b611d5136838701611bf3565b608084015260a0850135915080821115611d6a57600080fd5b611d7636838701611bf3565b60a084015260c0850135915080821115611d8f57600080fd5b611d9b36838701611bf3565b60c084015260e0850135915080821115611db457600080fd5b611dc036838701611bf3565b60e084015261010091508185013581811115611ddb57600080fd5b611de736828801611bf3565b8385015250505080915050919050565b85815260006020608081840152611e11608084018861157e565b8381036040850152858152818101600587901b820183018860005b89811015611ed7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085840301845281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c3603018112611e8d57600080fd5b8b01868101903567ffffffffffffffff811115611ea957600080fd5b803603821315611eb857600080fd5b611ec38582846119df565b958801959450505090850190600101611e2c565b5050809450505050508260608301529695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611f3157611f31611ef0565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006000198203611f7857611f78611ef0565b5060010190565b60008151602080840160005b83811015611fa757815187529582019590820190600101611f8b565b509495945050505050565b8c81528b60208201528a604082015289606082015288608082015260007fffffffffffffffff000000000000000000000000000000000000000000000000808a60c01b1660a0840152808960c01b1660a88401528760b0840152808760c01b1660d0840152507fffff0000000000000000000000000000000000000000000000000000000000008560f01b1660d883015261205961205360da840186611f7f565b84611f7f565b9e9d5050505050505050505050505050565b6000835161207d818460208801611552565b835190830190612091818360208801611552565b01949350505050565b600060ff821660ff84168060ff038211156120b7576120b7611ef0565b019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826120fd576120fd6120bf565b500490565b600081600019048311821515161561211c5761211c611ef0565b500290565b6000821982111561213457612134611ef0565b500190565b600181815b8085111561217457816000190482111561215a5761215a611ef0565b8085161561216757918102915b93841c939080029061213e565b509250929050565b60008261218b575060016109fc565b81612198575060006109fc565b81600181146121ae57600281146121b8576121d4565b60019150506109fc565b60ff8411156121c9576121c9611ef0565b50506001821b6109fc565b5060208310610133831016604e8410600b84101617156121f7575081810a6109fc565b6122018383612139565b806000190482111561221557612215611ef0565b029392505050565b60006115db838361217c565b600082612238576122386120bf565b50069056fea164736f6c634300080f000a", + Bin: "0x6101406040523480156200001257600080fd5b50604051620023bf380380620023bf83398101604081905262000035916200007e565b6001600160a01b0395861660805260a09490945260c092909252831660e0529091166101005261012052620000ef565b6001600160a01b03811681146200007b57600080fd5b50565b60008060008060008060c087890312156200009857600080fd5b8651620000a58162000065565b8096505060208701519450604087015193506060870151620000c78162000065565b6080880151909350620000da8162000065565b8092505060a087015190509295509295509295565b60805160a05160c05160e051610100516101205161224a620001756000396000818160aa0152818161041f015261055f01526000818160f2015261053801526000818161018201526108530152600081816101a80152818161094b01526109b90152600081816101e10152610985015260008181610207015261033a015261224a6000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80635747274b116100765780639a7ec1361161005b5780639a7ec136146101cc5780639aea2572146101df578063d6df096d1461020557600080fd5b80635747274b14610180578063816bf26d146101a657600080fd5b8063222ce122146100a85780633955d7a1146100dd57806352a07fa3146100f057806354fd4d5014610137575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040519081526020015b60405180910390f35b6100ca6100eb366004611504565b61022b565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d4565b6101736040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516100d491906115c8565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b6100ca6101da3660046115e2565b610419565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b6000366102388580611636565b905060808101356101008201351461027c576040517f3f126fab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102b2848461029861029336869003860186611740565b610616565b6102ad61029336879003870160a08801611740565b6106b8565b6102da60a082016102c76101408401846117b0565b6102d56101608501856117e4565b610736565b6103066102eb6101c0830183611818565b6101808401356101a085013560e086013560c08701356107fb565b610321602082013561031c6101408401846117b0565b610945565b915073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016634292dc3e61036c6020880188611818565b61037960408a018a611818565b876040518663ffffffff1660e01b815260040161039a9594939291906118d6565b602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190611910565b610411576040517fe1ac453100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509392505050565b600084357f000000000000000000000000000000000000000000000000000000000000000014610475576040517f2166766900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104c484846104876020890189611932565b61049691602891600891611997565b61049f916119c1565b6104ac60208a018a611932565b6104bb91605091603091611997565b6102ad916119c1565b816104d26020870187611932565b6104e191607891605891611997565b6104ea916119c1565b14610521576040517f7458ca2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166341493c607f000000000000000000000000000000000000000000000000000000000000000061058b6020890189611932565b61059860408b018b611932565b6040518663ffffffff1660e01b81526004016105b8959493929190611a28565b60006040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b506105f6925050506020860186611932565b604051610604929190611a61565b60405180910390209050949350505050565b60808101516000906106785781516020808401516040808601516060870151915161065b95949192910193845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b81516020808401516040808601516060808801516080808a01518551978801989098529386019490945284015282015260a081019190915260c00161065b565b8184146106f1576040517f8b10302800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821561073057808303610730576040517f4e15341500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b82602001358260e0013514610777576040517f4d9e774000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101808301356107a25761079d61078f84611b09565b61079884611c81565b610a02565b6107bc565b6107bc6107ae84611b09565b6107b784611c81565b610aa6565b905080846060013514610730576040517fb033950600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051600060208201528082018690526060810185905260808082018590528251808303909101815260a08201928390527f12e64a72000000000000000000000000000000000000000000000000000000009092527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906312e64a72906108c5907f42000000000000000000000000000000000000030000000000000000000000009085908c908c90899060a401611df7565b602060405180830381865afa1580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109069190611910565b61093c576040517ff35959c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b600060607f0000000000000000000000000000000000000000000000000000000000000000610978610120850185611818565b905010156109e5576109e27f00000000000000000000000000000000000000000000000000000000000000006109b2610120860186611818565b6109dd91507f0000000000000000000000000000000000000000000000000000000000000000611f1f565b610bb7565b90505b6109f8846109f285611b09565b83610c3b565b9150505b92915050565b6040805160118082526102408201909252600091829190816020015b6060815260200190600190039081610a1e579050509050610a40848483610cad565b610a6f846101000151604051602001610a5b91815260200190565b604051602081830303815290604052610f60565b81601081518110610a8257610a82611f36565b6020026020010181905250610a9681610fcb565b8051906020012091505092915050565b6040805160148082526102a08201909252600091829190816020015b6060815260200190600190039081610ac2579050509050610ae4848483610cad565b610aff846101000151604051602001610a5b91815260200190565b81601081518110610b1257610b12611f36565b6020026020010181905250610b3584610140015167ffffffffffffffff16610ff6565b81601181518110610b4857610b48611f36565b6020026020010181905250610b6b84610160015167ffffffffffffffff16610ff6565b81601281518110610b7e57610b7e611f36565b6020026020010181905250610ba4846101800151604051602001610a5b91815260200190565b81601381518110610a8257610a82611f36565b606060008267ffffffffffffffff811115610bd457610bd4611674565b604051908082528060200260200182016040528015610bfd578160200160208202803683370190505b50905060005b838110156104115784828281518110610c1e57610c1e611f36565b602090810291909101015280610c3381611f65565b915050610c03565b6000838360e001516000801b85600001518660200151876060015188604001518960a001518a608001518b6101200151518c61012001518c604051602001610c8e9c9b9a99989796959493929190611fb2565b6040516020818303038152906040528051906020012090509392505050565b610cc78360200151604051602001610a5b91815260200190565b81600081518110610cda57610cda611f36565b6020026020010181905250816000015181600181518110610cfd57610cfd611f36565b6020026020010181905250816020015181600281518110610d2057610d20611f36565b6020026020010181905250610d458360e00151604051602001610a5b91815260200190565b81600381518110610d5857610d58611f36565b6020026020010181905250610d7d8360c00151604051602001610a5b91815260200190565b81600481518110610d9057610d90611f36565b6020026020010181905250816040015181600581518110610db357610db3611f36565b6020026020010181905250816060015181600681518110610dd657610dd6611f36565b6020026020010181905250816080015181600781518110610df957610df9611f36565b6020026020010181905250610e1b836060015167ffffffffffffffff16610ff6565b81600881518110610e2e57610e2e611f36565b6020026020010181905250610e50836080015167ffffffffffffffff16610ff6565b81600981518110610e6357610e63611f36565b60200260200101819052508160a0015181600a81518110610e8657610e86611f36565b6020026020010181905250610ea8836040015167ffffffffffffffff16610ff6565b81600b81518110610ebb57610ebb611f36565b60200260200101819052508160c0015181600c81518110610ede57610ede611f36565b60200260200101819052508160e0015181600d81518110610f0157610f01611f36565b602002602001018190525081610100015181600e81518110610f2557610f25611f36565b6020026020010181905250610f3d8360a00151610ff6565b81600f81518110610f5057610f50611f36565b6020026020010181905250505050565b606081516001148015610f8d5750608082600081518110610f8357610f83611f36565b016020015160f81c105b15610f96575090565b610fa282516080611009565b82604051602001610fb492919061206b565b60405160208183030381529060405290505b919050565b6060610fd6826111fd565b9050610fe4815160c0611009565b81604051602001610fb492919061206b565b60606109fc61100483611332565b610f60565b60606038831015611087576040805160018082528183019092529060208201818036833701905050905061103d828461209a565b60f81b8160008151811061105357611053611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506109fc565b600060015b61109681866120ee565b156110bc57816110a581611f65565b92506110b5905061010082612102565b905061108c565b6110c7826001612121565b67ffffffffffffffff8111156110df576110df611674565b6040519080825280601f01601f191660200182016040528015611109576020820181803683370190505b509250611116848361209a565b61112190603761209a565b60f81b8360008151811061113757611137611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190505b8181116111f55761010061117f8284611f1f565b61118b9061010061221d565b61119590876120ee565b61119f9190612229565b60f81b8382815181106111b4576111b4611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806111ed81611f65565b91505061116b565b505092915050565b6060815160000361121c57505060408051600081526020810190915290565b6000805b83518110156112635783818151811061123b5761123b611f36565b6020026020010151518261124f9190612121565b91508061125b81611f65565b915050611220565b8167ffffffffffffffff81111561127c5761127c611674565b6040519080825280601f01601f1916602001820160405280156112a6576020820181803683370190505b50925060009050602083015b845182101561132a5760008583815181106112cf576112cf611f36565b6020026020010151905060006020820190506112ed8382845161148f565b8684815181106112ff576112ff611f36565b602002602001015151836113139190612121565b92505050818061132290611f65565b9250506112b2565b505050919050565b606060008260405160200161134991815260200190565b604051602081830303815290604052905060005b60208110156113b85781818151811061137857611378611f36565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036113b857806113b081611f65565b91505061135d565b6113c3816020611f1f565b67ffffffffffffffff8111156113db576113db611674565b6040519080825280601f01601f191660200182016040528015611405576020820181803683370190505b50925060005b835181101561132a57828261141f81611f65565b93508151811061143157611431611f36565b602001015160f81c60f81b84828151811061144e5761144e611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061148781611f65565b91505061140b565b8282825b602081106114cb57815183526114aa602084612121565b92506114b7602083612121565b91506114c4602082611f1f565b9050611493565b905182516020929092036101000a6000190180199091169116179052505050565b6000606082840312156114fe57600080fd5b50919050565b60008060006060848603121561151957600080fd5b833567ffffffffffffffff81111561153057600080fd5b61153c868287016114ec565b9660208601359650604090950135949350505050565b60005b8381101561156d578181015183820152602001611555565b838111156107305750506000910152565b60008151808452611596816020860160208601611552565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006115db602083018461157e565b9392505050565b600080600080608085870312156115f857600080fd5b843567ffffffffffffffff81111561160f57600080fd5b61161b878288016114ec565b97602087013597506040870135966060013595509350505050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2183360301811261166a57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101a0810167ffffffffffffffff811182821017156116c7576116c7611674565b60405290565b604051610120810167ffffffffffffffff811182821017156116c7576116c7611674565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561173857611738611674565b604052919050565b600060a0828403121561175257600080fd5b60405160a0810181811067ffffffffffffffff8211171561177557611775611674565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6183360301811261166a57600080fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261166a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261184d57600080fd5b83018035915067ffffffffffffffff82111561186857600080fd5b6020019150600581901b360382131561188057600080fd5b9250929050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156118b957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6060815260006118ea606083018789611887565b82810360208401526118fd818688611887565b9150508260408301529695505050505050565b60006020828403121561192257600080fd5b815180151581146115db57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261196757600080fd5b83018035915067ffffffffffffffff82111561198257600080fd5b60200191503681900382131561188057600080fd5b600080858511156119a757600080fd5b838611156119b457600080fd5b5050820193919092039150565b803560208310156109fc57600019602084900360031b1b1692915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b858152606060208201526000611a426060830186886119df565b8281036040840152611a558185876119df565b98975050505050505050565b8183823760009101908152919050565b803567ffffffffffffffff81168114610fc657600080fd5b600082601f830112611a9a57600080fd5b8135602067ffffffffffffffff821115611ab657611ab6611674565b8160051b611ac58282016116f1565b9283528481018201928281019087851115611adf57600080fd5b83870192505b84831015611afe57823582529183019190830190611ae5565b979650505050505050565b60006101a08236031215611b1c57600080fd5b611b246116a3565b8235815260208301356020820152611b3e60408401611a71565b6040820152611b4f60608401611a71565b6060820152611b6060808401611a71565b608082015260a083013560a082015260c083013560c082015260e083013560e08201526101008084013581830152506101208084013567ffffffffffffffff811115611bab57600080fd5b611bb736828701611a89565b828401525050610140611bcb818501611a71565b90820152610160611bdd848201611a71565b9082015261018092830135928101929092525090565b600082601f830112611c0457600080fd5b813567ffffffffffffffff811115611c1e57611c1e611674565b611c4f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016116f1565b818152846020838601011115611c6457600080fd5b816020850160208301376000918101602001919091529392505050565b60006101208236031215611c9457600080fd5b611c9c6116cd565b823567ffffffffffffffff80821115611cb457600080fd5b611cc036838701611bf3565b83526020850135915080821115611cd657600080fd5b611ce236838701611bf3565b60208401526040850135915080821115611cfb57600080fd5b611d0736838701611bf3565b60408401526060850135915080821115611d2057600080fd5b611d2c36838701611bf3565b60608401526080850135915080821115611d4557600080fd5b611d5136838701611bf3565b608084015260a0850135915080821115611d6a57600080fd5b611d7636838701611bf3565b60a084015260c0850135915080821115611d8f57600080fd5b611d9b36838701611bf3565b60c084015260e0850135915080821115611db457600080fd5b611dc036838701611bf3565b60e084015261010091508185013581811115611ddb57600080fd5b611de736828801611bf3565b8385015250505080915050919050565b85815260006020608081840152611e11608084018861157e565b8381036040850152858152818101600587901b820183018860005b89811015611ed7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085840301845281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c3603018112611e8d57600080fd5b8b01868101903567ffffffffffffffff811115611ea957600080fd5b803603821315611eb857600080fd5b611ec38582846119df565b958801959450505090850190600101611e2c565b5050809450505050508260608301529695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611f3157611f31611ef0565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006000198203611f7857611f78611ef0565b5060010190565b60008151602080840160005b83811015611fa757815187529582019590820190600101611f8b565b509495945050505050565b8c81528b60208201528a604082015289606082015288608082015260007fffffffffffffffff000000000000000000000000000000000000000000000000808a60c01b1660a0840152808960c01b1660a88401528760b0840152808760c01b1660d0840152507fffff0000000000000000000000000000000000000000000000000000000000008560f01b1660d883015261205961205360da840186611f7f565b84611f7f565b9e9d5050505050505050505050505050565b6000835161207d818460208801611552565b835190830190612091818360208801611552565b01949350505050565b600060ff821660ff84168060ff038211156120b7576120b7611ef0565b019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826120fd576120fd6120bf565b500490565b600081600019048311821515161561211c5761211c611ef0565b500290565b6000821982111561213457612134611ef0565b500190565b600181815b8085111561217457816000190482111561215a5761215a611ef0565b8085161561216757918102915b93841c939080029061213e565b509250929050565b60008261218b575060016109fc565b81612198575060006109fc565b81600181146121ae57600281146121b8576121d4565b60019150506109fc565b60ff8411156121c9576121c9611ef0565b50506001821b6109fc565b5060208310610133831016604e8410600b84101617156121f7575081810a6109fc565b6122018383612139565b806000190482111561221557612215611ef0565b029392505050565b60006115db838361217c565b600082612238576122386120bf565b50069056fea164736f6c634300080f000a", } // ZKProofVerifierABI is the input ABI used to generate the binding from. diff --git a/kroma-bindings/bindings/zkproofverifier_more.go b/kroma-bindings/bindings/zkproofverifier_more.go index 2896160cc..ab7a216e9 100644 --- a/kroma-bindings/bindings/zkproofverifier_more.go +++ b/kroma-bindings/bindings/zkproofverifier_more.go @@ -13,8 +13,7 @@ const ZKProofVerifierStorageLayoutJSON = "{\"storage\":null,\"types\":{}}" var ZKProofVerifierStorageLayout = new(solc.StorageLayout) -var ZKProofVerifierDeployedBin = "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80635747274b116100765780639a7ec1361161005b5780639a7ec136146101cc5780639aea2572146101df578063d6df096d1461020557600080fd5b80635747274b14610180578063816bf26d146101a657600080fd5b8063222ce122146100a85780633955d7a1146100dd57806352a07fa3146100f057806354fd4d5014610137575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040519081526020015b60405180910390f35b6100ca6100eb366004611504565b61022b565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d4565b6101736040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516100d491906115c8565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b6100ca6101da3660046115e2565b610419565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b6000366102388580611636565b905060808101356101008201351461027c576040517f3f126fab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102b2848461029861029336869003860186611740565b610616565b6102ad61029336879003870160a08801611740565b6106b8565b6102da60a082016102c76101408401846117b0565b6102d56101608501856117e4565b610736565b6103066102eb6101c0830183611818565b6101808401356101a085013560e086013560c08701356107fb565b610321602082013561031c6101408401846117b0565b610945565b915073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016634292dc3e61036c6020880188611818565b61037960408a018a611818565b876040518663ffffffff1660e01b815260040161039a9594939291906118d6565b602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190611910565b610411576040517fe1ac453100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509392505050565b600084357f000000000000000000000000000000000000000000000000000000000000000014610475576040517f2166766900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104c484846104876020890189611932565b61049691602091600091611997565b61049f916119c1565b6104ac60208a018a611932565b6104bb91604091602091611997565b6102ad916119c1565b816104d26020870187611932565b6104e191606091604091611997565b6104ea916119c1565b14610521576040517f7458ca2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166341493c607f000000000000000000000000000000000000000000000000000000000000000061058b6020890189611932565b61059860408b018b611932565b6040518663ffffffff1660e01b81526004016105b8959493929190611a28565b60006040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b506105f6925050506020860186611932565b604051610604929190611a61565b60405180910390209050949350505050565b60808101516000906106785781516020808401516040808601516060870151915161065b95949192910193845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b81516020808401516040808601516060808801516080808a01518551978801989098529386019490945284015282015260a081019190915260c00161065b565b8184146106f1576040517f8b10302800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821561073057808303610730576040517f4e15341500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b82602001358260e0013514610777576040517f4d9e774000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101808301356107a25761079d61078f84611b09565b61079884611c81565b610a02565b6107bc565b6107bc6107ae84611b09565b6107b784611c81565b610aa6565b905080846060013514610730576040517fb033950600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051600060208201528082018690526060810185905260808082018590528251808303909101815260a08201928390527f12e64a72000000000000000000000000000000000000000000000000000000009092527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906312e64a72906108c5907f42000000000000000000000000000000000000030000000000000000000000009085908c908c90899060a401611df7565b602060405180830381865afa1580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109069190611910565b61093c576040517ff35959c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b600060607f0000000000000000000000000000000000000000000000000000000000000000610978610120850185611818565b905010156109e5576109e27f00000000000000000000000000000000000000000000000000000000000000006109b2610120860186611818565b6109dd91507f0000000000000000000000000000000000000000000000000000000000000000611f1f565b610bb7565b90505b6109f8846109f285611b09565b83610c3b565b9150505b92915050565b6040805160118082526102408201909252600091829190816020015b6060815260200190600190039081610a1e579050509050610a40848483610cad565b610a6f846101000151604051602001610a5b91815260200190565b604051602081830303815290604052610f60565b81601081518110610a8257610a82611f36565b6020026020010181905250610a9681610fcb565b8051906020012091505092915050565b6040805160148082526102a08201909252600091829190816020015b6060815260200190600190039081610ac2579050509050610ae4848483610cad565b610aff846101000151604051602001610a5b91815260200190565b81601081518110610b1257610b12611f36565b6020026020010181905250610b3584610140015167ffffffffffffffff16610ff6565b81601181518110610b4857610b48611f36565b6020026020010181905250610b6b84610160015167ffffffffffffffff16610ff6565b81601281518110610b7e57610b7e611f36565b6020026020010181905250610ba4846101800151604051602001610a5b91815260200190565b81601381518110610a8257610a82611f36565b606060008267ffffffffffffffff811115610bd457610bd4611674565b604051908082528060200260200182016040528015610bfd578160200160208202803683370190505b50905060005b838110156104115784828281518110610c1e57610c1e611f36565b602090810291909101015280610c3381611f65565b915050610c03565b6000838360e001516000801b85600001518660200151876060015188604001518960a001518a608001518b6101200151518c61012001518c604051602001610c8e9c9b9a99989796959493929190611fb2565b6040516020818303038152906040528051906020012090509392505050565b610cc78360200151604051602001610a5b91815260200190565b81600081518110610cda57610cda611f36565b6020026020010181905250816000015181600181518110610cfd57610cfd611f36565b6020026020010181905250816020015181600281518110610d2057610d20611f36565b6020026020010181905250610d458360e00151604051602001610a5b91815260200190565b81600381518110610d5857610d58611f36565b6020026020010181905250610d7d8360c00151604051602001610a5b91815260200190565b81600481518110610d9057610d90611f36565b6020026020010181905250816040015181600581518110610db357610db3611f36565b6020026020010181905250816060015181600681518110610dd657610dd6611f36565b6020026020010181905250816080015181600781518110610df957610df9611f36565b6020026020010181905250610e1b836060015167ffffffffffffffff16610ff6565b81600881518110610e2e57610e2e611f36565b6020026020010181905250610e50836080015167ffffffffffffffff16610ff6565b81600981518110610e6357610e63611f36565b60200260200101819052508160a0015181600a81518110610e8657610e86611f36565b6020026020010181905250610ea8836040015167ffffffffffffffff16610ff6565b81600b81518110610ebb57610ebb611f36565b60200260200101819052508160c0015181600c81518110610ede57610ede611f36565b60200260200101819052508160e0015181600d81518110610f0157610f01611f36565b602002602001018190525081610100015181600e81518110610f2557610f25611f36565b6020026020010181905250610f3d8360a00151610ff6565b81600f81518110610f5057610f50611f36565b6020026020010181905250505050565b606081516001148015610f8d5750608082600081518110610f8357610f83611f36565b016020015160f81c105b15610f96575090565b610fa282516080611009565b82604051602001610fb492919061206b565b60405160208183030381529060405290505b919050565b6060610fd6826111fd565b9050610fe4815160c0611009565b81604051602001610fb492919061206b565b60606109fc61100483611332565b610f60565b60606038831015611087576040805160018082528183019092529060208201818036833701905050905061103d828461209a565b60f81b8160008151811061105357611053611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506109fc565b600060015b61109681866120ee565b156110bc57816110a581611f65565b92506110b5905061010082612102565b905061108c565b6110c7826001612121565b67ffffffffffffffff8111156110df576110df611674565b6040519080825280601f01601f191660200182016040528015611109576020820181803683370190505b509250611116848361209a565b61112190603761209a565b60f81b8360008151811061113757611137611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190505b8181116111f55761010061117f8284611f1f565b61118b9061010061221d565b61119590876120ee565b61119f9190612229565b60f81b8382815181106111b4576111b4611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806111ed81611f65565b91505061116b565b505092915050565b6060815160000361121c57505060408051600081526020810190915290565b6000805b83518110156112635783818151811061123b5761123b611f36565b6020026020010151518261124f9190612121565b91508061125b81611f65565b915050611220565b8167ffffffffffffffff81111561127c5761127c611674565b6040519080825280601f01601f1916602001820160405280156112a6576020820181803683370190505b50925060009050602083015b845182101561132a5760008583815181106112cf576112cf611f36565b6020026020010151905060006020820190506112ed8382845161148f565b8684815181106112ff576112ff611f36565b602002602001015151836113139190612121565b92505050818061132290611f65565b9250506112b2565b505050919050565b606060008260405160200161134991815260200190565b604051602081830303815290604052905060005b60208110156113b85781818151811061137857611378611f36565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036113b857806113b081611f65565b91505061135d565b6113c3816020611f1f565b67ffffffffffffffff8111156113db576113db611674565b6040519080825280601f01601f191660200182016040528015611405576020820181803683370190505b50925060005b835181101561132a57828261141f81611f65565b93508151811061143157611431611f36565b602001015160f81c60f81b84828151811061144e5761144e611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061148781611f65565b91505061140b565b8282825b602081106114cb57815183526114aa602084612121565b92506114b7602083612121565b91506114c4602082611f1f565b9050611493565b905182516020929092036101000a6000190180199091169116179052505050565b6000606082840312156114fe57600080fd5b50919050565b60008060006060848603121561151957600080fd5b833567ffffffffffffffff81111561153057600080fd5b61153c868287016114ec565b9660208601359650604090950135949350505050565b60005b8381101561156d578181015183820152602001611555565b838111156107305750506000910152565b60008151808452611596816020860160208601611552565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006115db602083018461157e565b9392505050565b600080600080608085870312156115f857600080fd5b843567ffffffffffffffff81111561160f57600080fd5b61161b878288016114ec565b97602087013597506040870135966060013595509350505050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2183360301811261166a57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101a0810167ffffffffffffffff811182821017156116c7576116c7611674565b60405290565b604051610120810167ffffffffffffffff811182821017156116c7576116c7611674565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561173857611738611674565b604052919050565b600060a0828403121561175257600080fd5b60405160a0810181811067ffffffffffffffff8211171561177557611775611674565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6183360301811261166a57600080fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261166a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261184d57600080fd5b83018035915067ffffffffffffffff82111561186857600080fd5b6020019150600581901b360382131561188057600080fd5b9250929050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156118b957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6060815260006118ea606083018789611887565b82810360208401526118fd818688611887565b9150508260408301529695505050505050565b60006020828403121561192257600080fd5b815180151581146115db57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261196757600080fd5b83018035915067ffffffffffffffff82111561198257600080fd5b60200191503681900382131561188057600080fd5b600080858511156119a757600080fd5b838611156119b457600080fd5b5050820193919092039150565b803560208310156109fc57600019602084900360031b1b1692915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b858152606060208201526000611a426060830186886119df565b8281036040840152611a558185876119df565b98975050505050505050565b8183823760009101908152919050565b803567ffffffffffffffff81168114610fc657600080fd5b600082601f830112611a9a57600080fd5b8135602067ffffffffffffffff821115611ab657611ab6611674565b8160051b611ac58282016116f1565b9283528481018201928281019087851115611adf57600080fd5b83870192505b84831015611afe57823582529183019190830190611ae5565b979650505050505050565b60006101a08236031215611b1c57600080fd5b611b246116a3565b8235815260208301356020820152611b3e60408401611a71565b6040820152611b4f60608401611a71565b6060820152611b6060808401611a71565b608082015260a083013560a082015260c083013560c082015260e083013560e08201526101008084013581830152506101208084013567ffffffffffffffff811115611bab57600080fd5b611bb736828701611a89565b828401525050610140611bcb818501611a71565b90820152610160611bdd848201611a71565b9082015261018092830135928101929092525090565b600082601f830112611c0457600080fd5b813567ffffffffffffffff811115611c1e57611c1e611674565b611c4f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016116f1565b818152846020838601011115611c6457600080fd5b816020850160208301376000918101602001919091529392505050565b60006101208236031215611c9457600080fd5b611c9c6116cd565b823567ffffffffffffffff80821115611cb457600080fd5b611cc036838701611bf3565b83526020850135915080821115611cd657600080fd5b611ce236838701611bf3565b60208401526040850135915080821115611cfb57600080fd5b611d0736838701611bf3565b60408401526060850135915080821115611d2057600080fd5b611d2c36838701611bf3565b60608401526080850135915080821115611d4557600080fd5b611d5136838701611bf3565b608084015260a0850135915080821115611d6a57600080fd5b611d7636838701611bf3565b60a084015260c0850135915080821115611d8f57600080fd5b611d9b36838701611bf3565b60c084015260e0850135915080821115611db457600080fd5b611dc036838701611bf3565b60e084015261010091508185013581811115611ddb57600080fd5b611de736828801611bf3565b8385015250505080915050919050565b85815260006020608081840152611e11608084018861157e565b8381036040850152858152818101600587901b820183018860005b89811015611ed7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085840301845281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c3603018112611e8d57600080fd5b8b01868101903567ffffffffffffffff811115611ea957600080fd5b803603821315611eb857600080fd5b611ec38582846119df565b958801959450505090850190600101611e2c565b5050809450505050508260608301529695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611f3157611f31611ef0565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006000198203611f7857611f78611ef0565b5060010190565b60008151602080840160005b83811015611fa757815187529582019590820190600101611f8b565b509495945050505050565b8c81528b60208201528a604082015289606082015288608082015260007fffffffffffffffff000000000000000000000000000000000000000000000000808a60c01b1660a0840152808960c01b1660a88401528760b0840152808760c01b1660d0840152507fffff0000000000000000000000000000000000000000000000000000000000008560f01b1660d883015261205961205360da840186611f7f565b84611f7f565b9e9d5050505050505050505050505050565b6000835161207d818460208801611552565b835190830190612091818360208801611552565b01949350505050565b600060ff821660ff84168060ff038211156120b7576120b7611ef0565b019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826120fd576120fd6120bf565b500490565b600081600019048311821515161561211c5761211c611ef0565b500290565b6000821982111561213457612134611ef0565b500190565b600181815b8085111561217457816000190482111561215a5761215a611ef0565b8085161561216757918102915b93841c939080029061213e565b509250929050565b60008261218b575060016109fc565b81612198575060006109fc565b81600181146121ae57600281146121b8576121d4565b60019150506109fc565b60ff8411156121c9576121c9611ef0565b50506001821b6109fc565b5060208310610133831016604e8410600b84101617156121f7575081810a6109fc565b6122018383612139565b806000190482111561221557612215611ef0565b029392505050565b60006115db838361217c565b600082612238576122386120bf565b50069056fea164736f6c634300080f000a" - +var ZKProofVerifierDeployedBin = "0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80635747274b116100765780639a7ec1361161005b5780639a7ec136146101cc5780639aea2572146101df578063d6df096d1461020557600080fd5b80635747274b14610180578063816bf26d146101a657600080fd5b8063222ce122146100a85780633955d7a1146100dd57806352a07fa3146100f057806354fd4d5014610137575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040519081526020015b60405180910390f35b6100ca6100eb366004611504565b61022b565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d4565b6101736040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516100d491906115c8565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b6100ca6101da3660046115e2565b610419565b7f00000000000000000000000000000000000000000000000000000000000000006100ca565b7f0000000000000000000000000000000000000000000000000000000000000000610112565b6000366102388580611636565b905060808101356101008201351461027c576040517f3f126fab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102b2848461029861029336869003860186611740565b610616565b6102ad61029336879003870160a08801611740565b6106b8565b6102da60a082016102c76101408401846117b0565b6102d56101608501856117e4565b610736565b6103066102eb6101c0830183611818565b6101808401356101a085013560e086013560c08701356107fb565b610321602082013561031c6101408401846117b0565b610945565b915073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016634292dc3e61036c6020880188611818565b61037960408a018a611818565b876040518663ffffffff1660e01b815260040161039a9594939291906118d6565b602060405180830381865afa1580156103b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103db9190611910565b610411576040517fe1ac453100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509392505050565b600084357f000000000000000000000000000000000000000000000000000000000000000014610475576040517f2166766900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104c484846104876020890189611932565b61049691602891600891611997565b61049f916119c1565b6104ac60208a018a611932565b6104bb91605091603091611997565b6102ad916119c1565b816104d26020870187611932565b6104e191607891605891611997565b6104ea916119c1565b14610521576040517f7458ca2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166341493c607f000000000000000000000000000000000000000000000000000000000000000061058b6020890189611932565b61059860408b018b611932565b6040518663ffffffff1660e01b81526004016105b8959493929190611a28565b60006040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b506105f6925050506020860186611932565b604051610604929190611a61565b60405180910390209050949350505050565b60808101516000906106785781516020808401516040808601516060870151915161065b95949192910193845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b81516020808401516040808601516060808801516080808a01518551978801989098529386019490945284015282015260a081019190915260c00161065b565b8184146106f1576040517f8b10302800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821561073057808303610730576040517f4e15341500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b82602001358260e0013514610777576040517f4d9e774000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006101808301356107a25761079d61078f84611b09565b61079884611c81565b610a02565b6107bc565b6107bc6107ae84611b09565b6107b784611c81565b610aa6565b905080846060013514610730576040517fb033950600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051600060208201528082018690526060810185905260808082018590528251808303909101815260a08201928390527f12e64a72000000000000000000000000000000000000000000000000000000009092527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906312e64a72906108c5907f42000000000000000000000000000000000000030000000000000000000000009085908c908c90899060a401611df7565b602060405180830381865afa1580156108e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109069190611910565b61093c576040517ff35959c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b600060607f0000000000000000000000000000000000000000000000000000000000000000610978610120850185611818565b905010156109e5576109e27f00000000000000000000000000000000000000000000000000000000000000006109b2610120860186611818565b6109dd91507f0000000000000000000000000000000000000000000000000000000000000000611f1f565b610bb7565b90505b6109f8846109f285611b09565b83610c3b565b9150505b92915050565b6040805160118082526102408201909252600091829190816020015b6060815260200190600190039081610a1e579050509050610a40848483610cad565b610a6f846101000151604051602001610a5b91815260200190565b604051602081830303815290604052610f60565b81601081518110610a8257610a82611f36565b6020026020010181905250610a9681610fcb565b8051906020012091505092915050565b6040805160148082526102a08201909252600091829190816020015b6060815260200190600190039081610ac2579050509050610ae4848483610cad565b610aff846101000151604051602001610a5b91815260200190565b81601081518110610b1257610b12611f36565b6020026020010181905250610b3584610140015167ffffffffffffffff16610ff6565b81601181518110610b4857610b48611f36565b6020026020010181905250610b6b84610160015167ffffffffffffffff16610ff6565b81601281518110610b7e57610b7e611f36565b6020026020010181905250610ba4846101800151604051602001610a5b91815260200190565b81601381518110610a8257610a82611f36565b606060008267ffffffffffffffff811115610bd457610bd4611674565b604051908082528060200260200182016040528015610bfd578160200160208202803683370190505b50905060005b838110156104115784828281518110610c1e57610c1e611f36565b602090810291909101015280610c3381611f65565b915050610c03565b6000838360e001516000801b85600001518660200151876060015188604001518960a001518a608001518b6101200151518c61012001518c604051602001610c8e9c9b9a99989796959493929190611fb2565b6040516020818303038152906040528051906020012090509392505050565b610cc78360200151604051602001610a5b91815260200190565b81600081518110610cda57610cda611f36565b6020026020010181905250816000015181600181518110610cfd57610cfd611f36565b6020026020010181905250816020015181600281518110610d2057610d20611f36565b6020026020010181905250610d458360e00151604051602001610a5b91815260200190565b81600381518110610d5857610d58611f36565b6020026020010181905250610d7d8360c00151604051602001610a5b91815260200190565b81600481518110610d9057610d90611f36565b6020026020010181905250816040015181600581518110610db357610db3611f36565b6020026020010181905250816060015181600681518110610dd657610dd6611f36565b6020026020010181905250816080015181600781518110610df957610df9611f36565b6020026020010181905250610e1b836060015167ffffffffffffffff16610ff6565b81600881518110610e2e57610e2e611f36565b6020026020010181905250610e50836080015167ffffffffffffffff16610ff6565b81600981518110610e6357610e63611f36565b60200260200101819052508160a0015181600a81518110610e8657610e86611f36565b6020026020010181905250610ea8836040015167ffffffffffffffff16610ff6565b81600b81518110610ebb57610ebb611f36565b60200260200101819052508160c0015181600c81518110610ede57610ede611f36565b60200260200101819052508160e0015181600d81518110610f0157610f01611f36565b602002602001018190525081610100015181600e81518110610f2557610f25611f36565b6020026020010181905250610f3d8360a00151610ff6565b81600f81518110610f5057610f50611f36565b6020026020010181905250505050565b606081516001148015610f8d5750608082600081518110610f8357610f83611f36565b016020015160f81c105b15610f96575090565b610fa282516080611009565b82604051602001610fb492919061206b565b60405160208183030381529060405290505b919050565b6060610fd6826111fd565b9050610fe4815160c0611009565b81604051602001610fb492919061206b565b60606109fc61100483611332565b610f60565b60606038831015611087576040805160018082528183019092529060208201818036833701905050905061103d828461209a565b60f81b8160008151811061105357611053611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506109fc565b600060015b61109681866120ee565b156110bc57816110a581611f65565b92506110b5905061010082612102565b905061108c565b6110c7826001612121565b67ffffffffffffffff8111156110df576110df611674565b6040519080825280601f01601f191660200182016040528015611109576020820181803683370190505b509250611116848361209a565b61112190603761209a565b60f81b8360008151811061113757611137611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600190505b8181116111f55761010061117f8284611f1f565b61118b9061010061221d565b61119590876120ee565b61119f9190612229565b60f81b8382815181106111b4576111b4611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806111ed81611f65565b91505061116b565b505092915050565b6060815160000361121c57505060408051600081526020810190915290565b6000805b83518110156112635783818151811061123b5761123b611f36565b6020026020010151518261124f9190612121565b91508061125b81611f65565b915050611220565b8167ffffffffffffffff81111561127c5761127c611674565b6040519080825280601f01601f1916602001820160405280156112a6576020820181803683370190505b50925060009050602083015b845182101561132a5760008583815181106112cf576112cf611f36565b6020026020010151905060006020820190506112ed8382845161148f565b8684815181106112ff576112ff611f36565b602002602001015151836113139190612121565b92505050818061132290611f65565b9250506112b2565b505050919050565b606060008260405160200161134991815260200190565b604051602081830303815290604052905060005b60208110156113b85781818151811061137857611378611f36565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036113b857806113b081611f65565b91505061135d565b6113c3816020611f1f565b67ffffffffffffffff8111156113db576113db611674565b6040519080825280601f01601f191660200182016040528015611405576020820181803683370190505b50925060005b835181101561132a57828261141f81611f65565b93508151811061143157611431611f36565b602001015160f81c60f81b84828151811061144e5761144e611f36565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508061148781611f65565b91505061140b565b8282825b602081106114cb57815183526114aa602084612121565b92506114b7602083612121565b91506114c4602082611f1f565b9050611493565b905182516020929092036101000a6000190180199091169116179052505050565b6000606082840312156114fe57600080fd5b50919050565b60008060006060848603121561151957600080fd5b833567ffffffffffffffff81111561153057600080fd5b61153c868287016114ec565b9660208601359650604090950135949350505050565b60005b8381101561156d578181015183820152602001611555565b838111156107305750506000910152565b60008151808452611596816020860160208601611552565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006115db602083018461157e565b9392505050565b600080600080608085870312156115f857600080fd5b843567ffffffffffffffff81111561160f57600080fd5b61161b878288016114ec565b97602087013597506040870135966060013595509350505050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe2183360301811261166a57600080fd5b9190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101a0810167ffffffffffffffff811182821017156116c7576116c7611674565b60405290565b604051610120810167ffffffffffffffff811182821017156116c7576116c7611674565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561173857611738611674565b604052919050565b600060a0828403121561175257600080fd5b60405160a0810181811067ffffffffffffffff8211171561177557611775611674565b806040525082358152602083013560208201526040830135604082015260608301356060820152608083013560808201528091505092915050565b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6183360301811261166a57600080fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261166a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261184d57600080fd5b83018035915067ffffffffffffffff82111561186857600080fd5b6020019150600581901b360382131561188057600080fd5b9250929050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156118b957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6060815260006118ea606083018789611887565b82810360208401526118fd818688611887565b9150508260408301529695505050505050565b60006020828403121561192257600080fd5b815180151581146115db57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261196757600080fd5b83018035915067ffffffffffffffff82111561198257600080fd5b60200191503681900382131561188057600080fd5b600080858511156119a757600080fd5b838611156119b457600080fd5b5050820193919092039150565b803560208310156109fc57600019602084900360031b1b1692915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b858152606060208201526000611a426060830186886119df565b8281036040840152611a558185876119df565b98975050505050505050565b8183823760009101908152919050565b803567ffffffffffffffff81168114610fc657600080fd5b600082601f830112611a9a57600080fd5b8135602067ffffffffffffffff821115611ab657611ab6611674565b8160051b611ac58282016116f1565b9283528481018201928281019087851115611adf57600080fd5b83870192505b84831015611afe57823582529183019190830190611ae5565b979650505050505050565b60006101a08236031215611b1c57600080fd5b611b246116a3565b8235815260208301356020820152611b3e60408401611a71565b6040820152611b4f60608401611a71565b6060820152611b6060808401611a71565b608082015260a083013560a082015260c083013560c082015260e083013560e08201526101008084013581830152506101208084013567ffffffffffffffff811115611bab57600080fd5b611bb736828701611a89565b828401525050610140611bcb818501611a71565b90820152610160611bdd848201611a71565b9082015261018092830135928101929092525090565b600082601f830112611c0457600080fd5b813567ffffffffffffffff811115611c1e57611c1e611674565b611c4f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016116f1565b818152846020838601011115611c6457600080fd5b816020850160208301376000918101602001919091529392505050565b60006101208236031215611c9457600080fd5b611c9c6116cd565b823567ffffffffffffffff80821115611cb457600080fd5b611cc036838701611bf3565b83526020850135915080821115611cd657600080fd5b611ce236838701611bf3565b60208401526040850135915080821115611cfb57600080fd5b611d0736838701611bf3565b60408401526060850135915080821115611d2057600080fd5b611d2c36838701611bf3565b60608401526080850135915080821115611d4557600080fd5b611d5136838701611bf3565b608084015260a0850135915080821115611d6a57600080fd5b611d7636838701611bf3565b60a084015260c0850135915080821115611d8f57600080fd5b611d9b36838701611bf3565b60c084015260e0850135915080821115611db457600080fd5b611dc036838701611bf3565b60e084015261010091508185013581811115611ddb57600080fd5b611de736828801611bf3565b8385015250505080915050919050565b85815260006020608081840152611e11608084018861157e565b8381036040850152858152818101600587901b820183018860005b89811015611ed7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085840301845281357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18c3603018112611e8d57600080fd5b8b01868101903567ffffffffffffffff811115611ea957600080fd5b803603821315611eb857600080fd5b611ec38582846119df565b958801959450505090850190600101611e2c565b5050809450505050508260608301529695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611f3157611f31611ef0565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006000198203611f7857611f78611ef0565b5060010190565b60008151602080840160005b83811015611fa757815187529582019590820190600101611f8b565b509495945050505050565b8c81528b60208201528a604082015289606082015288608082015260007fffffffffffffffff000000000000000000000000000000000000000000000000808a60c01b1660a0840152808960c01b1660a88401528760b0840152808760c01b1660d0840152507fffff0000000000000000000000000000000000000000000000000000000000008560f01b1660d883015261205961205360da840186611f7f565b84611f7f565b9e9d5050505050505050505050505050565b6000835161207d818460208801611552565b835190830190612091818360208801611552565b01949350505050565b600060ff821660ff84168060ff038211156120b7576120b7611ef0565b019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826120fd576120fd6120bf565b500490565b600081600019048311821515161561211c5761211c611ef0565b500290565b6000821982111561213457612134611ef0565b500190565b600181815b8085111561217457816000190482111561215a5761215a611ef0565b8085161561216757918102915b93841c939080029061213e565b509250929050565b60008261218b575060016109fc565b81612198575060006109fc565b81600181146121ae57600281146121b8576121d4565b60019150506109fc565b60ff8411156121c9576121c9611ef0565b50506001821b6109fc565b5060208310610133831016604e8410600b84101617156121f7575081810a6109fc565b6122018383612139565b806000190482111561221557612215611ef0565b029392505050565b60006115db838361217c565b600082612238576122386120bf565b50069056fea164736f6c634300080f000a" func init() { if err := json.Unmarshal([]byte(ZKProofVerifierStorageLayoutJSON), ZKProofVerifierStorageLayout); err != nil { diff --git a/packages/contracts/deploy-config/devnetL1-template.json b/packages/contracts/deploy-config/devnetL1-template.json index d6ba1f62c..0804f4025 100644 --- a/packages/contracts/deploy-config/devnetL1-template.json +++ b/packages/contracts/deploy-config/devnetL1-template.json @@ -77,7 +77,7 @@ "zkVerifierM56Px": "0x175a2d1aaf07ee184a955e35f3deac123ef1088b68c38bace37056dcfc9d304d", "zkVerifierM56Py": "0x150856c3d1750c2578b823cb3c7d74ed3e94c1cfece7e1bfdaaff36eea788fb9", "zkProofVerifierSP1Verifier": "0x0000000000000000000000000000000000000001", - "zkProofVerifierVKey": "0x0000000000000000000000000000000000000000000000000000000000000001", + "zkProofVerifierVKey": "0x00ad7cc293beb89796e8a9713ab7189b33faf6975325da0707d2d9cb129db055", "governanceTokenNotUseCreate2": true, "governanceTokenProxySalt": "0x0000000000000000000000000000000000000000000000000000004b726f6d61", "mintManagerOwner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", From b8a50d84db909472165b9edadf0d98e296342d1b Mon Sep 17 00:00:00 2001 From: sm-stack Date: Thu, 19 Dec 2024 16:41:21 +0900 Subject: [PATCH 5/8] test(e2e): remove unused zkVM challenges on actions test --- op-e2e/actions/l2_challenger_test.go | 63 ++++++++---------------- op-e2e/actions/l2_runtime.go | 73 +++------------------------- op-e2e/actions/l2_validator_test.go | 5 +- 3 files changed, 29 insertions(+), 112 deletions(-) diff --git a/op-e2e/actions/l2_challenger_test.go b/op-e2e/actions/l2_challenger_test.go index 724d2cc95..c7ecb8776 100644 --- a/op-e2e/actions/l2_challenger_test.go +++ b/op-e2e/actions/l2_challenger_test.go @@ -16,7 +16,7 @@ import ( var challengerTests = []struct { name string - f func(ft *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) + f func(ft *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) }{ {"ChallengeBasic", ChallengeBasic}, {"ChallengeAsserterBisectTimeout", ChallengeAsserterBisectTimeout}, @@ -32,7 +32,7 @@ func TestChallengerBatchType(t *testing.T) { for _, test := range challengerTests { test := test t.Run(test.name+"_SingularBatch", func(t *testing.T) { - test.f(t, nil, valhelper.ValidatorV1, testdata.DefaultProofType) + test.f(t, nil, valhelper.ValidatorV1) }) } @@ -40,7 +40,7 @@ func TestChallengerBatchType(t *testing.T) { for _, test := range challengerTests { test := test t.Run(test.name+"_SpanBatch", func(t *testing.T) { - test.f(t, &deltaTimeOffset, valhelper.ValidatorV1, testdata.DefaultProofType) + test.f(t, &deltaTimeOffset, valhelper.ValidatorV1) }) } } @@ -50,39 +50,19 @@ func TestValidatorSystemVersion(t *testing.T) { for _, test := range challengerTests { test := test t.Run(test.name+"_ValidatorPool", func(t *testing.T) { - test.f(t, nil, valhelper.ValidatorV1, testdata.DefaultProofType) + test.f(t, nil, valhelper.ValidatorV1) }) } for _, test := range challengerTests { test := test t.Run(test.name+"_ValidatorManager", func(t *testing.T) { - test.f(t, nil, valhelper.ValidatorV2, testdata.DefaultProofType) + test.f(t, nil, valhelper.ValidatorV2) }) } } -// TestChallengerProofType run each challenge test case in zkEVM version and zkVM version. -func TestChallengerProofType(t *testing.T) { - t.Skip("Temporarily skip, enable when test data added") // TODO(seolaoh) - - for _, test := range challengerTests { - test := test - t.Run(test.name+"_zkEVM", func(t *testing.T) { - test.f(t, nil, valhelper.ValidatorV1, testdata.ZkEVMType) - }) - } - - deltaTimeOffset := hexutil.Uint64(0) - for _, test := range challengerTests { - test := test - t.Run(test.name+"_zkVM", func(t *testing.T) { - test.f(t, &deltaTimeOffset, valhelper.ValidatorV1, testdata.ZkVMType) - }) - } -} - -func ChallengeBasic(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) { - rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset, proofType) +func ChallengeBasic(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) { + rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset) if version == valhelper.ValidatorV2 { rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) @@ -169,9 +149,8 @@ interaction: } } -func ChallengeAsserterBisectTimeout( - t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) { - rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset, proofType) +func ChallengeAsserterBisectTimeout(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) { + rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset) if version == valhelper.ValidatorV2 { rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) @@ -253,9 +232,8 @@ interaction: } } -func ChallengeChallengerBisectTimeout( - t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) { - rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset, proofType) +func ChallengeChallengerBisectTimeout(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) { + rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset) if version == valhelper.ValidatorV2 { rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) @@ -335,9 +313,8 @@ interaction: } } -func ChallengeChallengerProvingTimeout( - t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) { - rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset, proofType) +func ChallengeChallengerProvingTimeout(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) { + rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset) if version == valhelper.ValidatorV2 { rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) @@ -421,9 +398,8 @@ interaction: } } -func ChallengeInvalidProofFail( - t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) { - rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset, proofType) +func ChallengeInvalidProofFail(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) { + rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset) if version == valhelper.ValidatorV2 { rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) @@ -538,9 +514,8 @@ interaction: } } -func ChallengeForceDeleteOutputBySecurityCouncil( - t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) { - rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset, proofType) +func ChallengeForceDeleteOutputBySecurityCouncil(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) { + rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset) if version == valhelper.ValidatorV2 { rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) @@ -633,8 +608,8 @@ interaction: } } -func MultipleChallenges(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8, proofType testdata.ProofType) { - rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset, proofType) +func MultipleChallenges(t *testing.T, deltaTimeOffset *hexutil.Uint64, version uint8) { + rt := defaultRuntime(t, setupSequencerTest, deltaTimeOffset) if version == valhelper.ValidatorV2 { rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) diff --git a/op-e2e/actions/l2_runtime.go b/op-e2e/actions/l2_runtime.go index 73c066c5d..5db4af0a2 100644 --- a/op-e2e/actions/l2_runtime.go +++ b/op-e2e/actions/l2_runtime.go @@ -9,7 +9,6 @@ import ( "github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum-optimism/optimism/op-service/sources" "github.com/ethereum-optimism/optimism/op-service/testlog" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" @@ -57,7 +56,6 @@ type Runtime struct { assetMgrContract *bindings.AssetManagerCaller assetTokenContract *bindings.GovernanceTokenCaller targetInvalidBlockNumber uint64 - ChallengeProofType testdata.ProofType outputIndex *big.Int outputOnL1 bindings.TypesCheckpointOutput txHash common.Hash @@ -68,37 +66,23 @@ type Runtime struct { type SetupSequencerTestFunc = func(t Testing, sd *e2eutils.SetupData, log log.Logger) (*L1Miner, *L2Engine, *L2Sequencer) // defaultRuntime is currently only used for l2_challenger_test. -func defaultRuntime( - gt *testing.T, setupSequencerTest SetupSequencerTestFunc, deltaTimeOffset *hexutil.Uint64, proofType testdata.ProofType, -) Runtime { +func defaultRuntime(gt *testing.T, setupSequencerTest SetupSequencerTestFunc, deltaTimeOffset *hexutil.Uint64) Runtime { t := NewDefaultTesting(gt) dp := e2eutils.MakeDeployParams(t, defaultRollupTestParams) - if proofType == testdata.ZkVMType { - genesisActivation := hexutil.Uint64(0) - deltaTimeOffset = &genesisActivation - mptTimeOffset := hexutil.Uint64(2) - dp.DeployConfig.L2GenesisEcotoneTimeOffset = deltaTimeOffset - dp.DeployConfig.L2GenesisKromaMPTTimeOffset = &mptTimeOffset - } dp.DeployConfig.L2GenesisDeltaTimeOffset = deltaTimeOffset sd := e2eutils.Setup(t, dp, defaultAlloc) l := testlog.Logger(t, log.LvlDebug) rt := Runtime{ - t: t, - dp: dp, - sd: sd, - l: l, - l1BlockDelta: 6, - ChallengeProofType: proofType, + t: t, + dp: dp, + sd: sd, + l: l, + l1BlockDelta: 6, } rt.miner, rt.seqEngine, rt.sequencer = setupSequencerTest(rt.t, rt.sd, rt.l) rt.setupBatcher(dp) - if proofType == testdata.ZkVMType { - rt.assertReplaceWithMockColosseum() - } - return rt } @@ -149,13 +133,13 @@ func (rt *Runtime) setupValidator(pk *ecdsa.PrivateKey, setInvalidBlockNumber bo var validatorRollupClient *sources.RollupClient if isMalicious { // setup mockup rpc for returning invalid output - validatorRPC, err := e2eutils.NewMaliciousL2RPC(rt.sequencer.RPCClient(), rt.ChallengeProofType) + validatorRPC, err := e2eutils.NewMaliciousL2RPC(rt.sequencer.RPCClient(), testdata.DefaultProofType) require.NoError(rt.t, err) validatorRPC.SetTargetBlockNumber(rt.targetInvalidBlockNumber) validatorRollupClient = sources.NewRollupClient(validatorRPC) } else { // setup mockup rpc for returning valid output - validatorRPC, err := e2eutils.NewHonestL2RPC(rt.sequencer.RPCClient(), rt.ChallengeProofType) + validatorRPC, err := e2eutils.NewHonestL2RPC(rt.sequencer.RPCClient(), testdata.DefaultProofType) require.NoError(rt.t, err) if setInvalidBlockNumber { validatorRPC.SetTargetBlockNumber(rt.targetInvalidBlockNumber) @@ -229,31 +213,6 @@ func (rt *Runtime) assertRedeployValPoolToTerminate(newTerminationIndex *big.Int require.Equal(rt.t, types.ReceiptStatusSuccessful, receipt.Status, "upgrade tx submission failed") } -// assertReplaceWithMockColosseum deploys MockColosseum which has setL1Head function and upgrades proxy for challenge test. -// It also asserts that the deploying and upgrade tx is successful. -func (rt *Runtime) assertReplaceWithMockColosseum() { - deployTx, upgradeTx, err := e2eutils.ReplaceWithMockColosseum( - rt.miner.EthClient(), - rt.dp.Secrets.SysCfgOwner, - rt.sd.RollupCfg.L1ChainID, - rt.sd.DeploymentsL1, - rt.dp.DeployConfig, - ) - require.NoError(rt.t, err) - - // Check deploy tx submission was successful - rt.includeL1BlockByTx(deployTx.Hash()) - receipt, err := rt.miner.EthClient().TransactionReceipt(rt.t.Ctx(), deployTx.Hash()) - require.NoError(rt.t, err) - require.Equal(rt.t, types.ReceiptStatusSuccessful, receipt.Status, "deploy tx submission failed") - - // Check upgrade tx submission was successful - rt.includeL1BlockByTx(upgradeTx.Hash()) - receipt, err = rt.miner.EthClient().TransactionReceipt(rt.t.Ctx(), upgradeTx.Hash()) - require.NoError(rt.t, err) - require.Equal(rt.t, types.ReceiptStatusSuccessful, receipt.Status, "upgrade tx submission failed") -} - // setupOutputSubmitted sets output submission by validator. func (rt *Runtime) setupOutputSubmitted(version uint8) { // NOTE(chokobole): It is necessary to wait for one finalized (or safe if AllowNonFinalized @@ -326,22 +285,6 @@ func (rt *Runtime) setupChallenge(challenger *L2Validator, version uint8) { require.NoError(rt.t, err) require.NotNil(rt.t, challenge, "challenge not found") - // mock challenge.l1Head for zkVM challenge test - if rt.ChallengeProofType == testdata.ZkVMType { - txOpts, err := bind.NewKeyedTransactorWithChainID(rt.dp.Secrets.Alice, rt.sd.RollupCfg.L1ChainID) - require.NoError(rt.t, err) - tx, err := rt.colosseumContract.SetL1Head(txOpts, rt.outputIndex, challenger.address, testdata.ChallengeL1Head) - require.NoError(rt.t, err) - - // include tx on L1 - rt.includeL1BlockByTx(tx.Hash()) - - // Check whether the submission was successful - receipt, err := rt.miner.EthClient().TransactionReceipt(rt.t.Ctx(), tx.Hash()) - require.NoError(rt.t, err) - require.Equal(rt.t, types.ReceiptStatusSuccessful, receipt.Status, "failed to set L1 head") - } - if version == valhelper.ValidatorV1 { // check pending bond amount after create challenge pendingBond, err := rt.valPoolContract.GetPendingBond(nil, rt.outputIndex, challenger.address) diff --git a/op-e2e/actions/l2_validator_test.go b/op-e2e/actions/l2_validator_test.go index 81e798b87..92990d2c1 100644 --- a/op-e2e/actions/l2_validator_test.go +++ b/op-e2e/actions/l2_validator_test.go @@ -11,7 +11,6 @@ import ( "github.com/kroma-network/kroma/kroma-bindings/bindings" "github.com/kroma-network/kroma/op-e2e/e2eutils/validator" - "github.com/kroma-network/kroma/op-e2e/testdata" ) // TestValidatorBatchType run each validator-related test case in singular batch mode and span batch mode. @@ -40,7 +39,7 @@ func TestValidatorBatchType(t *testing.T) { } func RunValidatorPoolTest(gt *testing.T, deltaTimeOffset *hexutil.Uint64) { - rt := defaultRuntime(gt, setupSequencerTest, deltaTimeOffset, testdata.DefaultProofType) + rt := defaultRuntime(gt, setupSequencerTest, deltaTimeOffset) rt.setupHonestValidator(false) // bind contracts @@ -53,7 +52,7 @@ func RunValidatorPoolTest(gt *testing.T, deltaTimeOffset *hexutil.Uint64) { } func RunValidatorManagerTest(gt *testing.T, deltaTimeOffset *hexutil.Uint64) { - rt := defaultRuntime(gt, setupSequencerTest, deltaTimeOffset, testdata.DefaultProofType) + rt := defaultRuntime(gt, setupSequencerTest, deltaTimeOffset) // Redeploy and upgrade ValidatorPool to set the termination index to a smaller value for ValidatorManager test rt.assertRedeployValPoolToTerminate(defaultValPoolTerminationIndex) From 6d9e1cf05017d60e1b9257933cd729de9eb359c2 Mon Sep 17 00:00:00 2001 From: sm-stack Date: Thu, 19 Dec 2024 16:52:41 +0900 Subject: [PATCH 6/8] test(contracts): replace with new zkVM testdata and enable zkVM challenge test --- packages/contracts/.gas-snapshot | 2 +- packages/contracts/contracts/test/Colosseum.t.sol | 2 +- .../contracts/test/testdata/ZkVmTestData.sol | 15 +++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/contracts/.gas-snapshot b/packages/contracts/.gas-snapshot index 96a3bc016..bb34713e9 100644 --- a/packages/contracts/.gas-snapshot +++ b/packages/contracts/.gas-snapshot @@ -113,7 +113,7 @@ ColosseumTest:test_forceDeleteOutput_succeeds() (gas: 622988) ColosseumTest:test_initialize_succeeds() (gas: 34291) ColosseumTest:test_isInCreationPeriod_succeeds() (gas: 43275) ColosseumTest:test_proveFaultWithZkEvm_succeeds() (gas: 2629287) -ColosseumTest:test_proveFaultWithZkVm_succeeds() (gas: 2631088) +ColosseumTest:test_proveFaultWithZkVm_succeeds() (gas: 1180644) ColosseumTest:test_proveFault_cancelChallenge_succeeds() (gas: 3086364) ColosseumTest:test_proveFault_finalizedOutput_reverts() (gas: 764729) Colosseum_MptTransition_Test:test_createChallenge_mptFirstOutputIndex_reverts() (gas: 74743) diff --git a/packages/contracts/contracts/test/Colosseum.t.sol b/packages/contracts/contracts/test/Colosseum.t.sol index 129d8b6fa..87294436d 100644 --- a/packages/contracts/contracts/test/Colosseum.t.sol +++ b/packages/contracts/contracts/test/Colosseum.t.sol @@ -731,7 +731,7 @@ contract ColosseumTest is Colosseum_Initializer { } function test_proveFaultWithZkVm_succeeds() external { - isZkVm = false; // TODO(seolaoh): enable when test data added + isZkVm = true; uint256 outputIndex = targetOutputIndex; Types.CheckpointOutput memory targetOutput = oracle.getL2Output(outputIndex); diff --git a/packages/contracts/contracts/test/testdata/ZkVmTestData.sol b/packages/contracts/contracts/test/testdata/ZkVmTestData.sol index 14e791624..db3837dd8 100644 --- a/packages/contracts/contracts/test/testdata/ZkVmTestData.sol +++ b/packages/contracts/contracts/test/testdata/ZkVmTestData.sol @@ -5,18 +5,21 @@ import { Types } from "contracts/libraries/Types.sol"; library ZkVmTestData { bytes32 internal constant ZKVM_PROGRAM_V_KEY = - 0x6c15e3bb696329c15f6b963e40ac4c3841e726ef6fcaea042daf4b3d056e8d2f; + 0x00ad7cc293beb89796e8a9713ab7189b33faf6975325da0707d2d9cb129db055; uint256 internal constant INVALID_BLOCK_NUMBER = 21; - bytes32 internal constant PREV_OUTPUT_ROOT = 0x0; - bytes32 internal constant TARGET_OUTPUT_ROOT = 0x0; - bytes32 internal constant L1_HEAD = 0x0; + bytes32 internal constant PREV_OUTPUT_ROOT = + 0x8906045a3f098db0d7a5f7d9400e1299718fc9563b30417e887cf0c91a375fea; + bytes32 internal constant TARGET_OUTPUT_ROOT = + 0x53ae7b0c4ef070efb9bec7ae130edce19797b2283f020e085a69796ad43b6c51; + bytes32 internal constant L1_HEAD = + 0xc5f36b4618de22a58113263406f398342a7624d832fda0ccd05ab61b0ceb5352; function zkVmProof() internal pure returns (Types.ZkVmProof memory) { return Types.ZkVmProof({ zkVmProgramVKey: ZKVM_PROGRAM_V_KEY, - publicValues: hex"2000000000000000ee40a952b20e40f8911e64179baf6afe0cac0e6226f18719560efa55ee51e701200000000000000048f9fe8c248855f9da9e8f6e06f3215f57a6a96f684b5fc63232b565bdb98479200000000000000042c0d60066fbd229758f8deaee337afc6cd0a75ddf120896258a4fd846aafbfd", - proofBytes: hex"097da0323fa72c64d59682d6991bab9a50c996336d5fd070f0d56ef3ecb9a5d00d489a87499d9b0026b1fecda38a6edd41d290ffd053a1abb0747b0dbb5b66ff1d35d77f6bcf425a06872e78d8c544966b577e1cbd63975a8d371766ec0b642b279a6d15b4d7b8dd3b47da0f02122e475d6b6a8f97422d56f18acc2184f245e50eae81146701d25724a5c2b9baf82ae93ca264d11c4a481dba73886b01c642932557ed9e6845c6e16562ba4521add47de2c5aa811502c73e8735c874c4db4ba90df225349e121ce92fe27aebb8e236ff905b9911df6f67b52c82a34fe8933c9b053cb8567250f35115a32ae989650483221ce6a4490f092f9543f30a89f065c3116de44ce1a7ca5f947b2557373d893c6989c7b5c2bc42be86f8b059dc6a5fa106bd0c0abd63686b42f3706a366f270767b050e1ba3ec5a454b520023fd40cd60fe55fe86edeea81ff5b7d32347b9c086e969db21bc20c635ca3f6462b52d65f0fc8f4b067b8d4ec08fc2bbf1c23bf0160488d3a828b73acf294b4d42cc1cf4112ca129ba4dca38719090f2be26e2af92380b3ddb339a50fd42fb66e9296c7471ee0f694e35863ed363a77c1ca0e0b3fe1c57f566d36542cb2ef47d3b1eb3daf25ebed15fd6a0adaaf2f37c105b5298d9113d5b2ba641d82bfad0ec4cac0827b1a2c814d228825f742cd68bcec14d229025f551a812af3657b69ecae33f360d00000000728afb9bcba40e0fbc85d775ae7ea50aff5f22ee0e77b7655e732e7a2ee068e1d1c3e5dd8edaa6fc4cd247b4589c8b94c3dac94e2f7a72888ca531087666a4b702eaae316ed0d4df9b072fe8c7392814a25eea4b2c4922d51fb0a6cf64d64968e1e25234f6c4639dbdd3d760ee52c7af731ca9faa84edff95112c335e02a4212d26b444f87cd3f4f831496168d34df8f467ba62b9593672ae25edfeb08b366c24192e1dc95648187b63d52615c37bb108358c6c49ce51bf3e2b77bb15b72efbb6283e36d4e0b3a80f18281201ab420a5a81efc7af8e3cdfb64c693b2ddedb94a21a7462dc9ec33d761306721c1f8d5e8f4b517724a01673bba4853d54591c6d8213b2d1456728311ec65f4f13f40c383f8e72f7890954051eccd05bc3c1fe44e6224c2e29bda437a135eba9ed261aa9a09ccb612dcf5c87dad3e60b3cdbb118d9000000011ae99cd49723c91c7c9001f4256a2c378b1896d5bdfb32f08ce2b329a5587ef720d4ab2bb8e82786d89e196bfe3043c9ffd38e1c622e3d41061c3ad7347dece5" + publicValues: hex"20000000000000008906045a3f098db0d7a5f7d9400e1299718fc9563b30417e887cf0c91a375fea200000000000000053ae7b0c4ef070efb9bec7ae130edce19797b2283f020e085a69796ad43b6c512000000000000000c5f36b4618de22a58113263406f398342a7624d832fda0ccd05ab61b0ceb5352", + proofBytes: hex"54bdcae3256eaae3a90569ad01460800c08e2e06c3855ced450de49dd34e32854eb67a8816b72b8294ea24733d2b47253edf6796321dc105f65d4509ee27dcdf849c453327152d4769901e03502fb829cfb6712c6f6e1088feb007a2cea4d8ae37a055671a40948624b98a91069134ea8ea6226e2f6a1457abec73c7d54c3f84eae953650fff44bd6eb127f188b42cf0b4552d9332ab154323b704fce64a396882f54dab173beedccb24459be8ba08df8b8682b90bed088ca80581e6280ab0299e26a5440c0dea757e11484d1bfb9cc54cb5b999b3d9b82ac4106ad0beb705d2a40467061ec853e02449daa488a94aae8c9d1147065857a08c80ced9a04decd9d5f96d64001c6675f4f317af95829e40e3274101e9baa1e539111a0654c3628da41cc4610dd0dde84ff63c37fd213cb6ae5a86e22c0a088249aa3752ee4beb023777e02802629c8c5bfb2197357eb1566a77f4169177c826ba62d784693318795cea293e048bebd2ac5e88b24ff21e8547a3edf369173a0c3106ee2fef2d807103f9a1c91d7ef6307a47781f8ec796db6f3e1e6256b14aefb0be95d15818eaea4fa6b8ab2b2605cc47f8010abd47fabc7be65ea31096f26cbdc6ac2fd7fd8af7be18fa9e0a3500fb95305139353357d88322ec0d64026fe5a9b5c5f8a124de743207eb2a1dcf72d0168eae8a898ce3fec30a266d95ab8a8359547e7c56894f89f940d90e097cfe99058f651935fbe199211af862819d46cbb1722643447f9e5100714ddf2c3805f779b66f864138e7596ec5a224816bb75cb6a269387cb10bf269229d301fff5a2f5ef5191d95b89be192e5295bb20eb7f2b81bb48513cc2e1f389686da0eb207a4d13446c0b1482f1b1d1ff61fde440f4d194b2f1b9a4ea1bc2c394bc72be7e54c5ff0fff46f22939d5bb4f5e8e12683cbf26915f030efa53541e61583081eef0c4eef42367c3f341f6283fe706def1fd0b918c440144a12cb30fea3620db53fda424496de0e44526cb992e2071e8a4d7c3c427dfe45a1ad2ed61fac6b1d353e45fb0bb3371366931164f97d439a05a188e38673f2c9aba54e4677272c085ab877f90baf7e56a92c2ab2447d75b662fc04cccf3f9716dfaf575662e2a003d77395c3c8a90706526d8ed1dbfde71dde5739670a8bf30fecc98f6b2929fa1876db545698cfc3233f1101212ebe78c6db2460071fcce10504c35ff472738e" }); } } From 72e9307a1bf7abf634368e98e556ad76d84225e2 Mon Sep 17 00:00:00 2001 From: sm-stack Date: Thu, 19 Dec 2024 17:02:02 +0900 Subject: [PATCH 7/8] feat: apply first PR review --- op-e2e/e2eutils/setup.go | 8 ++++---- op-e2e/setup.go | 19 ++++++++++++++----- op-e2e/system_test.go | 5 ----- op-e2e/testdata/challenge_test_data.go | 15 --------------- .../contracts/L1/ZKProofVerifier.sol | 6 ++++-- 5 files changed, 22 insertions(+), 31 deletions(-) diff --git a/op-e2e/e2eutils/setup.go b/op-e2e/e2eutils/setup.go index 29cd2d905..41524ae3e 100644 --- a/op-e2e/e2eutils/setup.go +++ b/op-e2e/e2eutils/setup.go @@ -379,7 +379,7 @@ func ReplaceWithMockColosseum( return } -// DeploySP1Verifier deploys a SP!VerifierPlonk contract which is used in ZKProofVerifier. +// DeploySP1Verifier deploys a SP1VerifierPlonk contract which is used in ZKProofVerifier. func DeploySP1Verifier( l1Client *ethclient.Client, sysCfgOwner *ecdsa.PrivateKey, @@ -402,7 +402,7 @@ func DeploySP1Verifier( return } -// RedeployZKProofVerifier deploys a new ZKProofVerifier with given SP1Verifier and zkVmProgramKey. +// RedeployZKProofVerifier deploys a new ZKProofVerifier with given SP1Verifier. func RedeployZKProofVerifier( l1Client *ethclient.Client, sysCfgOwner *ecdsa.PrivateKey, @@ -410,7 +410,7 @@ func RedeployZKProofVerifier( l1Deployments *genesis.L1Deployments, deployConfig *genesis.DeployConfig, sp1Verifier common.Address, - zkVmProgramKey [32]byte, + zkVmProgramVKey [32]byte, ) (deployTx, upgradeTx *types.Transaction, err error) { txOpts, err := bind.NewKeyedTransactorWithChainID(sysCfgOwner, l1ChainID) if err != nil { @@ -426,7 +426,7 @@ func RedeployZKProofVerifier( new(big.Int).SetUint64(deployConfig.ColosseumMaxTxs), l1Deployments.ZKMerkleTrie, sp1Verifier, - zkVmProgramKey, + zkVmProgramVKey, ) if err != nil { return diff --git a/op-e2e/setup.go b/op-e2e/setup.go index 7b8ce821c..e8279f995 100644 --- a/op-e2e/setup.go +++ b/op-e2e/setup.go @@ -899,7 +899,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste } // Check deploy tx and upgrade tx submission were successful - err = waitDeployAndUpgradeTxs(l1Client, deployTx.Hash(), upgradeTx.Hash()) + err = waitTxs(l1Client, deployTx.Hash(), upgradeTx.Hash()) if err != nil { return nil, err } @@ -1075,6 +1075,12 @@ func startChallengeSystem(sys *System, cfg *SystemConfig) error { return fmt.Errorf("unable to replace Colosseum: %w", err) } + // Check deploy tx and upgrade tx submission were successful + err = waitTxs(l1Client, deployTx.Hash(), upgradeTx.Hash()) + if err != nil { + return err + } + // Deploy SP1Verifier contract sp1Verifier, deployTx, err := e2eutils.DeploySP1Verifier( l1Client, @@ -1085,7 +1091,10 @@ func startChallengeSystem(sys *System, cfg *SystemConfig) error { return fmt.Errorf("unable to deploy SP1Verifier: %w", err) } - err = waitDeployAndUpgradeTxs(l1Client, deployTx.Hash()) + err = waitTxs(l1Client, deployTx.Hash()) + if err != nil { + return err + } // Deploy new ZKProofVerifier impl and upgrade ZKProofVerifier proxy deployTx, upgradeTx, err = e2eutils.RedeployZKProofVerifier( @@ -1102,7 +1111,7 @@ func startChallengeSystem(sys *System, cfg *SystemConfig) error { } // Check deploy tx and upgrade tx submission were successful - err = waitDeployAndUpgradeTxs(l1Client, deployTx.Hash(), upgradeTx.Hash()) + err = waitTxs(l1Client, deployTx.Hash(), upgradeTx.Hash()) if err != nil { return err } @@ -1216,14 +1225,14 @@ func startChallengeSystem(sys *System, cfg *SystemConfig) error { return nil } -func waitDeployAndUpgradeTxs(client *ethclient.Client, txs ...common.Hash) error { +func waitTxs(client *ethclient.Client, txs ...common.Hash) error { ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() for _, tx := range txs { _, err := wait.ForReceiptOK(ctx, client, tx) if err != nil { - return fmt.Errorf("failed to wait deploy/upgrade tx success: %w", err) + return fmt.Errorf("failed to wait tx success: %w", err) } } return nil diff --git a/op-e2e/system_test.go b/op-e2e/system_test.go index 27d7c6ef5..0d5de9aab 100644 --- a/op-e2e/system_test.go +++ b/op-e2e/system_test.go @@ -2131,7 +2131,6 @@ func TestZkVMChallenge(t *testing.T) { cfg.EnableChallenge = true cfg.ChallengeProofType = testdata.ZkVMType cfg.NonFinalizedOutputs = true // speed up the time till we see checkpoint outputs - cfg.ValidatorVersion = valhelper.ValidatorV2 sys, err := cfg.Start(t) require.NoError(t, err, "Error starting up system") @@ -2143,10 +2142,6 @@ func TestZkVMChallenge(t *testing.T) { // Deposit to ValidatorPool to be a challenger validatorHelper.DepositToValPool(cfg.Secrets.Challenger1, big.NewInt(1_000_000_000)) - // Register to ValidatorManager to be a challenger - validatorHelper.RegisterToValMgr(cfg.Secrets.Challenger1, - cfg.DeployConfig.ValidatorManagerMinActivateAmount.ToInt(), cfg.Secrets.Addresses().Challenger1) - l2OutputOracle, err := bindings.NewL2OutputOracleCaller(cfg.L1Deployments.L2OutputOracleProxy, l1Client) require.NoError(t, err) diff --git a/op-e2e/testdata/challenge_test_data.go b/op-e2e/testdata/challenge_test_data.go index ca8954451..2ea4aa8c8 100644 --- a/op-e2e/testdata/challenge_test_data.go +++ b/op-e2e/testdata/challenge_test_data.go @@ -37,7 +37,6 @@ func ValidProofType(value ProofType) bool { var ( TargetBlockNumber = uint64(21) - EmptyHash = common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000") // for zkVM challenge ZkVMVKeyHash = common.HexToHash("0x00ad7cc293beb89796e8a9713ab7189b33faf6975325da0707d2d9cb129db055") @@ -88,13 +87,6 @@ func SetPrevOutputResponse(o *eth.OutputResponse, proofType ProofType) error { case ZkVMType: o.OutputRoot = eth.Bytes32(zkVMPrevOutput) // Other values than output root won't be used in zkVM challenge, so we can set them to empty hash - o.WithdrawalStorageRoot = EmptyHash - o.StateRoot = EmptyHash - o.BlockRef = eth.L2BlockRef{ - Number: TargetBlockNumber - 1, - Hash: EmptyHash, - ParentHash: common.HexToHash("0x"), - } case ZkEVMType: outputRoot, err := rollup.ComputeKromaL2OutputRoot(&bindings.TypesOutputRootProof{ Version: eth.OutputVersionV0, @@ -175,13 +167,6 @@ func SetTargetOutputResponse(o *eth.OutputResponse, proofType ProofType) error { case ZkVMType: o.OutputRoot = eth.Bytes32(zkVMTargetOutput) // Other values than output root won't be used in zkVM challenge, so we can set them to empty hash - o.WithdrawalStorageRoot = EmptyHash - o.StateRoot = EmptyHash - o.BlockRef = eth.L2BlockRef{ - Number: TargetBlockNumber, - Hash: EmptyHash, - ParentHash: EmptyHash, - } case ZkEVMType: nextBlockhash := common.HexToHash("0x6c4e19b1fc27f6a075c67f35bd15b21c40025a892e32cdb8d9b5f5d5ec60093a") outputRoot, err := rollup.ComputeKromaL2OutputRoot(&bindings.TypesOutputRootProof{ diff --git a/packages/contracts/contracts/L1/ZKProofVerifier.sol b/packages/contracts/contracts/L1/ZKProofVerifier.sol index 42596270b..f74aff473 100644 --- a/packages/contracts/contracts/L1/ZKProofVerifier.sol +++ b/packages/contracts/contracts/L1/ZKProofVerifier.sol @@ -200,10 +200,12 @@ contract ZKProofVerifier is ISemver { _validatePublicInputOutput( _storedSrcOutput, _storedDstOutput, - bytes32(_zkVmProof.publicValues[8:40]), - bytes32(_zkVmProof.publicValues[48:80]) + bytes32(_zkVmProof.publicValues[8:40]), // skip ABI-encoding prefix at publicValues[0:8]. + bytes32(_zkVmProof.publicValues[48:80]) // skip ABI-encoding prefix at publicValues[40:48]. ); + // Check if the L1 block hash is correct. + // Skip ABI-encoding prefix at publicValues[80:88]. if (bytes32(_zkVmProof.publicValues[88:120]) != _storedL1Head) revert InvalidPublicInput(); SP1_VERIFIER.verifyProof( From 755ea9d977a396f3ff22b17ac715cf4908951616 Mon Sep 17 00:00:00 2001 From: sm-stack Date: Thu, 19 Dec 2024 18:19:59 +0900 Subject: [PATCH 8/8] feat: apply second PR review --- op-e2e/testdata/challenge_test_data.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/op-e2e/testdata/challenge_test_data.go b/op-e2e/testdata/challenge_test_data.go index 2ea4aa8c8..114b38221 100644 --- a/op-e2e/testdata/challenge_test_data.go +++ b/op-e2e/testdata/challenge_test_data.go @@ -86,7 +86,7 @@ func SetPrevOutputResponse(o *eth.OutputResponse, proofType ProofType) error { switch proofType { case ZkVMType: o.OutputRoot = eth.Bytes32(zkVMPrevOutput) - // Other values than output root won't be used in zkVM challenge, so we can set them to empty hash + // Other values than output root won't be used in zkVM challenge, so we don't have to mock them case ZkEVMType: outputRoot, err := rollup.ComputeKromaL2OutputRoot(&bindings.TypesOutputRootProof{ Version: eth.OutputVersionV0, @@ -166,7 +166,7 @@ func SetTargetOutputResponse(o *eth.OutputResponse, proofType ProofType) error { switch proofType { case ZkVMType: o.OutputRoot = eth.Bytes32(zkVMTargetOutput) - // Other values than output root won't be used in zkVM challenge, so we can set them to empty hash + // Other values than output root won't be used in zkVM challenge, so we don't have to mock them case ZkEVMType: nextBlockhash := common.HexToHash("0x6c4e19b1fc27f6a075c67f35bd15b21c40025a892e32cdb8d9b5f5d5ec60093a") outputRoot, err := rollup.ComputeKromaL2OutputRoot(&bindings.TypesOutputRootProof{