From cb131fabe5fb9570180e7030a293a984f17c2446 Mon Sep 17 00:00:00 2001 From: zjubfd <296179868@qq.com> Date: Tue, 11 Oct 2022 11:16:30 +0800 Subject: [PATCH] vm: add two proof verifier to fix the vulnerability in range proof (#1121) --- CHANGELOG.md | 3 + accounts/abi/bind/bind_test.go | 6 ++ core/systemcontracts/upgrade.go | 69 ++++++++++++++ core/types/blacklist.go | 2 +- core/vm/contracts.go | 22 +++++ core/vm/contracts_lightclient.go | 124 +++++++++++++++++++++----- core/vm/contracts_lightclient_test.go | 92 +++++++++++++++++++ core/vm/evm.go | 2 + core/vm/lightclient/types.go | 10 ++- eth/protocols/snap/sync.go | 2 +- go.mod | 3 +- go.sum | 5 +- internal/ethapi/api.go | 5 +- params/config.go | 27 +++++- params/version.go | 2 +- 15 files changed, 338 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c11afc847..ca749d5e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## v1.1.16 +* [\#1121](https://github.com/bnb-chain/bsc/pull/1121) vm: add two proof verifier to fix the vulnerability in range proof + ## v1.1.15 * [\#1109](https://github.com/bnb-chain/bsc/pull/1109) nanofork: block exploitation accounts and suspend cross chain bridge related precompile contracts diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go index 992497993..49766ccfd 100644 --- a/accounts/abi/bind/bind_test.go +++ b/accounts/abi/bind/bind_test.go @@ -2023,6 +2023,12 @@ func TestGolangBindings(t *testing.T) { if out, err := replacer.CombinedOutput(); err != nil { t.Fatalf("failed to replace binding test dependency to current source tree: %v\n%s", err, out) } + + replacer = exec.Command(gocmd, "mod", "edit", "-x", "-require", "github.com/tendermint/tendermint@v0.0.0", "-replace", "github.com/tendermint/tendermint=github.com/bnb-chain/tendermint@v0.31.12") // Repo root + replacer.Dir = pkg + if out, err := replacer.CombinedOutput(); err != nil { + t.Fatalf("failed to replace tendermint dependency to bnb-chain source: %v\n%s", err, out) + } tidier := exec.Command(gocmd, "mod", "tidy") tidier.Dir = pkg if out, err := tidier.CombinedOutput(); err != nil { diff --git a/core/systemcontracts/upgrade.go b/core/systemcontracts/upgrade.go index 4f020d02f..94eb014d7 100644 --- a/core/systemcontracts/upgrade.go +++ b/core/systemcontracts/upgrade.go @@ -47,6 +47,8 @@ var ( eulerUpgrade = make(map[string]*Upgrade) gibbsUpgrade = make(map[string]*Upgrade) + + moranUpgrade = make(map[string]*Upgrade) ) func init() { @@ -393,6 +395,69 @@ func init() { }, }, } + + moranUpgrade[mainNet] = &Upgrade{ + UpgradeName: "moran", + Configs: []*UpgradeConfig{ + { + ContractAddr: common.HexToAddress(RelayerHubContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "6080604052600436106101d85760003560e01c80637ae2308811610102578063c81b166211610095578063f9a2bbc711610064578063f9a2bbc714610569578063fb7cfdd71461057e578063fc3e590814610593578063fd6a6879146105a8576101d8565b8063c81b166214610515578063dc927faf1461052a578063e1c7392a1461053f578063e79a198f14610554576101d8565b8063a1a11bf5116100d1578063a1a11bf514610407578063a78abc161461041c578063ab51bb9614610431578063ac43175114610446576101d8565b80637ae23088146103b357806395468d26146103c857806396713da9146103dd5780639dc09262146103f2576101d8565b806351e806721161017a57806370fd5bad1161014957806370fd5bad1461035f578063718a8aa81461037457806375d47a0a146103895780637942fd051461039e576101d8565b806351e80672146102c7578063541d5548146102dc5780636a87d780146103235780636e47b4821461034a576101d8565b80633dffc387116101b65780633dffc3871461024657806343756e5c14610271578063493279b1146102865780634bf6c882146102b2576101d8565b80630bee7a67146101dd5780630e2374a51461020b5780631aa3a0081461023c575b600080fd5b3480156101e957600080fd5b506101f26105bd565b6040805163ffffffff9092168252519081900360200190f35b34801561021757600080fd5b506102206105c2565b604080516001600160a01b039092168252519081900360200190f35b6102446105c8565b005b34801561025257600080fd5b5061025b610749565b6040805160ff9092168252519081900360200190f35b34801561027d57600080fd5b5061022061074e565b34801561029257600080fd5b5061029b610754565b6040805161ffff9092168252519081900360200190f35b3480156102be57600080fd5b5061025b610759565b3480156102d357600080fd5b5061022061075e565b3480156102e857600080fd5b5061030f600480360360208110156102ff57600080fd5b50356001600160a01b0316610764565b604080519115158252519081900360200190f35b34801561032f57600080fd5b50610338610782565b60408051918252519081900360200190f35b34801561035657600080fd5b50610220610788565b34801561036b57600080fd5b5061025b61078e565b34801561038057600080fd5b5061025b610793565b34801561039557600080fd5b50610220610798565b3480156103aa57600080fd5b5061025b61079e565b3480156103bf57600080fd5b506103386107a3565b3480156103d457600080fd5b506103386107b0565b3480156103e957600080fd5b5061025b6107bc565b3480156103fe57600080fd5b506102206107c1565b34801561041357600080fd5b506102206107c7565b34801561042857600080fd5b5061030f6107cd565b34801561043d57600080fd5b506101f26107d6565b34801561045257600080fd5b506102446004803603604081101561046957600080fd5b81019060208101813564010000000081111561048457600080fd5b82018360208201111561049657600080fd5b803590602001918460018302840111640100000000831117156104b857600080fd5b9193909290916020810190356401000000008111156104d657600080fd5b8201836020820111156104e857600080fd5b8035906020019184600183028401116401000000008311171561050a57600080fd5b5090925090506107db565b34801561052157600080fd5b50610220610bfd565b34801561053657600080fd5b50610220610c03565b34801561054b57600080fd5b50610244610c09565b34801561056057600080fd5b50610244610c8b565b34801561057557600080fd5b50610220610e44565b34801561058a57600080fd5b50610338610e4a565b34801561059f57600080fd5b5061025b610e50565b3480156105b457600080fd5b50610220610e55565b606481565b61200181565b3360009081526004602052604090205460ff1615610625576040805162461bcd60e51b81526020600482015260156024820152741c995b185e595c88185b1c9958591e48195e1a5cdd605a1b604482015290519081900360640190fd5b60005460ff16610678576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b61068133610e5b565b156106bd5760405162461bcd60e51b81526004018080602001828103825260278152602001806110486027913960400191505060405180910390fd5b333214610707576040805162461bcd60e51b81526020600482015260136024820152721b9bc81c1c9bde1e481a5cc8185b1b1bddd959606a1b604482015290519081900360640190fd5b6040805162461bcd60e51b81526020600482015260126024820152711c9959da5cdd195c881cdd5cdc195b99195960721b604482015290519081900360640190fd5b600181565b61100181565b603881565b600881565b61200081565b6001600160a01b031660009081526004602052604090205460ff1690565b60025481565b61100581565b600281565b601081565b61100881565b600b81565b68056bc75e2d6310000081565b67016345785d8a000081565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661082e576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b336110071461086e5760405162461bcd60e51b815260040180806020018281038252602e81526020018061106f602e913960400191505060405180910390fd5b6108d484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600f81526e1c995c5d5a5c995911195c1bdcda5d608a1b60208201529150610e619050565b156109d757602081146109185760405162461bcd60e51b815260040180806020018281038252602281526020018061109d6022913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161095691858580838501838280828437600092019190915250610f4892505050565b90506001811180156109715750683635c9adc5dea000008111155b801561097e575060025481115b6109cf576040805162461bcd60e51b815260206004820181905260248201527f7468652072657175697265644465706f736974206f7574206f662072616e6765604482015290519081900360640190fd5b600155610b6b565b610a3284848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260048152636475657360e01b60208201529150610e619050565b15610b2e5760208114610a8c576040805162461bcd60e51b815260206004820152601760248201527f6c656e677468206f662064756573206d69736d61746368000000000000000000604482015290519081900360640190fd5b604080516020601f8401819004810282018101909252828152600091610aca91858580838501838280828437600092019190915250610f4892505050565b9050600081118015610add575060015481105b610b26576040805162461bcd60e51b81526020600482015260156024820152747468652064756573206f7574206f662072616e676560581b604482015290519081900360640190fd5b600255610b6b565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b61100281565b61100381565b60005460ff1615610c61576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b68056bc75e2d63100000600190815567016345785d8a00006002556000805460ff19169091179055565b3360009081526004602052604090205460ff16610ce6576040805162461bcd60e51b81526020600482015260146024820152731c995b185e595c88191bc81b9bdd08195e1a5cdd60621b604482015290519081900360640190fd5b60005460ff16610d39576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b610d4161102d565b5033600081815260036020908152604091829020825180840190935280548084526001909101549183018290529192916108fc91610d85919063ffffffff610f4d16565b6040518115909202916000818181858888f19350505050158015610dad573d6000803e3d6000fd5b50602081015160405161100291829181156108fc0291906000818181858888f19350505050158015610de3573d6000803e3d6000fd5b50336000818152600460209081526040808320805460ff191690556003825280832083815560010192909255815192835290517fd17202129b83db7880d6b9f25df81c58ad46f7e0e2c92236b1aa10663a4876679281900390910190a15050565b61100081565b60015481565b600381565b61100481565b3b151590565b6000816040516020018082805190602001908083835b60208310610e965780518252601f199092019160209182019101610e77565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310610f045780518252601f199092019160209182019101610ee5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b6000610f8f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f96565b9392505050565b600081848411156110255760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fea578181015183820152602001610fd2565b50505050905090810190601f1680156110175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60405180604001604052806000815260200160008152509056fe636f6e7472616374206973206e6f7420616c6c6f77656420746f20626520612072656c61796572746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662072657175697265644465706f736974206d69736d61746368a26469706673582212201c4e7448b0b43bce697ca53ce9878e494069d8ceccfdd4081cee4d8b0deb5ae064736f6c63430006040033", + }, + { + ContractAddr: common.HexToAddress(LightClientContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "608060405234801561001057600080fd5b50600436106102275760003560e01c8063a1a11bf511610130578063dc927faf116100b8578063e405bbc31161007c578063e405bbc3146106a7578063ea54b2aa146106af578063f9a2bbc7146106b7578063fc3e5908146106bf578063fd6a6879146106c757610227565b8063dc927faf14610627578063dda831481461062f578063df5fe70414610655578063e1c7392a1461067b578063e2761af01461068357610227565b8063adc879e9116100ff578063adc879e914610552578063c81b16621461055a578063cba510a914610562578063d816987914610588578063da8d08f01461060157610227565b8063a1a11bf514610462578063a78abc161461046a578063ab51bb9614610486578063ac4317511461048e57610227565b8063564b81ef116101b3578063718a8aa811610182578063718a8aa81461043a57806375d47a0a146104425780637942fd051461044a57806396713da9146104525780639dc092621461045a57610227565b8063564b81ef146102e85780635c5ae8db146103655780636e47b4821461042a57806370fd5bad1461043257610227565b80633dffc387116101fa5780633dffc3871461029357806343756e5c146102b1578063493279b1146102b95780634bf6c882146102d857806351e80672146102e057610227565b80630bee7a671461022c5780630e2374a51461024d5780632657e9b61461027157806333f7798d1461028b575b600080fd5b6102346106cf565b6040805163ffffffff9092168252519081900360200190f35b6102556106d4565b604080516001600160a01b039092168252519081900360200190f35b6102796106da565b60408051918252519081900360200190f35b6102796106e5565b61029b6106eb565b6040805160ff9092168252519081900360200190f35b6102556106f0565b6102c16106f6565b6040805161ffff9092168252519081900360200190f35b61029b6106fb565b610255610700565b6102f0610706565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032a578181015183820152602001610312565b50505050905090810190601f1680156103575780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61038b6004803603602081101561037b57600080fd5b50356001600160401b0316610812565b60405180856001600160401b03166001600160401b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103ec5781810151838201526020016103d4565b50505050905090810190601f1680156104195780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6102556108cd565b61029b6108d3565b61029b6108d8565b6102556108dd565b61029b6108e3565b61029b6108e8565b6102556108ed565b6102556108f3565b6104726108f9565b604080519115158252519081900360200190f35b610234610902565b610550600480360360408110156104a457600080fd5b8101906020810181356401000000008111156104bf57600080fd5b8201836020820111156104d157600080fd5b803590602001918460018302840111640100000000831117156104f357600080fd5b91939092909160208101903564010000000081111561051157600080fd5b82018360208201111561052357600080fd5b8035906020019184600183028401116401000000008311171561054557600080fd5b509092509050610907565b005b610279610bc0565b610255610bc6565b6102796004803603602081101561057857600080fd5b50356001600160401b0316610bcc565b6104726004803603604081101561059e57600080fd5b8101906020810181356401000000008111156105b957600080fd5b8201836020820111156105cb57600080fd5b803590602001918460018302840111640100000000831117156105ed57600080fd5b9193509150356001600160401b0316610beb565b6102556004803603602081101561061757600080fd5b50356001600160401b031661143c565b610255611457565b6102556004803603602081101561064557600080fd5b50356001600160401b031661145d565b6104726004803603602081101561066b57600080fd5b50356001600160401b0316611481565b6105506114c3565b61068b61166a565b604080516001600160401b039092168252519081900360200190f35b61068b611679565b6102f061168f565b6102556116ae565b61029b6116b4565b6102556116b9565b606481565b61200181565b662386f26fc1000081565b60055481565b600181565b61100181565b603881565b600881565b61200081565b604080516020808252818301909252606091829190602082018180368337505060045460208301525090506000805b60208160ff16101561077c57828160ff168151811061075057fe5b01602001516001600160f81b0319161561076f57600190910190610774565b61077c565b600101610735565b5060608160ff166040519080825280601f01601f1916602001820160405280156107ad576020820181803683370190505b50905060005b8260ff168160ff16101561080957838160ff16815181106107d057fe5b602001015160f81c60f81b828260ff16815181106107ea57fe5b60200101906001600160f81b031916908160001a9053506001016107b3565b50925050505b90565b60016020818152600092835260409283902080548184015460028084015460038501805489516101009982161599909902600019011692909204601f81018790048702880187019098528787526001600160401b0390931696919592949091908301828280156108c35780601f10610898576101008083540402835291602001916108c3565b820191906000526020600020905b8154815290600101906020018083116108a657829003601f168201915b5050505050905084565b61100581565b600281565b601081565b61100881565b600b81565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661095e576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b336110071461099e5760405162461bcd60e51b815260040180806020018281038252602e815260200180611a8b602e913960400191505060405180910390fd5b610a1284848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601b81527f726577617264466f7256616c696461746f725365744368616e67650000000000602082015291506116bf9050565b15610af15760208114610a565760405162461bcd60e51b815260040180806020018281038252602e815260200180611a2a602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a94918585808385018382808284376000920191909152506117a692505050565b9050600081118015610aae5750670de0b6b3a76400008111155b610ae95760405162461bcd60e51b815260040180806020018281038252602f815260200180611ab9602f913960400191505060405180910390fd5b600555610b2e565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60045481565b61100281565b6001600160401b03166000908152600160208190526040909120015490565b60408051630a83aaa960e31b815233600482015290516000916110069163541d554891602480820192602092909190829003018186803b158015610c2e57600080fd5b505afa158015610c42573d6000803e3d6000fd5b505050506040513d6020811015610c5857600080fd5b5051610cab576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b73b005741528b86f5952469d80a8614591e3c5b632331480610ce0575073446aa6e0dc65690403df3f127750da1322941f3e33145b610d1b5760405162461bcd60e51b815260040180806020018281038252602a815260200180611ae8602a913960400191505060405180910390fd5b6001600160401b0382166000908152600260205260409020546001600160a01b031615610d8f576040805162461bcd60e51b815260206004820152601c60248201527f63616e27742073796e63206475706c6963617465642068656164657200000000604482015290519081900360640190fd5b6003546001600160401b0390811690831611610ddc5760405162461bcd60e51b8152600401808060200182810382526026815260200180611b126026913960400191505060405180910390fd5b600354600160401b90046001600160401b0316610df7611908565b6001600160401b0382811660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f81018490048402850184019095528484529093606086019392830182828015610ebd5780601f10610e9257610100808354040283529160200191610ebd565b820191906000526020600020905b815481529060010190602001808311610ea057829003601f168201915b50505050508152505090505b836001600160401b0316826001600160401b031610158015610efa57506003546001600160401b0390811690831610155b15610fdb5780516001600160401b0380821660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f8101849004840285018401909552848452959750939460608601939091830182828015610fcb5780601f10610fa057610100808354040283529160200191610fcb565b820191906000526020600020905b815481529060010190602001808311610fae57829003601f168201915b5050505050815250509050610ec9565b6060810151516110d25780516001600160401b03811660009081526001602081815260409283902060030180548451600294821615610100026000190190911693909304601f81018390048302840183019094528383529395509092919083018282801561108a5780601f1061105f5761010080835404028352916020019161108a565b820191906000526020600020905b81548152906001019060200180831161106d57829003601f168201915b505050506060830182905250516110d25760405162461bcd60e51b8152600401808060200182810382526021815260200180611a096021913960400191505060405180910390fd5b6000816060015151608801905060608787905082016040519080825280601f01601f191660200182016040528015611111576020820181803683370190505b509050600061111f826117ab565b905061112d848683866117b1565b6111685760405162461bcd60e51b81526004018080602001828103825260238152602001806119e66023913960400191505060405180910390fd5b600083820191506111ae8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061181d92505050565b945090506111bd818386611827565b825160200193506111cc61192e565b6110008186866064600019fa6111e157600080fd5b805194506000600160f81b8616156112705750600554604080516309a99b4f60e41b815233600482015260248101929092525160019161100291639a99b4f0916044808201926020929091908290030181600087803b15801561124357600080fd5b505af1158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b50505b856001600160401b03169550602082019350600061129085888415611868565b90985090506001600160401b03808216908c16146112df5760405162461bcd60e51b8152600401808060200182810382526033815260200180611a586033913960400191505060405180910390fd5b6001600160401b03808c16600081815260026020818152604080842080546001600160a01b031916331790558e86168e529383526001808252928490208d518154961667ffffffffffffffff199096169590951785558c81015192850192909255918b01519183019190915560608a015180518b939261136692600385019291019061194d565b50506003546001600160401b03600160401b9091048116908d16111590506113ae576003805467ffffffffffffffff60401b1916600160401b6001600160401b038e16021790555b7f4042c1020a8f410fb1c8859d276ab436aeb2c3074960e48467299cf1c966d3b48b8a8a602001518560405180856001600160401b03166001600160401b03168152602001846001600160401b03166001600160401b031681526020018381526020018215151515815260200194505050505060405180910390a15060019c9b505050505050505050505050565b6002602052600090815260409020546001600160a01b031681565b61100381565b6001600160401b03166000908152600260205260409020546001600160a01b031690565b6001600160401b0381166000908152600260205260408120546001600160a01b03161515806114bd57506003546001600160401b038381169116145b92915050565b60005460ff161561151b576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b6000806115426040518061024001604052806102208152602001611b38610220913961181d565b81516004559092509050611554611908565b600061156284846000611868565b60008083526001600160401b038281168252600160208181526040938490208651815467ffffffffffffffff19169416939093178355808601519183019190915591840151600282015560608401518051949650929450859390926115ce92600385019291019061194d565b50506003805467ffffffffffffffff19166001600160401b0384811691821767ffffffffffffffff60401b1916600160401b9290920291909117918290556000805460ff19166001179055662386f26fc10000600555602085810151604080519490931684529083015280517f5ac9b37d571677b80957ca05693f371526c602fd08042b416a29fdab7efefa499350918290030190a150505050565b6003546001600160401b031681565b600354600160401b90046001600160401b031681565b6040518061024001604052806102208152602001611b38610220913981565b61100081565b600381565b61100481565b6000816040516020018082805190602001908083835b602083106116f45780518252601f1990920191602091820191016116d5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b602083106117625780518252601f199092019160209182019101611743565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60200190565b60008460600151518284010392506000806117cf876060015161181d565b90925090506117df828683611827565b5050506040840151601f1983810191909152602090940151603f19830152605f19820192909252600454606719820152910160871990910152600190565b8051602090910191565b5b60208110611847578251825260209283019290910190601f1901611828565b915181516020939093036101000a6000190180199091169216919091179052565b611870611908565b600884015160288501516048909501805190956000929161188f611908565b6020810183905260408101829052866118fa5760008060688a036040519080825280601f01601f1916602001820160405280156118d3576020820181803683370190505b50606084018190526118e49061181d565b90925090506118f760208c018383611827565b50505b989297509195505050505050565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518061100001604052806080906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061198e57805160ff19168380011785556119bb565b828001600101855582156119bb579182015b828111156119bb5782518255916020019190600101906119a0565b506119c79291506119cb565b5090565b61080f91905b808211156119c757600081556001016119d156fe6661696c656420746f2073657269616c697a6520636f6e73656e7375732073746174656661696c656420746f206c6f61642076616c696461746f722073657420646174616c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d617463686865616465722068656967687420646f65736e277420657175616c20746f207468652073706563696669656420686569676874746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577526577617264466f7256616c696461746f725365744368616e6765206f7574206f662072616e6765746865206d73672073656e646572206973206e6f7420612077686974656c6162656c2072656c6179657263616e27742073796e6320686561646572206265666f726520696e697469616c48656967687442696e616e63652d436861696e2d5469677269730000000000000000000000000000000006915167cedaf7bbf7df47d932fdda630527ee648562cf3e52c5e5f46156a3a971a4ceb443c53a50d8653ef8cf1e5716da68120fb51b636dc6d111ec3277b098ecd42d49d3769d8a1f78b4c17a965f7a30d4181fabbd1f969f46d3c8e83b5ad4845421d8000000e8d4a510002ba4e81542f437b7ae1f8a35ddb233c789a8dc22734377d9b6d63af1ca403b61000000e8d4a51000df8da8c5abfdb38595391308bb71e5a1e0aabdc1d0cf38315d50d6be939b2606000000e8d4a51000b6619edca4143484800281d698b70c935e9152ad57b31d85c05f2f79f64b39f3000000e8d4a510009446d14ad86c8d2d74780b0847110001a1c2e252eedfea4753ebbbfce3a22f52000000e8d4a510000353c639f80cc8015944436dab1032245d44f912edc31ef668ff9f4a45cd0599000000e8d4a51000e81d3797e0544c3a718e1f05f0fb782212e248e784c1a851be87e77ae0db230e000000e8d4a510005e3fcda30bd19d45c4b73688da35e7da1fce7c6859b2c1f20ed5202d24144e3e000000e8d4a51000b06a59a2d75bf5d014fce7c999b5e71e7a960870f725847d4ba3235baeaa08ef000000e8d4a510000c910e2fe650e4e01406b3310b489fb60a84bc3ff5c5bee3a56d5898b6a8af32000000e8d4a5100071f2d7b8ec1c8b99a653429b0118cd201f794f409d0fea4d65b1b662f2b00063000000e8d4a51000a2646970667358221220fb8b53bdce206113a24d3b8bc0be2f8f42197b57532be92e2ab23b199c941c8064736f6c63430006040033", + }, + { + ContractAddr: common.HexToAddress(CrossChainContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "608060405234801561001057600080fd5b50600436106102695760003560e01c80637942fd0511610151578063c27cdcfb116100c3578063e1c7392a11610087578063e1c7392a14610775578063e3b048051461077d578063f7a251d71461079d578063f9a2bbc714610815578063fc3e59081461081d578063fd6a68791461082557610269565b8063c27cdcfb1461070e578063c81b16621461072e578063d31f968d14610736578063d76a867514610765578063dc927faf1461076d57610269565b80639dc09262116101155780639dc0926214610630578063a1a11bf514610638578063a78abc1614610640578063ab51bb9614610648578063ac43175114610650578063b0355f5b1461048057610269565b80637942fd051461053b57806384013b6a14610543578063863fe4ab146106205780638cc8f5611461051b57806396713da91461062857610269565b8063422f9050116101ea5780636e47a51a116101ae5780636e47a51a146104f35780636e47b4821461051357806370fd5bad1461051b578063718a8aa81461052357806374f079b81461052b57806375d47a0a1461053357610269565b8063422f90501461048857806343756e5c146104bc578063493279b1146104c45780634bf6c882146104e357806351e80672146104eb57610269565b80632ff32aea116102315780632ff32aea146102f3578063308325f4146103145780633a648b151461031c5780633bdc47a6146103585780633dffc3871461048057610269565b806305e682581461026e5780630bee7a671461028c5780630e2374a5146102ad57806314b3023b146102d157806322556cdc146102eb575b600080fd5b61027661082d565b6040805160ff9092168252519081900360200190f35b610294610832565b6040805163ffffffff9092168252519081900360200190f35b6102b5610837565b604080516001600160a01b039092168252519081900360200190f35b6102d961083d565b60408051918252519081900360200190f35b6102d9610843565b6102fb610848565b60408051600792830b90920b8252519081900360200190f35b6102d9610851565b61033c6004803603602081101561033257600080fd5b503560ff16610857565b604080516001600160401b039092168252519081900360200190f35b61040b6004803603606081101561036e57600080fd5b60ff82351691602081013591810190606081016040820135600160201b81111561039757600080fd5b8201836020820111156103a957600080fd5b803590602001918460018302840111600160201b831117156103ca57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610872945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044557818101518382015260200161042d565b50505050905090810190601f1680156104725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102766108e8565b6104a86004803603602081101561049e57600080fd5b503560ff166108ed565b604080519115158252519081900360200190f35b6102b5610902565b6104cc610908565b6040805161ffff9092168252519081900360200190f35b61027661090d565b6102b5610912565b6102b56004803603602081101561050957600080fd5b503560ff16610918565b6102b5610933565b610276610939565b61027661093e565b6102d9610943565b6102b5610949565b61027661094f565b61061e600480360360a081101561055957600080fd5b810190602081018135600160201b81111561057357600080fd5b82018360208201111561058557600080fd5b803590602001918460018302840111600160201b831117156105a657600080fd5b919390929091602081019035600160201b8111156105c357600080fd5b8201836020820111156105d557600080fd5b803590602001918460018302840111600160201b831117156105f657600080fd5b919350915080356001600160401b03908116916020810135909116906040013560ff16610954565b005b6102d9611c4d565b610276611c55565b6102b5611c5a565b6102b5611c60565b6104a8611c66565b61029461082d565b61061e6004803603604081101561066657600080fd5b810190602081018135600160201b81111561068057600080fd5b82018360208201111561069257600080fd5b803590602001918460018302840111600160201b831117156106b357600080fd5b919390929091602081019035600160201b8111156106d057600080fd5b8201836020820111156106e257600080fd5b803590602001918460018302840111600160201b8311171561070357600080fd5b509092509050611c6f565b61033c6004803603602081101561072457600080fd5b503560ff16612211565b6102b561222c565b6104a86004803603604081101561074c57600080fd5b5080356001600160a01b0316906020013560ff16612232565b61040b612252565b6102b5612271565b61061e612277565b61033c6004803603602081101561079357600080fd5b503560ff1661262e565b61061e600480360360608110156107b357600080fd5b60ff8235169190810190604081016020820135600160201b8111156107d757600080fd5b8201836020820111156107e957600080fd5b803590602001918460018302840111600160201b8311171561080a57600080fd5b919350915035612649565b6102b561279a565b6102766127a0565b6102b56127a5565b600081565b606481565b61200181565b60015481565b603281565b60045460070b81565b60025481565b600a602052600090815260409020546001600160401b031681565b60606000825160210190506060816040519080825280601f01601f1916602001820160405280156108aa576020820181803683370190505b50602181018690526001810187905282815290506041810160006108cd866127ab565b5090506108dc818388516127b5565b50909695505050505050565b600181565b60096020526000908152604090205460ff1681565b61100181565b603881565b600881565b61200081565b6005602052600090815260409020546001600160a01b031681565b61100581565b600281565b601081565b60035481565b61100881565b600b81565b60005460ff166109a7576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60408051630a83aaa960e31b815233600482015290516110069163541d5548916024808301926020929190829003018186803b1580156109e657600080fd5b505afa1580156109fa573d6000803e3d6000fd5b505050506040513d6020811015610a1057600080fd5b5051610a63576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b73b005741528b86f5952469d80a8614591e3c5b632331480610a98575073446aa6e0dc65690403df3f127750da1322941f3e33145b610ad35760405162461bcd60e51b815260040180806020018281038252602a815260200180612d5a602a913960400191505060405180910390fd5b60ff8116600090815260086020526040902054829082906001600160401b039081169083168114610b43576040805162461bcd60e51b815260206004820152601560248201527439b2b8bab2b731b2903737ba1034b71037b93232b960591b604482015290519081900360640190fd5b60ff8216600090815260086020908152604091829020805467ffffffffffffffff1916600185016001600160401b039081169190911790915582516337d7f9c160e21b81529089166004820152915188926110039263df5fe70492602480840193829003018186803b158015610bb857600080fd5b505afa158015610bcc573d6000803e3d6000fd5b505050506040513d6020811015610be257600080fd5b5051610c1f5760405162461bcd60e51b8152600401808060200182810382526023815260200180612db66023913960400191505060405180910390fd5b60ff851660009081526005602052604090205485906001600160a01b0316610c8e576040805162461bcd60e51b815260206004820152601860248201527f6368616e6e656c206973206e6f7420737570706f727465640000000000000000604482015290519081900360640190fd5b60ff86166000908152600a6020526040902054889087906001600160401b039081169083161015610cf7576040805162461bcd60e51b815260206004820152600e60248201526d3a37b79037b632103432b0b232b960911b604482015290519081900360640190fd5b60ff81166000908152600a60205260409020546001600160401b03838116911614610d495760ff81166000908152600a60205260409020805467ffffffffffffffff19166001600160401b0384161790555b60608e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060608d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050610e8d6110036001600160a01b031663cba510a98e6040518263ffffffff1660e01b815260040180826001600160401b03166001600160401b0316815260200191505060206040518083038186803b158015610e3657600080fd5b505afa158015610e4a573d6000803e3d6000fd5b505050506040513d6020811015610e6057600080fd5b505160408051808201909152600381526269626360e81b6020820152610e868e8e6127f6565b858561283d565b610ed5576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b604482015290519081900360640190fd5b60408051631bb5062960e31b81526001600160401b038e16600482015290516000916110039163dda8314891602480820192602092909190829003018186803b158015610f2157600080fd5b505afa158015610f35573d6000803e3d6000fd5b505050506040513d6020811015610f4b57600080fd5b505190508b8b600080806060610f608961293a565b935093509350935083611022578460ff16866001600160401b03167ff7b2e42d694eb1100184aae86d4245d9e46966100b1dc7e723275b98326854ac8b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610fda578181015183820152602001610fc2565b50505050905090810190601f1680156110075780820380516001836020036101000a031916815260200191505b509250505060405180910390a3505050505050505050611c3d565b6040805160ff85811682529151918716916001600160401b038916917f36afdaf439a8f43fe72135135d804ae620b37a474f0943b5b85f6788312cad40919081900360200190a360ff83166115a75760ff85166000818152600560209081526040808320548151631182b87560e01b815260048101958652602481019283528651604482015286516001600160a01b03909216958695631182b875958d958a9593949093606490910192918601918190849084905b838110156110ef5781810151838201526020016110d7565b50505050905090810190601f16801561111c5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561113c57600080fd5b505af192505050801561122057506040513d6000823e601f3d908101601f19168201604052602081101561116f57600080fd5b8101908080516040519392919084600160201b82111561118e57600080fd5b9083019060208201858111156111a357600080fd5b8251600160201b8111828201881017156111bc57600080fd5b82525081516020918201929091019080838360005b838110156111e95781810151838201526020016111d1565b50505050905090810190601f1680156112165780820380516001836020036101000a031916815260200191505b5060405250505060015b611532576040516000815260443d101561123c575060006112d7565b60046000803e60005160e01c6308c379a0811461125d5760009150506112d7565b60043d036004833e81513d60248201116001600160401b0382111715611288576000925050506112d7565b80830180516001600160401b038111156112a95760009450505050506112d7565b8060208301013d86018111156112c7576000955050505050506112d7565b601f01601f191660405250925050505b806112e257506113f4565b60ff8716600090815260076020526040812054611319916001600160401b039091169089906113149060029088610872565b6129ea565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf948794849390840192918601918190849084905b838110156113b457818101518382015260200161139c565b50505050905090810190601f1680156113e15780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061152d565b3d80801561141e576040519150601f19603f3d011682016040523d82523d6000602084013e611423565b606091505b5060ff8716600090815260076020526040812054611456916001600160401b039091169089906113149060029088610872565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351948794849390840192918601918190849084905b838110156114f15781810151838201526020016114d9565b50505050905090810190601f16801561151e5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6115a1565b80511561159f5760ff871660009081526007602052604081205461156b916001600160401b039091169089906113149060019086610872565b60ff8716600090815260076020526040902080546001600160401b038082166001011667ffffffffffffffff199091161790555b505b50611b75565b60ff83166001141561184b5760ff8516600081815260056020908152604080832054815163831d65d160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563831d65d1958d958a9593949093606490910192918601918190849084905b83811015611631578181015183820152602001611619565b50505050905090810190601f16801561165e5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561167e57600080fd5b505af192505050801561168f575060015b6115a1576040516000815260443d10156116ab57506000611746565b60046000803e60005160e01c6308c379a081146116cc576000915050611746565b60043d036004833e81513d60248201116001600160401b03821117156116f757600092505050611746565b80830180516001600160401b03811115611718576000945050505050611746565b8060208301013d860181111561173657600095505050505050611746565b601f01601f191660405250925050505b8061175157506117b6565b60408051602080825283518183015283516001600160a01b038616937ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf93869390928392830191850190808383600083156113b457818101518382015260200161139c565b3d8080156117e0576040519150601f19603f3d011682016040523d82523d6000602084013e6117e5565b606091505b5060408051602080825283518183015283516001600160a01b038616937f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd297735193869390928392830191850190808383600083156114f15781810151838201526020016114d9565b60ff831660021415611b755760ff8516600081815260056020908152604080832054815163c8509d8160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563c8509d81958d958a9593949093606490910192918601918190849084905b838110156118d55781810151838201526020016118bd565b50505050905090810190601f1680156119025780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561192257600080fd5b505af1925050508015611933575060015b611b73576040516000815260443d101561194f575060006119ea565b60046000803e60005160e01c6308c379a081146119705760009150506119ea565b60043d036004833e81513d60248201116001600160401b038211171561199b576000925050506119ea565b80830180516001600160401b038111156119bc5760009450505050506119ea565b8060208301013d86018111156119da576000955050505050506119ea565b601f01601f191660405250925050505b806119f55750611a9e565b816001600160a01b03167ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611a5e578181015183820152602001611a46565b50505050905090810190601f168015611a8b5780820380516001836020036101000a031916815260200191505b509250505060405180910390a250611b73565b3d808015611ac8576040519150601f19603f3d011682016040523d82523d6000602084013e611acd565b606091505b50816001600160a01b03167f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611b37578181015183820152602001611b1f565b50505050905090810190601f168015611b645780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b505b60ff80861660009081526009602052604090205461100591636f93d2e6918a91339187911680611ba7575060ff881615155b604080516001600160e01b031960e088901b1681526001600160a01b039586166004820152939094166024840152604483019190915215156064820152905160848083019260209291908290030181600087803b158015611c0757600080fd5b505af1158015611c1b573d6000803e3d6000fd5b505050506040513d6020811015611c3157600080fd5b50505050505050505050505b5050505050505050505050505050565b630100380081565b600981565b61100781565b61100681565b60005460ff1681565b3361100714611caf5760405162461bcd60e51b815260040180806020018281038252602e815260200180612ce2602e913960400191505060405180910390fd5b611d1884848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526012815271626174636853697a65466f724f7261636c6560701b60208201529150612b409050565b15611db357604080516020601f8401819004810282018101909252828152600091611d5b91858580838501838280828437600092019190915250612c2792505050565b90506127108111158015611d705750600a8110155b611dab5760405162461bcd60e51b8152600401808060200182810382526032815260200180612d846032913960400191505060405180910390fd5b60015561217f565b611e1c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601281527118591913dc955c19185d1950da185b9b995b60721b60208201529150612b409050565b15611fa457606082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505082519293505060169091149050611e9f5760405162461bcd60e51b815260040180806020018281038252605a815260200180612c88605a913960600191505060405180910390fd5b60018101516002820151601683015160ff82161590611ebd81612c2c565b611f0e576040805162461bcd60e51b815260206004820152601960248201527f61646472657373206973206e6f74206120636f6e747261637400000000000000604482015290519081900360640190fd5b60ff8416600081815260056020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600683528184208585528352818420805460ff199081166001179091556009909352818420805490931687151517909255519092917f7e3b6af43092577ee20e60eaa1d9b114a7031305c895ee7dd3ffe17196d2e1e091a3505050505061217f565b61201184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526016815275195b98589b1953dc911a5cd8589b1950da185b9b995b60521b60208201529150612b409050565b1561214257606082828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050825192935050600290911490506120945760405162461bcd60e51b815260040180806020018281038252604a815260200180612d10604a913960600191505060405180910390fd5b600181810151600283015160ff80831660009081526005602052604090205492939192908316909114906001600160a01b03168015612138576001600160a01b038116600090815260066020908152604080832060ff881680855290835292819020805460ff1916861515908117909155815190815290517fa3132e3f9819fbddc7f0ed6d38d7feef59aa95112090b7c592f5cb5bc4aa4adc929181900390910190a25b505050505061217f565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b6008602052600090815260409020546001600160401b031681565b61100281565b600660209081526000928352604080842090915290825290205460ff1681565b6040518060400160405280600381526020016269626360e81b81525081565b61100381565b60005460ff16156122cf576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b7f1471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b80546001600160a01b0319908116611008179091557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36805460ff199081169091557fd8af288fc1c8680b4f4706064cf021e264efb6828fcaf7eb5ca36818eb365bcc8054821660019081179091557f89832631fb3c3307a103ba2c84ab569c64d6182a18893dcd163f0f1c2090733a805484166110049081179091557f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c38054841690557f72e4efa1513b071517c6c74dba31b5934a81aa83cddd400e7081df5529c9943680548416831790557fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc08054851690911790557fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e78054831690557f4e523af77f034e9810f1c94057f5e931fb3d16a51511a4c3add793617d18610580548316821790557ffb33122aa9f93cc639ebe80a7bc4784c11e6053dde89c6f4f7e268c6a623da1e805484166110001790557fc7694af312c4f286114180fd0ba6a52461fcee8a381636770b19a343af92538a80548316821790557f01112dd68e482ba8d68a7e828cff8b3abcea08eab88941953c180a7e650e9cd480548316821790557fc0a4a8be475dfebc377ebef2d7c4ff47656f572a08dd92b81017efcdba0febe1805484166110071790557f87e8a52529e8ece4ef759037313542a6429ff494a9fab9027fb79db90124eba680548316821790557f4c7666bbcb22d46469f7cc282f70764a7012dca2cce630ff8d83db9a9cdd48f080548316821790557f40f28f99a40bc9f6beea1013afdbc3cdcc689eb76b82c4de06c0acf1e1932ed58054909316611001179092557f0d9cf2cd531699eed8dd34e40ff2884a14a698c4898184fba85194e6f6772d248054821683179055600b60009081527f23f68c9bd22b8a93d06adabe17481c87c016bcbd20adc8bfd707a4d813a572176020527fdf0d5d05428057f5455c2dc8e810dd86d1e9350faa72f16bda8a45443c5b39328054831684179055603283556004805467ffffffffffffffff19166001600160401b031790556002819055600381905580549091169091179055565b6007602052600090815260409020546001600160401b031681565b60005460ff1661269c576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33600090815260066020908152604080832060ff80891685529252909120548591166126f95760405162461bcd60e51b8152600401808060200182810382526031815260200180612c576031913960400191505060405180910390fd5b60ff85166000908152600760209081526040808320548151601f88018490048402810184019092528682526001600160401b03169261275e9284928a9261131492909189918c908c908190840183828082843760009201919091525061087292505050565b60ff959095166000908152600760205260409020805467ffffffffffffffff191660019096016001600160401b03169590951790945550505050565b61100081565b600381565b61100481565b8051602090910191565b5b602081106127d5578251825260209283019290910190601f19016127b6565b915181516020939093036101000a6000190180199091169216919091179052565b60408051600e808252818301909252606091630100380060ff851617918391602082018180368337505050600e818101969096526006810192909252509283525090919050565b60008561284c57506000612931565b606082518451865160800101016040519080825280601f01601f191660200182016040528015612883576020820181803683370190505b509050600061289182612c32565b6020808901518252019050866000806128a9896127ab565b80865260209095019490925090506128c28285836127b5565b928301926128cf886127ab565b80865260209095019490925090506128e88285836127b5565b9283018a8152602001926128fb876127ab565b909250905061290b8285836127b5565b508351602001612919612c38565b60208183886065600019fa5051600114955050505050505b95945050505050565b6000806000606060218551101561296a5750506040805160008082526020820190925290925082915081906129e3565b600185015160218601518651604080516020198301808252601f19600119909401939093168101602001909152604189019392916060919080156129b5576020820181803683370190505b50905060006129c3826127ab565b5090506129d5858260218d51036127b5565b506001975091955093509150505b9193509193565b600254431115612a29576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b161790915560035543600255612a6a565b60038054600190810191829055541015612a6a576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b16179091556003555b8160ff16836001600160401b0316600460009054906101000a900460070b6001600160401b03167f3a6e0fc61675aa2a100bcba0568368bb92bcec91c97673391074f11138f0cffe603885604051808361ffff1661ffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b00578181015183820152602001612ae8565b50505050905090810190601f168015612b2d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a4505050565b6000816040516020018082805190602001908083835b60208310612b755780518252601f199092019160209182019101612b56565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612be35780518252601f199092019160209182019101612bc4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b3b151590565b60200190565b6040518060200160405280600190602082028036833750919291505056fe74686520636f6e747261637420616e64206368616e6e656c2068617665206e6f74206265656e20726567697374657265646c656e677468206f662076616c756520666f72206164644f725570646174654368616e6e656c2073686f756c642062652032322c206368616e6e656c49643a697346726f6d53797374656d3a68616e646c657241646472657373746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662076616c756520666f7220656e61626c654f7244697361626c654368616e6e656c2073686f756c6420626520322c206368616e6e656c49643a6973456e61626c65746865206d73672073656e646572206973206e6f7420612077686974656c6162656c2072656c61796572746865206e6577426174636853697a65466f724f7261636c652073686f756c6420626520696e205b31302c2031303030305d6c6967687420636c69656e74206e6f742073796e632074686520626c6f636b20796574a2646970667358221220273761c387b9ebd0b15a5a47689f1de8e0168465c6b2da4606f3abaa43a17fef64736f6c63430006040033", + }, + }, + } + + moranUpgrade[chapelNet] = &Upgrade{ + UpgradeName: "moran", + Configs: []*UpgradeConfig{ + { + ContractAddr: common.HexToAddress(RelayerHubContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "6080604052600436106101d85760003560e01c80637ae2308811610102578063c81b166211610095578063f9a2bbc711610064578063f9a2bbc714610569578063fb7cfdd71461057e578063fc3e590814610593578063fd6a6879146105a8576101d8565b8063c81b166214610515578063dc927faf1461052a578063e1c7392a1461053f578063e79a198f14610554576101d8565b8063a1a11bf5116100d1578063a1a11bf514610407578063a78abc161461041c578063ab51bb9614610431578063ac43175114610446576101d8565b80637ae23088146103b357806395468d26146103c857806396713da9146103dd5780639dc09262146103f2576101d8565b806351e806721161017a57806370fd5bad1161014957806370fd5bad1461035f578063718a8aa81461037457806375d47a0a146103895780637942fd051461039e576101d8565b806351e80672146102c7578063541d5548146102dc5780636a87d780146103235780636e47b4821461034a576101d8565b80633dffc387116101b65780633dffc3871461024657806343756e5c14610271578063493279b1146102865780634bf6c882146102b2576101d8565b80630bee7a67146101dd5780630e2374a51461020b5780631aa3a0081461023c575b600080fd5b3480156101e957600080fd5b506101f26105bd565b6040805163ffffffff9092168252519081900360200190f35b34801561021757600080fd5b506102206105c2565b604080516001600160a01b039092168252519081900360200190f35b6102446105c8565b005b34801561025257600080fd5b5061025b610749565b6040805160ff9092168252519081900360200190f35b34801561027d57600080fd5b5061022061074e565b34801561029257600080fd5b5061029b610754565b6040805161ffff9092168252519081900360200190f35b3480156102be57600080fd5b5061025b610759565b3480156102d357600080fd5b5061022061075e565b3480156102e857600080fd5b5061030f600480360360208110156102ff57600080fd5b50356001600160a01b0316610764565b604080519115158252519081900360200190f35b34801561032f57600080fd5b50610338610782565b60408051918252519081900360200190f35b34801561035657600080fd5b50610220610788565b34801561036b57600080fd5b5061025b61078e565b34801561038057600080fd5b5061025b610793565b34801561039557600080fd5b50610220610798565b3480156103aa57600080fd5b5061025b61079e565b3480156103bf57600080fd5b506103386107a3565b3480156103d457600080fd5b506103386107b0565b3480156103e957600080fd5b5061025b6107bc565b3480156103fe57600080fd5b506102206107c1565b34801561041357600080fd5b506102206107c7565b34801561042857600080fd5b5061030f6107cd565b34801561043d57600080fd5b506101f26107d6565b34801561045257600080fd5b506102446004803603604081101561046957600080fd5b81019060208101813564010000000081111561048457600080fd5b82018360208201111561049657600080fd5b803590602001918460018302840111640100000000831117156104b857600080fd5b9193909290916020810190356401000000008111156104d657600080fd5b8201836020820111156104e857600080fd5b8035906020019184600183028401116401000000008311171561050a57600080fd5b5090925090506107db565b34801561052157600080fd5b50610220610bfd565b34801561053657600080fd5b50610220610c03565b34801561054b57600080fd5b50610244610c09565b34801561056057600080fd5b50610244610c8b565b34801561057557600080fd5b50610220610e44565b34801561058a57600080fd5b50610338610e4a565b34801561059f57600080fd5b5061025b610e50565b3480156105b457600080fd5b50610220610e55565b606481565b61200181565b3360009081526004602052604090205460ff1615610625576040805162461bcd60e51b81526020600482015260156024820152741c995b185e595c88185b1c9958591e48195e1a5cdd605a1b604482015290519081900360640190fd5b60005460ff16610678576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b61068133610e5b565b156106bd5760405162461bcd60e51b81526004018080602001828103825260278152602001806110486027913960400191505060405180910390fd5b333214610707576040805162461bcd60e51b81526020600482015260136024820152721b9bc81c1c9bde1e481a5cc8185b1b1bddd959606a1b604482015290519081900360640190fd5b6040805162461bcd60e51b81526020600482015260126024820152711c9959da5cdd195c881cdd5cdc195b99195960721b604482015290519081900360640190fd5b600181565b61100181565b606181565b600881565b61200081565b6001600160a01b031660009081526004602052604090205460ff1690565b60025481565b61100581565b600281565b601081565b61100881565b600b81565b68056bc75e2d6310000081565b67016345785d8a000081565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661082e576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b336110071461086e5760405162461bcd60e51b815260040180806020018281038252602e81526020018061106f602e913960400191505060405180910390fd5b6108d484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600f81526e1c995c5d5a5c995911195c1bdcda5d608a1b60208201529150610e619050565b156109d757602081146109185760405162461bcd60e51b815260040180806020018281038252602281526020018061109d6022913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161095691858580838501838280828437600092019190915250610f4892505050565b90506001811180156109715750683635c9adc5dea000008111155b801561097e575060025481115b6109cf576040805162461bcd60e51b815260206004820181905260248201527f7468652072657175697265644465706f736974206f7574206f662072616e6765604482015290519081900360640190fd5b600155610b6b565b610a3284848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260048152636475657360e01b60208201529150610e619050565b15610b2e5760208114610a8c576040805162461bcd60e51b815260206004820152601760248201527f6c656e677468206f662064756573206d69736d61746368000000000000000000604482015290519081900360640190fd5b604080516020601f8401819004810282018101909252828152600091610aca91858580838501838280828437600092019190915250610f4892505050565b9050600081118015610add575060015481105b610b26576040805162461bcd60e51b81526020600482015260156024820152747468652064756573206f7574206f662072616e676560581b604482015290519081900360640190fd5b600255610b6b565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b61100281565b61100381565b60005460ff1615610c61576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b68056bc75e2d63100000600190815567016345785d8a00006002556000805460ff19169091179055565b3360009081526004602052604090205460ff16610ce6576040805162461bcd60e51b81526020600482015260146024820152731c995b185e595c88191bc81b9bdd08195e1a5cdd60621b604482015290519081900360640190fd5b60005460ff16610d39576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b610d4161102d565b5033600081815260036020908152604091829020825180840190935280548084526001909101549183018290529192916108fc91610d85919063ffffffff610f4d16565b6040518115909202916000818181858888f19350505050158015610dad573d6000803e3d6000fd5b50602081015160405161100291829181156108fc0291906000818181858888f19350505050158015610de3573d6000803e3d6000fd5b50336000818152600460209081526040808320805460ff191690556003825280832083815560010192909255815192835290517fd17202129b83db7880d6b9f25df81c58ad46f7e0e2c92236b1aa10663a4876679281900390910190a15050565b61100081565b60015481565b600381565b61100481565b3b151590565b6000816040516020018082805190602001908083835b60208310610e965780518252601f199092019160209182019101610e77565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310610f045780518252601f199092019160209182019101610ee5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b6000610f8f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f96565b9392505050565b600081848411156110255760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fea578181015183820152602001610fd2565b50505050905090810190601f1680156110175780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60405180604001604052806000815260200160008152509056fe636f6e7472616374206973206e6f7420616c6c6f77656420746f20626520612072656c61796572746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662072657175697265644465706f736974206d69736d61746368a2646970667358221220bbf2444a200f2d4960875a9cb3258cef8b5f4e79c03999d34530f4a42b7aefd364736f6c63430006040033", + }, + { + ContractAddr: common.HexToAddress(LightClientContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "608060405234801561001057600080fd5b50600436106102275760003560e01c8063a1a11bf511610130578063dc927faf116100b8578063e405bbc31161007c578063e405bbc3146106a7578063ea54b2aa146106af578063f9a2bbc7146106b7578063fc3e5908146106bf578063fd6a6879146106c757610227565b8063dc927faf14610627578063dda831481461062f578063df5fe70414610655578063e1c7392a1461067b578063e2761af01461068357610227565b8063adc879e9116100ff578063adc879e914610552578063c81b16621461055a578063cba510a914610562578063d816987914610588578063da8d08f01461060157610227565b8063a1a11bf514610462578063a78abc161461046a578063ab51bb9614610486578063ac4317511461048e57610227565b8063564b81ef116101b3578063718a8aa811610182578063718a8aa81461043a57806375d47a0a146104425780637942fd051461044a57806396713da9146104525780639dc092621461045a57610227565b8063564b81ef146102e85780635c5ae8db146103655780636e47b4821461042a57806370fd5bad1461043257610227565b80633dffc387116101fa5780633dffc3871461029357806343756e5c146102b1578063493279b1146102b95780634bf6c882146102d857806351e80672146102e057610227565b80630bee7a671461022c5780630e2374a51461024d5780632657e9b61461027157806333f7798d1461028b575b600080fd5b6102346106cf565b6040805163ffffffff9092168252519081900360200190f35b6102556106d4565b604080516001600160a01b039092168252519081900360200190f35b6102796106da565b60408051918252519081900360200190f35b6102796106e5565b61029b6106eb565b6040805160ff9092168252519081900360200190f35b6102556106f0565b6102c16106f6565b6040805161ffff9092168252519081900360200190f35b61029b6106fb565b610255610700565b6102f0610706565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032a578181015183820152602001610312565b50505050905090810190601f1680156103575780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61038b6004803603602081101561037b57600080fd5b50356001600160401b0316610812565b60405180856001600160401b03166001600160401b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103ec5781810151838201526020016103d4565b50505050905090810190601f1680156104195780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6102556108cd565b61029b6108d3565b61029b6108d8565b6102556108dd565b61029b6108e3565b61029b6108e8565b6102556108ed565b6102556108f3565b6104726108f9565b604080519115158252519081900360200190f35b610234610902565b610550600480360360408110156104a457600080fd5b8101906020810181356401000000008111156104bf57600080fd5b8201836020820111156104d157600080fd5b803590602001918460018302840111640100000000831117156104f357600080fd5b91939092909160208101903564010000000081111561051157600080fd5b82018360208201111561052357600080fd5b8035906020019184600183028401116401000000008311171561054557600080fd5b509092509050610907565b005b610279610bc0565b610255610bc6565b6102796004803603602081101561057857600080fd5b50356001600160401b0316610bcc565b6104726004803603604081101561059e57600080fd5b8101906020810181356401000000008111156105b957600080fd5b8201836020820111156105cb57600080fd5b803590602001918460018302840111640100000000831117156105ed57600080fd5b9193509150356001600160401b0316610beb565b6102556004803603602081101561061757600080fd5b50356001600160401b031661143c565b610255611457565b6102556004803603602081101561064557600080fd5b50356001600160401b031661145d565b6104726004803603602081101561066b57600080fd5b50356001600160401b0316611481565b6105506114c3565b61068b611668565b604080516001600160401b039092168252519081900360200190f35b61068b611677565b6102f061168d565b6102556116aa565b61029b6116b0565b6102556116b5565b606481565b61200181565b662386f26fc1000081565b60055481565b600181565b61100181565b606181565b600881565b61200081565b604080516020808252818301909252606091829190602082018180368337505060045460208301525090506000805b60208160ff16101561077c57828160ff168151811061075057fe5b01602001516001600160f81b0319161561076f57600190910190610774565b61077c565b600101610735565b5060608160ff166040519080825280601f01601f1916602001820160405280156107ad576020820181803683370190505b50905060005b8260ff168160ff16101561080957838160ff16815181106107d057fe5b602001015160f81c60f81b828260ff16815181106107ea57fe5b60200101906001600160f81b031916908160001a9053506001016107b3565b50925050505b90565b60016020818152600092835260409283902080548184015460028084015460038501805489516101009982161599909902600019011692909204601f81018790048702880187019098528787526001600160401b0390931696919592949091908301828280156108c35780601f10610898576101008083540402835291602001916108c3565b820191906000526020600020905b8154815290600101906020018083116108a657829003601f168201915b5050505050905084565b61100581565b600281565b601081565b61100881565b600b81565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661095e576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b336110071461099e5760405162461bcd60e51b815260040180806020018281038252602e815260200180611b67602e913960400191505060405180910390fd5b610a1284848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601b81527f726577617264466f7256616c696461746f725365744368616e67650000000000602082015291506116bb9050565b15610af15760208114610a565760405162461bcd60e51b815260040180806020018281038252602e815260200180611b06602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a94918585808385018382808284376000920191909152506117a292505050565b9050600081118015610aae5750670de0b6b3a76400008111155b610ae95760405162461bcd60e51b815260040180806020018281038252602f815260200180611b95602f913960400191505060405180910390fd5b600555610b2e565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60045481565b61100281565b6001600160401b03166000908152600160208190526040909120015490565b60408051630a83aaa960e31b815233600482015290516000916110069163541d554891602480820192602092909190829003018186803b158015610c2e57600080fd5b505afa158015610c42573d6000803e3d6000fd5b505050506040513d6020811015610c5857600080fd5b5051610cab576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b739fb29aac15b9a4b7f17c3385939b007540f4d791331480610ce057507337b8516a0f88e65d677229b402ec6c1e0e33300433145b610d1b5760405162461bcd60e51b815260040180806020018281038252602a815260200180611bc4602a913960400191505060405180910390fd5b6001600160401b0382166000908152600260205260409020546001600160a01b031615610d8f576040805162461bcd60e51b815260206004820152601c60248201527f63616e27742073796e63206475706c6963617465642068656164657200000000604482015290519081900360640190fd5b6003546001600160401b0390811690831611610ddc5760405162461bcd60e51b8152600401808060200182810382526026815260200180611bee6026913960400191505060405180910390fd5b600354600160401b90046001600160401b0316610df7611904565b6001600160401b0382811660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f81018490048402850184019095528484529093606086019392830182828015610ebd5780601f10610e9257610100808354040283529160200191610ebd565b820191906000526020600020905b815481529060010190602001808311610ea057829003601f168201915b50505050508152505090505b836001600160401b0316826001600160401b031610158015610efa57506003546001600160401b0390811690831610155b15610fdb5780516001600160401b0380821660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f8101849004840285018401909552848452959750939460608601939091830182828015610fcb5780601f10610fa057610100808354040283529160200191610fcb565b820191906000526020600020905b815481529060010190602001808311610fae57829003601f168201915b5050505050815250509050610ec9565b6060810151516110d25780516001600160401b03811660009081526001602081815260409283902060030180548451600294821615610100026000190190911693909304601f81018390048302840183019094528383529395509092919083018282801561108a5780601f1061105f5761010080835404028352916020019161108a565b820191906000526020600020905b81548152906001019060200180831161106d57829003601f168201915b505050506060830182905250516110d25760405162461bcd60e51b8152600401808060200182810382526021815260200180611ae56021913960400191505060405180910390fd5b6000816060015151608801905060608787905082016040519080825280601f01601f191660200182016040528015611111576020820181803683370190505b509050600061111f826117a7565b905061112d848683866117ad565b6111685760405162461bcd60e51b81526004018080602001828103825260238152602001806119e26023913960400191505060405180910390fd5b600083820191506111ae8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061181992505050565b945090506111bd818386611823565b825160200193506111cc61192a565b6110008186866064600019fa6111e157600080fd5b805194506000600160f81b8616156112705750600554604080516309a99b4f60e41b815233600482015260248101929092525160019161100291639a99b4f0916044808201926020929091908290030181600087803b15801561124357600080fd5b505af1158015611257573d6000803e3d6000fd5b505050506040513d602081101561126d57600080fd5b50505b856001600160401b03169550602082019350600061129085888415611864565b90985090506001600160401b03808216908c16146112df5760405162461bcd60e51b8152600401808060200182810382526033815260200180611b346033913960400191505060405180910390fd5b6001600160401b03808c16600081815260026020818152604080842080546001600160a01b031916331790558e86168e529383526001808252928490208d518154961667ffffffffffffffff199096169590951785558c81015192850192909255918b01519183019190915560608a015180518b9392611366926003850192910190611949565b50506003546001600160401b03600160401b9091048116908d16111590506113ae576003805467ffffffffffffffff60401b1916600160401b6001600160401b038e16021790555b7f4042c1020a8f410fb1c8859d276ab436aeb2c3074960e48467299cf1c966d3b48b8a8a602001518560405180856001600160401b03166001600160401b03168152602001846001600160401b03166001600160401b031681526020018381526020018215151515815260200194505050505060405180910390a15060019c9b505050505050505050505050565b6002602052600090815260409020546001600160a01b031681565b61100381565b6001600160401b03166000908152600260205260409020546001600160a01b031690565b6001600160401b0381166000908152600260205260408120546001600160a01b03161515806114bd57506003546001600160401b038381169116145b92915050565b60005460ff161561151b576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b60008061154060405180610100016040528060e08152602001611a0560e09139611819565b81516004559092509050611552611904565b600061156084846000611864565b60008083526001600160401b038281168252600160208181526040938490208651815467ffffffffffffffff19169416939093178355808601519183019190915591840151600282015560608401518051949650929450859390926115cc926003850192910190611949565b50506003805467ffffffffffffffff19166001600160401b0384811691821767ffffffffffffffff60401b1916600160401b9290920291909117918290556000805460ff19166001179055662386f26fc10000600555602085810151604080519490931684529083015280517f5ac9b37d571677b80957ca05693f371526c602fd08042b416a29fdab7efefa499350918290030190a150505050565b6003546001600160401b031681565b600354600160401b90046001600160401b031681565b60405180610100016040528060e08152602001611a0560e0913981565b61100081565b600381565b61100481565b6000816040516020018082805190602001908083835b602083106116f05780518252601f1990920191602091820191016116d1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b6020831061175e5780518252601f19909201916020918201910161173f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60200190565b60008460600151518284010392506000806117cb8760600151611819565b90925090506117db828683611823565b5050506040840151601f1983810191909152602090940151603f19830152605f19820192909252600454606719820152910160871990910152600190565b8051602090910191565b5b60208110611843578251825260209283019290910190601f1901611824565b915181516020939093036101000a6000190180199091169216919091179052565b61186c611904565b600884015160288501516048909501805190956000929161188b611904565b6020810183905260408101829052866118f65760008060688a036040519080825280601f01601f1916602001820160405280156118cf576020820181803683370190505b50606084018190526118e090611819565b90925090506118f360208c018383611823565b50505b989297509195505050505050565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518061100001604052806080906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061198a57805160ff19168380011785556119b7565b828001600101855582156119b7579182015b828111156119b757825182559160200191906001019061199c565b506119c39291506119c7565b5090565b61080f91905b808211156119c357600081556001016119cd56fe6661696c656420746f2073657269616c697a6520636f6e73656e73757320737461746542696e616e63652d436861696e2d47616e67657300000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000aea1ac326886b992a991d21a6eb155f41b77867cbf659e78f31d89d8205122a84d1be64f0e9a466c2e66a53433928192783e29f8fa21beb2133499b5ef770f60000000e8d4a5100099308aa365c40554bc89982af505d85da95251445d5dd4a9bb37dd2584fd92d3000000e8d4a5100001776920ff0b0f38d78cf95c033c21adf7045785114e392a7544179652e0a612000000e8d4a510006661696c656420746f206c6f61642076616c696461746f722073657420646174616c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d617463686865616465722068656967687420646f65736e277420657175616c20746f207468652073706563696669656420686569676874746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577526577617264466f7256616c696461746f725365744368616e6765206f7574206f662072616e6765746865206d73672073656e646572206973206e6f7420612077686974656c6162656c2072656c6179657263616e27742073796e6320686561646572206265666f726520696e697469616c486569676874a2646970667358221220f10bd4cea020bbc51bd92dc8d0216f48c220336c9ca0178fb7726dc899c15ee164736f6c63430006040033", + }, + { + ContractAddr: common.HexToAddress(CrossChainContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "608060405234801561001057600080fd5b50600436106102695760003560e01c80637942fd0511610151578063c27cdcfb116100c3578063e1c7392a11610087578063e1c7392a14610775578063e3b048051461077d578063f7a251d71461079d578063f9a2bbc714610815578063fc3e59081461081d578063fd6a68791461082557610269565b8063c27cdcfb1461070e578063c81b16621461072e578063d31f968d14610736578063d76a867514610765578063dc927faf1461076d57610269565b80639dc09262116101155780639dc0926214610630578063a1a11bf514610638578063a78abc1614610640578063ab51bb9614610648578063ac43175114610650578063b0355f5b1461048057610269565b80637942fd051461053b57806384013b6a14610543578063863fe4ab146106205780638cc8f5611461051b57806396713da91461062857610269565b8063422f9050116101ea5780636e47a51a116101ae5780636e47a51a146104f35780636e47b4821461051357806370fd5bad1461051b578063718a8aa81461052357806374f079b81461052b57806375d47a0a1461053357610269565b8063422f90501461048857806343756e5c146104bc578063493279b1146104c45780634bf6c882146104e357806351e80672146104eb57610269565b80632ff32aea116102315780632ff32aea146102f3578063308325f4146103145780633a648b151461031c5780633bdc47a6146103585780633dffc3871461048057610269565b806305e682581461026e5780630bee7a671461028c5780630e2374a5146102ad57806314b3023b146102d157806322556cdc146102eb575b600080fd5b61027661082d565b6040805160ff9092168252519081900360200190f35b610294610832565b6040805163ffffffff9092168252519081900360200190f35b6102b5610837565b604080516001600160a01b039092168252519081900360200190f35b6102d961083d565b60408051918252519081900360200190f35b6102d9610843565b6102fb610848565b60408051600792830b90920b8252519081900360200190f35b6102d9610851565b61033c6004803603602081101561033257600080fd5b503560ff16610857565b604080516001600160401b039092168252519081900360200190f35b61040b6004803603606081101561036e57600080fd5b60ff82351691602081013591810190606081016040820135600160201b81111561039757600080fd5b8201836020820111156103a957600080fd5b803590602001918460018302840111600160201b831117156103ca57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610872945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044557818101518382015260200161042d565b50505050905090810190601f1680156104725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102766108e8565b6104a86004803603602081101561049e57600080fd5b503560ff166108ed565b604080519115158252519081900360200190f35b6102b5610902565b6104cc610908565b6040805161ffff9092168252519081900360200190f35b61027661090d565b6102b5610912565b6102b56004803603602081101561050957600080fd5b503560ff16610918565b6102b5610933565b610276610939565b61027661093e565b6102d9610943565b6102b5610949565b61027661094f565b61061e600480360360a081101561055957600080fd5b810190602081018135600160201b81111561057357600080fd5b82018360208201111561058557600080fd5b803590602001918460018302840111600160201b831117156105a657600080fd5b919390929091602081019035600160201b8111156105c357600080fd5b8201836020820111156105d557600080fd5b803590602001918460018302840111600160201b831117156105f657600080fd5b919350915080356001600160401b03908116916020810135909116906040013560ff16610954565b005b6102d9611c4d565b610276611c55565b6102b5611c5a565b6102b5611c60565b6104a8611c66565b61029461082d565b61061e6004803603604081101561066657600080fd5b810190602081018135600160201b81111561068057600080fd5b82018360208201111561069257600080fd5b803590602001918460018302840111600160201b831117156106b357600080fd5b919390929091602081019035600160201b8111156106d057600080fd5b8201836020820111156106e257600080fd5b803590602001918460018302840111600160201b8311171561070357600080fd5b509092509050611c6f565b61033c6004803603602081101561072457600080fd5b503560ff16612211565b6102b561222c565b6104a86004803603604081101561074c57600080fd5b5080356001600160a01b0316906020013560ff16612232565b61040b612252565b6102b5612271565b61061e612277565b61033c6004803603602081101561079357600080fd5b503560ff1661262e565b61061e600480360360608110156107b357600080fd5b60ff8235169190810190604081016020820135600160201b8111156107d757600080fd5b8201836020820111156107e957600080fd5b803590602001918460018302840111600160201b8311171561080a57600080fd5b919350915035612649565b6102b561279a565b6102766127a0565b6102b56127a5565b600081565b606481565b61200181565b60015481565b603281565b60045460070b81565b60025481565b600a602052600090815260409020546001600160401b031681565b60606000825160210190506060816040519080825280601f01601f1916602001820160405280156108aa576020820181803683370190505b50602181018690526001810187905282815290506041810160006108cd866127ab565b5090506108dc818388516127b5565b50909695505050505050565b600181565b60096020526000908152604090205460ff1681565b61100181565b606181565b600881565b61200081565b6005602052600090815260409020546001600160a01b031681565b61100581565b600281565b601081565b60035481565b61100881565b600b81565b60005460ff166109a7576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60408051630a83aaa960e31b815233600482015290516110069163541d5548916024808301926020929190829003018186803b1580156109e657600080fd5b505afa1580156109fa573d6000803e3d6000fd5b505050506040513d6020811015610a1057600080fd5b5051610a63576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b739fb29aac15b9a4b7f17c3385939b007540f4d791331480610a9857507337b8516a0f88e65d677229b402ec6c1e0e33300433145b610ad35760405162461bcd60e51b815260040180806020018281038252602a815260200180612d5a602a913960400191505060405180910390fd5b60ff8116600090815260086020526040902054829082906001600160401b039081169083168114610b43576040805162461bcd60e51b815260206004820152601560248201527439b2b8bab2b731b2903737ba1034b71037b93232b960591b604482015290519081900360640190fd5b60ff8216600090815260086020908152604091829020805467ffffffffffffffff1916600185016001600160401b039081169190911790915582516337d7f9c160e21b81529089166004820152915188926110039263df5fe70492602480840193829003018186803b158015610bb857600080fd5b505afa158015610bcc573d6000803e3d6000fd5b505050506040513d6020811015610be257600080fd5b5051610c1f5760405162461bcd60e51b8152600401808060200182810382526023815260200180612db66023913960400191505060405180910390fd5b60ff851660009081526005602052604090205485906001600160a01b0316610c8e576040805162461bcd60e51b815260206004820152601860248201527f6368616e6e656c206973206e6f7420737570706f727465640000000000000000604482015290519081900360640190fd5b60ff86166000908152600a6020526040902054889087906001600160401b039081169083161015610cf7576040805162461bcd60e51b815260206004820152600e60248201526d3a37b79037b632103432b0b232b960911b604482015290519081900360640190fd5b60ff81166000908152600a60205260409020546001600160401b03838116911614610d495760ff81166000908152600a60205260409020805467ffffffffffffffff19166001600160401b0384161790555b60608e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060608d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050610e8d6110036001600160a01b031663cba510a98e6040518263ffffffff1660e01b815260040180826001600160401b03166001600160401b0316815260200191505060206040518083038186803b158015610e3657600080fd5b505afa158015610e4a573d6000803e3d6000fd5b505050506040513d6020811015610e6057600080fd5b505160408051808201909152600381526269626360e81b6020820152610e868e8e6127f6565b858561283d565b610ed5576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b604482015290519081900360640190fd5b60408051631bb5062960e31b81526001600160401b038e16600482015290516000916110039163dda8314891602480820192602092909190829003018186803b158015610f2157600080fd5b505afa158015610f35573d6000803e3d6000fd5b505050506040513d6020811015610f4b57600080fd5b505190508b8b600080806060610f608961293a565b935093509350935083611022578460ff16866001600160401b03167ff7b2e42d694eb1100184aae86d4245d9e46966100b1dc7e723275b98326854ac8b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610fda578181015183820152602001610fc2565b50505050905090810190601f1680156110075780820380516001836020036101000a031916815260200191505b509250505060405180910390a3505050505050505050611c3d565b6040805160ff85811682529151918716916001600160401b038916917f36afdaf439a8f43fe72135135d804ae620b37a474f0943b5b85f6788312cad40919081900360200190a360ff83166115a75760ff85166000818152600560209081526040808320548151631182b87560e01b815260048101958652602481019283528651604482015286516001600160a01b03909216958695631182b875958d958a9593949093606490910192918601918190849084905b838110156110ef5781810151838201526020016110d7565b50505050905090810190601f16801561111c5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561113c57600080fd5b505af192505050801561122057506040513d6000823e601f3d908101601f19168201604052602081101561116f57600080fd5b8101908080516040519392919084600160201b82111561118e57600080fd5b9083019060208201858111156111a357600080fd5b8251600160201b8111828201881017156111bc57600080fd5b82525081516020918201929091019080838360005b838110156111e95781810151838201526020016111d1565b50505050905090810190601f1680156112165780820380516001836020036101000a031916815260200191505b5060405250505060015b611532576040516000815260443d101561123c575060006112d7565b60046000803e60005160e01c6308c379a0811461125d5760009150506112d7565b60043d036004833e81513d60248201116001600160401b0382111715611288576000925050506112d7565b80830180516001600160401b038111156112a95760009450505050506112d7565b8060208301013d86018111156112c7576000955050505050506112d7565b601f01601f191660405250925050505b806112e257506113f4565b60ff8716600090815260076020526040812054611319916001600160401b039091169089906113149060029088610872565b6129ea565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf948794849390840192918601918190849084905b838110156113b457818101518382015260200161139c565b50505050905090810190601f1680156113e15780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061152d565b3d80801561141e576040519150601f19603f3d011682016040523d82523d6000602084013e611423565b606091505b5060ff8716600090815260076020526040812054611456916001600160401b039091169089906113149060029088610872565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351948794849390840192918601918190849084905b838110156114f15781810151838201526020016114d9565b50505050905090810190601f16801561151e5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6115a1565b80511561159f5760ff871660009081526007602052604081205461156b916001600160401b039091169089906113149060019086610872565b60ff8716600090815260076020526040902080546001600160401b038082166001011667ffffffffffffffff199091161790555b505b50611b75565b60ff83166001141561184b5760ff8516600081815260056020908152604080832054815163831d65d160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563831d65d1958d958a9593949093606490910192918601918190849084905b83811015611631578181015183820152602001611619565b50505050905090810190601f16801561165e5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561167e57600080fd5b505af192505050801561168f575060015b6115a1576040516000815260443d10156116ab57506000611746565b60046000803e60005160e01c6308c379a081146116cc576000915050611746565b60043d036004833e81513d60248201116001600160401b03821117156116f757600092505050611746565b80830180516001600160401b03811115611718576000945050505050611746565b8060208301013d860181111561173657600095505050505050611746565b601f01601f191660405250925050505b8061175157506117b6565b60408051602080825283518183015283516001600160a01b038616937ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf93869390928392830191850190808383600083156113b457818101518382015260200161139c565b3d8080156117e0576040519150601f19603f3d011682016040523d82523d6000602084013e6117e5565b606091505b5060408051602080825283518183015283516001600160a01b038616937f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd297735193869390928392830191850190808383600083156114f15781810151838201526020016114d9565b60ff831660021415611b755760ff8516600081815260056020908152604080832054815163c8509d8160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563c8509d81958d958a9593949093606490910192918601918190849084905b838110156118d55781810151838201526020016118bd565b50505050905090810190601f1680156119025780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561192257600080fd5b505af1925050508015611933575060015b611b73576040516000815260443d101561194f575060006119ea565b60046000803e60005160e01c6308c379a081146119705760009150506119ea565b60043d036004833e81513d60248201116001600160401b038211171561199b576000925050506119ea565b80830180516001600160401b038111156119bc5760009450505050506119ea565b8060208301013d86018111156119da576000955050505050506119ea565b601f01601f191660405250925050505b806119f55750611a9e565b816001600160a01b03167ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611a5e578181015183820152602001611a46565b50505050905090810190601f168015611a8b5780820380516001836020036101000a031916815260200191505b509250505060405180910390a250611b73565b3d808015611ac8576040519150601f19603f3d011682016040523d82523d6000602084013e611acd565b606091505b50816001600160a01b03167f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611b37578181015183820152602001611b1f565b50505050905090810190601f168015611b645780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b505b60ff80861660009081526009602052604090205461100591636f93d2e6918a91339187911680611ba7575060ff881615155b604080516001600160e01b031960e088901b1681526001600160a01b039586166004820152939094166024840152604483019190915215156064820152905160848083019260209291908290030181600087803b158015611c0757600080fd5b505af1158015611c1b573d6000803e3d6000fd5b505050506040513d6020811015611c3157600080fd5b50505050505050505050505b5050505050505050505050505050565b630100610081565b600981565b61100781565b61100681565b60005460ff1681565b3361100714611caf5760405162461bcd60e51b815260040180806020018281038252602e815260200180612ce2602e913960400191505060405180910390fd5b611d1884848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526012815271626174636853697a65466f724f7261636c6560701b60208201529150612b409050565b15611db357604080516020601f8401819004810282018101909252828152600091611d5b91858580838501838280828437600092019190915250612c2792505050565b90506127108111158015611d705750600a8110155b611dab5760405162461bcd60e51b8152600401808060200182810382526032815260200180612d846032913960400191505060405180910390fd5b60015561217f565b611e1c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601281527118591913dc955c19185d1950da185b9b995b60721b60208201529150612b409050565b15611fa457606082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505082519293505060169091149050611e9f5760405162461bcd60e51b815260040180806020018281038252605a815260200180612c88605a913960600191505060405180910390fd5b60018101516002820151601683015160ff82161590611ebd81612c2c565b611f0e576040805162461bcd60e51b815260206004820152601960248201527f61646472657373206973206e6f74206120636f6e747261637400000000000000604482015290519081900360640190fd5b60ff8416600081815260056020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600683528184208585528352818420805460ff199081166001179091556009909352818420805490931687151517909255519092917f7e3b6af43092577ee20e60eaa1d9b114a7031305c895ee7dd3ffe17196d2e1e091a3505050505061217f565b61201184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526016815275195b98589b1953dc911a5cd8589b1950da185b9b995b60521b60208201529150612b409050565b1561214257606082828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050825192935050600290911490506120945760405162461bcd60e51b815260040180806020018281038252604a815260200180612d10604a913960600191505060405180910390fd5b600181810151600283015160ff80831660009081526005602052604090205492939192908316909114906001600160a01b03168015612138576001600160a01b038116600090815260066020908152604080832060ff881680855290835292819020805460ff1916861515908117909155815190815290517fa3132e3f9819fbddc7f0ed6d38d7feef59aa95112090b7c592f5cb5bc4aa4adc929181900390910190a25b505050505061217f565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b6008602052600090815260409020546001600160401b031681565b61100281565b600660209081526000928352604080842090915290825290205460ff1681565b6040518060400160405280600381526020016269626360e81b81525081565b61100381565b60005460ff16156122cf576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b7f1471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b80546001600160a01b0319908116611008179091557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36805460ff199081169091557fd8af288fc1c8680b4f4706064cf021e264efb6828fcaf7eb5ca36818eb365bcc8054821660019081179091557f89832631fb3c3307a103ba2c84ab569c64d6182a18893dcd163f0f1c2090733a805484166110049081179091557f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c38054841690557f72e4efa1513b071517c6c74dba31b5934a81aa83cddd400e7081df5529c9943680548416831790557fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc08054851690911790557fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e78054831690557f4e523af77f034e9810f1c94057f5e931fb3d16a51511a4c3add793617d18610580548316821790557ffb33122aa9f93cc639ebe80a7bc4784c11e6053dde89c6f4f7e268c6a623da1e805484166110001790557fc7694af312c4f286114180fd0ba6a52461fcee8a381636770b19a343af92538a80548316821790557f01112dd68e482ba8d68a7e828cff8b3abcea08eab88941953c180a7e650e9cd480548316821790557fc0a4a8be475dfebc377ebef2d7c4ff47656f572a08dd92b81017efcdba0febe1805484166110071790557f87e8a52529e8ece4ef759037313542a6429ff494a9fab9027fb79db90124eba680548316821790557f4c7666bbcb22d46469f7cc282f70764a7012dca2cce630ff8d83db9a9cdd48f080548316821790557f40f28f99a40bc9f6beea1013afdbc3cdcc689eb76b82c4de06c0acf1e1932ed58054909316611001179092557f0d9cf2cd531699eed8dd34e40ff2884a14a698c4898184fba85194e6f6772d248054821683179055600b60009081527f23f68c9bd22b8a93d06adabe17481c87c016bcbd20adc8bfd707a4d813a572176020527fdf0d5d05428057f5455c2dc8e810dd86d1e9350faa72f16bda8a45443c5b39328054831684179055603283556004805467ffffffffffffffff19166001600160401b031790556002819055600381905580549091169091179055565b6007602052600090815260409020546001600160401b031681565b60005460ff1661269c576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33600090815260066020908152604080832060ff80891685529252909120548591166126f95760405162461bcd60e51b8152600401808060200182810382526031815260200180612c576031913960400191505060405180910390fd5b60ff85166000908152600760209081526040808320548151601f88018490048402810184019092528682526001600160401b03169261275e9284928a9261131492909189918c908c908190840183828082843760009201919091525061087292505050565b60ff959095166000908152600760205260409020805467ffffffffffffffff191660019096016001600160401b03169590951790945550505050565b61100081565b600381565b61100481565b8051602090910191565b5b602081106127d5578251825260209283019290910190601f19016127b6565b915181516020939093036101000a6000190180199091169216919091179052565b60408051600e808252818301909252606091630100610060ff851617918391602082018180368337505050600e818101969096526006810192909252509283525090919050565b60008561284c57506000612931565b606082518451865160800101016040519080825280601f01601f191660200182016040528015612883576020820181803683370190505b509050600061289182612c32565b6020808901518252019050866000806128a9896127ab565b80865260209095019490925090506128c28285836127b5565b928301926128cf886127ab565b80865260209095019490925090506128e88285836127b5565b9283018a8152602001926128fb876127ab565b909250905061290b8285836127b5565b508351602001612919612c38565b60208183886065600019fa5051600114955050505050505b95945050505050565b6000806000606060218551101561296a5750506040805160008082526020820190925290925082915081906129e3565b600185015160218601518651604080516020198301808252601f19600119909401939093168101602001909152604189019392916060919080156129b5576020820181803683370190505b50905060006129c3826127ab565b5090506129d5858260218d51036127b5565b506001975091955093509150505b9193509193565b600254431115612a29576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b161790915560035543600255612a6a565b60038054600190810191829055541015612a6a576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b16179091556003555b8160ff16836001600160401b0316600460009054906101000a900460070b6001600160401b03167f3a6e0fc61675aa2a100bcba0568368bb92bcec91c97673391074f11138f0cffe606185604051808361ffff1661ffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b00578181015183820152602001612ae8565b50505050905090810190601f168015612b2d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a4505050565b6000816040516020018082805190602001908083835b60208310612b755780518252601f199092019160209182019101612b56565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612be35780518252601f199092019160209182019101612bc4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b3b151590565b60200190565b6040518060200160405280600190602082028036833750919291505056fe74686520636f6e747261637420616e64206368616e6e656c2068617665206e6f74206265656e20726567697374657265646c656e677468206f662076616c756520666f72206164644f725570646174654368616e6e656c2073686f756c642062652032322c206368616e6e656c49643a697346726f6d53797374656d3a68616e646c657241646472657373746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662076616c756520666f7220656e61626c654f7244697361626c654368616e6e656c2073686f756c6420626520322c206368616e6e656c49643a6973456e61626c65746865206d73672073656e646572206973206e6f7420612077686974656c6162656c2072656c61796572746865206e6577426174636853697a65466f724f7261636c652073686f756c6420626520696e205b31302c2031303030305d6c6967687420636c69656e74206e6f742073796e632074686520626c6f636b20796574a2646970667358221220035a34f6ccce4a5331a704da5375e26753e5146b5f166b6efe218f523c6a401064736f6c63430006040033", + }, + }, + } + + moranUpgrade[rialtoNet] = &Upgrade{ + UpgradeName: "moran", + Configs: []*UpgradeConfig{ + { + ContractAddr: common.HexToAddress(RelayerHubContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "6080604052600436106101d85760003560e01c80637ae2308811610102578063c81b166211610095578063f9a2bbc711610064578063f9a2bbc714610569578063fb7cfdd71461057e578063fc3e590814610593578063fd6a6879146105a8576101d8565b8063c81b166214610515578063dc927faf1461052a578063e1c7392a1461053f578063e79a198f14610554576101d8565b8063a1a11bf5116100d1578063a1a11bf514610407578063a78abc161461041c578063ab51bb9614610431578063ac43175114610446576101d8565b80637ae23088146103b357806395468d26146103c857806396713da9146103dd5780639dc09262146103f2576101d8565b806351e806721161017a57806370fd5bad1161014957806370fd5bad1461035f578063718a8aa81461037457806375d47a0a146103895780637942fd051461039e576101d8565b806351e80672146102c7578063541d5548146102dc5780636a87d780146103235780636e47b4821461034a576101d8565b80633dffc387116101b65780633dffc3871461024657806343756e5c14610271578063493279b1146102865780634bf6c882146102b2576101d8565b80630bee7a67146101dd5780630e2374a51461020b5780631aa3a0081461023c575b600080fd5b3480156101e957600080fd5b506101f26105bd565b6040805163ffffffff9092168252519081900360200190f35b34801561021757600080fd5b506102206105c2565b604080516001600160a01b039092168252519081900360200190f35b6102446105c8565b005b34801561025257600080fd5b5061025b610749565b6040805160ff9092168252519081900360200190f35b34801561027d57600080fd5b5061022061074e565b34801561029257600080fd5b5061029b610754565b6040805161ffff9092168252519081900360200190f35b3480156102be57600080fd5b5061025b61075a565b3480156102d357600080fd5b5061022061075f565b3480156102e857600080fd5b5061030f600480360360208110156102ff57600080fd5b50356001600160a01b0316610765565b604080519115158252519081900360200190f35b34801561032f57600080fd5b50610338610783565b60408051918252519081900360200190f35b34801561035657600080fd5b50610220610789565b34801561036b57600080fd5b5061025b61078f565b34801561038057600080fd5b5061025b610794565b34801561039557600080fd5b50610220610799565b3480156103aa57600080fd5b5061025b61079f565b3480156103bf57600080fd5b506103386107a4565b3480156103d457600080fd5b506103386107b1565b3480156103e957600080fd5b5061025b6107bd565b3480156103fe57600080fd5b506102206107c2565b34801561041357600080fd5b506102206107c8565b34801561042857600080fd5b5061030f6107ce565b34801561043d57600080fd5b506101f26107d7565b34801561045257600080fd5b506102446004803603604081101561046957600080fd5b81019060208101813564010000000081111561048457600080fd5b82018360208201111561049657600080fd5b803590602001918460018302840111640100000000831117156104b857600080fd5b9193909290916020810190356401000000008111156104d657600080fd5b8201836020820111156104e857600080fd5b8035906020019184600183028401116401000000008311171561050a57600080fd5b5090925090506107dc565b34801561052157600080fd5b50610220610bfe565b34801561053657600080fd5b50610220610c04565b34801561054b57600080fd5b50610244610c0a565b34801561056057600080fd5b50610244610c8c565b34801561057557600080fd5b50610220610e45565b34801561058a57600080fd5b50610338610e4b565b34801561059f57600080fd5b5061025b610e51565b3480156105b457600080fd5b50610220610e56565b606481565b61200181565b3360009081526004602052604090205460ff1615610625576040805162461bcd60e51b81526020600482015260156024820152741c995b185e595c88185b1c9958591e48195e1a5cdd605a1b604482015290519081900360640190fd5b60005460ff16610678576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b61068133610e5c565b156106bd5760405162461bcd60e51b81526004018080602001828103825260278152602001806110496027913960400191505060405180910390fd5b333214610707576040805162461bcd60e51b81526020600482015260136024820152721b9bc81c1c9bde1e481a5cc8185b1b1bddd959606a1b604482015290519081900360640190fd5b6040805162461bcd60e51b81526020600482015260126024820152711c9959da5cdd195c881cdd5cdc195b99195960721b604482015290519081900360640190fd5b600181565b61100181565b6102ca81565b600881565b61200081565b6001600160a01b031660009081526004602052604090205460ff1690565b60025481565b61100581565b600281565b601081565b61100881565b600b81565b68056bc75e2d6310000081565b67016345785d8a000081565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661082f576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b336110071461086f5760405162461bcd60e51b815260040180806020018281038252602e815260200180611070602e913960400191505060405180910390fd5b6108d584848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600f81526e1c995c5d5a5c995911195c1bdcda5d608a1b60208201529150610e629050565b156109d857602081146109195760405162461bcd60e51b815260040180806020018281038252602281526020018061109e6022913960400191505060405180910390fd5b604080516020601f840181900481028201810190925282815260009161095791858580838501838280828437600092019190915250610f4992505050565b90506001811180156109725750683635c9adc5dea000008111155b801561097f575060025481115b6109d0576040805162461bcd60e51b815260206004820181905260248201527f7468652072657175697265644465706f736974206f7574206f662072616e6765604482015290519081900360640190fd5b600155610b6c565b610a3384848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260048152636475657360e01b60208201529150610e629050565b15610b2f5760208114610a8d576040805162461bcd60e51b815260206004820152601760248201527f6c656e677468206f662064756573206d69736d61746368000000000000000000604482015290519081900360640190fd5b604080516020601f8401819004810282018101909252828152600091610acb91858580838501838280828437600092019190915250610f4992505050565b9050600081118015610ade575060015481105b610b27576040805162461bcd60e51b81526020600482015260156024820152747468652064756573206f7574206f662072616e676560581b604482015290519081900360640190fd5b600255610b6c565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b61100281565b61100381565b60005460ff1615610c62576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b68056bc75e2d63100000600190815567016345785d8a00006002556000805460ff19169091179055565b3360009081526004602052604090205460ff16610ce7576040805162461bcd60e51b81526020600482015260146024820152731c995b185e595c88191bc81b9bdd08195e1a5cdd60621b604482015290519081900360640190fd5b60005460ff16610d3a576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b610d4261102e565b5033600081815260036020908152604091829020825180840190935280548084526001909101549183018290529192916108fc91610d86919063ffffffff610f4e16565b6040518115909202916000818181858888f19350505050158015610dae573d6000803e3d6000fd5b50602081015160405161100291829181156108fc0291906000818181858888f19350505050158015610de4573d6000803e3d6000fd5b50336000818152600460209081526040808320805460ff191690556003825280832083815560010192909255815192835290517fd17202129b83db7880d6b9f25df81c58ad46f7e0e2c92236b1aa10663a4876679281900390910190a15050565b61100081565b60015481565b600381565b61100481565b3b151590565b6000816040516020018082805190602001908083835b60208310610e975780518252601f199092019160209182019101610e78565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310610f055780518252601f199092019160209182019101610ee6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b6000610f9083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f97565b9392505050565b600081848411156110265760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610feb578181015183820152602001610fd3565b50505050905090810190601f1680156110185780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60405180604001604052806000815260200160008152509056fe636f6e7472616374206973206e6f7420616c6c6f77656420746f20626520612072656c61796572746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662072657175697265644465706f736974206d69736d61746368a2646970667358221220e7298bdd332800983f84daa6af4f7dfac92b01db35dc27e899b3d13982f2ccbd64736f6c63430006040033", + }, + { + ContractAddr: common.HexToAddress(LightClientContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "608060405234801561001057600080fd5b50600436106102275760003560e01c8063a1a11bf511610130578063dc927faf116100b8578063e405bbc31161007c578063e405bbc3146106a7578063ea54b2aa146106af578063f9a2bbc7146106b7578063fc3e5908146106bf578063fd6a6879146106c757610227565b8063dc927faf14610627578063dda831481461062f578063df5fe70414610655578063e1c7392a1461067b578063e2761af01461068357610227565b8063adc879e9116100ff578063adc879e914610552578063c81b16621461055a578063cba510a914610562578063d816987914610588578063da8d08f01461060157610227565b8063a1a11bf514610462578063a78abc161461046a578063ab51bb9614610486578063ac4317511461048e57610227565b8063564b81ef116101b3578063718a8aa811610182578063718a8aa81461043a57806375d47a0a146104425780637942fd051461044a57806396713da9146104525780639dc092621461045a57610227565b8063564b81ef146102e85780635c5ae8db146103655780636e47b4821461042a57806370fd5bad1461043257610227565b80633dffc387116101fa5780633dffc3871461029357806343756e5c146102b1578063493279b1146102b95780634bf6c882146102d857806351e80672146102e057610227565b80630bee7a671461022c5780630e2374a51461024d5780632657e9b61461027157806333f7798d1461028b575b600080fd5b6102346106cf565b6040805163ffffffff9092168252519081900360200190f35b6102556106d4565b604080516001600160a01b039092168252519081900360200190f35b6102796106da565b60408051918252519081900360200190f35b6102796106e5565b61029b6106eb565b6040805160ff9092168252519081900360200190f35b6102556106f0565b6102c16106f6565b6040805161ffff9092168252519081900360200190f35b61029b6106fc565b610255610701565b6102f0610707565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032a578181015183820152602001610312565b50505050905090810190601f1680156103575780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61038b6004803603602081101561037b57600080fd5b50356001600160401b0316610813565b60405180856001600160401b03166001600160401b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103ec5781810151838201526020016103d4565b50505050905090810190601f1680156104195780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6102556108ce565b61029b6108d4565b61029b6108d9565b6102556108de565b61029b6108e4565b61029b6108e9565b6102556108ee565b6102556108f4565b6104726108fa565b604080519115158252519081900360200190f35b610234610903565b610550600480360360408110156104a457600080fd5b8101906020810181356401000000008111156104bf57600080fd5b8201836020820111156104d157600080fd5b803590602001918460018302840111640100000000831117156104f357600080fd5b91939092909160208101903564010000000081111561051157600080fd5b82018360208201111561052357600080fd5b8035906020019184600183028401116401000000008311171561054557600080fd5b509092509050610908565b005b610279610bc1565b610255610bc7565b6102796004803603602081101561057857600080fd5b50356001600160401b0316610bcd565b6104726004803603604081101561059e57600080fd5b8101906020810181356401000000008111156105b957600080fd5b8201836020820111156105cb57600080fd5b803590602001918460018302840111640100000000831117156105ed57600080fd5b9193509150356001600160401b0316610bec565b6102556004803603602081101561061757600080fd5b50356001600160401b031661143d565b610255611458565b6102556004803603602081101561064557600080fd5b50356001600160401b031661145e565b6104726004803603602081101561066b57600080fd5b50356001600160401b0316611482565b6105506114c4565b61068b611669565b604080516001600160401b039092168252519081900360200190f35b61068b611678565b6102f061168e565b6102556116ab565b61029b6116b1565b6102556116b6565b606481565b61200181565b662386f26fc1000081565b60055481565b600181565b61100181565b6102ca81565b600881565b61200081565b604080516020808252818301909252606091829190602082018180368337505060045460208301525090506000805b60208160ff16101561077d57828160ff168151811061075157fe5b01602001516001600160f81b0319161561077057600190910190610775565b61077d565b600101610736565b5060608160ff166040519080825280601f01601f1916602001820160405280156107ae576020820181803683370190505b50905060005b8260ff168160ff16101561080a57838160ff16815181106107d157fe5b602001015160f81c60f81b828260ff16815181106107eb57fe5b60200101906001600160f81b031916908160001a9053506001016107b4565b50925050505b90565b60016020818152600092835260409283902080548184015460028084015460038501805489516101009982161599909902600019011692909204601f81018790048702880187019098528787526001600160401b0390931696919592949091908301828280156108c45780601f10610899576101008083540402835291602001916108c4565b820191906000526020600020905b8154815290600101906020018083116108a757829003601f168201915b5050505050905084565b61100581565b600281565b601081565b61100881565b600b81565b600981565b61100781565b61100681565b60005460ff1681565b600081565b60005460ff1661095f576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e69742079657400000000000000604482015290519081900360640190fd5b336110071461099f5760405162461bcd60e51b815260040180806020018281038252602e815260200180611b68602e913960400191505060405180910390fd5b610a1384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601b81527f726577617264466f7256616c696461746f725365744368616e67650000000000602082015291506116bc9050565b15610af25760208114610a575760405162461bcd60e51b815260040180806020018281038252602e815260200180611b07602e913960400191505060405180910390fd5b604080516020601f8401819004810282018101909252828152600091610a95918585808385018382808284376000920191909152506117a392505050565b9050600081118015610aaf5750670de0b6b3a76400008111155b610aea5760405162461bcd60e51b815260040180806020018281038252602f815260200180611b96602f913960400191505060405180910390fd5b600555610b2f565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60045481565b61100281565b6001600160401b03166000908152600160208190526040909120015490565b60408051630a83aaa960e31b815233600482015290516000916110069163541d554891602480820192602092909190829003018186803b158015610c2f57600080fd5b505afa158015610c43573d6000803e3d6000fd5b505050506040513d6020811015610c5957600080fd5b5051610cac576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b7388cb4d8f77742c24d647bef8049d3f3c56067cdd331480610ce157507342d596440775c90db8d9187b47650986e106349333145b610d1c5760405162461bcd60e51b815260040180806020018281038252602a815260200180611bc5602a913960400191505060405180910390fd5b6001600160401b0382166000908152600260205260409020546001600160a01b031615610d90576040805162461bcd60e51b815260206004820152601c60248201527f63616e27742073796e63206475706c6963617465642068656164657200000000604482015290519081900360640190fd5b6003546001600160401b0390811690831611610ddd5760405162461bcd60e51b8152600401808060200182810382526026815260200180611bef6026913960400191505060405180910390fd5b600354600160401b90046001600160401b0316610df8611905565b6001600160401b0382811660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f81018490048402850184019095528484529093606086019392830182828015610ebe5780601f10610e9357610100808354040283529160200191610ebe565b820191906000526020600020905b815481529060010190602001808311610ea157829003601f168201915b50505050508152505090505b836001600160401b0316826001600160401b031610158015610efb57506003546001600160401b0390811690831610155b15610fdc5780516001600160401b0380821660009081526001602081815260409283902083516080810185528154909516855280830154858301526002808201548686015260038201805486516101009682161596909602600019011691909104601f8101849004840285018401909552848452959750939460608601939091830182828015610fcc5780601f10610fa157610100808354040283529160200191610fcc565b820191906000526020600020905b815481529060010190602001808311610faf57829003601f168201915b5050505050815250509050610eca565b6060810151516110d35780516001600160401b03811660009081526001602081815260409283902060030180548451600294821615610100026000190190911693909304601f81018390048302840183019094528383529395509092919083018282801561108b5780601f106110605761010080835404028352916020019161108b565b820191906000526020600020905b81548152906001019060200180831161106e57829003601f168201915b505050506060830182905250516110d35760405162461bcd60e51b8152600401808060200182810382526021815260200180611ae66021913960400191505060405180910390fd5b6000816060015151608801905060608787905082016040519080825280601f01601f191660200182016040528015611112576020820181803683370190505b5090506000611120826117a8565b905061112e848683866117ae565b6111695760405162461bcd60e51b81526004018080602001828103825260238152602001806119e36023913960400191505060405180910390fd5b600083820191506111af8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061181a92505050565b945090506111be818386611824565b825160200193506111cd61192b565b6110008186866064600019fa6111e257600080fd5b805194506000600160f81b8616156112715750600554604080516309a99b4f60e41b815233600482015260248101929092525160019161100291639a99b4f0916044808201926020929091908290030181600087803b15801561124457600080fd5b505af1158015611258573d6000803e3d6000fd5b505050506040513d602081101561126e57600080fd5b50505b856001600160401b03169550602082019350600061129185888415611865565b90985090506001600160401b03808216908c16146112e05760405162461bcd60e51b8152600401808060200182810382526033815260200180611b356033913960400191505060405180910390fd5b6001600160401b03808c16600081815260026020818152604080842080546001600160a01b031916331790558e86168e529383526001808252928490208d518154961667ffffffffffffffff199096169590951785558c81015192850192909255918b01519183019190915560608a015180518b939261136792600385019291019061194a565b50506003546001600160401b03600160401b9091048116908d16111590506113af576003805467ffffffffffffffff60401b1916600160401b6001600160401b038e16021790555b7f4042c1020a8f410fb1c8859d276ab436aeb2c3074960e48467299cf1c966d3b48b8a8a602001518560405180856001600160401b03166001600160401b03168152602001846001600160401b03166001600160401b031681526020018381526020018215151515815260200194505050505060405180910390a15060019c9b505050505050505050505050565b6002602052600090815260409020546001600160a01b031681565b61100381565b6001600160401b03166000908152600260205260409020546001600160a01b031690565b6001600160401b0381166000908152600260205260408120546001600160a01b03161515806114be57506003546001600160401b038381169116145b92915050565b60005460ff161561151c576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b60008061154160405180610100016040528060e08152602001611a0660e0913961181a565b81516004559092509050611553611905565b600061156184846000611865565b60008083526001600160401b038281168252600160208181526040938490208651815467ffffffffffffffff19169416939093178355808601519183019190915591840151600282015560608401518051949650929450859390926115cd92600385019291019061194a565b50506003805467ffffffffffffffff19166001600160401b0384811691821767ffffffffffffffff60401b1916600160401b9290920291909117918290556000805460ff19166001179055662386f26fc10000600555602085810151604080519490931684529083015280517f5ac9b37d571677b80957ca05693f371526c602fd08042b416a29fdab7efefa499350918290030190a150505050565b6003546001600160401b031681565b600354600160401b90046001600160401b031681565b60405180610100016040528060e08152602001611a0660e0913981565b61100081565b600381565b61100481565b6000816040516020018082805190602001908083835b602083106116f15780518252601f1990920191602091820191016116d2565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b6020831061175f5780518252601f199092019160209182019101611740565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b60200190565b60008460600151518284010392506000806117cc876060015161181a565b90925090506117dc828683611824565b5050506040840151601f1983810191909152602090940151603f19830152605f19820192909252600454606719820152910160871990910152600190565b8051602090910191565b5b60208110611844578251825260209283019290910190601f1901611825565b915181516020939093036101000a6000190180199091169216919091179052565b61186d611905565b600884015160288501516048909501805190956000929161188c611905565b6020810183905260408101829052866118f75760008060688a036040519080825280601f01601f1916602001820160405280156118d0576020820181803683370190505b50606084018190526118e19061181a565b90925090506118f460208c018383611824565b50505b989297509195505050505050565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518061100001604052806080906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061198b57805160ff19168380011785556119b8565b828001600101855582156119b8579182015b828111156119b857825182559160200191906001019061199d565b506119c49291506119c8565b5090565b61081091905b808211156119c457600081556001016119ce56fe6661696c656420746f2073657269616c697a6520636f6e73656e73757320737461746542696e616e63652d436861696e2d47616e67657300000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000aea1ac326886b992a991d21a6eb155f41b77867cbf659e78f31d89d8205122a84d1be64f0e9a466c2e66a53433928192783e29f8fa21beb2133499b5ef770f60000000e8d4a5100099308aa365c40554bc89982af505d85da95251445d5dd4a9bb37dd2584fd92d3000000e8d4a5100001776920ff0b0f38d78cf95c033c21adf7045785114e392a7544179652e0a612000000e8d4a510006661696c656420746f206c6f61642076616c696461746f722073657420646174616c656e677468206f6620726577617264466f7256616c696461746f725365744368616e6765206d69736d617463686865616465722068656967687420646f65736e277420657175616c20746f207468652073706563696669656420686569676874746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374746865206e6577526577617264466f7256616c696461746f725365744368616e6765206f7574206f662072616e6765746865206d73672073656e646572206973206e6f7420612077686974656c6162656c2072656c6179657263616e27742073796e6320686561646572206265666f726520696e697469616c486569676874a264697066735822122005fe5704867b942fab1f05677fe6d4bdd985f0d7f3c5bb2eaccbddbca4df78be64736f6c63430006040033", + }, + { + ContractAddr: common.HexToAddress(CrossChainContract), + CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/c184a00160b6a2d884b4d6efebe1358a047e9e57", + Code: "608060405234801561001057600080fd5b50600436106102695760003560e01c80637942fd0511610151578063c27cdcfb116100c3578063e1c7392a11610087578063e1c7392a14610775578063e3b048051461077d578063f7a251d71461079d578063f9a2bbc714610815578063fc3e59081461081d578063fd6a68791461082557610269565b8063c27cdcfb1461070e578063c81b16621461072e578063d31f968d14610736578063d76a867514610765578063dc927faf1461076d57610269565b80639dc09262116101155780639dc0926214610630578063a1a11bf514610638578063a78abc1614610640578063ab51bb9614610648578063ac43175114610650578063b0355f5b1461048057610269565b80637942fd051461053b57806384013b6a14610543578063863fe4ab146106205780638cc8f5611461051b57806396713da91461062857610269565b8063422f9050116101ea5780636e47a51a116101ae5780636e47a51a146104f35780636e47b4821461051357806370fd5bad1461051b578063718a8aa81461052357806374f079b81461052b57806375d47a0a1461053357610269565b8063422f90501461048857806343756e5c146104bc578063493279b1146104c45780634bf6c882146104e357806351e80672146104eb57610269565b80632ff32aea116102315780632ff32aea146102f3578063308325f4146103145780633a648b151461031c5780633bdc47a6146103585780633dffc3871461048057610269565b806305e682581461026e5780630bee7a671461028c5780630e2374a5146102ad57806314b3023b146102d157806322556cdc146102eb575b600080fd5b61027661082d565b6040805160ff9092168252519081900360200190f35b610294610832565b6040805163ffffffff9092168252519081900360200190f35b6102b5610837565b604080516001600160a01b039092168252519081900360200190f35b6102d961083d565b60408051918252519081900360200190f35b6102d9610843565b6102fb610848565b60408051600792830b90920b8252519081900360200190f35b6102d9610851565b61033c6004803603602081101561033257600080fd5b503560ff16610857565b604080516001600160401b039092168252519081900360200190f35b61040b6004803603606081101561036e57600080fd5b60ff82351691602081013591810190606081016040820135600160201b81111561039757600080fd5b8201836020820111156103a957600080fd5b803590602001918460018302840111600160201b831117156103ca57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610872945050505050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044557818101518382015260200161042d565b50505050905090810190601f1680156104725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102766108e8565b6104a86004803603602081101561049e57600080fd5b503560ff166108ed565b604080519115158252519081900360200190f35b6102b5610902565b6104cc610908565b6040805161ffff9092168252519081900360200190f35b61027661090e565b6102b5610913565b6102b56004803603602081101561050957600080fd5b503560ff16610919565b6102b5610934565b61027661093a565b61027661093f565b6102d9610944565b6102b561094a565b610276610950565b61061e600480360360a081101561055957600080fd5b810190602081018135600160201b81111561057357600080fd5b82018360208201111561058557600080fd5b803590602001918460018302840111600160201b831117156105a657600080fd5b919390929091602081019035600160201b8111156105c357600080fd5b8201836020820111156105d557600080fd5b803590602001918460018302840111600160201b831117156105f657600080fd5b919350915080356001600160401b03908116916020810135909116906040013560ff16610955565b005b6102d9611c4e565b610276611c56565b6102b5611c5b565b6102b5611c61565b6104a8611c67565b61029461082d565b61061e6004803603604081101561066657600080fd5b810190602081018135600160201b81111561068057600080fd5b82018360208201111561069257600080fd5b803590602001918460018302840111600160201b831117156106b357600080fd5b919390929091602081019035600160201b8111156106d057600080fd5b8201836020820111156106e257600080fd5b803590602001918460018302840111600160201b8311171561070357600080fd5b509092509050611c70565b61033c6004803603602081101561072457600080fd5b503560ff16612212565b6102b561222d565b6104a86004803603604081101561074c57600080fd5b5080356001600160a01b0316906020013560ff16612233565b61040b612253565b6102b5612272565b61061e612278565b61033c6004803603602081101561079357600080fd5b503560ff1661262f565b61061e600480360360608110156107b357600080fd5b60ff8235169190810190604081016020820135600160201b8111156107d757600080fd5b8201836020820111156107e957600080fd5b803590602001918460018302840111600160201b8311171561080a57600080fd5b91935091503561264a565b6102b561279b565b6102766127a1565b6102b56127a6565b600081565b606481565b61200181565b60015481565b603281565b60045460070b81565b60025481565b600a602052600090815260409020546001600160401b031681565b60606000825160210190506060816040519080825280601f01601f1916602001820160405280156108aa576020820181803683370190505b50602181018690526001810187905282815290506041810160006108cd866127ac565b5090506108dc818388516127b6565b50909695505050505050565b600181565b60096020526000908152604090205460ff1681565b61100181565b6102ca81565b600881565b61200081565b6005602052600090815260409020546001600160a01b031681565b61100581565b600281565b601081565b60035481565b61100881565b600b81565b60005460ff166109a8576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60408051630a83aaa960e31b815233600482015290516110069163541d5548916024808301926020929190829003018186803b1580156109e757600080fd5b505afa1580156109fb573d6000803e3d6000fd5b505050506040513d6020811015610a1157600080fd5b5051610a64576040805162461bcd60e51b815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c6179657200604482015290519081900360640190fd5b7388cb4d8f77742c24d647bef8049d3f3c56067cdd331480610a9957507342d596440775c90db8d9187b47650986e106349333145b610ad45760405162461bcd60e51b815260040180806020018281038252602a815260200180612d5c602a913960400191505060405180910390fd5b60ff8116600090815260086020526040902054829082906001600160401b039081169083168114610b44576040805162461bcd60e51b815260206004820152601560248201527439b2b8bab2b731b2903737ba1034b71037b93232b960591b604482015290519081900360640190fd5b60ff8216600090815260086020908152604091829020805467ffffffffffffffff1916600185016001600160401b039081169190911790915582516337d7f9c160e21b81529089166004820152915188926110039263df5fe70492602480840193829003018186803b158015610bb957600080fd5b505afa158015610bcd573d6000803e3d6000fd5b505050506040513d6020811015610be357600080fd5b5051610c205760405162461bcd60e51b8152600401808060200182810382526023815260200180612db86023913960400191505060405180910390fd5b60ff851660009081526005602052604090205485906001600160a01b0316610c8f576040805162461bcd60e51b815260206004820152601860248201527f6368616e6e656c206973206e6f7420737570706f727465640000000000000000604482015290519081900360640190fd5b60ff86166000908152600a6020526040902054889087906001600160401b039081169083161015610cf8576040805162461bcd60e51b815260206004820152600e60248201526d3a37b79037b632103432b0b232b960911b604482015290519081900360640190fd5b60ff81166000908152600a60205260409020546001600160401b03838116911614610d4a5760ff81166000908152600a60205260409020805467ffffffffffffffff19166001600160401b0384161790555b60608e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050905060608d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050610e8e6110036001600160a01b031663cba510a98e6040518263ffffffff1660e01b815260040180826001600160401b03166001600160401b0316815260200191505060206040518083038186803b158015610e3757600080fd5b505afa158015610e4b573d6000803e3d6000fd5b505050506040513d6020811015610e6157600080fd5b505160408051808201909152600381526269626360e81b6020820152610e878e8e6127f7565b858561283e565b610ed6576040805162461bcd60e51b815260206004820152601460248201527334b73b30b634b21036b2b935b63290383937b7b360611b604482015290519081900360640190fd5b60408051631bb5062960e31b81526001600160401b038e16600482015290516000916110039163dda8314891602480820192602092909190829003018186803b158015610f2257600080fd5b505afa158015610f36573d6000803e3d6000fd5b505050506040513d6020811015610f4c57600080fd5b505190508b8b600080806060610f618961293b565b935093509350935083611023578460ff16866001600160401b03167ff7b2e42d694eb1100184aae86d4245d9e46966100b1dc7e723275b98326854ac8b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610fdb578181015183820152602001610fc3565b50505050905090810190601f1680156110085780820380516001836020036101000a031916815260200191505b509250505060405180910390a3505050505050505050611c3e565b6040805160ff85811682529151918716916001600160401b038916917f36afdaf439a8f43fe72135135d804ae620b37a474f0943b5b85f6788312cad40919081900360200190a360ff83166115a85760ff85166000818152600560209081526040808320548151631182b87560e01b815260048101958652602481019283528651604482015286516001600160a01b03909216958695631182b875958d958a9593949093606490910192918601918190849084905b838110156110f05781810151838201526020016110d8565b50505050905090810190601f16801561111d5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561113d57600080fd5b505af192505050801561122157506040513d6000823e601f3d908101601f19168201604052602081101561117057600080fd5b8101908080516040519392919084600160201b82111561118f57600080fd5b9083019060208201858111156111a457600080fd5b8251600160201b8111828201881017156111bd57600080fd5b82525081516020918201929091019080838360005b838110156111ea5781810151838201526020016111d2565b50505050905090810190601f1680156112175780820380516001836020036101000a031916815260200191505b5060405250505060015b611533576040516000815260443d101561123d575060006112d8565b60046000803e60005160e01c6308c379a0811461125e5760009150506112d8565b60043d036004833e81513d60248201116001600160401b0382111715611289576000925050506112d8565b80830180516001600160401b038111156112aa5760009450505050506112d8565b8060208301013d86018111156112c8576000955050505050506112d8565b601f01601f191660405250925050505b806112e357506113f5565b60ff871660009081526007602052604081205461131a916001600160401b039091169089906113159060029088610872565b6129eb565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf948794849390840192918601918190849084905b838110156113b557818101518382015260200161139d565b50505050905090810190601f1680156113e25780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061152e565b3d80801561141f576040519150601f19603f3d011682016040523d82523d6000602084013e611424565b606091505b5060ff8716600090815260076020526040812054611457916001600160401b039091169089906113159060029088610872565b60ff8716600090815260076020908152604080832080546001600160401b038082166001011667ffffffffffffffff19909116179055805182815284518184015284516001600160a01b038716947f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351948794849390840192918601918190849084905b838110156114f25781810151838201526020016114da565b50505050905090810190601f16801561151f5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6115a2565b8051156115a05760ff871660009081526007602052604081205461156c916001600160401b039091169089906113159060019086610872565b60ff8716600090815260076020526040902080546001600160401b038082166001011667ffffffffffffffff199091161790555b505b50611b76565b60ff83166001141561184c5760ff8516600081815260056020908152604080832054815163831d65d160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563831d65d1958d958a9593949093606490910192918601918190849084905b8381101561163257818101518382015260200161161a565b50505050905090810190601f16801561165f5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561167f57600080fd5b505af1925050508015611690575060015b6115a2576040516000815260443d10156116ac57506000611747565b60046000803e60005160e01c6308c379a081146116cd576000915050611747565b60043d036004833e81513d60248201116001600160401b03821117156116f857600092505050611747565b80830180516001600160401b03811115611719576000945050505050611747565b8060208301013d860181111561173757600095505050505050611747565b601f01601f191660405250925050505b8061175257506117b7565b60408051602080825283518183015283516001600160a01b038616937ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf93869390928392830191850190808383600083156113b557818101518382015260200161139d565b3d8080156117e1576040519150601f19603f3d011682016040523d82523d6000602084013e6117e6565b606091505b5060408051602080825283518183015283516001600160a01b038616937f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd297735193869390928392830191850190808383600083156114f25781810151838201526020016114da565b60ff831660021415611b765760ff8516600081815260056020908152604080832054815163c8509d8160e01b815260048101958652602481019283528651604482015286516001600160a01b0390921695869563c8509d81958d958a9593949093606490910192918601918190849084905b838110156118d65781810151838201526020016118be565b50505050905090810190601f1680156119035780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b15801561192357600080fd5b505af1925050508015611934575060015b611b74576040516000815260443d1015611950575060006119eb565b60046000803e60005160e01c6308c379a081146119715760009150506119eb565b60043d036004833e81513d60248201116001600160401b038211171561199c576000925050506119eb565b80830180516001600160401b038111156119bd5760009450505050506119eb565b8060208301013d86018111156119db576000955050505050506119eb565b601f01601f191660405250925050505b806119f65750611a9f565b816001600160a01b03167ff91a8f63e5b3e0e89e5f93e1915a7805f3c52d9a73b3c09769785c2c7bf87acf826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611a5f578181015183820152602001611a47565b50505050905090810190601f168015611a8c5780820380516001836020036101000a031916815260200191505b509250505060405180910390a250611b74565b3d808015611ac9576040519150601f19603f3d011682016040523d82523d6000602084013e611ace565b606091505b50816001600160a01b03167f63ac299d6332d1cc4e61b81e59bc00c0ac7c798addadf33840f1307cd2977351826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611b38578181015183820152602001611b20565b50505050905090810190601f168015611b655780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b505b60ff80861660009081526009602052604090205461100591636f93d2e6918a91339187911680611ba8575060ff881615155b604080516001600160e01b031960e088901b1681526001600160a01b039586166004820152939094166024840152604483019190915215156064820152905160848083019260209291908290030181600087803b158015611c0857600080fd5b505af1158015611c1c573d6000803e3d6000fd5b505050506040513d6020811015611c3257600080fd5b50505050505050505050505b5050505050505050505050505050565b630102ca0081565b600981565b61100781565b61100681565b60005460ff1681565b3361100714611cb05760405162461bcd60e51b815260040180806020018281038252602e815260200180612ce4602e913960400191505060405180910390fd5b611d1984848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526012815271626174636853697a65466f724f7261636c6560701b60208201529150612b429050565b15611db457604080516020601f8401819004810282018101909252828152600091611d5c91858580838501838280828437600092019190915250612c2992505050565b90506127108111158015611d715750600a8110155b611dac5760405162461bcd60e51b8152600401808060200182810382526032815260200180612d866032913960400191505060405180910390fd5b600155612180565b611e1d84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601281527118591913dc955c19185d1950da185b9b995b60721b60208201529150612b429050565b15611fa557606082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505082519293505060169091149050611ea05760405162461bcd60e51b815260040180806020018281038252605a815260200180612c8a605a913960600191505060405180910390fd5b60018101516002820151601683015160ff82161590611ebe81612c2e565b611f0f576040805162461bcd60e51b815260206004820152601960248201527f61646472657373206973206e6f74206120636f6e747261637400000000000000604482015290519081900360640190fd5b60ff8416600081815260056020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600683528184208585528352818420805460ff199081166001179091556009909352818420805490931687151517909255519092917f7e3b6af43092577ee20e60eaa1d9b114a7031305c895ee7dd3ffe17196d2e1e091a35050505050612180565b61201284848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526016815275195b98589b1953dc911a5cd8589b1950da185b9b995b60521b60208201529150612b429050565b1561214357606082828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050825192935050600290911490506120955760405162461bcd60e51b815260040180806020018281038252604a815260200180612d12604a913960600191505060405180910390fd5b600181810151600283015160ff80831660009081526005602052604090205492939192908316909114906001600160a01b03168015612139576001600160a01b038116600090815260066020908152604080832060ff881680855290835292819020805460ff1916861515908117909155815190815290517fa3132e3f9819fbddc7f0ed6d38d7feef59aa95112090b7c592f5cb5bc4aa4adc929181900390910190a25b5050505050612180565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b6008602052600090815260409020546001600160401b031681565b61100281565b600660209081526000928352604080842090915290825290205460ff1681565b6040518060400160405280600381526020016269626360e81b81525081565b61100381565b60005460ff16156122d0576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b7f1471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b80546001600160a01b0319908116611008179091557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a36805460ff199081169091557fd8af288fc1c8680b4f4706064cf021e264efb6828fcaf7eb5ca36818eb365bcc8054821660019081179091557f89832631fb3c3307a103ba2c84ab569c64d6182a18893dcd163f0f1c2090733a805484166110049081179091557f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c38054841690557f72e4efa1513b071517c6c74dba31b5934a81aa83cddd400e7081df5529c9943680548416831790557fa9bc9a3a348c357ba16b37005d7e6b3236198c0e939f4af8c5f19b8deeb8ebc08054851690911790557fc575c31fea594a6eb97c8e9d3f9caee4c16218c6ef37e923234c0fe9014a61e78054831690557f4e523af77f034e9810f1c94057f5e931fb3d16a51511a4c3add793617d18610580548316821790557ffb33122aa9f93cc639ebe80a7bc4784c11e6053dde89c6f4f7e268c6a623da1e805484166110001790557fc7694af312c4f286114180fd0ba6a52461fcee8a381636770b19a343af92538a80548316821790557f01112dd68e482ba8d68a7e828cff8b3abcea08eab88941953c180a7e650e9cd480548316821790557fc0a4a8be475dfebc377ebef2d7c4ff47656f572a08dd92b81017efcdba0febe1805484166110071790557f87e8a52529e8ece4ef759037313542a6429ff494a9fab9027fb79db90124eba680548316821790557f4c7666bbcb22d46469f7cc282f70764a7012dca2cce630ff8d83db9a9cdd48f080548316821790557f40f28f99a40bc9f6beea1013afdbc3cdcc689eb76b82c4de06c0acf1e1932ed58054909316611001179092557f0d9cf2cd531699eed8dd34e40ff2884a14a698c4898184fba85194e6f6772d248054821683179055600b60009081527f23f68c9bd22b8a93d06adabe17481c87c016bcbd20adc8bfd707a4d813a572176020527fdf0d5d05428057f5455c2dc8e810dd86d1e9350faa72f16bda8a45443c5b39328054831684179055603283556004805467ffffffffffffffff19166001600160401b031790556002819055600381905580549091169091179055565b6007602052600090815260409020546001600160401b031681565b60005460ff1661269d576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33600090815260066020908152604080832060ff80891685529252909120548591166126fa5760405162461bcd60e51b8152600401808060200182810382526031815260200180612c596031913960400191505060405180910390fd5b60ff85166000908152600760209081526040808320548151601f88018490048402810184019092528682526001600160401b03169261275f9284928a9261131592909189918c908c908190840183828082843760009201919091525061087292505050565b60ff959095166000908152600760205260409020805467ffffffffffffffff191660019096016001600160401b03169590951790945550505050565b61100081565b600381565b61100481565b8051602090910191565b5b602081106127d6578251825260209283019290910190601f19016127b7565b915181516020939093036101000a6000190180199091169216919091179052565b60408051600e808252818301909252606091630102ca0060ff851617918391602082018180368337505050600e818101969096526006810192909252509283525090919050565b60008561284d57506000612932565b606082518451865160800101016040519080825280601f01601f191660200182016040528015612884576020820181803683370190505b509050600061289282612c34565b6020808901518252019050866000806128aa896127ac565b80865260209095019490925090506128c38285836127b6565b928301926128d0886127ac565b80865260209095019490925090506128e98285836127b6565b9283018a8152602001926128fc876127ac565b909250905061290c8285836127b6565b50835160200161291a612c3a565b60208183886065600019fa5051600114955050505050505b95945050505050565b6000806000606060218551101561296b5750506040805160008082526020820190925290925082915081906129e4565b600185015160218601518651604080516020198301808252601f19600119909401939093168101602001909152604189019392916060919080156129b6576020820181803683370190505b50905060006129c4826127ac565b5090506129d6858260218d51036127b6565b506001975091955093509150505b9193509193565b600254431115612a2a576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b161790915560035543600255612a6b565b60038054600190810191829055541015612a6b576004805467ffffffffffffffff1981166001600160401b036001600793840b810190930b16179091556003555b8160ff16836001600160401b0316600460009054906101000a900460070b6001600160401b03167f3a6e0fc61675aa2a100bcba0568368bb92bcec91c97673391074f11138f0cffe6102ca85604051808361ffff1661ffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612b02578181015183820152602001612aea565b50505050905090810190601f168015612b2f5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a4505050565b6000816040516020018082805190602001908083835b60208310612b775780518252601f199092019160209182019101612b58565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612be55780518252601f199092019160209182019101612bc6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014905092915050565b015190565b3b151590565b60200190565b6040518060200160405280600190602082028036833750919291505056fe74686520636f6e747261637420616e64206368616e6e656c2068617665206e6f74206265656e20726567697374657265646c656e677468206f662076616c756520666f72206164644f725570646174654368616e6e656c2073686f756c642062652032322c206368616e6e656c49643a697346726f6d53797374656d3a68616e646c657241646472657373746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e74726163746c656e677468206f662076616c756520666f7220656e61626c654f7244697361626c654368616e6e656c2073686f756c6420626520322c206368616e6e656c49643a6973456e61626c65746865206d73672073656e646572206973206e6f7420612077686974656c6162656c2072656c61796572746865206e6577426174636853697a65466f724f7261636c652073686f756c6420626520696e205b31302c2031303030305d6c6967687420636c69656e74206e6f742073796e632074686520626c6f636b20796574a2646970667358221220c2e5476f29d06af821e0422dce9e2935bd3fd426d71239e5fabf34b62008c49664736f6c63430006040033", + }, + }, + } } func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.Int, statedb *state.StateDB) { @@ -437,6 +502,10 @@ func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.I applySystemContractUpgrade(gibbsUpgrade[network], blockNumber, statedb, logger) } + if config.IsOnMoran(blockNumber) { + applySystemContractUpgrade(moranUpgrade[network], blockNumber, statedb, logger) + } + /* apply other upgrades */ diff --git a/core/types/blacklist.go b/core/types/blacklist.go index 0f8bc946e..a6a6e7b94 100644 --- a/core/types/blacklist.go +++ b/core/types/blacklist.go @@ -2,7 +2,7 @@ package types import "github.com/ethereum/go-ethereum/common" -// This is introduced because of the Tendermint IAVL Merkel Proof verification exploitation. +// This is introduced because of the Tendermint IAVL Merkle Proof verification exploitation. var NanoBlackList = []common.Address{ common.HexToAddress("0x489A8756C18C0b8B24EC2a2b9FF3D4d447F79BEc"), common.HexToAddress("0xFd6042Df3D74ce9959922FeC559d7995F3933c55"), diff --git a/core/vm/contracts.go b/core/vm/contracts.go index 107e197d5..f8ca17aff 100644 --- a/core/vm/contracts.go +++ b/core/vm/contracts.go @@ -96,6 +96,21 @@ var PrecompiledContractsIsNano = map[common.Address]PrecompiledContract{ common.BytesToAddress([]byte{101}): &iavlMerkleProofValidateNano{}, } +var PrecompiledContractsIsMoran = map[common.Address]PrecompiledContract{ + common.BytesToAddress([]byte{1}): &ecrecover{}, + common.BytesToAddress([]byte{2}): &sha256hash{}, + common.BytesToAddress([]byte{3}): &ripemd160hash{}, + common.BytesToAddress([]byte{4}): &dataCopy{}, + common.BytesToAddress([]byte{5}): &bigModExp{}, + common.BytesToAddress([]byte{6}): &bn256AddIstanbul{}, + common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{}, + common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{}, + common.BytesToAddress([]byte{9}): &blake2F{}, + + common.BytesToAddress([]byte{100}): &tmHeaderValidate{}, + common.BytesToAddress([]byte{101}): &iavlMerkleProofValidateMoran{}, +} + // PrecompiledContractsBerlin contains the default set of pre-compiled Ethereum // contracts used in the Berlin release. var PrecompiledContractsBerlin = map[common.Address]PrecompiledContract{ @@ -125,6 +140,7 @@ var PrecompiledContractsBLS = map[common.Address]PrecompiledContract{ } var ( + PrecompiledAddressesMoran []common.Address PrecompiledAddressesNano []common.Address PrecompiledAddressesBerlin []common.Address PrecompiledAddressesIstanbul []common.Address @@ -148,11 +164,17 @@ func init() { for k := range PrecompiledContractsIsNano { PrecompiledAddressesNano = append(PrecompiledAddressesNano, k) } + + for k := range PrecompiledContractsIsMoran { + PrecompiledAddressesMoran = append(PrecompiledAddressesMoran, k) + } } // ActivePrecompiles returns the precompiles enabled with the current configuration. func ActivePrecompiles(rules params.Rules) []common.Address { switch { + case rules.IsMoran: + return PrecompiledAddressesMoran case rules.IsNano: return PrecompiledAddressesNano case rules.IsBerlin: diff --git a/core/vm/contracts_lightclient.go b/core/vm/contracts_lightclient.go index 5a775879c..0b937e997 100644 --- a/core/vm/contracts_lightclient.go +++ b/core/vm/contracts_lightclient.go @@ -4,6 +4,10 @@ import ( "encoding/binary" "fmt" + "github.com/tendermint/iavl" + "github.com/tendermint/tendermint/crypto/merkle" + cmn "github.com/tendermint/tendermint/libs/common" + "github.com/ethereum/go-ethereum/core/vm/lightclient" "github.com/ethereum/go-ethereum/params" ) @@ -93,8 +97,10 @@ func (c *tmHeaderValidate) Run(input []byte) (result []byte, err error) { //------------------------------------------------------------------------------------------------------------------------------------------------ -// tmHeaderValidate implemented as a native contract. -type iavlMerkleProofValidate struct{} +// iavlMerkleProofValidate implemented as a native contract. +type iavlMerkleProofValidate struct { + basicIavlMerkleProofValidate +} func (c *iavlMerkleProofValidate) RequiredGas(input []byte) uint64 { return params.IAVLMerkleProofValidateGas @@ -104,7 +110,54 @@ func (c *iavlMerkleProofValidate) RequiredGas(input []byte) uint64 { // | payload length | payload | // | 32 bytes | | func (c *iavlMerkleProofValidate) Run(input []byte) (result []byte, err error) { - //return nil, fmt.Errorf("suspend") + return c.basicIavlMerkleProofValidate.Run(input) +} + +// tmHeaderValidate implemented as a native contract. +type tmHeaderValidateNano struct{} + +func (c *tmHeaderValidateNano) RequiredGas(input []byte) uint64 { + return params.TendermintHeaderValidateGas +} + +func (c *tmHeaderValidateNano) Run(input []byte) (result []byte, err error) { + return nil, fmt.Errorf("suspend") +} + +type iavlMerkleProofValidateNano struct{} + +func (c *iavlMerkleProofValidateNano) RequiredGas(_ []byte) uint64 { + return params.IAVLMerkleProofValidateGas +} + +func (c *iavlMerkleProofValidateNano) Run(_ []byte) (result []byte, err error) { + return nil, fmt.Errorf("suspend") +} + +//------------------------------------------------------------------------------------------------------------------------------------------------ +type iavlMerkleProofValidateMoran struct { + basicIavlMerkleProofValidate +} + +func (c *iavlMerkleProofValidateMoran) RequiredGas(_ []byte) uint64 { + return params.IAVLMerkleProofValidateGas +} + +func (c *iavlMerkleProofValidateMoran) Run(input []byte) (result []byte, err error) { + c.basicIavlMerkleProofValidate.verifiers = []merkle.ProofOpVerifier{ + forbiddenAbsenceOpVerifier, + singleValueOpVerifier, + multiStoreOpVerifier, + forbiddenSimpleValueOpVerifier, + } + return c.basicIavlMerkleProofValidate.Run(input) +} + +type basicIavlMerkleProofValidate struct { + verifiers []merkle.ProofOpVerifier +} + +func (c *basicIavlMerkleProofValidate) Run(input []byte) (result []byte, err error) { defer func() { if r := recover(); r != nil { err = fmt.Errorf("internal error: %v\n", r) @@ -124,7 +177,7 @@ func (c *iavlMerkleProofValidate) Run(input []byte) (result []byte, err error) { if err != nil { return nil, err } - + kvmp.SetVerifiers(c.verifiers) valid := kvmp.Validate() if !valid { return nil, fmt.Errorf("invalid merkle proof") @@ -135,27 +188,56 @@ func (c *iavlMerkleProofValidate) Run(input []byte) (result []byte, err error) { return result, nil } -// tmHeaderValidate implemented as a native contract. -type tmHeaderValidateNano struct{} - -func (c *tmHeaderValidateNano) RequiredGas(input []byte) uint64 { - return params.TendermintHeaderValidateGas +func forbiddenAbsenceOpVerifier(op merkle.ProofOperator) error { + if op == nil { + return nil + } + if _, ok := op.(iavl.IAVLAbsenceOp); ok { + return cmn.NewError("absence proof suspend") + } + return nil } -func (c *tmHeaderValidateNano) Run(input []byte) (result []byte, err error) { - return nil, fmt.Errorf("suspend") +func forbiddenSimpleValueOpVerifier(op merkle.ProofOperator) error { + if op == nil { + return nil + } + if _, ok := op.(merkle.SimpleValueOp); ok { + return cmn.NewError("simple value proof suspend") + } + return nil } -//------------------------------------------------------------------------------------------------------------------------------------------------ -type iavlMerkleProofValidateNano struct{} - -func (c *iavlMerkleProofValidateNano) RequiredGas(input []byte) uint64 { - return params.IAVLMerkleProofValidateGas +func multiStoreOpVerifier(op merkle.ProofOperator) error { + if op == nil { + return nil + } + if mop, ok := op.(lightclient.MultiStoreProofOp); ok { + storeNames := make(map[string]bool, len(mop.Proof.StoreInfos)) + for _, store := range mop.Proof.StoreInfos { + if exist := storeNames[store.Name]; exist { + return cmn.NewError("duplicated store") + } else { + storeNames[store.Name] = true + } + } + } + return nil } -// input: -// | payload length | payload | -// | 32 bytes | | -func (c *iavlMerkleProofValidateNano) Run(input []byte) (result []byte, err error) { - return nil, fmt.Errorf("suspend") +func singleValueOpVerifier(op merkle.ProofOperator) error { + if op == nil { + return nil + } + if valueOp, ok := op.(iavl.IAVLValueOp); ok { + if len(valueOp.Proof.Leaves) != 1 { + return cmn.NewError("range proof suspended") + } + for _, innerNode := range valueOp.Proof.LeftPath { + if len(innerNode.Right) > 0 && len(innerNode.Left) > 0 { + return cmn.NewError("both right and left hash exit!") + } + } + } + return nil } diff --git a/core/vm/contracts_lightclient_test.go b/core/vm/contracts_lightclient_test.go index e1634be80..473231019 100644 --- a/core/vm/contracts_lightclient_test.go +++ b/core/vm/contracts_lightclient_test.go @@ -5,6 +5,8 @@ import ( "encoding/hex" "testing" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/core/vm/lightclient" "github.com/stretchr/testify/require" ) @@ -102,4 +104,94 @@ func TestTmHeaderValidateAndMerkleProofValidate(t *testing.T) { expectedResult := make([]byte, 32) binary.BigEndian.PutUint64(expectedResult[24:], 0x01) require.Equal(t, expectedResult, success) + + moranValidateContract := iavlMerkleProofValidateMoran{} + success, err = moranValidateContract.Run(input) + require.NoError(t, err) + expectedResult = make([]byte, 32) + binary.BigEndian.PutUint64(expectedResult[24:], 0x01) + require.Equal(t, expectedResult, success) +} + +func TestMerkleProofValidateMoran(t *testing.T) { + // Bytest1 is the inputs of exploit tx 0x05356fd06ce56a9ec5b4eaf9c075abd740cae4c21eab1676440ab5cd2fe5c57a + bytest1, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000005086962630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000100380200000000010dd9ac0000000000000000000000000000000000000000000000000000000000000093000000000000000000000000000000000000000000000000000000000000000000f870a0424e4200000000000000000000000000000000000000000000000000000000009400000000000000000000000000000000000000008ad3c21bcecceda100000094489a8756c18c0b8b24ec2a2b9ff3d4d447f79bec94489a8756c18c0b8b24ec2a2b9ff3d4d447f79bec846553f10072cda827a83531ca0fd7ac917a6b65649719aab0836722caafe0603147a523180a8d020a066961766c3a76120e00000100380200000000010dd9ac1af201f0010aed010a2b0802100318b091c73422200c10f902d266c238a4ca9e26fa9bc36483cd3ebee4e263012f5e7f40c22ee4d20a4d0801100218b091c7342220e4fd47bffd1c06e67edad92b2bf9ca63631978676288a2aa99f95c459436ef632a20121a1f9c4eca726c725796c5375fc4158986ced08e498dc8268ef94d8ed1891612001a370a0e0000010038020000000000000002122011056c6919f02d966991c10721684a8d1542e44003f9ffb47032c18995d4ac7f18b091c7341a340a0e00000100380200000000010dd9ac12202c3a561458f8527b002b5ec3cab2d308662798d6245d4588a4e6a80ebdfe30ac18010ad4050a0a6d756c746973746f726512036962631ac005be050abb050a110a066f7261636c6512070a0508b891c7340a0f0a046d61696e12070a0508b891c7340a350a08736c617368696e6712290a2708b891c7341220c8ccf341e6e695e7e1cb0ce4bf347eea0cc16947d8b4e934ec400b57c59d6f860a380a0b61746f6d69635f7377617012290a2708b891c734122042d4ecc9468f71a70288a95d46564bfcaf2c9f811051dcc5593dbef152976b010a110a0662726964676512070a0508b891c7340a300a0364657812290a2708b891c73412201773be443c27f61075cecdc050ce22eb4990c54679089e90afdc4e0e88182a230a2f0a02736312290a2708b891c7341220df7a0484b7244f76861b1642cfb7a61d923794bd2e076c8dbd05fc4ee29f3a670a330a06746f6b656e7312290a2708b891c734122064958c2f76fec1fa5d1828296e51264c259fa264f499724795a740f48fc4731b0a320a057374616b6512290a2708b891c734122015d2c302143bdf029d58fe381cc3b54cedf77ecb8834dfc5dc3e1555d68f19ab0a330a06706172616d7312290a2708b891c734122050abddcb7c115123a5a4247613ab39e6ba935a3d4f4b9123c4fedfa0895c040a0a300a0361636312290a2708b891c734122079fb5aecc4a9b87e56231103affa5e515a1bdf3d0366490a73e087980b7f1f260a0e0a0376616c12070a0508b891c7340a300a0369626312290a2708b891c7341220e09159530585455058cf1785f411ea44230f39334e6e0f6a3c54dbf069df2b620a300a03676f7612290a2708b891c7341220db85ddd37470983b14186e975a175dfb0bf301b43de685ced0aef18d28b4e0420a320a05706169727312290a2708b891c7341220a78b556bc9e73d86b4c63ceaf146db71b12ac80e4c10dd0ce6eb09c99b0c7cfe0a360a0974696d655f6c6f636b12290a2708b891c73412204775dbe01d41cab018c21ba5c2af94720e4d7119baf693670e70a40ba2a52143") + // Bytest1 is the inputs of exploit tx 0xebf83628ba893d35b496121fb8201666b8e09f3cbadf0e269162baa72efe3b8b + bytest2, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000005086962630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000100380200000000010dd85c0000000000000000000000000000000000000000000000000000000000000093000000000000000000000000000000000000000000000000000000000000000000f870a0424e4200000000000000000000000000000000000000000000000000000000009400000000000000000000000000000000000000008ad3c21bcecceda100000094489a8756c18c0b8b24ec2a2b9ff3d4d447f79bec94489a8756c18c0b8b24ec2a2b9ff3d4d447f79bec846553f10072cda827a83531ca0fd7ac917a6b65649719aab0836722caafe0603147a523180a8d020a066961766c3a76120e00000100380200000000010dd85c1af201f0010aed010a2b0802100318b091c73422200c10f902d266c238a4ca9e26fa9bc36483cd3ebee4e263012f5e7f40c22ee4d20a4d0801100218b091c7342220e4fd47bffd1c06e67edad92b2bf9ca63631978676288a2aa99f95c459436ef632a20da657c1ffb86c684eb3e265361ef0fa4f9dfa670b45f9f91c5eb6ad84b21a4d112001a370a0e0000010038020000000000000002122011056c6919f02d966991c10721684a8d1542e44003f9ffb47032c18995d4ac7f18b091c7341a340a0e00000100380200000000010dd85c12202c3a561458f8527b002b5ec3cab2d308662798d6245d4588a4e6a80ebdfe30ac18010ad4050a0a6d756c746973746f726512036962631ac005be050abb050a110a066f7261636c6512070a0508b891c7340a0f0a046d61696e12070a0508b891c7340a350a08736c617368696e6712290a2708b891c7341220c8ccf341e6e695e7e1cb0ce4bf347eea0cc16947d8b4e934ec400b57c59d6f860a380a0b61746f6d69635f7377617012290a2708b891c734122042d4ecc9468f71a70288a95d46564bfcaf2c9f811051dcc5593dbef152976b010a110a0662726964676512070a0508b891c7340a300a0364657812290a2708b891c73412201773be443c27f61075cecdc050ce22eb4990c54679089e90afdc4e0e88182a230a2f0a02736312290a2708b891c7341220df7a0484b7244f76861b1642cfb7a61d923794bd2e076c8dbd05fc4ee29f3a670a330a06746f6b656e7312290a2708b891c734122064958c2f76fec1fa5d1828296e51264c259fa264f499724795a740f48fc4731b0a320a057374616b6512290a2708b891c734122015d2c302143bdf029d58fe381cc3b54cedf77ecb8834dfc5dc3e1555d68f19ab0a330a06706172616d7312290a2708b891c734122050abddcb7c115123a5a4247613ab39e6ba935a3d4f4b9123c4fedfa0895c040a0a300a0361636312290a2708b891c734122079fb5aecc4a9b87e56231103affa5e515a1bdf3d0366490a73e087980b7f1f260a0e0a0376616c12070a0508b891c7340a300a0369626312290a2708b891c7341220e09159530585455058cf1785f411ea44230f39334e6e0f6a3c54dbf069df2b620a300a03676f7612290a2708b891c7341220db85ddd37470983b14186e975a175dfb0bf301b43de685ced0aef18d28b4e0420a320a05706169727312290a2708b891c7341220a78b556bc9e73d86b4c63ceaf146db71b12ac80e4c10dd0ce6eb09c99b0c7cfe0a360a0974696d655f6c6f636b12290a2708b891c73412204775dbe01d41cab018c21ba5c2af94720e4d7119baf693670e70a40ba2a52143") + + for _, bytest := range [][]byte{bytest1, bytest2} { + validator := iavlMerkleProofValidate{} + res, err := validator.Run(bytest) + assert.NoError(t, err) + assert.Equal(t, res[len(res)-1], uint8(1)) + + moranValidator := iavlMerkleProofValidateMoran{} + res, err = moranValidator.Run(bytest) + assert.Errorf(t, err, "invalid merkle proof") + assert.Nil(t, res) + } +} + +func TestAbsenceMerkleProofValidateMoran(t *testing.T) { + // Bytest contains absence op + bytest, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000007306163630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c6163636f756e743a8a4e2eb018bdf98a8f53ec755740ffc728637a1d000000000000000000000000000000000000000000000000000000000000007b4bdc4c270a750a148a4e2eb018bdf98a8f53ec755740ffc728637a1d12110a0941544348412d3733301080f69bf321120b0a03424e4210e8baeb8d44120f0a075050432d303041108094ebdc031a26eb5ae98721031c199c92e5b0080967da99be27cf2da53317441b4a663e6d9c6caf02be1fdbdc20d7962b28152c69c314b4de5c8035253c8bc0771d9ca17b1b23a57c0c6d068b57579791cae20add070a066961766c3a61121c6163636f756e743a8a4e2eb018bdf98a8f53ec755740ffc728637a1d1ab407b2070aaf070a2d081810cdfd2b188096a82222209f223f804e2d94ac51c4321b0687397012e6d95eb9783b03bc790da631004c7c0a2d081710adb31a18f395a8222a20d2a38865de82383ccce0140513b65cec1bf2ae6cd7dfeb22eb6faadb4e26b26f0a2d081510b2990b18f395a82222208a02bbd5a695dfc772627ac8744aa9cf30ae26575bdce8c96a9a0d0999175b430a2d081410e6ff0418f395a8222a20d39619c779be909e67f23499fb74eb2c19afd7f21523401d4ccf7e917db5cd600a2d081210e3fe0118f395a8222a20a10cc73843f889d9e03a463eb135e928bb980e19734344cba0fbf4e8a4c5258b0a2c081010dd6518f395a8222a2007fd15843a2fd3f58d021b0e072a6c70742d7a3d993a922445e3491e1c14ee8e0a2c080f10cc2a18eda6a7222a20088942d7b30abd021d8e9505cc41313fad87c8c10a799f3b51018b7b2cfe4ad90a2c080d10b70d18eda6a7222a2091a37bc44d0c61e3752ddc59eb390355ab65e8a9fb453be4f0acec537f1ca14f0a2c080c10890818eda6a72222201cfc317855a06667c45812fe36efe33af05671dfe0d9b56b02662011af2e79e30a2c080b10ac0318c4b0ee212220aeb454a4b3243b6269a2fd8841dca9a951c53b30f1e27da91063dae7224402c70a2c080910e40118c4b0ee212a20441340a4de6498f861b97b3f3ad9603af055e5af51a0d96fff2ae28e3c5c6c9a0a2c0808108d0118c4b0ee212220ae32ea4b9ab7b53571da320e2815fd8b2c278124961cca4a1849a799842424450a2b0807104d18c4b0ee212220e2804c9b7f045ec0b4ab20920a937b82fda8b7a9ddd12b21637335b915cfda550a2b0806102418a5f4c7192a20ec85f22addedfc82c771af5b4c77544b7c1d7c5bbac33f2712dfba1045ebdbd00a2b0805101118a5f4c7192a2071ade34dcc447a0ba8adc603080633d15c06f3525830c86ebce35eca0a4921fc0a2b0804100c18a5f4c7192a205190bce93993e65b266a3417ed511df8897a812cb4b62569e5afcfbec10b69cd0a2b0803100618a5f4c7192220b76c6884f1d412ac10bfb3987fb7d26f0330b2a85539509ebc5c6bdec2f95d520a2b0802100418a5f4c71922206a285b4a4f9d1c687bbafa1f3649b6a6e32b1a85dd0402421210683e846cf0020a2b0801100218a5f4c7192220033b3f7c6dcb258b6e55545e7a4f51539447cd595eb8a2e373ba0015502da1051a450a1c6163636f756e743a8a4e2eb018bdf98a8f53ec755740ffc728637a1d12201a272295e94cf1d8090bdb019dde48e9dab026ad2c3e43aaa7e61cc954a9245d18a5f4c7190ab6040a0a6d756c746973746f726512036163631aa204a0040a9d040a300a0364657812290a27088496a822122038fc49f49648fec62acc434151a51eaa378c1b20a730a749548e36f1529422500a300a03676f7612290a27088496a8221220a78ce489bdf08b9ee869c184876e1623dc38b3e64a5cf1a0005f97976c64deac0a380a0b61746f6d69635f7377617012290a27088496a8221220544c2fa38f61e10a39ec00b3e724d5834761268bb455cdbf5843bcf1531f8fbc0a300a0376616c12290a27088496a82212201f71082c9f6f45fb456b2c00b41e50d2f662f2dfec3cb6965f19d214bf02f3980a0f0a046d61696e12070a05088496a8220a320a057374616b6512290a27088496a82212200dd467343c718f240e50b4feac42970fc8c1c69a018be955f9c27913ac1f8b3c0a300a0361636312290a27088496a8221220270c19ccc9c40c5176b3dfbd8af734c97a307e0dbd8df9e286dcd5d709f973ed0a330a06746f6b656e7312290a27088496a8221220c4f96eedf50c83964de9df013afec2e545012d92528b643a5166c828774187b60a320a05706169727312290a27088496a8221220351c55cfda84596ecd22ebc77013662aba97f81f19d9ef3d150213bb07c823060a360a0974696d655f6c6f636b12290a27088496a8221220e7adf5bd30ce022decf0e9341bf05c464ed70cdbc97423bd2bab8f3571e5179b0a330a06706172616d7312290a27088496a822122042a9dfc356ca435db131eb41fb1975c8482f2434537918665e530b0b4633b5f9") + moranValidator := iavlMerkleProofValidateMoran{} + res, err := moranValidator.Run(bytest) + assert.Errorf(t, err, "invalid merkle proof") + assert.Nil(t, res) +} + +func TestMultiStore(t *testing.T) { + goodProof := lightclient.NewMultiStoreProofOp([]byte("legit"), &lightclient.MultiStoreProof{ + StoreInfos: []lightclient.StoreInfo{ + { + Name: "legit", + Core: lightclient.StoreCore{ + CommitID: lightclient.CommitID{ + Version: 1, + Hash: []byte("legithash"), + }, + }, + }, + }, + }) + + result1, err := goodProof.Run([][]byte{[]byte("legithash")}) + assert.NoError(t, err) + + _, err = goodProof.Run([][]byte{[]byte("evilhash")}) + assert.Error(t, err, "hash mismatch for substore") + + badProof := lightclient.NewMultiStoreProofOp([]byte("legit"), &lightclient.MultiStoreProof{ + StoreInfos: []lightclient.StoreInfo{ + { + Name: "legit", + Core: lightclient.StoreCore{ + CommitID: lightclient.CommitID{ + Version: 1, + Hash: []byte("evilhash"), + }, + }, + }, + { + Name: "legit", + Core: lightclient.StoreCore{ + CommitID: lightclient.CommitID{ + Version: 1, + Hash: []byte("legithash"), + }, + }, + }, + }, + }) + + _, err = badProof.Run([][]byte{[]byte("legithash")}) + assert.Error(t, err, "hash mismatch for substore") + + result2, err := badProof.Run([][]byte{[]byte("evilhash")}) + assert.NoError(t, err) + assert.Equal(t, result1, result2) + + err = multiStoreOpVerifier(badProof) + assert.Error(t, err, "duplicated store") } diff --git a/core/vm/evm.go b/core/vm/evm.go index 2ca872ece..339b8e299 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -51,6 +51,8 @@ type ( func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) { var precompiles map[common.Address]PrecompiledContract switch { + case evm.chainRules.IsMoran: + precompiles = PrecompiledContractsIsMoran case evm.chainRules.IsNano: precompiles = PrecompiledContractsIsNano case evm.chainRules.IsBerlin: diff --git a/core/vm/lightclient/types.go b/core/vm/lightclient/types.go index 6006fe04d..f2ac0a8f1 100644 --- a/core/vm/lightclient/types.go +++ b/core/vm/lightclient/types.go @@ -215,6 +215,12 @@ type KeyValueMerkleProof struct { StoreName string AppHash []byte Proof *merkle.Proof + + verifiers []merkle.ProofOpVerifier +} + +func (kvmp *KeyValueMerkleProof) SetVerifiers(verifiers []merkle.ProofOpVerifier) { + kvmp.verifiers = verifiers } func (kvmp *KeyValueMerkleProof) Validate() bool { @@ -225,11 +231,11 @@ func (kvmp *KeyValueMerkleProof) Validate() bool { kp = kp.AppendKey(kvmp.Key, merkle.KeyEncodingURL) if len(kvmp.Value) == 0 { - err := prt.VerifyAbsence(kvmp.Proof, kvmp.AppHash, kp.String()) + err := prt.VerifyAbsence(kvmp.Proof, kvmp.AppHash, kp.String(), kvmp.verifiers...) return err == nil } - err := prt.VerifyValue(kvmp.Proof, kvmp.AppHash, kp.String(), kvmp.Value) + err := prt.VerifyValue(kvmp.Proof, kvmp.AppHash, kp.String(), kvmp.Value, kvmp.verifiers...) return err == nil } diff --git a/eth/protocols/snap/sync.go b/eth/protocols/snap/sync.go index 684e8d2c4..133acfaa0 100644 --- a/eth/protocols/snap/sync.go +++ b/eth/protocols/snap/sync.go @@ -169,7 +169,7 @@ type bytecodeResponse struct { // to actual requests and to validate any security constraints. // // Concurrency note: storage requests and responses are handled concurrently from -// the main runloop to allow Merkel proof verifications on the peer's thread and +// the main runloop to allow Merkle proof verifications on the peer's thread and // to drop on invalid response. The request struct must contain all the data to // construct the response without accessing runloop internals (i.e. tasks). That // is only included to allow the runloop to match a response to the task being diff --git a/go.mod b/go.mod index a9849b51f..b0e5845fb 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 github.com/tendermint/go-amino v0.14.1 github.com/tendermint/iavl v0.12.0 - github.com/tendermint/tendermint v0.31.11 + github.com/tendermint/tendermint v0.31.12 github.com/tklauser/go-sysconf v0.3.5 // indirect github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef go.etcd.io/bbolt v1.3.5 // indirect @@ -90,4 +90,5 @@ require ( replace ( github.com/gogo/protobuf v1.1.1 => github.com/gogo/protobuf v1.3.2 github.com/gogo/protobuf v1.3.1 => github.com/gogo/protobuf v1.3.2 + github.com/tendermint/tendermint => github.com/bnb-chain/tendermint v0.31.12 ) diff --git a/go.sum b/go.sum index 4f2b39c89..fddd4d836 100644 --- a/go.sum +++ b/go.sum @@ -79,6 +79,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/bnb-chain/tendermint v0.31.12 h1:g+blWaXkRw6iHa56lcRfRzPXHgURCWPmgIvaGBSV7Zc= +github.com/bnb-chain/tendermint v0.31.12/go.mod h1:j6XU7CArrhQ+9XBMRwdIz63iUxdVwSrZ8f7vP7gcCqg= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= @@ -429,8 +431,6 @@ github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6o github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= github.com/tendermint/iavl v0.12.0 h1:xcaFAr+ycqCj7WN1RzL2EfcBioRDOHcU1oWcg83K028= github.com/tendermint/iavl v0.12.0/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM= -github.com/tendermint/tendermint v0.31.11 h1:TIs//4WfEAG4TOZc2eUfJPI3T8KrywXQCCPnGAaM1Wo= -github.com/tendermint/tendermint v0.31.11/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= @@ -534,7 +534,6 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index d7c01be1f..bed1e9564 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -2073,12 +2073,13 @@ func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c if err != nil { return common.Hash{}, err } + xForward := ctx.Value("X-Forwarded-For") if tx.To() == nil { addr := crypto.CreateAddress(from, tx.Nonce()) - log.Info("Submitted contract creation", "hash", tx.Hash().Hex(), "from", from, "nonce", tx.Nonce(), "contract", addr.Hex(), "value", tx.Value()) + log.Info("Submitted contract creation", "hash", tx.Hash().Hex(), "from", from, "nonce", tx.Nonce(), "contract", addr.Hex(), "value", tx.Value(), "x-forward-ip", xForward) } else { - log.Info("Submitted transaction", "hash", tx.Hash().Hex(), "from", from, "nonce", tx.Nonce(), "recipient", tx.To(), "value", tx.Value()) + log.Info("Submitted transaction", "hash", tx.Hash().Hex(), "from", from, "nonce", tx.Nonce(), "recipient", tx.To(), "value", tx.Value(), "x-forward-ip", xForward) } return tx.Hash(), nil } diff --git a/params/config.go b/params/config.go index 192e29620..15ea21ad8 100644 --- a/params/config.go +++ b/params/config.go @@ -300,6 +300,7 @@ var ( //TODO GibbsBlock: nil, NanoBlock: big.NewInt(21962149), + MoranBlock: big.NewInt(22107423), Parlia: &ParliaConfig{ Period: 3, @@ -325,6 +326,7 @@ var ( EulerBlock: big.NewInt(19203503), GibbsBlock: big.NewInt(22800220), NanoBlock: big.NewInt(23482428), + MoranBlock: big.NewInt(23603940), Parlia: &ParliaConfig{ Period: 3, Epoch: 200, @@ -349,6 +351,7 @@ var ( EulerBlock: big.NewInt(400), GibbsBlock: big.NewInt(400), NanoBlock: nil, + MoranBlock: nil, Parlia: &ParliaConfig{ Period: 3, @@ -376,6 +379,7 @@ var ( EulerBlock: big.NewInt(0), GibbsBlock: big.NewInt(0), NanoBlock: nil, + MoranBlock: nil, MuirGlacierBlock: nil, BerlinBlock: nil, // Don't enable Berlin directly, we're YOLOing it YoloV3Block: big.NewInt(0), @@ -390,16 +394,16 @@ var ( // // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields. - AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), new(EthashConfig), nil, nil} + AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), new(EthashConfig), nil, nil} // AllCliqueProtocolChanges contains every protocol change (EIPs) introduced // and accepted by the Ethereum core developers into the Clique consensus. // // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields. - AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, big.NewInt(0), nil, nil, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil} + AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, big.NewInt(0), nil, nil, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil} - TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), new(EthashConfig), nil, nil} + TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil} TestRules = TestChainConfig.Rules(new(big.Int), false) ) @@ -494,6 +498,7 @@ type ChainConfig struct { EulerBlock *big.Int `json:"eulerBlock,omitempty" toml:",omitempty"` // eulerBlock switch block (nil = no fork, 0 = already activated) GibbsBlock *big.Int `json:"gibbsBlock,omitempty" toml:",omitempty"` // gibbsBlock switch block (nil = no fork, 0 = already activated) NanoBlock *big.Int `json:"nanoBlock,omitempty" toml:",omitempty"` // nanoBlock switch block (nil = no fork, 0 = already activated) + MoranBlock *big.Int `json:"moranBlock,omitempty" toml:",omitempty"` // moranBlock switch block (nil = no fork, 0 = already activated) // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty" toml:",omitempty"` @@ -544,7 +549,7 @@ func (c *ChainConfig) String() string { default: engine = "unknown" } - return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, Ramanujan: %v, Niels: %v, MirrorSync: %v, Bruno: %v, Berlin: %v, YOLO v3: %v, CatalystBlock: %v, London: %v, ArrowGlacier: %v, MergeFork:%v, Euler: %v, Gibbs: %v, Nano: %v, Engine: %v}", + return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, Ramanujan: %v, Niels: %v, MirrorSync: %v, Bruno: %v, Berlin: %v, YOLO v3: %v, CatalystBlock: %v, London: %v, ArrowGlacier: %v, MergeFork:%v, Euler: %v, Gibbs: %v, Nano: %v, Moran: %v, Engine: %v}", c.ChainID, c.HomesteadBlock, c.DAOForkBlock, @@ -570,6 +575,7 @@ func (c *ChainConfig) String() string { c.EulerBlock, c.GibbsBlock, c.NanoBlock, + c.MoranBlock, engine, ) } @@ -717,6 +723,14 @@ func (c *ChainConfig) IsOnNano(num *big.Int) bool { return configNumEqual(c.NanoBlock, num) } +func (c *ChainConfig) IsMoran(num *big.Int) bool { + return isForked(c.MoranBlock, num) +} + +func (c *ChainConfig) IsOnMoran(num *big.Int) bool { + return configNumEqual(c.MoranBlock, num) +} + // CheckCompatible checks whether scheduled fork transitions have been imported // with a mismatching chain configuration. func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64) *ConfigCompatError { @@ -842,6 +856,9 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, head *big.Int) *Confi if isForkIncompatible(c.NanoBlock, newcfg.NanoBlock, head) { return newCompatError("nano fork block", c.NanoBlock, newcfg.NanoBlock) } + if isForkIncompatible(c.MoranBlock, newcfg.MoranBlock, head) { + return newCompatError("moran fork block", c.MoranBlock, newcfg.MoranBlock) + } return nil } @@ -912,6 +929,7 @@ type Rules struct { IsBerlin, IsLondon bool IsMerge bool IsNano bool + IsMoran bool } // Rules ensures c's ChainID is not nil. @@ -934,5 +952,6 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool) Rules { IsLondon: c.IsLondon(num), IsMerge: isMerge, IsNano: c.IsNano(num), + IsMoran: c.IsMoran(num), } } diff --git a/params/version.go b/params/version.go index e19b87aeb..a1d2e8bde 100644 --- a/params/version.go +++ b/params/version.go @@ -23,7 +23,7 @@ import ( const ( VersionMajor = 1 // Major version component of the current release VersionMinor = 1 // Minor version component of the current release - VersionPatch = 15 // Patch version component of the current release + VersionPatch = 16 // Patch version component of the current release VersionMeta = "" // Version metadata to append to the version string )