diff --git a/bindings/bin/rollup_deployed.hex b/bindings/bin/rollup_deployed.hex index 493a04775..87d9fd963 100644 --- a/bindings/bin/rollup_deployed.hex +++ b/bindings/bin/rollup_deployed.hex @@ -1 +1 @@ -0x608060405260043610610369575f3560e01c8063728cdbca116101c8578063b35dac4e116100fd578063cf9a67451161009d578063dff7827e1161006d578063dff7827e14610b20578063e3fff1dd14610b35578063f2fde38b14610b54578063fb1e8b0414610b73575f80fd5b8063cf9a674514610aae578063d279c19114610acd578063d8dc99d214610aec578063de8b303514610b01575f80fd5b8063bedb86fb116100d8578063bedb86fb14610a48578063c555389214610a67578063cd4edc6914610a86578063ce5db8d614610a99575f80fd5b8063b35dac4e146109eb578063b3e0a50914610a0a578063b8d0a1b014610a29575f80fd5b8063a3c9e94c11610168578063a4f209b011610143578063a4f209b01461096d578063abc8d68d1461098c578063b31a77d3146109b7578063b3484425146109cc575f80fd5b8063a3c9e94c1461090b578063a415d8dc1461092a578063a479265d14610958575f80fd5b80638da5cb5b116101a35780638da5cb5b146107ee5780638f1d37761461080b578063910129d4146108bb57806397fc007c146108ec575f80fd5b8063728cdbca14610797578063843bc9a1146107b657806388b1ea09146107d5575f80fd5b80632a213ba11161029e5780635ef7a94a1161023e57806367caa37a1161021957806367caa37a1461071a57806368589dfa146107395780636c578c1d14610764578063715018a614610783575f80fd5b80635ef7a94a1461063d5780635f77cf1d146106af57806361267290146106fb575f80fd5b80633e001b66116102795780633e001b66146105df57806341f756da146105f457806357e0af6c146106075780635c975abb14610626575f80fd5b80632a213ba11461055e5780632b7ac3f3146105895780633b70c18a146105c0575f80fd5b80631544ba3a1161030957806318af3b2b116102e457806318af3b2b146104b957806321e2f9e0146104e95780632362f03e146105085780632571098d14610533575f80fd5b80631544ba3a14610470578063163d9bee1461048f57806318463fb0146104a4575f80fd5b806310d445831161034457806310d44583146103fb578063116a1f421461041a578063121dcd501461043c5780631336110114610451575f80fd5b806304d7721514610374578063059def61146103b75780630ceb6780146103da575f80fd5b3661037057005b5f80fd5b34801561037f575f80fd5b506103a261038e366004614f8a565b60a36020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156103c2575f80fd5b506103cc609d5481565b6040519081526020016103ae565b3480156103e5575f80fd5b506103f96103f4366004614fb7565b610b88565b005b348015610406575f80fd5b506103f9610415366004615015565b610c5a565b348015610425575f80fd5b506103a2610434366004614f8a565b609d54101590565b348015610447575f80fd5b506103cc609e5481565b34801561045c575f80fd5b506103f961046b36600461505d565b610f96565b34801561047b575f80fd5b506103f961048a3660046150ac565b6114b3565b34801561049a575f80fd5b506103cc60ae5481565b3480156104af575f80fd5b506103cc60a75481565b3480156104c4575f80fd5b506103a26104d3366004614f8a565b5f90815260a26020526040902060010154421090565b3480156104f4575f80fd5b506103a2610503366004614f8a565b611872565b348015610513575f80fd5b506103cc610522366004614f8a565b60a16020525f908152604090205481565b34801561053e575f80fd5b506103cc61054d366004614f8a565b60a06020525f908152604090205481565b348015610569575f80fd5b506103cc610578366004614f8a565b60ad6020525f908152604090205481565b348015610594575f80fd5b50609c546105a8906001600160a01b031681565b6040516001600160a01b0390911681526020016103ae565b3480156105cb575f80fd5b50609b546105a8906001600160a01b031681565b3480156105ea575f80fd5b506103cc60aa5481565b6103f961060236600461513a565b6118a0565b348015610612575f80fd5b506103f9610621366004614f8a565b611ba4565b348015610631575f80fd5b5060655460ff166103a2565b348015610648575f80fd5b50610686610657366004614f8a565b60a26020525f90815260409020805460018201546002830154600390930154919290916001600160a01b031684565b604080519485526020850193909352918301526001600160a01b031660608201526080016103ae565b3480156106ba575f80fd5b506106e27f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff90911681526020016103ae565b348015610706575f80fd5b506103f9610715366004614f8a565b611c4f565b348015610725575f80fd5b506103f961073436600461513a565b611e2a565b348015610744575f80fd5b506103cc610753366004614f8a565b60ab6020525f908152604090205481565b34801561076f575f80fd5b506103f961077e366004614fb7565b612175565b34801561078e575f80fd5b506103f9612232565b3480156107a2575f80fd5b506103f96107b1366004615174565b612245565b3480156107c1575f80fd5b506103f96107d03660046151cf565b61254e565b3480156107e0575f80fd5b5060a6546103a29060ff1681565b3480156107f9575f80fd5b506033546001600160a01b03166105a8565b348015610816575f80fd5b50610877610825366004614f8a565b60a46020525f9081526040902080546001820154600283015460039093015467ffffffffffffffff831693680100000000000000009093046001600160a01b0316929060ff8082169161010090041686565b6040805167ffffffffffffffff90971687526001600160a01b03909516602087015293850192909252606084015215156080830152151560a082015260c0016103ae565b3480156108c6575f80fd5b506103a26108d5366004614f8a565b5f90815260a4602052604090206003015460ff1690565b3480156108f7575f80fd5b506103f9610906366004614fb7565b612895565b348015610916575f80fd5b506097546105a8906001600160a01b031681565b348015610935575f80fd5b506103a2610944366004614fb7565b609f6020525f908152604090205460ff1681565b348015610963575f80fd5b506103cc60995481565b348015610978575f80fd5b506103f9610987366004614f8a565b612978565b348015610997575f80fd5b506103cc6109a6366004614fb7565b60a56020525f908152604090205481565b3480156109c2575f80fd5b506103cc60a85481565b3480156109d7575f80fd5b506103f96109e63660046151f7565b612a28565b3480156109f6575f80fd5b506103f9610a05366004614fb7565b612d35565b348015610a15575f80fd5b506103f9610a2436600461505d565b612d8e565b348015610a34575f80fd5b506103f9610a433660046151f7565b61311f565b348015610a53575f80fd5b506103f9610a6236600461526b565b6131a8565b348015610a72575f80fd5b506103f9610a81366004614f8a565b6132e6565b6103f9610a9436600461529d565b613389565b348015610aa4575f80fd5b506103cc60985481565b348015610ab9575f80fd5b506103f9610ac8366004614f8a565b61391b565b348015610ad8575f80fd5b506103f9610ae7366004614fb7565b613a8a565b348015610af7575f80fd5b506103cc60ac5481565b348015610b0c575f80fd5b506103a2610b1b366004614f8a565b613b49565b348015610b2b575f80fd5b506103cc609a5481565b348015610b40575f80fd5b506103f9610b4f366004614f8a565b613b93565b348015610b5f575f80fd5b506103f9610b6e366004614fb7565b613c36565b348015610b7e575f80fd5b506103cc60a95481565b610b90613cc3565b6001600160a01b0381165f908152609f602052604090205460ff1615610bfd5760405162461bcd60e51b815260206004820152601f60248201527f6163636f756e7420697320616c72656164792061206368616c6c656e6765720060448201526064015b60405180910390fd5b6001600160a01b0381165f818152609f6020908152604091829020805460ff1916600190811790915591519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc00991015b60405180910390a250565b610c62613cc3565b5f8111610cb15760405162461bcd60e51b815260206004820152601560248201527f636f756e74206d757374206265206e6f6e7a65726f00000000000000000000006044820152606401610bf4565b5f80610cbd8585613d1d565b915091505f610cd0836001015160c01c90565b5f81815260a160205260409020549091508214610d2f5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b5f60a181610d3d87856152e4565b81526020019081526020015f205414610dbd5760405162461bcd60e51b8152602060048201526024808201527f726576657274696e67206d7573742073746172742066726f6d2074686520656e60448201527f64696e67000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b609d548111610e345760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c792072657665727420756e46696e616c697a6564206261746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b610e3f6001826152f7565b609e555b8315610f8e57604051829082907ecae2739091badfd91c373f0a16cede691e0cd25bb80cff77dd5caeb4710146905f90a35f81815260a16020526040812055610e8b81613b49565b15610ee6575f81815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091610ed69084906152e4565b909155505060a6805460ff191690555b5f81815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a85415801590610f46575060a85481145b15610f50575f60a8555b6001015f81815260a160205260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90940193915081610e43575b505050505050565b60a85415610fe65760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b610fee613dc5565b5f80610ffa8484613d1d565b915091505f61100d836001015160c01c90565b5f81815260a16020526040902054909150821461106c5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b61107581611872565b6110c15760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610bf4565b6110ca81613b49565b156111175760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610bf4565b5f81815260a4602052604090206003015460ff16156111785760405162461bcd60e51b815260206004820152601660248201527f62617463682073686f756c6420626520726576657274000000000000000000006044820152606401610bf4565b5f81815260a260205260409020600101544210156111d85760405162461bcd60e51b815260206004820152601960248201527f626174636820696e206368616c6c656e67652077696e646f77000000000000006044820152606401610bf4565b605983015160a05f6111eb6001856152f7565b81526020019081526020015f2054146112465760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610bf4565b5f81815260a06020526040902054156112a15760405162461bcd60e51b815260206004820152601660248201527f626174636820616c7265616479207665726966696564000000000000000000006044820152606401610bf4565b80609d54600101146112f55760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610bf4565b609d819055600160a35f61130a866099015190565b815260208101919091526040015f20805460ff191691151591909117905560798301515f82815260a0602052604090205561135961134c846011015160c01c90565b600985015160c01c613e18565b60a25f6113676001846152f7565b815260208101919091526040015f908120818155600180820183905560028201839055600390910180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560ab91906113c390846152f7565b81526020019081526020015f205f905560ad5f6001836113e391906152f7565b81526020019081526020015f205f905560a45f60018361140391906152f7565b815260208082019290925260409081015f90812080547fffffffff000000000000000000000000000000000000000000000000000000001681556001810182905560028101829055600301805461ffff1916905583815260a1909252902054817f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d61148f866079015190565b60998701516040805192835260208301919091520160405180910390a35050505050565b60a854156115035760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b61150b613dc5565b60ac54609e545f90815260a260205260408120549091429161152d91906152e4565b1090505f4260ac54609b5f9054906101000a90046001600160a01b03166001600160a01b031663b59b1a786040518163ffffffff1660e01b8152600401602060405180830381865afa158015611585573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115a9919061530a565b6115b391906152e4565b109050811580156115c15750805b15611628575f6115d76080890160608a01615321565b61ffff16116116285760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b81806116315750805b61167d5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642074696d696e670000000000000000000000000000000000006044820152606401610bf4565b5f61169361168e60208a018a615342565b613d1d565b5090505f6116a5826001015160c01c90565b6116b09060016152e4565b5f81815260ad60205260408120549192509015611750575f491561173c5760405162461bcd60e51b815260206004820152602f60248201527f6d757374206e6f7420636172727920626c6f62207768656e207573696e67207360448201527f746f72656420626c6f62206861736800000000000000000000000000000000006064820152608401610bf4565b505f81815260ad602052604090205461176b565b61176861176060208c018c6153a3565b60ff16613ecf565b90505b6117768a5f8361400a565b5f806117828b8b613d1d565b915091505f611795836001015160c01c90565b905080609e54146117e85760405162461bcd60e51b815260206004820152601660248201527f696e636f727265637420626174636820686561646572000000000000000000006044820152606401610bf4565b5f81815260a1602052604090205482146118445760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b5f81815260a26020526040902042600190910155611863838b8b614560565b50505050505050505050505050565b5f81815260a260205260408120541580159061189a57505f82815260a1602052604090205415155b92915050565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561190c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061193091906153c3565b61197c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b60a854156119cc5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b6119d4613dc5565b5f6119e561168e6020840184615342565b5090505f6119f7826001015160c01c90565b611a029060016152e4565b5f81815260ad602052604090205490915015611a865760405162461bcd60e51b815260206004820152602860248201527f636f6d6d69744261746368207265717569726573206e6f2073746f726564206260448201527f6c6f6220686173680000000000000000000000000000000000000000000000006064820152608401610bf4565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015611aea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b0e919061530a565b611b1891906152e4565b1015611b80575f611b2f6080850160608601615321565b61ffff1611611b805760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b5f611b9161176060208601866153a3565b9050611b9e84338361400a565b50505050565b611bac613cc3565b5f81118015611bbd57506099548114155b611c095760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e65772070726f6f662077696e646f7700000000000000006044820152606401610bf4565b609980549082905560408051828152602081018490527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a6191015b60405180910390a15050565b5f54600290610100900460ff16158015611c6f57505f5460ff8083169116105b611ce15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff831617610100179055611cff5f5460ff1690565b60ff16600214611d515760405162461bcd60e51b815260206004820152601660248201527f6d757374206861766520696e697469616c697a656421000000000000000000006044820152606401610bf4565b81611dc45760405162461bcd60e51b815260206004820152602760248201527f63616e206e6f742073657420737461746520726f6f742077697468206279746560448201527f73333228302921000000000000000000000000000000000000000000000000006064820152608401610bf4565b609e545f90815260ab6020526040902054611ded57609e545f90815260ab602052604090208290555b5f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611c43565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611e96573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611eba91906153c3565b611f065760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b60a85415611f565760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b611f5e613dc5565b5f4915611fad5760405162461bcd60e51b815260206004820152601f60248201527f636f6d6d69745374617465206d757374206e6f7420636172727920626c6f62006044820152606401610bf4565b5f611fbe61168e6020840184615342565b5090505f611fd0826001015160c01c90565b611fdb9060016152e4565b5f81815260ad602052604090205490915061205e5760405162461bcd60e51b815260206004820152602260248201527f6e6f2073746f72656420626c6f62206861736820666f7220746869732062617460448201527f63680000000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa1580156120c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120e6919061530a565b6120f091906152e4565b1015612158575f6121076080850160608601615321565b61ffff16116121585760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b61217083335f84815260ad602052604090205461400a565b505050565b61217d613cc3565b6001600160a01b0381165f908152609f602052604090205460ff166121e45760405162461bcd60e51b815260206004820152601b60248201527f6163636f756e74206973206e6f742061206368616c6c656e67657200000000006044820152606401610bf4565b6001600160a01b0381165f818152609f60209081526040808320805460ff19169055519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc0099101610c4f565b61223a613cc3565b6122435f614713565b565b5f54610100900460ff161580801561226357505f54600160ff909116105b8061227c5750303b15801561227c57505f5460ff166001145b6122ee5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805460ff19166001179055801561230f575f805461ff0019166101001790555b6001600160a01b038616158061232c57506001600160a01b038516155b15612363576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0387166123b95760405162461bcd60e51b815260206004820152601a60248201527f696e76616c6964207375626d697474657220636f6e74726163740000000000006044820152606401610bf4565b6123c161477c565b6123c9614800565b609780546001600160a01b03808a167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255609b8054898416908316179055609c805492881692909116821790556098859055609984905560a98390556040515f907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96908290a3604080515f8152602081018690527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a437910160405180910390a1604080515f8152602081018590527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a61910160405180910390a1604080515f8152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b0223910160405180910390a18015612545575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b5f54600490610100900460ff1615801561256e57505f5460ff8083169116105b6125e05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff83161761010017905561261b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b03161461267b5760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610bf4565b6001600160a01b0383161580159061269c57505f836001600160a01b03163b115b6126e85760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207375626d69747465720000000000000000000000000000006044820152606401610bf4565b81609e54146127395760405162461bcd60e51b815260206004820152601660248201527f6375746f766572206261746368206d69736d61746368000000000000000000006044820152606401610bf4565b60a65460ff161561278c5760405162461bcd60e51b815260206004820152601560248201527f6368616c6c656e676520696e2070726f677265737300000000000000000000006044820152606401610bf4565b60a854156127dc5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b60ae82905560975460405183916001600160a01b03808716929116907faf9f8e4eb71b2fdd1ed3defb8e321359a8984ca774246d3d749837b98873a935905f90a4609780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b61289d613cc3565b6001600160a01b038116158015906128c35750609c546001600160a01b03828116911614155b61290f5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206e65772076657269666965720000000000000000000000006044820152606401610bf4565b609c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96905f90a35050565b612980613cc3565b5f81118015612990575060648111155b801561299e575060a9548114155b6129ea5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642070726f6f66207265776172642070657263656e74616765006044820152606401610bf4565b60a980549082905560408051828152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b02239101611c43565b60a85415612a785760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b612a80613dc5565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612aec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b1091906153c3565b612b5c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b5f80612b688686613d1d565b915091505f612b7b836001015160c01c90565b5f81815260a160205260409020549091508214612bda5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b612be381613b49565b612c2f5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610bf4565b5f81815260a46020526040902060038101805461ff00191661010017905560a6805460ff191690556099546002909101544291612c6b916152e4565b11612cea575f81815260a4602090815260408083206003908101805460ff1916600117905560a2835292819020909201548251808401909352600783527f54696d656f75740000000000000000000000000000000000000000000000000091830191909152612ce59183916001600160a01b031690614884565b612545565b612cf5838686614560565b61254581336040518060400160405280600d81526020017f50726f6f662073756363657373000000000000000000000000000000000000008152506149e3565b612d3d613cc3565b60aa80545f909155612d4f8282614aaf565b604080516001600160a01b0384168152602081018390527fb1b2058a6969e2d25e47bcaebe8ae21c29a23b2752429315b75e2f4f285f3d879101611c43565b612d96613cc3565b5f805260a06020527fb84a74ec6ef4d0e83b6006dfaa014ab4026f9f3b97d186e604d29998a4e808ea5415612e0d5760405162461bcd60e51b815260206004820152601660248201527f67656e6573697320626174636820696d706f72746564000000000000000000006044820152606401610bf4565b5f80612e198484613d1d565b915091505f612e2c836001015160c01c90565b90508015612e7c5760405162461bcd60e51b815260206004820152601360248201527f696e76616c696420626174636820696e646578000000000000000000000000006044820152606401610bf4565b5f612e88846079015190565b905080612ed75760405162461bcd60e51b815260206004820152600f60248201527f7a65726f20737461746520726f6f7400000000000000000000000000000000006044820152606401610bf4565b600984015160c01c15612f2c5760405162461bcd60e51b815260206004820152601d60248201527f6c31206d65737361676520706f707065642073686f756c6420626520300000006044820152606401610bf4565b5f612f38856019015190565b03612f855760405162461bcd60e51b815260206004820152600e60248201527f7a65726f206461746120686173680000000000000000000000000000000000006044820152606401610bf4565b7f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014612fb1856039015190565b14612ffe5760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642076657273696f6e65642068617368000000000000000000006044820152606401610bf4565b5f82815260a1602090815260408083208690558051608081018252428082528184019081528183018581526060830186815288875260a28652848720935184559151600184015551600283015551600390910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091179055603987015160ad83528184205560ab825280832084905560a0909152808220839055609e849055609d84905551849184917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a3604080518281525f6020820152849184917f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d910160405180910390a3505050505050565b5f8061312b8686613d1d565b915091505f61313e836001015160c01c90565b5f81815260a16020526040902054909150821461319d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b612545838686614560565b6131b0613cc3565b80156132b4576131be614b58565b60a65460ff16156132735760a7545f90815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a590925282208054919290916132129084906152e4565b909155505060a7545f90815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a6805460ff191690555b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a150565b6132bc614bb2565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613296565b50565b6132ee613cc3565b5f811180156132ff575060ac548114155b61334b5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206e657720726f6c6c75702064656c617920706572696f64006044820152606401610bf4565b60ac80549082905560408051828152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad19101611c43565b335f908152609f602052604090205460ff166133e75760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206368616c6c656e67657220616c6c6f7765640000000000000000006044820152606401610bf4565b60a854156134375760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b61343f613dc5565b60a65460ff16156134925760405162461bcd60e51b815260206004820152601460248201527f616c726561647920696e206368616c6c656e67650000000000000000000000006044820152606401610bf4565b8167ffffffffffffffff16609d54106134ed5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c72656164792066696e616c697a65640000000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a1602052604090205481146135545760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b6135678267ffffffffffffffff16611872565b6135b35760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a460205260409020546801000000000000000090046001600160a01b03161561362e5760405162461bcd60e51b815260206004820152601860248201527f626174636820616c7265616479206368616c6c656e67656400000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a2602052604090206001015442106136be5760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74206368616c6c656e6765206261746368206f757473696465207460448201527f6865206368616c6c656e67652077696e646f77000000000000000000000000006064820152608401610bf4565b60975f9054906101000a90046001600160a01b03166001600160a01b0316630d13fd7b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561370e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613732919061530a565b3410156137815760405162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742076616c756500000000000000000000000000006044820152606401610bf4565b67ffffffffffffffff82811660a78190556040805160c0810182528281523360208083018281523484860190815242606086019081525f6080870181815260a0880182815299825260a4909552969096209451855492516001600160a01b031668010000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009093169816979097171783559451600183015591516002820155925160039093018054925115156101000261ff00199415159490941661ffff19909316929092179290921790556001600160a01b03168267ffffffffffffffff167f3a6ea19df25b49e7624e313ce7c1ab23984238e93727260db56a81735b1b99763460405161389991815260200190565b60405180910390a35f609d5460016138b191906152e4565b90505b609e548111613909578267ffffffffffffffff1681146138f7576099545f82815260a26020526040812060010180549091906138f19084906152e4565b90915550505b80613901816153de565b9150506138b4565b505060a6805460ff1916600117905550565b5f54600390610100900460ff1615801561393b57505f5460ff8083169116105b6139ad5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff831617610100178155829003613a0f5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c696420726f6c6c75702064656c617920706572696f6400000000006044820152606401610bf4565b60ac829055604080515f8152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad1910160405180910390a15f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611c43565b335f90815260a5602052604081205490819003613ae95760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642062617463684368616c6c656e6765526577617264000000006044820152606401610bf4565b335f90815260a56020526040812055613b028282614aaf565b816001600160a01b03167f9c25fa83f414ed363c8d39c98fb3e17567b3431cede71eb062c49d2a63ce247a82604051613b3d91815260200190565b60405180910390a25050565b5f81815260a460205260408120546801000000000000000090046001600160a01b03161580159061189a5750505f90815260a46020526040902060030154610100900460ff161590565b613b9b613cc3565b5f81118015613bac57506098548114155b613bf85760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964206e65772066696e616c697a6520706572696f6400000000006044820152606401610bf4565b609880549082905560408051828152602081018490527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a4379101611c43565b613c3e613cc3565b6001600160a01b038116613cba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bf4565b6132e381614713565b6033546001600160a01b031633146122435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bf4565b5f805f613d2a8585614beb565b90505f8160ff165f03613d4b57613d418686614c5b565b9094509050613db7565b8160ff1660011480613d6057508160ff166002145b15613d6f57613d418686614cc4565b60405162461bcd60e51b815260206004820152601960248201527f556e737570706f727465642062617463682076657273696f6e000000000000006044820152606401610bf4565b808420925050509250929050565b60655460ff16156122435760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610bf4565b805f03613e23575050565b8082035f5b82811015611b9e57610100818403811115613e4257508083035b609b546040517f3c7f528300000000000000000000000000000000000000000000000000000000815260048101859052602481018390526001600160a01b0390911690633c7f5283906044015f604051808303815f87803b158015613ea5575f80fd5b505af1158015613eb7573d5f803e3d5ffd5b50505050610100830192505061010081019050613e28565b5f81600203613f5e575f6040515f5b804980613eeb5750613efa565b60208202830152600101613ede565b602081028083209201604052909250905080613f585760405162461bcd60e51b815260206004820152601b60248201527f5632207265717569726573206174206c65617374203120626c6f6200000000006044820152606401610bf4565b50919050565b60014915613fd45760405162461bcd60e51b815260206004820152602560248201527f6c6567616379206261746368657320737570706f72742065786163746c79203160448201527f20626c6f620000000000000000000000000000000000000000000000000000006064820152608401610bf4565b5f4915613fe2575f4961189a565b507f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440145b919050565b600261401960208501856153a3565b60ff16111561406a5760405162461bcd60e51b815260206004820152600f60248201527f696e76616c69642076657273696f6e00000000000000000000000000000000006044820152606401610bf4565b60808301356140bb5760405162461bcd60e51b815260206004820152601b60248201527f70726576696f757320737461746520726f6f74206973207a65726f00000000006044820152606401610bf4565b60a083013561410c5760405162461bcd60e51b815260206004820152601660248201527f6e657720737461746520726f6f74206973207a65726f000000000000000000006044820152606401610bf4565b5f8061411e61168e6020870187615342565b915091505f614131836001015160c01c90565b90505f60a1816141428460016152e4565b81526020019081526020015f20541461419d5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c726561647920636f6d6d69747465640000000000000000006044820152606401610bf4565b609e5481146141ee5760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610bf4565b5f81815260a16020526040902054821461424a5760405162461bcd60e51b815260206004820152601b60248201527f696e636f727265637420706172656e74206261746368206861736800000000006044820152606401610bf4565b5f81815260ab60205260409020546080870135146142aa5760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610bf4565b5f6142b9846011015160c01c90565b90505f6142e56142cf60608a0160408b01615415565b6142df60808b0160608c01615321565b84614d17565b90506142f76080890160608a01615321565b60019384019361ffff91909116929092019160f99061431960208b018b6153a3565b60ff161061432657506101015b60408051828101909152955061434b8661434360208c018c6153a3565b60ff16614d5b565b60c084901b60018701526143798661436960808c0160608d01615321565b61ffff1660c01b60099190910152565b60c083811b6011880152601987018390526039870188905260808a0135605988015260a08a0135607988015289013560998701525f60b987015260d9860185905260016143c960208b018b6153a3565b60ff16106143fb576143fb866143e560608c0160408d01615415565b67ffffffffffffffff1660c01b60f99190910152565b8086205f85815260a1602090815260408083209390935560ab815282822060a08d0135905560ad905290812088905560a65460ff16156144645760a7545f90815260a460205260409020600201546099544291614457916152e4565b61446191906152f7565b90505b6040518060800160405280428152602001826098544261448491906152e4565b61448e91906152e4565b81526020016144a360608d0160408e01615415565b67ffffffffffffffff1681526001600160a01b038b81166020928301525f88815260a28352604080822085518155858501516001820155858201516002820155606090950151600390950180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169590931694909417909155609e88905560a19091528181205491519193508692507f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f91a35050505050505050565b806145ad5760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642062617463682070726f6f66000000000000000000000000006044820152606401610bf4565b5f6145bc846001015160c01c90565b90505f6145ca856039015190565b90505f7f00000000000000000000000000000000000000000000000000000000000000006145f9876059015190565b6079880151609989015160b98a015160198b015160405160c09690961b7fffffffffffffffff000000000000000000000000000000000000000000000000166020870152602886019490945260488501929092526068840152608883015260a882015260c8810183905260e801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120609c549091506001600160a01b0316632c09a8486146bb885160f81c90565b858888866040518663ffffffff1660e01b81526004016146df95949392919061542e565b5f6040518083038186803b1580156146f5575f80fd5b505afa158015614707573d5f803e3d5ffd5b50505050505050505050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166147f85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b612243614d62565b5f54610100900460ff1661487c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b612243614dea565b60a88390555f83815260a460205260408082205460975491517fc96be4cb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526801000000000000000090920482169392919091169063c96be4cb906024016020604051808303815f875af115801561490b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061492f919061530a565b5f86815260a4602052604090206001015490915061494e9082906152e4565b5f86815260a460209081526040808320546801000000000000000090046001600160a01b0316835260a59091528120805490919061498d9084906152e4565b90915550506040516149a0908490615491565b604051908190038120906001600160a01b0384169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b5f83815260a4602052604081206001015460a954909190606490614a0790846154bd565b614a1191906154d4565b9050614a1d81836152f7565b60aa5f828254614a2d91906152e4565b90915550506001600160a01b0384165f90815260a5602052604081208054839290614a599084906152e4565b9091555050604051614a6c908490615491565b604051908190038120906001600160a01b0386169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b8015614b54575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114614afe576040519150601f19603f3d011682016040523d82523d5f602084013e614b03565b606091505b50509050806121705760405162461bcd60e51b815260206004820152601b60248201527f526f6c6c75703a20455448207472616e73666572206661696c656400000000006044820152606401610bf4565b5050565b614b60613dc5565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258614b953390565b6040516001600160a01b03909116815260200160405180910390a1565b614bba614e6f565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33614b95565b5f81614c395760405162461bcd60e51b815260206004820152601260248201527f456d7074792062617463682068656164657200000000000000000000000000006044820152606401610bf4565b82825f818110614c4b57614c4b61550c565b919091013560f81c949350505050565b5f8160f9811015614cae5760405162461bcd60e51b815260206004820152601d60248201527f626174636820686561646572206c656e67746820746f6f20736d616c6c0000006044820152606401610bf4565b6040519150808483378082016040529250929050565b5f816101018114614cae5760405162461bcd60e51b815260206004820181905260248201527f626174636820686561646572206c656e67746820697320696e636f72726563746044820152606401610bf4565b6040805160c085901b815260f084901b6008820152600a60208502820181019092525f918101614d4c8161ffff871686614ec1565b82900390912095945050505050565b8082535050565b5f54610100900460ff16614dde5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b6065805460ff19169055565b5f54610100900460ff16614e665760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b61224333614713565b60655460ff166122435760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610bf4565b5f825f03614ed0575082614f83565b609b546001600160a01b03165f5b84811015614f7d576040517fae453cd5000000000000000000000000000000000000000000000000000000008152600481018590525f906001600160a01b0384169063ae453cd590602401602060405180830381865afa158015614f44573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614f68919061530a565b87525060209095019460019384019301614ede565b50849150505b9392505050565b5f60208284031215614f9a575f80fd5b5035919050565b80356001600160a01b0381168114614005575f80fd5b5f60208284031215614fc7575f80fd5b614f8382614fa1565b5f8083601f840112614fe0575f80fd5b50813567ffffffffffffffff811115614ff7575f80fd5b60208301915083602082850101111561500e575f80fd5b9250929050565b5f805f60408486031215615027575f80fd5b833567ffffffffffffffff81111561503d575f80fd5b61504986828701614fd0565b909790965060209590950135949350505050565b5f806020838503121561506e575f80fd5b823567ffffffffffffffff811115615084575f80fd5b61509085828601614fd0565b90969095509350505050565b5f60e08284031215613f58575f80fd5b5f805f805f606086880312156150c0575f80fd5b853567ffffffffffffffff808211156150d7575f80fd5b6150e389838a0161509c565b965060208801359150808211156150f8575f80fd5b61510489838a01614fd0565b9096509450604088013591508082111561511c575f80fd5b5061512988828901614fd0565b969995985093965092949392505050565b5f6020828403121561514a575f80fd5b813567ffffffffffffffff811115615160575f80fd5b61516c8482850161509c565b949350505050565b5f805f805f8060c08789031215615189575f80fd5b61519287614fa1565b95506151a060208801614fa1565b94506151ae60408801614fa1565b9350606087013592506080870135915060a087013590509295509295509295565b5f80604083850312156151e0575f80fd5b6151e983614fa1565b946020939093013593505050565b5f805f806040858703121561520a575f80fd5b843567ffffffffffffffff80821115615221575f80fd5b61522d88838901614fd0565b90965094506020870135915080821115615245575f80fd5b5061525287828801614fd0565b95989497509550505050565b80151581146132e3575f80fd5b5f6020828403121561527b575f80fd5b8135614f838161525e565b803567ffffffffffffffff81168114614005575f80fd5b5f80604083850312156152ae575f80fd5b6151e983615286565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561189a5761189a6152b7565b8181038181111561189a5761189a6152b7565b5f6020828403121561531a575f80fd5b5051919050565b5f60208284031215615331575f80fd5b813561ffff81168114614f83575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615375575f80fd5b83018035915067ffffffffffffffff82111561538f575f80fd5b60200191503681900382131561500e575f80fd5b5f602082840312156153b3575f80fd5b813560ff81168114614f83575f80fd5b5f602082840312156153d3575f80fd5b8151614f838161525e565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361540e5761540e6152b7565b5060010190565b5f60208284031215615425575f80fd5b614f8382615286565b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190508260608301529695505050505050565b5f82515f5b818110156154b05760208186018101518583015201615496565b505f920191825250919050565b808202811582820484141761189a5761189a6152b7565b5f82615507577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c6343000818000a +0x608060405260043610610395575f3560e01c80637ae64261116101de578063b35dac4e11610108578063cf9a67451161009d578063dff7827e1161006d578063dff7827e14610b6e578063e3fff1dd14610b83578063f2fde38b14610ba2578063fb1e8b0414610bc1575f80fd5b8063cf9a674514610afc578063d279c19114610b1b578063d8dc99d214610b3a578063de8b303514610b4f575f80fd5b8063c5553892116100d8578063c555389214610a95578063cd0cb80214610ab4578063cd4edc6914610ad4578063ce5db8d614610ae7575f80fd5b8063b35dac4e14610a19578063b3e0a50914610a38578063b8d0a1b014610a57578063bedb86fb14610a76575f80fd5b806397fc007c1161017e578063a4f209b01161014e578063a4f209b01461099b578063abc8d68d146109ba578063b31a77d3146109e5578063b3484425146109fa575f80fd5b806397fc007c1461091a578063a3c9e94c14610939578063a415d8dc14610958578063a479265d14610986575f80fd5b80638da53b43116101b95780638da53b43146108075780638da5cb5b1461081c5780638f1d377614610839578063910129d4146108e9575f80fd5b80637ae64261146107bb578063843bc9a1146107cf57806388b1ea09146107ee575f80fd5b80632b7ac3f3116102bf5780635f77cf1d1161025f57806368589dfa1161022f57806368589dfa1461074a5780636c578c1d14610769578063715018a614610788578063728cdbca1461079c575f80fd5b80635f77cf1d1461069457806361267290146106e057806364c71673146106ff57806367caa37a1461072b575f80fd5b806341f756da1161029a57806341f756da1461060357806357e0af6c146106165780635c975abb146106355780635ef7a94a1461064c575f80fd5b80632b7ac3f3146105985780633b70c18a146105cf5780633e001b66146105ee575f80fd5b80631544ba3a1161033557806321e2f9e01161030557806321e2f9e0146105045780632362f03e146105235780632571098d1461054e5780632a213ba114610579575f80fd5b80631544ba3a1461049c578063163d9bee146104bb57806318463fb0146104d057806318af3b2b146104e5575f80fd5b806310d445831161037057806310d4458314610427578063116a1f4214610446578063121dcd5014610468578063133611011461047d575f80fd5b806304d77215146103a0578063059def61146103e35780630ceb678014610406575f80fd5b3661039c57005b5f80fd5b3480156103ab575f80fd5b506103ce6103ba366004615791565b60a36020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156103ee575f80fd5b506103f8609d5481565b6040519081526020016103da565b348015610411575f80fd5b506104256104203660046157be565b610bd6565b005b348015610432575f80fd5b5061042561044136600461581c565b610ca8565b348015610451575f80fd5b506103ce610460366004615791565b609d54101590565b348015610473575f80fd5b506103f8609e5481565b348015610488575f80fd5b50610425610497366004615864565b61104c565b3480156104a7575f80fd5b506104256104b63660046158b3565b611582565b3480156104c6575f80fd5b506103f860ae5481565b3480156104db575f80fd5b506103f860a75481565b3480156104f0575f80fd5b506103ce6104ff366004615791565b611922565b34801561050f575f80fd5b506103ce61051e366004615791565b61195a565b34801561052e575f80fd5b506103f861053d366004615791565b60a16020525f908152604090205481565b348015610559575f80fd5b506103f8610568366004615791565b60a06020525f908152604090205481565b348015610584575f80fd5b506103f8610593366004615791565b6119a4565b3480156105a3575f80fd5b50609c546105b7906001600160a01b031681565b6040516001600160a01b0390911681526020016103da565b3480156105da575f80fd5b50609b546105b7906001600160a01b031681565b3480156105f9575f80fd5b506103f860aa5481565b610425610611366004615941565b6119b4565b348015610621575f80fd5b50610425610630366004615791565b611cb4565b348015610640575f80fd5b5060655460ff166103ce565b348015610657575f80fd5b5061066b610666366004615791565b611d5f565b604080519485526020850193909352918301526001600160a01b031660608201526080016103da565b34801561069f575f80fd5b506106c77f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff90911681526020016103da565b3480156106eb575f80fd5b506104256106fa366004615791565b611dc4565b34801561070a575f80fd5b5060af546106c79068010000000000000000900467ffffffffffffffff1681565b348015610736575f80fd5b50610425610745366004615941565b611fc0565b348015610755575f80fd5b506103f8610764366004615791565b6122f6565b348015610774575f80fd5b506104256107833660046157be565b612323565b348015610793575f80fd5b506104256123e0565b3480156107a7575f80fd5b506104256107b636600461597b565b6123f3565b3480156107c6575f80fd5b50610425612712565b3480156107da575f80fd5b506104256107e93660046159d6565b612a9b565b3480156107f9575f80fd5b5060a6546103ce9060ff1681565b348015610812575f80fd5b506103f861040081565b348015610827575f80fd5b506033546001600160a01b03166105b7565b348015610844575f80fd5b506108a5610853366004615791565b60a46020525f9081526040902080546001820154600283015460039093015467ffffffffffffffff831693680100000000000000009093046001600160a01b0316929060ff8082169161010090041686565b6040805167ffffffffffffffff90971687526001600160a01b03909516602087015293850192909252606084015215156080830152151560a082015260c0016103da565b3480156108f4575f80fd5b506103ce610903366004615791565b5f90815260a4602052604090206003015460ff1690565b348015610925575f80fd5b506104256109343660046157be565b612de2565b348015610944575f80fd5b506097546105b7906001600160a01b031681565b348015610963575f80fd5b506103ce6109723660046157be565b609f6020525f908152604090205460ff1681565b348015610991575f80fd5b506103f860995481565b3480156109a6575f80fd5b506104256109b5366004615791565b612ec5565b3480156109c5575f80fd5b506103f86109d43660046157be565b60a56020525f908152604090205481565b3480156109f0575f80fd5b506103f860a85481565b348015610a05575f80fd5b50610425610a143660046159fe565b612f75565b348015610a24575f80fd5b50610425610a333660046157be565b61327e565b348015610a43575f80fd5b50610425610a52366004615864565b6132d7565b348015610a62575f80fd5b50610425610a713660046159fe565b61361e565b348015610a81575f80fd5b50610425610a90366004615a72565b6136a7565b348015610aa0575f80fd5b50610425610aaf366004615791565b6137df565b348015610abf575f80fd5b5060af546106c79067ffffffffffffffff1681565b610425610ae2366004615aa4565b613882565b348015610af2575f80fd5b506103f860985481565b348015610b07575f80fd5b50610425610b16366004615791565b613e15565b348015610b26575f80fd5b50610425610b353660046157be565b613f84565b348015610b45575f80fd5b506103f860ac5481565b348015610b5a575f80fd5b506103ce610b69366004615791565b614043565b348015610b79575f80fd5b506103f8609a5481565b348015610b8e575f80fd5b50610425610b9d366004615791565b61408d565b348015610bad575f80fd5b50610425610bbc3660046157be565b614130565b348015610bcc575f80fd5b506103f860a95481565b610bde6141bd565b6001600160a01b0381165f908152609f602052604090205460ff1615610c4b5760405162461bcd60e51b815260206004820152601f60248201527f6163636f756e7420697320616c72656164792061206368616c6c656e6765720060448201526064015b60405180910390fd5b6001600160a01b0381165f818152609f6020908152604091829020805460ff1916600190811790915591519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc00991015b60405180910390a250565b610cb06141bd565b5f8111610cff5760405162461bcd60e51b815260206004820152601560248201527f636f756e74206d757374206265206e6f6e7a65726f00000000000000000000006044820152606401610c42565b5f80610d0b8585614217565b915091505f610d1e836001015160c01c90565b5f81815260a160205260409020549091508214610d7d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b5f60a181610d8b8785615aeb565b81526020019081526020015f205414610e0b5760405162461bcd60e51b8152602060048201526024808201527f726576657274696e67206d7573742073746172742066726f6d2074686520656e60448201527f64696e67000000000000000000000000000000000000000000000000000000006064820152608401610c42565b609d548111610e825760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c792072657665727420756e46696e616c697a6564206261746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610c42565b609e5460af5468010000000000000000900467ffffffffffffffff16811115610ee55760af80547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff8416021790555b610ef0600183615afe565b609e555b841561104357604051839083907ecae2739091badfd91c373f0a16cede691e0cd25bb80cff77dd5caeb4710146905f90a35f82815260a16020526040812055610f3c82614043565b15610f97575f82815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091610f87908490615aeb565b909155505060a6805460ff191690555b5f82815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a85415801590610ff7575060a85482145b15611001575f60a8555b6001919091015f81815260a160205260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9095019492509082610ef4575b50505050505050565b60a8541561109c5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6110a46142bf565b5f806110b08484614217565b915091505f6110c3836001015160c01c90565b5f81815260a1602052604090205490915082146111225760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b61112b8161195a565b6111775760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610c42565b61118081614043565b156111cd5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610c42565b5f81815260a4602052604090206003015460ff161561122e5760405162461bcd60e51b815260206004820152601660248201527f62617463682073686f756c6420626520726576657274000000000000000000006044820152606401610c42565b61123781611922565b156112845760405162461bcd60e51b815260206004820152601960248201527f626174636820696e206368616c6c656e67652077696e646f77000000000000006044820152606401610c42565b605983015160a05f611297600185615afe565b81526020019081526020015f2054146112f25760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610c42565b5f81815260a060205260409020541561134d5760405162461bcd60e51b815260206004820152601660248201527f626174636820616c7265616479207665726966696564000000000000000000006044820152606401610c42565b80609d54600101146113a15760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610c42565b609d819055600160a35f6113b6866099015190565b815260208101919091526040015f20805460ff191691151591909117905560798301515f82815260a060205260409020556114056113f8846011015160c01c90565b600985015160c01c614312565b611425611413600183615afe565b60af5467ffffffffffffffff166143c9565b6114c45760a25f611437600184615afe565b815260208101919091526040015f908120818155600180820183905560028201839055600390910180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560ab91906114939084615afe565b81526020019081526020015f205f905560ad5f6001836114b39190615afe565b81526020019081526020015f205f90555b60a45f6114d2600184615afe565b815260208082019290925260409081015f90812080547fffffffff000000000000000000000000000000000000000000000000000000001681556001810182905560028101829055600301805461ffff1916905583815260a1909252902054817f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d61155e866079015190565b60998701516040805192835260208301919091520160405180910390a35050505050565b60a854156115d25760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6115da6142bf565b5f4260ac546115ea609e546143da565b546115f59190615aeb565b1090505f4260ac54609b5f9054906101000a90046001600160a01b03166001600160a01b031663b59b1a786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561164d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116719190615b11565b61167b9190615aeb565b109050811580156116895750805b156116f0575f61169f6080890160608a01615b28565b61ffff16116116f05760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b81806116f95750805b6117455760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642074696d696e670000000000000000000000000000000000006044820152606401610c42565b5f61175b61175660208a018a615b49565b614217565b5090505f61176d826001015160c01c90565b611778906001615aeb565b90505f611784826143f4565b90508015611806575f49156118015760405162461bcd60e51b815260206004820152602f60248201527f6d757374206e6f7420636172727920626c6f62207768656e207573696e67207360448201527f746f72656420626c6f62206861736800000000000000000000000000000000006064820152608401610c42565b611821565b61181e61181660208c018c615baa565b60ff16614492565b90505b61182c8a5f836145cc565b5f806118388b8b614217565b915091505f61184b836001015160c01c90565b905080609e541461189e5760405162461bcd60e51b815260206004820152601660248201527f696e636f727265637420626174636820686561646572000000000000000000006044820152606401610c42565b5f81815260a1602052604090205482146118fa5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b42611904826143da565b60010155611913838b8b614abd565b50505050505050505050505050565b60af545f9067ffffffffffffffff1661193b8382614c70565b801561195357504261194d8483614c9c565b60010154115b9392505050565b60af545f9067ffffffffffffffff166119738382614c70565b801561198857505f6119858483614c9c565b54115b8015611953575050505f90815260a16020526040902054151590565b5f6119ae826143f4565b92915050565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611a20573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a449190615bca565b611a905760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b60a85415611ae05760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b611ae86142bf565b5f611af96117566020840184615b49565b5090505f611b0b826001015160c01c90565b611b16906001615aeb565b90505f611b22826143f4565b14611b955760405162461bcd60e51b815260206004820152602860248201527f636f6d6d69744261746368207265717569726573206e6f2073746f726564206260448201527f6c6f6220686173680000000000000000000000000000000000000000000000006064820152608401610c42565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015611bf9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c1d9190615b11565b611c279190615aeb565b1015611c8f575f611c3e6080850160608601615b28565b61ffff1611611c8f5760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b5f611ca06118166020860186615baa565b9050611cae84335b836145cc565b50505050565b611cbc6141bd565b5f81118015611ccd57506099548114155b611d195760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e65772070726f6f662077696e646f7700000000000000006044820152606401610c42565b609980549082905560408051828152602081018490527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a6191015b60405180910390a15050565b60af545f9081908190819067ffffffffffffffff16611d7e8682614c70565b15611dbb575f611d8e8783614c9c565b80546001820154600283015460039093015491985096509094506001600160a01b03169250611dbd915050565b505b9193509193565b5f54600290610100900460ff16158015611de457505f5460ff8083169116105b611e565760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100179055611e745f5460ff1690565b60ff16600214611ec65760405162461bcd60e51b815260206004820152601660248201527f6d757374206861766520696e697469616c697a656421000000000000000000006044820152606401610c42565b81611f395760405162461bcd60e51b815260206004820152602760248201527f63616e206e6f742073657420737461746520726f6f742077697468206279746560448201527f73333228302921000000000000000000000000000000000000000000000000006064820152608401610c42565b609e5460af54611f5490829067ffffffffffffffff166143c9565b158015611f6c57505f81815260ab6020526040902054155b15611f82575f81815260ab602052604090208390555b505f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611d53565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561202c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120509190615bca565b61209c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b60a854156120ec5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6120f46142bf565b5f49156121435760405162461bcd60e51b815260206004820152601f60248201527f636f6d6d69745374617465206d757374206e6f7420636172727920626c6f62006044820152606401610c42565b5f6121546117566020840184615b49565b5090505f612166826001015160c01c90565b612171906001615aeb565b90505f61217d826143f4565b9050806121f25760405162461bcd60e51b815260206004820152602260248201527f6e6f2073746f72656420626c6f62206861736820666f7220746869732062617460448201527f63680000000000000000000000000000000000000000000000000000000000006064820152608401610c42565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015612256573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061227a9190615b11565b6122849190615aeb565b10156122ec575f61229b6080860160608701615b28565b61ffff16116122ec5760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b611cae8433611ca8565b60af545f9061231090839067ffffffffffffffff16614c70565b1561231e576119ae82614ce3565b919050565b61232b6141bd565b6001600160a01b0381165f908152609f602052604090205460ff166123925760405162461bcd60e51b815260206004820152601b60248201527f6163636f756e74206973206e6f742061206368616c6c656e67657200000000006044820152606401610c42565b6001600160a01b0381165f818152609f60209081526040808320805460ff19169055519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc0099101610c9d565b6123e86141bd565b6123f15f614d3b565b565b5f54610100900460ff161580801561241157505f54600160ff909116105b8061242a5750303b15801561242a57505f5460ff166001145b61249c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805460ff1916600117905580156124bd575f805461ff0019166101001790555b6001600160a01b03861615806124da57506001600160a01b038516155b15612511576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0387166125675760405162461bcd60e51b815260206004820152601a60248201527f696e76616c6964207375626d697474657220636f6e74726163740000000000006044820152606401610c42565b61256f614da4565b612577614e28565b609780546001600160a01b03808a167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255609b8054898416908316179055609c8054928816929091169190911790556098849055609983905560a98290556125e56001614eac565b6040516001600160a01b038616905f907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96908290a3604080515f8152602081018690527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a437910160405180910390a1604080515f8152602081018590527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a61910160405180910390a1604080515f8152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b0223910160405180910390a18015611043575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b5f54600590610100900460ff1615801561273257505f5460ff8083169116105b6127a45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff8316176101001790556127df7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b03161461283f5760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610c42565b60af5467ffffffffffffffff16156128995760405162461bcd60e51b815260206004820152601a60248201527f62617463682072696e6720616c726561647920737461727465640000000000006044820152606401610c42565b6097546040517f9f8a13d70000000000000000000000000000000000000000000000000000000081525f60048201526001600160a01b0390911690639f8a13d790602401602060405180830381865afa925050508015612934575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261293191810190615bca565b60015b6129805760405162461bcd60e51b815260206004820152601a60248201527f7375626d6974746572206375746f7665722072657175697265640000000000006044820152606401610c42565b505f609e5460016129919190615aeb565b5f81815260ad6020526040902054909150156129ef5760405162461bcd60e51b815260206004820152601e60248201527f726576657274656420626174636820617761697473207265636f6d6d697400006044820152606401610c42565b610400609d5482612a009190615afe565b10612a4d5760405162461bcd60e51b815260206004820152601c60248201527f746f6f206d616e7920756e66696e616c697a65642062617463686573000000006044820152606401610c42565b612a5681614eac565b505f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b5f54600490610100900460ff16158015612abb57505f5460ff8083169116105b612b2d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100179055612b687fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b031614612bc85760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610c42565b6001600160a01b03831615801590612be957505f836001600160a01b03163b115b612c355760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207375626d69747465720000000000000000000000000000006044820152606401610c42565b81609e5414612c865760405162461bcd60e51b815260206004820152601660248201527f6375746f766572206261746368206d69736d61746368000000000000000000006044820152606401610c42565b60a65460ff1615612cd95760405162461bcd60e51b815260206004820152601560248201527f6368616c6c656e676520696e2070726f677265737300000000000000000000006044820152606401610c42565b60a85415612d295760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b60ae82905560975460405183916001600160a01b03808716929116907faf9f8e4eb71b2fdd1ed3defb8e321359a8984ca774246d3d749837b98873a935905f90a4609780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b612dea6141bd565b6001600160a01b03811615801590612e105750609c546001600160a01b03828116911614155b612e5c5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206e65772076657269666965720000000000000000000000006044820152606401610c42565b609c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96905f90a35050565b612ecd6141bd565b5f81118015612edd575060648111155b8015612eeb575060a9548114155b612f375760405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642070726f6f66207265776172642070657263656e74616765006044820152606401610c42565b60a980549082905560408051828152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b02239101611d53565b60a85415612fc55760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b612fcd6142bf565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613039573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061305d9190615bca565b6130a95760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b5f806130b58686614217565b915091505f6130c8836001015160c01c90565b5f81815260a1602052604090205490915082146131275760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b61313081614043565b61317c5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610c42565b5f81815260a46020526040902060038101805461ff00191661010017905560a6805460ff1916905560995460029091015442916131b891615aeb565b11613233575f81815260a460205260409020600301805460ff1916600117905561322e816131e5816143da565b6003015460408051808201909152600781527f54696d656f75740000000000000000000000000000000000000000000000000060208201526001600160a01b0390911690614f0d565b611043565b61323e838686614abd565b61104381336040518060400160405280600d81526020017f50726f6f6620737563636573730000000000000000000000000000000000000081525061506c565b6132866141bd565b60aa80545f9091556132988282615138565b604080516001600160a01b0384168152602081018390527fb1b2058a6969e2d25e47bcaebe8ae21c29a23b2752429315b75e2f4f285f3d879101611d53565b6132df6141bd565b5f805260a06020527fb84a74ec6ef4d0e83b6006dfaa014ab4026f9f3b97d186e604d29998a4e808ea54156133565760405162461bcd60e51b815260206004820152601660248201527f67656e6573697320626174636820696d706f72746564000000000000000000006044820152606401610c42565b5f806133628484614217565b915091505f613375836001015160c01c90565b905080156133c55760405162461bcd60e51b815260206004820152601360248201527f696e76616c696420626174636820696e646578000000000000000000000000006044820152606401610c42565b5f6133d1846079015190565b9050806134205760405162461bcd60e51b815260206004820152600f60248201527f7a65726f20737461746520726f6f7400000000000000000000000000000000006044820152606401610c42565b600984015160c01c156134755760405162461bcd60e51b815260206004820152601d60248201527f6c31206d65737361676520706f707065642073686f756c6420626520300000006044820152606401610c42565b5f613481856019015190565b036134ce5760405162461bcd60e51b815260206004820152600e60248201527f7a65726f206461746120686173680000000000000000000000000000000000006044820152606401610c42565b7f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440146134fa856039015190565b146135475760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642076657273696f6e65642068617368000000000000000000006044820152606401610c42565b5f82815260a1602052604090208390556135968282613567876039015190565b60405180608001604052804281526020014281526020015f81526020015f6001600160a01b03168152506151e3565b5f82815260a06020526040808220839055609e849055609d84905551849184917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a3604080518281525f6020820152849184917f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d910160405180910390a3505050505050565b5f8061362a8686614217565b915091505f61363d836001015160c01c90565b5f81815260a16020526040902054909150821461369c5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b611043838686614abd565b6136af6141bd565b80156137ad576136bd615362565b60a65460ff16156137725760a7545f90815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091613711908490615aeb565b909155505060a7545f90815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a6805460ff191690555b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b039091168152602001612a90565b6137b56153bc565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613795565b50565b6137e76141bd565b5f811180156137f8575060ac548114155b6138445760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206e657720726f6c6c75702064656c617920706572696f64006044820152606401610c42565b60ac80549082905560408051828152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad19101611d53565b335f908152609f602052604090205460ff166138e05760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206368616c6c656e67657220616c6c6f7765640000000000000000006044820152606401610c42565b60a854156139305760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6139386142bf565b60a65460ff161561398b5760405162461bcd60e51b815260206004820152601460248201527f616c726561647920696e206368616c6c656e67650000000000000000000000006044820152606401610c42565b8167ffffffffffffffff16609d54106139e65760405162461bcd60e51b815260206004820152601760248201527f626174636820616c72656164792066696e616c697a65640000000000000000006044820152606401610c42565b67ffffffffffffffff82165f90815260a160205260409020548114613a4d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b613a608267ffffffffffffffff1661195a565b613aac5760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610c42565b67ffffffffffffffff82165f90815260a460205260409020546801000000000000000090046001600160a01b031615613b275760405162461bcd60e51b815260206004820152601860248201527f626174636820616c7265616479206368616c6c656e67656400000000000000006044820152606401610c42565b613b3a8267ffffffffffffffff16611922565b613bac5760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74206368616c6c656e6765206261746368206f757473696465207460448201527f6865206368616c6c656e67652077696e646f77000000000000000000000000006064820152608401610c42565b60975f9054906101000a90046001600160a01b03166001600160a01b0316630d13fd7b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613bfc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c209190615b11565b341015613c6f5760405162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742076616c756500000000000000000000000000006044820152606401610c42565b67ffffffffffffffff82811660a78190556040805160c0810182528281523360208083018281523484860190815242606086019081525f6080870181815260a0880182815299825260a4909552969096209451855492516001600160a01b031668010000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009093169816979097171783559451600183015591516002820155925160039093018054925115156101000261ff00199415159490941661ffff19909316929092179290921790556001600160a01b03168267ffffffffffffffff167f3a6ea19df25b49e7624e313ce7c1ab23984238e93727260db56a81735b1b997634604051613d8791815260200190565b60405180910390a360af54609d5467ffffffffffffffff909116905f90613daf906001615aeb565b90505b609e548111613e02578367ffffffffffffffff168114613df057609954613dd98284614c9c565b6001015f828254613dea9190615aeb565b90915550505b80613dfa81615be5565b915050613db2565b505060a6805460ff191660011790555050565b5f54600390610100900460ff16158015613e3557505f5460ff8083169116105b613ea75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100178155829003613f095760405162461bcd60e51b815260206004820152601b60248201527f696e76616c696420726f6c6c75702064656c617920706572696f6400000000006044820152606401610c42565b60ac829055604080515f8152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad1910160405180910390a15f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611d53565b335f90815260a5602052604081205490819003613fe35760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642062617463684368616c6c656e6765526577617264000000006044820152606401610c42565b335f90815260a56020526040812055613ffc8282615138565b816001600160a01b03167f9c25fa83f414ed363c8d39c98fb3e17567b3431cede71eb062c49d2a63ce247a8260405161403791815260200190565b60405180910390a25050565b5f81815260a460205260408120546801000000000000000090046001600160a01b0316158015906119ae5750505f90815260a46020526040902060030154610100900460ff161590565b6140956141bd565b5f811180156140a657506098548114155b6140f25760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964206e65772066696e616c697a6520706572696f6400000000006044820152606401610c42565b609880549082905560408051828152602081018490527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a4379101611d53565b6141386141bd565b6001600160a01b0381166141b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c42565b6137dc81614d3b565b6033546001600160a01b031633146123f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c42565b5f805f61422485856153f5565b90505f8160ff165f036142455761423b8686615465565b90945090506142b1565b8160ff166001148061425a57508160ff166002145b156142695761423b86866154ce565b60405162461bcd60e51b815260206004820152601960248201527f556e737570706f727465642062617463682076657273696f6e000000000000006044820152606401610c42565b808420925050509250929050565b60655460ff16156123f15760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c42565b805f0361431d575050565b8082035f5b82811015611cae5761010081840381111561433c57508083035b609b546040517f3c7f528300000000000000000000000000000000000000000000000000000000815260048101859052602481018390526001600160a01b0390911690633c7f5283906044015f604051808303815f87803b15801561439f575f80fd5b505af11580156143b1573d5f803e3d5ffd5b50505050610100830192505061010081019050614322565b5f8115801590611953575050111590565b60af545f906119ae90839067ffffffffffffffff16614c9c565b60af545f9061440e90839067ffffffffffffffff166143c9565b61442457505f90815260ad602052604090205490565b609e5460af5468010000000000000000900467ffffffffffffffff168181111561444c578091505b8184118061445b5750609d5484105b1561446957505f9392505050565b60b05f61447861040087615c49565b81526020019081526020015f206005015492505050919050565b5f81600203614521575f6040515f5b8049806144ae57506144bd565b602082028301526001016144a1565b60208102808320920160405290925090508061451b5760405162461bcd60e51b815260206004820152601b60248201527f5632207265717569726573206174206c65617374203120626c6f6200000000006044820152606401610c42565b50919050565b600149156145975760405162461bcd60e51b815260206004820152602560248201527f6c6567616379206261746368657320737570706f72742065786163746c79203160448201527f20626c6f620000000000000000000000000000000000000000000000000000006064820152608401610c42565b5f49156145a5575f496119ae565b507f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014919050565b60026145db6020850185615baa565b60ff16111561462c5760405162461bcd60e51b815260206004820152600f60248201527f696e76616c69642076657273696f6e00000000000000000000000000000000006044820152606401610c42565b608083013561467d5760405162461bcd60e51b815260206004820152601b60248201527f70726576696f757320737461746520726f6f74206973207a65726f00000000006044820152606401610c42565b60a08301356146ce5760405162461bcd60e51b815260206004820152601660248201527f6e657720737461746520726f6f74206973207a65726f000000000000000000006044820152606401610c42565b5f806146e06117566020870187615b49565b915091505f6146f3836001015160c01c90565b90505f60a181614704846001615aeb565b81526020019081526020015f20541461475f5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c726561647920636f6d6d69747465640000000000000000006044820152606401610c42565b609e5481146147b05760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610c42565b5f81815260a16020526040902054821461480c5760405162461bcd60e51b815260206004820152601b60248201527f696e636f727265637420706172656e74206261746368206861736800000000006044820152606401610c42565b856080013561481a82614ce3565b146148675760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610c42565b5f614876846011015160c01c90565b90505f6148a261488c60608a0160408b01615c5c565b61489c60808b0160608c01615b28565b84615521565b90506148b46080890160608a01615b28565b60019384019361ffff91909116929092019160f9906148d660208b018b615baa565b60ff16106148e357506101015b6040805182810190915295506149088661490060208c018c615baa565b60ff16615565565b60c084901b60018701526149368661492660808c0160608d01615b28565b61ffff1660c01b60099190910152565b60c083811b6011880152601987018390526039870188905260808a0135605988015260a08a0135607988015289013560998701525f60b987015260d98601859052600161498660208b018b615baa565b60ff16106149b8576149b8866149a260608c0160408d01615c5c565b67ffffffffffffffff1660c01b60f99190910152565b8086205f85815260a1602052604081209190915560a65460ff1615614a065760a7545f90815260a4602052604090206002015460995442916149f991615aeb565b614a039190615afe565b90505b614a73858b60a001358a60405180608001604052804281526020018660985442614a309190615aeb565b614a3a9190615aeb565b81526020018f6040016020810190614a529190615c5c565b67ffffffffffffffff1681526020018e6001600160a01b03168152506151e3565b5050609e8390555f83815260a16020526040808220549051909185917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a35050505050505050565b80614b0a5760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642062617463682070726f6f66000000000000000000000000006044820152606401610c42565b5f614b19846001015160c01c90565b90505f614b27856039015190565b90505f7f0000000000000000000000000000000000000000000000000000000000000000614b56876059015190565b6079880151609989015160b98a015160198b015160405160c09690961b7fffffffffffffffff000000000000000000000000000000000000000000000000166020870152602886019490945260488501929092526068840152608883015260a882015260c8810183905260e801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120609c549091506001600160a01b0316632c09a848614c18885160f81c90565b858888866040518663ffffffff1660e01b8152600401614c3c959493929190615c75565b5f6040518083038186803b158015614c52575f80fd5b505afa158015614c64573d5f803e3d5ffd5b50505050505050505050565b5f614c7b83836143c9565b15806119535750609d548310158015611953575050609e5490911115919050565b5f614ca783836143c9565b15614cd15760b05f614cbb61040086615c49565b81526020019081526020015f205f0190506119ae565b50505f90815260a26020526040902090565b60af545f90614cfd90839067ffffffffffffffff166143c9565b15614d295760b05f614d1161040085615c49565b81526020019081526020015f20600401549050919050565b505f90815260ab602052604090205490565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16614e205760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f161556c565b5f54610100900460ff16614ea45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f16155f4565b60af80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff831617905560405181907f20ec3848832ec028b438cae2b58b0b2cc77688de8f84b51c251c6fc75997a890905f90a250565b60a88390555f83815260a460205260408082205460975491517fc96be4cb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526801000000000000000090920482169392919091169063c96be4cb906024016020604051808303815f875af1158015614f94573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614fb89190615b11565b5f86815260a46020526040902060010154909150614fd7908290615aeb565b5f86815260a460209081526040808320546801000000000000000090046001600160a01b0316835260a590915281208054909190615016908490615aeb565b9091555050604051615029908490615cd8565b604051908190038120906001600160a01b0384169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b5f83815260a4602052604081206001015460a9549091906064906150909084615d04565b61509a9190615d1b565b90506150a68183615afe565b60aa5f8282546150b69190615aeb565b90915550506001600160a01b0384165f90815260a56020526040812080548392906150e2908490615aeb565b90915550506040516150f5908490615cd8565b604051908190038120906001600160a01b0386169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b80156151df575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114615187576040519150601f19603f3d011682016040523d82523d5f602084013e61518c565b606091505b50509050806151dd5760405162461bcd60e51b815260206004820152601b60248201527f526f6c6c75703a20455448207472616e73666572206661696c656400000000006044820152606401610c42565b505b5050565b60af546151fb90859067ffffffffffffffff166143c9565b156152e657610400609d54856152119190615afe565b1061525e5760405162461bcd60e51b815260206004820152600f60248201527f62617463682072696e672066756c6c00000000000000000000000000000000006044820152606401610c42565b5f60b08161526e61040088615c49565b815260208082019290925260409081015f2084518155918401516001830155830151600282015560608301516003820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039092169190911790556004810185905560050183905550611cae565b5f93845260a26020908152604080862083518155838301516001820155838201516002820155606090930151600390930180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039094169390931790925560ab81528185209390935560ad909252912055565b61536a6142bf565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861539f3390565b6040516001600160a01b03909116815260200160405180910390a1565b6153c4615679565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361539f565b5f816154435760405162461bcd60e51b815260206004820152601260248201527f456d7074792062617463682068656164657200000000000000000000000000006044820152606401610c42565b82825f81811061545557615455615d2e565b919091013560f81c949350505050565b5f8160f98110156154b85760405162461bcd60e51b815260206004820152601d60248201527f626174636820686561646572206c656e67746820746f6f20736d616c6c0000006044820152606401610c42565b6040519150808483378082016040529250929050565b5f8161010181146154b85760405162461bcd60e51b815260206004820181905260248201527f626174636820686561646572206c656e67746820697320696e636f72726563746044820152606401610c42565b6040805160c085901b815260f084901b6008820152600a60208502820181019092525f9181016155568161ffff8716866156cb565b82900390912095945050505050565b8082535050565b5f54610100900460ff166155e85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6065805460ff19169055565b5f54610100900460ff166156705760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f133614d3b565b60655460ff166123f15760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c42565b5f825f036156da575082611953565b609b546001600160a01b03165f5b84811015615787576040517fae453cd5000000000000000000000000000000000000000000000000000000008152600481018590525f906001600160a01b0384169063ae453cd590602401602060405180830381865afa15801561574e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906157729190615b11565b875250602090950194600193840193016156e8565b5093949350505050565b5f602082840312156157a1575f80fd5b5035919050565b80356001600160a01b038116811461231e575f80fd5b5f602082840312156157ce575f80fd5b611953826157a8565b5f8083601f8401126157e7575f80fd5b50813567ffffffffffffffff8111156157fe575f80fd5b602083019150836020828501011115615815575f80fd5b9250929050565b5f805f6040848603121561582e575f80fd5b833567ffffffffffffffff811115615844575f80fd5b615850868287016157d7565b909790965060209590950135949350505050565b5f8060208385031215615875575f80fd5b823567ffffffffffffffff81111561588b575f80fd5b615897858286016157d7565b90969095509350505050565b5f60e0828403121561451b575f80fd5b5f805f805f606086880312156158c7575f80fd5b853567ffffffffffffffff808211156158de575f80fd5b6158ea89838a016158a3565b965060208801359150808211156158ff575f80fd5b61590b89838a016157d7565b90965094506040880135915080821115615923575f80fd5b50615930888289016157d7565b969995985093965092949392505050565b5f60208284031215615951575f80fd5b813567ffffffffffffffff811115615967575f80fd5b615973848285016158a3565b949350505050565b5f805f805f8060c08789031215615990575f80fd5b615999876157a8565b95506159a7602088016157a8565b94506159b5604088016157a8565b9350606087013592506080870135915060a087013590509295509295509295565b5f80604083850312156159e7575f80fd5b6159f0836157a8565b946020939093013593505050565b5f805f8060408587031215615a11575f80fd5b843567ffffffffffffffff80821115615a28575f80fd5b615a34888389016157d7565b90965094506020870135915080821115615a4c575f80fd5b50615a59878288016157d7565b95989497509550505050565b80151581146137dc575f80fd5b5f60208284031215615a82575f80fd5b813561195381615a65565b803567ffffffffffffffff8116811461231e575f80fd5b5f8060408385031215615ab5575f80fd5b6159f083615a8d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156119ae576119ae615abe565b818103818111156119ae576119ae615abe565b5f60208284031215615b21575f80fd5b5051919050565b5f60208284031215615b38575f80fd5b813561ffff81168114611953575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615b7c575f80fd5b83018035915067ffffffffffffffff821115615b96575f80fd5b602001915036819003821315615815575f80fd5b5f60208284031215615bba575f80fd5b813560ff81168114611953575f80fd5b5f60208284031215615bda575f80fd5b815161195381615a65565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615c1557615c15615abe565b5060010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82615c5757615c57615c1c565b500690565b5f60208284031215615c6c575f80fd5b61195382615a8d565b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190508260608301529695505050505050565b5f82515f5b81811015615cf75760208186018101518583015201615cdd565b505f920191825250919050565b80820281158282048414176119ae576119ae615abe565b5f82615d2957615d29615c1c565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c6343000818000a diff --git a/bindings/bindings/centralization_cleanup_test.go b/bindings/bindings/centralization_cleanup_test.go index 06f58fb26..9ed323b61 100644 --- a/bindings/bindings/centralization_cleanup_test.go +++ b/bindings/bindings/centralization_cleanup_test.go @@ -23,6 +23,11 @@ func TestCurrentRollupBindingShape(t *testing.T) { "commitState": {selector: "67caa37a", inputs: 1}, "commitBatchWithProof": {selector: "1544ba3a", inputs: 3}, "initialize4": {selector: "843bc9a1", inputs: 2}, + "initialize5": {selector: "7ae64261", inputs: 0}, + // The per-batch getters keep the selectors of the public mappings they replaced. + "batchDataStore": {selector: "5ef7a94a", inputs: 1}, + "committedStateRoots": {selector: "68589dfa", inputs: 1}, + "batchBlobVersionedHashes": {selector: "2a213ba1", inputs: 1}, } for name, want := range expected { method, ok := current.Methods[name] @@ -51,6 +56,17 @@ func TestCurrentRollupBindingShape(t *testing.T) { len(method.Outputs) != 1 || method.Outputs[0].Type.String() != "uint256" { t.Fatalf("generated Rollup binding has invalid legacyCutoverBatchIndex getter: %v", method) } + for _, name := range []string{"batchRingStartIndex", "highestRevertedBatchIndex"} { + if method, ok := current.Methods[name]; !ok || + len(method.Outputs) != 1 || method.Outputs[0].Type.String() != "uint64" { + t.Fatalf("generated Rollup binding has invalid %s getter: %v", name, method) + } + } + ringEvent, ok := current.Events["BatchRingStarted"] + if !ok || len(ringEvent.Inputs) != 1 || + !ringEvent.Inputs[0].Indexed || ringEvent.Inputs[0].Type.String() != "uint256" { + t.Fatalf("BatchRingStarted must index the start batch: %v", ringEvent) + } cutoverEvent, ok := current.Events["SubmitterContractUpdated"] if !ok || len(cutoverEvent.Inputs) != 3 || !cutoverEvent.Inputs[2].Indexed || cutoverEvent.Inputs[2].Type.String() != "uint256" { @@ -102,11 +118,16 @@ func TestCurrentSubmitterBindingShape(t *testing.T) { } func TestCurrentStorageLayoutsAreGenerated(t *testing.T) { + // The per-batch mappings keep their slots under their legacy names. The batch ring is appended. wantRollupSlots := map[string]uint{ - "submitterContract": 151, - "batchDataStore": 162, - "batchBlobVersionedHashes": 173, - "legacyCutoverBatchIndex": 174, + "submitterContract": 151, + "_legacyBatchDataStore": 162, + "_legacyCommittedStateRoots": 171, + "_legacyBatchBlobVersionedHashes": 173, + "legacyCutoverBatchIndex": 174, + "batchRingStartIndex": 175, + "highestRevertedBatchIndex": 175, + "_batchRing": 176, } for _, entry := range RollupStorageLayout.Storage { if entry.Label == "pendingBatchCount" { diff --git a/bindings/bindings/rollup.go b/bindings/bindings/rollup.go index fc5a82fb1..d66dc6b39 100644 --- a/bindings/bindings/rollup.go +++ b/bindings/bindings/rollup.go @@ -42,8 +42,8 @@ type IRollupBatchDataInput struct { // RollupMetaData contains all meta data concerning the Rollup contract. var RollupMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_chainID\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"winner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"res\",\"type\":\"string\"}],\"name\":\"ChallengeRes\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ChallengeRewardClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"batchIndex\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengeDeposit\",\"type\":\"uint256\"}],\"name\":\"ChallengeState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"CommitBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"withdrawRoot\",\"type\":\"bytes32\"}],\"name\":\"FinalizeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProveRemainingClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"RevertBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"legacyCutoverBatchIndex\",\"type\":\"uint256\"}],\"name\":\"SubmitterContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"UpdateChallenger\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"UpdateFinalizationPeriodSeconds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPercent\",\"type\":\"uint256\"}],\"name\":\"UpdateProofRewardPercent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldWindow\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newWindow\",\"type\":\"uint256\"}],\"name\":\"UpdateProofWindow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"UpdateRollupDelayPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldVerifier\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newVerifier\",\"type\":\"address\"}],\"name\":\"UpdateVerifier\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LAYER_2_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"__maxNumTxInChunk\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"addChallenger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchBlobVersionedHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blobVersionedHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"batchChallengeReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchChallenged\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchChallengedSuccess\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchDataStore\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"originTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finalizeTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchExist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchInChallenge\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchInsideChallengeWindow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"batchIndex\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_batchHash\",\"type\":\"bytes32\"}],\"name\":\"challengeState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"challenges\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"batchIndex\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"challengeDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"challengeSuccess\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"finished\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"claimProveRemaining\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"claimReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"numL1Messages\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structIRollup.BatchDataInput\",\"name\":\"batchDataInput\",\"type\":\"tuple\"}],\"name\":\"commitBatch\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"numL1Messages\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structIRollup.BatchDataInput\",\"name\":\"batchDataInput\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_batchProof\",\"type\":\"bytes\"}],\"name\":\"commitBatchWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"numL1Messages\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structIRollup.BatchDataInput\",\"name\":\"batchDataInput\",\"type\":\"tuple\"}],\"name\":\"commitState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"committedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"committedStateRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizationPeriodSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"}],\"name\":\"finalizeBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"finalizedStateRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"}],\"name\":\"importGenesisBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inChallenge\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_submitterContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messageQueue\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_finalizationPeriodSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_proofWindow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_proofRewardPercent\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_prevStateRoot\",\"type\":\"bytes32\"}],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rollupDelayPeriod\",\"type\":\"uint256\"}],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newSubmitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_expectedLegacyCutoverBatchIndex\",\"type\":\"uint256\"}],\"name\":\"initialize4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchIndex\",\"type\":\"uint256\"}],\"name\":\"isBatchFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"challengerAddress\",\"type\":\"address\"}],\"name\":\"isChallenger\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isChallenger\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastCommittedBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFinalizedBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"legacyCutoverBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageQueue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proofRewardPercent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proofWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_batchProof\",\"type\":\"bytes\"}],\"name\":\"proveCommittedBatchState\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proveRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_batchProof\",\"type\":\"bytes\"}],\"name\":\"proveState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"removeChallenger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"revertBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"revertReqIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupDelayPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_status\",\"type\":\"bool\"}],\"name\":\"setPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"submitterContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newPeriod\",\"type\":\"uint256\"}],\"name\":\"updateFinalizePeriodSeconds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newWindow\",\"type\":\"uint256\"}],\"name\":\"updateProofWindow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newProofRewardPercent\",\"type\":\"uint256\"}],\"name\":\"updateRewardPercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newPeriod\",\"type\":\"uint256\"}],\"name\":\"updateRollupDelayPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"name\":\"withdrawalRoots\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exist\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60a060405234801562000010575f80fd5b50604051620056a4380380620056a483398101604081905262000033916200010f565b6001600160401b0381166080526200004a62000051565b506200013e565b5f54610100900460ff1615620000bd5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff908116146200010d575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f6020828403121562000120575f80fd5b81516001600160401b038116811462000137575f80fd5b9392505050565b6080516155466200015e5f395f81816106c001526145cf01526155465ff3fe608060405260043610610369575f3560e01c8063728cdbca116101c8578063b35dac4e116100fd578063cf9a67451161009d578063dff7827e1161006d578063dff7827e14610b20578063e3fff1dd14610b35578063f2fde38b14610b54578063fb1e8b0414610b73575f80fd5b8063cf9a674514610aae578063d279c19114610acd578063d8dc99d214610aec578063de8b303514610b01575f80fd5b8063bedb86fb116100d8578063bedb86fb14610a48578063c555389214610a67578063cd4edc6914610a86578063ce5db8d614610a99575f80fd5b8063b35dac4e146109eb578063b3e0a50914610a0a578063b8d0a1b014610a29575f80fd5b8063a3c9e94c11610168578063a4f209b011610143578063a4f209b01461096d578063abc8d68d1461098c578063b31a77d3146109b7578063b3484425146109cc575f80fd5b8063a3c9e94c1461090b578063a415d8dc1461092a578063a479265d14610958575f80fd5b80638da5cb5b116101a35780638da5cb5b146107ee5780638f1d37761461080b578063910129d4146108bb57806397fc007c146108ec575f80fd5b8063728cdbca14610797578063843bc9a1146107b657806388b1ea09146107d5575f80fd5b80632a213ba11161029e5780635ef7a94a1161023e57806367caa37a1161021957806367caa37a1461071a57806368589dfa146107395780636c578c1d14610764578063715018a614610783575f80fd5b80635ef7a94a1461063d5780635f77cf1d146106af57806361267290146106fb575f80fd5b80633e001b66116102795780633e001b66146105df57806341f756da146105f457806357e0af6c146106075780635c975abb14610626575f80fd5b80632a213ba11461055e5780632b7ac3f3146105895780633b70c18a146105c0575f80fd5b80631544ba3a1161030957806318af3b2b116102e457806318af3b2b146104b957806321e2f9e0146104e95780632362f03e146105085780632571098d14610533575f80fd5b80631544ba3a14610470578063163d9bee1461048f57806318463fb0146104a4575f80fd5b806310d445831161034457806310d44583146103fb578063116a1f421461041a578063121dcd501461043c5780631336110114610451575f80fd5b806304d7721514610374578063059def61146103b75780630ceb6780146103da575f80fd5b3661037057005b5f80fd5b34801561037f575f80fd5b506103a261038e366004614f8a565b60a36020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156103c2575f80fd5b506103cc609d5481565b6040519081526020016103ae565b3480156103e5575f80fd5b506103f96103f4366004614fb7565b610b88565b005b348015610406575f80fd5b506103f9610415366004615015565b610c5a565b348015610425575f80fd5b506103a2610434366004614f8a565b609d54101590565b348015610447575f80fd5b506103cc609e5481565b34801561045c575f80fd5b506103f961046b36600461505d565b610f96565b34801561047b575f80fd5b506103f961048a3660046150ac565b6114b3565b34801561049a575f80fd5b506103cc60ae5481565b3480156104af575f80fd5b506103cc60a75481565b3480156104c4575f80fd5b506103a26104d3366004614f8a565b5f90815260a26020526040902060010154421090565b3480156104f4575f80fd5b506103a2610503366004614f8a565b611872565b348015610513575f80fd5b506103cc610522366004614f8a565b60a16020525f908152604090205481565b34801561053e575f80fd5b506103cc61054d366004614f8a565b60a06020525f908152604090205481565b348015610569575f80fd5b506103cc610578366004614f8a565b60ad6020525f908152604090205481565b348015610594575f80fd5b50609c546105a8906001600160a01b031681565b6040516001600160a01b0390911681526020016103ae565b3480156105cb575f80fd5b50609b546105a8906001600160a01b031681565b3480156105ea575f80fd5b506103cc60aa5481565b6103f961060236600461513a565b6118a0565b348015610612575f80fd5b506103f9610621366004614f8a565b611ba4565b348015610631575f80fd5b5060655460ff166103a2565b348015610648575f80fd5b50610686610657366004614f8a565b60a26020525f90815260409020805460018201546002830154600390930154919290916001600160a01b031684565b604080519485526020850193909352918301526001600160a01b031660608201526080016103ae565b3480156106ba575f80fd5b506106e27f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff90911681526020016103ae565b348015610706575f80fd5b506103f9610715366004614f8a565b611c4f565b348015610725575f80fd5b506103f961073436600461513a565b611e2a565b348015610744575f80fd5b506103cc610753366004614f8a565b60ab6020525f908152604090205481565b34801561076f575f80fd5b506103f961077e366004614fb7565b612175565b34801561078e575f80fd5b506103f9612232565b3480156107a2575f80fd5b506103f96107b1366004615174565b612245565b3480156107c1575f80fd5b506103f96107d03660046151cf565b61254e565b3480156107e0575f80fd5b5060a6546103a29060ff1681565b3480156107f9575f80fd5b506033546001600160a01b03166105a8565b348015610816575f80fd5b50610877610825366004614f8a565b60a46020525f9081526040902080546001820154600283015460039093015467ffffffffffffffff831693680100000000000000009093046001600160a01b0316929060ff8082169161010090041686565b6040805167ffffffffffffffff90971687526001600160a01b03909516602087015293850192909252606084015215156080830152151560a082015260c0016103ae565b3480156108c6575f80fd5b506103a26108d5366004614f8a565b5f90815260a4602052604090206003015460ff1690565b3480156108f7575f80fd5b506103f9610906366004614fb7565b612895565b348015610916575f80fd5b506097546105a8906001600160a01b031681565b348015610935575f80fd5b506103a2610944366004614fb7565b609f6020525f908152604090205460ff1681565b348015610963575f80fd5b506103cc60995481565b348015610978575f80fd5b506103f9610987366004614f8a565b612978565b348015610997575f80fd5b506103cc6109a6366004614fb7565b60a56020525f908152604090205481565b3480156109c2575f80fd5b506103cc60a85481565b3480156109d7575f80fd5b506103f96109e63660046151f7565b612a28565b3480156109f6575f80fd5b506103f9610a05366004614fb7565b612d35565b348015610a15575f80fd5b506103f9610a2436600461505d565b612d8e565b348015610a34575f80fd5b506103f9610a433660046151f7565b61311f565b348015610a53575f80fd5b506103f9610a6236600461526b565b6131a8565b348015610a72575f80fd5b506103f9610a81366004614f8a565b6132e6565b6103f9610a9436600461529d565b613389565b348015610aa4575f80fd5b506103cc60985481565b348015610ab9575f80fd5b506103f9610ac8366004614f8a565b61391b565b348015610ad8575f80fd5b506103f9610ae7366004614fb7565b613a8a565b348015610af7575f80fd5b506103cc60ac5481565b348015610b0c575f80fd5b506103a2610b1b366004614f8a565b613b49565b348015610b2b575f80fd5b506103cc609a5481565b348015610b40575f80fd5b506103f9610b4f366004614f8a565b613b93565b348015610b5f575f80fd5b506103f9610b6e366004614fb7565b613c36565b348015610b7e575f80fd5b506103cc60a95481565b610b90613cc3565b6001600160a01b0381165f908152609f602052604090205460ff1615610bfd5760405162461bcd60e51b815260206004820152601f60248201527f6163636f756e7420697320616c72656164792061206368616c6c656e6765720060448201526064015b60405180910390fd5b6001600160a01b0381165f818152609f6020908152604091829020805460ff1916600190811790915591519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc00991015b60405180910390a250565b610c62613cc3565b5f8111610cb15760405162461bcd60e51b815260206004820152601560248201527f636f756e74206d757374206265206e6f6e7a65726f00000000000000000000006044820152606401610bf4565b5f80610cbd8585613d1d565b915091505f610cd0836001015160c01c90565b5f81815260a160205260409020549091508214610d2f5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b5f60a181610d3d87856152e4565b81526020019081526020015f205414610dbd5760405162461bcd60e51b8152602060048201526024808201527f726576657274696e67206d7573742073746172742066726f6d2074686520656e60448201527f64696e67000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b609d548111610e345760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c792072657665727420756e46696e616c697a6564206261746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b610e3f6001826152f7565b609e555b8315610f8e57604051829082907ecae2739091badfd91c373f0a16cede691e0cd25bb80cff77dd5caeb4710146905f90a35f81815260a16020526040812055610e8b81613b49565b15610ee6575f81815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091610ed69084906152e4565b909155505060a6805460ff191690555b5f81815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a85415801590610f46575060a85481145b15610f50575f60a8555b6001015f81815260a160205260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90940193915081610e43575b505050505050565b60a85415610fe65760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b610fee613dc5565b5f80610ffa8484613d1d565b915091505f61100d836001015160c01c90565b5f81815260a16020526040902054909150821461106c5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b61107581611872565b6110c15760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610bf4565b6110ca81613b49565b156111175760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610bf4565b5f81815260a4602052604090206003015460ff16156111785760405162461bcd60e51b815260206004820152601660248201527f62617463682073686f756c6420626520726576657274000000000000000000006044820152606401610bf4565b5f81815260a260205260409020600101544210156111d85760405162461bcd60e51b815260206004820152601960248201527f626174636820696e206368616c6c656e67652077696e646f77000000000000006044820152606401610bf4565b605983015160a05f6111eb6001856152f7565b81526020019081526020015f2054146112465760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610bf4565b5f81815260a06020526040902054156112a15760405162461bcd60e51b815260206004820152601660248201527f626174636820616c7265616479207665726966696564000000000000000000006044820152606401610bf4565b80609d54600101146112f55760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610bf4565b609d819055600160a35f61130a866099015190565b815260208101919091526040015f20805460ff191691151591909117905560798301515f82815260a0602052604090205561135961134c846011015160c01c90565b600985015160c01c613e18565b60a25f6113676001846152f7565b815260208101919091526040015f908120818155600180820183905560028201839055600390910180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560ab91906113c390846152f7565b81526020019081526020015f205f905560ad5f6001836113e391906152f7565b81526020019081526020015f205f905560a45f60018361140391906152f7565b815260208082019290925260409081015f90812080547fffffffff000000000000000000000000000000000000000000000000000000001681556001810182905560028101829055600301805461ffff1916905583815260a1909252902054817f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d61148f866079015190565b60998701516040805192835260208301919091520160405180910390a35050505050565b60a854156115035760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b61150b613dc5565b60ac54609e545f90815260a260205260408120549091429161152d91906152e4565b1090505f4260ac54609b5f9054906101000a90046001600160a01b03166001600160a01b031663b59b1a786040518163ffffffff1660e01b8152600401602060405180830381865afa158015611585573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115a9919061530a565b6115b391906152e4565b109050811580156115c15750805b15611628575f6115d76080890160608a01615321565b61ffff16116116285760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b81806116315750805b61167d5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642074696d696e670000000000000000000000000000000000006044820152606401610bf4565b5f61169361168e60208a018a615342565b613d1d565b5090505f6116a5826001015160c01c90565b6116b09060016152e4565b5f81815260ad60205260408120549192509015611750575f491561173c5760405162461bcd60e51b815260206004820152602f60248201527f6d757374206e6f7420636172727920626c6f62207768656e207573696e67207360448201527f746f72656420626c6f62206861736800000000000000000000000000000000006064820152608401610bf4565b505f81815260ad602052604090205461176b565b61176861176060208c018c6153a3565b60ff16613ecf565b90505b6117768a5f8361400a565b5f806117828b8b613d1d565b915091505f611795836001015160c01c90565b905080609e54146117e85760405162461bcd60e51b815260206004820152601660248201527f696e636f727265637420626174636820686561646572000000000000000000006044820152606401610bf4565b5f81815260a1602052604090205482146118445760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b5f81815260a26020526040902042600190910155611863838b8b614560565b50505050505050505050505050565b5f81815260a260205260408120541580159061189a57505f82815260a1602052604090205415155b92915050565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561190c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061193091906153c3565b61197c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b60a854156119cc5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b6119d4613dc5565b5f6119e561168e6020840184615342565b5090505f6119f7826001015160c01c90565b611a029060016152e4565b5f81815260ad602052604090205490915015611a865760405162461bcd60e51b815260206004820152602860248201527f636f6d6d69744261746368207265717569726573206e6f2073746f726564206260448201527f6c6f6220686173680000000000000000000000000000000000000000000000006064820152608401610bf4565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015611aea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b0e919061530a565b611b1891906152e4565b1015611b80575f611b2f6080850160608601615321565b61ffff1611611b805760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b5f611b9161176060208601866153a3565b9050611b9e84338361400a565b50505050565b611bac613cc3565b5f81118015611bbd57506099548114155b611c095760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e65772070726f6f662077696e646f7700000000000000006044820152606401610bf4565b609980549082905560408051828152602081018490527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a6191015b60405180910390a15050565b5f54600290610100900460ff16158015611c6f57505f5460ff8083169116105b611ce15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff831617610100179055611cff5f5460ff1690565b60ff16600214611d515760405162461bcd60e51b815260206004820152601660248201527f6d757374206861766520696e697469616c697a656421000000000000000000006044820152606401610bf4565b81611dc45760405162461bcd60e51b815260206004820152602760248201527f63616e206e6f742073657420737461746520726f6f742077697468206279746560448201527f73333228302921000000000000000000000000000000000000000000000000006064820152608401610bf4565b609e545f90815260ab6020526040902054611ded57609e545f90815260ab602052604090208290555b5f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611c43565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611e96573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611eba91906153c3565b611f065760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b60a85415611f565760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b611f5e613dc5565b5f4915611fad5760405162461bcd60e51b815260206004820152601f60248201527f636f6d6d69745374617465206d757374206e6f7420636172727920626c6f62006044820152606401610bf4565b5f611fbe61168e6020840184615342565b5090505f611fd0826001015160c01c90565b611fdb9060016152e4565b5f81815260ad602052604090205490915061205e5760405162461bcd60e51b815260206004820152602260248201527f6e6f2073746f72656420626c6f62206861736820666f7220746869732062617460448201527f63680000000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa1580156120c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120e6919061530a565b6120f091906152e4565b1015612158575f6121076080850160608601615321565b61ffff16116121585760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b61217083335f84815260ad602052604090205461400a565b505050565b61217d613cc3565b6001600160a01b0381165f908152609f602052604090205460ff166121e45760405162461bcd60e51b815260206004820152601b60248201527f6163636f756e74206973206e6f742061206368616c6c656e67657200000000006044820152606401610bf4565b6001600160a01b0381165f818152609f60209081526040808320805460ff19169055519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc0099101610c4f565b61223a613cc3565b6122435f614713565b565b5f54610100900460ff161580801561226357505f54600160ff909116105b8061227c5750303b15801561227c57505f5460ff166001145b6122ee5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805460ff19166001179055801561230f575f805461ff0019166101001790555b6001600160a01b038616158061232c57506001600160a01b038516155b15612363576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0387166123b95760405162461bcd60e51b815260206004820152601a60248201527f696e76616c6964207375626d697474657220636f6e74726163740000000000006044820152606401610bf4565b6123c161477c565b6123c9614800565b609780546001600160a01b03808a167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255609b8054898416908316179055609c805492881692909116821790556098859055609984905560a98390556040515f907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96908290a3604080515f8152602081018690527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a437910160405180910390a1604080515f8152602081018590527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a61910160405180910390a1604080515f8152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b0223910160405180910390a18015612545575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b5f54600490610100900460ff1615801561256e57505f5460ff8083169116105b6125e05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff83161761010017905561261b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b03161461267b5760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610bf4565b6001600160a01b0383161580159061269c57505f836001600160a01b03163b115b6126e85760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207375626d69747465720000000000000000000000000000006044820152606401610bf4565b81609e54146127395760405162461bcd60e51b815260206004820152601660248201527f6375746f766572206261746368206d69736d61746368000000000000000000006044820152606401610bf4565b60a65460ff161561278c5760405162461bcd60e51b815260206004820152601560248201527f6368616c6c656e676520696e2070726f677265737300000000000000000000006044820152606401610bf4565b60a854156127dc5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b60ae82905560975460405183916001600160a01b03808716929116907faf9f8e4eb71b2fdd1ed3defb8e321359a8984ca774246d3d749837b98873a935905f90a4609780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b61289d613cc3565b6001600160a01b038116158015906128c35750609c546001600160a01b03828116911614155b61290f5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206e65772076657269666965720000000000000000000000006044820152606401610bf4565b609c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96905f90a35050565b612980613cc3565b5f81118015612990575060648111155b801561299e575060a9548114155b6129ea5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642070726f6f66207265776172642070657263656e74616765006044820152606401610bf4565b60a980549082905560408051828152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b02239101611c43565b60a85415612a785760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b612a80613dc5565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612aec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b1091906153c3565b612b5c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b5f80612b688686613d1d565b915091505f612b7b836001015160c01c90565b5f81815260a160205260409020549091508214612bda5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b612be381613b49565b612c2f5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610bf4565b5f81815260a46020526040902060038101805461ff00191661010017905560a6805460ff191690556099546002909101544291612c6b916152e4565b11612cea575f81815260a4602090815260408083206003908101805460ff1916600117905560a2835292819020909201548251808401909352600783527f54696d656f75740000000000000000000000000000000000000000000000000091830191909152612ce59183916001600160a01b031690614884565b612545565b612cf5838686614560565b61254581336040518060400160405280600d81526020017f50726f6f662073756363657373000000000000000000000000000000000000008152506149e3565b612d3d613cc3565b60aa80545f909155612d4f8282614aaf565b604080516001600160a01b0384168152602081018390527fb1b2058a6969e2d25e47bcaebe8ae21c29a23b2752429315b75e2f4f285f3d879101611c43565b612d96613cc3565b5f805260a06020527fb84a74ec6ef4d0e83b6006dfaa014ab4026f9f3b97d186e604d29998a4e808ea5415612e0d5760405162461bcd60e51b815260206004820152601660248201527f67656e6573697320626174636820696d706f72746564000000000000000000006044820152606401610bf4565b5f80612e198484613d1d565b915091505f612e2c836001015160c01c90565b90508015612e7c5760405162461bcd60e51b815260206004820152601360248201527f696e76616c696420626174636820696e646578000000000000000000000000006044820152606401610bf4565b5f612e88846079015190565b905080612ed75760405162461bcd60e51b815260206004820152600f60248201527f7a65726f20737461746520726f6f7400000000000000000000000000000000006044820152606401610bf4565b600984015160c01c15612f2c5760405162461bcd60e51b815260206004820152601d60248201527f6c31206d65737361676520706f707065642073686f756c6420626520300000006044820152606401610bf4565b5f612f38856019015190565b03612f855760405162461bcd60e51b815260206004820152600e60248201527f7a65726f206461746120686173680000000000000000000000000000000000006044820152606401610bf4565b7f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014612fb1856039015190565b14612ffe5760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642076657273696f6e65642068617368000000000000000000006044820152606401610bf4565b5f82815260a1602090815260408083208690558051608081018252428082528184019081528183018581526060830186815288875260a28652848720935184559151600184015551600283015551600390910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091179055603987015160ad83528184205560ab825280832084905560a0909152808220839055609e849055609d84905551849184917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a3604080518281525f6020820152849184917f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d910160405180910390a3505050505050565b5f8061312b8686613d1d565b915091505f61313e836001015160c01c90565b5f81815260a16020526040902054909150821461319d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b612545838686614560565b6131b0613cc3565b80156132b4576131be614b58565b60a65460ff16156132735760a7545f90815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a590925282208054919290916132129084906152e4565b909155505060a7545f90815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a6805460ff191690555b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a150565b6132bc614bb2565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613296565b50565b6132ee613cc3565b5f811180156132ff575060ac548114155b61334b5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206e657720726f6c6c75702064656c617920706572696f64006044820152606401610bf4565b60ac80549082905560408051828152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad19101611c43565b335f908152609f602052604090205460ff166133e75760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206368616c6c656e67657220616c6c6f7765640000000000000000006044820152606401610bf4565b60a854156134375760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b61343f613dc5565b60a65460ff16156134925760405162461bcd60e51b815260206004820152601460248201527f616c726561647920696e206368616c6c656e67650000000000000000000000006044820152606401610bf4565b8167ffffffffffffffff16609d54106134ed5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c72656164792066696e616c697a65640000000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a1602052604090205481146135545760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b6135678267ffffffffffffffff16611872565b6135b35760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a460205260409020546801000000000000000090046001600160a01b03161561362e5760405162461bcd60e51b815260206004820152601860248201527f626174636820616c7265616479206368616c6c656e67656400000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a2602052604090206001015442106136be5760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74206368616c6c656e6765206261746368206f757473696465207460448201527f6865206368616c6c656e67652077696e646f77000000000000000000000000006064820152608401610bf4565b60975f9054906101000a90046001600160a01b03166001600160a01b0316630d13fd7b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561370e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613732919061530a565b3410156137815760405162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742076616c756500000000000000000000000000006044820152606401610bf4565b67ffffffffffffffff82811660a78190556040805160c0810182528281523360208083018281523484860190815242606086019081525f6080870181815260a0880182815299825260a4909552969096209451855492516001600160a01b031668010000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009093169816979097171783559451600183015591516002820155925160039093018054925115156101000261ff00199415159490941661ffff19909316929092179290921790556001600160a01b03168267ffffffffffffffff167f3a6ea19df25b49e7624e313ce7c1ab23984238e93727260db56a81735b1b99763460405161389991815260200190565b60405180910390a35f609d5460016138b191906152e4565b90505b609e548111613909578267ffffffffffffffff1681146138f7576099545f82815260a26020526040812060010180549091906138f19084906152e4565b90915550505b80613901816153de565b9150506138b4565b505060a6805460ff1916600117905550565b5f54600390610100900460ff1615801561393b57505f5460ff8083169116105b6139ad5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff831617610100178155829003613a0f5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c696420726f6c6c75702064656c617920706572696f6400000000006044820152606401610bf4565b60ac829055604080515f8152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad1910160405180910390a15f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611c43565b335f90815260a5602052604081205490819003613ae95760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642062617463684368616c6c656e6765526577617264000000006044820152606401610bf4565b335f90815260a56020526040812055613b028282614aaf565b816001600160a01b03167f9c25fa83f414ed363c8d39c98fb3e17567b3431cede71eb062c49d2a63ce247a82604051613b3d91815260200190565b60405180910390a25050565b5f81815260a460205260408120546801000000000000000090046001600160a01b03161580159061189a5750505f90815260a46020526040902060030154610100900460ff161590565b613b9b613cc3565b5f81118015613bac57506098548114155b613bf85760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964206e65772066696e616c697a6520706572696f6400000000006044820152606401610bf4565b609880549082905560408051828152602081018490527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a4379101611c43565b613c3e613cc3565b6001600160a01b038116613cba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bf4565b6132e381614713565b6033546001600160a01b031633146122435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bf4565b5f805f613d2a8585614beb565b90505f8160ff165f03613d4b57613d418686614c5b565b9094509050613db7565b8160ff1660011480613d6057508160ff166002145b15613d6f57613d418686614cc4565b60405162461bcd60e51b815260206004820152601960248201527f556e737570706f727465642062617463682076657273696f6e000000000000006044820152606401610bf4565b808420925050509250929050565b60655460ff16156122435760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610bf4565b805f03613e23575050565b8082035f5b82811015611b9e57610100818403811115613e4257508083035b609b546040517f3c7f528300000000000000000000000000000000000000000000000000000000815260048101859052602481018390526001600160a01b0390911690633c7f5283906044015f604051808303815f87803b158015613ea5575f80fd5b505af1158015613eb7573d5f803e3d5ffd5b50505050610100830192505061010081019050613e28565b5f81600203613f5e575f6040515f5b804980613eeb5750613efa565b60208202830152600101613ede565b602081028083209201604052909250905080613f585760405162461bcd60e51b815260206004820152601b60248201527f5632207265717569726573206174206c65617374203120626c6f6200000000006044820152606401610bf4565b50919050565b60014915613fd45760405162461bcd60e51b815260206004820152602560248201527f6c6567616379206261746368657320737570706f72742065786163746c79203160448201527f20626c6f620000000000000000000000000000000000000000000000000000006064820152608401610bf4565b5f4915613fe2575f4961189a565b507f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440145b919050565b600261401960208501856153a3565b60ff16111561406a5760405162461bcd60e51b815260206004820152600f60248201527f696e76616c69642076657273696f6e00000000000000000000000000000000006044820152606401610bf4565b60808301356140bb5760405162461bcd60e51b815260206004820152601b60248201527f70726576696f757320737461746520726f6f74206973207a65726f00000000006044820152606401610bf4565b60a083013561410c5760405162461bcd60e51b815260206004820152601660248201527f6e657720737461746520726f6f74206973207a65726f000000000000000000006044820152606401610bf4565b5f8061411e61168e6020870187615342565b915091505f614131836001015160c01c90565b90505f60a1816141428460016152e4565b81526020019081526020015f20541461419d5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c726561647920636f6d6d69747465640000000000000000006044820152606401610bf4565b609e5481146141ee5760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610bf4565b5f81815260a16020526040902054821461424a5760405162461bcd60e51b815260206004820152601b60248201527f696e636f727265637420706172656e74206261746368206861736800000000006044820152606401610bf4565b5f81815260ab60205260409020546080870135146142aa5760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610bf4565b5f6142b9846011015160c01c90565b90505f6142e56142cf60608a0160408b01615415565b6142df60808b0160608c01615321565b84614d17565b90506142f76080890160608a01615321565b60019384019361ffff91909116929092019160f99061431960208b018b6153a3565b60ff161061432657506101015b60408051828101909152955061434b8661434360208c018c6153a3565b60ff16614d5b565b60c084901b60018701526143798661436960808c0160608d01615321565b61ffff1660c01b60099190910152565b60c083811b6011880152601987018390526039870188905260808a0135605988015260a08a0135607988015289013560998701525f60b987015260d9860185905260016143c960208b018b6153a3565b60ff16106143fb576143fb866143e560608c0160408d01615415565b67ffffffffffffffff1660c01b60f99190910152565b8086205f85815260a1602090815260408083209390935560ab815282822060a08d0135905560ad905290812088905560a65460ff16156144645760a7545f90815260a460205260409020600201546099544291614457916152e4565b61446191906152f7565b90505b6040518060800160405280428152602001826098544261448491906152e4565b61448e91906152e4565b81526020016144a360608d0160408e01615415565b67ffffffffffffffff1681526001600160a01b038b81166020928301525f88815260a28352604080822085518155858501516001820155858201516002820155606090950151600390950180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169590931694909417909155609e88905560a19091528181205491519193508692507f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f91a35050505050505050565b806145ad5760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642062617463682070726f6f66000000000000000000000000006044820152606401610bf4565b5f6145bc846001015160c01c90565b90505f6145ca856039015190565b90505f7f00000000000000000000000000000000000000000000000000000000000000006145f9876059015190565b6079880151609989015160b98a015160198b015160405160c09690961b7fffffffffffffffff000000000000000000000000000000000000000000000000166020870152602886019490945260488501929092526068840152608883015260a882015260c8810183905260e801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120609c549091506001600160a01b0316632c09a8486146bb885160f81c90565b858888866040518663ffffffff1660e01b81526004016146df95949392919061542e565b5f6040518083038186803b1580156146f5575f80fd5b505afa158015614707573d5f803e3d5ffd5b50505050505050505050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166147f85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b612243614d62565b5f54610100900460ff1661487c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b612243614dea565b60a88390555f83815260a460205260408082205460975491517fc96be4cb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526801000000000000000090920482169392919091169063c96be4cb906024016020604051808303815f875af115801561490b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061492f919061530a565b5f86815260a4602052604090206001015490915061494e9082906152e4565b5f86815260a460209081526040808320546801000000000000000090046001600160a01b0316835260a59091528120805490919061498d9084906152e4565b90915550506040516149a0908490615491565b604051908190038120906001600160a01b0384169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b5f83815260a4602052604081206001015460a954909190606490614a0790846154bd565b614a1191906154d4565b9050614a1d81836152f7565b60aa5f828254614a2d91906152e4565b90915550506001600160a01b0384165f90815260a5602052604081208054839290614a599084906152e4565b9091555050604051614a6c908490615491565b604051908190038120906001600160a01b0386169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b8015614b54575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114614afe576040519150601f19603f3d011682016040523d82523d5f602084013e614b03565b606091505b50509050806121705760405162461bcd60e51b815260206004820152601b60248201527f526f6c6c75703a20455448207472616e73666572206661696c656400000000006044820152606401610bf4565b5050565b614b60613dc5565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258614b953390565b6040516001600160a01b03909116815260200160405180910390a1565b614bba614e6f565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33614b95565b5f81614c395760405162461bcd60e51b815260206004820152601260248201527f456d7074792062617463682068656164657200000000000000000000000000006044820152606401610bf4565b82825f818110614c4b57614c4b61550c565b919091013560f81c949350505050565b5f8160f9811015614cae5760405162461bcd60e51b815260206004820152601d60248201527f626174636820686561646572206c656e67746820746f6f20736d616c6c0000006044820152606401610bf4565b6040519150808483378082016040529250929050565b5f816101018114614cae5760405162461bcd60e51b815260206004820181905260248201527f626174636820686561646572206c656e67746820697320696e636f72726563746044820152606401610bf4565b6040805160c085901b815260f084901b6008820152600a60208502820181019092525f918101614d4c8161ffff871686614ec1565b82900390912095945050505050565b8082535050565b5f54610100900460ff16614dde5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b6065805460ff19169055565b5f54610100900460ff16614e665760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b61224333614713565b60655460ff166122435760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610bf4565b5f825f03614ed0575082614f83565b609b546001600160a01b03165f5b84811015614f7d576040517fae453cd5000000000000000000000000000000000000000000000000000000008152600481018590525f906001600160a01b0384169063ae453cd590602401602060405180830381865afa158015614f44573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614f68919061530a565b87525060209095019460019384019301614ede565b50849150505b9392505050565b5f60208284031215614f9a575f80fd5b5035919050565b80356001600160a01b0381168114614005575f80fd5b5f60208284031215614fc7575f80fd5b614f8382614fa1565b5f8083601f840112614fe0575f80fd5b50813567ffffffffffffffff811115614ff7575f80fd5b60208301915083602082850101111561500e575f80fd5b9250929050565b5f805f60408486031215615027575f80fd5b833567ffffffffffffffff81111561503d575f80fd5b61504986828701614fd0565b909790965060209590950135949350505050565b5f806020838503121561506e575f80fd5b823567ffffffffffffffff811115615084575f80fd5b61509085828601614fd0565b90969095509350505050565b5f60e08284031215613f58575f80fd5b5f805f805f606086880312156150c0575f80fd5b853567ffffffffffffffff808211156150d7575f80fd5b6150e389838a0161509c565b965060208801359150808211156150f8575f80fd5b61510489838a01614fd0565b9096509450604088013591508082111561511c575f80fd5b5061512988828901614fd0565b969995985093965092949392505050565b5f6020828403121561514a575f80fd5b813567ffffffffffffffff811115615160575f80fd5b61516c8482850161509c565b949350505050565b5f805f805f8060c08789031215615189575f80fd5b61519287614fa1565b95506151a060208801614fa1565b94506151ae60408801614fa1565b9350606087013592506080870135915060a087013590509295509295509295565b5f80604083850312156151e0575f80fd5b6151e983614fa1565b946020939093013593505050565b5f805f806040858703121561520a575f80fd5b843567ffffffffffffffff80821115615221575f80fd5b61522d88838901614fd0565b90965094506020870135915080821115615245575f80fd5b5061525287828801614fd0565b95989497509550505050565b80151581146132e3575f80fd5b5f6020828403121561527b575f80fd5b8135614f838161525e565b803567ffffffffffffffff81168114614005575f80fd5b5f80604083850312156152ae575f80fd5b6151e983615286565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561189a5761189a6152b7565b8181038181111561189a5761189a6152b7565b5f6020828403121561531a575f80fd5b5051919050565b5f60208284031215615331575f80fd5b813561ffff81168114614f83575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615375575f80fd5b83018035915067ffffffffffffffff82111561538f575f80fd5b60200191503681900382131561500e575f80fd5b5f602082840312156153b3575f80fd5b813560ff81168114614f83575f80fd5b5f602082840312156153d3575f80fd5b8151614f838161525e565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361540e5761540e6152b7565b5060010190565b5f60208284031215615425575f80fd5b614f8382615286565b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190508260608301529695505050505050565b5f82515f5b818110156154b05760208186018101518583015201615496565b505f920191825250919050565b808202811582820484141761189a5761189a6152b7565b5f82615507577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_chainID\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ErrZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"startBatchIndex\",\"type\":\"uint256\"}],\"name\":\"BatchRingStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"winner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"res\",\"type\":\"string\"}],\"name\":\"ChallengeRes\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ChallengeRewardClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"batchIndex\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"challengeDeposit\",\"type\":\"uint256\"}],\"name\":\"ChallengeState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"CommitBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"withdrawRoot\",\"type\":\"bytes32\"}],\"name\":\"FinalizeBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ProveRemainingClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"name\":\"RevertBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddr\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"legacyCutoverBatchIndex\",\"type\":\"uint256\"}],\"name\":\"SubmitterContractUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"UpdateChallenger\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"UpdateFinalizationPeriodSeconds\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPercent\",\"type\":\"uint256\"}],\"name\":\"UpdateProofRewardPercent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldWindow\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newWindow\",\"type\":\"uint256\"}],\"name\":\"UpdateProofWindow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"UpdateRollupDelayPeriod\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldVerifier\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newVerifier\",\"type\":\"address\"}],\"name\":\"UpdateVerifier\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BATCH_RING_SIZE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LAYER_2_CHAIN_ID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"__maxNumTxInChunk\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"addChallenger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchBlobVersionedHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blobVersionedHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"batchChallengeReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchChallenged\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchChallengedSuccess\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchDataStore\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"originTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"finalizeTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"submitter\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchExist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchInChallenge\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"batchInsideChallengeWindow\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchRingStartIndex\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"batchIndex\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_batchHash\",\"type\":\"bytes32\"}],\"name\":\"challengeState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"challenges\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"batchIndex\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"challengeDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"challengeSuccess\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"finished\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"claimProveRemaining\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"claimReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"numL1Messages\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structIRollup.BatchDataInput\",\"name\":\"batchDataInput\",\"type\":\"tuple\"}],\"name\":\"commitBatch\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"numL1Messages\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structIRollup.BatchDataInput\",\"name\":\"batchDataInput\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_batchProof\",\"type\":\"bytes\"}],\"name\":\"commitBatchWithProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"parentBatchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"numL1Messages\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"prevStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"postStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structIRollup.BatchDataInput\",\"name\":\"batchDataInput\",\"type\":\"tuple\"}],\"name\":\"commitState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"committedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"batchHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"committedStateRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizationPeriodSeconds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"}],\"name\":\"finalizeBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchIndex\",\"type\":\"uint256\"}],\"name\":\"finalizedStateRoots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"highestRevertedBatchIndex\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"}],\"name\":\"importGenesisBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inChallenge\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_submitterContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_messageQueue\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_verifier\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_finalizationPeriodSeconds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_proofWindow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_proofRewardPercent\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_prevStateRoot\",\"type\":\"bytes32\"}],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rollupDelayPeriod\",\"type\":\"uint256\"}],\"name\":\"initialize3\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newSubmitter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_expectedLegacyCutoverBatchIndex\",\"type\":\"uint256\"}],\"name\":\"initialize4\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize5\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchIndex\",\"type\":\"uint256\"}],\"name\":\"isBatchFinalized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"challengerAddress\",\"type\":\"address\"}],\"name\":\"isChallenger\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isChallenger\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastCommittedBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastFinalizedBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"legacyCutoverBatchIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageQueue\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proofRewardPercent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proofWindow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_batchProof\",\"type\":\"bytes\"}],\"name\":\"proveCommittedBatchState\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proveRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_batchProof\",\"type\":\"bytes\"}],\"name\":\"proveState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"removeChallenger\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_batchHeader\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"revertBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"revertReqIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupDelayPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_status\",\"type\":\"bool\"}],\"name\":\"setPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"submitterContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newPeriod\",\"type\":\"uint256\"}],\"name\":\"updateFinalizePeriodSeconds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newWindow\",\"type\":\"uint256\"}],\"name\":\"updateProofWindow\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newProofRewardPercent\",\"type\":\"uint256\"}],\"name\":\"updateRewardPercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newPeriod\",\"type\":\"uint256\"}],\"name\":\"updateRollupDelayPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newVerifier\",\"type\":\"address\"}],\"name\":\"updateVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"withdrawalRoot\",\"type\":\"bytes32\"}],\"name\":\"withdrawalRoots\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exist\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60a060405234801562000010575f80fd5b5060405162005ec638038062005ec683398101604081905262000033916200010f565b6001600160401b0381166080526200004a62000051565b506200013e565b5f54610100900460ff1615620000bd5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff908116146200010d575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b5f6020828403121562000120575f80fd5b81516001600160401b038116811462000137575f80fd5b9392505050565b608051615d686200015e5f395f81816106a50152614b2c0152615d685ff3fe608060405260043610610395575f3560e01c80637ae64261116101de578063b35dac4e11610108578063cf9a67451161009d578063dff7827e1161006d578063dff7827e14610b6e578063e3fff1dd14610b83578063f2fde38b14610ba2578063fb1e8b0414610bc1575f80fd5b8063cf9a674514610afc578063d279c19114610b1b578063d8dc99d214610b3a578063de8b303514610b4f575f80fd5b8063c5553892116100d8578063c555389214610a95578063cd0cb80214610ab4578063cd4edc6914610ad4578063ce5db8d614610ae7575f80fd5b8063b35dac4e14610a19578063b3e0a50914610a38578063b8d0a1b014610a57578063bedb86fb14610a76575f80fd5b806397fc007c1161017e578063a4f209b01161014e578063a4f209b01461099b578063abc8d68d146109ba578063b31a77d3146109e5578063b3484425146109fa575f80fd5b806397fc007c1461091a578063a3c9e94c14610939578063a415d8dc14610958578063a479265d14610986575f80fd5b80638da53b43116101b95780638da53b43146108075780638da5cb5b1461081c5780638f1d377614610839578063910129d4146108e9575f80fd5b80637ae64261146107bb578063843bc9a1146107cf57806388b1ea09146107ee575f80fd5b80632b7ac3f3116102bf5780635f77cf1d1161025f57806368589dfa1161022f57806368589dfa1461074a5780636c578c1d14610769578063715018a614610788578063728cdbca1461079c575f80fd5b80635f77cf1d1461069457806361267290146106e057806364c71673146106ff57806367caa37a1461072b575f80fd5b806341f756da1161029a57806341f756da1461060357806357e0af6c146106165780635c975abb146106355780635ef7a94a1461064c575f80fd5b80632b7ac3f3146105985780633b70c18a146105cf5780633e001b66146105ee575f80fd5b80631544ba3a1161033557806321e2f9e01161030557806321e2f9e0146105045780632362f03e146105235780632571098d1461054e5780632a213ba114610579575f80fd5b80631544ba3a1461049c578063163d9bee146104bb57806318463fb0146104d057806318af3b2b146104e5575f80fd5b806310d445831161037057806310d4458314610427578063116a1f4214610446578063121dcd5014610468578063133611011461047d575f80fd5b806304d77215146103a0578063059def61146103e35780630ceb678014610406575f80fd5b3661039c57005b5f80fd5b3480156103ab575f80fd5b506103ce6103ba366004615791565b60a36020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156103ee575f80fd5b506103f8609d5481565b6040519081526020016103da565b348015610411575f80fd5b506104256104203660046157be565b610bd6565b005b348015610432575f80fd5b5061042561044136600461581c565b610ca8565b348015610451575f80fd5b506103ce610460366004615791565b609d54101590565b348015610473575f80fd5b506103f8609e5481565b348015610488575f80fd5b50610425610497366004615864565b61104c565b3480156104a7575f80fd5b506104256104b63660046158b3565b611582565b3480156104c6575f80fd5b506103f860ae5481565b3480156104db575f80fd5b506103f860a75481565b3480156104f0575f80fd5b506103ce6104ff366004615791565b611922565b34801561050f575f80fd5b506103ce61051e366004615791565b61195a565b34801561052e575f80fd5b506103f861053d366004615791565b60a16020525f908152604090205481565b348015610559575f80fd5b506103f8610568366004615791565b60a06020525f908152604090205481565b348015610584575f80fd5b506103f8610593366004615791565b6119a4565b3480156105a3575f80fd5b50609c546105b7906001600160a01b031681565b6040516001600160a01b0390911681526020016103da565b3480156105da575f80fd5b50609b546105b7906001600160a01b031681565b3480156105f9575f80fd5b506103f860aa5481565b610425610611366004615941565b6119b4565b348015610621575f80fd5b50610425610630366004615791565b611cb4565b348015610640575f80fd5b5060655460ff166103ce565b348015610657575f80fd5b5061066b610666366004615791565b611d5f565b604080519485526020850193909352918301526001600160a01b031660608201526080016103da565b34801561069f575f80fd5b506106c77f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff90911681526020016103da565b3480156106eb575f80fd5b506104256106fa366004615791565b611dc4565b34801561070a575f80fd5b5060af546106c79068010000000000000000900467ffffffffffffffff1681565b348015610736575f80fd5b50610425610745366004615941565b611fc0565b348015610755575f80fd5b506103f8610764366004615791565b6122f6565b348015610774575f80fd5b506104256107833660046157be565b612323565b348015610793575f80fd5b506104256123e0565b3480156107a7575f80fd5b506104256107b636600461597b565b6123f3565b3480156107c6575f80fd5b50610425612712565b3480156107da575f80fd5b506104256107e93660046159d6565b612a9b565b3480156107f9575f80fd5b5060a6546103ce9060ff1681565b348015610812575f80fd5b506103f861040081565b348015610827575f80fd5b506033546001600160a01b03166105b7565b348015610844575f80fd5b506108a5610853366004615791565b60a46020525f9081526040902080546001820154600283015460039093015467ffffffffffffffff831693680100000000000000009093046001600160a01b0316929060ff8082169161010090041686565b6040805167ffffffffffffffff90971687526001600160a01b03909516602087015293850192909252606084015215156080830152151560a082015260c0016103da565b3480156108f4575f80fd5b506103ce610903366004615791565b5f90815260a4602052604090206003015460ff1690565b348015610925575f80fd5b506104256109343660046157be565b612de2565b348015610944575f80fd5b506097546105b7906001600160a01b031681565b348015610963575f80fd5b506103ce6109723660046157be565b609f6020525f908152604090205460ff1681565b348015610991575f80fd5b506103f860995481565b3480156109a6575f80fd5b506104256109b5366004615791565b612ec5565b3480156109c5575f80fd5b506103f86109d43660046157be565b60a56020525f908152604090205481565b3480156109f0575f80fd5b506103f860a85481565b348015610a05575f80fd5b50610425610a143660046159fe565b612f75565b348015610a24575f80fd5b50610425610a333660046157be565b61327e565b348015610a43575f80fd5b50610425610a52366004615864565b6132d7565b348015610a62575f80fd5b50610425610a713660046159fe565b61361e565b348015610a81575f80fd5b50610425610a90366004615a72565b6136a7565b348015610aa0575f80fd5b50610425610aaf366004615791565b6137df565b348015610abf575f80fd5b5060af546106c79067ffffffffffffffff1681565b610425610ae2366004615aa4565b613882565b348015610af2575f80fd5b506103f860985481565b348015610b07575f80fd5b50610425610b16366004615791565b613e15565b348015610b26575f80fd5b50610425610b353660046157be565b613f84565b348015610b45575f80fd5b506103f860ac5481565b348015610b5a575f80fd5b506103ce610b69366004615791565b614043565b348015610b79575f80fd5b506103f8609a5481565b348015610b8e575f80fd5b50610425610b9d366004615791565b61408d565b348015610bad575f80fd5b50610425610bbc3660046157be565b614130565b348015610bcc575f80fd5b506103f860a95481565b610bde6141bd565b6001600160a01b0381165f908152609f602052604090205460ff1615610c4b5760405162461bcd60e51b815260206004820152601f60248201527f6163636f756e7420697320616c72656164792061206368616c6c656e6765720060448201526064015b60405180910390fd5b6001600160a01b0381165f818152609f6020908152604091829020805460ff1916600190811790915591519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc00991015b60405180910390a250565b610cb06141bd565b5f8111610cff5760405162461bcd60e51b815260206004820152601560248201527f636f756e74206d757374206265206e6f6e7a65726f00000000000000000000006044820152606401610c42565b5f80610d0b8585614217565b915091505f610d1e836001015160c01c90565b5f81815260a160205260409020549091508214610d7d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b5f60a181610d8b8785615aeb565b81526020019081526020015f205414610e0b5760405162461bcd60e51b8152602060048201526024808201527f726576657274696e67206d7573742073746172742066726f6d2074686520656e60448201527f64696e67000000000000000000000000000000000000000000000000000000006064820152608401610c42565b609d548111610e825760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c792072657665727420756e46696e616c697a6564206261746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610c42565b609e5460af5468010000000000000000900467ffffffffffffffff16811115610ee55760af80547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff8416021790555b610ef0600183615afe565b609e555b841561104357604051839083907ecae2739091badfd91c373f0a16cede691e0cd25bb80cff77dd5caeb4710146905f90a35f82815260a16020526040812055610f3c82614043565b15610f97575f82815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091610f87908490615aeb565b909155505060a6805460ff191690555b5f82815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a85415801590610ff7575060a85482145b15611001575f60a8555b6001919091015f81815260a160205260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9095019492509082610ef4575b50505050505050565b60a8541561109c5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6110a46142bf565b5f806110b08484614217565b915091505f6110c3836001015160c01c90565b5f81815260a1602052604090205490915082146111225760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b61112b8161195a565b6111775760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610c42565b61118081614043565b156111cd5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610c42565b5f81815260a4602052604090206003015460ff161561122e5760405162461bcd60e51b815260206004820152601660248201527f62617463682073686f756c6420626520726576657274000000000000000000006044820152606401610c42565b61123781611922565b156112845760405162461bcd60e51b815260206004820152601960248201527f626174636820696e206368616c6c656e67652077696e646f77000000000000006044820152606401610c42565b605983015160a05f611297600185615afe565b81526020019081526020015f2054146112f25760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610c42565b5f81815260a060205260409020541561134d5760405162461bcd60e51b815260206004820152601660248201527f626174636820616c7265616479207665726966696564000000000000000000006044820152606401610c42565b80609d54600101146113a15760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610c42565b609d819055600160a35f6113b6866099015190565b815260208101919091526040015f20805460ff191691151591909117905560798301515f82815260a060205260409020556114056113f8846011015160c01c90565b600985015160c01c614312565b611425611413600183615afe565b60af5467ffffffffffffffff166143c9565b6114c45760a25f611437600184615afe565b815260208101919091526040015f908120818155600180820183905560028201839055600390910180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560ab91906114939084615afe565b81526020019081526020015f205f905560ad5f6001836114b39190615afe565b81526020019081526020015f205f90555b60a45f6114d2600184615afe565b815260208082019290925260409081015f90812080547fffffffff000000000000000000000000000000000000000000000000000000001681556001810182905560028101829055600301805461ffff1916905583815260a1909252902054817f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d61155e866079015190565b60998701516040805192835260208301919091520160405180910390a35050505050565b60a854156115d25760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6115da6142bf565b5f4260ac546115ea609e546143da565b546115f59190615aeb565b1090505f4260ac54609b5f9054906101000a90046001600160a01b03166001600160a01b031663b59b1a786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561164d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116719190615b11565b61167b9190615aeb565b109050811580156116895750805b156116f0575f61169f6080890160608a01615b28565b61ffff16116116f05760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b81806116f95750805b6117455760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642074696d696e670000000000000000000000000000000000006044820152606401610c42565b5f61175b61175660208a018a615b49565b614217565b5090505f61176d826001015160c01c90565b611778906001615aeb565b90505f611784826143f4565b90508015611806575f49156118015760405162461bcd60e51b815260206004820152602f60248201527f6d757374206e6f7420636172727920626c6f62207768656e207573696e67207360448201527f746f72656420626c6f62206861736800000000000000000000000000000000006064820152608401610c42565b611821565b61181e61181660208c018c615baa565b60ff16614492565b90505b61182c8a5f836145cc565b5f806118388b8b614217565b915091505f61184b836001015160c01c90565b905080609e541461189e5760405162461bcd60e51b815260206004820152601660248201527f696e636f727265637420626174636820686561646572000000000000000000006044820152606401610c42565b5f81815260a1602052604090205482146118fa5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b42611904826143da565b60010155611913838b8b614abd565b50505050505050505050505050565b60af545f9067ffffffffffffffff1661193b8382614c70565b801561195357504261194d8483614c9c565b60010154115b9392505050565b60af545f9067ffffffffffffffff166119738382614c70565b801561198857505f6119858483614c9c565b54115b8015611953575050505f90815260a16020526040902054151590565b5f6119ae826143f4565b92915050565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611a20573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a449190615bca565b611a905760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b60a85415611ae05760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b611ae86142bf565b5f611af96117566020840184615b49565b5090505f611b0b826001015160c01c90565b611b16906001615aeb565b90505f611b22826143f4565b14611b955760405162461bcd60e51b815260206004820152602860248201527f636f6d6d69744261746368207265717569726573206e6f2073746f726564206260448201527f6c6f6220686173680000000000000000000000000000000000000000000000006064820152608401610c42565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015611bf9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c1d9190615b11565b611c279190615aeb565b1015611c8f575f611c3e6080850160608601615b28565b61ffff1611611c8f5760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b5f611ca06118166020860186615baa565b9050611cae84335b836145cc565b50505050565b611cbc6141bd565b5f81118015611ccd57506099548114155b611d195760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e65772070726f6f662077696e646f7700000000000000006044820152606401610c42565b609980549082905560408051828152602081018490527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a6191015b60405180910390a15050565b60af545f9081908190819067ffffffffffffffff16611d7e8682614c70565b15611dbb575f611d8e8783614c9c565b80546001820154600283015460039093015491985096509094506001600160a01b03169250611dbd915050565b505b9193509193565b5f54600290610100900460ff16158015611de457505f5460ff8083169116105b611e565760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100179055611e745f5460ff1690565b60ff16600214611ec65760405162461bcd60e51b815260206004820152601660248201527f6d757374206861766520696e697469616c697a656421000000000000000000006044820152606401610c42565b81611f395760405162461bcd60e51b815260206004820152602760248201527f63616e206e6f742073657420737461746520726f6f742077697468206279746560448201527f73333228302921000000000000000000000000000000000000000000000000006064820152608401610c42565b609e5460af54611f5490829067ffffffffffffffff166143c9565b158015611f6c57505f81815260ab6020526040902054155b15611f82575f81815260ab602052604090208390555b505f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611d53565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561202c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120509190615bca565b61209c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b60a854156120ec5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6120f46142bf565b5f49156121435760405162461bcd60e51b815260206004820152601f60248201527f636f6d6d69745374617465206d757374206e6f7420636172727920626c6f62006044820152606401610c42565b5f6121546117566020840184615b49565b5090505f612166826001015160c01c90565b612171906001615aeb565b90505f61217d826143f4565b9050806121f25760405162461bcd60e51b815260206004820152602260248201527f6e6f2073746f72656420626c6f62206861736820666f7220746869732062617460448201527f63680000000000000000000000000000000000000000000000000000000000006064820152608401610c42565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015612256573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061227a9190615b11565b6122849190615aeb565b10156122ec575f61229b6080860160608701615b28565b61ffff16116122ec5760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b611cae8433611ca8565b60af545f9061231090839067ffffffffffffffff16614c70565b1561231e576119ae82614ce3565b919050565b61232b6141bd565b6001600160a01b0381165f908152609f602052604090205460ff166123925760405162461bcd60e51b815260206004820152601b60248201527f6163636f756e74206973206e6f742061206368616c6c656e67657200000000006044820152606401610c42565b6001600160a01b0381165f818152609f60209081526040808320805460ff19169055519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc0099101610c9d565b6123e86141bd565b6123f15f614d3b565b565b5f54610100900460ff161580801561241157505f54600160ff909116105b8061242a5750303b15801561242a57505f5460ff166001145b61249c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805460ff1916600117905580156124bd575f805461ff0019166101001790555b6001600160a01b03861615806124da57506001600160a01b038516155b15612511576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0387166125675760405162461bcd60e51b815260206004820152601a60248201527f696e76616c6964207375626d697474657220636f6e74726163740000000000006044820152606401610c42565b61256f614da4565b612577614e28565b609780546001600160a01b03808a167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255609b8054898416908316179055609c8054928816929091169190911790556098849055609983905560a98290556125e56001614eac565b6040516001600160a01b038616905f907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96908290a3604080515f8152602081018690527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a437910160405180910390a1604080515f8152602081018590527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a61910160405180910390a1604080515f8152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b0223910160405180910390a18015611043575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b5f54600590610100900460ff1615801561273257505f5460ff8083169116105b6127a45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff8316176101001790556127df7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b03161461283f5760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610c42565b60af5467ffffffffffffffff16156128995760405162461bcd60e51b815260206004820152601a60248201527f62617463682072696e6720616c726561647920737461727465640000000000006044820152606401610c42565b6097546040517f9f8a13d70000000000000000000000000000000000000000000000000000000081525f60048201526001600160a01b0390911690639f8a13d790602401602060405180830381865afa925050508015612934575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261293191810190615bca565b60015b6129805760405162461bcd60e51b815260206004820152601a60248201527f7375626d6974746572206375746f7665722072657175697265640000000000006044820152606401610c42565b505f609e5460016129919190615aeb565b5f81815260ad6020526040902054909150156129ef5760405162461bcd60e51b815260206004820152601e60248201527f726576657274656420626174636820617761697473207265636f6d6d697400006044820152606401610c42565b610400609d5482612a009190615afe565b10612a4d5760405162461bcd60e51b815260206004820152601c60248201527f746f6f206d616e7920756e66696e616c697a65642062617463686573000000006044820152606401610c42565b612a5681614eac565b505f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b5f54600490610100900460ff16158015612abb57505f5460ff8083169116105b612b2d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100179055612b687fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b031614612bc85760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610c42565b6001600160a01b03831615801590612be957505f836001600160a01b03163b115b612c355760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207375626d69747465720000000000000000000000000000006044820152606401610c42565b81609e5414612c865760405162461bcd60e51b815260206004820152601660248201527f6375746f766572206261746368206d69736d61746368000000000000000000006044820152606401610c42565b60a65460ff1615612cd95760405162461bcd60e51b815260206004820152601560248201527f6368616c6c656e676520696e2070726f677265737300000000000000000000006044820152606401610c42565b60a85415612d295760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b60ae82905560975460405183916001600160a01b03808716929116907faf9f8e4eb71b2fdd1ed3defb8e321359a8984ca774246d3d749837b98873a935905f90a4609780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b612dea6141bd565b6001600160a01b03811615801590612e105750609c546001600160a01b03828116911614155b612e5c5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206e65772076657269666965720000000000000000000000006044820152606401610c42565b609c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96905f90a35050565b612ecd6141bd565b5f81118015612edd575060648111155b8015612eeb575060a9548114155b612f375760405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642070726f6f66207265776172642070657263656e74616765006044820152606401610c42565b60a980549082905560408051828152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b02239101611d53565b60a85415612fc55760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b612fcd6142bf565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613039573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061305d9190615bca565b6130a95760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b5f806130b58686614217565b915091505f6130c8836001015160c01c90565b5f81815260a1602052604090205490915082146131275760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b61313081614043565b61317c5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610c42565b5f81815260a46020526040902060038101805461ff00191661010017905560a6805460ff1916905560995460029091015442916131b891615aeb565b11613233575f81815260a460205260409020600301805460ff1916600117905561322e816131e5816143da565b6003015460408051808201909152600781527f54696d656f75740000000000000000000000000000000000000000000000000060208201526001600160a01b0390911690614f0d565b611043565b61323e838686614abd565b61104381336040518060400160405280600d81526020017f50726f6f6620737563636573730000000000000000000000000000000000000081525061506c565b6132866141bd565b60aa80545f9091556132988282615138565b604080516001600160a01b0384168152602081018390527fb1b2058a6969e2d25e47bcaebe8ae21c29a23b2752429315b75e2f4f285f3d879101611d53565b6132df6141bd565b5f805260a06020527fb84a74ec6ef4d0e83b6006dfaa014ab4026f9f3b97d186e604d29998a4e808ea54156133565760405162461bcd60e51b815260206004820152601660248201527f67656e6573697320626174636820696d706f72746564000000000000000000006044820152606401610c42565b5f806133628484614217565b915091505f613375836001015160c01c90565b905080156133c55760405162461bcd60e51b815260206004820152601360248201527f696e76616c696420626174636820696e646578000000000000000000000000006044820152606401610c42565b5f6133d1846079015190565b9050806134205760405162461bcd60e51b815260206004820152600f60248201527f7a65726f20737461746520726f6f7400000000000000000000000000000000006044820152606401610c42565b600984015160c01c156134755760405162461bcd60e51b815260206004820152601d60248201527f6c31206d65737361676520706f707065642073686f756c6420626520300000006044820152606401610c42565b5f613481856019015190565b036134ce5760405162461bcd60e51b815260206004820152600e60248201527f7a65726f206461746120686173680000000000000000000000000000000000006044820152606401610c42565b7f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440146134fa856039015190565b146135475760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642076657273696f6e65642068617368000000000000000000006044820152606401610c42565b5f82815260a1602052604090208390556135968282613567876039015190565b60405180608001604052804281526020014281526020015f81526020015f6001600160a01b03168152506151e3565b5f82815260a06020526040808220839055609e849055609d84905551849184917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a3604080518281525f6020820152849184917f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d910160405180910390a3505050505050565b5f8061362a8686614217565b915091505f61363d836001015160c01c90565b5f81815260a16020526040902054909150821461369c5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b611043838686614abd565b6136af6141bd565b80156137ad576136bd615362565b60a65460ff16156137725760a7545f90815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091613711908490615aeb565b909155505060a7545f90815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a6805460ff191690555b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b039091168152602001612a90565b6137b56153bc565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613795565b50565b6137e76141bd565b5f811180156137f8575060ac548114155b6138445760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206e657720726f6c6c75702064656c617920706572696f64006044820152606401610c42565b60ac80549082905560408051828152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad19101611d53565b335f908152609f602052604090205460ff166138e05760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206368616c6c656e67657220616c6c6f7765640000000000000000006044820152606401610c42565b60a854156139305760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6139386142bf565b60a65460ff161561398b5760405162461bcd60e51b815260206004820152601460248201527f616c726561647920696e206368616c6c656e67650000000000000000000000006044820152606401610c42565b8167ffffffffffffffff16609d54106139e65760405162461bcd60e51b815260206004820152601760248201527f626174636820616c72656164792066696e616c697a65640000000000000000006044820152606401610c42565b67ffffffffffffffff82165f90815260a160205260409020548114613a4d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b613a608267ffffffffffffffff1661195a565b613aac5760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610c42565b67ffffffffffffffff82165f90815260a460205260409020546801000000000000000090046001600160a01b031615613b275760405162461bcd60e51b815260206004820152601860248201527f626174636820616c7265616479206368616c6c656e67656400000000000000006044820152606401610c42565b613b3a8267ffffffffffffffff16611922565b613bac5760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74206368616c6c656e6765206261746368206f757473696465207460448201527f6865206368616c6c656e67652077696e646f77000000000000000000000000006064820152608401610c42565b60975f9054906101000a90046001600160a01b03166001600160a01b0316630d13fd7b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613bfc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c209190615b11565b341015613c6f5760405162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742076616c756500000000000000000000000000006044820152606401610c42565b67ffffffffffffffff82811660a78190556040805160c0810182528281523360208083018281523484860190815242606086019081525f6080870181815260a0880182815299825260a4909552969096209451855492516001600160a01b031668010000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009093169816979097171783559451600183015591516002820155925160039093018054925115156101000261ff00199415159490941661ffff19909316929092179290921790556001600160a01b03168267ffffffffffffffff167f3a6ea19df25b49e7624e313ce7c1ab23984238e93727260db56a81735b1b997634604051613d8791815260200190565b60405180910390a360af54609d5467ffffffffffffffff909116905f90613daf906001615aeb565b90505b609e548111613e02578367ffffffffffffffff168114613df057609954613dd98284614c9c565b6001015f828254613dea9190615aeb565b90915550505b80613dfa81615be5565b915050613db2565b505060a6805460ff191660011790555050565b5f54600390610100900460ff16158015613e3557505f5460ff8083169116105b613ea75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100178155829003613f095760405162461bcd60e51b815260206004820152601b60248201527f696e76616c696420726f6c6c75702064656c617920706572696f6400000000006044820152606401610c42565b60ac829055604080515f8152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad1910160405180910390a15f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611d53565b335f90815260a5602052604081205490819003613fe35760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642062617463684368616c6c656e6765526577617264000000006044820152606401610c42565b335f90815260a56020526040812055613ffc8282615138565b816001600160a01b03167f9c25fa83f414ed363c8d39c98fb3e17567b3431cede71eb062c49d2a63ce247a8260405161403791815260200190565b60405180910390a25050565b5f81815260a460205260408120546801000000000000000090046001600160a01b0316158015906119ae5750505f90815260a46020526040902060030154610100900460ff161590565b6140956141bd565b5f811180156140a657506098548114155b6140f25760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964206e65772066696e616c697a6520706572696f6400000000006044820152606401610c42565b609880549082905560408051828152602081018490527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a4379101611d53565b6141386141bd565b6001600160a01b0381166141b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c42565b6137dc81614d3b565b6033546001600160a01b031633146123f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c42565b5f805f61422485856153f5565b90505f8160ff165f036142455761423b8686615465565b90945090506142b1565b8160ff166001148061425a57508160ff166002145b156142695761423b86866154ce565b60405162461bcd60e51b815260206004820152601960248201527f556e737570706f727465642062617463682076657273696f6e000000000000006044820152606401610c42565b808420925050509250929050565b60655460ff16156123f15760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c42565b805f0361431d575050565b8082035f5b82811015611cae5761010081840381111561433c57508083035b609b546040517f3c7f528300000000000000000000000000000000000000000000000000000000815260048101859052602481018390526001600160a01b0390911690633c7f5283906044015f604051808303815f87803b15801561439f575f80fd5b505af11580156143b1573d5f803e3d5ffd5b50505050610100830192505061010081019050614322565b5f8115801590611953575050111590565b60af545f906119ae90839067ffffffffffffffff16614c9c565b60af545f9061440e90839067ffffffffffffffff166143c9565b61442457505f90815260ad602052604090205490565b609e5460af5468010000000000000000900467ffffffffffffffff168181111561444c578091505b8184118061445b5750609d5484105b1561446957505f9392505050565b60b05f61447861040087615c49565b81526020019081526020015f206005015492505050919050565b5f81600203614521575f6040515f5b8049806144ae57506144bd565b602082028301526001016144a1565b60208102808320920160405290925090508061451b5760405162461bcd60e51b815260206004820152601b60248201527f5632207265717569726573206174206c65617374203120626c6f6200000000006044820152606401610c42565b50919050565b600149156145975760405162461bcd60e51b815260206004820152602560248201527f6c6567616379206261746368657320737570706f72742065786163746c79203160448201527f20626c6f620000000000000000000000000000000000000000000000000000006064820152608401610c42565b5f49156145a5575f496119ae565b507f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014919050565b60026145db6020850185615baa565b60ff16111561462c5760405162461bcd60e51b815260206004820152600f60248201527f696e76616c69642076657273696f6e00000000000000000000000000000000006044820152606401610c42565b608083013561467d5760405162461bcd60e51b815260206004820152601b60248201527f70726576696f757320737461746520726f6f74206973207a65726f00000000006044820152606401610c42565b60a08301356146ce5760405162461bcd60e51b815260206004820152601660248201527f6e657720737461746520726f6f74206973207a65726f000000000000000000006044820152606401610c42565b5f806146e06117566020870187615b49565b915091505f6146f3836001015160c01c90565b90505f60a181614704846001615aeb565b81526020019081526020015f20541461475f5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c726561647920636f6d6d69747465640000000000000000006044820152606401610c42565b609e5481146147b05760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610c42565b5f81815260a16020526040902054821461480c5760405162461bcd60e51b815260206004820152601b60248201527f696e636f727265637420706172656e74206261746368206861736800000000006044820152606401610c42565b856080013561481a82614ce3565b146148675760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610c42565b5f614876846011015160c01c90565b90505f6148a261488c60608a0160408b01615c5c565b61489c60808b0160608c01615b28565b84615521565b90506148b46080890160608a01615b28565b60019384019361ffff91909116929092019160f9906148d660208b018b615baa565b60ff16106148e357506101015b6040805182810190915295506149088661490060208c018c615baa565b60ff16615565565b60c084901b60018701526149368661492660808c0160608d01615b28565b61ffff1660c01b60099190910152565b60c083811b6011880152601987018390526039870188905260808a0135605988015260a08a0135607988015289013560998701525f60b987015260d98601859052600161498660208b018b615baa565b60ff16106149b8576149b8866149a260608c0160408d01615c5c565b67ffffffffffffffff1660c01b60f99190910152565b8086205f85815260a1602052604081209190915560a65460ff1615614a065760a7545f90815260a4602052604090206002015460995442916149f991615aeb565b614a039190615afe565b90505b614a73858b60a001358a60405180608001604052804281526020018660985442614a309190615aeb565b614a3a9190615aeb565b81526020018f6040016020810190614a529190615c5c565b67ffffffffffffffff1681526020018e6001600160a01b03168152506151e3565b5050609e8390555f83815260a16020526040808220549051909185917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a35050505050505050565b80614b0a5760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642062617463682070726f6f66000000000000000000000000006044820152606401610c42565b5f614b19846001015160c01c90565b90505f614b27856039015190565b90505f7f0000000000000000000000000000000000000000000000000000000000000000614b56876059015190565b6079880151609989015160b98a015160198b015160405160c09690961b7fffffffffffffffff000000000000000000000000000000000000000000000000166020870152602886019490945260488501929092526068840152608883015260a882015260c8810183905260e801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120609c549091506001600160a01b0316632c09a848614c18885160f81c90565b858888866040518663ffffffff1660e01b8152600401614c3c959493929190615c75565b5f6040518083038186803b158015614c52575f80fd5b505afa158015614c64573d5f803e3d5ffd5b50505050505050505050565b5f614c7b83836143c9565b15806119535750609d548310158015611953575050609e5490911115919050565b5f614ca783836143c9565b15614cd15760b05f614cbb61040086615c49565b81526020019081526020015f205f0190506119ae565b50505f90815260a26020526040902090565b60af545f90614cfd90839067ffffffffffffffff166143c9565b15614d295760b05f614d1161040085615c49565b81526020019081526020015f20600401549050919050565b505f90815260ab602052604090205490565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16614e205760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f161556c565b5f54610100900460ff16614ea45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f16155f4565b60af80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff831617905560405181907f20ec3848832ec028b438cae2b58b0b2cc77688de8f84b51c251c6fc75997a890905f90a250565b60a88390555f83815260a460205260408082205460975491517fc96be4cb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526801000000000000000090920482169392919091169063c96be4cb906024016020604051808303815f875af1158015614f94573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614fb89190615b11565b5f86815260a46020526040902060010154909150614fd7908290615aeb565b5f86815260a460209081526040808320546801000000000000000090046001600160a01b0316835260a590915281208054909190615016908490615aeb565b9091555050604051615029908490615cd8565b604051908190038120906001600160a01b0384169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b5f83815260a4602052604081206001015460a9549091906064906150909084615d04565b61509a9190615d1b565b90506150a68183615afe565b60aa5f8282546150b69190615aeb565b90915550506001600160a01b0384165f90815260a56020526040812080548392906150e2908490615aeb565b90915550506040516150f5908490615cd8565b604051908190038120906001600160a01b0386169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b80156151df575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114615187576040519150601f19603f3d011682016040523d82523d5f602084013e61518c565b606091505b50509050806151dd5760405162461bcd60e51b815260206004820152601b60248201527f526f6c6c75703a20455448207472616e73666572206661696c656400000000006044820152606401610c42565b505b5050565b60af546151fb90859067ffffffffffffffff166143c9565b156152e657610400609d54856152119190615afe565b1061525e5760405162461bcd60e51b815260206004820152600f60248201527f62617463682072696e672066756c6c00000000000000000000000000000000006044820152606401610c42565b5f60b08161526e61040088615c49565b815260208082019290925260409081015f2084518155918401516001830155830151600282015560608301516003820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039092169190911790556004810185905560050183905550611cae565b5f93845260a26020908152604080862083518155838301516001820155838201516002820155606090930151600390930180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039094169390931790925560ab81528185209390935560ad909252912055565b61536a6142bf565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861539f3390565b6040516001600160a01b03909116815260200160405180910390a1565b6153c4615679565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361539f565b5f816154435760405162461bcd60e51b815260206004820152601260248201527f456d7074792062617463682068656164657200000000000000000000000000006044820152606401610c42565b82825f81811061545557615455615d2e565b919091013560f81c949350505050565b5f8160f98110156154b85760405162461bcd60e51b815260206004820152601d60248201527f626174636820686561646572206c656e67746820746f6f20736d616c6c0000006044820152606401610c42565b6040519150808483378082016040529250929050565b5f8161010181146154b85760405162461bcd60e51b815260206004820181905260248201527f626174636820686561646572206c656e67746820697320696e636f72726563746044820152606401610c42565b6040805160c085901b815260f084901b6008820152600a60208502820181019092525f9181016155568161ffff8716866156cb565b82900390912095945050505050565b8082535050565b5f54610100900460ff166155e85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6065805460ff19169055565b5f54610100900460ff166156705760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f133614d3b565b60655460ff166123f15760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c42565b5f825f036156da575082611953565b609b546001600160a01b03165f5b84811015615787576040517fae453cd5000000000000000000000000000000000000000000000000000000008152600481018590525f906001600160a01b0384169063ae453cd590602401602060405180830381865afa15801561574e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906157729190615b11565b875250602090950194600193840193016156e8565b5093949350505050565b5f602082840312156157a1575f80fd5b5035919050565b80356001600160a01b038116811461231e575f80fd5b5f602082840312156157ce575f80fd5b611953826157a8565b5f8083601f8401126157e7575f80fd5b50813567ffffffffffffffff8111156157fe575f80fd5b602083019150836020828501011115615815575f80fd5b9250929050565b5f805f6040848603121561582e575f80fd5b833567ffffffffffffffff811115615844575f80fd5b615850868287016157d7565b909790965060209590950135949350505050565b5f8060208385031215615875575f80fd5b823567ffffffffffffffff81111561588b575f80fd5b615897858286016157d7565b90969095509350505050565b5f60e0828403121561451b575f80fd5b5f805f805f606086880312156158c7575f80fd5b853567ffffffffffffffff808211156158de575f80fd5b6158ea89838a016158a3565b965060208801359150808211156158ff575f80fd5b61590b89838a016157d7565b90965094506040880135915080821115615923575f80fd5b50615930888289016157d7565b969995985093965092949392505050565b5f60208284031215615951575f80fd5b813567ffffffffffffffff811115615967575f80fd5b615973848285016158a3565b949350505050565b5f805f805f8060c08789031215615990575f80fd5b615999876157a8565b95506159a7602088016157a8565b94506159b5604088016157a8565b9350606087013592506080870135915060a087013590509295509295509295565b5f80604083850312156159e7575f80fd5b6159f0836157a8565b946020939093013593505050565b5f805f8060408587031215615a11575f80fd5b843567ffffffffffffffff80821115615a28575f80fd5b615a34888389016157d7565b90965094506020870135915080821115615a4c575f80fd5b50615a59878288016157d7565b95989497509550505050565b80151581146137dc575f80fd5b5f60208284031215615a82575f80fd5b813561195381615a65565b803567ffffffffffffffff8116811461231e575f80fd5b5f8060408385031215615ab5575f80fd5b6159f083615a8d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156119ae576119ae615abe565b818103818111156119ae576119ae615abe565b5f60208284031215615b21575f80fd5b5051919050565b5f60208284031215615b38575f80fd5b813561ffff81168114611953575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615b7c575f80fd5b83018035915067ffffffffffffffff821115615b96575f80fd5b602001915036819003821315615815575f80fd5b5f60208284031215615bba575f80fd5b813560ff81168114611953575f80fd5b5f60208284031215615bda575f80fd5b815161195381615a65565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615c1557615c15615abe565b5060010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82615c5757615c57615c1c565b500690565b5f60208284031215615c6c575f80fd5b61195382615a8d565b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190508260608301529695505050505050565b5f82515f5b81811015615cf75760208186018101518583015201615cdd565b505f920191825250919050565b80820281158282048414176119ae576119ae615abe565b5f82615d2957615d29615c1c565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c6343000818000a", } // RollupABI is the input ABI used to generate the binding from. @@ -213,6 +213,37 @@ func (_Rollup *RollupTransactorRaw) Transact(opts *bind.TransactOpts, method str return _Rollup.Contract.contract.Transact(opts, method, params...) } +// BATCHRINGSIZE is a free data retrieval call binding the contract method 0x8da53b43. +// +// Solidity: function BATCH_RING_SIZE() view returns(uint256) +func (_Rollup *RollupCaller) BATCHRINGSIZE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Rollup.contract.Call(opts, &out, "BATCH_RING_SIZE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BATCHRINGSIZE is a free data retrieval call binding the contract method 0x8da53b43. +// +// Solidity: function BATCH_RING_SIZE() view returns(uint256) +func (_Rollup *RollupSession) BATCHRINGSIZE() (*big.Int, error) { + return _Rollup.Contract.BATCHRINGSIZE(&_Rollup.CallOpts) +} + +// BATCHRINGSIZE is a free data retrieval call binding the contract method 0x8da53b43. +// +// Solidity: function BATCH_RING_SIZE() view returns(uint256) +func (_Rollup *RollupCallerSession) BATCHRINGSIZE() (*big.Int, error) { + return _Rollup.Contract.BATCHRINGSIZE(&_Rollup.CallOpts) +} + // LAYER2CHAINID is a free data retrieval call binding the contract method 0x5f77cf1d. // // Solidity: function LAYER_2_CHAIN_ID() view returns(uint64) @@ -547,6 +578,37 @@ func (_Rollup *RollupCallerSession) BatchInsideChallengeWindow(batchIndex *big.I return _Rollup.Contract.BatchInsideChallengeWindow(&_Rollup.CallOpts, batchIndex) } +// BatchRingStartIndex is a free data retrieval call binding the contract method 0xcd0cb802. +// +// Solidity: function batchRingStartIndex() view returns(uint64) +func (_Rollup *RollupCaller) BatchRingStartIndex(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Rollup.contract.Call(opts, &out, "batchRingStartIndex") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// BatchRingStartIndex is a free data retrieval call binding the contract method 0xcd0cb802. +// +// Solidity: function batchRingStartIndex() view returns(uint64) +func (_Rollup *RollupSession) BatchRingStartIndex() (uint64, error) { + return _Rollup.Contract.BatchRingStartIndex(&_Rollup.CallOpts) +} + +// BatchRingStartIndex is a free data retrieval call binding the contract method 0xcd0cb802. +// +// Solidity: function batchRingStartIndex() view returns(uint64) +func (_Rollup *RollupCallerSession) BatchRingStartIndex() (uint64, error) { + return _Rollup.Contract.BatchRingStartIndex(&_Rollup.CallOpts) +} + // Challenges is a free data retrieval call binding the contract method 0x8f1d3776. // // Solidity: function challenges(uint256 batchIndex) view returns(uint64 batchIndex, address challenger, uint256 challengeDeposit, uint256 startTime, bool challengeSuccess, bool finished) @@ -736,6 +798,37 @@ func (_Rollup *RollupCallerSession) FinalizedStateRoots(batchIndex *big.Int) ([3 return _Rollup.Contract.FinalizedStateRoots(&_Rollup.CallOpts, batchIndex) } +// HighestRevertedBatchIndex is a free data retrieval call binding the contract method 0x64c71673. +// +// Solidity: function highestRevertedBatchIndex() view returns(uint64) +func (_Rollup *RollupCaller) HighestRevertedBatchIndex(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Rollup.contract.Call(opts, &out, "highestRevertedBatchIndex") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// HighestRevertedBatchIndex is a free data retrieval call binding the contract method 0x64c71673. +// +// Solidity: function highestRevertedBatchIndex() view returns(uint64) +func (_Rollup *RollupSession) HighestRevertedBatchIndex() (uint64, error) { + return _Rollup.Contract.HighestRevertedBatchIndex(&_Rollup.CallOpts) +} + +// HighestRevertedBatchIndex is a free data retrieval call binding the contract method 0x64c71673. +// +// Solidity: function highestRevertedBatchIndex() view returns(uint64) +func (_Rollup *RollupCallerSession) HighestRevertedBatchIndex() (uint64, error) { + return _Rollup.Contract.HighestRevertedBatchIndex(&_Rollup.CallOpts) +} + // InChallenge is a free data retrieval call binding the contract method 0x88b1ea09. // // Solidity: function inChallenge() view returns(bool) @@ -1565,6 +1658,27 @@ func (_Rollup *RollupTransactorSession) Initialize4(_newSubmitter common.Address return _Rollup.Contract.Initialize4(&_Rollup.TransactOpts, _newSubmitter, _expectedLegacyCutoverBatchIndex) } +// Initialize5 is a paid mutator transaction binding the contract method 0x7ae64261. +// +// Solidity: function initialize5() returns() +func (_Rollup *RollupTransactor) Initialize5(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Rollup.contract.Transact(opts, "initialize5") +} + +// Initialize5 is a paid mutator transaction binding the contract method 0x7ae64261. +// +// Solidity: function initialize5() returns() +func (_Rollup *RollupSession) Initialize5() (*types.Transaction, error) { + return _Rollup.Contract.Initialize5(&_Rollup.TransactOpts) +} + +// Initialize5 is a paid mutator transaction binding the contract method 0x7ae64261. +// +// Solidity: function initialize5() returns() +func (_Rollup *RollupTransactorSession) Initialize5() (*types.Transaction, error) { + return _Rollup.Contract.Initialize5(&_Rollup.TransactOpts) +} + // ProveState is a paid mutator transaction binding the contract method 0xb3484425. // // Solidity: function proveState(bytes _batchHeader, bytes _batchProof) returns() @@ -1817,6 +1931,150 @@ func (_Rollup *RollupTransactorSession) Receive() (*types.Transaction, error) { return _Rollup.Contract.Receive(&_Rollup.TransactOpts) } +// RollupBatchRingStartedIterator is returned from FilterBatchRingStarted and is used to iterate over the raw logs and unpacked data for BatchRingStarted events raised by the Rollup contract. +type RollupBatchRingStartedIterator struct { + Event *RollupBatchRingStarted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *RollupBatchRingStartedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(RollupBatchRingStarted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(RollupBatchRingStarted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *RollupBatchRingStartedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *RollupBatchRingStartedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// RollupBatchRingStarted represents a BatchRingStarted event raised by the Rollup contract. +type RollupBatchRingStarted struct { + StartBatchIndex *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBatchRingStarted is a free log retrieval operation binding the contract event 0x20ec3848832ec028b438cae2b58b0b2cc77688de8f84b51c251c6fc75997a890. +// +// Solidity: event BatchRingStarted(uint256 indexed startBatchIndex) +func (_Rollup *RollupFilterer) FilterBatchRingStarted(opts *bind.FilterOpts, startBatchIndex []*big.Int) (*RollupBatchRingStartedIterator, error) { + + var startBatchIndexRule []interface{} + for _, startBatchIndexItem := range startBatchIndex { + startBatchIndexRule = append(startBatchIndexRule, startBatchIndexItem) + } + + logs, sub, err := _Rollup.contract.FilterLogs(opts, "BatchRingStarted", startBatchIndexRule) + if err != nil { + return nil, err + } + return &RollupBatchRingStartedIterator{contract: _Rollup.contract, event: "BatchRingStarted", logs: logs, sub: sub}, nil +} + +// WatchBatchRingStarted is a free log subscription operation binding the contract event 0x20ec3848832ec028b438cae2b58b0b2cc77688de8f84b51c251c6fc75997a890. +// +// Solidity: event BatchRingStarted(uint256 indexed startBatchIndex) +func (_Rollup *RollupFilterer) WatchBatchRingStarted(opts *bind.WatchOpts, sink chan<- *RollupBatchRingStarted, startBatchIndex []*big.Int) (event.Subscription, error) { + + var startBatchIndexRule []interface{} + for _, startBatchIndexItem := range startBatchIndex { + startBatchIndexRule = append(startBatchIndexRule, startBatchIndexItem) + } + + logs, sub, err := _Rollup.contract.WatchLogs(opts, "BatchRingStarted", startBatchIndexRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(RollupBatchRingStarted) + if err := _Rollup.contract.UnpackLog(event, "BatchRingStarted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBatchRingStarted is a log parse operation binding the contract event 0x20ec3848832ec028b438cae2b58b0b2cc77688de8f84b51c251c6fc75997a890. +// +// Solidity: event BatchRingStarted(uint256 indexed startBatchIndex) +func (_Rollup *RollupFilterer) ParseBatchRingStarted(log types.Log) (*RollupBatchRingStarted, error) { + event := new(RollupBatchRingStarted) + if err := _Rollup.contract.UnpackLog(event, "BatchRingStarted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // RollupChallengeResIterator is returned from FilterChallengeRes and is used to iterate over the raw logs and unpacked data for ChallengeRes events raised by the Rollup contract. type RollupChallengeResIterator struct { Event *RollupChallengeRes // Event containing the contract specifics and raw log diff --git a/bindings/bindings/rollup_more.go b/bindings/bindings/rollup_more.go index 22ca0dd02..538205f93 100644 --- a/bindings/bindings/rollup_more.go +++ b/bindings/bindings/rollup_more.go @@ -9,11 +9,11 @@ import ( "morph-l2/bindings/solc" ) -const RollupStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1032_storage\"},{\"astId\":1003,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1031_storage\"},{\"astId\":1005,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":1006,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)1031_storage\"},{\"astId\":1007,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"submitterContract\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_address\"},{\"astId\":1008,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"finalizationPeriodSeconds\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_uint256\"},{\"astId\":1009,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"proofWindow\",\"offset\":0,\"slot\":\"153\",\"type\":\"t_uint256\"},{\"astId\":1010,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__maxNumTxInChunk\",\"offset\":0,\"slot\":\"154\",\"type\":\"t_uint256\"},{\"astId\":1011,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"messageQueue\",\"offset\":0,\"slot\":\"155\",\"type\":\"t_address\"},{\"astId\":1012,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"verifier\",\"offset\":0,\"slot\":\"156\",\"type\":\"t_address\"},{\"astId\":1013,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"lastFinalizedBatchIndex\",\"offset\":0,\"slot\":\"157\",\"type\":\"t_uint256\"},{\"astId\":1014,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"lastCommittedBatchIndex\",\"offset\":0,\"slot\":\"158\",\"type\":\"t_uint256\"},{\"astId\":1015,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"isChallenger\",\"offset\":0,\"slot\":\"159\",\"type\":\"t_mapping(t_address,t_bool)\"},{\"astId\":1016,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"finalizedStateRoots\",\"offset\":0,\"slot\":\"160\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1017,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"committedBatches\",\"offset\":0,\"slot\":\"161\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1018,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"batchDataStore\",\"offset\":0,\"slot\":\"162\",\"type\":\"t_mapping(t_uint256,t_struct(BatchData)1034_storage)\"},{\"astId\":1019,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"withdrawalRoots\",\"offset\":0,\"slot\":\"163\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1020,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"challenges\",\"offset\":0,\"slot\":\"164\",\"type\":\"t_mapping(t_uint256,t_struct(BatchChallenge)1033_storage)\"},{\"astId\":1021,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"batchChallengeReward\",\"offset\":0,\"slot\":\"165\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1022,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"inChallenge\",\"offset\":0,\"slot\":\"166\",\"type\":\"t_bool\"},{\"astId\":1023,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"batchChallenged\",\"offset\":0,\"slot\":\"167\",\"type\":\"t_uint256\"},{\"astId\":1024,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"revertReqIndex\",\"offset\":0,\"slot\":\"168\",\"type\":\"t_uint256\"},{\"astId\":1025,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"proofRewardPercent\",\"offset\":0,\"slot\":\"169\",\"type\":\"t_uint256\"},{\"astId\":1026,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"proveRemaining\",\"offset\":0,\"slot\":\"170\",\"type\":\"t_uint256\"},{\"astId\":1027,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"committedStateRoots\",\"offset\":0,\"slot\":\"171\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1028,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"rollupDelayPeriod\",\"offset\":0,\"slot\":\"172\",\"type\":\"t_uint256\"},{\"astId\":1029,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"batchBlobVersionedHashes\",\"offset\":0,\"slot\":\"173\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1030,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"legacyCutoverBatchIndex\",\"offset\":0,\"slot\":\"174\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)1031_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1032_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_mapping(t_uint256,t_bytes32)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e bytes32)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_bytes32\"},\"t_mapping(t_uint256,t_struct(BatchChallenge)1033_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IRollup.BatchChallenge)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(BatchChallenge)1033_storage\"},\"t_mapping(t_uint256,t_struct(BatchData)1034_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IRollup.BatchData)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(BatchData)1034_storage\"},\"t_struct(BatchChallenge)1033_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IRollup.BatchChallenge\",\"numberOfBytes\":\"128\"},\"t_struct(BatchData)1034_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IRollup.BatchData\",\"numberOfBytes\":\"128\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" +const RollupStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1035_storage\"},{\"astId\":1003,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1034_storage\"},{\"astId\":1005,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_paused\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_bool\"},{\"astId\":1006,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)1034_storage\"},{\"astId\":1007,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"submitterContract\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_address\"},{\"astId\":1008,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"finalizationPeriodSeconds\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_uint256\"},{\"astId\":1009,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"proofWindow\",\"offset\":0,\"slot\":\"153\",\"type\":\"t_uint256\"},{\"astId\":1010,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"__maxNumTxInChunk\",\"offset\":0,\"slot\":\"154\",\"type\":\"t_uint256\"},{\"astId\":1011,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"messageQueue\",\"offset\":0,\"slot\":\"155\",\"type\":\"t_address\"},{\"astId\":1012,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"verifier\",\"offset\":0,\"slot\":\"156\",\"type\":\"t_address\"},{\"astId\":1013,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"lastFinalizedBatchIndex\",\"offset\":0,\"slot\":\"157\",\"type\":\"t_uint256\"},{\"astId\":1014,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"lastCommittedBatchIndex\",\"offset\":0,\"slot\":\"158\",\"type\":\"t_uint256\"},{\"astId\":1015,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"isChallenger\",\"offset\":0,\"slot\":\"159\",\"type\":\"t_mapping(t_address,t_bool)\"},{\"astId\":1016,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"finalizedStateRoots\",\"offset\":0,\"slot\":\"160\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1017,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"committedBatches\",\"offset\":0,\"slot\":\"161\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1018,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_legacyBatchDataStore\",\"offset\":0,\"slot\":\"162\",\"type\":\"t_mapping(t_uint256,t_struct(BatchData)1037_storage)\"},{\"astId\":1019,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"withdrawalRoots\",\"offset\":0,\"slot\":\"163\",\"type\":\"t_mapping(t_bytes32,t_bool)\"},{\"astId\":1020,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"challenges\",\"offset\":0,\"slot\":\"164\",\"type\":\"t_mapping(t_uint256,t_struct(BatchChallenge)1036_storage)\"},{\"astId\":1021,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"batchChallengeReward\",\"offset\":0,\"slot\":\"165\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1022,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"inChallenge\",\"offset\":0,\"slot\":\"166\",\"type\":\"t_bool\"},{\"astId\":1023,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"batchChallenged\",\"offset\":0,\"slot\":\"167\",\"type\":\"t_uint256\"},{\"astId\":1024,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"revertReqIndex\",\"offset\":0,\"slot\":\"168\",\"type\":\"t_uint256\"},{\"astId\":1025,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"proofRewardPercent\",\"offset\":0,\"slot\":\"169\",\"type\":\"t_uint256\"},{\"astId\":1026,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"proveRemaining\",\"offset\":0,\"slot\":\"170\",\"type\":\"t_uint256\"},{\"astId\":1027,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_legacyCommittedStateRoots\",\"offset\":0,\"slot\":\"171\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1028,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"rollupDelayPeriod\",\"offset\":0,\"slot\":\"172\",\"type\":\"t_uint256\"},{\"astId\":1029,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_legacyBatchBlobVersionedHashes\",\"offset\":0,\"slot\":\"173\",\"type\":\"t_mapping(t_uint256,t_bytes32)\"},{\"astId\":1030,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"legacyCutoverBatchIndex\",\"offset\":0,\"slot\":\"174\",\"type\":\"t_uint256\"},{\"astId\":1031,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"batchRingStartIndex\",\"offset\":0,\"slot\":\"175\",\"type\":\"t_uint64\"},{\"astId\":1032,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"highestRevertedBatchIndex\",\"offset\":8,\"slot\":\"175\",\"type\":\"t_uint64\"},{\"astId\":1033,\"contract\":\"contracts/l1/rollup/Rollup.sol:Rollup\",\"label\":\"_batchRing\",\"offset\":0,\"slot\":\"176\",\"type\":\"t_mapping(t_uint256,t_struct(BatchRingEntry)1038_storage)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_uint256)1034_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1035_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"t_mapping(t_bytes32,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_bool\"},\"t_mapping(t_uint256,t_bytes32)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e bytes32)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_bytes32\"},\"t_mapping(t_uint256,t_struct(BatchChallenge)1036_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IRollup.BatchChallenge)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(BatchChallenge)1036_storage\"},\"t_mapping(t_uint256,t_struct(BatchData)1037_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IRollup.BatchData)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(BatchData)1037_storage\"},\"t_mapping(t_uint256,t_struct(BatchRingEntry)1038_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct Rollup.BatchRingEntry)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(BatchRingEntry)1038_storage\"},\"t_struct(BatchChallenge)1036_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IRollup.BatchChallenge\",\"numberOfBytes\":\"128\"},\"t_struct(BatchData)1037_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IRollup.BatchData\",\"numberOfBytes\":\"128\"},\"t_struct(BatchRingEntry)1038_storage\":{\"encoding\":\"inplace\",\"label\":\"struct Rollup.BatchRingEntry\",\"numberOfBytes\":\"192\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" var RollupStorageLayout = new(solc.StorageLayout) -var RollupDeployedBin = "0x608060405260043610610369575f3560e01c8063728cdbca116101c8578063b35dac4e116100fd578063cf9a67451161009d578063dff7827e1161006d578063dff7827e14610b20578063e3fff1dd14610b35578063f2fde38b14610b54578063fb1e8b0414610b73575f80fd5b8063cf9a674514610aae578063d279c19114610acd578063d8dc99d214610aec578063de8b303514610b01575f80fd5b8063bedb86fb116100d8578063bedb86fb14610a48578063c555389214610a67578063cd4edc6914610a86578063ce5db8d614610a99575f80fd5b8063b35dac4e146109eb578063b3e0a50914610a0a578063b8d0a1b014610a29575f80fd5b8063a3c9e94c11610168578063a4f209b011610143578063a4f209b01461096d578063abc8d68d1461098c578063b31a77d3146109b7578063b3484425146109cc575f80fd5b8063a3c9e94c1461090b578063a415d8dc1461092a578063a479265d14610958575f80fd5b80638da5cb5b116101a35780638da5cb5b146107ee5780638f1d37761461080b578063910129d4146108bb57806397fc007c146108ec575f80fd5b8063728cdbca14610797578063843bc9a1146107b657806388b1ea09146107d5575f80fd5b80632a213ba11161029e5780635ef7a94a1161023e57806367caa37a1161021957806367caa37a1461071a57806368589dfa146107395780636c578c1d14610764578063715018a614610783575f80fd5b80635ef7a94a1461063d5780635f77cf1d146106af57806361267290146106fb575f80fd5b80633e001b66116102795780633e001b66146105df57806341f756da146105f457806357e0af6c146106075780635c975abb14610626575f80fd5b80632a213ba11461055e5780632b7ac3f3146105895780633b70c18a146105c0575f80fd5b80631544ba3a1161030957806318af3b2b116102e457806318af3b2b146104b957806321e2f9e0146104e95780632362f03e146105085780632571098d14610533575f80fd5b80631544ba3a14610470578063163d9bee1461048f57806318463fb0146104a4575f80fd5b806310d445831161034457806310d44583146103fb578063116a1f421461041a578063121dcd501461043c5780631336110114610451575f80fd5b806304d7721514610374578063059def61146103b75780630ceb6780146103da575f80fd5b3661037057005b5f80fd5b34801561037f575f80fd5b506103a261038e366004614f8a565b60a36020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156103c2575f80fd5b506103cc609d5481565b6040519081526020016103ae565b3480156103e5575f80fd5b506103f96103f4366004614fb7565b610b88565b005b348015610406575f80fd5b506103f9610415366004615015565b610c5a565b348015610425575f80fd5b506103a2610434366004614f8a565b609d54101590565b348015610447575f80fd5b506103cc609e5481565b34801561045c575f80fd5b506103f961046b36600461505d565b610f96565b34801561047b575f80fd5b506103f961048a3660046150ac565b6114b3565b34801561049a575f80fd5b506103cc60ae5481565b3480156104af575f80fd5b506103cc60a75481565b3480156104c4575f80fd5b506103a26104d3366004614f8a565b5f90815260a26020526040902060010154421090565b3480156104f4575f80fd5b506103a2610503366004614f8a565b611872565b348015610513575f80fd5b506103cc610522366004614f8a565b60a16020525f908152604090205481565b34801561053e575f80fd5b506103cc61054d366004614f8a565b60a06020525f908152604090205481565b348015610569575f80fd5b506103cc610578366004614f8a565b60ad6020525f908152604090205481565b348015610594575f80fd5b50609c546105a8906001600160a01b031681565b6040516001600160a01b0390911681526020016103ae565b3480156105cb575f80fd5b50609b546105a8906001600160a01b031681565b3480156105ea575f80fd5b506103cc60aa5481565b6103f961060236600461513a565b6118a0565b348015610612575f80fd5b506103f9610621366004614f8a565b611ba4565b348015610631575f80fd5b5060655460ff166103a2565b348015610648575f80fd5b50610686610657366004614f8a565b60a26020525f90815260409020805460018201546002830154600390930154919290916001600160a01b031684565b604080519485526020850193909352918301526001600160a01b031660608201526080016103ae565b3480156106ba575f80fd5b506106e27f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff90911681526020016103ae565b348015610706575f80fd5b506103f9610715366004614f8a565b611c4f565b348015610725575f80fd5b506103f961073436600461513a565b611e2a565b348015610744575f80fd5b506103cc610753366004614f8a565b60ab6020525f908152604090205481565b34801561076f575f80fd5b506103f961077e366004614fb7565b612175565b34801561078e575f80fd5b506103f9612232565b3480156107a2575f80fd5b506103f96107b1366004615174565b612245565b3480156107c1575f80fd5b506103f96107d03660046151cf565b61254e565b3480156107e0575f80fd5b5060a6546103a29060ff1681565b3480156107f9575f80fd5b506033546001600160a01b03166105a8565b348015610816575f80fd5b50610877610825366004614f8a565b60a46020525f9081526040902080546001820154600283015460039093015467ffffffffffffffff831693680100000000000000009093046001600160a01b0316929060ff8082169161010090041686565b6040805167ffffffffffffffff90971687526001600160a01b03909516602087015293850192909252606084015215156080830152151560a082015260c0016103ae565b3480156108c6575f80fd5b506103a26108d5366004614f8a565b5f90815260a4602052604090206003015460ff1690565b3480156108f7575f80fd5b506103f9610906366004614fb7565b612895565b348015610916575f80fd5b506097546105a8906001600160a01b031681565b348015610935575f80fd5b506103a2610944366004614fb7565b609f6020525f908152604090205460ff1681565b348015610963575f80fd5b506103cc60995481565b348015610978575f80fd5b506103f9610987366004614f8a565b612978565b348015610997575f80fd5b506103cc6109a6366004614fb7565b60a56020525f908152604090205481565b3480156109c2575f80fd5b506103cc60a85481565b3480156109d7575f80fd5b506103f96109e63660046151f7565b612a28565b3480156109f6575f80fd5b506103f9610a05366004614fb7565b612d35565b348015610a15575f80fd5b506103f9610a2436600461505d565b612d8e565b348015610a34575f80fd5b506103f9610a433660046151f7565b61311f565b348015610a53575f80fd5b506103f9610a6236600461526b565b6131a8565b348015610a72575f80fd5b506103f9610a81366004614f8a565b6132e6565b6103f9610a9436600461529d565b613389565b348015610aa4575f80fd5b506103cc60985481565b348015610ab9575f80fd5b506103f9610ac8366004614f8a565b61391b565b348015610ad8575f80fd5b506103f9610ae7366004614fb7565b613a8a565b348015610af7575f80fd5b506103cc60ac5481565b348015610b0c575f80fd5b506103a2610b1b366004614f8a565b613b49565b348015610b2b575f80fd5b506103cc609a5481565b348015610b40575f80fd5b506103f9610b4f366004614f8a565b613b93565b348015610b5f575f80fd5b506103f9610b6e366004614fb7565b613c36565b348015610b7e575f80fd5b506103cc60a95481565b610b90613cc3565b6001600160a01b0381165f908152609f602052604090205460ff1615610bfd5760405162461bcd60e51b815260206004820152601f60248201527f6163636f756e7420697320616c72656164792061206368616c6c656e6765720060448201526064015b60405180910390fd5b6001600160a01b0381165f818152609f6020908152604091829020805460ff1916600190811790915591519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc00991015b60405180910390a250565b610c62613cc3565b5f8111610cb15760405162461bcd60e51b815260206004820152601560248201527f636f756e74206d757374206265206e6f6e7a65726f00000000000000000000006044820152606401610bf4565b5f80610cbd8585613d1d565b915091505f610cd0836001015160c01c90565b5f81815260a160205260409020549091508214610d2f5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b5f60a181610d3d87856152e4565b81526020019081526020015f205414610dbd5760405162461bcd60e51b8152602060048201526024808201527f726576657274696e67206d7573742073746172742066726f6d2074686520656e60448201527f64696e67000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b609d548111610e345760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c792072657665727420756e46696e616c697a6564206261746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b610e3f6001826152f7565b609e555b8315610f8e57604051829082907ecae2739091badfd91c373f0a16cede691e0cd25bb80cff77dd5caeb4710146905f90a35f81815260a16020526040812055610e8b81613b49565b15610ee6575f81815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091610ed69084906152e4565b909155505060a6805460ff191690555b5f81815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a85415801590610f46575060a85481145b15610f50575f60a8555b6001015f81815260a160205260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90940193915081610e43575b505050505050565b60a85415610fe65760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b610fee613dc5565b5f80610ffa8484613d1d565b915091505f61100d836001015160c01c90565b5f81815260a16020526040902054909150821461106c5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b61107581611872565b6110c15760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610bf4565b6110ca81613b49565b156111175760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610bf4565b5f81815260a4602052604090206003015460ff16156111785760405162461bcd60e51b815260206004820152601660248201527f62617463682073686f756c6420626520726576657274000000000000000000006044820152606401610bf4565b5f81815260a260205260409020600101544210156111d85760405162461bcd60e51b815260206004820152601960248201527f626174636820696e206368616c6c656e67652077696e646f77000000000000006044820152606401610bf4565b605983015160a05f6111eb6001856152f7565b81526020019081526020015f2054146112465760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610bf4565b5f81815260a06020526040902054156112a15760405162461bcd60e51b815260206004820152601660248201527f626174636820616c7265616479207665726966696564000000000000000000006044820152606401610bf4565b80609d54600101146112f55760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610bf4565b609d819055600160a35f61130a866099015190565b815260208101919091526040015f20805460ff191691151591909117905560798301515f82815260a0602052604090205561135961134c846011015160c01c90565b600985015160c01c613e18565b60a25f6113676001846152f7565b815260208101919091526040015f908120818155600180820183905560028201839055600390910180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560ab91906113c390846152f7565b81526020019081526020015f205f905560ad5f6001836113e391906152f7565b81526020019081526020015f205f905560a45f60018361140391906152f7565b815260208082019290925260409081015f90812080547fffffffff000000000000000000000000000000000000000000000000000000001681556001810182905560028101829055600301805461ffff1916905583815260a1909252902054817f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d61148f866079015190565b60998701516040805192835260208301919091520160405180910390a35050505050565b60a854156115035760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b61150b613dc5565b60ac54609e545f90815260a260205260408120549091429161152d91906152e4565b1090505f4260ac54609b5f9054906101000a90046001600160a01b03166001600160a01b031663b59b1a786040518163ffffffff1660e01b8152600401602060405180830381865afa158015611585573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115a9919061530a565b6115b391906152e4565b109050811580156115c15750805b15611628575f6115d76080890160608a01615321565b61ffff16116116285760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b81806116315750805b61167d5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642074696d696e670000000000000000000000000000000000006044820152606401610bf4565b5f61169361168e60208a018a615342565b613d1d565b5090505f6116a5826001015160c01c90565b6116b09060016152e4565b5f81815260ad60205260408120549192509015611750575f491561173c5760405162461bcd60e51b815260206004820152602f60248201527f6d757374206e6f7420636172727920626c6f62207768656e207573696e67207360448201527f746f72656420626c6f62206861736800000000000000000000000000000000006064820152608401610bf4565b505f81815260ad602052604090205461176b565b61176861176060208c018c6153a3565b60ff16613ecf565b90505b6117768a5f8361400a565b5f806117828b8b613d1d565b915091505f611795836001015160c01c90565b905080609e54146117e85760405162461bcd60e51b815260206004820152601660248201527f696e636f727265637420626174636820686561646572000000000000000000006044820152606401610bf4565b5f81815260a1602052604090205482146118445760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b5f81815260a26020526040902042600190910155611863838b8b614560565b50505050505050505050505050565b5f81815260a260205260408120541580159061189a57505f82815260a1602052604090205415155b92915050565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561190c573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061193091906153c3565b61197c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b60a854156119cc5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b6119d4613dc5565b5f6119e561168e6020840184615342565b5090505f6119f7826001015160c01c90565b611a029060016152e4565b5f81815260ad602052604090205490915015611a865760405162461bcd60e51b815260206004820152602860248201527f636f6d6d69744261746368207265717569726573206e6f2073746f726564206260448201527f6c6f6220686173680000000000000000000000000000000000000000000000006064820152608401610bf4565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015611aea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b0e919061530a565b611b1891906152e4565b1015611b80575f611b2f6080850160608601615321565b61ffff1611611b805760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b5f611b9161176060208601866153a3565b9050611b9e84338361400a565b50505050565b611bac613cc3565b5f81118015611bbd57506099548114155b611c095760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e65772070726f6f662077696e646f7700000000000000006044820152606401610bf4565b609980549082905560408051828152602081018490527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a6191015b60405180910390a15050565b5f54600290610100900460ff16158015611c6f57505f5460ff8083169116105b611ce15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff831617610100179055611cff5f5460ff1690565b60ff16600214611d515760405162461bcd60e51b815260206004820152601660248201527f6d757374206861766520696e697469616c697a656421000000000000000000006044820152606401610bf4565b81611dc45760405162461bcd60e51b815260206004820152602760248201527f63616e206e6f742073657420737461746520726f6f742077697468206279746560448201527f73333228302921000000000000000000000000000000000000000000000000006064820152608401610bf4565b609e545f90815260ab6020526040902054611ded57609e545f90815260ab602052604090208290555b5f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611c43565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611e96573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611eba91906153c3565b611f065760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b60a85415611f565760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b611f5e613dc5565b5f4915611fad5760405162461bcd60e51b815260206004820152601f60248201527f636f6d6d69745374617465206d757374206e6f7420636172727920626c6f62006044820152606401610bf4565b5f611fbe61168e6020840184615342565b5090505f611fd0826001015160c01c90565b611fdb9060016152e4565b5f81815260ad602052604090205490915061205e5760405162461bcd60e51b815260206004820152602260248201527f6e6f2073746f72656420626c6f62206861736820666f7220746869732062617460448201527f63680000000000000000000000000000000000000000000000000000000000006064820152608401610bf4565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa1580156120c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120e6919061530a565b6120f091906152e4565b1015612158575f6121076080850160608601615321565b61ffff16116121585760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610bf4565b61217083335f84815260ad602052604090205461400a565b505050565b61217d613cc3565b6001600160a01b0381165f908152609f602052604090205460ff166121e45760405162461bcd60e51b815260206004820152601b60248201527f6163636f756e74206973206e6f742061206368616c6c656e67657200000000006044820152606401610bf4565b6001600160a01b0381165f818152609f60209081526040808320805460ff19169055519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc0099101610c4f565b61223a613cc3565b6122435f614713565b565b5f54610100900460ff161580801561226357505f54600160ff909116105b8061227c5750303b15801561227c57505f5460ff166001145b6122ee5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805460ff19166001179055801561230f575f805461ff0019166101001790555b6001600160a01b038616158061232c57506001600160a01b038516155b15612363576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0387166123b95760405162461bcd60e51b815260206004820152601a60248201527f696e76616c6964207375626d697474657220636f6e74726163740000000000006044820152606401610bf4565b6123c161477c565b6123c9614800565b609780546001600160a01b03808a167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255609b8054898416908316179055609c805492881692909116821790556098859055609984905560a98390556040515f907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96908290a3604080515f8152602081018690527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a437910160405180910390a1604080515f8152602081018590527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a61910160405180910390a1604080515f8152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b0223910160405180910390a18015612545575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b5f54600490610100900460ff1615801561256e57505f5460ff8083169116105b6125e05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff83161761010017905561261b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b03161461267b5760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610bf4565b6001600160a01b0383161580159061269c57505f836001600160a01b03163b115b6126e85760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207375626d69747465720000000000000000000000000000006044820152606401610bf4565b81609e54146127395760405162461bcd60e51b815260206004820152601660248201527f6375746f766572206261746368206d69736d61746368000000000000000000006044820152606401610bf4565b60a65460ff161561278c5760405162461bcd60e51b815260206004820152601560248201527f6368616c6c656e676520696e2070726f677265737300000000000000000000006044820152606401610bf4565b60a854156127dc5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b60ae82905560975460405183916001600160a01b03808716929116907faf9f8e4eb71b2fdd1ed3defb8e321359a8984ca774246d3d749837b98873a935905f90a4609780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b61289d613cc3565b6001600160a01b038116158015906128c35750609c546001600160a01b03828116911614155b61290f5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206e65772076657269666965720000000000000000000000006044820152606401610bf4565b609c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96905f90a35050565b612980613cc3565b5f81118015612990575060648111155b801561299e575060a9548114155b6129ea5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642070726f6f66207265776172642070657263656e74616765006044820152606401610bf4565b60a980549082905560408051828152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b02239101611c43565b60a85415612a785760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b612a80613dc5565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612aec573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b1091906153c3565b612b5c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610bf4565b5f80612b688686613d1d565b915091505f612b7b836001015160c01c90565b5f81815260a160205260409020549091508214612bda5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b612be381613b49565b612c2f5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610bf4565b5f81815260a46020526040902060038101805461ff00191661010017905560a6805460ff191690556099546002909101544291612c6b916152e4565b11612cea575f81815260a4602090815260408083206003908101805460ff1916600117905560a2835292819020909201548251808401909352600783527f54696d656f75740000000000000000000000000000000000000000000000000091830191909152612ce59183916001600160a01b031690614884565b612545565b612cf5838686614560565b61254581336040518060400160405280600d81526020017f50726f6f662073756363657373000000000000000000000000000000000000008152506149e3565b612d3d613cc3565b60aa80545f909155612d4f8282614aaf565b604080516001600160a01b0384168152602081018390527fb1b2058a6969e2d25e47bcaebe8ae21c29a23b2752429315b75e2f4f285f3d879101611c43565b612d96613cc3565b5f805260a06020527fb84a74ec6ef4d0e83b6006dfaa014ab4026f9f3b97d186e604d29998a4e808ea5415612e0d5760405162461bcd60e51b815260206004820152601660248201527f67656e6573697320626174636820696d706f72746564000000000000000000006044820152606401610bf4565b5f80612e198484613d1d565b915091505f612e2c836001015160c01c90565b90508015612e7c5760405162461bcd60e51b815260206004820152601360248201527f696e76616c696420626174636820696e646578000000000000000000000000006044820152606401610bf4565b5f612e88846079015190565b905080612ed75760405162461bcd60e51b815260206004820152600f60248201527f7a65726f20737461746520726f6f7400000000000000000000000000000000006044820152606401610bf4565b600984015160c01c15612f2c5760405162461bcd60e51b815260206004820152601d60248201527f6c31206d65737361676520706f707065642073686f756c6420626520300000006044820152606401610bf4565b5f612f38856019015190565b03612f855760405162461bcd60e51b815260206004820152600e60248201527f7a65726f206461746120686173680000000000000000000000000000000000006044820152606401610bf4565b7f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014612fb1856039015190565b14612ffe5760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642076657273696f6e65642068617368000000000000000000006044820152606401610bf4565b5f82815260a1602090815260408083208690558051608081018252428082528184019081528183018581526060830186815288875260a28652848720935184559151600184015551600283015551600390910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091179055603987015160ad83528184205560ab825280832084905560a0909152808220839055609e849055609d84905551849184917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a3604080518281525f6020820152849184917f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d910160405180910390a3505050505050565b5f8061312b8686613d1d565b915091505f61313e836001015160c01c90565b5f81815260a16020526040902054909150821461319d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b612545838686614560565b6131b0613cc3565b80156132b4576131be614b58565b60a65460ff16156132735760a7545f90815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a590925282208054919290916132129084906152e4565b909155505060a7545f90815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a6805460ff191690555b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a150565b6132bc614bb2565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613296565b50565b6132ee613cc3565b5f811180156132ff575060ac548114155b61334b5760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206e657720726f6c6c75702064656c617920706572696f64006044820152606401610bf4565b60ac80549082905560408051828152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad19101611c43565b335f908152609f602052604090205460ff166133e75760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206368616c6c656e67657220616c6c6f7765640000000000000000006044820152606401610bf4565b60a854156134375760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610bf4565b61343f613dc5565b60a65460ff16156134925760405162461bcd60e51b815260206004820152601460248201527f616c726561647920696e206368616c6c656e67650000000000000000000000006044820152606401610bf4565b8167ffffffffffffffff16609d54106134ed5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c72656164792066696e616c697a65640000000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a1602052604090205481146135545760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610bf4565b6135678267ffffffffffffffff16611872565b6135b35760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a460205260409020546801000000000000000090046001600160a01b03161561362e5760405162461bcd60e51b815260206004820152601860248201527f626174636820616c7265616479206368616c6c656e67656400000000000000006044820152606401610bf4565b67ffffffffffffffff82165f90815260a2602052604090206001015442106136be5760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74206368616c6c656e6765206261746368206f757473696465207460448201527f6865206368616c6c656e67652077696e646f77000000000000000000000000006064820152608401610bf4565b60975f9054906101000a90046001600160a01b03166001600160a01b0316630d13fd7b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561370e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613732919061530a565b3410156137815760405162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742076616c756500000000000000000000000000006044820152606401610bf4565b67ffffffffffffffff82811660a78190556040805160c0810182528281523360208083018281523484860190815242606086019081525f6080870181815260a0880182815299825260a4909552969096209451855492516001600160a01b031668010000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009093169816979097171783559451600183015591516002820155925160039093018054925115156101000261ff00199415159490941661ffff19909316929092179290921790556001600160a01b03168267ffffffffffffffff167f3a6ea19df25b49e7624e313ce7c1ab23984238e93727260db56a81735b1b99763460405161389991815260200190565b60405180910390a35f609d5460016138b191906152e4565b90505b609e548111613909578267ffffffffffffffff1681146138f7576099545f82815260a26020526040812060010180549091906138f19084906152e4565b90915550505b80613901816153de565b9150506138b4565b505060a6805460ff1916600117905550565b5f54600390610100900460ff1615801561393b57505f5460ff8083169116105b6139ad5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bf4565b5f805461ffff191660ff831617610100178155829003613a0f5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c696420726f6c6c75702064656c617920706572696f6400000000006044820152606401610bf4565b60ac829055604080515f8152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad1910160405180910390a15f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611c43565b335f90815260a5602052604081205490819003613ae95760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642062617463684368616c6c656e6765526577617264000000006044820152606401610bf4565b335f90815260a56020526040812055613b028282614aaf565b816001600160a01b03167f9c25fa83f414ed363c8d39c98fb3e17567b3431cede71eb062c49d2a63ce247a82604051613b3d91815260200190565b60405180910390a25050565b5f81815260a460205260408120546801000000000000000090046001600160a01b03161580159061189a5750505f90815260a46020526040902060030154610100900460ff161590565b613b9b613cc3565b5f81118015613bac57506098548114155b613bf85760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964206e65772066696e616c697a6520706572696f6400000000006044820152606401610bf4565b609880549082905560408051828152602081018490527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a4379101611c43565b613c3e613cc3565b6001600160a01b038116613cba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bf4565b6132e381614713565b6033546001600160a01b031633146122435760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bf4565b5f805f613d2a8585614beb565b90505f8160ff165f03613d4b57613d418686614c5b565b9094509050613db7565b8160ff1660011480613d6057508160ff166002145b15613d6f57613d418686614cc4565b60405162461bcd60e51b815260206004820152601960248201527f556e737570706f727465642062617463682076657273696f6e000000000000006044820152606401610bf4565b808420925050509250929050565b60655460ff16156122435760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610bf4565b805f03613e23575050565b8082035f5b82811015611b9e57610100818403811115613e4257508083035b609b546040517f3c7f528300000000000000000000000000000000000000000000000000000000815260048101859052602481018390526001600160a01b0390911690633c7f5283906044015f604051808303815f87803b158015613ea5575f80fd5b505af1158015613eb7573d5f803e3d5ffd5b50505050610100830192505061010081019050613e28565b5f81600203613f5e575f6040515f5b804980613eeb5750613efa565b60208202830152600101613ede565b602081028083209201604052909250905080613f585760405162461bcd60e51b815260206004820152601b60248201527f5632207265717569726573206174206c65617374203120626c6f6200000000006044820152606401610bf4565b50919050565b60014915613fd45760405162461bcd60e51b815260206004820152602560248201527f6c6567616379206261746368657320737570706f72742065786163746c79203160448201527f20626c6f620000000000000000000000000000000000000000000000000000006064820152608401610bf4565b5f4915613fe2575f4961189a565b507f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440145b919050565b600261401960208501856153a3565b60ff16111561406a5760405162461bcd60e51b815260206004820152600f60248201527f696e76616c69642076657273696f6e00000000000000000000000000000000006044820152606401610bf4565b60808301356140bb5760405162461bcd60e51b815260206004820152601b60248201527f70726576696f757320737461746520726f6f74206973207a65726f00000000006044820152606401610bf4565b60a083013561410c5760405162461bcd60e51b815260206004820152601660248201527f6e657720737461746520726f6f74206973207a65726f000000000000000000006044820152606401610bf4565b5f8061411e61168e6020870187615342565b915091505f614131836001015160c01c90565b90505f60a1816141428460016152e4565b81526020019081526020015f20541461419d5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c726561647920636f6d6d69747465640000000000000000006044820152606401610bf4565b609e5481146141ee5760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610bf4565b5f81815260a16020526040902054821461424a5760405162461bcd60e51b815260206004820152601b60248201527f696e636f727265637420706172656e74206261746368206861736800000000006044820152606401610bf4565b5f81815260ab60205260409020546080870135146142aa5760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610bf4565b5f6142b9846011015160c01c90565b90505f6142e56142cf60608a0160408b01615415565b6142df60808b0160608c01615321565b84614d17565b90506142f76080890160608a01615321565b60019384019361ffff91909116929092019160f99061431960208b018b6153a3565b60ff161061432657506101015b60408051828101909152955061434b8661434360208c018c6153a3565b60ff16614d5b565b60c084901b60018701526143798661436960808c0160608d01615321565b61ffff1660c01b60099190910152565b60c083811b6011880152601987018390526039870188905260808a0135605988015260a08a0135607988015289013560998701525f60b987015260d9860185905260016143c960208b018b6153a3565b60ff16106143fb576143fb866143e560608c0160408d01615415565b67ffffffffffffffff1660c01b60f99190910152565b8086205f85815260a1602090815260408083209390935560ab815282822060a08d0135905560ad905290812088905560a65460ff16156144645760a7545f90815260a460205260409020600201546099544291614457916152e4565b61446191906152f7565b90505b6040518060800160405280428152602001826098544261448491906152e4565b61448e91906152e4565b81526020016144a360608d0160408e01615415565b67ffffffffffffffff1681526001600160a01b038b81166020928301525f88815260a28352604080822085518155858501516001820155858201516002820155606090950151600390950180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169590931694909417909155609e88905560a19091528181205491519193508692507f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f91a35050505050505050565b806145ad5760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642062617463682070726f6f66000000000000000000000000006044820152606401610bf4565b5f6145bc846001015160c01c90565b90505f6145ca856039015190565b90505f7f00000000000000000000000000000000000000000000000000000000000000006145f9876059015190565b6079880151609989015160b98a015160198b015160405160c09690961b7fffffffffffffffff000000000000000000000000000000000000000000000000166020870152602886019490945260488501929092526068840152608883015260a882015260c8810183905260e801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120609c549091506001600160a01b0316632c09a8486146bb885160f81c90565b858888866040518663ffffffff1660e01b81526004016146df95949392919061542e565b5f6040518083038186803b1580156146f5575f80fd5b505afa158015614707573d5f803e3d5ffd5b50505050505050505050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166147f85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b612243614d62565b5f54610100900460ff1661487c5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b612243614dea565b60a88390555f83815260a460205260408082205460975491517fc96be4cb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526801000000000000000090920482169392919091169063c96be4cb906024016020604051808303815f875af115801561490b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061492f919061530a565b5f86815260a4602052604090206001015490915061494e9082906152e4565b5f86815260a460209081526040808320546801000000000000000090046001600160a01b0316835260a59091528120805490919061498d9084906152e4565b90915550506040516149a0908490615491565b604051908190038120906001600160a01b0384169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b5f83815260a4602052604081206001015460a954909190606490614a0790846154bd565b614a1191906154d4565b9050614a1d81836152f7565b60aa5f828254614a2d91906152e4565b90915550506001600160a01b0384165f90815260a5602052604081208054839290614a599084906152e4565b9091555050604051614a6c908490615491565b604051908190038120906001600160a01b0386169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b8015614b54575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114614afe576040519150601f19603f3d011682016040523d82523d5f602084013e614b03565b606091505b50509050806121705760405162461bcd60e51b815260206004820152601b60248201527f526f6c6c75703a20455448207472616e73666572206661696c656400000000006044820152606401610bf4565b5050565b614b60613dc5565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258614b953390565b6040516001600160a01b03909116815260200160405180910390a1565b614bba614e6f565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33614b95565b5f81614c395760405162461bcd60e51b815260206004820152601260248201527f456d7074792062617463682068656164657200000000000000000000000000006044820152606401610bf4565b82825f818110614c4b57614c4b61550c565b919091013560f81c949350505050565b5f8160f9811015614cae5760405162461bcd60e51b815260206004820152601d60248201527f626174636820686561646572206c656e67746820746f6f20736d616c6c0000006044820152606401610bf4565b6040519150808483378082016040529250929050565b5f816101018114614cae5760405162461bcd60e51b815260206004820181905260248201527f626174636820686561646572206c656e67746820697320696e636f72726563746044820152606401610bf4565b6040805160c085901b815260f084901b6008820152600a60208502820181019092525f918101614d4c8161ffff871686614ec1565b82900390912095945050505050565b8082535050565b5f54610100900460ff16614dde5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b6065805460ff19169055565b5f54610100900460ff16614e665760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610bf4565b61224333614713565b60655460ff166122435760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610bf4565b5f825f03614ed0575082614f83565b609b546001600160a01b03165f5b84811015614f7d576040517fae453cd5000000000000000000000000000000000000000000000000000000008152600481018590525f906001600160a01b0384169063ae453cd590602401602060405180830381865afa158015614f44573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614f68919061530a565b87525060209095019460019384019301614ede565b50849150505b9392505050565b5f60208284031215614f9a575f80fd5b5035919050565b80356001600160a01b0381168114614005575f80fd5b5f60208284031215614fc7575f80fd5b614f8382614fa1565b5f8083601f840112614fe0575f80fd5b50813567ffffffffffffffff811115614ff7575f80fd5b60208301915083602082850101111561500e575f80fd5b9250929050565b5f805f60408486031215615027575f80fd5b833567ffffffffffffffff81111561503d575f80fd5b61504986828701614fd0565b909790965060209590950135949350505050565b5f806020838503121561506e575f80fd5b823567ffffffffffffffff811115615084575f80fd5b61509085828601614fd0565b90969095509350505050565b5f60e08284031215613f58575f80fd5b5f805f805f606086880312156150c0575f80fd5b853567ffffffffffffffff808211156150d7575f80fd5b6150e389838a0161509c565b965060208801359150808211156150f8575f80fd5b61510489838a01614fd0565b9096509450604088013591508082111561511c575f80fd5b5061512988828901614fd0565b969995985093965092949392505050565b5f6020828403121561514a575f80fd5b813567ffffffffffffffff811115615160575f80fd5b61516c8482850161509c565b949350505050565b5f805f805f8060c08789031215615189575f80fd5b61519287614fa1565b95506151a060208801614fa1565b94506151ae60408801614fa1565b9350606087013592506080870135915060a087013590509295509295509295565b5f80604083850312156151e0575f80fd5b6151e983614fa1565b946020939093013593505050565b5f805f806040858703121561520a575f80fd5b843567ffffffffffffffff80821115615221575f80fd5b61522d88838901614fd0565b90965094506020870135915080821115615245575f80fd5b5061525287828801614fd0565b95989497509550505050565b80151581146132e3575f80fd5b5f6020828403121561527b575f80fd5b8135614f838161525e565b803567ffffffffffffffff81168114614005575f80fd5b5f80604083850312156152ae575f80fd5b6151e983615286565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561189a5761189a6152b7565b8181038181111561189a5761189a6152b7565b5f6020828403121561531a575f80fd5b5051919050565b5f60208284031215615331575f80fd5b813561ffff81168114614f83575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615375575f80fd5b83018035915067ffffffffffffffff82111561538f575f80fd5b60200191503681900382131561500e575f80fd5b5f602082840312156153b3575f80fd5b813560ff81168114614f83575f80fd5b5f602082840312156153d3575f80fd5b8151614f838161525e565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361540e5761540e6152b7565b5060010190565b5f60208284031215615425575f80fd5b614f8382615286565b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190508260608301529695505050505050565b5f82515f5b818110156154b05760208186018101518583015201615496565b505f920191825250919050565b808202811582820484141761189a5761189a6152b7565b5f82615507577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c6343000818000a" +var RollupDeployedBin = "0x608060405260043610610395575f3560e01c80637ae64261116101de578063b35dac4e11610108578063cf9a67451161009d578063dff7827e1161006d578063dff7827e14610b6e578063e3fff1dd14610b83578063f2fde38b14610ba2578063fb1e8b0414610bc1575f80fd5b8063cf9a674514610afc578063d279c19114610b1b578063d8dc99d214610b3a578063de8b303514610b4f575f80fd5b8063c5553892116100d8578063c555389214610a95578063cd0cb80214610ab4578063cd4edc6914610ad4578063ce5db8d614610ae7575f80fd5b8063b35dac4e14610a19578063b3e0a50914610a38578063b8d0a1b014610a57578063bedb86fb14610a76575f80fd5b806397fc007c1161017e578063a4f209b01161014e578063a4f209b01461099b578063abc8d68d146109ba578063b31a77d3146109e5578063b3484425146109fa575f80fd5b806397fc007c1461091a578063a3c9e94c14610939578063a415d8dc14610958578063a479265d14610986575f80fd5b80638da53b43116101b95780638da53b43146108075780638da5cb5b1461081c5780638f1d377614610839578063910129d4146108e9575f80fd5b80637ae64261146107bb578063843bc9a1146107cf57806388b1ea09146107ee575f80fd5b80632b7ac3f3116102bf5780635f77cf1d1161025f57806368589dfa1161022f57806368589dfa1461074a5780636c578c1d14610769578063715018a614610788578063728cdbca1461079c575f80fd5b80635f77cf1d1461069457806361267290146106e057806364c71673146106ff57806367caa37a1461072b575f80fd5b806341f756da1161029a57806341f756da1461060357806357e0af6c146106165780635c975abb146106355780635ef7a94a1461064c575f80fd5b80632b7ac3f3146105985780633b70c18a146105cf5780633e001b66146105ee575f80fd5b80631544ba3a1161033557806321e2f9e01161030557806321e2f9e0146105045780632362f03e146105235780632571098d1461054e5780632a213ba114610579575f80fd5b80631544ba3a1461049c578063163d9bee146104bb57806318463fb0146104d057806318af3b2b146104e5575f80fd5b806310d445831161037057806310d4458314610427578063116a1f4214610446578063121dcd5014610468578063133611011461047d575f80fd5b806304d77215146103a0578063059def61146103e35780630ceb678014610406575f80fd5b3661039c57005b5f80fd5b3480156103ab575f80fd5b506103ce6103ba366004615791565b60a36020525f908152604090205460ff1681565b60405190151581526020015b60405180910390f35b3480156103ee575f80fd5b506103f8609d5481565b6040519081526020016103da565b348015610411575f80fd5b506104256104203660046157be565b610bd6565b005b348015610432575f80fd5b5061042561044136600461581c565b610ca8565b348015610451575f80fd5b506103ce610460366004615791565b609d54101590565b348015610473575f80fd5b506103f8609e5481565b348015610488575f80fd5b50610425610497366004615864565b61104c565b3480156104a7575f80fd5b506104256104b63660046158b3565b611582565b3480156104c6575f80fd5b506103f860ae5481565b3480156104db575f80fd5b506103f860a75481565b3480156104f0575f80fd5b506103ce6104ff366004615791565b611922565b34801561050f575f80fd5b506103ce61051e366004615791565b61195a565b34801561052e575f80fd5b506103f861053d366004615791565b60a16020525f908152604090205481565b348015610559575f80fd5b506103f8610568366004615791565b60a06020525f908152604090205481565b348015610584575f80fd5b506103f8610593366004615791565b6119a4565b3480156105a3575f80fd5b50609c546105b7906001600160a01b031681565b6040516001600160a01b0390911681526020016103da565b3480156105da575f80fd5b50609b546105b7906001600160a01b031681565b3480156105f9575f80fd5b506103f860aa5481565b610425610611366004615941565b6119b4565b348015610621575f80fd5b50610425610630366004615791565b611cb4565b348015610640575f80fd5b5060655460ff166103ce565b348015610657575f80fd5b5061066b610666366004615791565b611d5f565b604080519485526020850193909352918301526001600160a01b031660608201526080016103da565b34801561069f575f80fd5b506106c77f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff90911681526020016103da565b3480156106eb575f80fd5b506104256106fa366004615791565b611dc4565b34801561070a575f80fd5b5060af546106c79068010000000000000000900467ffffffffffffffff1681565b348015610736575f80fd5b50610425610745366004615941565b611fc0565b348015610755575f80fd5b506103f8610764366004615791565b6122f6565b348015610774575f80fd5b506104256107833660046157be565b612323565b348015610793575f80fd5b506104256123e0565b3480156107a7575f80fd5b506104256107b636600461597b565b6123f3565b3480156107c6575f80fd5b50610425612712565b3480156107da575f80fd5b506104256107e93660046159d6565b612a9b565b3480156107f9575f80fd5b5060a6546103ce9060ff1681565b348015610812575f80fd5b506103f861040081565b348015610827575f80fd5b506033546001600160a01b03166105b7565b348015610844575f80fd5b506108a5610853366004615791565b60a46020525f9081526040902080546001820154600283015460039093015467ffffffffffffffff831693680100000000000000009093046001600160a01b0316929060ff8082169161010090041686565b6040805167ffffffffffffffff90971687526001600160a01b03909516602087015293850192909252606084015215156080830152151560a082015260c0016103da565b3480156108f4575f80fd5b506103ce610903366004615791565b5f90815260a4602052604090206003015460ff1690565b348015610925575f80fd5b506104256109343660046157be565b612de2565b348015610944575f80fd5b506097546105b7906001600160a01b031681565b348015610963575f80fd5b506103ce6109723660046157be565b609f6020525f908152604090205460ff1681565b348015610991575f80fd5b506103f860995481565b3480156109a6575f80fd5b506104256109b5366004615791565b612ec5565b3480156109c5575f80fd5b506103f86109d43660046157be565b60a56020525f908152604090205481565b3480156109f0575f80fd5b506103f860a85481565b348015610a05575f80fd5b50610425610a143660046159fe565b612f75565b348015610a24575f80fd5b50610425610a333660046157be565b61327e565b348015610a43575f80fd5b50610425610a52366004615864565b6132d7565b348015610a62575f80fd5b50610425610a713660046159fe565b61361e565b348015610a81575f80fd5b50610425610a90366004615a72565b6136a7565b348015610aa0575f80fd5b50610425610aaf366004615791565b6137df565b348015610abf575f80fd5b5060af546106c79067ffffffffffffffff1681565b610425610ae2366004615aa4565b613882565b348015610af2575f80fd5b506103f860985481565b348015610b07575f80fd5b50610425610b16366004615791565b613e15565b348015610b26575f80fd5b50610425610b353660046157be565b613f84565b348015610b45575f80fd5b506103f860ac5481565b348015610b5a575f80fd5b506103ce610b69366004615791565b614043565b348015610b79575f80fd5b506103f8609a5481565b348015610b8e575f80fd5b50610425610b9d366004615791565b61408d565b348015610bad575f80fd5b50610425610bbc3660046157be565b614130565b348015610bcc575f80fd5b506103f860a95481565b610bde6141bd565b6001600160a01b0381165f908152609f602052604090205460ff1615610c4b5760405162461bcd60e51b815260206004820152601f60248201527f6163636f756e7420697320616c72656164792061206368616c6c656e6765720060448201526064015b60405180910390fd5b6001600160a01b0381165f818152609f6020908152604091829020805460ff1916600190811790915591519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc00991015b60405180910390a250565b610cb06141bd565b5f8111610cff5760405162461bcd60e51b815260206004820152601560248201527f636f756e74206d757374206265206e6f6e7a65726f00000000000000000000006044820152606401610c42565b5f80610d0b8585614217565b915091505f610d1e836001015160c01c90565b5f81815260a160205260409020549091508214610d7d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b5f60a181610d8b8785615aeb565b81526020019081526020015f205414610e0b5760405162461bcd60e51b8152602060048201526024808201527f726576657274696e67206d7573742073746172742066726f6d2074686520656e60448201527f64696e67000000000000000000000000000000000000000000000000000000006064820152608401610c42565b609d548111610e825760405162461bcd60e51b815260206004820152602160248201527f63616e206f6e6c792072657665727420756e46696e616c697a6564206261746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610c42565b609e5460af5468010000000000000000900467ffffffffffffffff16811115610ee55760af80547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000067ffffffffffffffff8416021790555b610ef0600183615afe565b609e555b841561104357604051839083907ecae2739091badfd91c373f0a16cede691e0cd25bb80cff77dd5caeb4710146905f90a35f82815260a16020526040812055610f3c82614043565b15610f97575f82815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091610f87908490615aeb565b909155505060a6805460ff191690555b5f82815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a85415801590610ff7575060a85482145b15611001575f60a8555b6001919091015f81815260a160205260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9095019492509082610ef4575b50505050505050565b60a8541561109c5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6110a46142bf565b5f806110b08484614217565b915091505f6110c3836001015160c01c90565b5f81815260a1602052604090205490915082146111225760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b61112b8161195a565b6111775760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610c42565b61118081614043565b156111cd5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610c42565b5f81815260a4602052604090206003015460ff161561122e5760405162461bcd60e51b815260206004820152601660248201527f62617463682073686f756c6420626520726576657274000000000000000000006044820152606401610c42565b61123781611922565b156112845760405162461bcd60e51b815260206004820152601960248201527f626174636820696e206368616c6c656e67652077696e646f77000000000000006044820152606401610c42565b605983015160a05f611297600185615afe565b81526020019081526020015f2054146112f25760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610c42565b5f81815260a060205260409020541561134d5760405162461bcd60e51b815260206004820152601660248201527f626174636820616c7265616479207665726966696564000000000000000000006044820152606401610c42565b80609d54600101146113a15760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610c42565b609d819055600160a35f6113b6866099015190565b815260208101919091526040015f20805460ff191691151591909117905560798301515f82815260a060205260409020556114056113f8846011015160c01c90565b600985015160c01c614312565b611425611413600183615afe565b60af5467ffffffffffffffff166143c9565b6114c45760a25f611437600184615afe565b815260208101919091526040015f908120818155600180820183905560028201839055600390910180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560ab91906114939084615afe565b81526020019081526020015f205f905560ad5f6001836114b39190615afe565b81526020019081526020015f205f90555b60a45f6114d2600184615afe565b815260208082019290925260409081015f90812080547fffffffff000000000000000000000000000000000000000000000000000000001681556001810182905560028101829055600301805461ffff1916905583815260a1909252902054817f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d61155e866079015190565b60998701516040805192835260208301919091520160405180910390a35050505050565b60a854156115d25760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6115da6142bf565b5f4260ac546115ea609e546143da565b546115f59190615aeb565b1090505f4260ac54609b5f9054906101000a90046001600160a01b03166001600160a01b031663b59b1a786040518163ffffffff1660e01b8152600401602060405180830381865afa15801561164d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116719190615b11565b61167b9190615aeb565b109050811580156116895750805b156116f0575f61169f6080890160608a01615b28565b61ffff16116116f05760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b81806116f95750805b6117455760405162461bcd60e51b815260206004820152600e60248201527f696e76616c69642074696d696e670000000000000000000000000000000000006044820152606401610c42565b5f61175b61175660208a018a615b49565b614217565b5090505f61176d826001015160c01c90565b611778906001615aeb565b90505f611784826143f4565b90508015611806575f49156118015760405162461bcd60e51b815260206004820152602f60248201527f6d757374206e6f7420636172727920626c6f62207768656e207573696e67207360448201527f746f72656420626c6f62206861736800000000000000000000000000000000006064820152608401610c42565b611821565b61181e61181660208c018c615baa565b60ff16614492565b90505b61182c8a5f836145cc565b5f806118388b8b614217565b915091505f61184b836001015160c01c90565b905080609e541461189e5760405162461bcd60e51b815260206004820152601660248201527f696e636f727265637420626174636820686561646572000000000000000000006044820152606401610c42565b5f81815260a1602052604090205482146118fa5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b42611904826143da565b60010155611913838b8b614abd565b50505050505050505050505050565b60af545f9067ffffffffffffffff1661193b8382614c70565b801561195357504261194d8483614c9c565b60010154115b9392505050565b60af545f9067ffffffffffffffff166119738382614c70565b801561198857505f6119858483614c9c565b54115b8015611953575050505f90815260a16020526040902054151590565b5f6119ae826143f4565b92915050565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611a20573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a449190615bca565b611a905760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b60a85415611ae05760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b611ae86142bf565b5f611af96117566020840184615b49565b5090505f611b0b826001015160c01c90565b611b16906001615aeb565b90505f611b22826143f4565b14611b955760405162461bcd60e51b815260206004820152602860248201527f636f6d6d69744261746368207265717569726573206e6f2073746f726564206260448201527f6c6f6220686173680000000000000000000000000000000000000000000000006064820152608401610c42565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015611bf9573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611c1d9190615b11565b611c279190615aeb565b1015611c8f575f611c3e6080850160608601615b28565b61ffff1611611c8f5760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b5f611ca06118166020860186615baa565b9050611cae84335b836145cc565b50505050565b611cbc6141bd565b5f81118015611ccd57506099548114155b611d195760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e65772070726f6f662077696e646f7700000000000000006044820152606401610c42565b609980549082905560408051828152602081018490527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a6191015b60405180910390a15050565b60af545f9081908190819067ffffffffffffffff16611d7e8682614c70565b15611dbb575f611d8e8783614c9c565b80546001820154600283015460039093015491985096509094506001600160a01b03169250611dbd915050565b505b9193509193565b5f54600290610100900460ff16158015611de457505f5460ff8083169116105b611e565760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100179055611e745f5460ff1690565b60ff16600214611ec65760405162461bcd60e51b815260206004820152601660248201527f6d757374206861766520696e697469616c697a656421000000000000000000006044820152606401610c42565b81611f395760405162461bcd60e51b815260206004820152602760248201527f63616e206e6f742073657420737461746520726f6f742077697468206279746560448201527f73333228302921000000000000000000000000000000000000000000000000006064820152608401610c42565b609e5460af54611f5490829067ffffffffffffffff166143c9565b158015611f6c57505f81815260ab6020526040902054155b15611f82575f81815260ab602052604090208390555b505f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611d53565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561202c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120509190615bca565b61209c5760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b60a854156120ec5760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6120f46142bf565b5f49156121435760405162461bcd60e51b815260206004820152601f60248201527f636f6d6d69745374617465206d757374206e6f7420636172727920626c6f62006044820152606401610c42565b5f6121546117566020840184615b49565b5090505f612166826001015160c01c90565b612171906001615aeb565b90505f61217d826143f4565b9050806121f25760405162461bcd60e51b815260206004820152602260248201527f6e6f2073746f72656420626c6f62206861736820666f7220746869732062617460448201527f63680000000000000000000000000000000000000000000000000000000000006064820152608401610c42565b60ac54609b54604080517fb59b1a7800000000000000000000000000000000000000000000000000000000815290514293926001600160a01b03169163b59b1a789160048083019260209291908290030181865afa158015612256573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061227a9190615b11565b6122849190615aeb565b10156122ec575f61229b6080860160608701615b28565b61ffff16116122ec5760405162461bcd60e51b815260206004820152600b60248201527f6c316d73672064656c61790000000000000000000000000000000000000000006044820152606401610c42565b611cae8433611ca8565b60af545f9061231090839067ffffffffffffffff16614c70565b1561231e576119ae82614ce3565b919050565b61232b6141bd565b6001600160a01b0381165f908152609f602052604090205460ff166123925760405162461bcd60e51b815260206004820152601b60248201527f6163636f756e74206973206e6f742061206368616c6c656e67657200000000006044820152606401610c42565b6001600160a01b0381165f818152609f60209081526040808320805460ff19169055519182527f7feb653c7b1f0d23daeed494225b3f28851cdc8973fcc653866d9b6e205fc0099101610c9d565b6123e86141bd565b6123f15f614d3b565b565b5f54610100900460ff161580801561241157505f54600160ff909116105b8061242a5750303b15801561242a57505f5460ff166001145b61249c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805460ff1916600117905580156124bd575f805461ff0019166101001790555b6001600160a01b03861615806124da57506001600160a01b038516155b15612511576040517fecc6fdf000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0387166125675760405162461bcd60e51b815260206004820152601a60248201527f696e76616c6964207375626d697474657220636f6e74726163740000000000006044820152606401610c42565b61256f614da4565b612577614e28565b609780546001600160a01b03808a167fffffffffffffffffffffffff000000000000000000000000000000000000000092831617909255609b8054898416908316179055609c8054928816929091169190911790556098849055609983905560a98290556125e56001614eac565b6040516001600160a01b038616905f907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96908290a3604080515f8152602081018690527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a437910160405180910390a1604080515f8152602081018590527f1e3a2094feb4b696dd3d7caea38ad2f41dbdcac3fa3943c7a693aff8a64b0a61910160405180910390a1604080515f8152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b0223910160405180910390a18015611043575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b5f54600590610100900460ff1615801561273257505f5460ff8083169116105b6127a45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff8316176101001790556127df7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b03161461283f5760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610c42565b60af5467ffffffffffffffff16156128995760405162461bcd60e51b815260206004820152601a60248201527f62617463682072696e6720616c726561647920737461727465640000000000006044820152606401610c42565b6097546040517f9f8a13d70000000000000000000000000000000000000000000000000000000081525f60048201526001600160a01b0390911690639f8a13d790602401602060405180830381865afa925050508015612934575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261293191810190615bca565b60015b6129805760405162461bcd60e51b815260206004820152601a60248201527f7375626d6974746572206375746f7665722072657175697265640000000000006044820152606401610c42565b505f609e5460016129919190615aeb565b5f81815260ad6020526040902054909150156129ef5760405162461bcd60e51b815260206004820152601e60248201527f726576657274656420626174636820617761697473207265636f6d6d697400006044820152606401610c42565b610400609d5482612a009190615afe565b10612a4d5760405162461bcd60e51b815260206004820152601c60248201527f746f6f206d616e7920756e66696e616c697a65642062617463686573000000006044820152606401610c42565b612a5681614eac565b505f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b5f54600490610100900460ff16158015612abb57505f5460ff8083169116105b612b2d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100179055612b687fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6001600160a01b0316336001600160a01b031614612bc85760405162461bcd60e51b815260206004820152601060248201527f6f6e6c792070726f78792061646d696e000000000000000000000000000000006044820152606401610c42565b6001600160a01b03831615801590612be957505f836001600160a01b03163b115b612c355760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207375626d69747465720000000000000000000000000000006044820152606401610c42565b81609e5414612c865760405162461bcd60e51b815260206004820152601660248201527f6375746f766572206261746368206d69736d61746368000000000000000000006044820152606401610c42565b60a65460ff1615612cd95760405162461bcd60e51b815260206004820152601560248201527f6368616c6c656e676520696e2070726f677265737300000000000000000000006044820152606401610c42565b60a85415612d295760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b60ae82905560975460405183916001600160a01b03808716929116907faf9f8e4eb71b2fdd1ed3defb8e321359a8984ca774246d3d749837b98873a935905f90a4609780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0385161790555f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b612dea6141bd565b6001600160a01b03811615801590612e105750609c546001600160a01b03828116911614155b612e5c5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964206e65772076657269666965720000000000000000000000006044820152606401610c42565b609c80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f728af3d16a5760405e27a082c98ab272e9f0a1d02f0085d41532a26093aedd96905f90a35050565b612ecd6141bd565b5f81118015612edd575060648111155b8015612eeb575060a9548114155b612f375760405162461bcd60e51b815260206004820152601f60248201527f696e76616c69642070726f6f66207265776172642070657263656e74616765006044820152606401610c42565b60a980549082905560408051828152602081018490527ffb81bce17f015797e11949d3c332e2bf9453faf68f728447426803138f2b02239101611d53565b60a85415612fc55760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b612fcd6142bf565b6097546001600160a01b0316639f8a13d7336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015613039573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061305d9190615bca565b6130a95760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c7920616374697665207375626d697474657220616c6c6f7765640000006044820152606401610c42565b5f806130b58686614217565b915091505f6130c8836001015160c01c90565b5f81815260a1602052604090205490915082146131275760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b61313081614043565b61317c5760405162461bcd60e51b815260206004820152601260248201527f626174636820696e206368616c6c656e676500000000000000000000000000006044820152606401610c42565b5f81815260a46020526040902060038101805461ff00191661010017905560a6805460ff1916905560995460029091015442916131b891615aeb565b11613233575f81815260a460205260409020600301805460ff1916600117905561322e816131e5816143da565b6003015460408051808201909152600781527f54696d656f75740000000000000000000000000000000000000000000000000060208201526001600160a01b0390911690614f0d565b611043565b61323e838686614abd565b61104381336040518060400160405280600d81526020017f50726f6f6620737563636573730000000000000000000000000000000000000081525061506c565b6132866141bd565b60aa80545f9091556132988282615138565b604080516001600160a01b0384168152602081018390527fb1b2058a6969e2d25e47bcaebe8ae21c29a23b2752429315b75e2f4f285f3d879101611d53565b6132df6141bd565b5f805260a06020527fb84a74ec6ef4d0e83b6006dfaa014ab4026f9f3b97d186e604d29998a4e808ea54156133565760405162461bcd60e51b815260206004820152601660248201527f67656e6573697320626174636820696d706f72746564000000000000000000006044820152606401610c42565b5f806133628484614217565b915091505f613375836001015160c01c90565b905080156133c55760405162461bcd60e51b815260206004820152601360248201527f696e76616c696420626174636820696e646578000000000000000000000000006044820152606401610c42565b5f6133d1846079015190565b9050806134205760405162461bcd60e51b815260206004820152600f60248201527f7a65726f20737461746520726f6f7400000000000000000000000000000000006044820152606401610c42565b600984015160c01c156134755760405162461bcd60e51b815260206004820152601d60248201527f6c31206d65737361676520706f707065642073686f756c6420626520300000006044820152606401610c42565b5f613481856019015190565b036134ce5760405162461bcd60e51b815260206004820152600e60248201527f7a65726f206461746120686173680000000000000000000000000000000000006044820152606401610c42565b7f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c4440146134fa856039015190565b146135475760405162461bcd60e51b815260206004820152601660248201527f696e76616c69642076657273696f6e65642068617368000000000000000000006044820152606401610c42565b5f82815260a1602052604090208390556135968282613567876039015190565b60405180608001604052804281526020014281526020015f81526020015f6001600160a01b03168152506151e3565b5f82815260a06020526040808220839055609e849055609d84905551849184917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a3604080518281525f6020820152849184917f26ba82f907317eedc97d0cbef23de76a43dd6edb563bdb6e9407645b950a7a2d910160405180910390a3505050505050565b5f8061362a8686614217565b915091505f61363d836001015160c01c90565b5f81815260a16020526040902054909150821461369c5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b611043838686614abd565b6136af6141bd565b80156137ad576136bd615362565b60a65460ff16156137725760a7545f90815260a460209081526040808320600181015490546801000000000000000090046001600160a01b0316845260a59092528220805491929091613711908490615aeb565b909155505060a7545f90815260a46020526040812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181018290556002810191909155600301805461ffff1916905560a6805460ff191690555b7f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b039091168152602001612a90565b6137b56153bc565b7f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613795565b50565b6137e76141bd565b5f811180156137f8575060ac548114155b6138445760405162461bcd60e51b815260206004820152601f60248201527f696e76616c6964206e657720726f6c6c75702064656c617920706572696f64006044820152606401610c42565b60ac80549082905560408051828152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad19101611d53565b335f908152609f602052604090205460ff166138e05760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79206368616c6c656e67657220616c6c6f7765640000000000000000006044820152606401610c42565b60a854156139305760405162461bcd60e51b815260206004820152601660248201527f70656e64696e67207265766572742072657175657374000000000000000000006044820152606401610c42565b6139386142bf565b60a65460ff161561398b5760405162461bcd60e51b815260206004820152601460248201527f616c726561647920696e206368616c6c656e67650000000000000000000000006044820152606401610c42565b8167ffffffffffffffff16609d54106139e65760405162461bcd60e51b815260206004820152601760248201527f626174636820616c72656164792066696e616c697a65640000000000000000006044820152606401610c42565b67ffffffffffffffff82165f90815260a160205260409020548114613a4d5760405162461bcd60e51b815260206004820152601460248201527f696e636f727265637420626174636820686173680000000000000000000000006044820152606401610c42565b613a608267ffffffffffffffff1661195a565b613aac5760405162461bcd60e51b815260206004820152600f60248201527f6261746368206e6f7420657869737400000000000000000000000000000000006044820152606401610c42565b67ffffffffffffffff82165f90815260a460205260409020546801000000000000000090046001600160a01b031615613b275760405162461bcd60e51b815260206004820152601860248201527f626174636820616c7265616479206368616c6c656e67656400000000000000006044820152606401610c42565b613b3a8267ffffffffffffffff16611922565b613bac5760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f74206368616c6c656e6765206261746368206f757473696465207460448201527f6865206368616c6c656e67652077696e646f77000000000000000000000000006064820152608401610c42565b60975f9054906101000a90046001600160a01b03166001600160a01b0316630d13fd7b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613bfc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613c209190615b11565b341015613c6f5760405162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742076616c756500000000000000000000000000006044820152606401610c42565b67ffffffffffffffff82811660a78190556040805160c0810182528281523360208083018281523484860190815242606086019081525f6080870181815260a0880182815299825260a4909552969096209451855492516001600160a01b031668010000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009093169816979097171783559451600183015591516002820155925160039093018054925115156101000261ff00199415159490941661ffff19909316929092179290921790556001600160a01b03168267ffffffffffffffff167f3a6ea19df25b49e7624e313ce7c1ab23984238e93727260db56a81735b1b997634604051613d8791815260200190565b60405180910390a360af54609d5467ffffffffffffffff909116905f90613daf906001615aeb565b90505b609e548111613e02578367ffffffffffffffff168114613df057609954613dd98284614c9c565b6001015f828254613dea9190615aeb565b90915550505b80613dfa81615be5565b915050613db2565b505060a6805460ff191660011790555050565b5f54600390610100900460ff16158015613e3557505f5460ff8083169116105b613ea75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c42565b5f805461ffff191660ff831617610100178155829003613f095760405162461bcd60e51b815260206004820152601b60248201527f696e76616c696420726f6c6c75702064656c617920706572696f6400000000006044820152606401610c42565b60ac829055604080515f8152602081018490527f624e47dc9fb8f8cfeaf4ead4710277cc1757136cfa885e465514cf6d510f0ad1910160405180910390a15f805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001611d53565b335f90815260a5602052604081205490819003613fe35760405162461bcd60e51b815260206004820152601c60248201527f696e76616c69642062617463684368616c6c656e6765526577617264000000006044820152606401610c42565b335f90815260a56020526040812055613ffc8282615138565b816001600160a01b03167f9c25fa83f414ed363c8d39c98fb3e17567b3431cede71eb062c49d2a63ce247a8260405161403791815260200190565b60405180910390a25050565b5f81815260a460205260408120546801000000000000000090046001600160a01b0316158015906119ae5750505f90815260a46020526040902060030154610100900460ff161590565b6140956141bd565b5f811180156140a657506098548114155b6140f25760405162461bcd60e51b815260206004820152601b60248201527f696e76616c6964206e65772066696e616c697a6520706572696f6400000000006044820152606401610c42565b609880549082905560408051828152602081018490527fa577f4223f91f74e2dad65bbb8c30807587ae95d0d34288057bb3ec0d398a4379101611d53565b6141386141bd565b6001600160a01b0381166141b45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c42565b6137dc81614d3b565b6033546001600160a01b031633146123f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c42565b5f805f61422485856153f5565b90505f8160ff165f036142455761423b8686615465565b90945090506142b1565b8160ff166001148061425a57508160ff166002145b156142695761423b86866154ce565b60405162461bcd60e51b815260206004820152601960248201527f556e737570706f727465642062617463682076657273696f6e000000000000006044820152606401610c42565b808420925050509250929050565b60655460ff16156123f15760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c42565b805f0361431d575050565b8082035f5b82811015611cae5761010081840381111561433c57508083035b609b546040517f3c7f528300000000000000000000000000000000000000000000000000000000815260048101859052602481018390526001600160a01b0390911690633c7f5283906044015f604051808303815f87803b15801561439f575f80fd5b505af11580156143b1573d5f803e3d5ffd5b50505050610100830192505061010081019050614322565b5f8115801590611953575050111590565b60af545f906119ae90839067ffffffffffffffff16614c9c565b60af545f9061440e90839067ffffffffffffffff166143c9565b61442457505f90815260ad602052604090205490565b609e5460af5468010000000000000000900467ffffffffffffffff168181111561444c578091505b8184118061445b5750609d5484105b1561446957505f9392505050565b60b05f61447861040087615c49565b81526020019081526020015f206005015492505050919050565b5f81600203614521575f6040515f5b8049806144ae57506144bd565b602082028301526001016144a1565b60208102808320920160405290925090508061451b5760405162461bcd60e51b815260206004820152601b60248201527f5632207265717569726573206174206c65617374203120626c6f6200000000006044820152606401610c42565b50919050565b600149156145975760405162461bcd60e51b815260206004820152602560248201527f6c6567616379206261746368657320737570706f72742065786163746c79203160448201527f20626c6f620000000000000000000000000000000000000000000000000000006064820152608401610c42565b5f49156145a5575f496119ae565b507f010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014919050565b60026145db6020850185615baa565b60ff16111561462c5760405162461bcd60e51b815260206004820152600f60248201527f696e76616c69642076657273696f6e00000000000000000000000000000000006044820152606401610c42565b608083013561467d5760405162461bcd60e51b815260206004820152601b60248201527f70726576696f757320737461746520726f6f74206973207a65726f00000000006044820152606401610c42565b60a08301356146ce5760405162461bcd60e51b815260206004820152601660248201527f6e657720737461746520726f6f74206973207a65726f000000000000000000006044820152606401610c42565b5f806146e06117566020870187615b49565b915091505f6146f3836001015160c01c90565b90505f60a181614704846001615aeb565b81526020019081526020015f20541461475f5760405162461bcd60e51b815260206004820152601760248201527f626174636820616c726561647920636f6d6d69747465640000000000000000006044820152606401610c42565b609e5481146147b05760405162461bcd60e51b815260206004820152601560248201527f696e636f727265637420626174636820696e64657800000000000000000000006044820152606401610c42565b5f81815260a16020526040902054821461480c5760405162461bcd60e51b815260206004820152601b60248201527f696e636f727265637420706172656e74206261746368206861736800000000006044820152606401610c42565b856080013561481a82614ce3565b146148675760405162461bcd60e51b815260206004820152601d60248201527f696e636f72726563742070726576696f757320737461746520726f6f740000006044820152606401610c42565b5f614876846011015160c01c90565b90505f6148a261488c60608a0160408b01615c5c565b61489c60808b0160608c01615b28565b84615521565b90506148b46080890160608a01615b28565b60019384019361ffff91909116929092019160f9906148d660208b018b615baa565b60ff16106148e357506101015b6040805182810190915295506149088661490060208c018c615baa565b60ff16615565565b60c084901b60018701526149368661492660808c0160608d01615b28565b61ffff1660c01b60099190910152565b60c083811b6011880152601987018390526039870188905260808a0135605988015260a08a0135607988015289013560998701525f60b987015260d98601859052600161498660208b018b615baa565b60ff16106149b8576149b8866149a260608c0160408d01615c5c565b67ffffffffffffffff1660c01b60f99190910152565b8086205f85815260a1602052604081209190915560a65460ff1615614a065760a7545f90815260a4602052604090206002015460995442916149f991615aeb565b614a039190615afe565b90505b614a73858b60a001358a60405180608001604052804281526020018660985442614a309190615aeb565b614a3a9190615aeb565b81526020018f6040016020810190614a529190615c5c565b67ffffffffffffffff1681526020018e6001600160a01b03168152506151e3565b5050609e8390555f83815260a16020526040808220549051909185917f2c32d4ae151744d0bf0b9464a3e897a1d17ed2f1af71f7c9a75f12ce0d28238f9190a35050505050505050565b80614b0a5760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642062617463682070726f6f66000000000000000000000000006044820152606401610c42565b5f614b19846001015160c01c90565b90505f614b27856039015190565b90505f7f0000000000000000000000000000000000000000000000000000000000000000614b56876059015190565b6079880151609989015160b98a015160198b015160405160c09690961b7fffffffffffffffff000000000000000000000000000000000000000000000000166020870152602886019490945260488501929092526068840152608883015260a882015260c8810183905260e801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120609c549091506001600160a01b0316632c09a848614c18885160f81c90565b858888866040518663ffffffff1660e01b8152600401614c3c959493929190615c75565b5f6040518083038186803b158015614c52575f80fd5b505afa158015614c64573d5f803e3d5ffd5b50505050505050505050565b5f614c7b83836143c9565b15806119535750609d548310158015611953575050609e5490911115919050565b5f614ca783836143c9565b15614cd15760b05f614cbb61040086615c49565b81526020019081526020015f205f0190506119ae565b50505f90815260a26020526040902090565b60af545f90614cfd90839067ffffffffffffffff166143c9565b15614d295760b05f614d1161040085615c49565b81526020019081526020015f20600401549050919050565b505f90815260ab602052604090205490565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16614e205760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f161556c565b5f54610100900460ff16614ea45760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f16155f4565b60af80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff831617905560405181907f20ec3848832ec028b438cae2b58b0b2cc77688de8f84b51c251c6fc75997a890905f90a250565b60a88390555f83815260a460205260408082205460975491517fc96be4cb0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526801000000000000000090920482169392919091169063c96be4cb906024016020604051808303815f875af1158015614f94573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614fb89190615b11565b5f86815260a46020526040902060010154909150614fd7908290615aeb565b5f86815260a460209081526040808320546801000000000000000090046001600160a01b0316835260a590915281208054909190615016908490615aeb565b9091555050604051615029908490615cd8565b604051908190038120906001600160a01b0384169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b5f83815260a4602052604081206001015460a9549091906064906150909084615d04565b61509a9190615d1b565b90506150a68183615afe565b60aa5f8282546150b69190615aeb565b90915550506001600160a01b0384165f90815260a56020526040812080548392906150e2908490615aeb565b90915550506040516150f5908490615cd8565b604051908190038120906001600160a01b0386169087907fe70d3820e244d5f71d1a6395db24f3460e8dca966edc1fd3625b6292880a877a905f90a45050505050565b80156151df575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114615187576040519150601f19603f3d011682016040523d82523d5f602084013e61518c565b606091505b50509050806151dd5760405162461bcd60e51b815260206004820152601b60248201527f526f6c6c75703a20455448207472616e73666572206661696c656400000000006044820152606401610c42565b505b5050565b60af546151fb90859067ffffffffffffffff166143c9565b156152e657610400609d54856152119190615afe565b1061525e5760405162461bcd60e51b815260206004820152600f60248201527f62617463682072696e672066756c6c00000000000000000000000000000000006044820152606401610c42565b5f60b08161526e61040088615c49565b815260208082019290925260409081015f2084518155918401516001830155830151600282015560608301516003820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039092169190911790556004810185905560050183905550611cae565b5f93845260a26020908152604080862083518155838301516001820155838201516002820155606090930151600390930180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039094169390931790925560ab81528185209390935560ad909252912055565b61536a6142bf565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861539f3390565b6040516001600160a01b03909116815260200160405180910390a1565b6153c4615679565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361539f565b5f816154435760405162461bcd60e51b815260206004820152601260248201527f456d7074792062617463682068656164657200000000000000000000000000006044820152606401610c42565b82825f81811061545557615455615d2e565b919091013560f81c949350505050565b5f8160f98110156154b85760405162461bcd60e51b815260206004820152601d60248201527f626174636820686561646572206c656e67746820746f6f20736d616c6c0000006044820152606401610c42565b6040519150808483378082016040529250929050565b5f8161010181146154b85760405162461bcd60e51b815260206004820181905260248201527f626174636820686561646572206c656e67746820697320696e636f72726563746044820152606401610c42565b6040805160c085901b815260f084901b6008820152600a60208502820181019092525f9181016155568161ffff8716866156cb565b82900390912095945050505050565b8082535050565b5f54610100900460ff166155e85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6065805460ff19169055565b5f54610100900460ff166156705760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610c42565b6123f133614d3b565b60655460ff166123f15760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c42565b5f825f036156da575082611953565b609b546001600160a01b03165f5b84811015615787576040517fae453cd5000000000000000000000000000000000000000000000000000000008152600481018590525f906001600160a01b0384169063ae453cd590602401602060405180830381865afa15801561574e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906157729190615b11565b875250602090950194600193840193016156e8565b5093949350505050565b5f602082840312156157a1575f80fd5b5035919050565b80356001600160a01b038116811461231e575f80fd5b5f602082840312156157ce575f80fd5b611953826157a8565b5f8083601f8401126157e7575f80fd5b50813567ffffffffffffffff8111156157fe575f80fd5b602083019150836020828501011115615815575f80fd5b9250929050565b5f805f6040848603121561582e575f80fd5b833567ffffffffffffffff811115615844575f80fd5b615850868287016157d7565b909790965060209590950135949350505050565b5f8060208385031215615875575f80fd5b823567ffffffffffffffff81111561588b575f80fd5b615897858286016157d7565b90969095509350505050565b5f60e0828403121561451b575f80fd5b5f805f805f606086880312156158c7575f80fd5b853567ffffffffffffffff808211156158de575f80fd5b6158ea89838a016158a3565b965060208801359150808211156158ff575f80fd5b61590b89838a016157d7565b90965094506040880135915080821115615923575f80fd5b50615930888289016157d7565b969995985093965092949392505050565b5f60208284031215615951575f80fd5b813567ffffffffffffffff811115615967575f80fd5b615973848285016158a3565b949350505050565b5f805f805f8060c08789031215615990575f80fd5b615999876157a8565b95506159a7602088016157a8565b94506159b5604088016157a8565b9350606087013592506080870135915060a087013590509295509295509295565b5f80604083850312156159e7575f80fd5b6159f0836157a8565b946020939093013593505050565b5f805f8060408587031215615a11575f80fd5b843567ffffffffffffffff80821115615a28575f80fd5b615a34888389016157d7565b90965094506020870135915080821115615a4c575f80fd5b50615a59878288016157d7565b95989497509550505050565b80151581146137dc575f80fd5b5f60208284031215615a82575f80fd5b813561195381615a65565b803567ffffffffffffffff8116811461231e575f80fd5b5f8060408385031215615ab5575f80fd5b6159f083615a8d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156119ae576119ae615abe565b818103818111156119ae576119ae615abe565b5f60208284031215615b21575f80fd5b5051919050565b5f60208284031215615b38575f80fd5b813561ffff81168114611953575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615b7c575f80fd5b83018035915067ffffffffffffffff821115615b96575f80fd5b602001915036819003821315615815575f80fd5b5f60208284031215615bba575f80fd5b813560ff81168114611953575f80fd5b5f60208284031215615bda575f80fd5b815161195381615a65565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615c1557615c15615abe565b5060010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82615c5757615c57615c1c565b500690565b5f60208284031215615c6c575f80fd5b61195382615a8d565b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190508260608301529695505050505050565b5f82515f5b81811015615cf75760208186018101518583015201615cdd565b505f920191825250919050565b80820281158282048414176119ae576119ae615abe565b5f82615d2957615d29615c1c565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea164736f6c6343000818000a" func init() { if err := json.Unmarshal([]byte(RollupStorageLayoutJSON), RollupStorageLayout); err != nil { diff --git a/challenger/service/calldata.go b/challenger/service/calldata.go index ebbb12c3c..3ec033e8a 100644 --- a/challenger/service/calldata.go +++ b/challenger/service/calldata.go @@ -11,8 +11,8 @@ import ( ) // commitInput is the batch data carried by the commit transaction. -// The contract deletes committedStateRoots and batchDataStore when the next batch -// finalizes, so this is the record that remains for an older batch. +// The contract stops reporting committedStateRoots and batchDataStore of a batch +// once the next batch finalizes, so this is the record that remains for an older batch. type commitInput struct { BlockNumber uint64 StateRoot common.Hash diff --git a/challenger/service/roots.go b/challenger/service/roots.go index 0b217d111..566b391d4 100644 --- a/challenger/service/roots.go +++ b/challenger/service/roots.go @@ -49,8 +49,9 @@ func newRootSource(rollup *bindings.Rollup, l1, l2 *ethclient.Client) (*rootSour // the latest commit wrote batchDataStore in the same transaction, so its // originTimestamp is the timestamp of the block holding that transaction. // -// Finalized batches are refused: finalizeBatch deletes the previous batch's -// batchDataStore, and a finalized batch cannot be challenged anyway. +// Finalized batches are refused: the contract stops reporting a batch's +// batchDataStore once the next batch finalizes, and a finalized batch cannot be +// challenged anyway. func (s *rootSource) Compare(ctx context.Context, batchIndex uint64) (Comparison, error) { index := new(big.Int).SetUint64(batchIndex) head, err := s.l1.HeaderByNumber(ctx, nil) diff --git a/contracts/contracts/l1/rollup/IRollup.sol b/contracts/contracts/l1/rollup/IRollup.sol index 5ed341cd2..6a496fc38 100644 --- a/contracts/contracts/l1/rollup/IRollup.sol +++ b/contracts/contracts/l1/rollup/IRollup.sol @@ -128,6 +128,10 @@ interface IRollup { address indexed oldAddr, address indexed newAddr, uint256 indexed legacyCutoverBatchIndex ); + /// @notice Emitted when the per-batch data of new batches starts being kept in the storage ring. + /// @param startBatchIndex The first batch index whose per-batch data is kept in the ring. + event BatchRingStarted(uint256 indexed startBatchIndex); + /// @notice Emitted when the state of Challenge is updated. /// @param batchIndex The index of the batch. /// @param challenger The address of challenger. diff --git a/contracts/contracts/l1/rollup/Rollup.sol b/contracts/contracts/l1/rollup/Rollup.sol index 0e271e3b6..ca6a4d3f0 100644 --- a/contracts/contracts/l1/rollup/Rollup.sol +++ b/contracts/contracts/l1/rollup/Rollup.sol @@ -28,9 +28,33 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { bytes32 private constant EIP1967_PROXY_ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + /// @notice The number of entries in the per-batch storage ring. + /// @dev Batch `i` uses entry `i % BATCH_RING_SIZE`, so committing a batch overwrites the entry of the + /// batch committed `BATCH_RING_SIZE` batches earlier instead of occupying new storage slots. + /// At most `BATCH_RING_SIZE - 1` batches can therefore await finalization at the same time. + /// `challengeState` rewrites one slot per unfinalized batch and has to fit in one transaction + /// (about 1,260 batches at the Amsterdam gas schedule), which bounds this value from above. + /// Changing it remaps every entry and needs a new cutover. + uint256 public constant BATCH_RING_SIZE = 1024; + /// @notice The chain id of the corresponding layer 2 chain. uint64 public immutable LAYER_2_CHAIN_ID; + /*********** + * Structs * + ***********/ + + /// @dev The data of a batch that is only needed until the batch is finalized. + /// @param data The batch data used by the challenge and finalization logic. + /// @param committedStateRoot The post state root of the batch. + /// @param blobVersionedHash The blob versioned hash of the batch, kept so a reverted batch can be + /// committed again without carrying the blob. + struct BatchRingEntry { + BatchData data; + bytes32 committedStateRoot; + bytes32 blobVersionedHash; + } + /************* * Variables * *************/ @@ -69,8 +93,9 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { /// @notice Store committed batch hash. mapping(uint256 batchIndex => bytes32 batchHash) public override committedBatches; - /// @notice Store committed batch base. - mapping(uint256 batchIndex => BatchData) public batchDataStore; + /// @dev Batch data of the batches below `batchRingStartIndex`, keyed by batch index and cleared on + /// finalization. Read the data of any batch through `batchDataStore(uint256)`. + mapping(uint256 batchIndex => BatchData) private _legacyBatchDataStore; /// @notice Store the withdrawalRoot. mapping(bytes32 withdrawalRoot => bool exist) public withdrawalRoots; @@ -96,21 +121,36 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { /// @notice prove remaining uint256 public proveRemaining; - /// @notice committedStateRoots - mapping(uint256 batchIndex => bytes32 stateRoot) public committedStateRoots; + /// @dev Committed state roots of the batches below `batchRingStartIndex`, keyed by batch index and + /// cleared on finalization. Read the root of any batch through `committedStateRoots(uint256)`. + mapping(uint256 batchIndex => bytes32 stateRoot) private _legacyCommittedStateRoots; /// @notice The delay period for permissionless batch submission. /// @dev After this period, anyone can submit batches if sequencers are offline or censoring. uint256 public rollupDelayPeriod; - /// @notice Store blob versioned hash per batch index. Preserved across revertBatch so recommit can reuse. + /// @dev Blob versioned hashes of the batches below `batchRingStartIndex`, keyed by batch index and + /// cleared on finalization. Preserved across revertBatch so recommit can reuse. + /// Read the hash of any batch through `batchBlobVersionedHashes(uint256)`. /// @dev Placed after rollupDelayPeriod for upgrade-safe storage layout (forward compatibility). - mapping(uint256 batchIndex => bytes32 blobVersionedHash) public batchBlobVersionedHashes; + mapping(uint256 batchIndex => bytes32 blobVersionedHash) private _legacyBatchBlobVersionedHashes; /// @inheritdoc IRollup /// @dev Appended to Rollup's own storage layout. This is an audit marker; transition safety relies on the cutover runbook. uint256 public override legacyCutoverBatchIndex; + /// @notice The first batch index whose per-batch data is kept in the storage ring. + /// @dev Zero until the ring is started. Batches below this index keep using the legacy mappings. + uint64 public batchRingStartIndex; + + /// @notice The highest batch index that has ever been reverted. + /// @dev A reverted batch keeps its blob versioned hash in storage until it is committed again. + uint64 public highestRevertedBatchIndex; + + /// @dev Per-batch data of the batches from `batchRingStartIndex` on, keyed by + /// `batchIndex % BATCH_RING_SIZE`. Entries are overwritten by later batches and never cleared. + mapping(uint256 ringIndex => BatchRingEntry) private _batchRing; + /********************** * Function Modifiers * **********************/ @@ -179,6 +219,9 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { finalizationPeriodSeconds = _finalizationPeriodSeconds; proofWindow = _proofWindow; proofRewardPercent = _proofRewardPercent; + // A new deployment keeps per-batch data in the ring from the first batch on. + // The genesis batch (index 0) uses the legacy mappings. + _startBatchRing(1); emit UpdateVerifier(address(0), _verifier); emit UpdateFinalizationPeriodSeconds(0, _finalizationPeriodSeconds); emit UpdateProofWindow(0, _proofWindow); @@ -189,8 +232,13 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { require(_getInitializedVersion() == 2, "must have initialized!"); require(_prevStateRoot != bytes32(0), "can not set state root with bytes32(0)!"); - if (committedStateRoots[lastCommittedBatchIndex] == bytes32(0)) { - committedStateRoots[lastCommittedBatchIndex] = _prevStateRoot; + // A batch kept in the storage ring always has its state root stored when it is committed. + uint256 _lastCommitted = lastCommittedBatchIndex; + if ( + !_inBatchRing(_lastCommitted, batchRingStartIndex) && + _legacyCommittedStateRoots[_lastCommitted] == bytes32(0) + ) { + _legacyCommittedStateRoots[_lastCommitted] = _prevStateRoot; } } @@ -218,6 +266,33 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { submitterContract = _newSubmitter; } + /// @notice One-time switch of an existing deployment to the per-batch storage ring. + /// @dev Called atomically through the existing ProxyAdmin upgradeAndCall flow. + /// Batches committed before the call keep their data in the legacy mappings until they are + /// finalized. Every later batch uses the ring. + function initialize5() external reinitializer(5) { + require(_msgSender() == _getProxyAdmin(), "only proxy admin"); + require(batchRingStartIndex == 0, "batch ring already started"); + + // This initializer makes initialize4 unusable. A deployment that still depends on the legacy + // staking contract, which does not answer the Submitter interface, must run initialize4 first. + try ISubmitter(submitterContract).isActive(address(0)) returns (bool) {} catch { + revert("submitter cutover required"); + } + + // A reverted batch that has not been committed again would move to the ring while the blob + // versioned hash needed to commit it again stays in the legacy mapping. + uint256 _startBatchIndex = lastCommittedBatchIndex + 1; + require(_legacyBatchBlobVersionedHashes[_startBatchIndex] == bytes32(0), "reverted batch awaits recommit"); + + // The first batch in the ring can only be committed while fewer than BATCH_RING_SIZE - 1 batches + // await finalization. Starting the ring with more would stop every commit until enough of them + // are finalized. + require(_startBatchIndex - lastFinalizedBatchIndex < BATCH_RING_SIZE, "too many unfinalized batches"); + + _startBatchRing(_startBatchIndex); + } + /************************ * Restricted Functions * ************************/ @@ -239,10 +314,13 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { require(BatchHeaderCodecV0.getBlobVersionedHash(memPtr) == ZERO_VERSIONED_HASH, "invalid versioned hash"); committedBatches[_batchIndex] = _batchHash; - batchDataStore[_batchIndex] = BatchData(block.timestamp, block.timestamp, 0, address(0)); - batchBlobVersionedHashes[_batchIndex] = BatchHeaderCodecV0.getBlobVersionedHash(memPtr); + _storeBatch( + _batchIndex, + _postStateRoot, + BatchHeaderCodecV0.getBlobVersionedHash(memPtr), + BatchData(block.timestamp, block.timestamp, 0, address(0)) + ); - committedStateRoots[_batchIndex] = _postStateRoot; finalizedStateRoots[_batchIndex] = _postStateRoot; lastCommittedBatchIndex = _batchIndex; lastFinalizedBatchIndex = _batchIndex; @@ -258,7 +336,7 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { // check if the next batch has a stored blob hash (uint256 _batchPtr, ) = _loadBatchHeader(batchDataInput.parentBatchHeader); uint256 _nextBatchIndex = BatchHeaderCodecV0.getBatchIndex(_batchPtr) + 1; - require(batchBlobVersionedHashes[_nextBatchIndex] == bytes32(0), "commitBatch requires no stored blob hash"); + require(_storedBlobVersionedHash(_nextBatchIndex) == bytes32(0), "commitBatch requires no stored blob hash"); if ( IL1MessageQueue(messageQueue).getFirstUnfinalizedMessageEnqueueTime() + rollupDelayPeriod < block.timestamp ) { @@ -276,13 +354,14 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { require(blobhash(0) == bytes32(0), "commitState must not carry blob"); (uint256 _batchPtr, ) = _loadBatchHeader(batchDataInput.parentBatchHeader); uint256 _nextBatchIndex = BatchHeaderCodecV0.getBatchIndex(_batchPtr) + 1; - require(batchBlobVersionedHashes[_nextBatchIndex] != bytes32(0), "no stored blob hash for this batch"); + bytes32 _blobVersionedHash = _storedBlobVersionedHash(_nextBatchIndex); + require(_blobVersionedHash != bytes32(0), "no stored blob hash for this batch"); if ( IL1MessageQueue(messageQueue).getFirstUnfinalizedMessageEnqueueTime() + rollupDelayPeriod < block.timestamp ) { require(batchDataInput.numL1Messages > 0, "l1msg delay"); } - _commitBatchWithBatchData(batchDataInput, _msgSender(), batchBlobVersionedHashes[_nextBatchIndex]); + _commitBatchWithBatchData(batchDataInput, _msgSender(), _blobVersionedHash); } function _commitBatchWithBatchData( @@ -311,7 +390,7 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { require(committedBatches[_batchIndex + 1] == bytes32(0), "batch already committed"); require(_batchIndex == lastCommittedBatchIndex, "incorrect batch index"); require(committedBatches[_batchIndex] == _parentBatchHash, "incorrect parent batch hash"); - require(committedStateRoots[_batchIndex] == batchDataInput.prevStateRoot, "incorrect previous state root"); + require(_committedStateRoot(_batchIndex) == batchDataInput.prevStateRoot, "incorrect previous state root"); uint256 _totalL1MessagesPoppedOverall = BatchHeaderCodecV0.getTotalL1MessagePopped(_batchPtr); // compute the data hash for batch @@ -355,19 +434,22 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { } committedBatches[_batchIndex] = BatchHeaderCodecV0.computeBatchHash(_batchPtr, _headerLength); - committedStateRoots[_batchIndex] = batchDataInput.postStateRoot; - batchBlobVersionedHashes[_batchIndex] = blobVersionedHash; uint256 proveRemainingTime = 0; if (inChallenge) { // Make the batch finalize time longer than the time required for the current challenge proveRemainingTime = proofWindow + challenges[batchChallenged].startTime - block.timestamp; } // storage batch data for challenge status check - batchDataStore[_batchIndex] = BatchData( - block.timestamp, - block.timestamp + finalizationPeriodSeconds + proveRemainingTime, - batchDataInput.lastBlockNumber, - submitter + _storeBatch( + _batchIndex, + batchDataInput.postStateRoot, + blobVersionedHash, + BatchData( + block.timestamp, + block.timestamp + finalizationPeriodSeconds + proveRemainingTime, + batchDataInput.lastBlockNumber, + submitter + ) ); lastCommittedBatchIndex = _batchIndex; @@ -386,8 +468,7 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { ) external override nonReqRevert whenNotPaused { // check delay timing - allow if EITHER batch submission OR L1 message processing is stalled // This enables permissionless batch submission when sequencers are offline or censoring - bool rollupDelay = batchDataStore[lastCommittedBatchIndex].originTimestamp + rollupDelayPeriod < - block.timestamp; + bool rollupDelay = _batchData(lastCommittedBatchIndex).originTimestamp + rollupDelayPeriod < block.timestamp; // Check if L1 message queue is delayed bool l1MsgQueueDelayed = IL1MessageQueue(messageQueue).getFirstUnfinalizedMessageEnqueueTime() + @@ -401,13 +482,14 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { // check if the next batch has a stored blob hash (uint256 _batchPtr, ) = _loadBatchHeader(batchDataInput.parentBatchHeader); uint256 _nextBatchIndex = BatchHeaderCodecV0.getBatchIndex(_batchPtr) + 1; - bytes32 _blobVersionedHash; - if (batchBlobVersionedHashes[_nextBatchIndex] != bytes32(0)) { + bytes32 _blobVersionedHash = _storedBlobVersionedHash(_nextBatchIndex); + if (_blobVersionedHash != bytes32(0)) { require(blobhash(0) == bytes32(0), "must not carry blob when using stored blob hash"); - _blobVersionedHash = batchBlobVersionedHashes[_nextBatchIndex]; } else { _blobVersionedHash = _computeBlobVersionedHash(batchDataInput.version); } + // A batch committed here has no submitter. In the storage ring the zero address clears the + // submitter slot of the entry, so the next batch that reuses the entry creates that slot again. _commitBatchWithBatchData(batchDataInput, address(0), _blobVersionedHash); // get batch data from batch header @@ -418,7 +500,7 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { require(committedBatches[_batchIndex] == _batchHash, "incorrect batch hash"); // Override finalizeTimestamp for ZKP-backed immediate finality - batchDataStore[_batchIndex].finalizeTimestamp = block.timestamp; + _batchData(_batchIndex).finalizeTimestamp = block.timestamp; // verify proof _verifyProof(memPtr, _batchProof); @@ -440,6 +522,13 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { // check finalization require(_batchIndex > lastFinalizedBatchIndex, "can only revert unFinalized batch"); + // The reverted batches keep their blob versioned hashes so they can be committed again. + // Record how far those hashes reach: nothing else tells them apart from older ring entries. + uint256 _lastCommitted = lastCommittedBatchIndex; + if (_lastCommitted > highestRevertedBatchIndex) { + highestRevertedBatchIndex = uint64(_lastCommitted); + } + lastCommittedBatchIndex = _batchIndex - 1; while (_count > 0) { emit RevertBatch(_batchIndex, _batchHash); @@ -486,9 +575,10 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { challenges[batchIndex] = BatchChallenge(batchIndex, _msgSender(), msg.value, block.timestamp, false, false); emit ChallengeState(batchIndex, _msgSender(), msg.value); + uint256 _ringStart = batchRingStartIndex; for (uint256 i = lastFinalizedBatchIndex + 1; i <= lastCommittedBatchIndex; i++) { if (i != batchIndex) { - batchDataStore[i].finalizeTimestamp += proofWindow; + _batchData(i, _ringStart).finalizeTimestamp += proofWindow; } } @@ -613,7 +703,7 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { if (challenges[_batchIndex].startTime + proofWindow <= block.timestamp) { // set status challenges[_batchIndex].challengeSuccess = true; - _challengerWin(_batchIndex, batchDataStore[_batchIndex].submitter, "Timeout"); + _challengerWin(_batchIndex, _batchData(_batchIndex).submitter, "Timeout"); } else { _verifyProof(memPtr, _batchProof); // Record defender win @@ -654,9 +744,13 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { BatchHeaderCodecV0.getL1MessagePopped(memPtr) ); - delete batchDataStore[_batchIndex - 1]; - delete committedStateRoots[_batchIndex - 1]; - delete batchBlobVersionedHashes[_batchIndex - 1]; + // Per-batch data in the ring stays in place so that a later batch can overwrite it. + // Only data in the legacy mappings is cleared. + if (!_inBatchRing(_batchIndex - 1, batchRingStartIndex)) { + delete _legacyBatchDataStore[_batchIndex - 1]; + delete _legacyCommittedStateRoots[_batchIndex - 1]; + delete _legacyBatchBlobVersionedHashes[_batchIndex - 1]; + } delete challenges[_batchIndex - 1]; emit FinalizeBatch( @@ -701,13 +795,56 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { /// @dev Public function to checks whether batch exists. /// @param batchIndex The index of the batch to be checked. function batchExist(uint256 batchIndex) public view returns (bool) { - return batchDataStore[batchIndex].originTimestamp > 0 && committedBatches[batchIndex] != bytes32(0); + uint256 _ringStart = batchRingStartIndex; + return + _hasBatchData(batchIndex, _ringStart) && + _batchData(batchIndex, _ringStart).originTimestamp > 0 && + committedBatches[batchIndex] != bytes32(0); } /// @dev Public function to checks whether the batch is in challengeWindow. /// @param batchIndex The index of the batch to be checked. function batchInsideChallengeWindow(uint256 batchIndex) public view returns (bool) { - return batchDataStore[batchIndex].finalizeTimestamp > block.timestamp; + uint256 _ringStart = batchRingStartIndex; + return + _hasBatchData(batchIndex, _ringStart) && + _batchData(batchIndex, _ringStart).finalizeTimestamp > block.timestamp; + } + + /// @notice Return the data stored for a batch. + /// @dev For a batch in the storage ring, all values are zero unless the batch is committed and not + /// older than the last finalized batch. A batch in the legacy mappings behaves as before the + /// ring: its data is deleted when the next batch is finalized, and the data of a reverted + /// batch is returned until the batch is committed again. + /// @param batchIndex The index of the batch. + function batchDataStore( + uint256 batchIndex + ) + external + view + returns (uint256 originTimestamp, uint256 finalizeTimestamp, uint256 blockNumber, address submitter) + { + uint256 _ringStart = batchRingStartIndex; + if (_hasBatchData(batchIndex, _ringStart)) { + BatchData storage _data = _batchData(batchIndex, _ringStart); + return (_data.originTimestamp, _data.finalizeTimestamp, _data.blockNumber, _data.submitter); + } + } + + /// @notice Return the post state root stored for a batch. + /// @dev Zero in the same cases in which `batchDataStore` returns zero values. + /// @param batchIndex The index of the batch. + function committedStateRoots(uint256 batchIndex) external view returns (bytes32 stateRoot) { + if (_hasBatchData(batchIndex, batchRingStartIndex)) { + return _committedStateRoot(batchIndex); + } + } + + /// @notice Return the blob versioned hash stored for a batch, or zero when there is none. + /// @dev The hash of a reverted batch stays stored until the batch is committed again. + /// @param batchIndex The index of the batch. + function batchBlobVersionedHashes(uint256 batchIndex) external view returns (bytes32 blobVersionedHash) { + return _storedBlobVersionedHash(batchIndex); } /// @dev proveCommittedBatchState verifies the ZK proof for a committed batch. @@ -733,6 +870,98 @@ contract Rollup is IRollup, OwnableUpgradeable, PausableUpgradeable { } } + /// @dev Keeps the per-batch data of every batch from `startBatchIndex` on in the storage ring. + function _startBatchRing(uint256 startBatchIndex) private { + batchRingStartIndex = uint64(startBatchIndex); + emit BatchRingStarted(startBatchIndex); + } + + /// @dev Whether the per-batch data of `batchIndex` is kept in the storage ring rather than in the + /// legacy mappings. + /// @param batchIndex The index of the batch. + /// @param ringStart The value of `batchRingStartIndex`. + function _inBatchRing(uint256 batchIndex, uint256 ringStart) private pure returns (bool) { + return ringStart != 0 && batchIndex >= ringStart; + } + + /// @dev Whether the stored batch data and state root of `batchIndex` may be reported. + /// Ring entries are never cleared, so an entry describes `batchIndex` only while that batch is + /// committed and not older than the last finalized batch. Data in the legacy mappings is + /// reported as it was before the ring: it is cleared on finalization, and the data of a + /// reverted batch stays in place until the batch is committed again. + /// @param batchIndex The index of the batch. + /// @param ringStart The value of `batchRingStartIndex`. + function _hasBatchData(uint256 batchIndex, uint256 ringStart) private view returns (bool) { + return + !_inBatchRing(batchIndex, ringStart) || + (batchIndex >= lastFinalizedBatchIndex && batchIndex <= lastCommittedBatchIndex); + } + + /// @dev The storage location of the batch data of `batchIndex`. + function _batchData(uint256 batchIndex) private view returns (BatchData storage) { + return _batchData(batchIndex, batchRingStartIndex); + } + + /// @dev Same as `_batchData(uint256)` for callers that have already loaded `batchRingStartIndex`. + function _batchData(uint256 batchIndex, uint256 ringStart) private view returns (BatchData storage) { + if (_inBatchRing(batchIndex, ringStart)) { + return _batchRing[batchIndex % BATCH_RING_SIZE].data; + } + return _legacyBatchDataStore[batchIndex]; + } + + /// @dev The post state root stored for `batchIndex`. + function _committedStateRoot(uint256 batchIndex) private view returns (bytes32) { + if (_inBatchRing(batchIndex, batchRingStartIndex)) { + return _batchRing[batchIndex % BATCH_RING_SIZE].committedStateRoot; + } + return _legacyCommittedStateRoots[batchIndex]; + } + + /// @dev The blob versioned hash stored for `batchIndex`, or zero when there is none. + /// A hash is stored when a batch is committed and stays stored after the batch is reverted, so + /// that the batch can be committed again without carrying the blob. + function _storedBlobVersionedHash(uint256 batchIndex) private view returns (bytes32) { + if (!_inBatchRing(batchIndex, batchRingStartIndex)) { + return _legacyBatchBlobVersionedHashes[batchIndex]; + } + // Ring entries are never cleared, so the entry may still hold the hash of an older batch. + // It holds the hash of `batchIndex` only if that batch has been committed (it may have been + // reverted since) and is not older than the last finalized batch. + uint256 _lastStored = lastCommittedBatchIndex; + uint256 _highestReverted = highestRevertedBatchIndex; + if (_highestReverted > _lastStored) { + _lastStored = _highestReverted; + } + if (batchIndex > _lastStored || batchIndex < lastFinalizedBatchIndex) { + return bytes32(0); + } + return _batchRing[batchIndex % BATCH_RING_SIZE].blobVersionedHash; + } + + /// @dev Stores the per-batch data of a newly committed batch. + function _storeBatch( + uint256 batchIndex, + bytes32 stateRoot, + bytes32 blobVersionedHash, + BatchData memory data + ) private { + if (_inBatchRing(batchIndex, batchRingStartIndex)) { + // The entry was last used by batch `batchIndex - BATCH_RING_SIZE`. It can only be overwritten + // once that batch is older than the last finalized batch, whose data is still read by the + // next commit. + require(batchIndex - lastFinalizedBatchIndex < BATCH_RING_SIZE, "batch ring full"); + BatchRingEntry storage _entry = _batchRing[batchIndex % BATCH_RING_SIZE]; + _entry.data = data; + _entry.committedStateRoot = stateRoot; + _entry.blobVersionedHash = blobVersionedHash; + } else { + _legacyBatchDataStore[batchIndex] = data; + _legacyCommittedStateRoots[batchIndex] = stateRoot; + _legacyBatchBlobVersionedHashes[batchIndex] = blobVersionedHash; + } + } + /// @dev Internal function to pop finalized l1 messages. /// @param totalL1MessagePopped The total number of L1 messages popped in all batches including current batch. /// @param l1MessagePopped The number of L1 messages popped in current batch. diff --git a/contracts/contracts/mock/MockLegacyL1Staking.sol b/contracts/contracts/mock/MockLegacyL1Staking.sol new file mode 100644 index 000000000..1103b9b7b --- /dev/null +++ b/contracts/contracts/mock/MockLegacyL1Staking.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT + +pragma solidity =0.8.24; + +/// @dev Stands for the legacy L1Staking contract in upgrade tests. Like L1Staking it reports the +/// Rollup it belongs to, and it has none of the functions of the Submitter. +contract MockLegacyL1Staking { + address public rollupContract; + + constructor(address _rollupContract) { + rollupContract = _rollupContract; + } +} diff --git a/contracts/contracts/test/Rollup.t.sol b/contracts/contracts/test/Rollup.t.sol index cf9458712..2a7034f2f 100644 --- a/contracts/contracts/test/Rollup.t.sol +++ b/contracts/contracts/test/Rollup.t.sol @@ -1378,6 +1378,8 @@ contract RollupSubmitterUpgradeTest is L1MessageBaseTest { function test_initialize4IsAtomicThroughProxyAdminAndRunsOnce() public { uint256 expectedCutoverBatchIndex = 7; Rollup nextImplementation = new Rollup(layer2ChainID); + // A deployment that has not gone through the Submitter cutover predates the batch ring too. + hevm.store(address(rollup), bytes32(BATCH_RING_STATE_SLOT), bytes32(0)); bytes32 batchDataBase = keccak256(abi.encode(uint256(0), BATCH_DATA_STORE_SLOT)); bytes32 legacyOwnerSlot = bytes32(uint256(batchDataBase) + 3); bytes32 legacyValue = bytes32(uint256(0xAABBCC)); diff --git a/contracts/contracts/test/RollupBatchRing.t.sol b/contracts/contracts/test/RollupBatchRing.t.sol new file mode 100644 index 000000000..553325d8b --- /dev/null +++ b/contracts/contracts/test/RollupBatchRing.t.sol @@ -0,0 +1,1155 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.24; + +import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +import {L1MessageBaseTest} from "./base/L1MessageBase.t.sol"; +import {IRollup} from "../l1/rollup/IRollup.sol"; +import {Rollup} from "../l1/rollup/Rollup.sol"; + +/// @dev Cheatcodes that the bundled forge-std and solmate interfaces do not declare. +interface RingTestCheats { + function blobhashes(bytes32[] calldata hashes) external; + + function snapshotState() external returns (uint256 snapshotId); + + function revertToState(uint256 snapshotId) external returns (bool success); +} + +/// @dev Shared helpers: a chain of V1 batches committed by `alice`, one L2 block and one blob per batch. +/// Every batch carries a different blob versioned hash, so a value left behind by an older batch +/// can be told apart from the value of the batch under test. +abstract contract RollupBatchRingBase is L1MessageBaseTest { + RingTestCheats internal constant cheats = RingTestCheats(address(uint160(uint256(keccak256("hevm cheat code"))))); + + /// @dev Number of reusable per-batch storage entries. + uint256 internal constant RING = BATCH_RING_SIZE; + /// @dev Legacy committed state roots, used by the batches below batchRingStartIndex. + uint256 internal constant LEGACY_COMMITTED_STATE_ROOTS_SLOT = 171; + bytes32 internal constant WITHDRAWAL_ROOT = bytes32(uint256(3)); + + bytes internal genesisHeader; + /// @dev Post state root and header hash of the current version of every batch, by batch index. + /// Headers are rebuilt from these on demand: storing them would exhaust the test gas limit. + mapping(uint256 batchIndex => bytes32 stateRoot) internal postRoots; + mapping(uint256 batchIndex => bytes32 headerHash) internal headerHashes; + + function setUp() public virtual override { + super.setUp(); + _registerAndStakeSubmitter(alice); + + bytes memory genesis = new bytes(249); + bytes32 genesisRoot = _root(0); + assembly { + mstore(add(genesis, add(0x20, 25)), 1) // dataHash + mstore(add(genesis, add(0x20, 57)), 0x010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014) + mstore(add(genesis, add(0x20, 121)), genesisRoot) // postStateHash + } + genesisHeader = genesis; + postRoots[0] = genesisRoot; + headerHashes[0] = keccak256(genesis); + hevm.prank(multisig); + rollup.importGenesisBatch(genesis); + } + + /// @dev Default post state root of batch `index`. + function _root(uint256 index) internal pure returns (bytes32) { + return bytes32(index + 1); + } + + /// @dev Versioned hash of the blob carried by the first commit of batch `index`. + function _blobHash(uint256 index) internal pure returns (bytes32) { + return bytes32((uint256(1) << 248) | index); + } + + function _setBlobHash(bytes32 blobHash) internal { + bytes32[] memory hashes = new bytes32[](blobHash == bytes32(0) ? 0 : 1); + if (blobHash != bytes32(0)) hashes[0] = blobHash; + cheats.blobhashes(hashes); + } + + function _input(uint256 index, bytes32 postStateRoot) internal view returns (IRollup.BatchDataInput memory) { + return + IRollup.BatchDataInput({ + version: 1, + parentBatchHeader: _headerOf(index - 1), + lastBlockNumber: uint64(index), + numL1Messages: 0, + prevStateRoot: postRoots[index - 1], + postStateRoot: postStateRoot, + withdrawalRoot: WITHDRAWAL_ROOT + }); + } + + /// @dev The header of the current version of batch `index`. + function _headerOf(uint256 index) internal view returns (bytes memory) { + if (index == 0) return genesisHeader; + return _buildHeader(index, postRoots[index]); + } + + /// @dev The V1 header the contract builds for `_input(index, postStateRoot)` and blob `_blobHash(index)`. + function _buildHeader(uint256 index, bytes32 postStateRoot) internal view returns (bytes memory header) { + bytes32 dataHash = _computeDataHash(uint64(index), 0); + bytes32 blobHash = _blobHash(index); + bytes32 prevStateRoot = postRoots[index - 1]; + bytes32 withdrawalRoot = WITHDRAWAL_ROOT; + bytes32 parentBatchHash = headerHashes[index - 1]; + header = new bytes(257); + assembly { + let p := add(header, 0x20) + mstore8(p, 1) // version + mstore(add(p, 1), shl(192, index)) // batchIndex, then zero l1MessagePopped and totalL1MessagePopped + mstore(add(p, 25), dataHash) + mstore(add(p, 57), blobHash) + mstore(add(p, 89), prevStateRoot) + mstore(add(p, 121), postStateRoot) + mstore(add(p, 153), withdrawalRoot) + mstore(add(p, 217), parentBatchHash) // sequencerSetVerifyHash at 185 stays zero + mstore(add(p, 225), or(shl(64, parentBatchHash), index)) // tail of parentBatchHash, then lastBlockNumber + } + } + + function _track(uint256 index, bytes32 postStateRoot) internal { + bytes32 headerHash = keccak256(_buildHeader(index, postStateRoot)); + headerHashes[index] = headerHash; + postRoots[index] = postStateRoot; + assertEq(rollup.committedBatches(index), headerHash, "unexpected batch hash"); + assertEq(rollup.lastCommittedBatchIndex(), index); + } + + function _commit(uint256 index) internal { + _commit(index, _root(index)); + } + + /// @dev Commits batch `index` with a blob. + function _commit(uint256 index, bytes32 postStateRoot) internal { + _commitAs(alice, index, postStateRoot); + } + + /// @dev Commits batch `index` with a blob, sent by the submitter `sender`. + function _commitAs(address sender, uint256 index, bytes32 postStateRoot) internal { + IRollup.BatchDataInput memory input = _input(index, postStateRoot); + _setBlobHash(_blobHash(index)); + hevm.prank(sender); + rollup.commitBatch(input); + _track(index, postStateRoot); + } + + /// @dev Commits batch `index` again after a revert, without a blob. + function _commitState(uint256 index, bytes32 postStateRoot) internal { + IRollup.BatchDataInput memory input = _input(index, postStateRoot); + _setBlobHash(bytes32(0)); + hevm.prank(alice); + rollup.commitState(input); + _track(index, postStateRoot); + } + + function _finalize(uint256 index) internal { + (, uint256 finalizeTimestamp, , ) = rollup.batchDataStore(index); + if (finalizeTimestamp > block.timestamp) { + hevm.warp(finalizeTimestamp); + } + rollup.finalizeBatch(_headerOf(index)); + assertEq(rollup.lastFinalizedBatchIndex(), index); + } + + /// @dev Commits and finalizes every batch in [from, to], one at a time. + function _commitAndFinalize(uint256 from, uint256 to) internal { + for (uint256 i = from; i <= to; i++) { + uint256 memoryMark = _memoryMark(); + _commit(i); + _finalize(i); + _releaseMemory(memoryMark); + } + } + + /// @dev Long loops would otherwise spend most of the test gas limit on memory expansion: memory + /// allocated in an iteration is released by restoring the free memory pointer afterwards. + /// Nothing allocated between the two calls may be used after the release. + function _memoryMark() internal pure returns (uint256 mark) { + assembly { + mark := mload(0x40) + } + } + + function _releaseMemory(uint256 mark) internal pure { + assembly { + mstore(0x40, mark) + } + } + + /// @dev Reverts every batch from `index` up to the last committed one. + function _revertFrom(uint256 index) internal { + uint256 count = rollup.lastCommittedBatchIndex() - index + 1; + hevm.prank(multisig); + rollup.revertBatch(_headerOf(index), count); + assertEq(rollup.lastCommittedBatchIndex(), index - 1); + } + + function _assertNoBatchData(uint256 index) internal { + (uint256 originTimestamp, uint256 finalizeTimestamp, uint256 blockNumber, address batchSubmitter) = rollup + .batchDataStore(index); + assertEq(originTimestamp, 0, "originTimestamp"); + assertEq(finalizeTimestamp, 0, "finalizeTimestamp"); + assertEq(blockNumber, 0, "blockNumber"); + assertEq(batchSubmitter, address(0), "submitter"); + assertEq(rollup.committedStateRoots(index), bytes32(0), "committedStateRoots"); + assertFalse(rollup.batchExist(index)); + assertFalse(rollup.batchInsideChallengeWindow(index)); + } + + function _assertBatchData(uint256 index) internal { + (uint256 originTimestamp, uint256 finalizeTimestamp, uint256 blockNumber, address batchSubmitter) = rollup + .batchDataStore(index); + assertGt(originTimestamp, 0, "originTimestamp"); + assertGe(finalizeTimestamp, originTimestamp + finalizationPeriodSeconds, "finalizeTimestamp"); + assertEq(blockNumber, index, "blockNumber"); + assertEq(batchSubmitter, alice, "submitter"); + assertEq(rollup.committedStateRoots(index), postRoots[index], "committedStateRoots"); + assertEq(rollup.batchBlobVersionedHashes(index), _blobHash(index), "batchBlobVersionedHashes"); + assertTrue(rollup.batchExist(index)); + } + + /// @dev Executes `data` on the rollup as `sender` and reports how many of its storage slots + /// went from zero to non-zero (`created`) and from non-zero to zero (`cleared`). + function _slotChanges(address sender, bytes memory data) internal returns (uint256 created, uint256 cleared) { + uint256 snapshot = cheats.snapshotState(); + hevm.record(); + _call(sender, data); + (, bytes32[] memory writes) = hevm.accesses(address(rollup)); + bytes32[] memory post = new bytes32[](writes.length); + for (uint256 i = 0; i < writes.length; i++) { + post[i] = hevm.load(address(rollup), writes[i]); + } + + cheats.revertToState(snapshot); + for (uint256 i = 0; i < writes.length; i++) { + bool seen = false; + for (uint256 j = 0; j < i; j++) { + seen = seen || writes[j] == writes[i]; + } + if (seen) continue; + bytes32 pre = hevm.load(address(rollup), writes[i]); + if (pre == bytes32(0) && post[i] != bytes32(0)) created++; + if (pre != bytes32(0) && post[i] == bytes32(0)) cleared++; + } + + _call(sender, data); + } + + function _call(address sender, bytes memory data) private { + hevm.prank(sender); + (bool success, bytes memory returndata) = address(rollup).call(data); + if (!success) { + assembly { + revert(add(returndata, 0x20), mload(returndata)) + } + } + } +} + +/// @dev Per-batch bookkeeping (batch data, committed state root, blob versioned hash) lives in a ring +/// of `RING` reusable entries, so that steady-state commits rewrite storage instead of creating it. +contract RollupBatchRingTest is RollupBatchRingBase { + function test_initialize_startsTheRingAtTheFirstBatch() public { + assertEq(rollup.batchRingStartIndex(), 1); + assertEq(rollup.BATCH_RING_SIZE(), RING); + assertEq(rollup.highestRevertedBatchIndex(), 0); + } + + /*////////////////////////////////////////////////////////////// + Storage reuse + //////////////////////////////////////////////////////////////*/ + + function test_commitBatch_afterOneLap_createsOnlyTheBatchHashSlot() public { + _commitAndFinalize(1, RING); + + uint256 index = RING + 1; + _setBlobHash(_blobHash(index)); + (uint256 created, uint256 cleared) = _slotChanges( + alice, + abi.encodeCall(IRollup.commitBatch, (_input(index, _root(index)))) + ); + _track(index, _root(index)); + + assertEq(created, 1, "only committedBatches[index] may occupy a new slot"); + assertEq(cleared, 0); + } + + function test_finalizeBatch_doesNotClearPerBatchData() public { + _commitAndFinalize(1, 2); + _commit(3); + hevm.warp(block.timestamp + finalizationPeriodSeconds); + + (uint256 created, uint256 cleared) = _slotChanges( + address(this), + abi.encodeWithSignature("finalizeBatch(bytes)", _headerOf(3)) + ); + + assertEq(rollup.lastFinalizedBatchIndex(), 3); + assertEq(cleared, 0, "entries of batch 2 must stay in place for reuse"); + assertEq(created, 1, "only finalizedStateRoots[3] may occupy a new slot"); + } + + /*////////////////////////////////////////////////////////////// + Capacity + //////////////////////////////////////////////////////////////*/ + + function test_commitBatch_revertsWhenEveryEntryIsStillNeeded() public { + // Entries of the last finalized batch (genesis) and of batches 1..RING-1 are all still needed. + for (uint256 i = 1; i < RING; i++) { + uint256 memoryMark = _memoryMark(); + _commit(i); + _releaseMemory(memoryMark); + } + + IRollup.BatchDataInput memory input = _input(RING, _root(RING)); + _setBlobHash(_blobHash(RING)); + hevm.prank(alice); + hevm.expectRevert("batch ring full"); + rollup.commitBatch(input); + + // Reverting batches releases nothing for good: they have to be committed again one by one, + // with the blobs they were first committed with. + _revertFrom(RING - 3); + for (uint256 i = RING - 3; i < RING; i++) { + _commitState(i, bytes32(uint256(0xa000) + i)); + } + input = _input(RING, _root(RING)); + _setBlobHash(_blobHash(RING)); + hevm.prank(alice); + hevm.expectRevert("batch ring full"); + rollup.commitBatch(input); + + // Finalizing one batch releases one entry. + _finalize(1); + _commit(RING); + } + + function test_commitBatch_capacityFollowsTheLastFinalizedBatch() public { + _commitAndFinalize(1, 5); + uint256 last = 5 + RING - 1; + for (uint256 i = 6; i <= last; i++) { + uint256 memoryMark = _memoryMark(); + _commit(i); + _releaseMemory(memoryMark); + } + + // Every entry now describes a different batch: the last finalized one and RING - 1 unfinalized ones. + _assertBatchData(5); + _assertBatchData(6); + _assertBatchData(last); + + IRollup.BatchDataInput memory input = _input(last + 1, _root(last + 1)); + _setBlobHash(_blobHash(last + 1)); + hevm.prank(alice); + hevm.expectRevert("batch ring full"); + rollup.commitBatch(input); + + // The permissionless path is bound by the same capacity. + _setupDelayAndWarpForProof(); + _mockVerifierForProof(); + bytes memory header = _buildHeader(last + 1, _root(last + 1)); + hevm.prank(bob); + hevm.expectRevert("batch ring full"); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + } + + function test_commitBatchWithProof_fullRing_goesThroughOnceAnyoneFinalizesABatch() public { + for (uint256 i = 1; i < RING; i++) { + uint256 memoryMark = _memoryMark(); + _commit(i); + _releaseMemory(memoryMark); + } + _setupDelayAndWarpForProof(); + _mockVerifierForProof(); + + IRollup.BatchDataInput memory input = _input(RING, _root(RING)); + bytes memory header = _buildHeader(RING, _root(RING)); + _setBlobHash(_blobHash(RING)); + hevm.prank(bob); + hevm.expectRevert("batch ring full"); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + + // finalizeBatch is open to anyone: once the window of the oldest batch has passed, the account + // that commits with a proof can make room itself. bob is not a submitter. + assertFalse(submitter.isActive(bob)); + assertFalse(rollup.batchInsideChallengeWindow(1)); + hevm.prank(bob); + rollup.finalizeBatch(_headerOf(1)); + assertEq(rollup.lastFinalizedBatchIndex(), 1); + + _setBlobHash(_blobHash(RING)); + hevm.prank(bob); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + _track(RING, _root(RING)); + } + + /*////////////////////////////////////////////////////////////// + Views + //////////////////////////////////////////////////////////////*/ + + function test_views_returnDataOfUnfinalizedAndLastFinalizedBatches() public { + _commitAndFinalize(1, 2); + _commit(3); + _commit(4); + + _assertBatchData(2); + _assertBatchData(3); + _assertBatchData(4); + assertFalse(rollup.batchInsideChallengeWindow(2)); + assertTrue(rollup.batchInsideChallengeWindow(3)); + assertTrue(rollup.batchInsideChallengeWindow(4)); + } + + function test_views_returnNothingForBatchesOlderThanTheLastFinalized() public { + _commitAndFinalize(1, 3); + + // Like the data that used to be deleted when the next batch was finalized. + _assertNoBatchData(1); + _assertNoBatchData(2); + assertEq(rollup.batchBlobVersionedHashes(1), bytes32(0)); + assertEq(rollup.batchBlobVersionedHashes(2), bytes32(0)); + _assertBatchData(3); + } + + function test_views_afterOneLap_ignoreEntriesOfOtherBatches() public { + _commitAndFinalize(1, RING + 2); + _commit(RING + 3); + + // Not committed yet: its entry still holds the data of batch 4. + _assertNoBatchData(RING + 4); + assertEq(rollup.batchBlobVersionedHashes(RING + 4), bytes32(0)); + // Finalized long ago: its entry now holds the data of batch RING + 3. + _assertNoBatchData(3); + assertEq(rollup.batchBlobVersionedHashes(3), bytes32(0)); + + _assertBatchData(RING + 2); + _assertBatchData(RING + 3); + } + + function test_views_returnOnlyTheBlobHashForRevertedBatches() public { + _commitAndFinalize(1, 1); + _commit(2); + _commit(3); + _revertFrom(2); + + _assertNoBatchData(2); + _assertNoBatchData(3); + assertEq(rollup.batchBlobVersionedHashes(2), _blobHash(2)); + assertEq(rollup.batchBlobVersionedHashes(3), _blobHash(3)); + assertEq(rollup.batchBlobVersionedHashes(4), bytes32(0)); + assertEq(rollup.highestRevertedBatchIndex(), 3); + } + + /*////////////////////////////////////////////////////////////// + Revert and commit again + //////////////////////////////////////////////////////////////*/ + + function test_commitState_afterRevert_reusesTheStoredBlobHash() public { + _commitAndFinalize(1, 1); + _commit(2); + _commit(3); + _revertFrom(2); + + // A reverted batch must be committed again with the blob it was first committed with. + IRollup.BatchDataInput memory input = _input(2, bytes32(uint256(0xbeef))); + _setBlobHash(bytes32(uint256(0xdead))); + hevm.prank(alice); + hevm.expectRevert("commitBatch requires no stored blob hash"); + rollup.commitBatch(input); + + // `_track` checks that the batch hash covers the blob hash of the first commit. + _commitState(2, bytes32(uint256(0xbeef))); + _commitState(3, bytes32(uint256(0xcafe))); + _assertBatchData(2); + _assertBatchData(3); + + // Batch 4 has never been committed. + input = _input(4, _root(4)); + _setBlobHash(bytes32(0)); + hevm.prank(alice); + hevm.expectRevert("no stored blob hash for this batch"); + rollup.commitState(input); + _commit(4); + + _finalize(2); + _finalize(3); + _finalize(4); + } + + function test_commitState_afterOneLap_ignoresTheBlobHashOfAnOlderBatch() public { + _commitAndFinalize(1, RING); + _commit(RING + 1); + _commit(RING + 2); + _commit(RING + 3); + _revertFrom(RING + 2); + assertEq(rollup.highestRevertedBatchIndex(), RING + 3); + + _commitState(RING + 2, bytes32(uint256(0xbeef))); + _commitState(RING + 3, bytes32(uint256(0xcafe))); + + // The entry of batch RING + 4 still holds the blob hash of batch 4. + IRollup.BatchDataInput memory input = _input(RING + 4, _root(RING + 4)); + _setBlobHash(bytes32(0)); + hevm.prank(alice); + hevm.expectRevert("no stored blob hash for this batch"); + rollup.commitState(input); + _commit(RING + 4); + + for (uint256 i = RING + 1; i <= RING + 4; i++) { + _finalize(i); + } + } + + /*////////////////////////////////////////////////////////////// + Challenge and permissionless commit + //////////////////////////////////////////////////////////////*/ + + function test_challengeState_afterOneLap_extendsOnlyTheOtherUnfinalizedBatches() public { + _commitAndFinalize(1, RING); + _commit(RING + 1); + _commit(RING + 2); + _commit(RING + 3); + uint256[4] memory before; + for (uint256 i = 0; i < 4; i++) { + (, before[i], , ) = rollup.batchDataStore(RING + i); + } + + hevm.deal(bob, CHALLENGE_DEPOSIT); + bytes32 batchHash = rollup.committedBatches(RING + 2); + hevm.prank(bob); + rollup.challengeState{value: CHALLENGE_DEPOSIT}(uint64(RING + 2), batchHash); + + for (uint256 i = 0; i < 4; i++) { + (, uint256 finalizeTimestamp, , ) = rollup.batchDataStore(RING + i); + // The last finalized batch (RING) and the challenged batch (RING + 2) keep their time. + assertEq(finalizeTimestamp, i == 1 || i == 3 ? before[i] + proofWindow : before[i]); + } + + // The prover misses the proof window: the submitter recorded for the batch is slashed. + hevm.warp(block.timestamp + proofWindow + 1); + hevm.prank(alice); + rollup.proveState(_headerOf(RING + 2), hex"deadbeef"); + assertEq(rollup.revertReqIndex(), RING + 2); + assertEq(submitter.stakeOf(alice), 0); + + _revertFrom(RING + 2); + assertEq(rollup.revertReqIndex(), 0); + _assertBatchData(RING + 1); + _assertNoBatchData(RING + 2); + _assertNoBatchData(RING + 3); + } + + function test_challengeState_handlesAFullRing() public { + for (uint256 i = 1; i < RING; i++) { + uint256 memoryMark = _memoryMark(); + _commit(i); + _releaseMemory(memoryMark); + } + (, uint256 firstBefore, , ) = rollup.batchDataStore(1); + (, uint256 lastBefore, , ) = rollup.batchDataStore(RING - 1); + + hevm.deal(bob, CHALLENGE_DEPOSIT); + bytes32 batchHash = rollup.committedBatches(2); + hevm.record(); + hevm.prank(bob); + rollup.challengeState{value: CHALLENGE_DEPOSIT}(2, batchHash); + (, bytes32[] memory writes) = hevm.accesses(address(rollup)); + + // The call writes one finalizeTimestamp per unfinalized batch other than the challenged one, + // the challenge (4 slots), batchChallenged and inChallenge. The ring bounds that number, which + // is what keeps the call under the per-transaction gas limit (EIP-7825, 16,777,216 gas) once a + // rewritten slot costs 12,100 gas (EIP-8038): about 13.6M gas for this call. + assertEq(writes.length, (RING - 2) + 6); + + (, uint256 finalizeTimestamp, , ) = rollup.batchDataStore(1); + assertEq(finalizeTimestamp, firstBefore + proofWindow); + (, finalizeTimestamp, , ) = rollup.batchDataStore(RING - 1); + assertEq(finalizeTimestamp, lastBefore + proofWindow); + } + + function test_commitBatchWithProof_afterOneLap_canBeFinalizedAtOnce() public { + _commitAndFinalize(1, RING); + _setupDelayAndWarpForProof(); + _mockVerifierForProof(); + + uint256 index = RING + 1; + IRollup.BatchDataInput memory input = _input(index, _root(index)); + bytes memory header = _buildHeader(index, _root(index)); + _setBlobHash(_blobHash(index)); + hevm.prank(bob); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + _track(index, _root(index)); + + (uint256 originTimestamp, uint256 finalizeTimestamp, uint256 blockNumber, address batchSubmitter) = rollup + .batchDataStore(index); + assertEq(originTimestamp, block.timestamp); + assertEq(finalizeTimestamp, block.timestamp); + assertEq(blockNumber, index); + assertEq(batchSubmitter, address(0)); + assertFalse(rollup.batchInsideChallengeWindow(index)); + + rollup.finalizeBatch(_headerOf(index)); + assertEq(rollup.lastFinalizedBatchIndex(), index); + } + + function test_commitBatchWithProof_afterOneLap_commitsARevertedBatchAgain() public { + _commitAndFinalize(1, RING); + _commit(RING + 1); + _commit(RING + 2); + _revertFrom(RING + 1); + _setupDelayAndWarpForProof(); + _mockVerifierForProof(); + + // The blob versioned hash of the first commit is still stored, so the blob is not sent again. + uint256 index = RING + 1; + bytes32 postStateRoot = bytes32(uint256(0xbeef)); + IRollup.BatchDataInput memory input = _input(index, postStateRoot); + bytes memory header = _buildHeader(index, postStateRoot); + _setBlobHash(_blobHash(index)); + hevm.prank(bob); + hevm.expectRevert("must not carry blob when using stored blob hash"); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + + _setBlobHash(bytes32(0)); + hevm.prank(bob); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + // `_track` checks that the batch hash covers the blob hash of the first commit. + _track(index, postStateRoot); + assertEq(rollup.batchBlobVersionedHashes(index), _blobHash(index)); + (, uint256 finalizeTimestamp, , address batchSubmitter) = rollup.batchDataStore(index); + assertEq(finalizeTimestamp, block.timestamp); + assertEq(batchSubmitter, address(0)); + + // The hash of the other reverted batch is still stored as well. + _commitState(RING + 2, bytes32(uint256(0xcafe))); + _finalize(RING + 1); + _finalize(RING + 2); + } + + function test_proveState_afterOneLap_slashesTheSubmitterOfTheChallengedBatch() public { + // Every entry is first used by a batch from alice. + _commitAndFinalize(1, RING); + _registerAndStakeSubmitter(alice1); + uint256 index = RING + 1; + _commitAs(alice1, index, _root(index)); + (, , , address batchSubmitter) = rollup.batchDataStore(index); + assertEq(batchSubmitter, alice1); + + hevm.deal(bob, CHALLENGE_DEPOSIT); + bytes32 batchHash = rollup.committedBatches(index); + hevm.prank(bob); + rollup.challengeState{value: CHALLENGE_DEPOSIT}(uint64(index), batchHash); + + // Nobody proves the batch in time. + hevm.warp(block.timestamp + proofWindow + 1); + hevm.prank(alice); + rollup.proveState(_headerOf(index), hex"deadbeef"); + + assertEq(rollup.revertReqIndex(), index); + assertEq(submitter.stakeOf(alice1), 0, "the submitter of the challenged batch is slashed"); + assertEq(submitter.stakeOf(alice), STAKING_VALUE, "the submitter that used the entry before is not"); + assertTrue(submitter.isActive(alice)); + } + + /*////////////////////////////////////////////////////////////// + initialize2 + //////////////////////////////////////////////////////////////*/ + + function test_initialize2_leavesABatchInTheRingAlone() public { + _commit(1); + + rollup.initialize2(bytes32(uint256(0xdead))); + + assertEq(rollup.committedStateRoots(1), _root(1)); + // The state root of a batch in the ring is stored when the batch is committed. Nothing is + // written to the legacy mapping for it. + bytes32 legacySlot = keccak256(abi.encode(uint256(1), LEGACY_COMMITTED_STATE_ROOTS_SLOT)); + assertEq(hevm.load(address(rollup), legacySlot), bytes32(0)); + } +} + +/// @dev `initialize2` on a deployment whose last committed batch is kept in the legacy mappings. +contract RollupInitialize2Test is L1MessageBaseTest { + function test_initialize2_setsTheStateRootBeforeTheGenesisBatchIsImported() public { + rollup.initialize2(bytes32(uint256(7))); + + assertEq(rollup.committedStateRoots(0), bytes32(uint256(7))); + } + + function test_initialize2_keepsTheStateRootOfTheGenesisBatch() public { + bytes memory genesis = new bytes(249); + assembly { + mstore(add(genesis, add(0x20, 25)), 1) // dataHash + mstore(add(genesis, add(0x20, 57)), 0x010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014) + mstore(add(genesis, add(0x20, 121)), 5) // postStateHash + } + hevm.prank(multisig); + rollup.importGenesisBatch(genesis); + + // The order used by the deployment scripts. + rollup.initialize2(bytes32(uint256(7))); + + assertEq(rollup.committedStateRoots(0), bytes32(uint256(5))); + } +} + +/// @dev A random sequence of commit, finalize, revert and commit again that crosses from the first lap +/// of the ring into the second. After every step the views must report what the per-index +/// bookkeeping used to report: batch data for the batches from the last finalized to the last +/// committed one, and the blob versioned hash of every batch that has been committed and is not +/// older than the last finalized one. +contract RollupBatchRingRandomWalkTest is RollupBatchRingBase { + /// @dev The highest batch index committed so far. Reverts do not lower it. + uint256 internal highestCommitted; + uint256 internal seed = 20261201; + + function _rand(uint256 n) internal returns (uint256) { + seed = uint256(keccak256(abi.encode(seed))); + return seed % n; + } + + function _commitNext(uint256 step) internal { + uint256 next = rollup.lastCommittedBatchIndex() + 1; + if (next <= highestCommitted) { + _commitState(next, keccak256(abi.encode(next, step))); + } else { + _commit(next); + highestCommitted = next; + } + } + + function _check(uint256 index) internal { + if (index == 0) return; // the genesis batch has no submitter and no L2 block + uint256 finalized = rollup.lastFinalizedBatchIndex(); + if (index >= finalized && index <= rollup.lastCommittedBatchIndex()) { + _assertBatchData(index); + } else { + _assertNoBatchData(index); + assertEq( + rollup.batchBlobVersionedHashes(index), + index >= finalized && index <= highestCommitted ? _blobHash(index) : bytes32(0), + "batchBlobVersionedHashes" + ); + } + } + + function test_randomWalk_viewsMatchPerIndexBookkeeping() public { + // Getting to the end of the first lap takes about half of the test gas limit. + _commitAndFinalize(1, RING - 20); + highestCommitted = RING - 20; + + for (uint256 step = 0; step < 520; step++) { + uint256 memoryMark = _memoryMark(); + uint256 committed = rollup.lastCommittedBatchIndex(); + uint256 finalized = rollup.lastFinalizedBatchIndex(); + uint256 action = _rand(100); + if (action < 8 && committed > finalized) { + uint256 count = 1 + _rand(4); + if (count > committed - finalized) count = committed - finalized; + _revertFrom(committed - count + 1); + } else if (committed == finalized || (action < 56 && committed - finalized < 40)) { + _commitNext(step); + } else { + _finalize(finalized + 1); + } + + // Every view call costs test gas, so each step checks the batches at the two ends of the + // committed range plus one more batch, which rotates over the remaining interesting ones. + committed = rollup.lastCommittedBatchIndex(); + finalized = rollup.lastFinalizedBatchIndex(); + _check(finalized - 1); + _check(committed); + _check(committed + 1); + if (step % 6 == 0) _check(finalized); + if (step % 6 == 1) _check(highestCommitted); + if (step % 6 == 2) _check(highestCommitted + 1); + // Batches that share a ring entry with a batch checked above. + if (step % 6 == 3) _check(finalized - 1 + RING); + if (step % 6 == 4 && committed > RING) _check(committed - RING); + if (step % 6 == 5 && committed + 1 > RING) _check(committed + 1 - RING); + _releaseMemory(memoryMark); + } + + assertGt(rollup.lastFinalizedBatchIndex(), RING + 100, "the walk must go well into the second lap"); + assertGt(rollup.highestRevertedBatchIndex(), RING + 100, "the walk must revert batches on the second lap"); + } +} + +/// @dev An existing deployment keeps the per-batch data of its committed batches in the legacy mappings. +/// `initialize5` moves every later batch to the ring. +contract RollupBatchRingCutoverTest is RollupBatchRingBase { + function setUp() public virtual override { + super.setUp(); + _useLegacyBatchStorage(); + } + + function _upgradeAndCall(bytes memory initializer) internal { + Rollup nextImplementation = new Rollup(layer2ChainID); + hevm.prank(multisig); + proxyAdmin.upgradeAndCall( + ITransparentUpgradeableProxy(payable(address(rollup))), + address(nextImplementation), + initializer + ); + } + + function _startRing() internal { + _upgradeAndCall(abi.encodeCall(Rollup.initialize5, ())); + } + + /*////////////////////////////////////////////////////////////// + initialize5 + //////////////////////////////////////////////////////////////*/ + + function test_initialize5_startsTheRingAfterTheLastCommittedBatch() public { + _commitAndFinalize(1, 1); + _commit(2); + _commit(3); + + hevm.expectEmit(true, false, false, true); + emit IRollup.BatchRingStarted(4); + _startRing(); + + assertEq(rollup.batchRingStartIndex(), 4); + assertEq(rollup.lastCommittedBatchIndex(), 3); + assertEq(rollup.lastFinalizedBatchIndex(), 1); + _assertBatchData(1); + _assertBatchData(2); + _assertBatchData(3); + } + + function test_initialize5_revertsUnlessCalledThroughTheProxyAdmin() public { + Rollup nextImplementation = new Rollup(layer2ChainID); + hevm.prank(multisig); + proxyAdmin.upgrade(ITransparentUpgradeableProxy(payable(address(rollup))), address(nextImplementation)); + + hevm.prank(alice); + hevm.expectRevert("only proxy admin"); + rollup.initialize5(); + + hevm.prank(multisig); + hevm.expectRevert("only proxy admin"); + rollup.initialize5(); + + assertEq(rollup.batchRingStartIndex(), 0); + } + + function test_initialize5_revertsWhenTheRingIsAlreadyStarted() public { + // A new deployment starts the ring in `initialize`. + hevm.store(address(rollup), bytes32(BATCH_RING_STATE_SLOT), bytes32(uint256(1))); + + Rollup nextImplementation = new Rollup(layer2ChainID); + hevm.prank(multisig); + hevm.expectRevert("batch ring already started"); + proxyAdmin.upgradeAndCall( + ITransparentUpgradeableProxy(payable(address(rollup))), + address(nextImplementation), + abi.encodeCall(Rollup.initialize5, ()) + ); + } + + function test_initialize5_revertsBeforeTheSubmitterCutover() public { + // A deployment that has not run initialize4 still has the legacy staking contract in this slot, + // which does not answer the Submitter interface. Running initialize5 first would make + // initialize4 impossible. + uint256 submitterContractSlot = 151; + hevm.store(address(rollup), bytes32(submitterContractSlot), bytes32(uint256(uint160(address(emptyContract))))); + + Rollup nextImplementation = new Rollup(layer2ChainID); + hevm.prank(multisig); + hevm.expectRevert("submitter cutover required"); + proxyAdmin.upgradeAndCall( + ITransparentUpgradeableProxy(payable(address(rollup))), + address(nextImplementation), + abi.encodeCall(Rollup.initialize5, ()) + ); + } + + function test_initialize5_revertsWhileARevertedBatchAwaitsRecommit() public { + _commit(1); + _commit(2); + _revertFrom(2); + + // Batch 2 would move to the ring, but its blob hash is in the legacy mapping. + Rollup nextImplementation = new Rollup(layer2ChainID); + hevm.prank(multisig); + hevm.expectRevert("reverted batch awaits recommit"); + proxyAdmin.upgradeAndCall( + ITransparentUpgradeableProxy(payable(address(rollup))), + address(nextImplementation), + abi.encodeCall(Rollup.initialize5, ()) + ); + + _commitState(2, bytes32(uint256(0xbeef))); + _startRing(); + assertEq(rollup.batchRingStartIndex(), 3); + + // The revert before the ring was started has left highestRevertedBatchIndex at 2. + assertEq(rollup.highestRevertedBatchIndex(), 2); + assertEq(rollup.batchBlobVersionedHashes(3), bytes32(0)); + _commit(3); + for (uint256 i = 1; i <= 3; i++) { + _assertBatchData(i); + _finalize(i); + } + } + + function test_initialize5_revertsWhileTooManyBatchesAwaitFinalization() public { + for (uint256 i = 1; i < RING; i++) { + uint256 memoryMark = _memoryMark(); + _commit(i); + _releaseMemory(memoryMark); + } + + // With RING - 1 unfinalized batches the first batch in the ring could not be committed: + // starting the ring would stop every commit until a batch is finalized. + Rollup nextImplementation = new Rollup(layer2ChainID); + hevm.prank(multisig); + hevm.expectRevert("too many unfinalized batches"); + proxyAdmin.upgradeAndCall( + ITransparentUpgradeableProxy(payable(address(rollup))), + address(nextImplementation), + abi.encodeCall(Rollup.initialize5, ()) + ); + assertEq(rollup.batchRingStartIndex(), 0); + + // One finalized batch makes room for it. + _finalize(1); + _startRing(); + assertEq(rollup.batchRingStartIndex(), RING); + _commit(RING); + _assertBatchData(RING); + } + + function test_initialize5_runsOnce() public { + _startRing(); + + Rollup nextImplementation = new Rollup(layer2ChainID); + hevm.prank(multisig); + hevm.expectRevert("Initializable: contract is already initialized"); + proxyAdmin.upgradeAndCall( + ITransparentUpgradeableProxy(payable(address(rollup))), + address(nextImplementation), + abi.encodeCall(Rollup.initialize5, ()) + ); + } + + /*////////////////////////////////////////////////////////////// + Batches on both sides of the cutover + //////////////////////////////////////////////////////////////*/ + + function test_cutover_batchesCommittedBeforeItAreFinalizedAsBefore() public { + _commit(1); + _commit(2); + _commit(3); + _startRing(); + // The parent of the first batch in the ring is in the legacy mappings. + _commit(4); + _commit(5); + for (uint256 i = 1; i <= 5; i++) { + _assertBatchData(i); + } + + _finalize(1); + _finalize(2); + hevm.warp(block.timestamp + finalizationPeriodSeconds); + + // Finalizing batch 3 and 4 deletes the legacy data of batch 2 and 3. + (, uint256 cleared) = _slotChanges( + address(this), + abi.encodeWithSignature("finalizeBatch(bytes)", _headerOf(3)) + ); + assertEq(cleared, 6); + _assertNoBatchData(2); + (, cleared) = _slotChanges(address(this), abi.encodeWithSignature("finalizeBatch(bytes)", _headerOf(4))); + assertEq(cleared, 6); + _assertNoBatchData(3); + // Batch 4 is in the ring. + (, cleared) = _slotChanges(address(this), abi.encodeWithSignature("finalizeBatch(bytes)", _headerOf(5))); + assertEq(cleared, 0); + _assertNoBatchData(4); + _assertBatchData(5); + assertEq(rollup.lastFinalizedBatchIndex(), 5); + } + + function test_cutover_revertAcrossItAndCommitAgain() public { + _commit(1); + _commit(2); + _commit(3); + _startRing(); + _commit(4); + _commit(5); + + _revertFrom(3); + assertEq(rollup.highestRevertedBatchIndex(), 5); + for (uint256 i = 3; i <= 5; i++) { + assertEq(rollup.batchBlobVersionedHashes(i), _blobHash(i)); + assertFalse(rollup.batchExist(i)); + } + // Batch 3 is in the legacy mappings, which behave as they did before the ring: the data of a + // reverted batch is reported until the batch is committed again. Batch 4 and 5 are in the ring. + (uint256 originTimestamp, , uint256 blockNumber, address batchSubmitter) = rollup.batchDataStore(3); + assertGt(originTimestamp, 0); + assertEq(blockNumber, 3); + assertEq(batchSubmitter, alice); + assertEq(rollup.committedStateRoots(3), _root(3)); + _assertNoBatchData(4); + _assertNoBatchData(5); + + // Batch 3 goes back to the legacy mappings, batch 4 and 5 to the ring. + _commitState(3, bytes32(uint256(0xa3))); + _commitState(4, bytes32(uint256(0xa4))); + _commitState(5, bytes32(uint256(0xa5))); + _commit(6); + for (uint256 i = 1; i <= 6; i++) { + _assertBatchData(i); + _finalize(i); + } + } + + function test_cutover_challengeExtendsBatchesOnBothSides() public { + _commit(1); + _commit(2); + _startRing(); + _commit(3); + _commit(4); + uint256[5] memory before; + for (uint256 i = 1; i <= 4; i++) { + (, before[i], , ) = rollup.batchDataStore(i); + } + + hevm.deal(bob, CHALLENGE_DEPOSIT); + bytes32 batchHash = rollup.committedBatches(3); + hevm.prank(bob); + rollup.challengeState{value: CHALLENGE_DEPOSIT}(3, batchHash); + + for (uint256 i = 1; i <= 4; i++) { + (, uint256 finalizeTimestamp, , ) = rollup.batchDataStore(i); + assertEq(finalizeTimestamp, i == 3 ? before[i] : before[i] + proofWindow); + } + } + + function test_cutover_firstBatchInTheRingCommittedWithProof() public { + // Late enough for a missing commit time (zero) to look older than the delay period. + hevm.warp(block.timestamp + 10 * 3600); + _commit(1); + _commit(2); + _startRing(); + hevm.store(address(rollup), bytes32(ROLLUP_DELAY_PERIOD_SLOT), bytes32(uint256(3600))); + _mockVerifierForProof(); + + // The permissionless commit is allowed once the last committed batch is old enough. That + // batch is in the legacy mappings. + uint256 index = 3; + IRollup.BatchDataInput memory input = _input(index, _root(index)); + bytes memory header = _buildHeader(index, _root(index)); + _setBlobHash(_blobHash(index)); + hevm.prank(bob); + hevm.expectRevert("invalid timing"); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + + hevm.warp(block.timestamp + 3601); + _setBlobHash(_blobHash(index)); + hevm.prank(bob); + rollup.commitBatchWithProof(input, header, hex"deadbeef"); + _track(index, _root(index)); + (, uint256 finalizeTimestamp, , address batchSubmitter) = rollup.batchDataStore(index); + assertEq(finalizeTimestamp, block.timestamp); + assertEq(batchSubmitter, address(0)); + + for (uint256 i = 1; i <= 3; i++) { + _finalize(i); + } + } + + function test_cutover_whileABatchIsChallenged() public { + _commit(1); + _commit(2); + hevm.deal(bob, CHALLENGE_DEPOSIT); + bytes32 batchHash = rollup.committedBatches(1); + hevm.prank(bob); + rollup.challengeState{value: CHALLENGE_DEPOSIT}(1, batchHash); + + _startRing(); + assertTrue(rollup.inChallenge()); + + // A batch committed during the challenge cannot be finalized before the challenge ends. + _commit(3); + (uint256 originTimestamp, uint256 finalizeTimestamp, , ) = rollup.batchDataStore(3); + assertEq(finalizeTimestamp, originTimestamp + finalizationPeriodSeconds + proofWindow); + + // The challenged batch is still in the legacy mappings and can be defended. + _mockVerifierForProof(); + hevm.prank(alice); + rollup.proveState(_headerOf(1), hex"deadbeef"); + assertFalse(rollup.inChallenge()); + assertEq(rollup.revertReqIndex(), 0); + + for (uint256 i = 1; i <= 3; i++) { + _finalize(i); + } + } + + function test_cutover_whileARevertRequestIsPending() public { + _commit(1); + _commit(2); + hevm.deal(bob, CHALLENGE_DEPOSIT); + bytes32 batchHash = rollup.committedBatches(1); + hevm.prank(bob); + rollup.challengeState{value: CHALLENGE_DEPOSIT}(1, batchHash); + + // Nobody proves batch 1 in time: the challenger wins and the batch has to be reverted. + hevm.warp(block.timestamp + proofWindow + 1); + hevm.prank(alice); + rollup.proveState(_headerOf(1), hex"deadbeef"); + assertEq(rollup.revertReqIndex(), 1); + + _startRing(); + assertEq(rollup.batchRingStartIndex(), 3); + assertEq(rollup.revertReqIndex(), 1); + + _revertFrom(1); + assertEq(rollup.revertReqIndex(), 0); + assertEq(rollup.highestRevertedBatchIndex(), 2); + + // The timeout slashed and removed the submitter. + _registerAndStakeSubmitter(alice); + + // Batch 1 and 2 go back to the legacy mappings, batch 3 is the first one in the ring. + _commitState(1, bytes32(uint256(0xa1))); + _commitState(2, bytes32(uint256(0xa2))); + _commit(3); + for (uint256 i = 1; i <= 3; i++) { + _assertBatchData(i); + _finalize(i); + } + } + + /*////////////////////////////////////////////////////////////// + Upgraded without starting the ring + //////////////////////////////////////////////////////////////*/ + + function test_withoutTheRing_perBatchDataIsCreatedAndDeletedAsBefore() public { + _upgradeAndCall(new bytes(0)); + _commitAndFinalize(1, 2); + + _setBlobHash(_blobHash(3)); + (uint256 created, uint256 cleared) = _slotChanges( + alice, + abi.encodeCall(IRollup.commitBatch, (_input(3, _root(3)))) + ); + _track(3, _root(3)); + assertEq(created, 7); + assertEq(cleared, 0); + + hevm.warp(block.timestamp + finalizationPeriodSeconds); + (created, cleared) = _slotChanges(address(this), abi.encodeWithSignature("finalizeBatch(bytes)", _headerOf(3))); + assertEq(created, 1); + assertEq(cleared, 6); + _assertNoBatchData(2); + _assertBatchData(3); + assertEq(rollup.batchRingStartIndex(), 0); + } +} diff --git a/contracts/contracts/test/RollupLegacyBatchStorage.t.sol b/contracts/contracts/test/RollupLegacyBatchStorage.t.sol new file mode 100644 index 000000000..786804c2f --- /dev/null +++ b/contracts/contracts/test/RollupLegacyBatchStorage.t.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.24; + +import {RollupCommitBatchWithProofTest, RollupCommitBatchTest, RollupTest, RollupCommitStateTest, RollupSubmitterIntegrationTest, RollupCommitBatchV2Test} from "./Rollup.t.sol"; + +// A new deployment keeps per-batch data in the batch ring from the first batch on, so the suites in +// Rollup.t.sol run on the ring. A deployment that predates the ring keeps using the legacy mappings: +// for the batches committed before `initialize5`, and for every batch while it is upgraded without +// `initialize5`. The contracts below repeat the suites that commit batches on such a deployment. + +contract RollupCommitBatchWithProofLegacyStorageTest is RollupCommitBatchWithProofTest { + function setUp() public virtual override { + super.setUp(); + _useLegacyBatchStorage(); + } +} + +contract RollupCommitBatchLegacyStorageTest is RollupCommitBatchTest { + function setUp() public virtual override { + super.setUp(); + _useLegacyBatchStorage(); + } +} + +contract RollupLegacyStorageTest is RollupTest { + function setUp() public virtual override { + super.setUp(); + _useLegacyBatchStorage(); + } +} + +contract RollupCommitStateLegacyStorageTest is RollupCommitStateTest { + function setUp() public virtual override { + super.setUp(); + _useLegacyBatchStorage(); + } +} + +contract RollupSubmitterIntegrationLegacyStorageTest is RollupSubmitterIntegrationTest { + function setUp() public virtual override { + super.setUp(); + _useLegacyBatchStorage(); + } +} + +contract RollupCommitBatchV2LegacyStorageTest is RollupCommitBatchV2Test { + function setUp() public virtual override { + super.setUp(); + _useLegacyBatchStorage(); + } +} diff --git a/contracts/contracts/test/base/L1MessageBase.t.sol b/contracts/contracts/test/base/L1MessageBase.t.sol index 3d56f0b70..1f24e4ecf 100644 --- a/contracts/contracts/test/base/L1MessageBase.t.sol +++ b/contracts/contracts/test/base/L1MessageBase.t.sol @@ -44,15 +44,42 @@ contract L1MessageBaseTest is CommonTest { address public l1FeeVault = address(3033); - // Rollup storage slot for batchBlobVersionedHashes (forge inspect Rollup storage-layout) + // Rollup storage slots (forge inspect Rollup storage-layout) + // Legacy blob versioned hashes, used by the batches below batchRingStartIndex. uint256 internal constant BATCH_BLOB_VERSIONED_HASHES_SLOT = 173; uint256 internal constant ROLLUP_DELAY_PERIOD_SLOT = 172; + // batchRingStartIndex (low 8 bytes) and highestRevertedBatchIndex (next 8 bytes). + uint256 internal constant BATCH_RING_STATE_SLOT = 175; + uint256 internal constant BATCH_RING_SLOT = 176; + uint256 internal constant BATCH_RING_SIZE = 1024; bytes32 internal constant ZERO_VERSIONED_HASH = 0x010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014; - /// @dev Sets batchBlobVersionedHashes[batchIndex] so commitState/commitBatchWithProof can use stored hash in tests. + /// @dev Puts the rollup in the state left by committing `batchIndex` without a blob and reverting it, + /// so commitState/commitBatchWithProof can use the stored hash in tests. function _setStoredBlobHash(uint256 batchIndex) internal { - bytes32 slot = keccak256(abi.encode(batchIndex, BATCH_BLOB_VERSIONED_HASHES_SLOT)); - hevm.store(address(rollup), slot, ZERO_VERSIONED_HASH); + uint256 ringState = uint256(hevm.load(address(rollup), bytes32(BATCH_RING_STATE_SLOT))); + uint256 ringStart = uint64(ringState); + if (ringStart != 0 && batchIndex >= ringStart) { + // BatchRingEntry.blobVersionedHash is the sixth slot of the entry. + bytes32 entry = keccak256(abi.encode(batchIndex % BATCH_RING_SIZE, BATCH_RING_SLOT)); + hevm.store(address(rollup), bytes32(uint256(entry) + 5), ZERO_VERSIONED_HASH); + } else { + bytes32 legacySlot = keccak256(abi.encode(batchIndex, BATCH_BLOB_VERSIONED_HASHES_SLOT)); + hevm.store(address(rollup), legacySlot, ZERO_VERSIONED_HASH); + } + + // revertBatch records the highest batch index it has reverted. + ringState = (ringState & type(uint64).max) | (batchIndex << 64); + hevm.store(address(rollup), bytes32(BATCH_RING_STATE_SLOT), bytes32(ringState)); + } + + /// @dev Puts the rollup in the state of a deployment that predates the batch ring: every batch keeps + /// its per-batch data in the legacy mappings. Must be called before any batch after the genesis + /// batch is committed. + function _useLegacyBatchStorage() internal { + require(rollup.lastCommittedBatchIndex() == 0, "batches already committed"); + hevm.store(address(rollup), bytes32(BATCH_RING_STATE_SLOT), bytes32(0)); + assertEq(rollup.batchRingStartIndex(), 0); } /// @dev Data hash for batch when numL1Messages=0: keccak256(8 bytes lastBlockNumber || 2 bytes numL1Messages). diff --git a/contracts/integration-test/upgrade_rollup_batch_ring.spec.ts b/contracts/integration-test/upgrade_rollup_batch_ring.spec.ts new file mode 100644 index 000000000..ea0672c56 --- /dev/null +++ b/contracts/integration-test/upgrade_rollup_batch_ring.spec.ts @@ -0,0 +1,319 @@ +import { expect } from "chai" +import { artifacts, ethers, network, run } from "hardhat" + +describe("upgradeRollupBatchRing", () => { + const layer2ChainID = 900 + // The Submitter, or the legacy staking contract before the Submitter cutover. + const submitterContractSlot = 151 + const lastFinalizedBatchIndexSlot = 157 + const lastCommittedBatchIndexSlot = 158 + // Batch hashes, keyed by batch index. + const committedBatchesSlot = 161 + // Legacy blob versioned hashes, keyed by batch index. + const legacyBlobVersionedHashesSlot = 173 + // batchRingStartIndex (low 8 bytes) and highestRevertedBatchIndex (next 8 bytes). + const batchRingStateSlot = 175 + const minimumStake = ethers.utils.parseEther("1") + const challengeDeposit = ethers.utils.parseEther("2") + const rewardPercentage = 25 + + async function setStorage(address: string, slot: string, value: string): Promise { + // The slot is a quantity: it must not have leading zeros. + await network.provider.send("hardhat_setStorageAt", [ + address, + ethers.utils.hexValue(slot), + ethers.utils.hexZeroPad(value, 32), + ]) + await network.provider.send("evm_mine") + } + + async function setUintStorage(address: string, slot: number, value: number): Promise { + await setStorage(address, ethers.utils.hexValue(slot), ethers.utils.hexlify(value)) + } + + // A Rollup with pending batches that has gone through the Submitter cutover (initialize4) but + // still keeps per-batch data in the legacy mappings. + async function deployRollupBeforeTheRing(submitterCutover = true): Promise<{ + proxyAdminAddress: string + rollupProxyAddress: string + rollupImplementationAddress: string + }> { + const [owner, messageQueue, verifier] = await ethers.getSigners() + const rollupFactory = await ethers.getContractFactory("Rollup") + const rollupImplementation = await rollupFactory.deploy(layer2ChainID) + await rollupImplementation.deployed() + + const proxyAdminFactory = await ethers.getContractFactory("ProxyAdmin") + const proxyAdmin = await proxyAdminFactory.deploy() + await proxyAdmin.deployed() + + // The first argument stands for the legacy staking contract, which is not a Submitter. + const initializer = rollupFactory.interface.encodeFunctionData("initialize", [ + owner.address, + messageQueue.address, + verifier.address, + 2 * 24 * 60 * 60, + 60 * 60, + 50, + ]) + const proxyFactory = await ethers.getContractFactory("TransparentUpgradeableProxy") + const rollupProxy = await proxyFactory.deploy(rollupImplementation.address, proxyAdmin.address, initializer) + await rollupProxy.deployed() + + await setUintStorage(rollupProxy.address, lastFinalizedBatchIndexSlot, 5) + await setUintStorage(rollupProxy.address, lastCommittedBatchIndexSlot, 7) + // `initialize` starts the ring for new deployments. An existing deployment has not started it. + await setUintStorage(rollupProxy.address, batchRingStateSlot, 0) + + if (submitterCutover) { + const submitterFactory = await ethers.getContractFactory("Submitter") + const submitterImplementation = await submitterFactory.deploy() + await submitterImplementation.deployed() + const submitterProxy = await proxyFactory.deploy( + submitterImplementation.address, + proxyAdmin.address, + submitterFactory.interface.encodeFunctionData("initialize", [ + owner.address, + rollupProxy.address, + minimumStake, + challengeDeposit, + rewardPercentage, + ]) + ) + await submitterProxy.deployed() + await ( + await proxyAdmin.upgradeAndCall( + rollupProxy.address, + rollupImplementation.address, + rollupFactory.interface.encodeFunctionData("initialize4", [submitterProxy.address, 7]) + ) + ).wait() + } + + return { + proxyAdminAddress: proxyAdmin.address, + rollupProxyAddress: rollupProxy.address, + rollupImplementationAddress: rollupImplementation.address, + } + } + + async function runAndCatch(deployment: { proxyAdminAddress: string; rollupProxyAddress: string }) { + try { + await run("upgradeRollupBatchRing", { + proxyadminaddr: deployment.proxyAdminAddress, + rollupproxyaddr: deployment.rollupProxyAddress, + }) + } catch (error) { + return error as Error + } + return undefined + } + + it("starts the ring after the last committed batch and keeps the pending batches", async () => { + const deployment = await deployRollupBeforeTheRing() + const proxyAdmin = await ethers.getContractAt("ProxyAdmin", deployment.proxyAdminAddress) + + await run("upgradeRollupBatchRing", { + proxyadminaddr: deployment.proxyAdminAddress, + rollupproxyaddr: deployment.rollupProxyAddress, + }) + + const rollup = await ethers.getContractAt("Rollup", deployment.rollupProxyAddress) + expect(await rollup.batchRingStartIndex()).to.equal(8) + expect(await rollup.lastFinalizedBatchIndex()).to.equal(5) + expect(await rollup.lastCommittedBatchIndex()).to.equal(7) + expect(await rollup.legacyCutoverBatchIndex()).to.equal(7) + expect(await rollup.LAYER_2_CHAIN_ID()).to.equal(layer2ChainID) + expect(await proxyAdmin.getProxyImplementation(deployment.rollupProxyAddress)).not.to.equal( + deployment.rollupImplementationAddress + ) + }) + + it("rejects a Rollup whose ring has already been started", async () => { + const deployment = await deployRollupBeforeTheRing() + await setUintStorage(deployment.rollupProxyAddress, batchRingStateSlot, 1) + + const failure = await runAndCatch(deployment) + + expect(failure?.message).to.contain("Rollup batch ring already started at batch 1") + }) + + it("rejects a Rollup with a reverted batch that has not been committed again", async () => { + const deployment = await deployRollupBeforeTheRing() + const revertedBatchSlot = ethers.utils.keccak256( + ethers.utils.defaultAbiCoder.encode(["uint256", "uint256"], [8, legacyBlobVersionedHashesSlot]) + ) + await setStorage(deployment.rollupProxyAddress, revertedBatchSlot, "0x1234") + + const failure = await runAndCatch(deployment) + + expect(failure?.message).to.contain("Rollup batch 8 was reverted and must be committed again first") + }) + + it("rejects a Rollup that has not been cut over to the Submitter", async () => { + const deployment = await deployRollupBeforeTheRing(false) + + const failure = await runAndCatch(deployment) + + expect(failure?.message).to.contain("Rollup Submitter preflight failed") + }) + + it("rejects a Rollup that still uses the legacy staking contract before deploying anything", async () => { + const [owner] = await ethers.getSigners() + const deployment = await deployRollupBeforeTheRing(false) + const proxyAdmin = await ethers.getContractAt("ProxyAdmin", deployment.proxyAdminAddress) + // The legacy staking contract has the rollupContract() getter of the Submitter and none of + // its other functions. + const legacyStakingFactory = await ethers.getContractFactory("MockLegacyL1Staking") + const legacyStaking = await legacyStakingFactory.deploy(deployment.rollupProxyAddress) + await legacyStaking.deployed() + await setStorage( + deployment.rollupProxyAddress, + ethers.utils.hexValue(submitterContractSlot), + legacyStaking.address + ) + const nonceBefore = await owner.getTransactionCount() + + const failure = await runAndCatch(deployment) + + expect(failure?.message).to.contain("Rollup Submitter preflight failed") + expect(await owner.getTransactionCount()).to.equal(nonceBefore) + expect(await proxyAdmin.getProxyImplementation(deployment.rollupProxyAddress)).to.equal( + deployment.rollupImplementationAddress + ) + }) + + it("reports success when a batch is reverted in the block of the upgrade", async () => { + const deployment = await deployRollupBeforeTheRing() + const rollup = await ethers.getContractAt("Rollup", deployment.rollupProxyAddress) + // Give batch 7 a known header (version 0, batch index 7), so that the owner can revert it. + const header7 = "0x00" + "0000000000000007" + "00".repeat(240) + const committedBatch7Slot = ethers.utils.keccak256( + ethers.utils.defaultAbiCoder.encode(["uint256", "uint256"], [7, committedBatchesSlot]) + ) + await setStorage(deployment.rollupProxyAddress, committedBatch7Slot, ethers.utils.keccak256(header7)) + + // The transaction of the task that upgrades the proxy is mined in one block with a revert of + // batch 7 after it. At the end of that block the last committed batch is 6, below the ring start. + const [owner] = await ethers.getSigners() + const revertBatch7 = { + from: owner.address, + to: deployment.rollupProxyAddress, + data: rollup.interface.encodeFunctionData("revertBatch", [header7, 1]), + gas: ethers.utils.hexValue(1_000_000), + } + const provider = network.provider + const send = provider.send + provider.send = async (method: string, params?: any[]) => { + const isUpgrade = + method === "eth_sendTransaction" && + params?.[0]?.to?.toLowerCase() === deployment.proxyAdminAddress.toLowerCase() + if (!isUpgrade) { + return send.call(provider, method, params) + } + await send.call(provider, "evm_setAutomine", [false]) + try { + const upgradeHash = await send.call(provider, method, params) + await send.call(provider, "eth_sendTransaction", [revertBatch7]) + await send.call(provider, "evm_mine", []) + return upgradeHash + } finally { + await send.call(provider, "evm_setAutomine", [true]) + } + } + try { + await run("upgradeRollupBatchRing", { + proxyadminaddr: deployment.proxyAdminAddress, + rollupproxyaddr: deployment.rollupProxyAddress, + }) + } finally { + provider.send = send + } + + const upgradeBlock = await ethers.provider.getBlockWithTransactions("latest") + expect(upgradeBlock.transactions.map((tx) => tx.to)).to.deep.equal([ + deployment.proxyAdminAddress, + deployment.rollupProxyAddress, + ]) + expect(await rollup.batchRingStartIndex()).to.equal(8) + expect(await rollup.lastCommittedBatchIndex()).to.equal(6) + expect(await rollup.highestRevertedBatchIndex()).to.equal(7) + }) + + it("does not take a batch committed during the preflight for a reverted one", async () => { + const deployment = await deployRollupBeforeTheRing() + const rollup = await ethers.getContractAt("Rollup", deployment.rollupProxyAddress) + const blobVersionedHash8Slot = ethers.utils.keccak256( + ethers.utils.defaultAbiCoder.encode(["uint256", "uint256"], [8, legacyBlobVersionedHashesSlot]) + ) + + // Batch 8 is committed right after the task has read the last committed batch (7). The commit + // stores the blob versioned hash of batch 8, which is also what a reverted batch 8 leaves behind. + const lastCommittedCall = rollup.interface.encodeFunctionData("lastCommittedBatchIndex") + const provider = network.provider + const send = provider.send + let committed = false + provider.send = async (method: string, params?: any[]) => { + const result = await send.call(provider, method, params) + if (!committed && method === "eth_call" && params?.[0]?.data === lastCommittedCall) { + committed = true + // The commit is in a later block: hardhat_setStorageAt changes the state of the latest one. + await send.call(provider, "evm_mine", []) + await setStorage(deployment.rollupProxyAddress, blobVersionedHash8Slot, "0x1234") + await setUintStorage(deployment.rollupProxyAddress, lastCommittedBatchIndexSlot, 8) + } + return result + } + try { + await run("upgradeRollupBatchRing", { + proxyadminaddr: deployment.proxyAdminAddress, + rollupproxyaddr: deployment.rollupProxyAddress, + }) + } finally { + provider.send = send + } + + expect(committed).to.equal(true) + expect(await rollup.batchRingStartIndex()).to.equal(9) + expect(await rollup.lastCommittedBatchIndex()).to.equal(8) + }) + + it("rejects a Rollup with too many unfinalized batches before deploying anything", async () => { + const [owner] = await ethers.getSigners() + const deployment = await deployRollupBeforeTheRing() + const proxyAdmin = await ethers.getContractAt("ProxyAdmin", deployment.proxyAdminAddress) + // 1023 unfinalized batches: the first batch in the ring could not be committed. + await setUintStorage(deployment.rollupProxyAddress, lastCommittedBatchIndexSlot, 5 + 1023) + const nonceBefore = await owner.getTransactionCount() + + const failure = await runAndCatch(deployment) + + expect(failure?.message).to.contain("Rollup has 1023 unfinalized batches, the ring holds 1023") + expect(await owner.getTransactionCount()).to.equal(nonceBefore) + expect(await proxyAdmin.getProxyImplementation(deployment.rollupProxyAddress)).to.equal( + deployment.rollupImplementationAddress + ) + }) + + it("accepts a Rollup with one unfinalized batch less than the ring holds", async () => { + const deployment = await deployRollupBeforeTheRing() + await setUintStorage(deployment.rollupProxyAddress, lastCommittedBatchIndexSlot, 5 + 1022) + + await run("upgradeRollupBatchRing", { + proxyadminaddr: deployment.proxyAdminAddress, + rollupproxyaddr: deployment.rollupProxyAddress, + }) + + const rollup = await ethers.getContractAt("Rollup", deployment.rollupProxyAddress) + expect(await rollup.batchRingStartIndex()).to.equal(5 + 1022 + 1) + }) +}) + +describe("Rollup implementation", () => { + it("fits in the contract code size limit", async () => { + // Neither the hardhat network of these tests nor the forge tests enforce the limit (EIP-170). + const artifact = await artifacts.readArtifact("Rollup") + + expect(ethers.utils.hexDataLength(artifact.deployedBytecode)).to.be.at.most(24576) + }) +}) diff --git a/contracts/tasks/README.md b/contracts/tasks/README.md index 8a1d78aa0..a7157da9e 100644 --- a/contracts/tasks/README.md +++ b/contracts/tasks/README.md @@ -38,6 +38,31 @@ and calls `ProxyAdmin.upgradeAndCall(initialize4)` atomically: --submitteroperatoraddr --expectedcutoverbatchindex \ --network ` +For the one-time switch of an existing Rollup to the per-batch storage ring, use +`upgradeRollupBatchRing`. Batches committed before the upgrade keep their data in +the legacy mappings until they are finalized, so submissions, challenges, and +finalization do not have to stop. The task requires that the Rollup has already +been cut over to the Submitter, that the ring has not been started, that no +reverted batch is waiting to be committed again, and that fewer than +`BATCH_RING_SIZE - 1` batches await finalization. It reads the L2 chain ID from +the existing Rollup, deploys the replacement with that value, and calls +`ProxyAdmin.upgradeAndCall(initialize5)` atomically: + +`yarn hardhat upgradeRollupBatchRing --proxyadminaddr \ +--rollupproxyaddr --network ` + +The task checks all of these conditions against the state of one block, before +it deploys anything. `initialize5` enforces them on chain as well, so an upgrade +that is sent without the task, for example from a multisig, reverts when one of +them does not hold. + +The task makes one more check that `initialize5` does not: the Submitter has to +report this Rollup in `rollupContract()`. That link is set up by the Submitter +cutover and the ring does not change it, but an upgrade sent without the task +should confirm it by hand. + +A new deployment starts the ring in `initialize` and does not need this task. + For a new deployment, the `register` task reads `batchSubmitterAddresses` from the selected deployment configuration and does not require operator private keys. The owner authorizes each configured work or backup submitter and calls diff --git a/contracts/tasks/proxy_upgrade.ts b/contracts/tasks/proxy_upgrade.ts index 665b05c6d..9676472f1 100644 --- a/contracts/tasks/proxy_upgrade.ts +++ b/contracts/tasks/proxy_upgrade.ts @@ -349,6 +349,133 @@ task("upgradeRollupProxy") ) }) +/* +One-time switch of an existing Rollup to the per-batch storage ring. The task +checks the preconditions, deploys the new implementation, and calls +ProxyAdmin.upgradeAndCall with initialize5() in the same transaction. Batches +committed before the upgrade keep their data in the legacy mappings until they +are finalized, so submissions do not have to stop. +*/ +task("upgradeRollupBatchRing") + .addParam("proxyadminaddr") + .addParam("rollupproxyaddr") + .setAction(async (taskArgs, hre) => { + if ( + !hre.ethers.utils.isAddress(taskArgs.proxyadminaddr) || + !hre.ethers.utils.isAddress(taskArgs.rollupproxyaddr) || + taskArgs.proxyadminaddr === hre.ethers.constants.AddressZero || + taskArgs.rollupproxyaddr === hre.ethers.constants.AddressZero + ) { + throw new Error("invalid ProxyAdmin or Rollup address") + } + + // Rollup.BATCH_RING_SIZE. Checked against the new implementation once it is deployed. + const batchRingSize = 1024 + // Storage slot of batchRingStartIndex (low 8 bytes) and highestRevertedBatchIndex. + const batchRingStateSlot = 175 + + const ProxyAdminFactory = await hre.ethers.getContractFactory("ProxyAdmin") + const proxyAdmin = ProxyAdminFactory.attach(taskArgs.proxyadminaddr) + const RollupFactory = await hre.ethers.getContractFactory("Rollup") + const rollup = await hre.ethers.getContractAt("Rollup", taskArgs.rollupproxyaddr) + const layer2ChainID = await rollup.LAYER_2_CHAIN_ID() + + // Every preflight check reads the state of one block. Read at different blocks, a batch that + // is committed in between would be taken for a reverted batch that awaits its recommit. + const preflight = { blockTag: await hre.ethers.provider.getBlockNumber() } + + // Read from storage: an implementation that predates the ring has no batchRingStartIndex + // getter, and a failed call could not be told apart from a failed request. + const ringState = await hre.ethers.provider.getStorageAt( + taskArgs.rollupproxyaddr, + batchRingStateSlot, + preflight.blockTag + ) + const ringStart = hre.ethers.BigNumber.from(ringState).mask(64) + if (!ringStart.isZero()) { + throw new Error(`Rollup batch ring already started at batch ${ringStart}`) + } + + // initialize5 makes initialize4 unusable, so the Submitter cutover must be done already. + try { + const submitter = await hre.ethers.getContractAt("Submitter", await rollup.submitterContract(preflight)) + const configuredRollup: string = await submitter.rollupContract(preflight) + if (configuredRollup.toLowerCase() !== taskArgs.rollupproxyaddr.toLowerCase()) { + throw new Error(`Submitter is configured for Rollup ${configuredRollup}`) + } + // The call initialize5 makes. The legacy staking contract has a rollupContract() getter as + // well, but it does not answer this one. + await submitter.isActive(hre.ethers.constants.AddressZero, preflight) + } catch (error) { + const reason = error instanceof Error ? error.message : String(error) + throw new Error(`Rollup Submitter preflight failed: ${reason}`) + } + + const lastCommitted = await rollup.lastCommittedBatchIndex(preflight) + const lastFinalized = await rollup.lastFinalizedBatchIndex(preflight) + // A reverted batch keeps its blob versioned hash in the legacy mapping. It has to be committed + // again before its index moves to the ring. + const nextBatchIndex = lastCommitted.add(1) + if ((await rollup.batchBlobVersionedHashes(nextBatchIndex, preflight)) !== hre.ethers.constants.HashZero) { + throw new Error(`Rollup batch ${nextBatchIndex} was reverted and must be committed again first`) + } + + // The first batch in the ring can only be committed while fewer than BATCH_RING_SIZE - 1 + // batches await finalization. + if (lastCommitted.sub(lastFinalized).gte(batchRingSize - 1)) { + throw new Error( + `Rollup has ${lastCommitted.sub(lastFinalized)} unfinalized batches, the ring holds ${batchRingSize - 1}` + ) + } + + const rollupNewImpl = await RollupFactory.deploy(layer2ChainID) + await rollupNewImpl.deployed() + console.log("new rollupNewImpl contract address: ", rollupNewImpl.address) + const ringSize = await rollupNewImpl.BATCH_RING_SIZE() + if (!ringSize.eq(batchRingSize)) { + throw new Error(`Rollup implementation has a ring of ${ringSize} entries, expected ${batchRingSize}`) + } + + const initializer = RollupFactory.interface.encodeFunctionData("initialize5") + const res = await proxyAdmin.upgradeAndCall(taskArgs.rollupproxyaddr, rollupNewImpl.address, initializer) + const rec = await res.wait() + + // Batches may have been committed between the preflight and the upgrade, and committed or + // reverted after it, so the start index is checked against the event of this transaction. + const ringStarted = rec.logs + .filter((log) => log.address.toLowerCase() === taskArgs.rollupproxyaddr.toLowerCase()) + .map((log) => { + try { + return RollupFactory.interface.parseLog(log) + } catch { + return undefined + } + }) + .find((parsed) => parsed?.name === "BatchRingStarted") + const configuredRingStart = hre.ethers.BigNumber.from(await rollup.batchRingStartIndex()) + if ( + !ringStarted || + !configuredRingStart.eq(ringStarted.args.startBatchIndex) || + configuredRingStart.lt(nextBatchIndex) + ) { + throw new Error( + `Rollup batch ring verification failed: start=${configuredRingStart} ` + + `event=${ringStarted?.args.startBatchIndex} committed before=${lastCommitted}` + ) + } + const configuredChainID = await rollup.LAYER_2_CHAIN_ID() + if (!configuredChainID.eq(layer2ChainID)) { + throw new Error( + `Rollup L2 chain ID verification failed: expected=${layer2ChainID} actual=${configuredChainID}` + ) + } + console.log( + `upgrade Rollup and start the batch ring ${rec.status === 1}; ` + + `ringStart=${configuredRingStart} ringSize=${ringSize} finalized=${lastFinalized} ` + + `l2ChainID=${configuredChainID}` + ) + }) + /* Proxy__GasOracle diff --git a/node/derivation/finalizer.go b/node/derivation/finalizer.go index faacf5133..3be13adeb 100644 --- a/node/derivation/finalizer.go +++ b/node/derivation/finalizer.go @@ -19,13 +19,12 @@ import ( // // The lookup is intentionally driven by L2 block numbers (not batch // indices) so it doesn't depend on Rollup.BatchDataStore being populated -// for arbitrarily-old batches. The contract clears -// -// delete batchDataStore[_batchIndex - 1]; -// -// on every finalize, so an older batchIndex returns zero -- but the -// LATEST committed batch index (queried at the L1 finalized block) is -// always populated, since at that block its delete has not yet happened. +// for arbitrarily-old batches. The contract reports batch data only for +// the batches from lastFinalizedBatchIndex to lastCommittedBatchIndex: +// the data of an older batch is cleared (legacy mappings) or overwritten +// by a later batch (batch ring), so an older batchIndex returns zero -- +// but the LATEST committed batch index (queried at the L1 finalized +// block) is always populated, since at that block it is still in range. // Pinning both contract calls to the L1 finalized block makes the read // reliable, and from there the math becomes a number comparison against // the local safe head. @@ -45,9 +44,9 @@ func (d *Derivation) finalizerTick() { // 2. Pin the rollup queries to the L1 finalized block. At that block, // `lastCommittedBatchIndex` always references a batch whose - // `batchDataStore` slot is still populated: the on-chain GC only - // deletes `batchIndex - 1` on each finalizeBatch call, so for any - // batchIndex >= lastFinalizedBatchIndex@thatBlock the slot is intact + // `batchDataStore` is still reported: the contract only drops the + // data of batches older than the last finalized one, so for any + // batchIndex >= lastFinalizedBatchIndex@thatBlock the data is intact // at that block's state. Using the same `BlockNumber: finHeader.Number` // for both calls is what makes the lookup reliable. callOpts := &bind.CallOpts{ diff --git a/tx-submitter/services/rollup_commit_revert_test.go b/tx-submitter/services/rollup_commit_revert_test.go new file mode 100644 index 000000000..826fe968b --- /dev/null +++ b/tx-submitter/services/rollup_commit_revert_test.go @@ -0,0 +1,39 @@ +package services + +import ( + "errors" + "math/big" + "testing" + + "github.com/morph-l2/go-ethereum/eth" + "github.com/stretchr/testify/require" +) + +// The Rollup keeps per-batch data in a ring of 1024 entries: with 1023 batches +// awaiting finalization every commit reverts with "batch ring full" until a +// batch is finalized. eth_estimateGas reports that revert, and a commit that +// can only revert must not be broadcast, with or without the rough gas +// fallback: a reverting blob tx is still charged its full blob fee. +func TestRollupDoesNotSendACommitThatReverts(t *testing.T) { + r, l1Mock, _, rollupContract := setupTestRollup(t) + r.cfg.RoughEstimateGas = true + rollupContract.SetLastFinalizedBatchIndex(big.NewInt(10)) + rollupContract.SetLastCommittedBatchIndex(big.NewInt(10 + 1023)) + r.batchCacheLegacy.Set(10+1024, ð.RPCRollupBatch{ + Version: 1, + ParentBatchHeader: headerWithBatchIndex(10 + 1023), + }) + + l1Mock.EstimateGasErr = errors.New("execution reverted: batch ring full") + for i := 0; i < 3; i++ { + require.NoError(t, r.rollup()) + require.Zero(t, r.pendingTxs.Len()) + require.Zero(t, r.pendingTxs.GetPindex()) + } + + // Once a batch is finalized the estimate succeeds and the same batch is committed. + l1Mock.EstimateGasErr = nil + require.NoError(t, r.rollup()) + require.Equal(t, 1, r.pendingTxs.Len()) + require.EqualValues(t, 10+1024, r.pendingTxs.GetPindex()) +}