diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 737e4928a7..8847aeba4d 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -43,13 +43,10 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - name: Test Build - run: | - make geth - - name: Uint Test env: ANDROID_HOME: "" # Skip android test run: | + go clean -testcache make test diff --git a/CHANGELOG.md b/CHANGELOG.md index c0bd5774f9..78bb469607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,16 @@ # Changelog +## v1.1.4 +Improvement +* [\#472](https://github.com/binance-chain/bsc/pull/472) add metrics for contract code bitmap cache +* [\#473](https://github.com/binance-chain/bsc/pull/473) fix ci test flow + +BUGFIX +* [\#491](https://github.com/binance-chain/bsc/pull/491) fix prefetcher related bugs + +FEATURES +* [\#480](https://github.com/binance-chain/bsc/pull/480) implement bep 95 + + ## v1.1.3 Improvement * [\#456](https://github.com/binance-chain/bsc/pull/456) git-flow support lint, unit test, and integration test diff --git a/core/block_validator.go b/core/block_validator.go index 7ef440b4b7..12fa908cd0 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -144,13 +144,15 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD validateRes <- tmpFunc() }() } + + var err error for i := 0; i < len(validateFuns); i++ { r := <-validateRes - if r != nil { - return r + if r != nil && err == nil { + err = r } } - return nil + return err } // CalcGasLimit computes the gas limit of the next block after parent. It aims diff --git a/core/blockchain.go b/core/blockchain.go index 91371940cd..22fe3e5998 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2486,9 +2486,12 @@ func (bc *BlockChain) update() { } func (bc *BlockChain) trustedDiffLayerLoop() { - recheck := time.Tick(diffLayerFreezerRecheckInterval) + recheck := time.NewTicker(diffLayerFreezerRecheckInterval) bc.wg.Add(1) - defer bc.wg.Done() + defer func() { + bc.wg.Done() + recheck.Stop() + }() for { select { case diff := <-bc.diffQueueBuffer: @@ -2521,29 +2524,28 @@ func (bc *BlockChain) trustedDiffLayerLoop() { batch.Reset() } return - case <-recheck: + case <-recheck.C: currentHeight := bc.CurrentBlock().NumberU64() var batch ethdb.Batch for !bc.diffQueue.Empty() { diff, prio := bc.diffQueue.Pop() diffLayer := diff.(*types.DiffLayer) - // if the block old enough - if int64(currentHeight)+prio >= int64(bc.triesInMemory) { - canonicalHash := bc.GetCanonicalHash(uint64(-prio)) - // on the canonical chain - if canonicalHash == diffLayer.BlockHash { - if batch == nil { - batch = bc.db.DiffStore().NewBatch() - } - rawdb.WriteDiffLayer(batch, diffLayer.BlockHash, diffLayer) - staleHash := bc.GetCanonicalHash(uint64(-prio) - bc.diffLayerFreezerBlockLimit) - rawdb.DeleteDiffLayer(batch, staleHash) - } - } else { + // if the block not old enough + if int64(currentHeight)+prio < int64(bc.triesInMemory) { bc.diffQueue.Push(diffLayer, prio) break } + canonicalHash := bc.GetCanonicalHash(uint64(-prio)) + // on the canonical chain + if canonicalHash == diffLayer.BlockHash { + if batch == nil { + batch = bc.db.DiffStore().NewBatch() + } + rawdb.WriteDiffLayer(batch, diffLayer.BlockHash, diffLayer) + staleHash := bc.GetCanonicalHash(uint64(-prio) - bc.diffLayerFreezerBlockLimit) + rawdb.DeleteDiffLayer(batch, staleHash) + } if batch != nil && batch.ValueSize() > ethdb.IdealBatchSize { if err := batch.Write(); err != nil { panic(fmt.Sprintf("Failed to write diff layer, error %v", err)) diff --git a/core/blockchain_diff_test.go b/core/blockchain_diff_test.go index 0b289bdc1c..67affcff75 100644 --- a/core/blockchain_diff_test.go +++ b/core/blockchain_diff_test.go @@ -280,10 +280,14 @@ func TestFreezeDiffLayer(t *testing.T) { blockNum := 1024 fullBackend := newTestBackend(blockNum, true) defer fullBackend.close() + for len(fullBackend.chain.diffQueueBuffer) > 0 { + // Wait for the buffer to be zero. + } // Minus one empty block. if fullBackend.chain.diffQueue.Size() != blockNum-1 { - t.Errorf("size of diff queue is wrong, expected: %d, get: %d", blockNum, fullBackend.chain.diffQueue.Size()) + t.Errorf("size of diff queue is wrong, expected: %d, get: %d", blockNum-1, fullBackend.chain.diffQueue.Size()) } + time.Sleep(diffLayerFreezerRecheckInterval + 1*time.Second) if fullBackend.chain.diffQueue.Size() != int(fullBackend.chain.triesInMemory) { t.Errorf("size of diff queue is wrong, expected: %d, get: %d", blockNum, fullBackend.chain.diffQueue.Size()) diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 4314bd45a9..6874534817 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -1568,8 +1568,8 @@ func TestLargeReorgTrieGC(t *testing.T) { t.Fatalf("failed to finalize competitor chain: %v", err) } for i, block := range competitor[:len(competitor)-TestTriesInMemory] { - if node, _ := chain.stateCache.TrieDB().Node(block.Root()); node != nil { - t.Fatalf("competitor %d: competing chain state missing", i) + if node, err := chain.stateCache.TrieDB().Node(block.Root()); node != nil { + t.Fatalf("competitor %d: competing chain state missing, err: %v", i, err) } } } diff --git a/core/state/snapshot/generate.go b/core/state/snapshot/generate.go index 7e29e51b21..a9f89b20b5 100644 --- a/core/state/snapshot/generate.go +++ b/core/state/snapshot/generate.go @@ -560,6 +560,12 @@ func (dl *diskLayer) generate(stats *generatorStats) { default: } if batch.ValueSize() > ethdb.IdealBatchSize || abort != nil { + if bytes.Compare(currentLocation, dl.genMarker) < 0 { + log.Error("Snapshot generator went backwards", + "currentLocation", fmt.Sprintf("%x", currentLocation), + "genMarker", fmt.Sprintf("%x", dl.genMarker)) + } + // Flush out the batch anyway no matter it's empty or not. // It's possible that all the states are recovered and the // generation indeed makes progress. @@ -634,8 +640,14 @@ func (dl *diskLayer) generate(stats *generatorStats) { stats.storage += common.StorageSize(1 + common.HashLength + dataLen) stats.accounts++ } + marker := accountHash[:] + // If the snap generation goes here after interrupted, genMarker may go backward + // when last genMarker is consisted of accountHash and storageHash + if accMarker != nil && bytes.Equal(marker, accMarker) && len(dl.genMarker) > common.HashLength { + marker = dl.genMarker[:] + } // If we've exceeded our batch allowance or termination was requested, flush to disk - if err := checkAndFlush(accountHash[:]); err != nil { + if err := checkAndFlush(marker); err != nil { return err } // If the iterated account is the contract, create a further loop to diff --git a/core/state/statedb.go b/core/state/statedb.go index c68e09490c..c7a9d92ef7 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -958,6 +958,7 @@ func (s *StateDB) Finalise(deleteEmptyObjects bool) { // goes into transaction receipts. func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash { if s.lightProcessed { + s.StopPrefetcher() return s.trie.Hash() } // Finalise all the dirty storage states and write them into the tries diff --git a/core/systemcontracts/upgrade.go b/core/systemcontracts/upgrade.go index eaae5b1a49..a040bf8d64 100644 --- a/core/systemcontracts/upgrade.go +++ b/core/systemcontracts/upgrade.go @@ -41,6 +41,8 @@ var ( nielsUpgrade = make(map[string]*Upgrade) mirrorUpgrade = make(map[string]*Upgrade) + + brunoUpgrade = make(map[string]*Upgrade) ) func init() { @@ -274,6 +276,39 @@ func init() { }, }, } + + brunoUpgrade[mainNet] = &Upgrade{ + UpgradeName: "bruno", + Configs: []*UpgradeConfig{ + { + ContractAddr: common.HexToAddress(ValidatorContract), + CommitUrl: "https://github.com/binance-chain/bsc-genesis-contract/commit/ce622fef469d84ee418fa6181f3ac962412a5f4f", + Code: "6080604052600436106102e45760003560e01c80638624988211610190578063c8509d81116100dc578063eb57e20211610095578063f9a2bbc71161006f578063f9a2bbc714610a54578063fc3e590814610a69578063fccc281314610a7e578063fd6a687914610a93576102e4565b8063eb57e202146109e6578063eda5868c14610a19578063f340fa0114610a2e576102e4565b8063c8509d81146106d8578063d86222d51461097d578063daacdb6614610992578063dc927faf146109a7578063e086c7b1146109bc578063e1c7392a146109d1576102e4565b8063aaf5eb6811610149578063ad3c9da611610123578063ad3c9da6146108d0578063b7ab4db514610903578063bf9f4995146104c0578063c81b166214610968576102e4565b8063aaf5eb68146107db578063ab51bb96146107f0578063ac43175114610805576102e4565b8063862498821461075d57806396713da9146107725780639dc0926214610787578063a1a11bf51461079c578063a5422d5c146107b1578063a78abc16146107c6576102e4565b806351e806721161024f57806370fd5bad116102085780637942fd05116101e25780637942fd05146106ae57806381650b62146106c3578063831d65d1146106d8578063853230aa14610699576102e4565b806370fd5bad1461066f57806375d47a0a1461068457806378dfed4a14610699576102e4565b806351e8067214610572578063565c56b3146105875780635667515a146105ba5780635d77156c146105cf5780636969a25c146105e45780636e47b4821461065a576102e4565b80633de0f0d8116102a15780633de0f0d8146104ab5780633dffc387146104c057806343756e5c146104eb578063493279b11461051c5780634bf6c882146105485780635192c82c1461055d576102e4565b80630bee7a67146102e95780631182b87514610317578063152ad3b8146104115780631ff180691461043a578063219f22d51461046157806335409f7f14610476575b600080fd5b3480156102f557600080fd5b506102fe610aa8565b6040805163ffffffff9092168252519081900360200190f35b34801561032357600080fd5b5061039c6004803603604081101561033a57600080fd5b60ff8235169190810190604081016020820135600160201b81111561035e57600080fd5b82018360208201111561037057600080fd5b803590602001918460018302840111600160201b8311171561039157600080fd5b509092509050610aad565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103d65781810151838201526020016103be565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041d57600080fd5b50610426610c9a565b604080519115158252519081900360200190f35b34801561044657600080fd5b5061044f610ca3565b60408051918252519081900360200190f35b34801561046d57600080fd5b506102fe610ca9565b34801561048257600080fd5b506104a96004803603602081101561049957600080fd5b50356001600160a01b0316610cae565b005b3480156104b757600080fd5b5061044f610fc2565b3480156104cc57600080fd5b506104d5610fc8565b6040805160ff9092168252519081900360200190f35b3480156104f757600080fd5b50610500610fcd565b604080516001600160a01b039092168252519081900360200190f35b34801561052857600080fd5b50610531610fd3565b6040805161ffff9092168252519081900360200190f35b34801561055457600080fd5b506104d5610fd8565b34801561056957600080fd5b5061044f610fdd565b34801561057e57600080fd5b50610500610fe3565b34801561059357600080fd5b5061044f600480360360208110156105aa57600080fd5b50356001600160a01b0316610fe9565b3480156105c657600080fd5b506104d561103b565b3480156105db57600080fd5b506102fe611040565b3480156105f057600080fd5b5061060e6004803603602081101561060757600080fd5b5035611045565b604080516001600160a01b039788168152958716602087015293909516848401526001600160401b0390911660608401521515608083015260a082019290925290519081900360c00190f35b34801561066657600080fd5b506105006110a9565b34801561067b57600080fd5b506104d56110af565b34801561069057600080fd5b506105006110b4565b3480156106a557600080fd5b5061044f6110ba565b3480156106ba57600080fd5b506104d56110c0565b3480156106cf57600080fd5b506102fe6110c5565b3480156106e457600080fd5b506104a9600480360360408110156106fb57600080fd5b60ff8235169190810190604081016020820135600160201b81111561071f57600080fd5b82018360208201111561073157600080fd5b803590602001918460018302840111600160201b8311171561075257600080fd5b5090925090506110ca565b34801561076957600080fd5b5061044f61117d565b34801561077e57600080fd5b506104d5611183565b34801561079357600080fd5b50610500611188565b3480156107a857600080fd5b5061050061118e565b3480156107bd57600080fd5b5061039c611194565b3480156107d257600080fd5b506104266111b3565b3480156107e757600080fd5b5061044f6111bc565b3480156107fc57600080fd5b506102fe61103b565b34801561081157600080fd5b506104a96004803603604081101561082857600080fd5b810190602081018135600160201b81111561084257600080fd5b82018360208201111561085457600080fd5b803590602001918460018302840111600160201b8311171561087557600080fd5b919390929091602081019035600160201b81111561089257600080fd5b8201836020820111156108a457600080fd5b803590602001918460018302840111600160201b831117156108c557600080fd5b5090925090506111c5565b3480156108dc57600080fd5b5061044f600480360360208110156108f357600080fd5b50356001600160a01b03166115bc565b34801561090f57600080fd5b506109186115ce565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561095457818101518382015260200161093c565b505050509050019250505060405180910390f35b34801561097457600080fd5b506105006116f4565b34801561098957600080fd5b5061044f6116fa565b34801561099e57600080fd5b5061044f611706565b3480156109b357600080fd5b5061050061170c565b3480156109c857600080fd5b5061044f611712565b3480156109dd57600080fd5b506104a9611717565b3480156109f257600080fd5b506104a960048036036020811015610a0957600080fd5b50356001600160a01b031661191a565b348015610a2557600080fd5b506102fe611ae9565b6104a960048036036020811015610a4457600080fd5b50356001600160a01b0316611aee565b348015610a6057600080fd5b50610500611df3565b348015610a7557600080fd5b506104d5611df9565b348015610a8a57600080fd5b50610500611dfe565b348015610a9f57600080fd5b50610500611e04565b606481565b60005460609060ff16610b03576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b3361200014610b435760405162461bcd60e51b815260040180806020018281038252602f815260200180614951602f913960400191505060405180910390fd5b610b4b614158565b6000610b8c85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e0a92505050565b9150915080610ba857610b9f6064611f63565b92505050610c93565b815160009060ff16610bc857610bc18360200151611fc4565b9050610c5f565b825160ff1660011415610c5b57826020015151600114610c35577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb26040518080602001828103825260258152602001806142866025913960400191505060405180910390a1506067610c56565b610bc18360200151600081518110610c4957fe5b6020026020010151612dca565b610c5f565b5060655b63ffffffff8116610c845750506040805160008152602081019091529150610c939050565b610c8d81611f63565b93505050505b9392505050565b60075460ff1681565b60035481565b606881565b3361100114610cee5760405162461bcd60e51b81526004018080602001828103825260298152602001806149ad6029913960400191505060405180910390fd5b6001600160a01b03811660009081526004602052604090205480610d125750610fbf565b600181039050600060018281548110610d2757fe5b60009182526020909120600360049092020101546001549091506000190180610d7657600060018481548110610d5957fe5b906000526020600020906004020160030181905550505050610fbf565b6040805183815290516001600160a01b038616917f3b6f9ef90462b512a1293ecec018670bf7b7f1876fb727590a8a6d7643130a70919081900360200190a26001600160a01b038416600090815260046020526040812055600154600019018314610ef857600180546000198101908110610ded57fe5b906000526020600020906004020160018481548110610e0857fe5b6000918252602082208354600492830290910180546001600160a01b03199081166001600160a01b0393841617825560018087015481840180548416918616919091179055600280880180549185018054909416919095161780835584546001600160401b03600160a01b91829004160267ffffffffffffffff60a01b1990911617808355935460ff600160e01b918290041615150260ff60e01b199094169390931790556003948501549401939093558254868401939192919087908110610ecd57fe5b600091825260208083206004909202909101546001600160a01b031683528201929092526040019020555b6001805480610f0357fe5b60008281526020812060046000199093019283020180546001600160a01b0319908116825560018201805490911690556002810180546001600160e81b03191690556003018190559155818381610f5657fe5b0490508015610fba5760015460005b81811015610fb7578260018281548110610f7b57fe5b9060005260206000209060040201600301540160018281548110610f9b57fe5b6000918252602090912060036004909202010155600101610f65565b50505b505050505b50565b61271081565b600181565b61100181565b603881565b600881565b60065481565b61200081565b6001600160a01b03811660009081526004602052604081205480611011576000915050611036565b60018082038154811061102057fe5b9060005260206000209060040201600301549150505b919050565b600081565b606781565b6001818154811061105257fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b0392831694509082169291821691600160a01b81046001600160401b031691600160e01b90910460ff169086565b61100581565b600281565b61100881565b6103e881565b600b81565b606681565b336120001461110a5760405162461bcd60e51b815260040180806020018281038252602f815260200180614951602f913960400191505060405180910390fd5b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b60025481565b600981565b61100781565b61100681565b6040518061062001604052806105ef81526020016143626105ef913981565b60005460ff1681565b6402540be40081565b60005460ff16611218576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33611007146112585760405162461bcd60e51b815260040180806020018281038252602e8152602001806142cc602e913960400191505060405180910390fd5b6112c284848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526013815272065787069726554696d655365636f6e6447617606c1b60208201529150612f419050565b1561139d57602081146113065760405162461bcd60e51b815260040180806020018281038252602681526020018061431b6026913960400191505060405180910390fd5b604080516020601f84018190048102820181019092528281526000916113449185858083850183828082843760009201919091525061302992505050565b90506064811015801561135a5750620186a08111155b6113955760405162461bcd60e51b815260040180806020018281038252602781526020018061425f6027913960400191505060405180910390fd5b60025561152a565b6113fd84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152686275726e526174696f60b81b60208201529150612f419050565b156114ed5760208114611457576040805162461bcd60e51b815260206004820152601c60248201527f6c656e677468206f66206275726e526174696f206d69736d6174636800000000604482015290519081900360640190fd5b604080516020601f84018190048102820181019092528281526000916114959185858083850183828082843760009201919091525061302992505050565b90506127108111156114d85760405162461bcd60e51b815260040180806020018281038252602b815260200180614209602b913960400191505060405180910390fd5b6006556007805460ff1916600117905561152a565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60046020526000908152604090205481565b6001546060906000805b8281101561161f57600181815481106115ed57fe5b9060005260206000209060040201600201601c9054906101000a900460ff16611617576001909101905b6001016115d8565b5060608160405190808252806020026020018201604052801561164c578160200160208202803683370190505b50600092509050815b838110156116ec576001818154811061166a57fe5b9060005260206000209060040201600201601c9054906101000a900460ff166116e4576001818154811061169a57fe5b600091825260209091206004909102015482516001600160a01b03909116908390859081106116c557fe5b6001600160a01b03909216602092830291909101909101526001909201915b600101611655565b509250505090565b61100281565b67016345785d8a000081565b60055481565b61100381565b602981565b60005460ff161561176f576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b611777614158565b600061179d6040518061062001604052806105ef81526020016143626105ef9139611e0a565b91509150806117dd5760405162461bcd60e51b81526004018080602001828103825260218152602001806143416021913960400191505060405180910390fd5b60005b826020015151811015611902576001836020015182815181106117ff57fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782558587015182850180549185169183169190911790556040860151600283018054606089015160808a01511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590981692909516919091179290921694909417161790915560a0909301516003909301929092559186015180519185019391859081106118d557fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016117e0565b50506103e8600255506000805460ff19166001179055565b336110011461195a5760405162461bcd60e51b81526004018080602001828103825260298152602001806149ad6029913960400191505060405180910390fd5b6001600160a01b0381166000908152600460205260409020548061197e5750610fbf565b60018103905060006001828154811061199357fe5b90600052602060002090600402016003015490506000600183815481106119b657fe5b906000526020600020906004020160030181905550600060018080549050039050836001600160a01b03167f8cd4e147d8af98a9e3b6724021b8bf6aed2e5dac71c38f2dce8161b82585b25d836040518082815260200191505060405180910390a280611a2557505050610fbf565b6000818381611a3057fe5b0490508015610fba5760005b84811015611a8e578160018281548110611a5257fe5b9060005260206000209060040201600301540160018281548110611a7257fe5b6000918252602090912060036004909202010155600101611a3c565b50600180549085015b81811015610fb7578260018281548110611aad57fe5b9060005260206000209060040201600301540160018281548110611acd57fe5b6000918252602090912060036004909202010155600101611a97565b606581565b334114611b2c5760405162461bcd60e51b815260040180806020018281038252602d815260200180614980602d913960400191505060405180910390fd5b60005460ff16611b7f576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60003411611bcc576040805162461bcd60e51b81526020600482015260156024820152746465706f7369742076616c7565206973207a65726f60581b604482015290519081900360640190fd5b6001600160a01b0381166000908152600460205260409020546007543491906103e89060ff1615611bfc57506006545b600083118015611c0c5750600081115b15611cb5576000611c35612710611c29868563ffffffff61302e16565b9063ffffffff61308716565b90508015611cb35760405161dead9082156108fc029083906000818181858888f19350505050158015611c6c573d6000803e3d6000fd5b506040805182815290517f627059660ea01c4733a328effb2294d2f86905bf806da763a89cee254de8bee59181900360200190a1611cb0848263ffffffff6130c916565b93505b505b8115611dad576000600180840381548110611ccc57fe5b9060005260206000209060040201905080600201601c9054906101000a900460ff1615611d37576040805185815290516001600160a01b038716917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a2611da7565b600354611d4a908563ffffffff61310b16565b6003908155810154611d62908563ffffffff61310b16565b60038201556040805185815290516001600160a01b038716917f93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055919081900360200190a25b50611ded565b6040805184815290516001600160a01b038616917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a25b50505050565b61100081565b600381565b61dead81565b61100481565b611e12614158565b6000611e1c614158565b611e24614170565b611e35611e3086613165565b61318a565b90506000805b611e44836131d4565b15611f555780611e6957611e5f611e5a846131f5565b613243565b60ff168452611f4d565b8060011415611f48576060611e85611e80856131f5565b6132fa565b90508051604051908082528060200260200182016040528015611ec257816020015b611eaf614190565b815260200190600190039081611ea75790505b50602086015260005b8151811015611f3d57611edc614190565b6000611efa848481518110611eed57fe5b60200260200101516133cb565b9150915080611f1757876000995099505050505050505050611f5e565b8188602001518481518110611f2857fe5b60209081029190910101525050600101611ecb565b506001925050611f4d565b611f55565b600101611e3b565b50919350909150505b915091565b604080516001808252818301909252606091829190816020015b6060815260200190600190039081611f7d579050509050611fa38363ffffffff166134a8565b81600081518110611fb057fe5b6020026020010181905250610c93816134bb565b6000806060611fd284613545565b915091508161207f577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b8381101561203a578181015183820152602001612022565b50505050905090810190601f1680156120675780820380516001836020036101000a031916815260200191505b509250505060405180910390a1606692505050611036565b600080805b6001548110156120fc5767016345785d8a0000600182815481106120a457fe5b906000526020600020906004020160030154106120c6576001909201916120f4565b6000600182815481106120d557fe5b90600052602060002090600402016003015411156120f4576001909101905b600101612084565b50606082604051908082528060200260200182016040528015612129578160200160208202803683370190505b509050606083604051908082528060200260200182016040528015612158578160200160208202803683370190505b509050606084604051908082528060200260200182016040528015612187578160200160208202803683370190505b5090506060856040519080825280602002602001820160405280156121b6578160200160208202803683370190505b50905060006060866040519080825280602002602001820160405280156121e7578160200160208202803683370190505b509050606087604051908082528060200260200182016040528015612216578160200160208202803683370190505b509050600098506000975060608d905060006110046001600160a01b031663149d14d96040518163ffffffff1660e01b815260040160206040518083038186803b15801561226357600080fd5b505afa158015612277573d6000803e3d6000fd5b505050506040513d602081101561228d57600080fd5b5051905067016345785d8a0000811115612302577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb26040518080602001828103825260218152602001806142fa6021913960400191505060405180910390a160689d5050505050505050505050505050611036565b60005b6001548110156125755767016345785d8a00006001828154811061232557fe5b906000526020600020906004020160030154106124ab576001818154811061234957fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b03168a8d8151811061237a57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006402540be400600183815481106123af57fe5b906000526020600020906004020160030154816123c857fe5b06600183815481106123d657fe5b9060005260206000209060040201600301540390506123fe83826130c990919063ffffffff16565b8a8e8151811061240a57fe5b6020026020010181815250506001828154811061242357fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b0316888e8151811061245457fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081898e8151811061248157fe5b602090810291909101015261249c878263ffffffff61310b16565b6001909d019c965061256d9050565b6000600182815481106124ba57fe5b906000526020600020906004020160030154111561256d57600181815481106124df57fe5b906000526020600020906004020160010160009054906101000a90046001600160a01b0316858c8151811061251057fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506001818154811061253d57fe5b906000526020600020906004020160030154848c8151811061255b57fe5b60209081029190910101526001909a01995b600101612305565b50600085156129b3576110046001600160a01b0316636e056520878c8c8b60025442016040518663ffffffff1660e01b815260040180806020018060200180602001856001600160401b03166001600160401b03168152602001848103845288818151815260200191508051906020019060200280838360005b838110156126075781810151838201526020016125ef565b50505050905001848103835287818151815260200191508051906020019060200280838360005b8381101561264657818101518382015260200161262e565b50505050905001848103825286818151815260200191508051906020019060200280838360005b8381101561268557818101518382015260200161266d565b505050509050019750505050505050506020604051808303818588803b1580156126ae57600080fd5b505af1935050505080156126d457506040513d60208110156126cf57600080fd5b505160015b61290f576040516000815260443d10156126f05750600061278b565b60046000803e60005160e01c6308c379a0811461271157600091505061278b565b60043d036004833e81513d60248201116001600160401b038211171561273c5760009250505061278b565b80830180516001600160401b0381111561275d57600094505050505061278b565b8060208301013d860181111561277b5760009550505050505061278b565b601f01601f191660405250925050505b80612796575061283a565b60019150867fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280826040518080602001828103825283818151815260200191508051906020019080838360005b838110156127fa5781810151838201526020016127e2565b50505050905090810190601f1680156128275780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061290a565b3d808015612864576040519150601f19603f3d011682016040523d82523d6000602084013e612869565b606091505b5060019150867fbfa884552dd8921b6ce90bfe906952ae5b3b29be0cc1a951d4f62697635a3a45826040518080602001828103825283818151815260200191508051906020019080838360005b838110156128ce5781810151838201526020016128b6565b50505050905090810190601f1680156128fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6129b3565b801561294d576040805188815290517fa217d08e65f80c73121cd9db834d81652d544bfbf452f6d04922b16c90a37b709181900360200190a16129b1565b604080516020808252601b908201527f6261746368207472616e736665722072657475726e2066616c7365000000000081830152905188917fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280919081900360600190a25b505b8015612b695760005b8851811015612b675760008982815181106129d357fe5b602002602001015190506000600182815481106129ec57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116916108fc9185908110612a1d57fe5b9060005260206000209060040201600301549081150290604051600060405180830381858888f1935050505090508015612ad95760018281548110612a5e57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d9185908110612aad57fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a2612b5d565b60018281548110612ae657fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d9185908110612b3557fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a25b50506001016129bc565b505b845115612cb35760005b8551811015612cb1576000868281518110612b8a57fe5b60200260200101516001600160a01b03166108fc878481518110612baa57fe5b60200260200101519081150290604051600060405180830381858888f1935050505090508015612c4057868281518110612be057fe5b60200260200101516001600160a01b03167f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d878481518110612c1e57fe5b60200260200101516040518082815260200191505060405180910390a2612ca8565b868281518110612c4c57fe5b60200260200101516001600160a01b03167f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d878481518110612c8a57fe5b60200260200101516040518082815260200191505060405180910390a25b50600101612b73565b505b4715612d1c576040805147815290517f6ecc855f9440a9282c90913bbc91619fd44f5ec0b462af28d127b116f130aa4d9181900360200190a1604051611002904780156108fc02916000818181858888f19350505050158015612d1a573d6000803e3d6000fd5b505b60006003819055600555825115612d3657612d3683613627565b6110016001600160a01b031663fc4333cd6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612d7357600080fd5b505af1158015612d87573d6000803e3d6000fd5b50506040517fedd8d7296956dd970ab4de3f2fc03be2b0ffc615d20cd4c72c6e44f928630ebf925060009150a15060009f9e505050505050505050505050505050565b80516001600160a01b0316600090815260046020526040812054801580612e1b5750600180820381548110612dfb57fe5b9060005260206000209060040201600201601c9054906101000a900460ff165b15612e615782516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a26000915050611036565b600154600554600019820111801590612eb75784516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a260009350505050611036565b600580546001908101909155805481906000198601908110612ed557fe5b6000918252602082206002600490920201018054921515600160e01b0260ff60e01b199093169290921790915585516040516001600160a01b03909116917ff226e7d8f547ff903d9d419cf5f54e0d7d07efa9584135a53a057c5f1f27f49a91a2506000949350505050565b6000816040516020018082805190602001908083835b60208310612f765780518252601f199092019160209182019101612f57565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612fe45780518252601f199092019160209182019101612fc5565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001201490505b92915050565b015190565b60008261303d57506000613023565b8282028284828161304a57fe5b0414610c935760405162461bcd60e51b81526004018080602001828103825260218152602001806142ab6021913960400191505060405180910390fd5b6000610c9383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613ae8565b6000610c9383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613b8a565b600082820183811015610c93576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b61316d6141c5565b506040805180820190915281518152602082810190820152919050565b613192614170565b61319b82613be4565b6131a457600080fd5b60006131b38360200151613c1e565b60208085015160408051808201909152868152920190820152915050919050565b60006131de6141c5565b505080518051602091820151919092015191011190565b6131fd6141c5565b613206826131d4565b61320f57600080fd5b6020820151600061321f82613c81565b80830160209586015260408051808201909152908152938401919091525090919050565b80516000901580159061325857508151602110155b61326157600080fd5b60006132708360200151613c1e565b905080836000015110156132cb576040805162461bcd60e51b815260206004820152601a60248201527f6c656e677468206973206c657373207468616e206f6666736574000000000000604482015290519081900360640190fd5b8251602080850151830180519284900392918310156132f157826020036101000a820491505b50949350505050565b606061330582613be4565b61330e57600080fd5b600061331983613db4565b905060608160405190808252806020026020018201604052801561335757816020015b6133446141c5565b81526020019060019003908161333c5790505b50905060006133698560200151613c1e565b60208601510190506000805b848110156133c05761338683613c81565b91506040518060400160405280838152602001848152508482815181106133a957fe5b602090810291909101015291810191600101613375565b509195945050505050565b6133d3614190565b60006133dd614190565b6133e5614170565b6133ee8561318a565b90506000805b6133fd836131d4565b15611f55578061342857613418613413846131f5565b613e10565b6001600160a01b031684526134a0565b80600114156134505761343d613413846131f5565b6001600160a01b031660208501526134a0565b806002141561347857613465613413846131f5565b6001600160a01b031660408501526134a0565b8060031415611f485761348d611e5a846131f5565b6001600160401b03166060850152600191505b6001016133f4565b60606130236134b683613e2a565b613f10565b60608151600014156134dc5750604080516000815260208101909152611036565b6060826000815181106134eb57fe5b602002602001015190506000600190505b835181101561352c576135228285838151811061351557fe5b6020026020010151613f62565b91506001016134fc565b50610c9361353f825160c060ff16613fdf565b82613f62565b600060606029835111156135775760006040518060600160405280602981526020016141e06029913991509150611f5e565b60005b835181101561360d5760005b818110156136045784818151811061359a57fe5b6020026020010151600001516001600160a01b03168583815181106135bb57fe5b6020026020010151600001516001600160a01b031614156135fc5760006040518060600160405280602b8152602001614234602b9139935093505050611f5e565b600101613586565b5060010161357a565b505060408051602081019091526000815260019150915091565b600154815160005b82811015613744576001613641614190565b6001838154811061364e57fe5b600091825260208083206040805160c08101825260049490940290910180546001600160a01b0390811685526001820154811693850193909352600281015492831691840191909152600160a01b82046001600160401b03166060840152600160e01b90910460ff16151560808301526003015460a082015291505b84811015613718578681815181106136de57fe5b6020026020010151600001516001600160a01b031682600001516001600160a01b031614156137105760009250613718565b6001016136ca565b50811561373a5780516001600160a01b03166000908152600460205260408120555b505060010161362f565b50808211156137b957805b828110156137b757600180548061376257fe5b60008281526020812060046000199093019283020180546001600160a01b03199081168255600182810180549092169091556002820180546001600160e81b031916905560039091019190915591550161374f565b505b60008183106137c857816137ca565b825b905060005b818110156139c45761387c8582815181106137e657fe5b6020026020010151600183815481106137fb57fe5b60009182526020918290206040805160c08101825260049390930290910180546001600160a01b0390811684526001820154811694840194909452600281015493841691830191909152600160a01b83046001600160401b03166060830152600160e01b90920460ff161515608082015260039091015460a08201526140d7565b61399757806001016004600087848151811061389457fe5b6020026020010151600001516001600160a01b03166001600160a01b03168152602001908152602001600020819055508481815181106138d057fe5b6020026020010151600182815481106138e557fe5b6000918252602091829020835160049092020180546001600160a01b039283166001600160a01b0319918216178255928401516001820180549184169185169190911790556040840151600282018054606087015160808801511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b1995909716929097169190911792909216939093171692909217905560a0909101516003909101556139bc565b6000600182815481106139a657fe5b9060005260206000209060040201600301819055505b6001016137cf565b5082821115611ded57825b82811015610fba5760018582815181106139e557fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782559585015181840180549184169188169190911790556040850151600282018054606088015160808901511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590971692909a169190911792909216939093171695909517905560a09092015160039093019290925587519084019290889085908110613abb57fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016139cf565b60008183613b745760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b39578181015183820152602001613b21565b50505050905090810190601f168015613b665780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613b8057fe5b0495945050505050565b60008184841115613bdc5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613b39578181015183820152602001613b21565b505050900390565b8051600090613bf557506000611036565b6020820151805160001a9060c0821015613c1457600092505050611036565b5060019392505050565b8051600090811a6080811015613c38576000915050611036565b60b8811080613c53575060c08110801590613c53575060f881105b15613c62576001915050611036565b60c0811015613c765760b519019050611036565b60f519019050611036565b80516000908190811a6080811015613c9c5760019150613dad565b60b8811015613cb157607e1981019150613dad565b60c0811015613d2b57600060b78203600186019550806020036101000a865104915060018101820193505080831015613d25576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b50613dad565b60f8811015613d405760be1981019150613dad565b600060f78203600186019550806020036101000a865104915060018101820193505080831015613dab576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b505b5092915050565b8051600090613dc557506000611036565b60008090506000613dd98460200151613c1e565b602085015185519181019250015b80821015613e0757613df882613c81565b60019093019290910190613de7565b50909392505050565b8051600090601514613e2157600080fd5b61302382613243565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff198416613e6e57506018613e92565b6fffffffffffffffffffffffffffffffff198416613e8e57506010613e92565b5060005b6020811015613ec857818181518110613ea757fe5b01602001516001600160f81b03191615613ec057613ec8565b600101613e92565b60008160200390506060816040519080825280601f01601f191660200182016040528015613efd576020820181803683370190505b5080830196909652508452509192915050565b606081516001148015613f425750607f60f81b82600081518110613f3057fe5b01602001516001600160f81b03191611155b15613f4e575080611036565b613023613f608351608060ff16613fdf565b835b6060806040519050835180825260208201818101602087015b81831015613f93578051835260209283019201613f7b565b50855184518101855292509050808201602086015b81831015613fc0578051835260209283019201613fa8565b508651929092011591909101601f01601f191660405250905092915050565b606068010000000000000000831061402f576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b604080516001808252818301909252606091602082018180368337019050509050603784116140895782840160f81b8160008151811061406b57fe5b60200101906001600160f81b031916908160001a9053509050613023565b606061409485613e2a565b90508381510160370160f81b826000815181106140ad57fe5b60200101906001600160f81b031916908160001a9053506140ce8282613f62565b95945050505050565b805182516000916001600160a01b039182169116148015614111575081602001516001600160a01b031683602001516001600160a01b0316145b8015614136575081604001516001600160a01b031683604001516001600160a01b0316145b8015610c935750506060908101519101516001600160401b0390811691161490565b60408051808201909152600081526060602082015290565b60405180604001604052806141836141c5565b8152602001600081525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60405180604001604052806000815260200160008152509056fe746865206e756d626572206f662076616c696461746f72732065786365656420746865206c696d6974746865206275726e526174696f206d757374206265206e6f2067726561746572207468616e2031303030306475706c696361746520636f6e73656e7375732061646472657373206f662076616c696461746f725365747468652065787069726554696d655365636f6e64476170206973206f7574206f662072616e67656c656e677468206f66206a61696c2076616c696461746f7273206d757374206265206f6e65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374666565206973206c6172676572207468616e2044555354595f494e434f4d494e476c656e677468206f662065787069726554696d655365636f6e64476170206d69736d617463686661696c656420746f20706172736520696e69742076616c696461746f72536574f905ec80f905e8f846942a7cdd959bfe8d9487b2a43b33565295a698f7e294b6a7edd747c0554875d3fc531d19ba1497992c5e941ff80f3f7f110ffd8920a3ac38fdef318fe94a3f86048c27395000f846946488aa4d1955ee33403f8ccb1d4de5fb97c7ade294220f003d8bdfaadf52aa1e55ae4cc485e6794875941a87e90e440a39c99aa9cb5cea0ad6a3f0b2407b86048c27395000f846949ef9f4360c606c7ab4db26b016007d3ad0ab86a0946103af86a874b705854033438383c82575f25bc29418e2db06cbff3e3c5f856410a1838649e760175786048c27395000f84694ee01c3b1283aa067c58eab4709f85e99d46de5fe94ee4b9bfb1871c64e2bcabb1dc382dc8b7c4218a29415904ab26ab0e99d70b51c220ccdcccabee6e29786048c27395000f84694685b1ded8013785d6623cc18d214320b6bb6475994a20ef4e5e4e7e36258dbf51f4d905114cb1b34bc9413e39085dc88704f4394d35209a02b1a9520320c86048c27395000f8469478f3adfc719c99674c072166708589033e2d9afe9448a30d5eaa7b64492a160f139e2da2800ec3834e94055838358c29edf4dcc1ba1985ad58aedbb6be2b86048c27395000f84694c2be4ec20253b8642161bc3f444f53679c1f3d479466f50c616d737e60d7ca6311ff0d9c434197898a94d1d678a2506eeaa365056fe565df8bc8659f28b086048c27395000f846942f7be8361c80a4c1e7e9aaf001d0877f1cfde218945f93992ac37f3e61db2ef8a587a436a161fd210b94ecbc4fb1a97861344dad0867ca3cba2b860411f086048c27395000f84694ce2fd7544e0b2cc94692d4a704debef7bcb613289444abc67b4b2fba283c582387f54c9cba7c34bafa948acc2ab395ded08bb75ce85bf0f95ad2abc51ad586048c27395000f84694b8f7166496996a7da21cf1f1b04d9b3e26a3d077946770572763289aac606e4f327c2f6cc1aa3b3e3b94882d745ed97d4422ca8da1c22ec49d880c4c097286048c27395000f846942d4c407bbe49438ed859fe965b140dcf1aab71a9943ad0939e120f33518fbba04631afe7a3ed6327b194b2bbb170ca4e499a2b0f3cc85ebfa6e8c4dfcbea86048c27395000f846946bbad7cf34b5fa511d8e963dbba288b1960e75d694853b0f6c324d1f4e76c8266942337ac1b0af1a229442498946a51ca5924552ead6fc2af08b94fcba648601d1a94a2000f846944430b3230294d12c6ab2aac5c2cd68e80b16b581947b107f4976a252a6939b771202c28e64e03f52d694795811a7f214084116949fc4f53cedbf189eeab28601d1a94a2000f84694ea0a6e3c511bbd10f4519ece37dc24887e11b55d946811ca77acfb221a49393c193f3a22db829fcc8e9464feb7c04830dd9ace164fc5c52b3f5a29e5018a8601d1a94a2000f846947ae2f5b9e386cd1b50a4550696d957cb4900f03a94e83bcc5077e6b873995c24bac871b5ad856047e19464e48d4057a90b233e026c1041e6012ada897fe88601d1a94a2000f8469482012708dafc9e1b880fd083b32182b869be8e09948e5adc73a2d233a1b496ed3115464dd6c7b887509428b383d324bc9a37f4e276190796ba5a8947f5ed8601d1a94a2000f8469422b81f8e175ffde54d797fe11eb03f9e3bf75f1d94a1c3ef7ca38d8ba80cce3bfc53ebd2903ed21658942767f7447f7b9b70313d4147b795414aecea54718601d1a94a2000f8469468bf0b8b6fb4e317a0f9d6f03eaf8ce6675bc60d94675cfe570b7902623f47e7f59c9664b5f5065dcf94d84f0d2e50bcf00f2fc476e1c57f5ca2d57f625b8601d1a94a2000f846948c4d90829ce8f72d0163c1d5cf348a862d5506309485c42a7b34309bee2ed6a235f86d16f059deec5894cc2cedc53f0fa6d376336efb67e43d167169f3b78601d1a94a2000f8469435e7a025f4da968de7e4d7e4004197917f4070f194b1182abaeeb3b4d8eba7e6a4162eac7ace23d57394c4fd0d870da52e73de2dd8ded19fe3d26f43a1138601d1a94a2000f84694d6caa02bbebaebb5d7e581e4b66559e635f805ff94c07335cf083c1c46a487f0325769d88e163b653694efaff03b42e41f953a925fc43720e45fb61a19938601d1a94a2000746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d6573736167652073656e646572206d7573742062652074686520626c6f636b2070726f6475636572746865206d6573736167652073656e646572206d75737420626520736c61736820636f6e7472616374a2646970667358221220b806ba3d9dd9e078bac9726f79b32c9b62db327924a189cc1a9e4e106ffbe50d64736f6c63430006040033", + }, + }, + } + + brunoUpgrade[chapelNet] = &Upgrade{ + UpgradeName: "bruno", + Configs: []*UpgradeConfig{ + { + ContractAddr: common.HexToAddress(ValidatorContract), + CommitUrl: "https://github.com/binance-chain/bsc-genesis-contract/commit/ce622fef469d84ee418fa6181f3ac962412a5f4f", + Code: "6080604052600436106102e45760003560e01c80638624988211610190578063c8509d81116100dc578063eb57e20211610095578063f9a2bbc71161006f578063f9a2bbc714610a54578063fc3e590814610a69578063fccc281314610a7e578063fd6a687914610a93576102e4565b8063eb57e202146109e6578063eda5868c14610a19578063f340fa0114610a2e576102e4565b8063c8509d81146106d8578063d86222d51461097d578063daacdb6614610992578063dc927faf146109a7578063e086c7b1146109bc578063e1c7392a146109d1576102e4565b8063aaf5eb6811610149578063ad3c9da611610123578063ad3c9da6146108d0578063b7ab4db514610903578063bf9f4995146104c0578063c81b166214610968576102e4565b8063aaf5eb68146107db578063ab51bb96146107f0578063ac43175114610805576102e4565b8063862498821461075d57806396713da9146107725780639dc0926214610787578063a1a11bf51461079c578063a5422d5c146107b1578063a78abc16146107c6576102e4565b806351e806721161024f57806370fd5bad116102085780637942fd05116101e25780637942fd05146106ae57806381650b62146106c3578063831d65d1146106d8578063853230aa14610699576102e4565b806370fd5bad1461066f57806375d47a0a1461068457806378dfed4a14610699576102e4565b806351e8067214610572578063565c56b3146105875780635667515a146105ba5780635d77156c146105cf5780636969a25c146105e45780636e47b4821461065a576102e4565b80633de0f0d8116102a15780633de0f0d8146104ab5780633dffc387146104c057806343756e5c146104eb578063493279b11461051c5780634bf6c882146105485780635192c82c1461055d576102e4565b80630bee7a67146102e95780631182b87514610317578063152ad3b8146104115780631ff180691461043a578063219f22d51461046157806335409f7f14610476575b600080fd5b3480156102f557600080fd5b506102fe610aa8565b6040805163ffffffff9092168252519081900360200190f35b34801561032357600080fd5b5061039c6004803603604081101561033a57600080fd5b60ff8235169190810190604081016020820135600160201b81111561035e57600080fd5b82018360208201111561037057600080fd5b803590602001918460018302840111600160201b8311171561039157600080fd5b509092509050610aad565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103d65781810151838201526020016103be565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041d57600080fd5b50610426610c9a565b604080519115158252519081900360200190f35b34801561044657600080fd5b5061044f610ca3565b60408051918252519081900360200190f35b34801561046d57600080fd5b506102fe610ca9565b34801561048257600080fd5b506104a96004803603602081101561049957600080fd5b50356001600160a01b0316610cae565b005b3480156104b757600080fd5b5061044f610fc2565b3480156104cc57600080fd5b506104d5610fc8565b6040805160ff9092168252519081900360200190f35b3480156104f757600080fd5b50610500610fcd565b604080516001600160a01b039092168252519081900360200190f35b34801561052857600080fd5b50610531610fd3565b6040805161ffff9092168252519081900360200190f35b34801561055457600080fd5b506104d5610fd8565b34801561056957600080fd5b5061044f610fdd565b34801561057e57600080fd5b50610500610fe3565b34801561059357600080fd5b5061044f600480360360208110156105aa57600080fd5b50356001600160a01b0316610fe9565b3480156105c657600080fd5b506104d561103b565b3480156105db57600080fd5b506102fe611040565b3480156105f057600080fd5b5061060e6004803603602081101561060757600080fd5b5035611045565b604080516001600160a01b039788168152958716602087015293909516848401526001600160401b0390911660608401521515608083015260a082019290925290519081900360c00190f35b34801561066657600080fd5b506105006110a9565b34801561067b57600080fd5b506104d56110af565b34801561069057600080fd5b506105006110b4565b3480156106a557600080fd5b5061044f6110ba565b3480156106ba57600080fd5b506104d56110c0565b3480156106cf57600080fd5b506102fe6110c5565b3480156106e457600080fd5b506104a9600480360360408110156106fb57600080fd5b60ff8235169190810190604081016020820135600160201b81111561071f57600080fd5b82018360208201111561073157600080fd5b803590602001918460018302840111600160201b8311171561075257600080fd5b5090925090506110ca565b34801561076957600080fd5b5061044f61117d565b34801561077e57600080fd5b506104d5611183565b34801561079357600080fd5b50610500611188565b3480156107a857600080fd5b5061050061118e565b3480156107bd57600080fd5b5061039c611194565b3480156107d257600080fd5b506104266111b3565b3480156107e757600080fd5b5061044f6111bc565b3480156107fc57600080fd5b506102fe61103b565b34801561081157600080fd5b506104a96004803603604081101561082857600080fd5b810190602081018135600160201b81111561084257600080fd5b82018360208201111561085457600080fd5b803590602001918460018302840111600160201b8311171561087557600080fd5b919390929091602081019035600160201b81111561089257600080fd5b8201836020820111156108a457600080fd5b803590602001918460018302840111600160201b831117156108c557600080fd5b5090925090506111c5565b3480156108dc57600080fd5b5061044f600480360360208110156108f357600080fd5b50356001600160a01b03166115bc565b34801561090f57600080fd5b506109186115ce565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561095457818101518382015260200161093c565b505050509050019250505060405180910390f35b34801561097457600080fd5b506105006116f4565b34801561098957600080fd5b5061044f6116fa565b34801561099e57600080fd5b5061044f611706565b3480156109b357600080fd5b5061050061170c565b3480156109c857600080fd5b5061044f611712565b3480156109dd57600080fd5b506104a9611717565b3480156109f257600080fd5b506104a960048036036020811015610a0957600080fd5b50356001600160a01b031661191a565b348015610a2557600080fd5b506102fe611ae9565b6104a960048036036020811015610a4457600080fd5b50356001600160a01b0316611aee565b348015610a6057600080fd5b50610500611df3565b348015610a7557600080fd5b506104d5611df9565b348015610a8a57600080fd5b50610500611dfe565b348015610a9f57600080fd5b50610500611e04565b606481565b60005460609060ff16610b03576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b3361200014610b435760405162461bcd60e51b815260040180806020018281038252602f81526020018061450d602f913960400191505060405180910390fd5b610b4b614158565b6000610b8c85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e0a92505050565b9150915080610ba857610b9f6064611f63565b92505050610c93565b815160009060ff16610bc857610bc18360200151611fc4565b9050610c5f565b825160ff1660011415610c5b57826020015151600114610c35577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb26040518080602001828103825260258152602001806144316025913960400191505060405180910390a1506067610c56565b610bc18360200151600081518110610c4957fe5b6020026020010151612dca565b610c5f565b5060655b63ffffffff8116610c845750506040805160008152602081019091529150610c939050565b610c8d81611f63565b93505050505b9392505050565b60075460ff1681565b60035481565b606881565b3361100114610cee5760405162461bcd60e51b81526004018080602001828103825260298152602001806145696029913960400191505060405180910390fd5b6001600160a01b03811660009081526004602052604090205480610d125750610fbf565b600181039050600060018281548110610d2757fe5b60009182526020909120600360049092020101546001549091506000190180610d7657600060018481548110610d5957fe5b906000526020600020906004020160030181905550505050610fbf565b6040805183815290516001600160a01b038616917f3b6f9ef90462b512a1293ecec018670bf7b7f1876fb727590a8a6d7643130a70919081900360200190a26001600160a01b038416600090815260046020526040812055600154600019018314610ef857600180546000198101908110610ded57fe5b906000526020600020906004020160018481548110610e0857fe5b6000918252602082208354600492830290910180546001600160a01b03199081166001600160a01b0393841617825560018087015481840180548416918616919091179055600280880180549185018054909416919095161780835584546001600160401b03600160a01b91829004160267ffffffffffffffff60a01b1990911617808355935460ff600160e01b918290041615150260ff60e01b199094169390931790556003948501549401939093558254868401939192919087908110610ecd57fe5b600091825260208083206004909202909101546001600160a01b031683528201929092526040019020555b6001805480610f0357fe5b60008281526020812060046000199093019283020180546001600160a01b0319908116825560018201805490911690556002810180546001600160e81b03191690556003018190559155818381610f5657fe5b0490508015610fba5760015460005b81811015610fb7578260018281548110610f7b57fe5b9060005260206000209060040201600301540160018281548110610f9b57fe5b6000918252602090912060036004909202010155600101610f65565b50505b505050505b50565b61271081565b600181565b61100181565b606181565b600881565b60065481565b61200081565b6001600160a01b03811660009081526004602052604081205480611011576000915050611036565b60018082038154811061102057fe5b9060005260206000209060040201600301549150505b919050565b600081565b606781565b6001818154811061105257fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b0392831694509082169291821691600160a01b81046001600160401b031691600160e01b90910460ff169086565b61100581565b600281565b61100881565b6103e881565b600b81565b606681565b336120001461110a5760405162461bcd60e51b815260040180806020018281038252602f81526020018061450d602f913960400191505060405180910390fd5b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b60025481565b600981565b61100781565b61100681565b604051806101e001604052806101ab81526020016141e06101ab913981565b60005460ff1681565b6402540be40081565b60005460ff16611218576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33611007146112585760405162461bcd60e51b815260040180806020018281038252602e815260200180614477602e913960400191505060405180910390fd5b6112c284848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526013815272065787069726554696d655365636f6e6447617606c1b60208201529150612f419050565b1561139d57602081146113065760405162461bcd60e51b81526004018080602001828103825260268152602001806144c66026913960400191505060405180910390fd5b604080516020601f84018190048102820181019092528281526000916113449185858083850183828082843760009201919091525061302992505050565b90506064811015801561135a5750620186a08111155b6113955760405162461bcd60e51b815260040180806020018281038252602781526020018061440a6027913960400191505060405180910390fd5b60025561152a565b6113fd84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152686275726e526174696f60b81b60208201529150612f419050565b156114ed5760208114611457576040805162461bcd60e51b815260206004820152601c60248201527f6c656e677468206f66206275726e526174696f206d69736d6174636800000000604482015290519081900360640190fd5b604080516020601f84018190048102820181019092528281526000916114959185858083850183828082843760009201919091525061302992505050565b90506127108111156114d85760405162461bcd60e51b815260040180806020018281038252602b8152602001806143b4602b913960400191505060405180910390fd5b6006556007805460ff1916600117905561152a565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60046020526000908152604090205481565b6001546060906000805b8281101561161f57600181815481106115ed57fe5b9060005260206000209060040201600201601c9054906101000a900460ff16611617576001909101905b6001016115d8565b5060608160405190808252806020026020018201604052801561164c578160200160208202803683370190505b50600092509050815b838110156116ec576001818154811061166a57fe5b9060005260206000209060040201600201601c9054906101000a900460ff166116e4576001818154811061169a57fe5b600091825260209091206004909102015482516001600160a01b03909116908390859081106116c557fe5b6001600160a01b03909216602092830291909101909101526001909201915b600101611655565b509250505090565b61100281565b67016345785d8a000081565b60055481565b61100381565b602981565b60005460ff161561176f576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b611777614158565b600061179d604051806101e001604052806101ab81526020016141e06101ab9139611e0a565b91509150806117dd5760405162461bcd60e51b81526004018080602001828103825260218152602001806144ec6021913960400191505060405180910390fd5b60005b826020015151811015611902576001836020015182815181106117ff57fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782558587015182850180549185169183169190911790556040860151600283018054606089015160808a01511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590981692909516919091179290921694909417161790915560a0909301516003909301929092559186015180519185019391859081106118d557fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016117e0565b50506103e8600255506000805460ff19166001179055565b336110011461195a5760405162461bcd60e51b81526004018080602001828103825260298152602001806145696029913960400191505060405180910390fd5b6001600160a01b0381166000908152600460205260409020548061197e5750610fbf565b60018103905060006001828154811061199357fe5b90600052602060002090600402016003015490506000600183815481106119b657fe5b906000526020600020906004020160030181905550600060018080549050039050836001600160a01b03167f8cd4e147d8af98a9e3b6724021b8bf6aed2e5dac71c38f2dce8161b82585b25d836040518082815260200191505060405180910390a280611a2557505050610fbf565b6000818381611a3057fe5b0490508015610fba5760005b84811015611a8e578160018281548110611a5257fe5b9060005260206000209060040201600301540160018281548110611a7257fe5b6000918252602090912060036004909202010155600101611a3c565b50600180549085015b81811015610fb7578260018281548110611aad57fe5b9060005260206000209060040201600301540160018281548110611acd57fe5b6000918252602090912060036004909202010155600101611a97565b606581565b334114611b2c5760405162461bcd60e51b815260040180806020018281038252602d81526020018061453c602d913960400191505060405180910390fd5b60005460ff16611b7f576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60003411611bcc576040805162461bcd60e51b81526020600482015260156024820152746465706f7369742076616c7565206973207a65726f60581b604482015290519081900360640190fd5b6001600160a01b0381166000908152600460205260409020546007543491906103e89060ff1615611bfc57506006545b600083118015611c0c5750600081115b15611cb5576000611c35612710611c29868563ffffffff61302e16565b9063ffffffff61308716565b90508015611cb35760405161dead9082156108fc029083906000818181858888f19350505050158015611c6c573d6000803e3d6000fd5b506040805182815290517f627059660ea01c4733a328effb2294d2f86905bf806da763a89cee254de8bee59181900360200190a1611cb0848263ffffffff6130c916565b93505b505b8115611dad576000600180840381548110611ccc57fe5b9060005260206000209060040201905080600201601c9054906101000a900460ff1615611d37576040805185815290516001600160a01b038716917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a2611da7565b600354611d4a908563ffffffff61310b16565b6003908155810154611d62908563ffffffff61310b16565b60038201556040805185815290516001600160a01b038716917f93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055919081900360200190a25b50611ded565b6040805184815290516001600160a01b038616917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a25b50505050565b61100081565b600381565b61dead81565b61100481565b611e12614158565b6000611e1c614158565b611e24614170565b611e35611e3086613165565b61318a565b90506000805b611e44836131d4565b15611f555780611e6957611e5f611e5a846131f5565b613243565b60ff168452611f4d565b8060011415611f48576060611e85611e80856131f5565b6132fa565b90508051604051908082528060200260200182016040528015611ec257816020015b611eaf614190565b815260200190600190039081611ea75790505b50602086015260005b8151811015611f3d57611edc614190565b6000611efa848481518110611eed57fe5b60200260200101516133cb565b9150915080611f1757876000995099505050505050505050611f5e565b8188602001518481518110611f2857fe5b60209081029190910101525050600101611ecb565b506001925050611f4d565b611f55565b600101611e3b565b50919350909150505b915091565b604080516001808252818301909252606091829190816020015b6060815260200190600190039081611f7d579050509050611fa38363ffffffff166134a8565b81600081518110611fb057fe5b6020026020010181905250610c93816134bb565b6000806060611fd284613545565b915091508161207f577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b8381101561203a578181015183820152602001612022565b50505050905090810190601f1680156120675780820380516001836020036101000a031916815260200191505b509250505060405180910390a1606692505050611036565b600080805b6001548110156120fc5767016345785d8a0000600182815481106120a457fe5b906000526020600020906004020160030154106120c6576001909201916120f4565b6000600182815481106120d557fe5b90600052602060002090600402016003015411156120f4576001909101905b600101612084565b50606082604051908082528060200260200182016040528015612129578160200160208202803683370190505b509050606083604051908082528060200260200182016040528015612158578160200160208202803683370190505b509050606084604051908082528060200260200182016040528015612187578160200160208202803683370190505b5090506060856040519080825280602002602001820160405280156121b6578160200160208202803683370190505b50905060006060866040519080825280602002602001820160405280156121e7578160200160208202803683370190505b509050606087604051908082528060200260200182016040528015612216578160200160208202803683370190505b509050600098506000975060608d905060006110046001600160a01b031663149d14d96040518163ffffffff1660e01b815260040160206040518083038186803b15801561226357600080fd5b505afa158015612277573d6000803e3d6000fd5b505050506040513d602081101561228d57600080fd5b5051905067016345785d8a0000811115612302577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb26040518080602001828103825260218152602001806144a56021913960400191505060405180910390a160689d5050505050505050505050505050611036565b60005b6001548110156125755767016345785d8a00006001828154811061232557fe5b906000526020600020906004020160030154106124ab576001818154811061234957fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b03168a8d8151811061237a57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006402540be400600183815481106123af57fe5b906000526020600020906004020160030154816123c857fe5b06600183815481106123d657fe5b9060005260206000209060040201600301540390506123fe83826130c990919063ffffffff16565b8a8e8151811061240a57fe5b6020026020010181815250506001828154811061242357fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b0316888e8151811061245457fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081898e8151811061248157fe5b602090810291909101015261249c878263ffffffff61310b16565b6001909d019c965061256d9050565b6000600182815481106124ba57fe5b906000526020600020906004020160030154111561256d57600181815481106124df57fe5b906000526020600020906004020160010160009054906101000a90046001600160a01b0316858c8151811061251057fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506001818154811061253d57fe5b906000526020600020906004020160030154848c8151811061255b57fe5b60209081029190910101526001909a01995b600101612305565b50600085156129b3576110046001600160a01b0316636e056520878c8c8b60025442016040518663ffffffff1660e01b815260040180806020018060200180602001856001600160401b03166001600160401b03168152602001848103845288818151815260200191508051906020019060200280838360005b838110156126075781810151838201526020016125ef565b50505050905001848103835287818151815260200191508051906020019060200280838360005b8381101561264657818101518382015260200161262e565b50505050905001848103825286818151815260200191508051906020019060200280838360005b8381101561268557818101518382015260200161266d565b505050509050019750505050505050506020604051808303818588803b1580156126ae57600080fd5b505af1935050505080156126d457506040513d60208110156126cf57600080fd5b505160015b61290f576040516000815260443d10156126f05750600061278b565b60046000803e60005160e01c6308c379a0811461271157600091505061278b565b60043d036004833e81513d60248201116001600160401b038211171561273c5760009250505061278b565b80830180516001600160401b0381111561275d57600094505050505061278b565b8060208301013d860181111561277b5760009550505050505061278b565b601f01601f191660405250925050505b80612796575061283a565b60019150867fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280826040518080602001828103825283818151815260200191508051906020019080838360005b838110156127fa5781810151838201526020016127e2565b50505050905090810190601f1680156128275780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061290a565b3d808015612864576040519150601f19603f3d011682016040523d82523d6000602084013e612869565b606091505b5060019150867fbfa884552dd8921b6ce90bfe906952ae5b3b29be0cc1a951d4f62697635a3a45826040518080602001828103825283818151815260200191508051906020019080838360005b838110156128ce5781810151838201526020016128b6565b50505050905090810190601f1680156128fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6129b3565b801561294d576040805188815290517fa217d08e65f80c73121cd9db834d81652d544bfbf452f6d04922b16c90a37b709181900360200190a16129b1565b604080516020808252601b908201527f6261746368207472616e736665722072657475726e2066616c7365000000000081830152905188917fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280919081900360600190a25b505b8015612b695760005b8851811015612b675760008982815181106129d357fe5b602002602001015190506000600182815481106129ec57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116916108fc9185908110612a1d57fe5b9060005260206000209060040201600301549081150290604051600060405180830381858888f1935050505090508015612ad95760018281548110612a5e57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d9185908110612aad57fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a2612b5d565b60018281548110612ae657fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d9185908110612b3557fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a25b50506001016129bc565b505b845115612cb35760005b8551811015612cb1576000868281518110612b8a57fe5b60200260200101516001600160a01b03166108fc878481518110612baa57fe5b60200260200101519081150290604051600060405180830381858888f1935050505090508015612c4057868281518110612be057fe5b60200260200101516001600160a01b03167f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d878481518110612c1e57fe5b60200260200101516040518082815260200191505060405180910390a2612ca8565b868281518110612c4c57fe5b60200260200101516001600160a01b03167f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d878481518110612c8a57fe5b60200260200101516040518082815260200191505060405180910390a25b50600101612b73565b505b4715612d1c576040805147815290517f6ecc855f9440a9282c90913bbc91619fd44f5ec0b462af28d127b116f130aa4d9181900360200190a1604051611002904780156108fc02916000818181858888f19350505050158015612d1a573d6000803e3d6000fd5b505b60006003819055600555825115612d3657612d3683613627565b6110016001600160a01b031663fc4333cd6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612d7357600080fd5b505af1158015612d87573d6000803e3d6000fd5b50506040517fedd8d7296956dd970ab4de3f2fc03be2b0ffc615d20cd4c72c6e44f928630ebf925060009150a15060009f9e505050505050505050505050505050565b80516001600160a01b0316600090815260046020526040812054801580612e1b5750600180820381548110612dfb57fe5b9060005260206000209060040201600201601c9054906101000a900460ff165b15612e615782516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a26000915050611036565b600154600554600019820111801590612eb75784516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a260009350505050611036565b600580546001908101909155805481906000198601908110612ed557fe5b6000918252602082206002600490920201018054921515600160e01b0260ff60e01b199093169290921790915585516040516001600160a01b03909116917ff226e7d8f547ff903d9d419cf5f54e0d7d07efa9584135a53a057c5f1f27f49a91a2506000949350505050565b6000816040516020018082805190602001908083835b60208310612f765780518252601f199092019160209182019101612f57565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612fe45780518252601f199092019160209182019101612fc5565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001201490505b92915050565b015190565b60008261303d57506000613023565b8282028284828161304a57fe5b0414610c935760405162461bcd60e51b81526004018080602001828103825260218152602001806144566021913960400191505060405180910390fd5b6000610c9383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613ae8565b6000610c9383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613b8a565b600082820183811015610c93576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b61316d6141c5565b506040805180820190915281518152602082810190820152919050565b613192614170565b61319b82613be4565b6131a457600080fd5b60006131b38360200151613c1e565b60208085015160408051808201909152868152920190820152915050919050565b60006131de6141c5565b505080518051602091820151919092015191011190565b6131fd6141c5565b613206826131d4565b61320f57600080fd5b6020820151600061321f82613c81565b80830160209586015260408051808201909152908152938401919091525090919050565b80516000901580159061325857508151602110155b61326157600080fd5b60006132708360200151613c1e565b905080836000015110156132cb576040805162461bcd60e51b815260206004820152601a60248201527f6c656e677468206973206c657373207468616e206f6666736574000000000000604482015290519081900360640190fd5b8251602080850151830180519284900392918310156132f157826020036101000a820491505b50949350505050565b606061330582613be4565b61330e57600080fd5b600061331983613db4565b905060608160405190808252806020026020018201604052801561335757816020015b6133446141c5565b81526020019060019003908161333c5790505b50905060006133698560200151613c1e565b60208601510190506000805b848110156133c05761338683613c81565b91506040518060400160405280838152602001848152508482815181106133a957fe5b602090810291909101015291810191600101613375565b509195945050505050565b6133d3614190565b60006133dd614190565b6133e5614170565b6133ee8561318a565b90506000805b6133fd836131d4565b15611f55578061342857613418613413846131f5565b613e10565b6001600160a01b031684526134a0565b80600114156134505761343d613413846131f5565b6001600160a01b031660208501526134a0565b806002141561347857613465613413846131f5565b6001600160a01b031660408501526134a0565b8060031415611f485761348d611e5a846131f5565b6001600160401b03166060850152600191505b6001016133f4565b60606130236134b683613e2a565b613f10565b60608151600014156134dc5750604080516000815260208101909152611036565b6060826000815181106134eb57fe5b602002602001015190506000600190505b835181101561352c576135228285838151811061351557fe5b6020026020010151613f62565b91506001016134fc565b50610c9361353f825160c060ff16613fdf565b82613f62565b6000606060298351111561357757600060405180606001604052806029815260200161438b6029913991509150611f5e565b60005b835181101561360d5760005b818110156136045784818151811061359a57fe5b6020026020010151600001516001600160a01b03168583815181106135bb57fe5b6020026020010151600001516001600160a01b031614156135fc5760006040518060600160405280602b81526020016143df602b9139935093505050611f5e565b600101613586565b5060010161357a565b505060408051602081019091526000815260019150915091565b600154815160005b82811015613744576001613641614190565b6001838154811061364e57fe5b600091825260208083206040805160c08101825260049490940290910180546001600160a01b0390811685526001820154811693850193909352600281015492831691840191909152600160a01b82046001600160401b03166060840152600160e01b90910460ff16151560808301526003015460a082015291505b84811015613718578681815181106136de57fe5b6020026020010151600001516001600160a01b031682600001516001600160a01b031614156137105760009250613718565b6001016136ca565b50811561373a5780516001600160a01b03166000908152600460205260408120555b505060010161362f565b50808211156137b957805b828110156137b757600180548061376257fe5b60008281526020812060046000199093019283020180546001600160a01b03199081168255600182810180549092169091556002820180546001600160e81b031916905560039091019190915591550161374f565b505b60008183106137c857816137ca565b825b905060005b818110156139c45761387c8582815181106137e657fe5b6020026020010151600183815481106137fb57fe5b60009182526020918290206040805160c08101825260049390930290910180546001600160a01b0390811684526001820154811694840194909452600281015493841691830191909152600160a01b83046001600160401b03166060830152600160e01b90920460ff161515608082015260039091015460a08201526140d7565b61399757806001016004600087848151811061389457fe5b6020026020010151600001516001600160a01b03166001600160a01b03168152602001908152602001600020819055508481815181106138d057fe5b6020026020010151600182815481106138e557fe5b6000918252602091829020835160049092020180546001600160a01b039283166001600160a01b0319918216178255928401516001820180549184169185169190911790556040840151600282018054606087015160808801511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b1995909716929097169190911792909216939093171692909217905560a0909101516003909101556139bc565b6000600182815481106139a657fe5b9060005260206000209060040201600301819055505b6001016137cf565b5082821115611ded57825b82811015610fba5760018582815181106139e557fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782559585015181840180549184169188169190911790556040850151600282018054606088015160808901511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590971692909a169190911792909216939093171695909517905560a09092015160039093019290925587519084019290889085908110613abb57fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016139cf565b60008183613b745760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b39578181015183820152602001613b21565b50505050905090810190601f168015613b665780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613b8057fe5b0495945050505050565b60008184841115613bdc5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613b39578181015183820152602001613b21565b505050900390565b8051600090613bf557506000611036565b6020820151805160001a9060c0821015613c1457600092505050611036565b5060019392505050565b8051600090811a6080811015613c38576000915050611036565b60b8811080613c53575060c08110801590613c53575060f881105b15613c62576001915050611036565b60c0811015613c765760b519019050611036565b60f519019050611036565b80516000908190811a6080811015613c9c5760019150613dad565b60b8811015613cb157607e1981019150613dad565b60c0811015613d2b57600060b78203600186019550806020036101000a865104915060018101820193505080831015613d25576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b50613dad565b60f8811015613d405760be1981019150613dad565b600060f78203600186019550806020036101000a865104915060018101820193505080831015613dab576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b505b5092915050565b8051600090613dc557506000611036565b60008090506000613dd98460200151613c1e565b602085015185519181019250015b80821015613e0757613df882613c81565b60019093019290910190613de7565b50909392505050565b8051600090601514613e2157600080fd5b61302382613243565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff198416613e6e57506018613e92565b6fffffffffffffffffffffffffffffffff198416613e8e57506010613e92565b5060005b6020811015613ec857818181518110613ea757fe5b01602001516001600160f81b03191615613ec057613ec8565b600101613e92565b60008160200390506060816040519080825280601f01601f191660200182016040528015613efd576020820181803683370190505b5080830196909652508452509192915050565b606081516001148015613f425750607f60f81b82600081518110613f3057fe5b01602001516001600160f81b03191611155b15613f4e575080611036565b613023613f608351608060ff16613fdf565b835b6060806040519050835180825260208201818101602087015b81831015613f93578051835260209283019201613f7b565b50855184518101855292509050808201602086015b81831015613fc0578051835260209283019201613fa8565b508651929092011591909101601f01601f191660405250905092915050565b606068010000000000000000831061402f576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b604080516001808252818301909252606091602082018180368337019050509050603784116140895782840160f81b8160008151811061406b57fe5b60200101906001600160f81b031916908160001a9053509050613023565b606061409485613e2a565b90508381510160370160f81b826000815181106140ad57fe5b60200101906001600160f81b031916908160001a9053506140ce8282613f62565b95945050505050565b805182516000916001600160a01b039182169116148015614111575081602001516001600160a01b031683602001516001600160a01b0316145b8015614136575081604001516001600160a01b031683604001516001600160a01b0316145b8015610c935750506060908101519101516001600160401b0390811691161490565b60408051808201909152600081526060602082015290565b60405180604001604052806141836141c5565b8152602001600081525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60405180604001604052806000815260200160008152509056fef901a880f901a4f844941284214b9b9c85549ab3d2b972df0deef66ac2c9946ddf42a51534fc98d0c0a3b42c963cace8441ddf946ddf42a51534fc98d0c0a3b42c963cace8441ddf8410000000f84494a2959d3f95eae5dc7d70144ce1b73b403b7eb6e0948081ef03f1d9e0bb4a5bf38f16285c879299f07f948081ef03f1d9e0bb4a5bf38f16285c879299f07f8410000000f8449435552c16704d214347f29fa77f77da6d75d7c75294dc4973e838e3949c77aced16ac2315dc2d7ab11194dc4973e838e3949c77aced16ac2315dc2d7ab1118410000000f84494980a75ecd1309ea12fa2ed87a8744fbfc9b863d594cc6ac05c95a99c1f7b5f88de0e3486c82293b27094cc6ac05c95a99c1f7b5f88de0e3486c82293b2708410000000f84494f474cf03cceff28abc65c9cbae594f725c80e12d94e61a183325a18a173319dd8e19c8d069459e217594e61a183325a18a173319dd8e19c8d069459e21758410000000f84494b71b214cb885500844365e95cd9942c7276e7fd894d22ca3ba2141d23adab65ce4940eb7665ea2b6a794d22ca3ba2141d23adab65ce4940eb7665ea2b6a78410000000746865206e756d626572206f662076616c696461746f72732065786365656420746865206c696d6974746865206275726e526174696f206d757374206265206e6f2067726561746572207468616e2031303030306475706c696361746520636f6e73656e7375732061646472657373206f662076616c696461746f725365747468652065787069726554696d655365636f6e64476170206973206f7574206f662072616e67656c656e677468206f66206a61696c2076616c696461746f7273206d757374206265206f6e65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374666565206973206c6172676572207468616e2044555354595f494e434f4d494e476c656e677468206f662065787069726554696d655365636f6e64476170206d69736d617463686661696c656420746f20706172736520696e69742076616c696461746f72536574746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d6573736167652073656e646572206d7573742062652074686520626c6f636b2070726f6475636572746865206d6573736167652073656e646572206d75737420626520736c61736820636f6e7472616374a26469706673582212206138cbef6a4ba7db6b97f06990dc0d96f124bc0b841fa4a56690968e7b85982b64736f6c63430006040033", + }, + }, + } + + brunoUpgrade[rialtoNet] = &Upgrade{ + UpgradeName: "bruno", + Configs: []*UpgradeConfig{ + { + ContractAddr: common.HexToAddress(ValidatorContract), + CommitUrl: "https://github.com/binance-chain/bsc-genesis-contract/commit/ce622fef469d84ee418fa6181f3ac962412a5f4f", + Code: "6080604052600436106102e45760003560e01c80638624988211610190578063c8509d81116100dc578063eb57e20211610095578063f9a2bbc71161006f578063f9a2bbc714610a54578063fc3e590814610a69578063fccc281314610a7e578063fd6a687914610a93576102e4565b8063eb57e202146109e6578063eda5868c14610a19578063f340fa0114610a2e576102e4565b8063c8509d81146106d8578063d86222d51461097d578063daacdb6614610992578063dc927faf146109a7578063e086c7b1146109bc578063e1c7392a146109d1576102e4565b8063aaf5eb6811610149578063ad3c9da611610123578063ad3c9da6146108d0578063b7ab4db514610903578063bf9f4995146104c0578063c81b166214610968576102e4565b8063aaf5eb68146107db578063ab51bb96146107f0578063ac43175114610805576102e4565b8063862498821461075d57806396713da9146107725780639dc0926214610787578063a1a11bf51461079c578063a5422d5c146107b1578063a78abc16146107c6576102e4565b806351e806721161024f57806370fd5bad116102085780637942fd05116101e25780637942fd05146106ae57806381650b62146106c3578063831d65d1146106d8578063853230aa14610699576102e4565b806370fd5bad1461066f57806375d47a0a1461068457806378dfed4a14610699576102e4565b806351e8067214610572578063565c56b3146105875780635667515a146105ba5780635d77156c146105cf5780636969a25c146105e45780636e47b4821461065a576102e4565b80633de0f0d8116102a15780633de0f0d8146104ab5780633dffc387146104c057806343756e5c146104eb578063493279b11461051c5780634bf6c882146105485780635192c82c1461055d576102e4565b80630bee7a67146102e95780631182b87514610317578063152ad3b8146104115780631ff180691461043a578063219f22d51461046157806335409f7f14610476575b600080fd5b3480156102f557600080fd5b506102fe610aa8565b6040805163ffffffff9092168252519081900360200190f35b34801561032357600080fd5b5061039c6004803603604081101561033a57600080fd5b60ff8235169190810190604081016020820135600160201b81111561035e57600080fd5b82018360208201111561037057600080fd5b803590602001918460018302840111600160201b8311171561039157600080fd5b509092509050610aad565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103d65781810151838201526020016103be565b50505050905090810190601f1680156104035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041d57600080fd5b50610426610c9a565b604080519115158252519081900360200190f35b34801561044657600080fd5b5061044f610ca3565b60408051918252519081900360200190f35b34801561046d57600080fd5b506102fe610ca9565b34801561048257600080fd5b506104a96004803603602081101561049957600080fd5b50356001600160a01b0316610cae565b005b3480156104b757600080fd5b5061044f610fc2565b3480156104cc57600080fd5b506104d5610fc8565b6040805160ff9092168252519081900360200190f35b3480156104f757600080fd5b50610500610fcd565b604080516001600160a01b039092168252519081900360200190f35b34801561052857600080fd5b50610531610fd3565b6040805161ffff9092168252519081900360200190f35b34801561055457600080fd5b506104d5610fd9565b34801561056957600080fd5b5061044f610fde565b34801561057e57600080fd5b50610500610fe4565b34801561059357600080fd5b5061044f600480360360208110156105aa57600080fd5b50356001600160a01b0316610fea565b3480156105c657600080fd5b506104d561103c565b3480156105db57600080fd5b506102fe611041565b3480156105f057600080fd5b5061060e6004803603602081101561060757600080fd5b5035611046565b604080516001600160a01b039788168152958716602087015293909516848401526001600160401b0390911660608401521515608083015260a082019290925290519081900360c00190f35b34801561066657600080fd5b506105006110aa565b34801561067b57600080fd5b506104d56110b0565b34801561069057600080fd5b506105006110b5565b3480156106a557600080fd5b5061044f6110bb565b3480156106ba57600080fd5b506104d56110c1565b3480156106cf57600080fd5b506102fe6110c6565b3480156106e457600080fd5b506104a9600480360360408110156106fb57600080fd5b60ff8235169190810190604081016020820135600160201b81111561071f57600080fd5b82018360208201111561073157600080fd5b803590602001918460018302840111600160201b8311171561075257600080fd5b5090925090506110cb565b34801561076957600080fd5b5061044f61117e565b34801561077e57600080fd5b506104d5611184565b34801561079357600080fd5b50610500611189565b3480156107a857600080fd5b5061050061118f565b3480156107bd57600080fd5b5061039c611195565b3480156107d257600080fd5b506104266111b4565b3480156107e757600080fd5b5061044f6111bd565b3480156107fc57600080fd5b506102fe61103c565b34801561081157600080fd5b506104a96004803603604081101561082857600080fd5b810190602081018135600160201b81111561084257600080fd5b82018360208201111561085457600080fd5b803590602001918460018302840111600160201b8311171561087557600080fd5b919390929091602081019035600160201b81111561089257600080fd5b8201836020820111156108a457600080fd5b803590602001918460018302840111600160201b831117156108c557600080fd5b5090925090506111c6565b3480156108dc57600080fd5b5061044f600480360360208110156108f357600080fd5b50356001600160a01b03166115bd565b34801561090f57600080fd5b506109186115cf565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561095457818101518382015260200161093c565b505050509050019250505060405180910390f35b34801561097457600080fd5b506105006116f5565b34801561098957600080fd5b5061044f6116fb565b34801561099e57600080fd5b5061044f611707565b3480156109b357600080fd5b5061050061170d565b3480156109c857600080fd5b5061044f611713565b3480156109dd57600080fd5b506104a9611718565b3480156109f257600080fd5b506104a960048036036020811015610a0957600080fd5b50356001600160a01b031661191b565b348015610a2557600080fd5b506102fe611aea565b6104a960048036036020811015610a4457600080fd5b50356001600160a01b0316611aef565b348015610a6057600080fd5b50610500611df4565b348015610a7557600080fd5b506104d5611dfa565b348015610a8a57600080fd5b50610500611dff565b348015610a9f57600080fd5b50610500611e05565b606481565b60005460609060ff16610b03576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b3361200014610b435760405162461bcd60e51b815260040180806020018281038252602f815260200180614952602f913960400191505060405180910390fd5b610b4b614159565b6000610b8c85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e0b92505050565b9150915080610ba857610b9f6064611f64565b92505050610c93565b815160009060ff16610bc857610bc18360200151611fc5565b9050610c5f565b825160ff1660011415610c5b57826020015151600114610c35577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb26040518080602001828103825260258152602001806142876025913960400191505060405180910390a1506067610c56565b610bc18360200151600081518110610c4957fe5b6020026020010151612dcb565b610c5f565b5060655b63ffffffff8116610c845750506040805160008152602081019091529150610c939050565b610c8d81611f64565b93505050505b9392505050565b60075460ff1681565b60035481565b606881565b3361100114610cee5760405162461bcd60e51b81526004018080602001828103825260298152602001806149ae6029913960400191505060405180910390fd5b6001600160a01b03811660009081526004602052604090205480610d125750610fbf565b600181039050600060018281548110610d2757fe5b60009182526020909120600360049092020101546001549091506000190180610d7657600060018481548110610d5957fe5b906000526020600020906004020160030181905550505050610fbf565b6040805183815290516001600160a01b038616917f3b6f9ef90462b512a1293ecec018670bf7b7f1876fb727590a8a6d7643130a70919081900360200190a26001600160a01b038416600090815260046020526040812055600154600019018314610ef857600180546000198101908110610ded57fe5b906000526020600020906004020160018481548110610e0857fe5b6000918252602082208354600492830290910180546001600160a01b03199081166001600160a01b0393841617825560018087015481840180548416918616919091179055600280880180549185018054909416919095161780835584546001600160401b03600160a01b91829004160267ffffffffffffffff60a01b1990911617808355935460ff600160e01b918290041615150260ff60e01b199094169390931790556003948501549401939093558254868401939192919087908110610ecd57fe5b600091825260208083206004909202909101546001600160a01b031683528201929092526040019020555b6001805480610f0357fe5b60008281526020812060046000199093019283020180546001600160a01b0319908116825560018201805490911690556002810180546001600160e81b03191690556003018190559155818381610f5657fe5b0490508015610fba5760015460005b81811015610fb7578260018281548110610f7b57fe5b9060005260206000209060040201600301540160018281548110610f9b57fe5b6000918252602090912060036004909202010155600101610f65565b50505b505050505b50565b61271081565b600181565b61100181565b6102ca81565b600881565b60065481565b61200081565b6001600160a01b03811660009081526004602052604081205480611012576000915050611037565b60018082038154811061102157fe5b9060005260206000209060040201600301549150505b919050565b600081565b606781565b6001818154811061105357fe5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b0392831694509082169291821691600160a01b81046001600160401b031691600160e01b90910460ff169086565b61100581565b600281565b61100881565b6103e881565b600b81565b606681565b336120001461110b5760405162461bcd60e51b815260040180806020018281038252602f815260200180614952602f913960400191505060405180910390fd5b7f41ce201247b6ceb957dcdb217d0b8acb50b9ea0e12af9af4f5e7f38902101605838383604051808460ff1660ff168152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b60025481565b600981565b61100781565b61100681565b6040518061062001604052806105ef81526020016143636105ef913981565b60005460ff1681565b6402540be40081565b60005460ff16611219576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b33611007146112595760405162461bcd60e51b815260040180806020018281038252602e8152602001806142cd602e913960400191505060405180910390fd5b6112c384848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080518082019091526013815272065787069726554696d655365636f6e6447617606c1b60208201529150612f429050565b1561139e57602081146113075760405162461bcd60e51b815260040180806020018281038252602681526020018061431c6026913960400191505060405180910390fd5b604080516020601f84018190048102820181019092528281526000916113459185858083850183828082843760009201919091525061302a92505050565b90506064811015801561135b5750620186a08111155b6113965760405162461bcd60e51b81526004018080602001828103825260278152602001806142606027913960400191505060405180910390fd5b60025561152b565b6113fe84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260098152686275726e526174696f60b81b60208201529150612f429050565b156114ee5760208114611458576040805162461bcd60e51b815260206004820152601c60248201527f6c656e677468206f66206275726e526174696f206d69736d6174636800000000604482015290519081900360640190fd5b604080516020601f84018190048102820181019092528281526000916114969185858083850183828082843760009201919091525061302a92505050565b90506127108111156114d95760405162461bcd60e51b815260040180806020018281038252602b81526020018061420a602b913960400191505060405180910390fd5b6006556007805460ff1916600117905561152b565b6040805162461bcd60e51b815260206004820152600d60248201526c756e6b6e6f776e20706172616d60981b604482015290519081900360640190fd5b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a848484846040518080602001806020018381038352878782818152602001925080828437600083820152601f01601f191690910184810383528581526020019050858580828437600083820152604051601f909101601f19169092018290039850909650505050505050a150505050565b60046020526000908152604090205481565b6001546060906000805b8281101561162057600181815481106115ee57fe5b9060005260206000209060040201600201601c9054906101000a900460ff16611618576001909101905b6001016115d9565b5060608160405190808252806020026020018201604052801561164d578160200160208202803683370190505b50600092509050815b838110156116ed576001818154811061166b57fe5b9060005260206000209060040201600201601c9054906101000a900460ff166116e5576001818154811061169b57fe5b600091825260209091206004909102015482516001600160a01b03909116908390859081106116c657fe5b6001600160a01b03909216602092830291909101909101526001909201915b600101611656565b509250505090565b61100281565b67016345785d8a000081565b60055481565b61100381565b602981565b60005460ff1615611770576040805162461bcd60e51b815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e697400000000000000604482015290519081900360640190fd5b611778614159565b600061179e6040518061062001604052806105ef81526020016143636105ef9139611e0b565b91509150806117de5760405162461bcd60e51b81526004018080602001828103825260218152602001806143426021913960400191505060405180910390fd5b60005b8260200151518110156119035760018360200151828151811061180057fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782558587015182850180549185169183169190911790556040860151600283018054606089015160808a01511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590981692909516919091179290921694909417161790915560a0909301516003909301929092559186015180519185019391859081106118d657fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016117e1565b50506103e8600255506000805460ff19166001179055565b336110011461195b5760405162461bcd60e51b81526004018080602001828103825260298152602001806149ae6029913960400191505060405180910390fd5b6001600160a01b0381166000908152600460205260409020548061197f5750610fbf565b60018103905060006001828154811061199457fe5b90600052602060002090600402016003015490506000600183815481106119b757fe5b906000526020600020906004020160030181905550600060018080549050039050836001600160a01b03167f8cd4e147d8af98a9e3b6724021b8bf6aed2e5dac71c38f2dce8161b82585b25d836040518082815260200191505060405180910390a280611a2657505050610fbf565b6000818381611a3157fe5b0490508015610fba5760005b84811015611a8f578160018281548110611a5357fe5b9060005260206000209060040201600301540160018281548110611a7357fe5b6000918252602090912060036004909202010155600101611a3d565b50600180549085015b81811015610fb7578260018281548110611aae57fe5b9060005260206000209060040201600301540160018281548110611ace57fe5b6000918252602090912060036004909202010155600101611a98565b606581565b334114611b2d5760405162461bcd60e51b815260040180806020018281038252602d815260200180614981602d913960400191505060405180910390fd5b60005460ff16611b80576040805162461bcd60e51b81526020600482015260196024820152781d1a194818dbdb9d1c9858dd081b9bdd081a5b9a5d081e595d603a1b604482015290519081900360640190fd5b60003411611bcd576040805162461bcd60e51b81526020600482015260156024820152746465706f7369742076616c7565206973207a65726f60581b604482015290519081900360640190fd5b6001600160a01b0381166000908152600460205260409020546007543491906103e89060ff1615611bfd57506006545b600083118015611c0d5750600081115b15611cb6576000611c36612710611c2a868563ffffffff61302f16565b9063ffffffff61308816565b90508015611cb45760405161dead9082156108fc029083906000818181858888f19350505050158015611c6d573d6000803e3d6000fd5b506040805182815290517f627059660ea01c4733a328effb2294d2f86905bf806da763a89cee254de8bee59181900360200190a1611cb1848263ffffffff6130ca16565b93505b505b8115611dae576000600180840381548110611ccd57fe5b9060005260206000209060040201905080600201601c9054906101000a900460ff1615611d38576040805185815290516001600160a01b038716917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a2611da8565b600354611d4b908563ffffffff61310c16565b6003908155810154611d63908563ffffffff61310c16565b60038201556040805185815290516001600160a01b038716917f93a090ecc682c002995fad3c85b30c5651d7fd29b0be5da9d784a3302aedc055919081900360200190a25b50611dee565b6040805184815290516001600160a01b038616917ff177e5d6c5764d79c32883ed824111d9b13f5668cf6ab1cc12dd36791dd955b4919081900360200190a25b50505050565b61100081565b600381565b61dead81565b61100481565b611e13614159565b6000611e1d614159565b611e25614171565b611e36611e3186613166565b61318b565b90506000805b611e45836131d5565b15611f565780611e6a57611e60611e5b846131f6565b613244565b60ff168452611f4e565b8060011415611f49576060611e86611e81856131f6565b6132fb565b90508051604051908082528060200260200182016040528015611ec357816020015b611eb0614191565b815260200190600190039081611ea85790505b50602086015260005b8151811015611f3e57611edd614191565b6000611efb848481518110611eee57fe5b60200260200101516133cc565b9150915080611f1857876000995099505050505050505050611f5f565b8188602001518481518110611f2957fe5b60209081029190910101525050600101611ecc565b506001925050611f4e565b611f56565b600101611e3c565b50919350909150505b915091565b604080516001808252818301909252606091829190816020015b6060815260200190600190039081611f7e579050509050611fa48363ffffffff166134a9565b81600081518110611fb157fe5b6020026020010181905250610c93816134bc565b6000806060611fd384613546565b9150915081612080577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb2816040518080602001828103825283818151815260200191508051906020019080838360005b8381101561203b578181015183820152602001612023565b50505050905090810190601f1680156120685780820380516001836020036101000a031916815260200191505b509250505060405180910390a1606692505050611037565b600080805b6001548110156120fd5767016345785d8a0000600182815481106120a557fe5b906000526020600020906004020160030154106120c7576001909201916120f5565b6000600182815481106120d657fe5b90600052602060002090600402016003015411156120f5576001909101905b600101612085565b5060608260405190808252806020026020018201604052801561212a578160200160208202803683370190505b509050606083604051908082528060200260200182016040528015612159578160200160208202803683370190505b509050606084604051908082528060200260200182016040528015612188578160200160208202803683370190505b5090506060856040519080825280602002602001820160405280156121b7578160200160208202803683370190505b50905060006060866040519080825280602002602001820160405280156121e8578160200160208202803683370190505b509050606087604051908082528060200260200182016040528015612217578160200160208202803683370190505b509050600098506000975060608d905060006110046001600160a01b031663149d14d96040518163ffffffff1660e01b815260040160206040518083038186803b15801561226457600080fd5b505afa158015612278573d6000803e3d6000fd5b505050506040513d602081101561228e57600080fd5b5051905067016345785d8a0000811115612303577f70e72399380dcfb0338abc03dc8d47f9f470ada8e769c9a78d644ea97385ecb26040518080602001828103825260218152602001806142fb6021913960400191505060405180910390a160689d5050505050505050505050505050611037565b60005b6001548110156125765767016345785d8a00006001828154811061232657fe5b906000526020600020906004020160030154106124ac576001818154811061234a57fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b03168a8d8151811061237b57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505060006402540be400600183815481106123b057fe5b906000526020600020906004020160030154816123c957fe5b06600183815481106123d757fe5b9060005260206000209060040201600301540390506123ff83826130ca90919063ffffffff16565b8a8e8151811061240b57fe5b6020026020010181815250506001828154811061242457fe5b906000526020600020906004020160020160009054906101000a90046001600160a01b0316888e8151811061245557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081898e8151811061248257fe5b602090810291909101015261249d878263ffffffff61310c16565b6001909d019c965061256e9050565b6000600182815481106124bb57fe5b906000526020600020906004020160030154111561256e57600181815481106124e057fe5b906000526020600020906004020160010160009054906101000a90046001600160a01b0316858c8151811061251157fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506001818154811061253e57fe5b906000526020600020906004020160030154848c8151811061255c57fe5b60209081029190910101526001909a01995b600101612306565b50600085156129b4576110046001600160a01b0316636e056520878c8c8b60025442016040518663ffffffff1660e01b815260040180806020018060200180602001856001600160401b03166001600160401b03168152602001848103845288818151815260200191508051906020019060200280838360005b838110156126085781810151838201526020016125f0565b50505050905001848103835287818151815260200191508051906020019060200280838360005b8381101561264757818101518382015260200161262f565b50505050905001848103825286818151815260200191508051906020019060200280838360005b8381101561268657818101518382015260200161266e565b505050509050019750505050505050506020604051808303818588803b1580156126af57600080fd5b505af1935050505080156126d557506040513d60208110156126d057600080fd5b505160015b612910576040516000815260443d10156126f15750600061278c565b60046000803e60005160e01c6308c379a0811461271257600091505061278c565b60043d036004833e81513d60248201116001600160401b038211171561273d5760009250505061278c565b80830180516001600160401b0381111561275e57600094505050505061278c565b8060208301013d860181111561277c5760009550505050505061278c565b601f01601f191660405250925050505b80612797575061283b565b60019150867fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280826040518080602001828103825283818151815260200191508051906020019080838360005b838110156127fb5781810151838201526020016127e3565b50505050905090810190601f1680156128285780820380516001836020036101000a031916815260200191505b509250505060405180910390a25061290b565b3d808015612865576040519150601f19603f3d011682016040523d82523d6000602084013e61286a565b606091505b5060019150867fbfa884552dd8921b6ce90bfe906952ae5b3b29be0cc1a951d4f62697635a3a45826040518080602001828103825283818151815260200191508051906020019080838360005b838110156128cf5781810151838201526020016128b7565b50505050905090810190601f1680156128fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505b6129b4565b801561294e576040805188815290517fa217d08e65f80c73121cd9db834d81652d544bfbf452f6d04922b16c90a37b709181900360200190a16129b2565b604080516020808252601b908201527f6261746368207472616e736665722072657475726e2066616c7365000000000081830152905188917fa7cdeed7d0db45e3219a6e5d60838824c16f1d39991fcfe3f963029c844bf280919081900360600190a25b505b8015612b6a5760005b8851811015612b685760008982815181106129d457fe5b602002602001015190506000600182815481106129ed57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116916108fc9185908110612a1e57fe5b9060005260206000209060040201600301549081150290604051600060405180830381858888f1935050505090508015612ada5760018281548110612a5f57fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d9185908110612aae57fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a2612b5e565b60018281548110612ae757fe5b60009182526020909120600160049092020181015481546001600160a01b03909116917f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d9185908110612b3657fe5b9060005260206000209060040201600301546040518082815260200191505060405180910390a25b50506001016129bd565b505b845115612cb45760005b8551811015612cb2576000868281518110612b8b57fe5b60200260200101516001600160a01b03166108fc878481518110612bab57fe5b60200260200101519081150290604051600060405180830381858888f1935050505090508015612c4157868281518110612be157fe5b60200260200101516001600160a01b03167f6c61d60f69a7beb3e1c80db7f39f37b208537cbb19da3174511b477812b2fc7d878481518110612c1f57fe5b60200260200101516040518082815260200191505060405180910390a2612ca9565b868281518110612c4d57fe5b60200260200101516001600160a01b03167f25d0ce7d2f0cec669a8c17efe49d195c13455bb8872b65fa610ac7f53fe4ca7d878481518110612c8b57fe5b60200260200101516040518082815260200191505060405180910390a25b50600101612b74565b505b4715612d1d576040805147815290517f6ecc855f9440a9282c90913bbc91619fd44f5ec0b462af28d127b116f130aa4d9181900360200190a1604051611002904780156108fc02916000818181858888f19350505050158015612d1b573d6000803e3d6000fd5b505b60006003819055600555825115612d3757612d3783613628565b6110016001600160a01b031663fc4333cd6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612d7457600080fd5b505af1158015612d88573d6000803e3d6000fd5b50506040517fedd8d7296956dd970ab4de3f2fc03be2b0ffc615d20cd4c72c6e44f928630ebf925060009150a15060009f9e505050505050505050505050505050565b80516001600160a01b0316600090815260046020526040812054801580612e1c5750600180820381548110612dfc57fe5b9060005260206000209060040201600201601c9054906101000a900460ff165b15612e625782516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a26000915050611037565b600154600554600019820111801590612eb85784516040516001600160a01b03909116907fe209c46bebf57cf265d5d9009a00870e256d9150f3ed5281ab9d9eb3cec6e4be90600090a260009350505050611037565b600580546001908101909155805481906000198601908110612ed657fe5b6000918252602082206002600490920201018054921515600160e01b0260ff60e01b199093169290921790915585516040516001600160a01b03909116917ff226e7d8f547ff903d9d419cf5f54e0d7d07efa9584135a53a057c5f1f27f49a91a2506000949350505050565b6000816040516020018082805190602001908083835b60208310612f775780518252601f199092019160209182019101612f58565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310612fe55780518252601f199092019160209182019101612fc6565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001201490505b92915050565b015190565b60008261303e57506000613024565b8282028284828161304b57fe5b0414610c935760405162461bcd60e51b81526004018080602001828103825260218152602001806142ac6021913960400191505060405180910390fd5b6000610c9383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613ae9565b6000610c9383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613b8b565b600082820183811015610c93576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b61316e6141c6565b506040805180820190915281518152602082810190820152919050565b613193614171565b61319c82613be5565b6131a557600080fd5b60006131b48360200151613c1f565b60208085015160408051808201909152868152920190820152915050919050565b60006131df6141c6565b505080518051602091820151919092015191011190565b6131fe6141c6565b613207826131d5565b61321057600080fd5b6020820151600061322082613c82565b80830160209586015260408051808201909152908152938401919091525090919050565b80516000901580159061325957508151602110155b61326257600080fd5b60006132718360200151613c1f565b905080836000015110156132cc576040805162461bcd60e51b815260206004820152601a60248201527f6c656e677468206973206c657373207468616e206f6666736574000000000000604482015290519081900360640190fd5b8251602080850151830180519284900392918310156132f257826020036101000a820491505b50949350505050565b606061330682613be5565b61330f57600080fd5b600061331a83613db5565b905060608160405190808252806020026020018201604052801561335857816020015b6133456141c6565b81526020019060019003908161333d5790505b509050600061336a8560200151613c1f565b60208601510190506000805b848110156133c15761338783613c82565b91506040518060400160405280838152602001848152508482815181106133aa57fe5b602090810291909101015291810191600101613376565b509195945050505050565b6133d4614191565b60006133de614191565b6133e6614171565b6133ef8561318b565b90506000805b6133fe836131d5565b15611f56578061342957613419613414846131f6565b613e11565b6001600160a01b031684526134a1565b80600114156134515761343e613414846131f6565b6001600160a01b031660208501526134a1565b806002141561347957613466613414846131f6565b6001600160a01b031660408501526134a1565b8060031415611f495761348e611e5b846131f6565b6001600160401b03166060850152600191505b6001016133f5565b60606130246134b783613e2b565b613f11565b60608151600014156134dd5750604080516000815260208101909152611037565b6060826000815181106134ec57fe5b602002602001015190506000600190505b835181101561352d576135238285838151811061351657fe5b6020026020010151613f63565b91506001016134fd565b50610c93613540825160c060ff16613fe0565b82613f63565b600060606029835111156135785760006040518060600160405280602981526020016141e16029913991509150611f5f565b60005b835181101561360e5760005b818110156136055784818151811061359b57fe5b6020026020010151600001516001600160a01b03168583815181106135bc57fe5b6020026020010151600001516001600160a01b031614156135fd5760006040518060600160405280602b8152602001614235602b9139935093505050611f5f565b600101613587565b5060010161357b565b505060408051602081019091526000815260019150915091565b600154815160005b82811015613745576001613642614191565b6001838154811061364f57fe5b600091825260208083206040805160c08101825260049490940290910180546001600160a01b0390811685526001820154811693850193909352600281015492831691840191909152600160a01b82046001600160401b03166060840152600160e01b90910460ff16151560808301526003015460a082015291505b84811015613719578681815181106136df57fe5b6020026020010151600001516001600160a01b031682600001516001600160a01b031614156137115760009250613719565b6001016136cb565b50811561373b5780516001600160a01b03166000908152600460205260408120555b5050600101613630565b50808211156137ba57805b828110156137b857600180548061376357fe5b60008281526020812060046000199093019283020180546001600160a01b03199081168255600182810180549092169091556002820180546001600160e81b0319169055600390910191909155915501613750565b505b60008183106137c957816137cb565b825b905060005b818110156139c55761387d8582815181106137e757fe5b6020026020010151600183815481106137fc57fe5b60009182526020918290206040805160c08101825260049390930290910180546001600160a01b0390811684526001820154811694840194909452600281015493841691830191909152600160a01b83046001600160401b03166060830152600160e01b90920460ff161515608082015260039091015460a08201526140d8565b61399857806001016004600087848151811061389557fe5b6020026020010151600001516001600160a01b03166001600160a01b03168152602001908152602001600020819055508481815181106138d157fe5b6020026020010151600182815481106138e657fe5b6000918252602091829020835160049092020180546001600160a01b039283166001600160a01b0319918216178255928401516001820180549184169185169190911790556040840151600282018054606087015160808801511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b1995909716929097169190911792909216939093171692909217905560a0909101516003909101556139bd565b6000600182815481106139a757fe5b9060005260206000209060040201600301819055505b6001016137d0565b5082821115611dee57825b82811015610fba5760018582815181106139e657fe5b60209081029190910181015182546001818101855560009485528385208351600493840290910180546001600160a01b039283166001600160a01b03199182161782559585015181840180549184169188169190911790556040850151600282018054606088015160808901511515600160e01b0260ff60e01b196001600160401b03909216600160a01b0267ffffffffffffffff60a01b199590971692909a169190911792909216939093171695909517905560a09092015160039093019290925587519084019290889085908110613abc57fe5b602090810291909101810151516001600160a01b03168252810191909152604001600020556001016139d0565b60008183613b755760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613b3a578181015183820152602001613b22565b50505050905090810190601f168015613b675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613b8157fe5b0495945050505050565b60008184841115613bdd5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613b3a578181015183820152602001613b22565b505050900390565b8051600090613bf657506000611037565b6020820151805160001a9060c0821015613c1557600092505050611037565b5060019392505050565b8051600090811a6080811015613c39576000915050611037565b60b8811080613c54575060c08110801590613c54575060f881105b15613c63576001915050611037565b60c0811015613c775760b519019050611037565b60f519019050611037565b80516000908190811a6080811015613c9d5760019150613dae565b60b8811015613cb257607e1981019150613dae565b60c0811015613d2c57600060b78203600186019550806020036101000a865104915060018101820193505080831015613d26576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b50613dae565b60f8811015613d415760be1981019150613dae565b600060f78203600186019550806020036101000a865104915060018101820193505080831015613dac576040805162461bcd60e51b81526020600482015260116024820152706164646974696f6e206f766572666c6f7760781b604482015290519081900360640190fd5b505b5092915050565b8051600090613dc657506000611037565b60008090506000613dda8460200151613c1f565b602085015185519181019250015b80821015613e0857613df982613c82565b60019093019290910190613de8565b50909392505050565b8051600090601514613e2257600080fd5b61302482613244565b604080516020808252818301909252606091829190602082018180368337505050602081018490529050600067ffffffffffffffff198416613e6f57506018613e93565b6fffffffffffffffffffffffffffffffff198416613e8f57506010613e93565b5060005b6020811015613ec957818181518110613ea857fe5b01602001516001600160f81b03191615613ec157613ec9565b600101613e93565b60008160200390506060816040519080825280601f01601f191660200182016040528015613efe576020820181803683370190505b5080830196909652508452509192915050565b606081516001148015613f435750607f60f81b82600081518110613f3157fe5b01602001516001600160f81b03191611155b15613f4f575080611037565b613024613f618351608060ff16613fe0565b835b6060806040519050835180825260208201818101602087015b81831015613f94578051835260209283019201613f7c565b50855184518101855292509050808201602086015b81831015613fc1578051835260209283019201613fa9565b508651929092011591909101601f01601f191660405250905092915050565b6060680100000000000000008310614030576040805162461bcd60e51b815260206004820152600e60248201526d696e70757420746f6f206c6f6e6760901b604482015290519081900360640190fd5b6040805160018082528183019092526060916020820181803683370190505090506037841161408a5782840160f81b8160008151811061406c57fe5b60200101906001600160f81b031916908160001a9053509050613024565b606061409585613e2b565b90508381510160370160f81b826000815181106140ae57fe5b60200101906001600160f81b031916908160001a9053506140cf8282613f63565b95945050505050565b805182516000916001600160a01b039182169116148015614112575081602001516001600160a01b031683602001516001600160a01b0316145b8015614137575081604001516001600160a01b031683604001516001600160a01b0316145b8015610c935750506060908101519101516001600160401b0390811691161490565b60408051808201909152600081526060602082015290565b60405180604001604052806141846141c6565b8152602001600081525090565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60405180604001604052806000815260200160008152509056fe746865206e756d626572206f662076616c696461746f72732065786365656420746865206c696d6974746865206275726e526174696f206d757374206265206e6f2067726561746572207468616e2031303030306475706c696361746520636f6e73656e7375732061646472657373206f662076616c696461746f725365747468652065787069726554696d655365636f6e64476170206973206f7574206f662072616e67656c656e677468206f66206a61696c2076616c696461746f7273206d757374206265206f6e65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77746865206d6573736167652073656e646572206d75737420626520676f7665726e616e636520636f6e7472616374666565206973206c6172676572207468616e2044555354595f494e434f4d494e476c656e677468206f662065787069726554696d655365636f6e64476170206d69736d617463686661696c656420746f20706172736520696e69742076616c696461746f72536574f905ec80f905e8f846942a7cdd959bfe8d9487b2a43b33565295a698f7e294b6a7edd747c0554875d3fc531d19ba1497992c5e941ff80f3f7f110ffd8920a3ac38fdef318fe94a3f86048c27395000f846946488aa4d1955ee33403f8ccb1d4de5fb97c7ade294220f003d8bdfaadf52aa1e55ae4cc485e6794875941a87e90e440a39c99aa9cb5cea0ad6a3f0b2407b86048c27395000f846949ef9f4360c606c7ab4db26b016007d3ad0ab86a0946103af86a874b705854033438383c82575f25bc29418e2db06cbff3e3c5f856410a1838649e760175786048c27395000f84694ee01c3b1283aa067c58eab4709f85e99d46de5fe94ee4b9bfb1871c64e2bcabb1dc382dc8b7c4218a29415904ab26ab0e99d70b51c220ccdcccabee6e29786048c27395000f84694685b1ded8013785d6623cc18d214320b6bb6475994a20ef4e5e4e7e36258dbf51f4d905114cb1b34bc9413e39085dc88704f4394d35209a02b1a9520320c86048c27395000f8469478f3adfc719c99674c072166708589033e2d9afe9448a30d5eaa7b64492a160f139e2da2800ec3834e94055838358c29edf4dcc1ba1985ad58aedbb6be2b86048c27395000f84694c2be4ec20253b8642161bc3f444f53679c1f3d479466f50c616d737e60d7ca6311ff0d9c434197898a94d1d678a2506eeaa365056fe565df8bc8659f28b086048c27395000f846942f7be8361c80a4c1e7e9aaf001d0877f1cfde218945f93992ac37f3e61db2ef8a587a436a161fd210b94ecbc4fb1a97861344dad0867ca3cba2b860411f086048c27395000f84694ce2fd7544e0b2cc94692d4a704debef7bcb613289444abc67b4b2fba283c582387f54c9cba7c34bafa948acc2ab395ded08bb75ce85bf0f95ad2abc51ad586048c27395000f84694b8f7166496996a7da21cf1f1b04d9b3e26a3d077946770572763289aac606e4f327c2f6cc1aa3b3e3b94882d745ed97d4422ca8da1c22ec49d880c4c097286048c27395000f846942d4c407bbe49438ed859fe965b140dcf1aab71a9943ad0939e120f33518fbba04631afe7a3ed6327b194b2bbb170ca4e499a2b0f3cc85ebfa6e8c4dfcbea86048c27395000f846946bbad7cf34b5fa511d8e963dbba288b1960e75d694853b0f6c324d1f4e76c8266942337ac1b0af1a229442498946a51ca5924552ead6fc2af08b94fcba648601d1a94a2000f846944430b3230294d12c6ab2aac5c2cd68e80b16b581947b107f4976a252a6939b771202c28e64e03f52d694795811a7f214084116949fc4f53cedbf189eeab28601d1a94a2000f84694ea0a6e3c511bbd10f4519ece37dc24887e11b55d946811ca77acfb221a49393c193f3a22db829fcc8e9464feb7c04830dd9ace164fc5c52b3f5a29e5018a8601d1a94a2000f846947ae2f5b9e386cd1b50a4550696d957cb4900f03a94e83bcc5077e6b873995c24bac871b5ad856047e19464e48d4057a90b233e026c1041e6012ada897fe88601d1a94a2000f8469482012708dafc9e1b880fd083b32182b869be8e09948e5adc73a2d233a1b496ed3115464dd6c7b887509428b383d324bc9a37f4e276190796ba5a8947f5ed8601d1a94a2000f8469422b81f8e175ffde54d797fe11eb03f9e3bf75f1d94a1c3ef7ca38d8ba80cce3bfc53ebd2903ed21658942767f7447f7b9b70313d4147b795414aecea54718601d1a94a2000f8469468bf0b8b6fb4e317a0f9d6f03eaf8ce6675bc60d94675cfe570b7902623f47e7f59c9664b5f5065dcf94d84f0d2e50bcf00f2fc476e1c57f5ca2d57f625b8601d1a94a2000f846948c4d90829ce8f72d0163c1d5cf348a862d5506309485c42a7b34309bee2ed6a235f86d16f059deec5894cc2cedc53f0fa6d376336efb67e43d167169f3b78601d1a94a2000f8469435e7a025f4da968de7e4d7e4004197917f4070f194b1182abaeeb3b4d8eba7e6a4162eac7ace23d57394c4fd0d870da52e73de2dd8ded19fe3d26f43a1138601d1a94a2000f84694d6caa02bbebaebb5d7e581e4b66559e635f805ff94c07335cf083c1c46a487f0325769d88e163b653694efaff03b42e41f953a925fc43720e45fb61a19938601d1a94a2000746865206d6573736167652073656e646572206d7573742062652063726f737320636861696e20636f6e7472616374746865206d6573736167652073656e646572206d7573742062652074686520626c6f636b2070726f6475636572746865206d6573736167652073656e646572206d75737420626520736c61736820636f6e7472616374a2646970667358221220b274d764256170addda41fb4f3d964ba036ef5f3a15a0341d0524406e0ac44e864736f6c63430006040033", + }, + }, + } } func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.Int, statedb *state.StateDB) { @@ -306,6 +341,10 @@ func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.I applySystemContractUpgrade(mirrorUpgrade[network], blockNumber, statedb, logger) } + if config.IsOnBruno(blockNumber) { + applySystemContractUpgrade(brunoUpgrade[network], blockNumber, statedb, logger) + } + /* apply other upgrades */ diff --git a/core/vm/contract.go b/core/vm/contract.go index 6fac7f9858..dfc3ecd73f 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -22,12 +22,18 @@ import ( lru "github.com/hashicorp/golang-lru" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/metrics" "github.com/holiman/uint256" ) const codeBitmapCacheSize = 2000 -var codeBitmapCache, _ = lru.New(codeBitmapCacheSize) +var ( + codeBitmapCache, _ = lru.New(codeBitmapCacheSize) + + contractCodeBitmapHitMeter = metrics.NewRegisteredMeter("vm/contract/code/bitmap/hit", nil) + contractCodeBitmapMissMeter = metrics.NewRegisteredMeter("vm/contract/code/bitmap/miss", nil) +) // ContractRef is a reference to the contract's backing object type ContractRef interface { @@ -117,12 +123,14 @@ func (c *Contract) isCode(udest uint64) bool { analysis, exist := c.jumpdests[c.CodeHash] if !exist { if cached, ok := codeBitmapCache.Get(c.CodeHash); ok { + contractCodeBitmapHitMeter.Mark(1) analysis = cached.(bitvec) } else { // Do the analysis and save in parent context // We do not need to store it in c.analysis analysis = codeBitmap(c.Code) c.jumpdests[c.CodeHash] = analysis + contractCodeBitmapMissMeter.Mark(1) codeBitmapCache.Add(c.CodeHash, analysis) } } diff --git a/docker/Dockerfile.truffle b/docker/Dockerfile.truffle index 0ec7029377..28ab9da393 100644 --- a/docker/Dockerfile.truffle +++ b/docker/Dockerfile.truffle @@ -7,10 +7,7 @@ RUN git clone https://github.com/binance-chain/canonical-upgradeable-bep20.git / WORKDIR /usr/app/canonical-upgradeable-bep20 COPY docker/truffle-config.js /usr/app/canonical-upgradeable-bep20 -RUN npm install -g n -RUN n 12.18.3 && node -v - -RUN npm install -g truffle@v5.1.14 +RUN npm install -g --unsafe-perm truffle@v5.1.14 RUN npm install ENTRYPOINT [ "/bin/bash" ] diff --git a/eth/catalyst/api_test.go b/eth/catalyst/api_test.go index 001b27147f..593c629446 100644 --- a/eth/catalyst/api_test.go +++ b/eth/catalyst/api_test.go @@ -82,6 +82,7 @@ func generateTestChainWithFork(n int, fork int) (*core.Genesis, []*types.Block, RamanujanBlock: big.NewInt(0), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(0), + BrunoBlock: big.NewInt(0), Ethash: new(params.EthashConfig), } diff --git a/params/config.go b/params/config.go index 81ff4da9c3..8afc20f882 100644 --- a/params/config.go +++ b/params/config.go @@ -34,7 +34,7 @@ var ( BSCGenesisHash = common.HexToHash("0x0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b") ChapelGenesisHash = common.HexToHash("0x6d3c66c5357ec91d5c43af47e234a939b22557cbb552dc45bebbceeed90fbe34") - RialtoGenesisHash = common.HexToHash("0x005dc005bddd1967de6187c1c23be801eb7abdd80cebcc24f341b727b70311d6") + RialtoGenesisHash = common.HexToHash("0xaabe549bfa85c84f7aee9da7010b97453ad686f2c2d8ce00503d1a00c72cad54") YoloV3GenesisHash = common.HexToHash("0xf1f2876e8500c77afcc03228757b39477eceffccf645b734967fe3c7e16967b7") ) @@ -75,6 +75,7 @@ var ( RamanujanBlock: big.NewInt(0), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(0), + BrunoBlock: big.NewInt(0), BerlinBlock: big.NewInt(12_244_000), Ethash: new(EthashConfig), } @@ -118,6 +119,7 @@ var ( RamanujanBlock: big.NewInt(0), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(0), + BrunoBlock: big.NewInt(0), BerlinBlock: big.NewInt(9_812_189), Ethash: new(EthashConfig), } @@ -161,6 +163,7 @@ var ( RamanujanBlock: big.NewInt(0), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(0), + BrunoBlock: big.NewInt(0), BerlinBlock: big.NewInt(8_290_928), Clique: &CliqueConfig{ Period: 15, @@ -203,6 +206,7 @@ var ( RamanujanBlock: big.NewInt(0), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(0), + BrunoBlock: big.NewInt(0), IstanbulBlock: big.NewInt(1_561_651), MuirGlacierBlock: nil, BerlinBlock: big.NewInt(4_460_644), @@ -246,6 +250,7 @@ var ( RamanujanBlock: big.NewInt(0), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(5184000), + BrunoBlock: nil, Parlia: &ParliaConfig{ Period: 3, Epoch: 200, @@ -266,6 +271,7 @@ var ( RamanujanBlock: big.NewInt(1010000), NielsBlock: big.NewInt(1014369), MirrorSyncBlock: big.NewInt(5582500), + BrunoBlock: big.NewInt(13837000), Parlia: &ParliaConfig{ Period: 3, Epoch: 200, @@ -286,6 +292,7 @@ var ( RamanujanBlock: big.NewInt(400), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(400), + BrunoBlock: big.NewInt(400), Parlia: &ParliaConfig{ Period: 3, Epoch: 200, @@ -308,6 +315,7 @@ var ( RamanujanBlock: big.NewInt(0), NielsBlock: big.NewInt(0), MirrorSyncBlock: big.NewInt(0), + BrunoBlock: big.NewInt(0), MuirGlacierBlock: nil, BerlinBlock: nil, // Don't enable Berlin directly, we're YOLOing it YoloV3Block: big.NewInt(0), @@ -322,16 +330,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), nil, nil, nil, 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), nil, nil, nil, 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, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), 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, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), 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), nil, nil, nil, 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), nil, nil, nil, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), new(EthashConfig), nil, nil} TestRules = TestChainConfig.Rules(new(big.Int)) ) @@ -418,6 +426,7 @@ type ChainConfig struct { RamanujanBlock *big.Int `json:"ramanujanBlock,omitempty" toml:",omitempty"` // ramanujanBlock switch block (nil = no fork, 0 = already activated) NielsBlock *big.Int `json:"nielsBlock,omitempty" toml:",omitempty"` // nielsBlock switch block (nil = no fork, 0 = already activated) MirrorSyncBlock *big.Int `json:"mirrorSyncBlock,omitempty" toml:",omitempty"` // mirrorSyncBlock switch block (nil = no fork, 0 = already activated) + BrunoBlock *big.Int `json:"brunoBlock,omitempty" toml:",omitempty"` // brunoBlock switch block (nil = no fork, 0 = already activated) // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty" toml:",omitempty"` @@ -468,7 +477,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, Berlin: %v, YOLO v3: %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, Engine: %v}", c.ChainID, c.HomesteadBlock, c.DAOForkBlock, @@ -484,6 +493,7 @@ func (c *ChainConfig) String() string { c.RamanujanBlock, c.NielsBlock, c.MirrorSyncBlock, + c.BrunoBlock, c.BerlinBlock, c.YoloV3Block, engine, @@ -555,6 +565,16 @@ func (c *ChainConfig) IsOnMirrorSync(num *big.Int) bool { return configNumEqual(c.MirrorSyncBlock, num) } +// IsBruno returns whether num is either equal to the Burn fork block or greater. +func (c *ChainConfig) IsBruno(num *big.Int) bool { + return isForked(c.BrunoBlock, num) +} + +// IsOnBruno returns whether num is equal to the Burn fork block +func (c *ChainConfig) IsOnBruno(num *big.Int) bool { + return configNumEqual(c.BrunoBlock, num) +} + // IsMuirGlacier returns whether num is either equal to the Muir Glacier (EIP-2384) fork block or greater. func (c *ChainConfig) IsMuirGlacier(num *big.Int) bool { return isForked(c.MuirGlacierBlock, num) @@ -616,6 +636,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error { var lastFork fork for _, cur := range []fork{ {name: "mirrorSyncBlock", block: c.MirrorSyncBlock}, + {name: "brunoBlock", block: c.BrunoBlock}, {name: "berlinBlock", block: c.BerlinBlock}, } { if lastFork.name != "" { @@ -695,6 +716,9 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, head *big.Int) *Confi if isForkIncompatible(c.MirrorSyncBlock, newcfg.MirrorSyncBlock, head) { return newCompatError("mirrorSync fork block", c.MirrorSyncBlock, newcfg.MirrorSyncBlock) } + if isForkIncompatible(c.BrunoBlock, newcfg.BrunoBlock, head) { + return newCompatError("bruno fork block", c.BrunoBlock, newcfg.BrunoBlock) + } return nil } diff --git a/params/version.go b/params/version.go index fe8f2938e6..0786d099b5 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 = 3 // Patch version component of the current release + VersionPatch = 4 // Patch version component of the current release VersionMeta = "" // Version metadata to append to the version string )