From 1e750699b5e2a266bd66a884a19a885055101bf0 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 14 Sep 2023 13:23:16 +0100 Subject: [PATCH 1/6] fix reorg issue - part 1 --- .../CrossChainMessenger.go | 5 +- contracts/generated/ERC20/ERC20.go | 5 +- .../EthereumBridge/EthereumBridge.go | 5 +- .../ManagementContract/ManagementContract.go | 32 +- contracts/generated/MessageBus/MessageBus.go | 5 +- contracts/generated/ObsERC20/ObsERC20.go | 5 +- .../generated/ObscuroBridge/ObscuroBridge.go | 5 +- .../generated/WrappedERC20/WrappedERC20.go | 5 +- contracts/src/management/Structs.sol | 4 - go/common/headers.go | 5 +- go/common/rpc/converters.go | 6 +- go/common/rpc/generated/enclave.pb.go | 386 +++++++++--------- go/common/rpc/generated/enclave.proto | 2 +- go/enclave/components/batch_registry.go | 59 +-- go/enclave/components/interfaces.go | 4 +- go/enclave/components/rollup_compression.go | 6 +- go/enclave/components/rollup_producer.go | 24 +- go/enclave/nodetype/sequencer.go | 10 +- go/enclave/storage/enclavedb/block.go | 2 +- .../mgmtcontractlib/mgmt_contract_lib.go | 24 +- go/host/db/rollups.go | 10 +- go/host/enclave/guardian.go | 2 +- go/host/l1/publisher.go | 4 +- integration/datagenerator/rollup.go | 1 - .../simulation/simulation_in_mem_test.go | 2 +- integration/simulation/validate_chain.go | 9 +- .../smartcontract/debug_mgmt_contract_lib.go | 3 +- 27 files changed, 302 insertions(+), 328 deletions(-) diff --git a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go index eff438fe82..e26ffcf73f 100644 --- a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go +++ b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -167,11 +166,11 @@ func NewCrossChainMessengerFilterer(address common.Address, filterer bind.Contra // bindCrossChainMessenger binds a generic wrapper to an already deployed contract. func bindCrossChainMessenger(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := CrossChainMessengerMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(CrossChainMessengerABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ERC20/ERC20.go b/contracts/generated/ERC20/ERC20.go index 095732a19b..d2eb71a272 100644 --- a/contracts/generated/ERC20/ERC20.go +++ b/contracts/generated/ERC20/ERC20.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // ERC20MetaData contains all meta data concerning the ERC20 contract. @@ -157,11 +156,11 @@ func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (* // bindERC20 binds a generic wrapper to an already deployed contract. func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ERC20MetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 6b03fe7aa5..9fa27007a3 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // EthereumBridgeMetaData contains all meta data concerning the EthereumBridge contract. @@ -157,11 +156,11 @@ func NewEthereumBridgeFilterer(address common.Address, filterer bind.ContractFil // bindEthereumBridge binds a generic wrapper to an already deployed contract. func bindEthereumBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := EthereumBridgeMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(EthereumBridgeABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 3b49ff914c..3052873a0f 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -41,23 +40,20 @@ type StructsCrossChainMessage struct { // StructsHeaderCrossChainData is an auto generated low-level Go binding around an user-defined struct. type StructsHeaderCrossChainData struct { - BlockNumber *big.Int - BlockHash [32]byte - Messages []StructsCrossChainMessage + Messages []StructsCrossChainMessage } // StructsMetaRollup is an auto generated low-level Go binding around an user-defined struct. type StructsMetaRollup struct { Hash [32]byte AggregatorID common.Address - L1Block [32]byte LastSequenceNumber *big.Int } // ManagementContractMetaData contains all meta data concerning the ManagementContract contract. var ManagementContractMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"L1Block\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetHostAddresses\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"L1Block\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_aggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_hostAddress\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"hostAddress\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b610e91806115d583390190565b611523806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638236a7ba11610076578063a52f433c1161005b578063a52f433c14610248578063bbd79e1514610258578063e34fbfc81461026b57600080fd5b80638236a7ba1461015c578063a1a227fa1461021d57600080fd5b806343348b2f116100a757806343348b2f146100f6578063440c953b1461013257806359a900711461014957600080fd5b806302bf9317146100c3578063324ff866146100d8575b600080fd5b6100d66100d1366004610d45565b61027e565b005b6100e0610318565b6040516100ed9190610df8565b60405180910390f35b610122610104366004610e87565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100ed565b61013b60045481565b6040519081526020016100ed565b6100d6610157366004610f4e565b6103f1565b6101de61016a366004610ff5565b604080516080810182526000808252602082018190529181018290526060810182905250506000818152600560209081526040918290208251608081018452815480825260018301546001600160a01b03169382019390935260028201549381019390935260030154606083015290911491565b60408051921515835281516020808501919091528201516001600160a01b0316838201528101516060808401919091520151608082015260a0016100ed565b600654610230906001600160a01b031681565b6040516001600160a01b0390911681526020016100ed565b600354610100900460ff16610122565b6100d661026636600461100e565b610479565b6100d66102793660046110d4565b6105dc565b600160006102926040870160208801610e87565b6001600160a01b0316815260208101919091526040016000205460ff166103005760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610309846105fb565b61031281610633565b50505050565b60606002805480602002602001604051908101604052809291908181526020016000905b828210156103e857838290600052602060002001805461035b90611116565b80601f016020809104026020016040519081016040528092919081815260200182805461038790611116565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b50505050508152602001906001019061033c565b50505050905090565b60035460ff161561040157600080fd5b60038054600160ff1991821681179092556001600160a01b03881660009081526020838152604082208054909316841790925560028054938401815590528451610470927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bf6565b50505050505050565b6001600160a01b03861660009081526001602052604090205460ff168061049f57600080fd5b811561056f5760006104d5888886886040516020016104c19493929190611151565b6040516020818303038152906040526106f3565b905060006104e3828861072e565b9050886001600160a01b0316816001600160a01b03161461056c5760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d61746368000000000000000000000000000000000000000060648201526084016102f7565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105d2927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bf6565b5050505050505050565b3360009081526020819052604090206105f6908383610c7a565b505050565b80356000908152600560205260409020819061061782826111ad565b5050600454606082013511156106305760608101356004555b50565b6000610642604083018361120e565b9050905060005b818110156105f6576006546001600160a01b0316639730886d61066f604086018661120e565b8481811061067f5761067f611258565b9050602002810190610691919061126e565b60016040518363ffffffff1660e01b81526004016106b0929190611327565b600060405180830381600087803b1580156106ca57600080fd5b505af11580156106de573d6000803e3d6000fd5b50505050806106ec906113f4565b9050610649565b60006106ff8251610752565b8260405160200161071192919061140f565b604051602081830303815290604052805190602001209050919050565b600080600061073d858561088c565b9150915061074a816108fc565b509392505050565b60608161079257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156107bc57806107a6816113f4565b91506107b59050600a83611480565b9150610796565b60008167ffffffffffffffff8111156107d7576107d7610eab565b6040519080825280601f01601f191660200182016040528015610801576020820181803683370190505b5090505b841561088457610816600183611494565b9150610823600a866114ab565b61082e9060306114bf565b60f81b81838151811061084357610843611258565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061087d600a86611480565b9450610805565b949350505050565b6000808251604114156108c35760208301516040840151606085015160001a6108b787828585610ab7565b945094505050506108f5565b8251604014156108ed57602083015160408401516108e2868383610ba4565b9350935050506108f5565b506000905060025b9250929050565b6000816004811115610910576109106114d7565b14156109195750565b600181600481111561092d5761092d6114d7565b141561097b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102f7565b600281600481111561098f5761098f6114d7565b14156109dd5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102f7565b60038160048111156109f1576109f16114d7565b1415610a4a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016102f7565b6004816004811115610a5e57610a5e6114d7565b14156106305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016102f7565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610aee5750600090506003610b9b565b8460ff16601b14158015610b0657508460ff16601c14155b15610b175750600090506004610b9b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b6b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b9457600060019250925050610b9b565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bda60ff86901c601b6114bf565b9050610be887828885610ab7565b935093505050935093915050565b828054610c0290611116565b90600052602060002090601f016020900481019282610c245760008555610c6a565b82601f10610c3d57805160ff1916838001178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578251825591602001919060010190610c4f565b50610c76929150610cee565b5090565b828054610c8690611116565b90600052602060002090601f016020900481019282610ca85760008555610c6a565b82601f10610cc15782800160ff19823516178555610c6a565b82800160010185558215610c6a579182015b82811115610c6a578235825591602001919060010190610cd3565b5b80821115610c765760008155600101610cef565b60008083601f840112610d1557600080fd5b50813567ffffffffffffffff811115610d2d57600080fd5b6020830191508360208285010111156108f557600080fd5b60008060008084860360c0811215610d5c57600080fd5b6080811215610d6a57600080fd5b50849350608085013567ffffffffffffffff80821115610d8957600080fd5b610d9588838901610d03565b909550935060a0870135915080821115610dae57600080fd5b50850160608188031215610dc157600080fd5b939692955090935050565b60005b83811015610de7578181015183820152602001610dcf565b838111156103125750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610e6557878503603f1901845281518051808752610e46818989018a8501610dcc565b601f01601f191695909501860194509285019290850190600101610e1f565b5092979650505050505050565b6001600160a01b038116811461063057600080fd5b600060208284031215610e9957600080fd5b8135610ea481610e72565b9392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610ed257600080fd5b813567ffffffffffffffff80821115610eed57610eed610eab565b604051601f8301601f19908116603f01168101908282118183101715610f1557610f15610eab565b81604052838152866020858801011115610f2e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610f6757600080fd5b8635610f7281610e72565b9550602087013567ffffffffffffffff80821115610f8f57600080fd5b610f9b8a838b01610d03565b90975095506040890135915080821115610fb457600080fd5b610fc08a838b01610ec1565b94506060890135915080821115610fd657600080fd5b50610fe389828a01610d03565b979a9699509497509295939492505050565b60006020828403121561100757600080fd5b5035919050565b60008060008060008060c0878903121561102757600080fd5b863561103281610e72565b9550602087013561104281610e72565b9450604087013567ffffffffffffffff8082111561105f57600080fd5b61106b8a838b01610ec1565b9550606089013591508082111561108157600080fd5b61108d8a838b01610ec1565b945060808901359150808211156110a357600080fd5b506110b089828a01610ec1565b92505060a087013580151581146110c657600080fd5b809150509295509295509295565b600080602083850312156110e757600080fd5b823567ffffffffffffffff8111156110fe57600080fd5b61110a85828601610d03565b90969095509350505050565b600181811c9082168061112a57607f821691505b6020821081141561114b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b166014840152508351611188816028850160208801610dcc565b83519083019061119f816028840160208801610dcc565b016028019695505050505050565b813581556001810160208301356111c381610e72565b6001600160a01b0381167fffffffffffffffffffffffff0000000000000000000000000000000000000000835416178255505060408201356002820155606082013560038201555050565b6000808335601e1984360301811261122557600080fd5b83018035915067ffffffffffffffff82111561124057600080fd5b6020019150600581901b36038213156108f557600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261128457600080fd5b9190910192915050565b803563ffffffff811681146112a257600080fd5b919050565b6000808335601e198436030181126112be57600080fd5b830160208101925035905067ffffffffffffffff8111156112de57600080fd5b8036038313156108f557600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff811681146112a257600080fd5b604081526000833561133881610e72565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461136257600080fd5b6060840152506113746040850161128e565b63ffffffff16608083015261138b6060850161128e565b63ffffffff1660a08301526113a360808501856112a7565b60c0808501526113b8610100850182846112ed565b9150506113c760a08601611316565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611408576114086113de565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161144781601a850160208801610dcc565b83519083019061145e81601a840160208801610dcc565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261148f5761148f61146a565b500490565b6000828210156114a6576114a66113de565b500390565b6000826114ba576114ba61146a565b500690565b600082198211156114d2576114d26113de565b500190565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220ab8ac0fa6222958367a9e3f95f61a4bf1ae1c4af86bd4b10a9c675a689423f3464736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e138061007e6000396000f3fe6080604052600436106100745760003560e01c80638da5cb5b1161004e5780638da5cb5b146101ae5780639730886d146101d6578063b1454caa146101f6578063f2fde38b1461022f576100ec565b80630fcfbd111461013457806333a88c7214610167578063715018a614610197576100ec565b366100ec5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064016100e3565b34801561014057600080fd5b5061015461014f366004610770565b61024f565b6040519081526020015b60405180910390f35b34801561017357600080fd5b50610187610182366004610770565b610305565b604051901515815260200161015e565b3480156101a357600080fd5b506101ac610358565b005b3480156101ba57600080fd5b506000546040516001600160a01b03909116815260200161015e565b3480156101e257600080fd5b506101ac6101f13660046107a5565b6103be565b34801561020257600080fd5b5061021661021136600461081b565b610562565b60405167ffffffffffffffff909116815260200161015e565b34801561023b57600080fd5b506101ac61024a3660046108dd565b6105bb565b600080826040516020016102639190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806102fe5760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b9392505050565b600080826040516020016103199190610939565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103505750428111155b949350505050565b6000546001600160a01b031633146103b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6103bc600061069d565b565b6000546001600160a01b031633146104185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b60006104248242610a39565b90506000836040516020016104399190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156104d45760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f210000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b60008181526001602090815260408220849055600291906104f7908701876108dd565b6001600160a01b0316815260208101919091526040016000908120906105236080870160608801610a51565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161055a8282610c33565b505050505050565b600061056d336106fa565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516105aa9796959493929190610d51565b60405180910390a195945050505050565b6000546001600160a01b031633146106155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6001600160a01b0381166106915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016100e3565b61069a8161069d565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061072d8385610db1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561076a57600080fd5b50919050565b60006020828403121561078257600080fd5b813567ffffffffffffffff81111561079957600080fd5b61035084828501610758565b600080604083850312156107b857600080fd5b823567ffffffffffffffff8111156107cf57600080fd5b6107db85828601610758565b95602094909401359450505050565b63ffffffff8116811461069a57600080fd5b60ff8116811461069a57600080fd5b8035610816816107fc565b919050565b60008060008060006080868803121561083357600080fd5b853561083e816107ea565b9450602086013561084e816107ea565b9350604086013567ffffffffffffffff8082111561086b57600080fd5b818801915088601f83011261087f57600080fd5b81358181111561088e57600080fd5b8960208285010111156108a057600080fd5b60208301955080945050505060608601356108ba816107fc565b809150509295509295909350565b6001600160a01b038116811461069a57600080fd5b6000602082840312156108ef57600080fd5b81356102fe816108c8565b67ffffffffffffffff8116811461069a57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000823561094a816108c8565b6001600160a01b0381166020840152506020830135610968816108fa565b67ffffffffffffffff808216604085015260408501359150610989826107ea565b63ffffffff8083166060860152606086013592506109a6836107ea565b80831660808601525060808501359150601e198536030182126109c857600080fd5b908401908135818111156109db57600080fd5b8036038613156109ea57600080fd5b60c060a0860152610a0260e086018260208601610910565b92505050610a1260a0850161080b565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a4c57610a4c610a23565b500190565b600060208284031215610a6357600080fd5b81356102fe816107ea565b60008135610a7b816107ea565b92915050565b6000808335601e19843603018112610a9857600080fd5b83018035915067ffffffffffffffff821115610ab357600080fd5b602001915036819003821315610ac857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610af957607f821691505b6020821081141561076a57634e487b7160e01b600052602260045260246000fd5b601f821115610b6057600081815260208120601f850160051c81016020861015610b415750805b601f850160051c820191505b8181101561055a57828155600101610b4d565b505050565b67ffffffffffffffff831115610b7d57610b7d610acf565b610b9183610b8b8354610ae5565b83610b1a565b6000601f841160018114610bc55760008515610bad5750838201355b600019600387901b1c1916600186901b178355610c1f565b600083815260209020601f19861690835b82811015610bf65786850135825560209485019460019092019101610bd6565b5086821015610c135760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610a7b816107fc565b8135610c3e816108c8565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610c76816108fa565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610cd4836107ea565b921760e09190911b909116178155610d0c610cf160608401610a6e565b6001830163ffffffff821663ffffffff198254161781555050565b610d196080830183610a81565b610d27818360028601610b65565b5050610d4d610d3860a08401610c26565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610d9a60c083018587610910565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610dd457610dd4610a23565b0194935050505056fea2646970667358221220e790a069b7a49368e0f1c281855881b133f1eac9bbac989876cb3bc659282fbe64736f6c63430008090033", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"crossChainData\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetHostAddresses\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"AggregatorID\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_aggregatorID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_hostAddress\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"hostAddress\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x6080604052600060045534801561001557600080fd5b5060405161002290610096565b604051809103906000f08015801561003e573d6000803e3d6000fd5b50600680546001600160a01b0319166001600160a01b039290921691821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a16100a3565b610e918061159f83390190565b6114ed806100b26000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638fa0d05311610076578063a52f433c1161005b578063a52f433c14610222578063bbd79e1514610232578063e34fbfc81461024557600080fd5b80638fa0d053146101e4578063a1a227fa146101f757600080fd5b8063440c953b116100a7578063440c953b1461011d57806359a90071146101345780638236a7ba1461014957600080fd5b8063324ff866146100c357806343348b2f146100e1575b600080fd5b6100cb610258565b6040516100d89190610d03565b60405180910390f35b61010d6100ef366004610d92565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016100d8565b61012660045481565b6040519081526020016100d8565b610147610142366004610e9b565b610331565b005b6101b1610157366004610f42565b6040805160608082018352600080835260208084018290529284018190528481526005835283902083519182018452805480835260018201546001600160a01b031693830193909352600201549281019290925290911491565b60408051921515835281516020808501919091528201516001600160a01b031683820152015160608201526080016100d8565b6101476101f2366004610f5b565b6103b9565b60065461020a906001600160a01b031681565b6040516001600160a01b0390911681526020016100d8565b600354610100900460ff1661010d565b610147610240366004610fe2565b610453565b6101476102533660046110a8565b6105b6565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101561032857838290600052602060002001805461029b906110ea565b80601f01602080910402602001604051908101604052809291908181526020018280546102c7906110ea565b80156103145780601f106102e957610100808354040283529160200191610314565b820191906000526020600020905b8154815290600101906020018083116102f757829003601f168201915b50505050508152602001906001019061027c565b50505050905090565b60035460ff161561034157600080fd5b60038054600160ff1991821681179092556001600160a01b038816600090815260208381526040822080549093168417909255600280549384018155905284516103b0927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0191860190610bca565b50505050505050565b600160006103cd6040870160208801610d92565b6001600160a01b0316815260208101919091526040016000205460ff1661043b5760405162461bcd60e51b815260206004820152601760248201527f61676772656761746f72206e6f7420617474657374656400000000000000000060448201526064015b60405180910390fd5b610444846105d5565b61044d8161060d565b50505050565b6001600160a01b03861660009081526001602052604090205460ff168061047957600080fd5b81156105495760006104af8888868860405160200161049b9493929190611125565b6040516020818303038152906040526106c7565b905060006104bd8288610702565b9050886001600160a01b0316816001600160a01b0316146105465760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401610432565b50505b6001600160a01b03861660009081526001602081815260408320805460ff19168317905560028054928301815590925284516105ac927f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90920191860190610bca565b5050505050505050565b3360009081526020819052604090206105d0908383610c4e565b505050565b8035600090815260056020526040902081906105f18282611181565b50506004546040820135111561060a5760408101356004555b50565b600061061982806111d8565b9050905060005b818110156105d0576006546001600160a01b0316639730886d61064385806111d8565b8481811061065357610653611222565b90506020028101906106659190611238565b60016040518363ffffffff1660e01b81526004016106849291906112f1565b600060405180830381600087803b15801561069e57600080fd5b505af11580156106b2573d6000803e3d6000fd5b50505050806106c0906113be565b9050610620565b60006106d38251610726565b826040516020016106e59291906113d9565b604051602081830303815290604052805190602001209050919050565b60008060006107118585610860565b9150915061071e816108d0565b509392505050565b60608161076657505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115610790578061077a816113be565b91506107899050600a8361144a565b915061076a565b60008167ffffffffffffffff8111156107ab576107ab610df8565b6040519080825280601f01601f1916602001820160405280156107d5576020820181803683370190505b5090505b8415610858576107ea60018361145e565b91506107f7600a86611475565b610802906030611489565b60f81b81838151811061081757610817611222565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610851600a8661144a565b94506107d9565b949350505050565b6000808251604114156108975760208301516040840151606085015160001a61088b87828585610a8b565b945094505050506108c9565b8251604014156108c157602083015160408401516108b6868383610b78565b9350935050506108c9565b506000905060025b9250929050565b60008160048111156108e4576108e46114a1565b14156108ed5750565b6001816004811115610901576109016114a1565b141561094f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610432565b6002816004811115610963576109636114a1565b14156109b15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610432565b60038160048111156109c5576109c56114a1565b1415610a1e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610432565b6004816004811115610a3257610a326114a1565b141561060a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610432565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610ac25750600090506003610b6f565b8460ff16601b14158015610ada57508460ff16601c14155b15610aeb5750600090506004610b6f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b3f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b6857600060019250925050610b6f565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681610bae60ff86901c601b611489565b9050610bbc87828885610a8b565b935093505050935093915050565b828054610bd6906110ea565b90600052602060002090601f016020900481019282610bf85760008555610c3e565b82601f10610c1157805160ff1916838001178555610c3e565b82800160010185558215610c3e579182015b82811115610c3e578251825591602001919060010190610c23565b50610c4a929150610cc2565b5090565b828054610c5a906110ea565b90600052602060002090601f016020900481019282610c7c5760008555610c3e565b82601f10610c955782800160ff19823516178555610c3e565b82800160010185558215610c3e579182015b82811115610c3e578235825591602001919060010190610ca7565b5b80821115610c4a5760008155600101610cc3565b60005b83811015610cf2578181015183820152602001610cda565b8381111561044d5750506000910152565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610d7057878503603f1901845281518051808752610d51818989018a8501610cd7565b601f01601f191695909501860194509285019290850190600101610d2a565b5092979650505050505050565b6001600160a01b038116811461060a57600080fd5b600060208284031215610da457600080fd5b8135610daf81610d7d565b9392505050565b60008083601f840112610dc857600080fd5b50813567ffffffffffffffff811115610de057600080fd5b6020830191508360208285010111156108c957600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f830112610e1f57600080fd5b813567ffffffffffffffff80821115610e3a57610e3a610df8565b604051601f8301601f19908116603f01168101908282118183101715610e6257610e62610df8565b81604052838152866020858801011115610e7b57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060808789031215610eb457600080fd5b8635610ebf81610d7d565b9550602087013567ffffffffffffffff80821115610edc57600080fd5b610ee88a838b01610db6565b90975095506040890135915080821115610f0157600080fd5b610f0d8a838b01610e0e565b94506060890135915080821115610f2357600080fd5b50610f3089828a01610db6565b979a9699509497509295939492505050565b600060208284031215610f5457600080fd5b5035919050565b60008060008084860360a0811215610f7257600080fd5b6060811215610f8057600080fd5b50849350606085013567ffffffffffffffff80821115610f9f57600080fd5b610fab88838901610db6565b90955093506080870135915080821115610fc457600080fd5b50850160208188031215610fd757600080fd5b939692955090935050565b60008060008060008060c08789031215610ffb57600080fd5b863561100681610d7d565b9550602087013561101681610d7d565b9450604087013567ffffffffffffffff8082111561103357600080fd5b61103f8a838b01610e0e565b9550606089013591508082111561105557600080fd5b6110618a838b01610e0e565b9450608089013591508082111561107757600080fd5b5061108489828a01610e0e565b92505060a0870135801515811461109a57600080fd5b809150509295509295509295565b600080602083850312156110bb57600080fd5b823567ffffffffffffffff8111156110d257600080fd5b6110de85828601610db6565b90969095509350505050565b600181811c908216806110fe57607f821691505b6020821081141561111f57634e487b7160e01b600052602260045260246000fd5b50919050565b60006bffffffffffffffffffffffff19808760601b168352808660601b16601484015250835161115c816028850160208801610cd7565b835190830190611173816028840160208801610cd7565b016028019695505050505050565b8135815560018101602083013561119781610d7d565b6001600160a01b0381167fffffffffffffffffffffffff00000000000000000000000000000000000000008354161782555050604082013560028201555050565b6000808335601e198436030181126111ef57600080fd5b83018035915067ffffffffffffffff82111561120a57600080fd5b6020019150600581901b36038213156108c957600080fd5b634e487b7160e01b600052603260045260246000fd5b6000823560be1983360301811261124e57600080fd5b9190910192915050565b803563ffffffff8116811461126c57600080fd5b919050565b6000808335601e1984360301811261128857600080fd5b830160208101925035905067ffffffffffffffff8111156112a857600080fd5b8036038313156108c957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461126c57600080fd5b604081526000833561130281610d7d565b6001600160a01b03166040830152602084013567ffffffffffffffff811680821461132c57600080fd5b60608401525061133e60408501611258565b63ffffffff16608083015261135560608501611258565b63ffffffff1660a083015261136d6080850185611271565b60c080850152611382610100850182846112b7565b91505061139160a086016112e0565b60ff1660e084015260209092019290925292915050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156113d2576113d26113a8565b5060010190565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161141181601a850160208801610cd7565b83519083019061142881601a840160208801610cd7565b01601a01949350505050565b634e487b7160e01b600052601260045260246000fd5b60008261145957611459611434565b500490565b600082821015611470576114706113a8565b500390565b60008261148457611484611434565b500690565b6000821982111561149c5761149c6113a8565b500190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212208e2048f7e310b52ad336bef61c6d2caae7e77ab88301de76bdd6b231e4450a0664736f6c63430008090033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e138061007e6000396000f3fe6080604052600436106100745760003560e01c80638da5cb5b1161004e5780638da5cb5b146101ae5780639730886d146101d6578063b1454caa146101f6578063f2fde38b1461022f576100ec565b80630fcfbd111461013457806333a88c7214610167578063715018a614610197576100ec565b366100ec5760405162461bcd60e51b815260206004820152602c60248201527f74686520576f726d686f6c6520636f6e747261637420646f6573206e6f74206160448201527f636365707420617373657473000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064016100e3565b34801561014057600080fd5b5061015461014f366004610770565b61024f565b6040519081526020015b60405180910390f35b34801561017357600080fd5b50610187610182366004610770565b610305565b604051901515815260200161015e565b3480156101a357600080fd5b506101ac610358565b005b3480156101ba57600080fd5b506000546040516001600160a01b03909116815260200161015e565b3480156101e257600080fd5b506101ac6101f13660046107a5565b6103be565b34801561020257600080fd5b5061021661021136600461081b565b610562565b60405167ffffffffffffffff909116815260200161015e565b34801561023b57600080fd5b506101ac61024a3660046108dd565b6105bb565b600080826040516020016102639190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806102fe5760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b9392505050565b600080826040516020016103199190610939565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103505750428111155b949350505050565b6000546001600160a01b031633146103b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6103bc600061069d565b565b6000546001600160a01b031633146104185760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b60006104248242610a39565b90506000836040516020016104399190610939565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156104d45760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f210000000000000000000000000000000000000000000000000000000000000060648201526084016100e3565b60008181526001602090815260408220849055600291906104f7908701876108dd565b6001600160a01b0316815260208101919091526040016000908120906105236080870160608801610a51565b63ffffffff1681526020808201929092526040016000908120805460018101825590825291902085916004020161055a8282610c33565b505050505050565b600061056d336106fa565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516105aa9796959493929190610d51565b60405180910390a195945050505050565b6000546001600160a01b031633146106155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016100e3565b6001600160a01b0381166106915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016100e3565b61069a8161069d565b50565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff16916001919061072d8385610db1565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600060c0828403121561076a57600080fd5b50919050565b60006020828403121561078257600080fd5b813567ffffffffffffffff81111561079957600080fd5b61035084828501610758565b600080604083850312156107b857600080fd5b823567ffffffffffffffff8111156107cf57600080fd5b6107db85828601610758565b95602094909401359450505050565b63ffffffff8116811461069a57600080fd5b60ff8116811461069a57600080fd5b8035610816816107fc565b919050565b60008060008060006080868803121561083357600080fd5b853561083e816107ea565b9450602086013561084e816107ea565b9350604086013567ffffffffffffffff8082111561086b57600080fd5b818801915088601f83011261087f57600080fd5b81358181111561088e57600080fd5b8960208285010111156108a057600080fd5b60208301955080945050505060608601356108ba816107fc565b809150509295509295909350565b6001600160a01b038116811461069a57600080fd5b6000602082840312156108ef57600080fd5b81356102fe816108c8565b67ffffffffffffffff8116811461069a57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000823561094a816108c8565b6001600160a01b0381166020840152506020830135610968816108fa565b67ffffffffffffffff808216604085015260408501359150610989826107ea565b63ffffffff8083166060860152606086013592506109a6836107ea565b80831660808601525060808501359150601e198536030182126109c857600080fd5b908401908135818111156109db57600080fd5b8036038613156109ea57600080fd5b60c060a0860152610a0260e086018260208601610910565b92505050610a1260a0850161080b565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610a4c57610a4c610a23565b500190565b600060208284031215610a6357600080fd5b81356102fe816107ea565b60008135610a7b816107ea565b92915050565b6000808335601e19843603018112610a9857600080fd5b83018035915067ffffffffffffffff821115610ab357600080fd5b602001915036819003821315610ac857600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610af957607f821691505b6020821081141561076a57634e487b7160e01b600052602260045260246000fd5b601f821115610b6057600081815260208120601f850160051c81016020861015610b415750805b601f850160051c820191505b8181101561055a57828155600101610b4d565b505050565b67ffffffffffffffff831115610b7d57610b7d610acf565b610b9183610b8b8354610ae5565b83610b1a565b6000601f841160018114610bc55760008515610bad5750838201355b600019600387901b1c1916600186901b178355610c1f565b600083815260209020601f19861690835b82811015610bf65786850135825560209485019460019092019101610bd6565b5086821015610c135760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610a7b816107fc565b8135610c3e816108c8565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610c76816108fa565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610cd4836107ea565b921760e09190911b909116178155610d0c610cf160608401610a6e565b6001830163ffffffff821663ffffffff198254161781555050565b610d196080830183610a81565b610d27818360028601610b65565b5050610d4d610d3860a08401610c26565b6003830160ff821660ff198254161781555050565b5050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610d9a60c083018587610910565b905060ff831660a083015298975050505050505050565b600067ffffffffffffffff808316818516808303821115610dd457610dd4610a23565b0194935050505056fea2646970667358221220e790a069b7a49368e0f1c281855881b133f1eac9bbac989876cb3bc659282fbe64736f6c63430008090033", } // ManagementContractABI is the input ABI used to generate the binding from. @@ -182,11 +178,11 @@ func NewManagementContractFilterer(address common.Address, filterer bind.Contrac // bindManagementContract binds a generic wrapper to an already deployed contract. func bindManagementContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ManagementContractMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ManagementContractABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and @@ -291,7 +287,7 @@ func (_ManagementContract *ManagementContractCallerSession) GetHostAddresses() ( // GetRollupByHash is a free data retrieval call binding the contract method 0x8236a7ba. // -// Solidity: function GetRollupByHash(bytes32 rollupHash) view returns(bool, (bytes32,address,bytes32,uint256)) +// Solidity: function GetRollupByHash(bytes32 rollupHash) view returns(bool, (bytes32,address,uint256)) func (_ManagementContract *ManagementContractCaller) GetRollupByHash(opts *bind.CallOpts, rollupHash [32]byte) (bool, StructsMetaRollup, error) { var out []interface{} err := _ManagementContract.contract.Call(opts, &out, "GetRollupByHash", rollupHash) @@ -309,14 +305,14 @@ func (_ManagementContract *ManagementContractCaller) GetRollupByHash(opts *bind. // GetRollupByHash is a free data retrieval call binding the contract method 0x8236a7ba. // -// Solidity: function GetRollupByHash(bytes32 rollupHash) view returns(bool, (bytes32,address,bytes32,uint256)) +// Solidity: function GetRollupByHash(bytes32 rollupHash) view returns(bool, (bytes32,address,uint256)) func (_ManagementContract *ManagementContractSession) GetRollupByHash(rollupHash [32]byte) (bool, StructsMetaRollup, error) { return _ManagementContract.Contract.GetRollupByHash(&_ManagementContract.CallOpts, rollupHash) } // GetRollupByHash is a free data retrieval call binding the contract method 0x8236a7ba. // -// Solidity: function GetRollupByHash(bytes32 rollupHash) view returns(bool, (bytes32,address,bytes32,uint256)) +// Solidity: function GetRollupByHash(bytes32 rollupHash) view returns(bool, (bytes32,address,uint256)) func (_ManagementContract *ManagementContractCallerSession) GetRollupByHash(rollupHash [32]byte) (bool, StructsMetaRollup, error) { return _ManagementContract.Contract.GetRollupByHash(&_ManagementContract.CallOpts, rollupHash) } @@ -414,23 +410,23 @@ func (_ManagementContract *ManagementContractCallerSession) MessageBus() (common return _ManagementContract.Contract.MessageBus(&_ManagementContract.CallOpts) } -// AddRollup is a paid mutator transaction binding the contract method 0x02bf9317. +// AddRollup is a paid mutator transaction binding the contract method 0x8fa0d053. // -// Solidity: function AddRollup((bytes32,address,bytes32,uint256) r, string _rollupData, (uint256,bytes32,(address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() +// Solidity: function AddRollup((bytes32,address,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() func (_ManagementContract *ManagementContractTransactor) AddRollup(opts *bind.TransactOpts, r StructsMetaRollup, _rollupData string, crossChainData StructsHeaderCrossChainData) (*types.Transaction, error) { return _ManagementContract.contract.Transact(opts, "AddRollup", r, _rollupData, crossChainData) } -// AddRollup is a paid mutator transaction binding the contract method 0x02bf9317. +// AddRollup is a paid mutator transaction binding the contract method 0x8fa0d053. // -// Solidity: function AddRollup((bytes32,address,bytes32,uint256) r, string _rollupData, (uint256,bytes32,(address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() +// Solidity: function AddRollup((bytes32,address,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() func (_ManagementContract *ManagementContractSession) AddRollup(r StructsMetaRollup, _rollupData string, crossChainData StructsHeaderCrossChainData) (*types.Transaction, error) { return _ManagementContract.Contract.AddRollup(&_ManagementContract.TransactOpts, r, _rollupData, crossChainData) } -// AddRollup is a paid mutator transaction binding the contract method 0x02bf9317. +// AddRollup is a paid mutator transaction binding the contract method 0x8fa0d053. // -// Solidity: function AddRollup((bytes32,address,bytes32,uint256) r, string _rollupData, (uint256,bytes32,(address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() +// Solidity: function AddRollup((bytes32,address,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) crossChainData) returns() func (_ManagementContract *ManagementContractTransactorSession) AddRollup(r StructsMetaRollup, _rollupData string, crossChainData StructsHeaderCrossChainData) (*types.Transaction, error) { return _ManagementContract.Contract.AddRollup(&_ManagementContract.TransactOpts, r, _rollupData, crossChainData) } diff --git a/contracts/generated/MessageBus/MessageBus.go b/contracts/generated/MessageBus/MessageBus.go index 9df9300e66..89bda19c23 100644 --- a/contracts/generated/MessageBus/MessageBus.go +++ b/contracts/generated/MessageBus/MessageBus.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -167,11 +166,11 @@ func NewMessageBusFilterer(address common.Address, filterer bind.ContractFiltere // bindMessageBus binds a generic wrapper to an already deployed contract. func bindMessageBus(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := MessageBusMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(MessageBusABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ObsERC20/ObsERC20.go b/contracts/generated/ObsERC20/ObsERC20.go index ceeb461384..7fa704060b 100644 --- a/contracts/generated/ObsERC20/ObsERC20.go +++ b/contracts/generated/ObsERC20/ObsERC20.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // ObsERC20MetaData contains all meta data concerning the ObsERC20 contract. @@ -157,11 +156,11 @@ func NewObsERC20Filterer(address common.Address, filterer bind.ContractFilterer) // bindObsERC20 binds a generic wrapper to an already deployed contract. func bindObsERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ObsERC20MetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ObsERC20ABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index 7976c056b0..691cd001a2 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // ObscuroBridgeMetaData contains all meta data concerning the ObscuroBridge contract. @@ -157,11 +156,11 @@ func NewObscuroBridgeFilterer(address common.Address, filterer bind.ContractFilt // bindObscuroBridge binds a generic wrapper to an already deployed contract. func bindObscuroBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ObscuroBridgeMetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(ObscuroBridgeABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/WrappedERC20/WrappedERC20.go b/contracts/generated/WrappedERC20/WrappedERC20.go index 347b1c03f1..66dc49690c 100644 --- a/contracts/generated/WrappedERC20/WrappedERC20.go +++ b/contracts/generated/WrappedERC20/WrappedERC20.go @@ -26,7 +26,6 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription - _ = abi.ConvertType ) // WrappedERC20MetaData contains all meta data concerning the WrappedERC20 contract. @@ -157,11 +156,11 @@ func NewWrappedERC20Filterer(address common.Address, filterer bind.ContractFilte // bindWrappedERC20 binds a generic wrapper to an already deployed contract. func bindWrappedERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := WrappedERC20MetaData.GetAbi() + parsed, err := abi.JSON(strings.NewReader(WrappedERC20ABI)) if err != nil { return nil, err } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/src/management/Structs.sol b/contracts/src/management/Structs.sol index a9fea8f237..1bd0f54938 100644 --- a/contracts/src/management/Structs.sol +++ b/contracts/src/management/Structs.sol @@ -4,11 +4,9 @@ pragma solidity >=0.7.0 <0.9.0; import * as MessageBusStructs from "../messaging/Structs.sol"; interface Structs { - // MetaRollup is a rollup meta data struct MetaRollup{ bytes32 Hash; address AggregatorID; - bytes32 L1Block; uint256 LastSequenceNumber; } @@ -17,8 +15,6 @@ interface Structs { } struct HeaderCrossChainData { - uint256 blockNumber; - bytes32 blockHash; MessageBusStructs.Structs.CrossChainMessage[] messages; } } \ No newline at end of file diff --git a/go/common/headers.go b/go/common/headers.go index 703f7d766a..bcd39e2a78 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -72,9 +72,8 @@ func (b *BatchHeader) MarshalJSON() ([]byte, error) { // RollupHeader is a public / plaintext struct that holds common properties of rollups. // All these fields are processed by the Management contract type RollupHeader struct { - L1Proof L1BlockHash // the L1 block hash used by the enclave to generate the current rollup - L1ProofNumber *big.Int // the height of the proof - used by the management contract to check - Coinbase common.Address + Coinbase common.Address + CompressionL1Head L1BlockHash // the l1 block that the sequencer considers canonical at the time when this rollup is created CrossChainMessages []MessageBus.StructsCrossChainMessage `json:"crossChainMessages"` diff --git a/go/common/rpc/converters.go b/go/common/rpc/converters.go index 4f8e1f287f..f57eb76df8 100644 --- a/go/common/rpc/converters.go +++ b/go/common/rpc/converters.go @@ -216,8 +216,7 @@ func ToRollupHeaderMsg(header *common.RollupHeader) *generated.RollupHeaderMsg { return nil } headerMsg := generated.RollupHeaderMsg{ - Proof: header.L1Proof.Bytes(), - ProofNumber: header.L1ProofNumber.Uint64(), + CompressionL1Head: header.CompressionL1Head.Bytes(), R: header.R.Bytes(), S: header.S.Bytes(), Coinbase: header.Coinbase.Bytes(), @@ -250,8 +249,7 @@ func FromRollupHeaderMsg(header *generated.RollupHeaderMsg) *common.RollupHeader r := &big.Int{} s := &big.Int{} return &common.RollupHeader{ - L1Proof: gethcommon.BytesToHash(header.Proof), - L1ProofNumber: big.NewInt(int64(header.ProofNumber)), + CompressionL1Head: gethcommon.BytesToHash(header.CompressionL1Head), R: r.SetBytes(header.R), S: s.SetBytes(header.S), Coinbase: gethcommon.BytesToAddress(header.Coinbase), diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index 33066a416f..847f1336ff 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -3630,7 +3630,7 @@ type RollupHeaderMsg struct { unknownFields protoimpl.UnknownFields ParentHash []byte `protobuf:"bytes,1,opt,name=ParentHash,proto3" json:"ParentHash,omitempty"` - Proof []byte `protobuf:"bytes,2,opt,name=Proof,proto3" json:"Proof,omitempty"` + CompressionL1Head []byte `protobuf:"bytes,2,opt,name=CompressionL1Head,proto3" json:"CompressionL1Head,omitempty"` ProofNumber uint64 `protobuf:"varint,3,opt,name=ProofNumber,proto3" json:"ProofNumber,omitempty"` Number uint64 `protobuf:"varint,4,opt,name=Number,proto3" json:"Number,omitempty"` Time uint64 `protobuf:"varint,5,opt,name=Time,proto3" json:"Time,omitempty"` @@ -3680,9 +3680,9 @@ func (x *RollupHeaderMsg) GetParentHash() []byte { return nil } -func (x *RollupHeaderMsg) GetProof() []byte { +func (x *RollupHeaderMsg) GetCompressionL1Head() []byte { if x != nil { - return x.Proof + return x.CompressionL1Head } return nil } @@ -4298,201 +4298,203 @@ var file_enclave_proto_rawDesc = []byte{ 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xbf, 0x02, 0x0a, + 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xd7, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x52, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, 0x12, 0x0c, 0x0a, 0x01, 0x53, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, - 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xa9, - 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, - 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xaf, 0x13, - 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, - 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, - 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, + 0x31, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x43, 0x6f, 0x6d, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x12, 0x20, + 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, + 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, + 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x52, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x52, + 0x12, 0x0c, 0x0a, 0x01, 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x01, 0x53, 0x12, 0x26, + 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0xaf, 0x13, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, + 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, + 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, + 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, - 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, - 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, - 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, - 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, - 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, - 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, - 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, - 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, - 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, - 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, + 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, + 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, + 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, + 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, + 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, + 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, + 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, + 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, + 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, + 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x75, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, + 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index f2c3125dff..b9542a6ae1 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -396,7 +396,7 @@ message ExtRollupMsg { message RollupHeaderMsg { bytes ParentHash = 1; - bytes Proof = 2; + bytes CompressionL1Head = 2; uint64 ProofNumber = 3; uint64 Number = 4; uint64 Time = 5; diff --git a/go/enclave/components/batch_registry.go b/go/enclave/components/batch_registry.go index 469f2523e9..e866ba3e32 100644 --- a/go/enclave/components/batch_registry.go +++ b/go/enclave/components/batch_registry.go @@ -71,51 +71,60 @@ func (br *batchRegistry) HasGenesisBatch() (bool, error) { return genesisBatchStored, nil } -func (br *batchRegistry) BatchesAfter(batchSeqNo uint64, rollupLimiter limiters.RollupLimiter) ([]*core.Batch, error) { - batches := make([]*core.Batch, 0) - - var batch *core.Batch - var err error - if batch, err = br.storage.FetchBatchBySeqNo(batchSeqNo); err != nil { - return nil, err - } - batches = append(batches, batch) - +func (br *batchRegistry) BatchesAfter(batchSeqNo uint64, upToL1Height uint64, rollupLimiter limiters.RollupLimiter) ([]*core.Batch, error) { + // sanity check headBatch, err := br.storage.FetchHeadBatch() if err != nil { return nil, err } - if headBatch.SeqNo().Uint64() < batch.SeqNo().Uint64() { - return nil, fmt.Errorf("head batch height %d is in the past compared to requested batch %d", - headBatch.SeqNo().Uint64(), - batch.SeqNo().Uint64()) + if headBatch.SeqNo().Uint64() < batchSeqNo { + return nil, fmt.Errorf("head batch height %d is in the past compared to requested batch %d", headBatch.SeqNo().Uint64(), batchSeqNo) } - for batch.SeqNo().Cmp(headBatch.SeqNo()) != 0 { - if didAcceptBatch, err := rollupLimiter.AcceptBatch(batch); err != nil { - return nil, err - } else if !didAcceptBatch { - return batches, nil + + resultBatches := make([]*core.Batch, 0) + + currentBatchSeq := batchSeqNo + for currentBatchSeq <= headBatch.SeqNo().Uint64() { + batch, err := br.storage.FetchBatchBySeqNo(currentBatchSeq) + if err != nil { + return nil, fmt.Errorf("could not retrieve batch by sequence number %d. Cause: %w", currentBatchSeq, err) } - batch, err = br.storage.FetchBatchBySeqNo(batch.SeqNo().Uint64() + 1) + // check the block height + block, err := br.storage.FetchBlock(batch.Header.L1Proof) if err != nil { - return nil, fmt.Errorf("could not retrieve batch by sequence number less than the head batch. Cause: %w", err) + return nil, fmt.Errorf("could not retrieve block. Cause: %w", err) } - batches = append(batches, batch) + if block.NumberU64() > upToL1Height { + break + } + + // check the limiter + didAcceptBatch, err := rollupLimiter.AcceptBatch(batch) + if err != nil { + return nil, err + } + if !didAcceptBatch { + break + } + + resultBatches = append(resultBatches, batch) br.logger.Info("Added batch to rollup", log.BatchHashKey, batch.Hash(), log.BatchSeqNoKey, batch.SeqNo(), log.BatchHeightKey, batch.Number(), "l1_proof", batch.Header.L1Proof) + + currentBatchSeq++ } // Sanity check that the rollup includes consecutive batches (according to the seqNo) - current := batches[0].SeqNo().Uint64() - for i, b := range batches { + current := resultBatches[0].SeqNo().Uint64() + for i, b := range resultBatches { if current+uint64(i) != b.SeqNo().Uint64() { return nil, fmt.Errorf("created invalid rollup with batches out of sequence") } } - return batches, nil + return resultBatches, nil } func (br *batchRegistry) GetBatchStateAtHeight(blockNumber *gethrpc.BlockNumber) (*state.StateDB, error) { diff --git a/go/enclave/components/interfaces.go b/go/enclave/components/interfaces.go index f6a8b7a14d..233ac98545 100644 --- a/go/enclave/components/interfaces.go +++ b/go/enclave/components/interfaces.go @@ -79,7 +79,7 @@ type BatchExecutor interface { type BatchRegistry interface { // BatchesAfter - Given a hash, will return batches following it until the head batch - BatchesAfter(batchSeqNo uint64, rollupLimiter limiters.RollupLimiter) ([]*core.Batch, error) + BatchesAfter(batchSeqNo uint64, upToL1Height uint64, rollupLimiter limiters.RollupLimiter) ([]*core.Batch, error) // GetBatchStateAtHeight - creates a stateDB that represents the state committed when // the batch with height matching the blockNumber was created and stored. @@ -103,7 +103,7 @@ type BatchRegistry interface { type RollupProducer interface { // CreateRollup - creates a rollup starting from the end of the last rollup // that has been stored and continues it towards what we consider the current L2 head. - CreateRollup(fromBatchNo uint64, limiter limiters.RollupLimiter) (*core.Rollup, error) + CreateRollup(fromBatchNo uint64, upToL1Height uint64, limiter limiters.RollupLimiter) (*core.Rollup, error) } type RollupConsumer interface { diff --git a/go/enclave/components/rollup_compression.go b/go/enclave/components/rollup_compression.go index 9b2674a77d..29425091ad 100644 --- a/go/enclave/components/rollup_compression.go +++ b/go/enclave/components/rollup_compression.go @@ -128,7 +128,7 @@ func (rc *RollupCompression) ProcessExtRollup(rollup *common.ExtRollup) error { // The recreation of batches is a 2-step process: // 1. calculate fields like: sequence, height, time, l1Proof, from the implicit and explicit information from the metadata - incompleteBatches, err := rc.createIncompleteBatches(calldataRollupHeader, transactionsPerBatch, rollup.Header.L1Proof) + incompleteBatches, err := rc.createIncompleteBatches(calldataRollupHeader, transactionsPerBatch, rollup.Header.CompressionL1Head) if err != nil { return err } @@ -249,7 +249,7 @@ func (rc *RollupCompression) createRollupHeader(batches []*core.Batch) (*common. } // the main logic to recreate the batches from the header. The logical pair of: `createRollupHeader` -func (rc *RollupCompression) createIncompleteBatches(calldataRollupHeader *common.CalldataRollupHeader, transactionsPerBatch [][]*common.L2Tx, rollupL1Head common.L1BlockHash) ([]*batchFromRollup, error) { +func (rc *RollupCompression) createIncompleteBatches(calldataRollupHeader *common.CalldataRollupHeader, transactionsPerBatch [][]*common.L2Tx, compressionL1Head common.L1BlockHash) ([]*batchFromRollup, error) { incompleteBatches := make([]*batchFromRollup, len(transactionsPerBatch)) startAtSeq := calldataRollupHeader.FirstBatchSequence.Int64() @@ -257,7 +257,7 @@ func (rc *RollupCompression) createIncompleteBatches(calldataRollupHeader *commo currentTime := int64(calldataRollupHeader.StartTime) var currentL1Height *big.Int - rollupL1Block, err := rc.storage.FetchBlock(rollupL1Head) + rollupL1Block, err := rc.storage.FetchBlock(compressionL1Head) if err != nil { return nil, err } diff --git a/go/enclave/components/rollup_producer.go b/go/enclave/components/rollup_producer.go index 43c1a79346..08d304eb75 100644 --- a/go/enclave/components/rollup_producer.go +++ b/go/enclave/components/rollup_producer.go @@ -2,10 +2,11 @@ package components import ( "fmt" + "math/big" - "github.com/obscuronet/go-obscuro/go/enclave/storage" + "github.com/ethereum/go-ethereum/core/types" - "github.com/obscuronet/go-obscuro/go/common/log" + "github.com/obscuronet/go-obscuro/go/enclave/storage" gethlog "github.com/ethereum/go-ethereum/log" @@ -51,8 +52,8 @@ func NewRollupProducer(sequencerID gethcommon.Address, transactionBlobCrypto cry } } -func (re *rollupProducerImpl) CreateRollup(fromBatchNo uint64, limiter limiters.RollupLimiter) (*core.Rollup, error) { - batches, err := re.batchRegistry.BatchesAfter(fromBatchNo, limiter) +func (re *rollupProducerImpl) CreateRollup(fromBatchNo uint64, upToL1Height uint64, limiter limiters.RollupLimiter) (*core.Rollup, error) { + batches, err := re.batchRegistry.BatchesAfter(fromBatchNo, upToL1Height, limiter) if err != nil { return nil, fmt.Errorf("could not fetch 'from' batch (seqNo=%d) for rollup: %w", fromBatchNo, err) } @@ -63,7 +64,11 @@ func (re *rollupProducerImpl) CreateRollup(fromBatchNo uint64, limiter limiters. return nil, fmt.Errorf("no batches for rollup") } - newRollup := re.createNextRollup(batches) + block, err := re.storage.FetchCanonicaBlockByHeight(big.NewInt(int64(upToL1Height))) + if err != nil { + return nil, err + } + newRollup := re.createNextRollup(batches, block) re.logger.Info(fmt.Sprintf("Created new rollup %s with %d batches. From %d to %d", newRollup.Hash(), len(newRollup.Batches), batches[0].SeqNo(), batches[len(batches)-1].SeqNo())) @@ -72,16 +77,11 @@ func (re *rollupProducerImpl) CreateRollup(fromBatchNo uint64, limiter limiters. // createNextRollup - based on a previous rollup and batches will create a new rollup that encapsulate the state // transition from the old rollup to the new one's head batch. -func (re *rollupProducerImpl) createNextRollup(batches []*core.Batch) *core.Rollup { +func (re *rollupProducerImpl) createNextRollup(batches []*core.Batch, block *types.Block) *core.Rollup { lastBatch := batches[len(batches)-1] rh := common.RollupHeader{} - rh.L1Proof = lastBatch.Header.L1Proof - b, err := re.storage.FetchBlock(rh.L1Proof) - if err != nil { - re.logger.Crit("Could not fetch block. Should not happen", log.ErrKey, err) - } - rh.L1ProofNumber = b.Number() + rh.CompressionL1Head = block.Hash() rh.Coinbase = re.sequencerID rh.CrossChainMessages = make([]MessageBus.StructsCrossChainMessage, 0) diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index 777d7b7187..4eafd458f8 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -30,6 +30,8 @@ import ( "github.com/obscuronet/go-obscuro/go/enclave/mempool" ) +const RollupDelay = 2 // number of L1 blocks to exclude when creating a rollup. This will minimize compression reorg issues. + type SequencerSettings struct { MaxBatchSize uint64 MaxRollupSize uint64 @@ -239,10 +241,14 @@ func (s *sequencer) StoreExecutedBatch(batch *core.Batch, receipts types.Receipt } func (s *sequencer) CreateRollup(lastBatchNo uint64) (*common.ExtRollup, error) { - // todo @stefan - move this somewhere else, it shouldn't be in the batch registry. rollupLimiter := limiters.NewRollupLimiter(s.settings.MaxRollupSize) - rollup, err := s.rollupProducer.CreateRollup(lastBatchNo, rollupLimiter) + currentL1Head, err := s.storage.FetchHeadBlock() + if err != nil { + return nil, err + } + upToL1Height := currentL1Head.NumberU64() - RollupDelay + rollup, err := s.rollupProducer.CreateRollup(lastBatchNo, upToL1Height, rollupLimiter) if err != nil { return nil, err } diff --git a/go/enclave/storage/enclavedb/block.go b/go/enclave/storage/enclavedb/block.go index 6ad750d317..54f125dc13 100644 --- a/go/enclave/storage/enclavedb/block.go +++ b/go/enclave/storage/enclavedb/block.go @@ -154,7 +154,7 @@ func WriteRollup(dbtx DBTransaction, rollup *common.RollupHeader) error { 0, 0, data, - rollup.L1Proof.Bytes(), + nil, ) return nil } diff --git a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go index 1c4877a393..b20d7c297c 100644 --- a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go +++ b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go @@ -111,23 +111,16 @@ func (c *contractLibImpl) CreateRollup(t *ethadapter.L1RollupTx, nonce uint64) t panic(err) } - zipped, err := compress(t.Rollup) - if err != nil { - panic(err) - } - encRollupData := base64EncodeToString(zipped) + encRollupData := base64EncodeToString(t.Rollup) metaRollup := ManagementContract.StructsMetaRollup{ Hash: decodedRollup.Hash(), AggregatorID: decodedRollup.Header.Coinbase, - L1Block: decodedRollup.Header.L1Proof, LastSequenceNumber: big.NewInt(int64(decodedRollup.Header.LastBatchSeqNo)), } crossChain := ManagementContract.StructsHeaderCrossChainData{ - BlockNumber: decodedRollup.Header.L1ProofNumber, - BlockHash: decodedRollup.Header.L1Proof, - Messages: convertCrossChainMessages(decodedRollup.Header.CrossChainMessages), + Messages: convertCrossChainMessages(decodedRollup.Header.CrossChainMessages), } data, err := c.contractABI.Pack( @@ -320,19 +313,6 @@ func base64EncodeToString(bytes []byte) string { return base64.StdEncoding.EncodeToString(bytes) } -// compress the byte array using gzip -func compress(in []byte) ([]byte, error) { - var b bytes.Buffer - gz := gzip.NewWriter(&b) - if _, err := gz.Write(in); err != nil { - return nil, err - } - if err := gz.Close(); err != nil { - return nil, err - } - return b.Bytes(), nil -} - // Base64DecodeFromString decodes a string to a byte array func Base64DecodeFromString(in string) []byte { bytesStr, err := base64.StdEncoding.DecodeString(in) diff --git a/go/host/db/rollups.go b/go/host/db/rollups.go index a79df5f08f..9df9eec10b 100644 --- a/go/host/db/rollups.go +++ b/go/host/db/rollups.go @@ -16,7 +16,7 @@ import ( // DB methods relating to rollup transactions. // AddRollupHeader adds a rollup to the DB -func (db *DB) AddRollupHeader(rollup *common.ExtRollup) error { +func (db *DB) AddRollupHeader(rollup *common.ExtRollup, block *common.L1Block) error { // Check if the Header is already stored _, err := db.GetRollupHeader(rollup.Hash()) if err != nil && !errors.Is(err, errutil.ErrNotFound) { @@ -33,7 +33,7 @@ func (db *DB) AddRollupHeader(rollup *common.ExtRollup) error { return fmt.Errorf("could not write rollup header. Cause: %w", err) } - if err := db.writeRollupByBlockHash(b, rollup.Header); err != nil { + if err := db.writeRollupByBlockHash(b, rollup.Header, block.Hash()); err != nil { return fmt.Errorf("could not write rollup block. Cause: %w", err) } @@ -42,7 +42,7 @@ func (db *DB) AddRollupHeader(rollup *common.ExtRollup) error { if err != nil && !errors.Is(err, errutil.ErrNotFound) { return fmt.Errorf("could not retrieve rollup header at tip. Cause: %w", err) } - if tipRollupHeader == nil || tipRollupHeader.L1ProofNumber.Cmp(rollup.Header.L1ProofNumber) == -1 { + if tipRollupHeader == nil || tipRollupHeader.LastBatchSeqNo < rollup.Header.LastBatchSeqNo { err = db.writeTipRollupHeader(b, rollup.Hash()) if err != nil { return fmt.Errorf("could not write new rollup hash at tip. Cause: %w", err) @@ -122,13 +122,13 @@ func (db *DB) writeTipRollupHeader(w ethdb.KeyValueWriter, val gethcommon.Hash) } // Stores if a rollup is in a block -func (db *DB) writeRollupByBlockHash(w ethdb.KeyValueWriter, header *common.RollupHeader) error { +func (db *DB) writeRollupByBlockHash(w ethdb.KeyValueWriter, header *common.RollupHeader, blockHash gethcommon.Hash) error { // Write the encoded header data, err := rlp.EncodeToBytes(header) if err != nil { return err } - key := rollupBlockKey(header.L1Proof) + key := rollupBlockKey(blockHash) return w.Put(key, data) } diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index 1437c5facc..36c5e2b07b 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -440,7 +440,7 @@ func (g *Guardian) processL1BlockTransactions(block *common.L1Block) { if err != nil { g.logger.Error("could not decode rollup.", log.ErrKey, err) } - err = g.db.AddRollupHeader(r) + err = g.db.AddRollupHeader(r, block) if err != nil { if errors.Is(err, errutil.ErrAlreadyExists) { g.logger.Info("rollup already stored", log.RollupHashKey, r.Hash()) diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index f213ac59e8..07894f01dd 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -207,7 +207,7 @@ func (p *Publisher) PublishRollup(producedRollup *common.ExtRollup) { } return string(header) - }}, "rollup_hash", producedRollup.Header.Hash().Hex(), "batches_len", len(producedRollup.BatchPayloads)) + }}, log.RollupHashKey, producedRollup.Header.Hash(), "batches_len", len(producedRollup.BatchPayloads)) rollupTx := p.mgmtContractLib.CreateRollup(tx, p.hostWallet.GetNonceAndIncrement()) rollupTx, err = p.ethClient.EstimateGasAndGasPrice(rollupTx, p.hostWallet.Address()) @@ -222,7 +222,7 @@ func (p *Publisher) PublishRollup(producedRollup *common.ExtRollup) { if err != nil { p.logger.Error("could not issue rollup tx", log.ErrKey, err) } else { - p.logger.Info("Rollup included in L1", "hash", producedRollup.Hash()) + p.logger.Info("Rollup included in L1", log.RollupHashKey, producedRollup.Hash()) } } diff --git a/integration/datagenerator/rollup.go b/integration/datagenerator/rollup.go index 6c208b18fe..81cb02181c 100644 --- a/integration/datagenerator/rollup.go +++ b/integration/datagenerator/rollup.go @@ -11,7 +11,6 @@ import ( func RandomRollup(_ *types.Block) common.ExtRollup { extRollup := common.ExtRollup{ Header: &common.RollupHeader{ - L1Proof: randomHash(), Coinbase: RandomAddress(), }, } diff --git a/integration/simulation/simulation_in_mem_test.go b/integration/simulation/simulation_in_mem_test.go index 59b06080be..9a02c7fd5d 100644 --- a/integration/simulation/simulation_in_mem_test.go +++ b/integration/simulation/simulation_in_mem_test.go @@ -27,7 +27,7 @@ func TestInMemoryMonteCarloSimulation(t *testing.T) { NumberOfNodes: numberOfNodes, // todo (#718) - try reducing this back to 50 milliseconds once faster-finality model is optimised AvgBlockDuration: 250 * time.Millisecond, - SimulationTime: 30 * time.Second, + SimulationTime: 60 * time.Second, L1EfficiencyThreshold: 0.2, MgmtContractLib: ethereummock.NewMgmtContractLibMock(), ERC20ContractLib: ethereummock.NewERC20ContractLibMock(), diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index fe6e960271..bfe825a344 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -117,7 +117,8 @@ func checkObscuroBlockchainValidity(t *testing.T, s *Simulation, maxL1Height uin wg.Wait() min, max := minMax(heights) // This checks that all the nodes are in sync. When a node falls behind with processing blocks it might highlight a problem. - if max-min > max/7 { + // since there is one node that only listens to rollups it will be naturally behind. + if max-min > max/5 { t.Errorf("There is a problem with the Obscuro chain. Nodes fell out of sync. Max height: %d. Min height: %d -> %+v", max, min, heights) } } @@ -240,11 +241,7 @@ func ExtractDataFromEthereumChain( testlog.Logger().Crit("could not decode rollup. ", log.ErrKey, err) } rollups = append(rollups, r) - if node.IsBlockAncestor(block, r.Header.L1Proof) { - // only count the rollup if it is published in the right branch - // todo (@tudor) - once logic is added to the l1 - this can be made into a check - s.Stats.NewRollup(nodeIdx) - } + s.Stats.NewRollup(nodeIdx) } } } diff --git a/integration/smartcontract/debug_mgmt_contract_lib.go b/integration/smartcontract/debug_mgmt_contract_lib.go index 43c0588fbd..de3fb1aaa9 100644 --- a/integration/smartcontract/debug_mgmt_contract_lib.go +++ b/integration/smartcontract/debug_mgmt_contract_lib.go @@ -68,8 +68,7 @@ func (d *debugMgmtContractLib) AwaitedIssueRollup(rollup common.ExtRollup, clien return fmt.Errorf("rollup not stored in tree") } - if !bytes.Equal(rollupElement.AggregatorID[:], rollup.Header.Coinbase.Bytes()) || - !bytes.Equal(rollupElement.L1Block[:], rollup.Header.L1Proof.Bytes()) { + if !bytes.Equal(rollupElement.AggregatorID[:], rollup.Header.Coinbase.Bytes()) { return fmt.Errorf("stored rollup does not match the generated rollup") } From 3e67f8c1ae6f4208d00d90c72d37bf1f7a3c2162 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 14 Sep 2023 13:33:12 +0100 Subject: [PATCH 2/6] revert wrong change --- integration/simulation/simulation_in_mem_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/simulation/simulation_in_mem_test.go b/integration/simulation/simulation_in_mem_test.go index 9a02c7fd5d..59b06080be 100644 --- a/integration/simulation/simulation_in_mem_test.go +++ b/integration/simulation/simulation_in_mem_test.go @@ -27,7 +27,7 @@ func TestInMemoryMonteCarloSimulation(t *testing.T) { NumberOfNodes: numberOfNodes, // todo (#718) - try reducing this back to 50 milliseconds once faster-finality model is optimised AvgBlockDuration: 250 * time.Millisecond, - SimulationTime: 60 * time.Second, + SimulationTime: 30 * time.Second, L1EfficiencyThreshold: 0.2, MgmtContractLib: ethereummock.NewMgmtContractLibMock(), ERC20ContractLib: ethereummock.NewERC20ContractLibMock(), From be35d4b4b2f10b9adaa1372a4a92c76c3b50c010 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 14 Sep 2023 13:47:58 +0100 Subject: [PATCH 3/6] fix gas --- go/enclave/enclave_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/enclave/enclave_test.go b/go/enclave/enclave_test.go index 32be420499..91304bf6ba 100644 --- a/go/enclave/enclave_test.go +++ b/go/enclave/enclave_test.go @@ -38,7 +38,7 @@ const _testEnclavePublicKeyHex = "034d3b7e63a8bcd532ee3d1d6ecad9d67fca7821981a04 // _successfulRollupGasPrice can be deterministically calculated when evaluating the management smart contract. // It should change only when there are changes to the smart contract or if the gas estimation algorithm is modified. // Other changes would mean something is broken. -const _successfulRollupGasPrice = 319208 +const _successfulRollupGasPrice = 317480 var _enclavePubKey *ecies.PublicKey @@ -140,7 +140,7 @@ func gasEstimateSuccess(t *testing.T, w wallet.Wallet, enclave common.Enclave, v } if decodeUint64 != _successfulRollupGasPrice { - t.Fatal("unexpected gas price") + t.Fatalf("unexpected gas price %d", decodeUint64) } } From ce92d320e34b0868ab98aae9e1227987296dc925 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 14 Sep 2023 14:27:28 +0100 Subject: [PATCH 4/6] fix --- go/enclave/components/batch_registry.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/go/enclave/components/batch_registry.go b/go/enclave/components/batch_registry.go index e866ba3e32..225c06036e 100644 --- a/go/enclave/components/batch_registry.go +++ b/go/enclave/components/batch_registry.go @@ -116,11 +116,13 @@ func (br *batchRegistry) BatchesAfter(batchSeqNo uint64, upToL1Height uint64, ro currentBatchSeq++ } - // Sanity check that the rollup includes consecutive batches (according to the seqNo) - current := resultBatches[0].SeqNo().Uint64() - for i, b := range resultBatches { - if current+uint64(i) != b.SeqNo().Uint64() { - return nil, fmt.Errorf("created invalid rollup with batches out of sequence") + if len(resultBatches) > 0 { + // Sanity check that the rollup includes consecutive batches (according to the seqNo) + current := resultBatches[0].SeqNo().Uint64() + for i, b := range resultBatches { + if current+uint64(i) != b.SeqNo().Uint64() { + return nil, fmt.Errorf("created invalid rollup with batches out of sequence") + } } } From 9c076e2e0bb3c6a3c064f8906a7b1f6bb5f072ce Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 14 Sep 2023 14:50:51 +0100 Subject: [PATCH 5/6] regenerate bindings --- .../generated/CrossChainMessenger/CrossChainMessenger.go | 5 +++-- contracts/generated/ERC20/ERC20.go | 5 +++-- contracts/generated/EthereumBridge/EthereumBridge.go | 5 +++-- contracts/generated/ManagementContract/ManagementContract.go | 5 +++-- contracts/generated/MessageBus/MessageBus.go | 5 +++-- contracts/generated/ObsERC20/ObsERC20.go | 5 +++-- contracts/generated/ObscuroBridge/ObscuroBridge.go | 5 +++-- contracts/generated/WrappedERC20/WrappedERC20.go | 5 +++-- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go index e26ffcf73f..eff438fe82 100644 --- a/contracts/generated/CrossChainMessenger/CrossChainMessenger.go +++ b/contracts/generated/CrossChainMessenger/CrossChainMessenger.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -166,11 +167,11 @@ func NewCrossChainMessengerFilterer(address common.Address, filterer bind.Contra // bindCrossChainMessenger binds a generic wrapper to an already deployed contract. func bindCrossChainMessenger(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(CrossChainMessengerABI)) + parsed, err := CrossChainMessengerMetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ERC20/ERC20.go b/contracts/generated/ERC20/ERC20.go index d2eb71a272..095732a19b 100644 --- a/contracts/generated/ERC20/ERC20.go +++ b/contracts/generated/ERC20/ERC20.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // ERC20MetaData contains all meta data concerning the ERC20 contract. @@ -156,11 +157,11 @@ func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (* // bindERC20 binds a generic wrapper to an already deployed contract. func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) + parsed, err := ERC20MetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index 9fa27007a3..6b03fe7aa5 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // EthereumBridgeMetaData contains all meta data concerning the EthereumBridge contract. @@ -156,11 +157,11 @@ func NewEthereumBridgeFilterer(address common.Address, filterer bind.ContractFil // bindEthereumBridge binds a generic wrapper to an already deployed contract. func bindEthereumBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(EthereumBridgeABI)) + parsed, err := EthereumBridgeMetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 3052873a0f..52e73989bb 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -178,11 +179,11 @@ func NewManagementContractFilterer(address common.Address, filterer bind.Contrac // bindManagementContract binds a generic wrapper to an already deployed contract. func bindManagementContract(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ManagementContractABI)) + parsed, err := ManagementContractMetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/MessageBus/MessageBus.go b/contracts/generated/MessageBus/MessageBus.go index 89bda19c23..9df9300e66 100644 --- a/contracts/generated/MessageBus/MessageBus.go +++ b/contracts/generated/MessageBus/MessageBus.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // StructsCrossChainMessage is an auto generated low-level Go binding around an user-defined struct. @@ -166,11 +167,11 @@ func NewMessageBusFilterer(address common.Address, filterer bind.ContractFiltere // bindMessageBus binds a generic wrapper to an already deployed contract. func bindMessageBus(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(MessageBusABI)) + parsed, err := MessageBusMetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ObsERC20/ObsERC20.go b/contracts/generated/ObsERC20/ObsERC20.go index 7fa704060b..ceeb461384 100644 --- a/contracts/generated/ObsERC20/ObsERC20.go +++ b/contracts/generated/ObsERC20/ObsERC20.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // ObsERC20MetaData contains all meta data concerning the ObsERC20 contract. @@ -156,11 +157,11 @@ func NewObsERC20Filterer(address common.Address, filterer bind.ContractFilterer) // bindObsERC20 binds a generic wrapper to an already deployed contract. func bindObsERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ObsERC20ABI)) + parsed, err := ObsERC20MetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index 691cd001a2..7976c056b0 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // ObscuroBridgeMetaData contains all meta data concerning the ObscuroBridge contract. @@ -156,11 +157,11 @@ func NewObscuroBridgeFilterer(address common.Address, filterer bind.ContractFilt // bindObscuroBridge binds a generic wrapper to an already deployed contract. func bindObscuroBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ObscuroBridgeABI)) + parsed, err := ObscuroBridgeMetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and diff --git a/contracts/generated/WrappedERC20/WrappedERC20.go b/contracts/generated/WrappedERC20/WrappedERC20.go index 66dc49690c..347b1c03f1 100644 --- a/contracts/generated/WrappedERC20/WrappedERC20.go +++ b/contracts/generated/WrappedERC20/WrappedERC20.go @@ -26,6 +26,7 @@ var ( _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription + _ = abi.ConvertType ) // WrappedERC20MetaData contains all meta data concerning the WrappedERC20 contract. @@ -156,11 +157,11 @@ func NewWrappedERC20Filterer(address common.Address, filterer bind.ContractFilte // bindWrappedERC20 binds a generic wrapper to an already deployed contract. func bindWrappedERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(WrappedERC20ABI)) + parsed, err := WrappedERC20MetaData.GetAbi() if err != nil { return nil, err } - return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil } // Call invokes the (constant) contract method with params as input values and From 12c7e990706170c6915a401d009a6d8e240a0e03 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Thu, 14 Sep 2023 14:58:37 +0100 Subject: [PATCH 6/6] small fix --- .../mgmtcontractlib/mgmt_contract_lib.go | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go index b20d7c297c..5433b6a395 100644 --- a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go +++ b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go @@ -1,11 +1,8 @@ package mgmtcontractlib import ( - "bytes" - "compress/gzip" "encoding/base64" "fmt" - "io" "math/big" "strings" @@ -82,11 +79,7 @@ func (c *contractLibImpl) DecodeTx(tx *types.Transaction) ethadapter.L1Transacti if !found { panic("call data not found for rollupData") } - zipped := Base64DecodeFromString(callData.(string)) - rollup, err := Decompress(zipped) - if err != nil { - panic(err) - } + rollup := Base64DecodeFromString(callData.(string)) return ðadapter.L1RollupTx{ Rollup: rollup, @@ -322,18 +315,6 @@ func Base64DecodeFromString(in string) []byte { return bytesStr } -// Decompress the byte array using gzip -func Decompress(in []byte) ([]byte, error) { - reader := bytes.NewReader(in) - gz, err := gzip.NewReader(reader) - if err != nil { - return nil, err - } - defer gz.Close() - - return io.ReadAll(gz) -} - func convertCrossChainMessages(messages []MessageBus.StructsCrossChainMessage) []ManagementContract.StructsCrossChainMessage { msgs := make([]ManagementContract.StructsCrossChainMessage, 0)