diff --git a/core/systemcontracts/upgrade.go b/core/systemcontracts/upgrade.go index dc8c8ee00..f6359ed05 100644 --- a/core/systemcontracts/upgrade.go +++ b/core/systemcontracts/upgrade.go @@ -40,6 +40,8 @@ var ( hashPowerUpgrade = make(map[string]*Upgrade) zeusUpgrade = make(map[string]*Upgrade) + + heraUpgrade = make(map[string]*Upgrade) ) func init() { @@ -168,6 +170,16 @@ func init() { }, }, } + heraUpgrade[buffaloNet] = &Upgrade{ + UpgradeName: "hera", + Configs: []*UpgradeConfig{ + { + ContractAddr: common.HexToAddress(LightClientContract), + CommitUrl: "https://github.com/coredao-org/core-genesis-contract/commit/11af2de8a60dec511b6752f6f42a86f372c32b5f", + Code: "608060405234801561001057600080fd5b50600436106104dd5760003560e01c80638a9c5aa111610286578063c81b16621161016b578063e1c7392a116100e3578063f016e48111610097578063f7d134071161007c578063f7d134071461099a578063f9a2bbc7146109a3578063fdd31fcd146109ac57600080fd5b8063f016e4811461098a578063f446687d1461099257600080fd5b8063e75d72c7116100c8578063e75d72c71461095c578063ea54b2aa1461096f578063edade1891461097757600080fd5b8063e1c7392a1461094b578063e287d9ac1461095357600080fd5b8063d5fe55581161013a578063dcae76ab1161011f578063dcae76ab14610925578063dd86037e1461092e578063dfb6419f1461093857600080fd5b8063d5fe555814610914578063dc927faf1461091c57600080fd5b8063c81b1662146108dd578063cab8966b146108e6578063d06305a9146108ee578063d45c44351461090157600080fd5b8063a78abc16116101fe578063ac7b3b7c116101cd578063b1171724116101b2578063b1171724146108b8578063b8a6c086146108c1578063b95c4a57146108d457600080fd5b8063ac7b3b7c146108a5578063ad2dec82146108ae57600080fd5b8063a78abc1614610869578063a8b0bb8314610876578063ac0e37a01461087f578063ac4317511461089257600080fd5b806393e9d41311610255578063951188891161023a578063951188891461082d5780639dc092621461084d578063a7206cd61461085657600080fd5b806393e9d413146107f7578063948602331461080a57600080fd5b80638a9c5aa1146107b25780638b07ac61146107bb5780638ea7e9be146107c4578063930e1b09146107d757600080fd5b80633a975612116103c75780636949b35c1161033f578063783028a9116102f35780637ba53285116102d85780637ba532851461076e57806382f8b6e914610781578063896efbf21461078a57600080fd5b8063783028a914610752578063792626be1461075b57600080fd5b8063730055aa11610324578063730055aa1461072057806374f2272d14610740578063750a012e1461074957600080fd5b80636949b35c146106f75780636daf2f5b1461071757600080fd5b806351b6ada31161039657806353a467291161037b57806353a46729146106dd57806354133307146106e65780635e9d2b1f146106ee57600080fd5b806351b6ada3146106aa57806351e13fac146106ca57600080fd5b80633a9756121461067c5780633cfc97bf1461068457806343756e5c146106975780634c86f558146106a057600080fd5b8063285d84cc1161045a5780632ca3212511610429578063352b33551161040e578063352b33551461061c578063378bc94c1461063d578063388d3a551461067357600080fd5b80632ca32125146105f35780632ed87b09146105fc57600080fd5b8063285d84cc146105a4578063288e8dc4146105c75780632a88b694146105cf5780632b861629146105de57600080fd5b80631ad5bb5c116104b15780631c643312116104965780631c6433121461057f5780631fca52781461059257806325ee13e21461059b57600080fd5b80631ad5bb5c146105405780631b20087c1461057657600080fd5b80625eeee9146104e257806304e9e3a41461050157806308f2ec061461052f57806314c1e1f714610537575b600080fd5b6104ee640826299e0081565b6040519081526020015b60405180910390f35b61050a61100781565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016104f8565b6104ee601481565b61050a61100481565b61050a61054e366004613320565b60009081526011602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6104ee60085481565b61050a61058d366004613320565b6109cc565b6104ee60015481565b61050a61100581565b6104ee7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b6104ee600681565b6104ee678ac7230489e8000081565b6105f16105ec3660046133c5565b610a03565b005b6104ee60035481565b6104ee61060a3660046134e3565b60136020526000908152604090205481565b6106246110b5565b60405167ffffffffffffffff90911681526020016104f8565b61050a61064b366004613320565b60116020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6104ee61272481565b6104ee603281565b6104ee610692366004613320565b6110c6565b61050a61100181565b6104ee6201518081565b6106bd6106b836600461346e565b61118c565b6040516104f89190613561565b6104ee6106d8366004613320565b611227565b6104ee61271a81565b6104ee606481565b6104ee60065481565b6104ee6107053660046134e3565b60106020526000908152604090205481565b6104ee61274281565b61073361072e366004613320565b611390565b6040516104f891906135f3565b6104ee60045481565b6104ee60025481565b61050a61100881565b6104ee610769366004613320565b61142a565b6104ee61077c366004613320565b6114e2565b6104ee600a5481565b61079d610798366004613320565b61150e565b60405163ffffffff90911681526020016104f8565b6104ee61273881565b6104ee60055481565b61079d6107d2366004613320565b611532565b6104ee6107e53660046132df565b600c6020526000908152604090205481565b6106bd610805366004613320565b61157f565b61081d610818366004613320565b6115f8565b60405190151581526020016104f8565b61084061083b366004613499565b611615565b6040516104f891906135bb565b61050a61100681565b6104ee610864366004613320565b61172c565b60005461081d9060ff1681565b6104ee60075481565b61050a61088d366004613320565b611751565b6105f16108a0366004613405565b611775565b6104ee61276a81565b61079d620af38081565b61050a61100981565b6108406108cf36600461346e565b611eac565b6104ee61272e81565b61050a61100281565b61079d611f34565b61079d6108fc366004613320565b611f46565b61062461090f366004613320565b611f6a565b610624611f9d565b61050a61100381565b6104ee60095481565b6106246212750081565b61050a610946366004613320565b611fab565b6105f1611fcf565b6104ee60125481565b6105f161096a3660046132df565b612154565b610733612311565b61081d610985366004613350565b61232d565b6104ee600781565b6002546104ee565b61079d6107e081565b61050a61100081565b6104ee6109ba3660046132df565b600d6020526000908152604090205481565b600b81815481106109dc57600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6040517f541d55480000000000000000000000000000000000000000000000000000000081523360048201526110049063541d55489060240160206040518083038186803b158015610a5457600080fd5b505afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190613300565b610af7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f746865206d73672073656e646572206973206e6f7420612072656c617965720060448201526064015b60405180910390fd5b60125415610b0757601254610b0e565b640826299e005b3a14610b76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6d75737420757365206c696d69746564206761737072696365000000000000006044820152606401610aee565b6000610bba83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250605091506124679050565b90506000610bc7826124e0565b60008181526011602052604090205490915073ffffffffffffffffffffffffffffffffffffffff1615610c56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e27742073796e63206475706c69636174656420686561646572000000006044820152606401610aee565b6000806000610c6585856125c0565b92509250925080600014610ca957604051819085907f591f7e28c6b17bc54bdf2bdbf67daf8aaca92221f3577319607fba0ce38edc7290600090a350505050505050565b610cb460025461150e565b63ffffffff16610cc6846102d06136db565b63ffffffff1611610d33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e27742073796e6320686561646572203520646179732061676f000000006044820152606401610aee565b6000610d408760206136c3565b90506000610d8589898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525092508c91506124679050565b9050610d8f613145565b6000808060808487876064600019fa610da757600080fd5b5050815160208301516040840151919250906000610dc76107e08b613717565b9050610dd78c848b8d8589612822565b60008c8152600f602090815260409091208251610dfa9391929190910190613163565b50610e076107e08b6138fe565b63ffffffff16610e2a5763ffffffff811660009081526010602052604090208b90555b60008b815260116020526040812080547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790556005546009805491929091610e769084906136c3565b9091555050336000908152600c6020526040902054610eea57600b80546001810182556000919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180547fffffffffffffffffffffffff000000000000000000000000000000000000000016331790555b336000908152600c60205260408120805491610f05836138ab565b9190505550600654600860008154610f1c906138ab565b918290555010610f60576000610f30612900565b336000908152600d6020526040812080549293508392909190610f549084906136c3565b90915550506000600855505b6001548910611047576000610f7660018c6137de565b90506000610f838d611227565b90505b63ffffffff82166000908152601360205260409020548114801590610fc357508b63ffffffff1660068363ffffffff16610fc091906136c3565b10155b15610ffb5763ffffffff82166000908152601360205260409020819055610fe982613850565b9150610ff481611227565b9050610f86565b61100660025461150e565b63ffffffff168c63ffffffff161115611022576110228d612cd2565b505060028b9055600189905563ffffffff8a1660009081526013602052604090208b90555b6040805173ffffffffffffffffffffffffffffffffffffffff86811682526020820185905263ffffffff8d1692908616918e917f04d2d7fea49cb37d18896bf3ec2d974275b276f48a657185bc22fb2c7bb3323a910160405180910390a45050505050505050505050505050565b6110c36212750060046137a0565b81565b6000818152600f602052604081208054829160e09161116e91609c916110eb90613870565b80601f016020809104026020016040519081016040528092919081815260200182805461111790613870565b80156111645780601f1061113957610100808354040283529160200191611164565b820191906000526020600020905b81548152906001019060200180831161114757829003601f168201915b5050505050015190565b63ffffffff911c166000908152601060205260409020549392505050565b6000828152600e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845260010182529182902080548351818402810184019094528084526060939283018282801561121a57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116111ef575b5050505050905092915050565b6000818152600f60205260408120805461138a9161124c91602491906110eb90613870565b7bffffffff000000000000000000000000ffffffff00000000000000007eff000000ff000000ff000000ff000000ff000000ff000000ff000000ff0000600883811c9182167fff000000ff000000ff000000ff000000ff000000ff000000ff000000ff0000009490911b93841617601090811c7cff000000ff000000ff000000ff000000ff000000ff000000ff000000ff9092167dff000000ff000000ff000000ff000000ff000000ff000000ff000000ff009094169390931790921b91909117602081811c9283167fffffffff000000000000000000000000ffffffff0000000000000000000000009290911b91821617604090811c73ffffffff000000000000000000000000ffffffff90931677ffffffff000000000000000000000000ffffffff0000000090921691909117901b17608081811c91901b1790565b92915050565b600f60205260009081526040902080546113a990613870565b80601f01602080910402602001604051908101604052809291908181526020018280546113d590613870565b80156114225780601f106113f757610100808354040283529160200191611422565b820191906000526020600020905b81548152906001019060200180831161140557829003601f168201915b505050505081565b60006007548211611439575090565b816007541080156114575750600754611453906002613755565b8211155b1561146457505060075490565b8160075460026114749190613755565b1080156114b357506004600754600361148d9190613755565b6114979190613703565b6007546114a5906002613755565b6114af91906136c3565b8211155b156114d2578160075460036114c89190613755565b61138a91906137c7565b61138a600483613703565b919050565b6000818152600f60205260408120805460809161150691608891906110eb90613870565b901c92915050565b6000818152600f60205260408120805460e09161150691609891906110eb90613870565b6000818152600f60205260408120805461138a9160e091611559916068916110eb90613870565b901c600881811c62ff00ff1663ff00ff009290911b9190911617601081811c91901b1790565b6000818152600e60209081526040918290208054835181840281018401909452808452606093928301828280156115ec57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116115c1575b50505050509050919050565b6000620af3806116078361150e565b63ffffffff16101592915050565b6060818067ffffffffffffffff81111561163f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611668578160200160208202803683370190505b506000868152600e602052604081209193505b82811015611722578160010160008787848181106116a957634e487b7160e01b600052603260045260246000fd5b90506020020160208101906116be91906132df565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002054845185908390811061170757634e487b7160e01b600052603260045260246000fd5b602090810291909101015261171b816138ab565b905061167b565b5050509392505050565b6000818152600f60205260408120805461138a9161124c91604491906110eb90613870565b6000818152600f60205260408120805460609161150691607491906110eb90613870565b60005460ff166117e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e697420796574000000000000006044820152606401610aee565b3361100614611872576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f746865206d73672073656e646572206d75737420626520676f7665726e616e6360448201527f6520636f6e7472616374000000000000000000000000000000000000000000006064820152608401610aee565b602081146118b05783836040517fad23613c000000000000000000000000000000000000000000000000000000008152600401610aee929190613644565b61192484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601381527f726577617264466f7253796e634865616465720000000000000000000000000060208201529150612f149050565b156119d157604080516020601f840181900481028201810190925282815260009161196791858580838501838280828437600092019190915250612f0f92505050565b905080158061197e575068056bc75e2d6310000081115b156119c957848482600168056bc75e2d631000006040517f808861f9000000000000000000000000000000000000000000000000000000008152600401610aee959493929190613692565b600555611e69565b611a4584848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601a81527f63616c6c6572436f6d70656e736174696f6e4d6f6c6563756c6500000000000060208201529150612f149050565b15611adb57604080516020601f8401819004810282018101909252828152600091611a8891858580838501838280828437600092019190915250612f0f92505050565b9050612710811115611ad35784848260006127106040517f808861f9000000000000000000000000000000000000000000000000000000008152600401610aee959493929190613692565b600455611e69565b611b4f84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600981527f726f756e6453697a65000000000000000000000000000000000000000000000060208201529150612f149050565b15611be557604080516020601f8401819004810282018101909252828152600091611b9291858580838501838280828437600092019190915250612f0f92505050565b9050600754811015611bdd576007546040517f808861f9000000000000000000000000000000000000000000000000000000008152610aee9187918791859160001990600401613692565b600655611e69565b611c5984848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600981527f6d6178576569676874000000000000000000000000000000000000000000000060208201529150612f149050565b15611cf857604080516020601f8401819004810282018101909252828152600091611c9c91858580838501838280828437600092019190915250612f0f92505050565b9050801580611cac575060065481115b15611cf05784848260016006546040517f808861f9000000000000000000000000000000000000000000000000000000008152600401610aee959493929190613692565b600755611e69565b611d6c84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152601281527f73746f7265426c6f636b4761735072696365000000000000000000000000000060208201529150612f149050565b15611e0757604080516020601f8401819004810282018101909252828152600091611daf91858580838501838280828437600092019190915250612f0f92505050565b9050633b9aca00811015611dff57848482633b9aca006000196040517f808861f9000000000000000000000000000000000000000000000000000000008152600401610aee959493929190613692565b601255611e69565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f756e6b6e6f776e20706172616d000000000000000000000000000000000000006044820152606401610aee565b7f6cdb0ac70ab7f2e2d035cca5be60d89906f2dede7648ddbd7402189c1eeed17a84848484604051611e9e9493929190613660565b60405180910390a150505050565b6000828152600e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452600190810183529281902090920180548351818402810184019094528084526060939283018282801561121a57602002820191906000526020600020905b815481526020019060010190808311611f14575050505050905092915050565b6000611f4160025461150e565b905090565b6000818152600f60205260408120805460e09161150691609c91906110eb90613870565b6000818152600f602052604081208054611f919160e091611559916064916110eb90613870565b63ffffffff1692915050565b6110c360046212750061373a565b6000818152600f6020526040812080546060916115069160a091906110eb90613870565b60005460ff161561203c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f74686520636f6e747261637420616c726561647920696e6974000000000000006044820152606401610aee565b600061205f60405180608001604052806050815260200161394e605091396124e0565b60018080556002829055600382905560408051608081019091526050808252929350600092839291839161394e6020830139905060006120a46107e0620af380613717565b63ffffffff811660009081526010602052604081208890559091506120d0838786620af380868a612822565b6000888152600f6020908152604090912082519293506120f4929091840190613163565b5050678ac7230489e8000060055550506032600455505060646006555050601460075562015180600a55640826299e00601255600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60005460ff166121c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f74686520636f6e7472616374206e6f7420696e697420796574000000000000006044820152606401610aee565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d60205260409020548061224d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e6f2072656c61796572207265776172640000000000000000000000000000006044820152606401610aee565b73ffffffffffffffffffffffffffffffffffffffff82166000818152600d602052604080822091909155517f9a99b4f0000000000000000000000000000000000000000000000000000000008152600481019190915260248101829052829061100290639a99b4f090604401602060405180830381600087803b1580156122d357600080fd5b505af11580156122e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230b9190613338565b50505050565b60405180608001604052806050815260200161394e6050913981565b63ffffffff851660009081526013602052604081205461234b611f34565b63ffffffff1661235b87896136db565b63ffffffff16118061236b575087155b80612374575080155b1561238357600091505061245d565b6000818152600f6020526040812080546123a3916044916110eb90613870565b9050846123b5578814915061245d9050565b8860005b86811015612457576123cc6002876138ea565b6001141561240b576124048888838181106123f757634e487b7160e01b600052603260045260246000fd5b9050602002013583612f6d565b915061243e565b61243b8289898481811061242f57634e487b7160e01b600052603260045260246000fd5b90506020020135612f6d565b91505b60019590951c948061244f816138ab565b9150506123b9565b50149150505b9695505050505050565b6060600061247584846137c7565b90508067ffffffffffffffff81111561249e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156124c8576020820181803683370190505b50915060208581019085840101611722828285612f99565b600061138a600280846040516124f69190613545565b602060405180830381855afa158015612513573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906125369190613338565b60405160200161254891815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261258091613545565b602060405180830381855afa15801561259d573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061124c9190613338565b6000806000806125d461124c602488015190565b905060006125e1826114e2565b9050806125f5575061272e915061281b9050565b6125fe866114e2565b935083156126135750612738915061281b9050565b600061262560e061155960688b015190565b9050600061263282612ff2565b90508715806126415750808810155b15612655575061276a935061281b92505050565b61265e8461150e565b6126699060016136db565b9650600061267685611532565b90506126846107e0896138fe565b63ffffffff16156126ca578063ffffffff168363ffffffff16141580156126b0575063ffffffff811615155b156126c5575061271a945061281b9350505050565b6127da565b60006126d582612ff2565b905060006126e287611f6a565b905060006126ef886110c6565b905060006126fc82611f6a565b9050600061270a8285613803565b905061271a60046212750061373a565b67ffffffffffffffff168167ffffffffffffffff1610156127465761274360046212750061373a565b90505b6127546212750060046137a0565b67ffffffffffffffff168167ffffffffffffffff1611156127805761277d6212750060046137a0565b90505b6212750081860204600061279382613068565b90508063ffffffff168a63ffffffff16141580156127b6575063ffffffff811615155b156127d257506127249b5061281b9a5050505050505050505050565b505050505050505b6000612802837bffff0000000000000000000000000000000000000000000000000000613703565b905061280e81866136c3565b9750600096505050505050505b9250925092565b6040805160a080825260c08201909252606091602082018180368337019050509050600060408773ffffffffffffffffffffffffffffffffffffffff16901b9050600060408563ffffffff16901b60608763ffffffff16901b608089901b61288a91906136c3565b61289491906136c3565b90507fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b1660208481019060708601908c015b818310156128e35780518352602092830192016128cb565b509384525060188301919091526030909101529695505050505050565b600954600b805460408051602080840282018101909252828152600094938593849383018282801561296857602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161293d575b5050505050905060008151905060008167ffffffffffffffff81111561299e57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156129c7578160200160208202803683370190505b50905060005b82811015612a9a5760008482815181106129f757634e487b7160e01b600052603260045260246000fd5b602002602001015190506000612a4b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461142a565b905080848481518110612a6e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152612a8381886136c3565b965050508080612a92906138ab565b9150506129cd565b50600061271060045487612aae9190613755565b612ab89190613703565b9050612ac481876137c7565b95508560015b84811015612bb05760008789868481518110612af657634e487b7160e01b600052603260045260246000fd5b6020026020010151612b089190613755565b612b129190613703565b905080600d6000898581518110612b3957634e487b7160e01b600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612b8a91906136c3565b90915550612b9a905081846137c7565b9250508080612ba8906138ab565b915050612aca565b5080600d600087600081518110612bd757634e487b7160e01b600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612c2891906136c3565b9091555050600060098190555b84811015612cba57600c6000878381518110612c6157634e487b7160e01b600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090558080612cb2906138ab565b915050612c35565b50612cc7600b60006131e7565b509695505050505050565b60005b6006811015612d0757600354821415612cec575050565b612cf582611227565b9150612d00816138ab565b9050612cd5565b506000600a54612d1683611f6a565b67ffffffffffffffff16612d2a9190613703565b90506000612d3783611fab565b90506000600761100573ffffffffffffffffffffffffffffffffffffffff166373fa03ed6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d8557600080fd5b505afa158015612d99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dbd9190613338565b612dc791906137c7565b905073ffffffffffffffffffffffffffffffffffffffff821615801590612ded57508083115b1561230b576000612dfd85611751565b6000858152600e6020908152604080832073ffffffffffffffffffffffffffffffffffffffff8816845260018101909252909120549192509080612e8c5781546001810183556000838152602090200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87161790555b5073ffffffffffffffffffffffffffffffffffffffff93841660009081526001918201602090815260408220805480850182558184528284200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169590971694909417909555918101805491820181558252929020909101929092555050565b015190565b600081604051602001612f279190613545565b6040516020818303038152906040528051906020012083604051602001612f4e9190613545565b6040516020818303038152906040528051906020012014905092915050565b600060405183815282602082015260208160408360025afa5060208160208360025afa50519392505050565b60208110612fd15782518252612fb06020836136c3565b9150612fbd6020846136c3565b9250612fca6020826137c7565b9050612f99565b915181516020939093036101000a6000190180199091169216919091179052565b600060ff601883901c1662ffffff831660038211613036576130158260036137de565b613020906008613774565b63ffffffff9182169082161c9081169250613061565b63ffffffff8116925061304a6003836137de565b613055906008613774565b63ffffffff1683901b92505b5050919050565b600080825b80156130885760011c81613080816138c6565b92505061306d565b600060036130978460076136db565b63ffffffff16901c9050600060038263ffffffff16116130e2576130bc8260036137de565b6130c7906008613774565b63ffffffff168662ffffff1663ffffffff16901b905061310c565b6130ed6003836137de565b6130f8906008613774565b63ffffffff1686901c90508062ffffff1690505b6280000081161561312d5760081c62ffffff1681613129816138c6565b9250505b60188263ffffffff16901b8117945050505050919050565b60405180608001604052806004906020820280368337509192915050565b82805461316f90613870565b90600052602060002090601f01602090048101928261319157600085556131d7565b82601f106131aa57805160ff19168380011785556131d7565b828001600101855582156131d7579182015b828111156131d75782518255916020019190600101906131bc565b506131e3929150613208565b5090565b50805460008255906000526020600020908101906132059190613208565b50565b5b808211156131e35760008155600101613209565b803573ffffffffffffffffffffffffffffffffffffffff811681146114dd57600080fd5b60008083601f840112613252578182fd5b50813567ffffffffffffffff811115613269578182fd5b6020830191508360208260051b850101111561328457600080fd5b9250929050565b60008083601f84011261329c578182fd5b50813567ffffffffffffffff8111156132b3578182fd5b60208301915083602082850101111561328457600080fd5b803563ffffffff811681146114dd57600080fd5b6000602082840312156132f0578081fd5b6132f98261321d565b9392505050565b600060208284031215613311578081fd5b815180151581146132f9578182fd5b600060208284031215613331578081fd5b5035919050565b600060208284031215613349578081fd5b5051919050565b60008060008060008060a08789031215613368578182fd5b86359550613378602088016132cb565b9450613386604088016132cb565b9350606087013567ffffffffffffffff8111156133a1578283fd5b6133ad89828a01613241565b979a9699509497949695608090950135949350505050565b600080602083850312156133d7578182fd5b823567ffffffffffffffff8111156133ed578283fd5b6133f98582860161328b565b90969095509350505050565b6000806000806040858703121561341a578384fd5b843567ffffffffffffffff80821115613431578586fd5b61343d8883890161328b565b90965094506020870135915080821115613455578384fd5b506134628782880161328b565b95989497509550505050565b60008060408385031215613480578182fd5b823591506134906020840161321d565b90509250929050565b6000806000604084860312156134ad578283fd5b83359250602084013567ffffffffffffffff8111156134ca578283fd5b6134d686828701613241565b9497909650939450505050565b6000602082840312156134f4578081fd5b6132f9826132cb565b81835281816020850137506000806020838501015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60008251613557818460208701613824565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156135af57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161357d565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156135af578351835292840192918401916001016135d7565b6020815260008251806020840152613612816040850160208701613824565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6020815260006136586020830184866134fd565b949350505050565b6040815260006136746040830186886134fd565b82810360208401526136878185876134fd565b979650505050505050565b6080815260006136a66080830187896134fd565b602083019590955250604081019290925260609091015292915050565b600082198211156136d6576136d6613921565b500190565b600063ffffffff8083168185168083038211156136fa576136fa613921565b01949350505050565b60008261371257613712613937565b500490565b600063ffffffff8084168061372e5761372e613937565b92169190910492915050565b600067ffffffffffffffff8084168061372e5761372e613937565b600081600019048311821515161561376f5761376f613921565b500290565b600063ffffffff8083168185168183048111821515161561379757613797613921565b02949350505050565b600067ffffffffffffffff8083168185168183048111821515161561379757613797613921565b6000828210156137d9576137d9613921565b500390565b600063ffffffff838116908316818110156137fb576137fb613921565b039392505050565b600067ffffffffffffffff838116908316818110156137fb576137fb613921565b60005b8381101561383f578181015183820152602001613827565b8381111561230b5750506000910152565b600063ffffffff82168061386657613866613921565b6000190192915050565b600181811c9082168061388457607f821691505b602082108114156138a557634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156138bf576138bf613921565b5060010190565b600063ffffffff808316818114156138e0576138e0613921565b6001019392505050565b6000826138f9576138f9613937565b500690565b600063ffffffff8084168061391557613915613937565b92169190910692915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fdfe000040209acaa5d26d392ace656c2428c991b0a3d3d773845a1300000000000000000000aa8e225b1f3ea6c4b7afd5aa1cecf691a8beaa7fa1e579ce240e4a62b5ac8ecc2141d9618b8c0b170d5c05bba2646970667358221220ba01d938711698d3b3f2cb380f1faf4f6a9fa3d60f49da21cc76ce642807d97d64736f6c63430008040033", + }, + }, + } } func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.Int, statedb *state.StateDB) { @@ -192,6 +204,9 @@ func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.I if config.IsOnZeus(blockNumber) { applySystemContractUpgrade(zeusUpgrade[network], blockNumber, statedb, logger) } + if config.IsOnHera(blockNumber) { + applySystemContractUpgrade(heraUpgrade[network], blockNumber, statedb, logger) + } } func applySystemContractUpgrade(upgrade *Upgrade, blockNumber *big.Int, statedb *state.StateDB, logger log.Logger) { diff --git a/params/config.go b/params/config.go index 9392f35f8..8c80060df 100644 --- a/params/config.go +++ b/params/config.go @@ -278,7 +278,7 @@ var ( MuirGlacierBlock: big.NewInt(0), HashPowerBlock: big.NewInt(4_545_256), ZeusBlock: big.NewInt(12_666_000), - HeraBlock: nil, + HeraBlock: big.NewInt(16_47_2288), Satoshi: &SatoshiConfig{ Period: 3, Epoch: 200, diff --git a/params/version.go b/params/version.go index b9de9e31e..e1539fa2a 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 = 0 // Minor version component of the current release - VersionPatch = 4 // Patch version component of the current release + VersionPatch = 5 // Patch version component of the current release VersionMeta = "" // Version metadata to append to the version string )