diff --git a/CHANGELOG.md b/CHANGELOG.md index 054339ce93..8d4ce0b3eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,12 +41,13 @@ Changelog for NeoFS Node ### Updated - Update minimal supported Go version up to v1.19 (#2485) -- Update `neo-go` to `v0.103.1` (#2221, #2309, #2596, #2626, #2639) +- Update `neo-go` to `v0.104.0` (#2221, #2309, #2596, #2626, #2639, #2659) - `neofs-lens` `inspect` object commands to `get` with `inspect` deprecation (#2548) - Update `tzhash` to `v1.7.1` - `github.com/panjf2000/ants/v2` to `v2.8.2` - `github.com/nspcc-dev/neofs-contract` to `v0.18.0` (#2580) - `hrw` library to v2.0.0 version (#2629, #2658) +- neofs-contract to v0.19.1 (#2659) ### Updating from v0.38.1 Blobovniczas are gone from the node with this release, see 0.38.0 upgrade @@ -56,6 +57,9 @@ after a couple of minor releases). neofs-adm no longer creates a contract group wallet and no longer needs it for the operation which may affect deployment scripts. +`native_activations` subsection of `consensus` IR configuration should be +removed. It never actually did anything useful anyway. + ## [0.38.1] - 2023-09-18 A tiny fix for peapod-enabled nodes. diff --git a/config/example/ir.yaml b/config/example/ir.yaml index 3781ba50e8..9891708c2c 100644 --- a/config/example/ir.yaml +++ b/config/example/ir.yaml @@ -75,22 +75,6 @@ morph: ping: # Optional settings of pinging mechanism interval: 30s # Optional time period between pings. Defaults to 30s. Must not be negative timeout: 90s # Optional time period to wait for pong. Defaults to 1m. Must not be negative - native_activations: # Optional chronology of native contracts updates. Maps name of Neo native contract - # to height list. Values must not be empty. Each array element in the value must be unsigned integer - # not larger than 4294967295. - # Attention! Keep a close eye on the list: if some contracts are specified, then the rest of them are - # treated as disabled and won't be deployed. Use this option with care, and if you do, the list should - # match the one below. - ContractManagement: [0] - LedgerContract: [0] - NeoToken: [0] - GasToken: [0] - PolicyContract: [0] - OracleContract: [0] - RoleManagement: [0] - Notary: [0] - CryptoLib: [0] - StdLib: [0] network_settings: # NeoFS network settings managed in the Netmap contract epoch_duration: 240 # Time interval (approximate) between two adjacent NeoFS epochs measured in Sidechain blocks. diff --git a/contracts/00-nns.manifest.json b/contracts/00-nns.manifest.json index 72b678fe17..e83ced466b 100755 --- a/contracts/00-nns.manifest.json +++ b/contracts/00-nns.manifest.json @@ -1 +1 @@ -{"name":"NameService","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":32,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addRecord","offset":3224,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"},{"name":"data","type":"String"}],"returntype":"Void","safe":false},{"name":"balanceOf","offset":976,"parameters":[{"name":"owner","type":"Hash160"}],"returntype":"Integer","safe":true},{"name":"decimals","offset":791,"parameters":[],"returntype":"Integer","safe":true},{"name":"deleteRecords","offset":3448,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Void","safe":false},{"name":"getAllRecords","offset":3692,"parameters":[{"name":"name","type":"String"}],"returntype":"InteropInterface","safe":true},{"name":"getPrice","offset":1427,"parameters":[],"returntype":"Integer","safe":true},{"name":"getRecords","offset":3364,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Array","safe":true},{"name":"isAvailable","offset":1461,"parameters":[{"name":"name","type":"String"}],"returntype":"Boolean","safe":true},{"name":"ownerOf","offset":813,"parameters":[{"name":"tokenID","type":"ByteArray"}],"returntype":"Hash160","safe":true},{"name":"properties","offset":883,"parameters":[{"name":"tokenID","type":"ByteArray"}],"returntype":"Map","safe":true},{"name":"register","offset":1722,"parameters":[{"name":"name","type":"String"},{"name":"owner","type":"Hash160"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Boolean","safe":false},{"name":"registerTLD","offset":2397,"parameters":[{"name":"name","type":"String"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Void","safe":false},{"name":"renew","offset":2598,"parameters":[{"name":"name","type":"String"}],"returntype":"Integer","safe":false},{"name":"resolve","offset":3630,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Array","safe":true},{"name":"roots","offset":1321,"parameters":[],"returntype":"InteropInterface","safe":true},{"name":"setAdmin","offset":2809,"parameters":[{"name":"name","type":"String"},{"name":"admin","type":"Hash160"}],"returntype":"Void","safe":false},{"name":"setPrice","offset":1349,"parameters":[{"name":"price","type":"Integer"}],"returntype":"Void","safe":false},{"name":"setRecord","offset":2984,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"},{"name":"id","type":"Integer"},{"name":"data","type":"String"}],"returntype":"Void","safe":false},{"name":"symbol","offset":785,"parameters":[],"returntype":"String","safe":true},{"name":"tokens","offset":1052,"parameters":[],"returntype":"InteropInterface","safe":true},{"name":"tokensOf","offset":1081,"parameters":[{"name":"owner","type":"Hash160"}],"returntype":"InteropInterface","safe":true},{"name":"totalSupply","offset":797,"parameters":[],"returntype":"Integer","safe":true},{"name":"transfer","offset":1143,"parameters":[{"name":"to","type":"Hash160"},{"name":"tokenID","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Boolean","safe":false},{"name":"update","offset":698,"parameters":[{"name":"nef","type":"ByteArray"},{"name":"manifest","type":"String"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"updateSOA","offset":2719,"parameters":[{"name":"name","type":"String"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Void","safe":false},{"name":"version","offset":793,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"Transfer","parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"tokenId","type":"ByteArray"}]}]},"features":{},"groups":[],"permissions":[{"contract":"0xfffdc93764dbaddd97c48f252a53ea4643faa3fd","methods":["update"]},{"contract":"*","methods":["onNEP11Payment"]}],"supportedstandards":["NEP-11"],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NameService","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":32,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addRecord","offset":3236,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"},{"name":"data","type":"String"}],"returntype":"Void","safe":false},{"name":"balanceOf","offset":976,"parameters":[{"name":"owner","type":"Hash160"}],"returntype":"Integer","safe":true},{"name":"decimals","offset":791,"parameters":[],"returntype":"Integer","safe":true},{"name":"deleteRecords","offset":3460,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Void","safe":false},{"name":"getAllRecords","offset":3704,"parameters":[{"name":"name","type":"String"}],"returntype":"InteropInterface","safe":true},{"name":"getPrice","offset":1427,"parameters":[],"returntype":"Integer","safe":true},{"name":"getRecords","offset":3376,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Array","safe":true},{"name":"isAvailable","offset":1461,"parameters":[{"name":"name","type":"String"}],"returntype":"Boolean","safe":true},{"name":"ownerOf","offset":813,"parameters":[{"name":"tokenID","type":"ByteArray"}],"returntype":"Hash160","safe":true},{"name":"properties","offset":883,"parameters":[{"name":"tokenID","type":"ByteArray"}],"returntype":"Map","safe":true},{"name":"register","offset":1722,"parameters":[{"name":"name","type":"String"},{"name":"owner","type":"Hash160"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Boolean","safe":false},{"name":"registerTLD","offset":2397,"parameters":[{"name":"name","type":"String"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Void","safe":false},{"name":"renew","offset":2610,"parameters":[{"name":"name","type":"String"}],"returntype":"Integer","safe":false},{"name":"resolve","offset":3642,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"}],"returntype":"Array","safe":true},{"name":"roots","offset":1321,"parameters":[],"returntype":"InteropInterface","safe":true},{"name":"setAdmin","offset":2821,"parameters":[{"name":"name","type":"String"},{"name":"admin","type":"Hash160"}],"returntype":"Void","safe":false},{"name":"setPrice","offset":1349,"parameters":[{"name":"price","type":"Integer"}],"returntype":"Void","safe":false},{"name":"setRecord","offset":2996,"parameters":[{"name":"name","type":"String"},{"name":"typ","type":"Integer"},{"name":"id","type":"Integer"},{"name":"data","type":"String"}],"returntype":"Void","safe":false},{"name":"symbol","offset":785,"parameters":[],"returntype":"String","safe":true},{"name":"tokens","offset":1052,"parameters":[],"returntype":"InteropInterface","safe":true},{"name":"tokensOf","offset":1081,"parameters":[{"name":"owner","type":"Hash160"}],"returntype":"InteropInterface","safe":true},{"name":"totalSupply","offset":797,"parameters":[],"returntype":"Integer","safe":true},{"name":"transfer","offset":1143,"parameters":[{"name":"to","type":"Hash160"},{"name":"tokenID","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Boolean","safe":false},{"name":"update","offset":698,"parameters":[{"name":"nef","type":"ByteArray"},{"name":"manifest","type":"String"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"updateSOA","offset":2731,"parameters":[{"name":"name","type":"String"},{"name":"email","type":"String"},{"name":"refresh","type":"Integer"},{"name":"retry","type":"Integer"},{"name":"expire","type":"Integer"},{"name":"ttl","type":"Integer"}],"returntype":"Void","safe":false},{"name":"version","offset":793,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"Transfer","parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"tokenId","type":"ByteArray"}]}]},"features":{},"groups":[],"permissions":[{"contract":"0xfffdc93764dbaddd97c48f252a53ea4643faa3fd","methods":["update"]},{"contract":"*","methods":["onNEP11Payment"]}],"supportedstandards":["NEP-11"],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/00-nns.nef b/contracts/00-nns.nef index 43a5a2d80d..793e7ad730 100755 Binary files a/contracts/00-nns.nef and b/contracts/00-nns.nef differ diff --git a/contracts/01-audit.manifest.json b/contracts/01-audit.manifest.json index c01f60f7e4..6a71f553d2 100755 --- a/contracts/01-audit.manifest.json +++ b/contracts/01-audit.manifest.json @@ -1 +1 @@ -{"name":"NeoFS Audit","abi":{"methods":[{"name":"_deploy","offset":0,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"get","offset":892,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"ByteArray","safe":true},{"name":"list","offset":917,"parameters":[],"returntype":"Array","safe":true},{"name":"listByCID","offset":983,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listByEpoch","offset":951,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"listByNode","offset":1026,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"},{"name":"key","type":"PublicKey"}],"returntype":"Array","safe":true},{"name":"put","offset":745,"parameters":[{"name":"rawAuditResult","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"update","offset":616,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1104,"parameters":[],"returntype":"Integer","safe":true}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NeoFS Audit","abi":{"methods":[{"name":"_deploy","offset":0,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"get","offset":832,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"ByteArray","safe":true},{"name":"list","offset":857,"parameters":[],"returntype":"Array","safe":true},{"name":"listByCID","offset":923,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listByEpoch","offset":891,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"listByNode","offset":966,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"},{"name":"key","type":"PublicKey"}],"returntype":"Array","safe":true},{"name":"put","offset":685,"parameters":[{"name":"rawAuditResult","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"update","offset":556,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1044,"parameters":[],"returntype":"Integer","safe":true}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/01-audit.nef b/contracts/01-audit.nef index 1e90dfaba6..2f2c15f909 100755 Binary files a/contracts/01-audit.nef and b/contracts/01-audit.nef differ diff --git a/contracts/02-balance.manifest.json b/contracts/02-balance.manifest.json index 138b636b49..d7b33b05d8 100755 --- a/contracts/02-balance.manifest.json +++ b/contracts/02-balance.manifest.json @@ -1 +1 @@ -{"name":"NeoFS Balance","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":93,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"balanceOf","offset":1104,"parameters":[{"name":"account","type":"Hash160"}],"returntype":"Integer","safe":true},{"name":"burn","offset":1637,"parameters":[{"name":"from","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"txDetails","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"decimals","offset":1082,"parameters":[],"returntype":"Integer","safe":true},{"name":"lock","offset":1250,"parameters":[{"name":"txDetails","type":"ByteArray"},{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"until","type":"Integer"}],"returntype":"Void","safe":false},{"name":"mint","offset":1516,"parameters":[{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"txDetails","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"newEpoch","offset":1387,"parameters":[{"name":"epochNum","type":"Integer"}],"returntype":"Void","safe":false},{"name":"symbol","offset":1078,"parameters":[],"returntype":"String","safe":true},{"name":"totalSupply","offset":1086,"parameters":[],"returntype":"Integer","safe":true},{"name":"transfer","offset":1123,"parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"data","type":"Any"}],"returntype":"Boolean","safe":false},{"name":"transferX","offset":1147,"parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"details","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"update","offset":947,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1788,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"Lock","parameters":[{"name":"txID","type":"ByteArray"},{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"until","type":"Integer"}]},{"name":"Transfer","parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"}]},{"name":"TransferX","parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"details","type":"ByteArray"}]}]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":["NEP-17"],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NeoFS Balance","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":93,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"balanceOf","offset":1432,"parameters":[{"name":"account","type":"Hash160"}],"returntype":"Integer","safe":true},{"name":"burn","offset":1965,"parameters":[{"name":"from","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"txDetails","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"decimals","offset":1410,"parameters":[],"returntype":"Integer","safe":true},{"name":"lock","offset":1578,"parameters":[{"name":"txDetails","type":"ByteArray"},{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"until","type":"Integer"}],"returntype":"Void","safe":false},{"name":"mint","offset":1844,"parameters":[{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"txDetails","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"newEpoch","offset":1715,"parameters":[{"name":"epochNum","type":"Integer"}],"returntype":"Void","safe":false},{"name":"symbol","offset":1406,"parameters":[],"returntype":"String","safe":true},{"name":"totalSupply","offset":1414,"parameters":[],"returntype":"Integer","safe":true},{"name":"transfer","offset":1451,"parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"data","type":"Any"}],"returntype":"Boolean","safe":false},{"name":"transferX","offset":1475,"parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"details","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"update","offset":1275,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":2116,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"Lock","parameters":[{"name":"txID","type":"ByteArray"},{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"until","type":"Integer"}]},{"name":"Transfer","parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"}]},{"name":"TransferX","parameters":[{"name":"from","type":"Hash160"},{"name":"to","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"details","type":"ByteArray"}]}]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","subscribeForNewEpoch"]}],"supportedstandards":["NEP-17"],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/02-balance.nef b/contracts/02-balance.nef index cacd9e26cc..4b4ce26fe8 100755 Binary files a/contracts/02-balance.nef and b/contracts/02-balance.nef differ diff --git a/contracts/03-proxy.nef b/contracts/03-proxy.nef index a6a92f8bda..76be041d1a 100755 Binary files a/contracts/03-proxy.nef and b/contracts/03-proxy.nef differ diff --git a/contracts/04-reputation.manifest.json b/contracts/04-reputation.manifest.json index 7d79a5661f..ae73a8f5c3 100755 --- a/contracts/04-reputation.manifest.json +++ b/contracts/04-reputation.manifest.json @@ -1 +1 @@ -{"name":"NeoFS Reputation","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":35,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"get","offset":974,"parameters":[{"name":"epoch","type":"Integer"},{"name":"peerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"getByID","offset":990,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listByEpoch","offset":1080,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"put","offset":864,"parameters":[{"name":"epoch","type":"Integer"},{"name":"peerID","type":"ByteArray"},{"name":"value","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"update","offset":730,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1158,"parameters":[],"returntype":"Integer","safe":false}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NeoFS Reputation","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":35,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"get","offset":914,"parameters":[{"name":"epoch","type":"Integer"},{"name":"peerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"getByID","offset":930,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listByEpoch","offset":1020,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"put","offset":804,"parameters":[{"name":"epoch","type":"Integer"},{"name":"peerID","type":"ByteArray"},{"name":"value","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"update","offset":670,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1098,"parameters":[],"returntype":"Integer","safe":false}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/04-reputation.nef b/contracts/04-reputation.nef index c907e13d80..fb46a1d26f 100755 Binary files a/contracts/04-reputation.nef and b/contracts/04-reputation.nef differ diff --git a/contracts/05-neofsid.manifest.json b/contracts/05-neofsid.manifest.json index bfdb0b1b40..02d2d78f3d 100755 --- a/contracts/05-neofsid.manifest.json +++ b/contracts/05-neofsid.manifest.json @@ -1 +1 @@ -{"name":"NeoFS ID","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":35,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addKey","offset":1030,"parameters":[{"name":"owner","type":"ByteArray"},{"name":"keys","type":"Array"}],"returntype":"Void","safe":false},{"name":"key","offset":1442,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"removeKey","offset":1235,"parameters":[{"name":"owner","type":"ByteArray"},{"name":"keys","type":"Array"}],"returntype":"Void","safe":false},{"name":"update","offset":899,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1513,"parameters":[],"returntype":"Integer","safe":true}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NeoFS ID","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":35,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addKey","offset":857,"parameters":[{"name":"owner","type":"ByteArray"},{"name":"keys","type":"Array"}],"returntype":"Void","safe":false},{"name":"key","offset":1269,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"removeKey","offset":1062,"parameters":[{"name":"owner","type":"ByteArray"},{"name":"keys","type":"Array"}],"returntype":"Void","safe":false},{"name":"update","offset":726,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":1340,"parameters":[],"returntype":"Integer","safe":true}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/05-neofsid.nef b/contracts/05-neofsid.nef index 0952dce8be..39f00c276b 100755 Binary files a/contracts/05-neofsid.nef and b/contracts/05-neofsid.nef differ diff --git a/contracts/06-container.manifest.json b/contracts/06-container.manifest.json index 57bb7af2f8..387a77b723 100755 --- a/contracts/06-container.manifest.json +++ b/contracts/06-container.manifest.json @@ -1 +1 @@ -{"name":"NeoFS Container","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":83,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"alias","offset":3058,"parameters":[{"name":"cid","type":"ByteArray"}],"returntype":"String","safe":true},{"name":"containersOf","offset":3198,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"InteropInterface","safe":true},{"name":"count","offset":3153,"parameters":[],"returntype":"Integer","safe":true},{"name":"delete","offset":2649,"parameters":[{"name":"containerID","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"eACL","offset":3610,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"get","offset":2945,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"getContainerSize","offset":3870,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"iterateAllContainerSizes","offset":4243,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"InteropInterface","safe":true},{"name":"iterateContainerSizes","offset":4145,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"Hash256"}],"returntype":"InteropInterface","safe":true},{"name":"list","offset":3252,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listContainerSizes","offset":3984,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"newEpoch","offset":4295,"parameters":[{"name":"epochNum","type":"Integer"}],"returntype":"Void","safe":false},{"name":"onNEP11Payment","offset":1164,"parameters":[{"name":"a","type":"Hash160"},{"name":"b","type":"Integer"},{"name":"c","type":"ByteArray"},{"name":"d","type":"Any"}],"returntype":"Void","safe":false},{"name":"owner","offset":3007,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"ByteArray","safe":true},{"name":"put","offset":1565,"parameters":[{"name":"container","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"putContainerSize","offset":3668,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"},{"name":"usedSize","type":"Integer"},{"name":"pubKey","type":"PublicKey"}],"returntype":"Void","safe":false},{"name":"putNamed","offset":1581,"parameters":[{"name":"container","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"},{"name":"name","type":"String"},{"name":"zone","type":"String"}],"returntype":"Void","safe":false},{"name":"setEACL","offset":3348,"parameters":[{"name":"eACL","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"startContainerEstimation","offset":4325,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Void","safe":false},{"name":"stopContainerEstimation","offset":4406,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Void","safe":false},{"name":"update","offset":1432,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":4486,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"PutSuccess","parameters":[{"name":"containerID","type":"Hash256"},{"name":"publicKey","type":"PublicKey"}]},{"name":"DeleteSuccess","parameters":[{"name":"containerID","type":"ByteArray"}]},{"name":"SetEACLSuccess","parameters":[{"name":"containerID","type":"ByteArray"},{"name":"publicKey","type":"PublicKey"}]},{"name":"StartEstimation","parameters":[{"name":"epoch","type":"Integer"}]},{"name":"StopEstimation","parameters":[{"name":"epoch","type":"Integer"}]}]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","addKey","transferX","register","registerTLD","addRecord","deleteRecords"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NeoFS Container","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":83,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"alias","offset":3554,"parameters":[{"name":"cid","type":"ByteArray"}],"returntype":"String","safe":true},{"name":"containersOf","offset":3694,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"InteropInterface","safe":true},{"name":"count","offset":3649,"parameters":[],"returntype":"Integer","safe":true},{"name":"delete","offset":3145,"parameters":[{"name":"containerID","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"eACL","offset":4106,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"get","offset":3441,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"getContainerSize","offset":4366,"parameters":[{"name":"id","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"iterateAllContainerSizes","offset":4739,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"InteropInterface","safe":true},{"name":"iterateContainerSizes","offset":4641,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"Hash256"}],"returntype":"InteropInterface","safe":true},{"name":"list","offset":3748,"parameters":[{"name":"owner","type":"ByteArray"}],"returntype":"Array","safe":true},{"name":"listContainerSizes","offset":4480,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"newEpoch","offset":4791,"parameters":[{"name":"epochNum","type":"Integer"}],"returntype":"Void","safe":false},{"name":"onNEP11Payment","offset":1670,"parameters":[{"name":"a","type":"Hash160"},{"name":"b","type":"Integer"},{"name":"c","type":"ByteArray"},{"name":"d","type":"Any"}],"returntype":"Void","safe":false},{"name":"owner","offset":3503,"parameters":[{"name":"containerID","type":"ByteArray"}],"returntype":"ByteArray","safe":true},{"name":"put","offset":2061,"parameters":[{"name":"container","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"putContainerSize","offset":4164,"parameters":[{"name":"epoch","type":"Integer"},{"name":"cid","type":"ByteArray"},{"name":"usedSize","type":"Integer"},{"name":"pubKey","type":"PublicKey"}],"returntype":"Void","safe":false},{"name":"putNamed","offset":2077,"parameters":[{"name":"container","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"},{"name":"name","type":"String"},{"name":"zone","type":"String"}],"returntype":"Void","safe":false},{"name":"setEACL","offset":3844,"parameters":[{"name":"eACL","type":"ByteArray"},{"name":"signature","type":"Signature"},{"name":"publicKey","type":"PublicKey"},{"name":"token","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"startContainerEstimation","offset":4821,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Void","safe":false},{"name":"stopContainerEstimation","offset":4902,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Void","safe":false},{"name":"update","offset":1928,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":4982,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"PutSuccess","parameters":[{"name":"containerID","type":"Hash256"},{"name":"publicKey","type":"PublicKey"}]},{"name":"DeleteSuccess","parameters":[{"name":"containerID","type":"ByteArray"}]},{"name":"SetEACLSuccess","parameters":[{"name":"containerID","type":"ByteArray"},{"name":"publicKey","type":"PublicKey"}]},{"name":"StartEstimation","parameters":[{"name":"epoch","type":"Integer"}]},{"name":"StopEstimation","parameters":[{"name":"epoch","type":"Integer"}]}]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","addKey","transferX","register","registerTLD","addRecord","deleteRecords","subscribeForNewEpoch"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/06-container.nef b/contracts/06-container.nef index a42dfcf9d3..384241bba5 100755 Binary files a/contracts/06-container.nef and b/contracts/06-container.nef differ diff --git a/contracts/07-netmap.manifest.json b/contracts/07-netmap.manifest.json index ba6c0a3826..f72489e947 100755 --- a/contracts/07-netmap.manifest.json +++ b/contracts/07-netmap.manifest.json @@ -1 +1 @@ -{"name":"NeoFS Netmap","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":93,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addPeer","offset":1692,"parameters":[{"name":"nodeInfo","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"addPeerIR","offset":1647,"parameters":[{"name":"nodeInfo","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"config","offset":3153,"parameters":[{"name":"key","type":"ByteArray"}],"returntype":"Any","safe":true},{"name":"epoch","offset":2333,"parameters":[],"returntype":"Integer","safe":true},{"name":"innerRingList","offset":1602,"parameters":[],"returntype":"Array","safe":true},{"name":"lastEpochBlock","offset":2372,"parameters":[],"returntype":"Integer","safe":false},{"name":"listConfig","offset":3239,"parameters":[],"returntype":"Array","safe":true},{"name":"netmap","offset":2411,"parameters":[],"returntype":"Array","safe":true},{"name":"netmapCandidates","offset":2493,"parameters":[],"returntype":"Array","safe":true},{"name":"newEpoch","offset":2042,"parameters":[{"name":"epochNum","type":"Integer"}],"returntype":"Void","safe":false},{"name":"setConfig","offset":3171,"parameters":[{"name":"id","type":"ByteArray"},{"name":"key","type":"ByteArray"},{"name":"val","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"snapshot","offset":2509,"parameters":[{"name":"diff","type":"Integer"}],"returntype":"Array","safe":true},{"name":"snapshotByEpoch","offset":3105,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"update","offset":1472,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"updateSnapshotCount","offset":2663,"parameters":[{"name":"count","type":"Integer"}],"returntype":"Void","safe":false},{"name":"updateState","offset":1937,"parameters":[{"name":"state","type":"Integer"},{"name":"publicKey","type":"PublicKey"}],"returntype":"Void","safe":false},{"name":"updateStateIR","offset":2013,"parameters":[{"name":"state","type":"Integer"},{"name":"publicKey","type":"PublicKey"}],"returntype":"Void","safe":false},{"name":"version","offset":3321,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"AddPeerSuccess","parameters":[{"name":"publicKey","type":"PublicKey"}]},{"name":"UpdateStateSuccess","parameters":[{"name":"publicKey","type":"PublicKey"},{"name":"state","type":"Integer"}]},{"name":"NewEpoch","parameters":[{"name":"epoch","type":"Integer"}]}]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","newEpoch"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NeoFS Netmap","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":93,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"addPeer","offset":1782,"parameters":[{"name":"nodeInfo","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"addPeerIR","offset":1737,"parameters":[{"name":"nodeInfo","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"config","offset":3243,"parameters":[{"name":"key","type":"ByteArray"}],"returntype":"Any","safe":true},{"name":"epoch","offset":2423,"parameters":[],"returntype":"Integer","safe":true},{"name":"innerRingList","offset":1692,"parameters":[],"returntype":"Array","safe":true},{"name":"lastEpochBlock","offset":2462,"parameters":[],"returntype":"Integer","safe":false},{"name":"listConfig","offset":3329,"parameters":[],"returntype":"Array","safe":true},{"name":"netmap","offset":2501,"parameters":[],"returntype":"Array","safe":true},{"name":"netmapCandidates","offset":2583,"parameters":[],"returntype":"Array","safe":true},{"name":"newEpoch","offset":2132,"parameters":[{"name":"epochNum","type":"Integer"}],"returntype":"Void","safe":false},{"name":"setConfig","offset":3261,"parameters":[{"name":"id","type":"ByteArray"},{"name":"key","type":"ByteArray"},{"name":"val","type":"ByteArray"}],"returntype":"Void","safe":false},{"name":"snapshot","offset":2599,"parameters":[{"name":"diff","type":"Integer"}],"returntype":"Array","safe":true},{"name":"snapshotByEpoch","offset":3195,"parameters":[{"name":"epoch","type":"Integer"}],"returntype":"Array","safe":true},{"name":"subscribeForNewEpoch","offset":3411,"parameters":[{"name":"contract","type":"Hash160"}],"returntype":"Void","safe":false},{"name":"update","offset":1562,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"updateSnapshotCount","offset":2753,"parameters":[{"name":"count","type":"Integer"}],"returntype":"Void","safe":false},{"name":"updateState","offset":2027,"parameters":[{"name":"state","type":"Integer"},{"name":"publicKey","type":"PublicKey"}],"returntype":"Void","safe":false},{"name":"updateStateIR","offset":2103,"parameters":[{"name":"state","type":"Integer"},{"name":"publicKey","type":"PublicKey"}],"returntype":"Void","safe":false},{"name":"version","offset":3797,"parameters":[],"returntype":"Integer","safe":true}],"events":[{"name":"AddPeerSuccess","parameters":[{"name":"publicKey","type":"PublicKey"}]},{"name":"UpdateStateSuccess","parameters":[{"name":"publicKey","type":"PublicKey"},{"name":"state","type":"Integer"}]},{"name":"NewEpoch","parameters":[{"name":"epoch","type":"Integer"}]},{"name":"NewEpochSubscription","parameters":[{"name":"contract","type":"Hash160"}]}]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","newEpoch"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/07-netmap.nef b/contracts/07-netmap.nef index bd4c590a3e..7124384e83 100755 Binary files a/contracts/07-netmap.nef and b/contracts/07-netmap.nef differ diff --git a/contracts/08-alphabet.manifest.json b/contracts/08-alphabet.manifest.json index ec361e6622..3059096ee5 100755 --- a/contracts/08-alphabet.manifest.json +++ b/contracts/08-alphabet.manifest.json @@ -1 +1 @@ -{"name":"NeoFS Alphabet","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":35,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"emit","offset":2900,"parameters":[],"returntype":"Void","safe":false},{"name":"gas","offset":2721,"parameters":[],"returntype":"Integer","safe":true},{"name":"name","offset":3531,"parameters":[],"returntype":"String","safe":true},{"name":"neo","offset":2735,"parameters":[],"returntype":"Integer","safe":true},{"name":"onNEP17Payment","offset":914,"parameters":[{"name":"from","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"update","offset":2589,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":3547,"parameters":[],"returntype":"Integer","safe":true},{"name":"vote","offset":3359,"parameters":[{"name":"epoch","type":"Integer"},{"name":"candidates","type":"Array"}],"returntype":"Void","safe":false}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","transfer","vote"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file +{"name":"NeoFS Alphabet","abi":{"methods":[{"name":"_initialize","offset":0,"parameters":[],"returntype":"Void","safe":false},{"name":"_deploy","offset":35,"parameters":[{"name":"data","type":"Any"},{"name":"isUpdate","type":"Boolean"}],"returntype":"Void","safe":false},{"name":"emit","offset":2810,"parameters":[],"returntype":"Void","safe":false},{"name":"gas","offset":2631,"parameters":[],"returntype":"Integer","safe":true},{"name":"name","offset":3441,"parameters":[],"returntype":"String","safe":true},{"name":"neo","offset":2645,"parameters":[],"returntype":"Integer","safe":true},{"name":"onNEP17Payment","offset":1127,"parameters":[{"name":"from","type":"Hash160"},{"name":"amount","type":"Integer"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"update","offset":2499,"parameters":[{"name":"script","type":"ByteArray"},{"name":"manifest","type":"ByteArray"},{"name":"data","type":"Any"}],"returntype":"Void","safe":false},{"name":"version","offset":3457,"parameters":[],"returntype":"Integer","safe":true},{"name":"vote","offset":3269,"parameters":[{"name":"epoch","type":"Integer"},{"name":"candidates","type":"Array"}],"returntype":"Void","safe":false}],"events":[]},"features":{},"groups":[],"permissions":[{"contract":"*","methods":["update","transfer","vote"]}],"supportedstandards":[],"trusts":[],"extra":null} \ No newline at end of file diff --git a/contracts/08-alphabet.nef b/contracts/08-alphabet.nef index 2e4bb372af..387398427c 100755 Binary files a/contracts/08-alphabet.nef and b/contracts/08-alphabet.nef differ diff --git a/docs/deploy.md b/docs/deploy.md index 40f23945f2..f4882f9283 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -89,16 +89,12 @@ NiMKabp3ddi3xShmLAXhTfbnuWb4cSJT6E (1 out of 1 multisig contract): Put the list of public keys into `ProtocolConfiguration.StandbyCommittee` section. Specify the wallet path and the password in `ApplicationConfiguration.P2PNotary` -and `ApplicationConfiguration.UnlockWallet` sections. If config includes -`ProtocolConfiguration.NativeActivations` section, add notary -contract `Notary: [0]`. +and `ApplicationConfiguration.UnlockWallet` sections. ```yaml ProtocolConfiguration: StandbyCommittee: - 02c1cc85f9c856dbe2d02017349bcb7b4e5defa78b8056a09b3240ba2a8c078869 - NativeActivations: - Notary: [0] ApplicationConfiguration: P2PNotary: Enabled: true diff --git a/go.mod b/go.mod index 1d92622312..4b41ec1279 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ require ( github.com/nats-io/nats.go v1.31.0 github.com/nspcc-dev/hrw/v2 v2.0.0 github.com/nspcc-dev/locode-db v0.5.0 - github.com/nspcc-dev/neo-go v0.103.1 + github.com/nspcc-dev/neo-go v0.104.0 github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 - github.com/nspcc-dev/neofs-contract v0.18.0 + github.com/nspcc-dev/neofs-contract v0.19.1 github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20231121125354-d72d76ccb0ba github.com/nspcc-dev/tzhash v1.7.1 github.com/olekukonko/tablewriter v0.0.5 @@ -73,8 +73,8 @@ require ( github.com/nats-io/nkeys v0.4.6 // indirect github.com/nats-io/nuid v1.0.1 // indirect github.com/nspcc-dev/dbft v0.0.0-20230515113611-25db6ba61d5c // indirect - github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 // indirect - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 // indirect + github.com/nspcc-dev/go-ordered-json v0.0.0-20231123160306-3374ff1e7a3c // indirect + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231121104256-0493ddbd70b2 // indirect github.com/nspcc-dev/neofs-crypto v0.4.0 // indirect github.com/nspcc-dev/rfc6979 v0.2.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect @@ -100,7 +100,7 @@ require ( golang.org/x/net v0.17.0 // indirect golang.org/x/sync v0.3.0 // indirect golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect gopkg.in/ini.v1 v1.67.0 // indirect lukechampine.com/blake3 v1.1.7 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index deeee68e9c..13ae4d60b4 100644 --- a/go.sum +++ b/go.sum @@ -241,20 +241,20 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nspcc-dev/dbft v0.0.0-20230515113611-25db6ba61d5c h1:uyK5aLbAhrnZtnvobJLN24gGUrlxIJAAFqiWl+liZuo= github.com/nspcc-dev/dbft v0.0.0-20230515113611-25db6ba61d5c/go.mod h1:kjBC9F8L25GR+kIHy/1KgG/KfcoGnVwIiyovgq1uszk= -github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaFCKt1pQJd7PXoMJabZWK9ejjbLOVrkl/lOUmshg= -github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= +github.com/nspcc-dev/go-ordered-json v0.0.0-20231123160306-3374ff1e7a3c h1:OOQeE613BH93ICPq3eke5N78gWNeMjcBWkmD2NKyXVg= +github.com/nspcc-dev/go-ordered-json v0.0.0-20231123160306-3374ff1e7a3c/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= github.com/nspcc-dev/hrw/v2 v2.0.0 h1:SK6BVuuVN0LoR+ESayXS1T9D3cMRUxIFY7Au0G1wdlw= github.com/nspcc-dev/hrw/v2 v2.0.0/go.mod h1:BGU4YsuoFXjQddsCfUXpq5uNr2A8W4PrWbiljdD/TpU= github.com/nspcc-dev/locode-db v0.5.0 h1:4tZq8zONXCroVpg5Y6VH9YSx+3XudTy/yq4wScO7I/c= github.com/nspcc-dev/locode-db v0.5.0/go.mod h1:M+v8C+t9vwYbIVEdTPX/0w2LFRY+FJnYbVUdrzq7iWQ= -github.com/nspcc-dev/neo-go v0.103.1 h1:BfRBceHUu8jSc1KQy7CzmQ/pa+xzAmgcyteGf0/IGgM= -github.com/nspcc-dev/neo-go v0.103.1/go.mod h1:MD7MPiyshUwrE5n1/LzxeandbItaa/iLW/bJb6gNs/U= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go v0.104.0 h1:FGj3Z46yABcFIAI1SCLd1jQSoh+B00h/2VAgEgY1JKQ= +github.com/nspcc-dev/neo-go v0.104.0/go.mod h1:omsUK5PAtG2/nQ3/evs95QEg3wtkj3LH53e0NKtXVwQ= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231121104256-0493ddbd70b2 h1:hPVF8iMmsQ15GSemj1ma6C9BkwfAugEXsUAVTEniK5M= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231121104256-0493ddbd70b2/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0/go.mod h1:DRIr0Ic1s+6QgdqmNFNLIqMqd7lNMJfYwkczlm1hDtM= -github.com/nspcc-dev/neofs-contract v0.18.0 h1:9g50b16s0mQFFskG93yRSWh4KL7yYOW+xjEvA0WGM/s= -github.com/nspcc-dev/neofs-contract v0.18.0/go.mod h1:UQr1rUjg0eibLwJd6vfsJJEUBnmRysCg8XQd1HYiS2w= +github.com/nspcc-dev/neofs-contract v0.19.1 h1:U1Uh+MlzfkalO0kRJ2pADZyHrmAOroC6KLFjdWnTNR0= +github.com/nspcc-dev/neofs-contract v0.19.1/go.mod h1:ZOGouuwuHpgvYkx/LCGufGncIzEUhYEO18LL4cWEbyw= github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= github.com/nspcc-dev/neofs-crypto v0.4.0/go.mod h1:6XJ8kbXgOfevbI2WMruOtI+qUJXNwSGM/E9eClXxPHs= github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20231121125354-d72d76ccb0ba h1:dQDBBqmT2rlJGgkeeF3UurB3VgG7buMHDHcz5UQ3bro= @@ -296,7 +296,7 @@ github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -641,8 +641,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/pkg/innerring/config.go b/pkg/innerring/config.go index 474b2eb3eb..ea6f1951ab 100644 --- a/pkg/innerring/config.go +++ b/pkg/innerring/config.go @@ -10,7 +10,6 @@ import ( "time" "github.com/nspcc-dev/neo-go/pkg/config/netmode" - "github.com/nspcc-dev/neo-go/pkg/core/native/nativenames" "github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neofs-node/pkg/innerring/internal/blockchain" @@ -125,65 +124,6 @@ func parseBlockchainConfig(v *viper.Viper, _logger *zap.Logger) (c blockchain.Co } } - const nativeActivationsKey = rootSection + ".native_activations" - if v.IsSet(nativeActivationsKey) { - requiredContracts := []string{ - nativenames.Management, - nativenames.Ledger, - nativenames.Neo, - nativenames.Gas, - nativenames.Policy, - nativenames.Oracle, - nativenames.Designation, - nativenames.Notary, - nativenames.CryptoLib, - nativenames.StdLib, - } - c.NativeActivations = make(map[string][]uint32) - err = parseConfigMap(v, nativeActivationsKey, "native update histories", func(name string, val interface{}) error { - supported := false - for i := range requiredContracts { - // TODO: viper lowers YAML keys, so, for example, 'NativeContract' becomes 'nativecontract' - // Track https://github.com/spf13/viper/issues/1014. Until then, keep track of - // new contracts in nativenames package. - supported = name == strings.ToLower(requiredContracts[i]) - if supported { - name = requiredContracts[i] - break - } - } - if !supported { - return fmt.Errorf("unsupported Neo native contract name '%s'", name) - } - rawHeights, err := cast.ToSliceE(val) - if err != nil { - return fmt.Errorf("cast value to array '%s': %w", name, err) - } else if len(rawHeights) == 0 { - return fmt.Errorf("empty array '%s'", name) - } - heights := make([]uint32, len(rawHeights)) - for i := range rawHeights { - u64, err := cast.ToUint64E(rawHeights[i]) - if err != nil { - return fmt.Errorf("cast element to unsigned integer '%s' #%d: %w", name, i, err) - } else if u64 > math.MaxUint32 { - return fmt.Errorf("value overflows limit %v", u64) - } - heights[i] = uint32(u64) - } - c.NativeActivations[name] = heights - return nil - }) - if err != nil { - return c, err - } - for i := range requiredContracts { - if _, ok := c.NativeActivations[requiredContracts[i]]; !ok { - return c, fmt.Errorf("missing required Neo native contract name '%s' in '%s'", requiredContracts[i], nativeActivationsKey) - } - } - } - const rpcSection = rootSection + ".rpc" if v.IsSet(rpcSection) { c.RPC.Addresses, err = parseConfigAddressesTCP(v, rpcSection+".listen", "network addresses to listen insecure Neo RPC on") diff --git a/pkg/innerring/config_test.go b/pkg/innerring/config_test.go index 74d9f59def..7a5968ea59 100644 --- a/pkg/innerring/config_test.go +++ b/pkg/innerring/config_test.go @@ -8,7 +8,6 @@ import ( "testing" "time" - "github.com/nspcc-dev/neo-go/pkg/core/native/nativenames" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neofs-node/pkg/innerring/internal/blockchain" "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap" @@ -42,17 +41,6 @@ const validBlockchainConfigOptions = ` validators_history: 2: 3 10: 7 - native_activations: - ContractManagement: [0, 1] - LedgerContract: [2] - NeoToken: [3] - GasToken: [4] - PolicyContract: [5] - OracleContract: [6] - RoleManagement: [7] - Notary: [8] - CryptoLib: [9] - StdLib: [10] rpc: listen: - localhost:30000 @@ -206,18 +194,6 @@ func TestParseBlockchainConfig(t *testing.T) { 2: 3, 10: 7, }, - NativeActivations: map[string][]uint32{ - nativenames.Management: {0, 1}, - nativenames.Ledger: {2}, - nativenames.Neo: {3}, - nativenames.Gas: {4}, - nativenames.Policy: {5}, - nativenames.Oracle: {6}, - nativenames.Designation: {7}, - nativenames.Notary: {8}, - nativenames.CryptoLib: {9}, - nativenames.StdLib: {10}, - }, }, c) }) @@ -275,12 +251,6 @@ func TestParseBlockchainConfig(t *testing.T) { {kvF("validators_history", map[string]interface{}{"-1": 1})}, {kvF("validators_history", map[string]interface{}{"1": -1})}, {kvF("validators_history", map[string]interface{}{"1": math.MaxInt32 + 1})}, - {kvF("native_activations", map[string]interface{}{"1": ""})}, - {kvF("native_activations", map[string]interface{}{strings.ToLower(nativenames.Gas): "not an array"})}, - {kvF("native_activations", map[string]interface{}{strings.ToLower(nativenames.Gas): []interface{}{}})}, - {kvF("native_activations", map[string]interface{}{strings.ToLower(nativenames.Gas): []interface{}{"not a number"}})}, - {kvF("native_activations", map[string]interface{}{strings.ToLower(nativenames.Gas): []interface{}{-1}})}, - {kvF("native_activations", map[string]interface{}{strings.ToLower(nativenames.Gas): []interface{}{math.MaxUint32 + 1}})}, {kvF("rpc.listen", []string{"not a TCP address"})}, {kvF("rpc.listen", []string{"127.0.0.1"})}, // missing port {kvF("rpc.tls.enabled", true), kvF("rpc.tls.cert_file", "")}, // enabled but no cert file is provided @@ -351,50 +321,6 @@ func TestParseBlockchainConfig(t *testing.T) { require.NoError(t, err) require.Equal(t, blockchain.InMemory(), c.Storage) }) - - t.Run("native activations", func(t *testing.T) { - names := []string{ - nativenames.Management, - nativenames.Ledger, - nativenames.Neo, - nativenames.Gas, - nativenames.Policy, - nativenames.Oracle, - nativenames.Designation, - nativenames.Notary, - nativenames.CryptoLib, - nativenames.StdLib, - } - - v := newValidBlockchainConfig(t, fullConfig) - - setI := func(name string, i int) { - v.Set("morph.consensus.native_activations."+strings.ToLower(name), []interface{}{i}) - } - - for i := range names { - setI(names[i], i) - } - - c, err := parseBlockchainConfig(v, _logger) - require.NoError(t, err) - - for i := range names { - v, ok := c.NativeActivations[names[i]] - require.True(t, ok, names[i]) - require.ElementsMatch(t, []uint32{uint32(i)}, v, names[i]) - } - - resetConfig(t, v, "morph.consensus.native_activations."+strings.ToLower(names[0])) - _, err = parseBlockchainConfig(v, _logger) - require.Error(t, err) - - setI(names[0], 0) - badName := names[0] + "1" // almost definitely incorrect - setI(badName, 0) - _, err = parseBlockchainConfig(v, _logger) - require.Error(t, err) - }) }) } diff --git a/pkg/innerring/internal/blockchain/blockchain.go b/pkg/innerring/internal/blockchain/blockchain.go index 27a843d21f..85aff39ec9 100644 --- a/pkg/innerring/internal/blockchain/blockchain.go +++ b/pkg/innerring/internal/blockchain/blockchain.go @@ -12,7 +12,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/config/netmode" "github.com/nspcc-dev/neo-go/pkg/consensus" "github.com/nspcc-dev/neo-go/pkg/core" - "github.com/nspcc-dev/neo-go/pkg/core/native/nativenames" "github.com/nspcc-dev/neo-go/pkg/core/storage" "github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig" "github.com/nspcc-dev/neo-go/pkg/core/transaction" @@ -239,13 +238,6 @@ type Config struct { // Optional: by default Committee size is used. Each value must not be greater // than math.MaxInt32. ValidatorsHistory map[uint32]uint32 - - // Chronology of native contracts updates. Maps name of Neo native contract to - // chain heights. - // - // Optional: by default, all native contracts are active from genesis block. - // Keys must be valid native names. Values must not be empty. - NativeActivations map[string][]uint32 } // New returns new Blockchain configured by the specified Config. New panics if @@ -288,14 +280,6 @@ func New(cfg Config) (res *Blockchain, err error) { } } - for name, heights := range cfg.NativeActivations { - if !nativenames.IsValid(name) { - panic(fmt.Sprintf("invalid native name %s", name)) - } else if len(heights) == 0 { - panic(fmt.Sprintf("empty height list %s", name)) - } - } - if cfg.Logger == nil { cfg.Logger = zap.NewNop() } @@ -349,7 +333,6 @@ func New(cfg Config) (res *Blockchain, err error) { } else { cfgBaseProto.ValidatorsCount = uint32(len(standByCommittee)) } - cfgBaseProto.NativeUpdateHistories = cfg.NativeActivations cfgBaseApp := &cfgBase.ApplicationConfiguration cfgBaseApp.Relay = true diff --git a/pkg/morph/deploy/contracts.go b/pkg/morph/deploy/contracts.go index 5e6ca4375b..dc1f89b059 100644 --- a/pkg/morph/deploy/contracts.go +++ b/pkg/morph/deploy/contracts.go @@ -68,11 +68,6 @@ type syncNeoFSContractPrm struct { // Ignored if tryDeploy is unset. buildExtraDeployArgs func() ([]interface{}, error) - // constructor of extra arguments to be passed into method updating the - // contract. If returns both nil, no data is passed (noExtraUpdateArgs may be - // used). - buildExtraUpdateArgs func() ([]interface{}, error) - // address of the Proxy contract deployed in the blockchain. The contract // pays for update transactions. proxyContract util.Uint160 @@ -280,13 +275,6 @@ func syncNeoFSContract(ctx context.Context, prm syncNeoFSContractPrm) (util.Uint return onChainState.Hash, nil } } else { - extraUpdateArgs, err := prm.buildExtraUpdateArgs() - if err != nil { - l.Error("failed to prepare build extra arguments for the contract update, will try again later", - zap.Error(err)) - continue - } - if prm.isProxy && proxyCommitteeActor == nil { err = initProxyCommitteeActor(onChainState.Hash) if err != nil { @@ -295,7 +283,7 @@ func syncNeoFSContract(ctx context.Context, prm syncNeoFSContractPrm) (util.Uint } tx, err := proxyCommitteeActor.MakeTunedCall(onChainState.Hash, methodUpdate, nil, updateTxModifier, - bLocalNEF, jLocalManifest, extraUpdateArgs) + bLocalNEF, jLocalManifest, nil) if err != nil { if isErrContractAlreadyUpdated(err) { l.Info("the contract is unchanged or has already been updated") diff --git a/pkg/morph/deploy/deploy.go b/pkg/morph/deploy/deploy.go index 14815b9202..588290a627 100644 --- a/pkg/morph/deploy/deploy.go +++ b/pkg/morph/deploy/deploy.go @@ -375,7 +375,6 @@ func Deploy(ctx context.Context, prm Prm) error { syncPrm.localManifest = prm.ProxyContract.Common.Manifest syncPrm.domainName = domainProxy syncPrm.buildExtraDeployArgs = noExtraDeployArgs - syncPrm.buildExtraUpdateArgs = noExtraUpdateArgs syncPrm.isProxy = true prm.Logger.Info("synchronizing Proxy contract with the chain...") @@ -431,17 +430,16 @@ func Deploy(ctx context.Context, prm Prm) error { prm.Logger.Info("updating on-chain NNS contract...") err = updateNNSContract(ctx, updateNNSContractPrm{ - logger: prm.Logger, - blockchain: prm.Blockchain, - neoFS: prm.NeoFS, - monitor: monitor, - localAcc: prm.LocalAccount, - localNEF: prm.NNS.Common.NEF, - localManifest: prm.NNS.Common.Manifest, - systemEmail: prm.NNS.SystemEmail, - committee: committee, - buildExtraUpdateArgs: noExtraUpdateArgs, - proxyContract: proxyContractAddress, + logger: prm.Logger, + blockchain: prm.Blockchain, + neoFS: prm.NeoFS, + monitor: monitor, + localAcc: prm.LocalAccount, + localNEF: prm.NNS.Common.NEF, + localManifest: prm.NNS.Common.Manifest, + systemEmail: prm.NNS.SystemEmail, + committee: committee, + proxyContract: proxyContractAddress, }) if err != nil { return fmt.Errorf("update NNS contract on the chain: %w", err) @@ -454,9 +452,6 @@ func Deploy(ctx context.Context, prm Prm) error { syncPrm.localManifest = prm.AuditContract.Common.Manifest syncPrm.domainName = domainAudit syncPrm.buildExtraDeployArgs = noExtraDeployArgs - syncPrm.buildExtraUpdateArgs = func() ([]interface{}, error) { - return []interface{}{notaryDisabledExtraUpdateArg}, nil - } prm.Logger.Info("synchronizing Audit contract with the chain...") @@ -472,9 +467,6 @@ func Deploy(ctx context.Context, prm Prm) error { syncPrm.localManifest = prm.BalanceContract.Common.Manifest syncPrm.domainName = domainBalance syncPrm.buildExtraDeployArgs = noExtraDeployArgs - syncPrm.buildExtraUpdateArgs = func() ([]interface{}, error) { - return []interface{}{notaryDisabledExtraUpdateArg}, nil - } prm.Logger.Info("synchronizing Balance contract with the chain...") @@ -490,9 +482,6 @@ func Deploy(ctx context.Context, prm Prm) error { syncPrm.localManifest = prm.ReputationContract.Common.Manifest syncPrm.domainName = domainReputation syncPrm.buildExtraDeployArgs = noExtraDeployArgs - syncPrm.buildExtraUpdateArgs = func() ([]interface{}, error) { - return []interface{}{notaryDisabledExtraUpdateArg}, nil - } prm.Logger.Info("synchronizing Reputation contract with the chain...") @@ -526,9 +515,6 @@ func Deploy(ctx context.Context, prm Prm) error { netmapContractAddress, }, nil } - syncPrm.buildExtraUpdateArgs = func() ([]interface{}, error) { - return []interface{}{notaryDisabledExtraUpdateArg}, nil - } prm.Logger.Info("synchronizing NeoFSID contract with the chain...") @@ -558,9 +544,6 @@ func Deploy(ctx context.Context, prm Prm) error { domainContainers, }, nil } - syncPrm.buildExtraUpdateArgs = func() ([]interface{}, error) { - return []interface{}{notaryDisabledExtraUpdateArg}, nil - } prm.Logger.Info("synchronizing Container contract with the chain...") @@ -605,9 +588,6 @@ func Deploy(ctx context.Context, prm Prm) error { netConfig, }, nil } - syncPrm.buildExtraUpdateArgs = func() ([]interface{}, error) { - return []interface{}{notaryDisabledExtraUpdateArg, util.Uint160{}, util.Uint160{}, []interface{}(nil), []interface{}(nil)}, nil - } prm.Logger.Info("synchronizing Netmap contract with the chain...") @@ -621,9 +601,6 @@ func Deploy(ctx context.Context, prm Prm) error { // 8. Alphabet syncPrm.localNEF = prm.AlphabetContract.Common.NEF syncPrm.localManifest = prm.AlphabetContract.Common.Manifest - syncPrm.buildExtraUpdateArgs = func() ([]interface{}, error) { - return []interface{}{notaryDisabledExtraUpdateArg}, nil - } var alphabetContracts []util.Uint160 @@ -674,8 +651,6 @@ func Deploy(ctx context.Context, prm Prm) error { return nil } -func noExtraUpdateArgs() ([]interface{}, error) { return nil, nil } - func noExtraDeployArgs() ([]interface{}, error) { return nil, nil } func encodeUintConfig(v uint64) []byte { diff --git a/pkg/morph/deploy/nns.go b/pkg/morph/deploy/nns.go index b907ddb3a7..86209b94b6 100644 --- a/pkg/morph/deploy/nns.go +++ b/pkg/morph/deploy/nns.go @@ -241,11 +241,6 @@ type updateNNSContractPrm struct { committee keys.PublicKeys - // constructor of extra arguments to be passed into method updating the - // contract. If returns both nil, no data is passed (noExtraUpdateArgs may be - // used). - buildExtraUpdateArgs func() ([]interface{}, error) - // address of the Proxy contract deployed in the blockchain. The contract // pays for update transactions. proxyContract util.Uint160 @@ -301,18 +296,11 @@ func updateNNSContract(ctx context.Context, prm updateNNSContractPrm) error { return errors.New("missing required NNS contract on the chain") } - extraUpdateArgs, err := prm.buildExtraUpdateArgs() - if err != nil { - prm.logger.Error("failed to prepare build extra arguments for NNS contract update, will try again later", - zap.Error(err)) - continue - } - // we pre-check 'already updated' case via MakeCall in order to not potentially // wait for previously sent transaction to be expired (condition below) and // immediately succeed tx, err := committeeActor.MakeTunedCall(nnsOnChainState.Hash, methodUpdate, nil, updateTxModifier, - bLocalNEF, jLocalManifest, extraUpdateArgs) + bLocalNEF, jLocalManifest, nil) if err != nil { if isErrContractAlreadyUpdated(err) { prm.logger.Info("NNS contract is unchanged or has already been updated, skip")