From 960e3c219e99254288d73b60404015b1bbe778a8 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Fri, 14 Apr 2023 13:41:40 +0300 Subject: [PATCH] [#247] config, doc: Drop reputation references Signed-off-by: Pavel Karpy --- cmd/frostfs-adm/docs/deploy.md | 1 - .../internal/modules/morph/initialize_deploy.go | 5 ----- cmd/frostfs-ir/defaults.go | 1 - cmd/frostfs-node/config/contracts/config.go | 9 --------- cmd/frostfs-node/config/contracts/config_test.go | 6 ------ config/example/ir.env | 2 -- config/example/ir.yaml | 2 -- config/example/node.env | 1 - config/example/node.json | 1 - config/example/node.yaml | 1 - config/mainnet/config.yml | 1 - config/testnet/config.yml | 1 - docs/storage-node-configuration.md | 2 -- pkg/innerring/contracts.go | 2 -- 14 files changed, 35 deletions(-) diff --git a/cmd/frostfs-adm/docs/deploy.md b/cmd/frostfs-adm/docs/deploy.md index a1923bb2..aead65fe 100644 --- a/cmd/frostfs-adm/docs/deploy.md +++ b/cmd/frostfs-adm/docs/deploy.md @@ -147,7 +147,6 @@ NNS: Set container.frostfs -> cae60bdd689d185901e495352d0247752ce50846 NNS: Set frostfsid.frostfs -> c421fb60a3895865a8f24d197d6a80ef686041d2 NNS: Set netmap.frostfs -> 894eb854632f50fb124412ce7951ebc00763525e NNS: Set proxy.frostfs -> ac6e6fe4b373d0ca0ca4969d1e58fa0988724e7d -NNS: Set reputation.frostfs -> 6eda57c9d93d990573646762d1fea327ce41191f Waiting for transactions to persist... ``` diff --git a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go index 9e473463..156b1f78 100644 --- a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go +++ b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go @@ -47,7 +47,6 @@ const ( frostfsIDContract = "frostfsid" netmapContract = "netmap" proxyContract = "proxy" - reputationContract = "reputation" subnetContract = "subnet" ) @@ -64,7 +63,6 @@ var ( frostfsIDContract, netmapContract, proxyContract, - reputationContract, subnetContract, } @@ -81,8 +79,6 @@ var ( netmap.AuditFeeConfig, netmap.ContainerFeeConfig, netmap.ContainerAliasFeeConfig, - netmap.EtIterationsConfig, - netmap.EtAlphaConfig, netmap.BasicIncomeRateConfig, netmap.IrCandidateFeeConfig, netmap.WithdrawFeeConfig, @@ -602,7 +598,6 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []an configParam) case proxyContract: items = nil - case reputationContract: case subnetContract: default: panic(fmt.Sprintf("invalid contract name: %s", ctrName)) diff --git a/cmd/frostfs-ir/defaults.go b/cmd/frostfs-ir/defaults.go index 57959c1c..837c1f17 100644 --- a/cmd/frostfs-ir/defaults.go +++ b/cmd/frostfs-ir/defaults.go @@ -163,7 +163,6 @@ func setContractsDefaults(cfg *viper.Viper) { cfg.SetDefault("contracts.audit", "") cfg.SetDefault("contracts.proxy", "") cfg.SetDefault("contracts.processing", "") - cfg.SetDefault("contracts.reputation", "") cfg.SetDefault("contracts.subnet", "") cfg.SetDefault("contracts.proxy", "") } diff --git a/cmd/frostfs-node/config/contracts/config.go b/cmd/frostfs-node/config/contracts/config.go index 0450d0d5..c5f14f3c 100644 --- a/cmd/frostfs-node/config/contracts/config.go +++ b/cmd/frostfs-node/config/contracts/config.go @@ -38,15 +38,6 @@ func Container(c *config.Config) util.Uint160 { return contractAddress(c, "container") } -// Reputation returnsthe value of "reputation" config parameter -// from "contracts" section. -// -// Returns zero filled script hash if the value is not set. -// Throws panic if the value is not a 20-byte LE hex-encoded string. -func Reputation(c *config.Config) util.Uint160 { - return contractAddress(c, "reputation") -} - // Proxy returnsthe value of "proxy" config parameter // from "contracts" section. // diff --git a/cmd/frostfs-node/config/contracts/config_test.go b/cmd/frostfs-node/config/contracts/config_test.go index 93956d6b..d816ea1e 100644 --- a/cmd/frostfs-node/config/contracts/config_test.go +++ b/cmd/frostfs-node/config/contracts/config_test.go @@ -18,7 +18,6 @@ func TestContractsSection(t *testing.T) { require.Equal(t, emptyHash, contractsconfig.Balance(empty)) require.Equal(t, emptyHash, contractsconfig.Container(empty)) require.Equal(t, emptyHash, contractsconfig.Netmap(empty)) - require.Equal(t, emptyHash, contractsconfig.Reputation(empty)) require.Equal(t, emptyHash, contractsconfig.Proxy(empty)) }) @@ -33,9 +32,6 @@ func TestContractsSection(t *testing.T) { expNetmap, err := util.Uint160DecodeStringLE("0cce9e948dca43a6b592efe59ddb4ecb89bdd9ca") require.NoError(t, err) - expReputation, err := util.Uint160DecodeStringLE("441995f631c1da2b133462b71859494a5cd45e90") - require.NoError(t, err) - expProxy, err := util.Uint160DecodeStringLE("ad7c6b55b737b696e5c82c85445040964a03e97f") require.NoError(t, err) @@ -43,13 +39,11 @@ func TestContractsSection(t *testing.T) { balance := contractsconfig.Balance(c) container := contractsconfig.Container(c) netmap := contractsconfig.Netmap(c) - reputation := contractsconfig.Reputation(c) proxy := contractsconfig.Proxy(c) require.Equal(t, expBalance, balance) require.Equal(t, expConatiner, container) require.Equal(t, expNetmap, netmap) - require.Equal(t, expReputation, reputation) require.Equal(t, expProxy, proxy) } diff --git a/config/example/ir.env b/config/example/ir.env index 2ec82193..b7816dd7 100644 --- a/config/example/ir.env +++ b/config/example/ir.env @@ -49,7 +49,6 @@ FROSTFS_IR_WORKERS_BALANCE=10 FROSTFS_IR_WORKERS_CONTAINER=10 FROSTFS_IR_WORKERS_NEOFS=10 FROSTFS_IR_WORKERS_NETMAP=10 -FROSTFS_IR_WORKERS_REPUTATION=10 FROSTFS_IR_WORKERS_SUBNET=10 FROSTFS_IR_AUDIT_TIMEOUT_GET=5s @@ -75,7 +74,6 @@ FROSTFS_IR_CONTRACTS_CONTAINER=ed4a7a66fe3f9bfe50f214b49be8f215a3c886b6 FROSTFS_IR_CONTRACTS_NEOFSID=9f5866decbc751a099e74c7c7bc89f609201755a FROSTFS_IR_CONTRACTS_NETMAP=83c600c81d47a1b1b7cf58eb49ae7ee7240dc742 FROSTFS_IR_CONTRACTS_PROXY=abc8794bb40a21f2db5f21ae62741eb46c8cad1c -FROSTFS_IR_CONTRACTS_REPUTATION=d793b842ff0c103fe89e385069e82a27602135ff FROSTFS_IR_CONTRACTS_SUBNET=e9266864d3c562c6e17f2bb9cb1392aaa293d93a FROSTFS_IR_CONTRACTS_ALPHABET_AMOUNT=7 FROSTFS_IR_CONTRACTS_ALPHABET_AZ=c1d211fceeb4b1dc76b8e4054d11fdf887e418ea diff --git a/config/example/ir.yaml b/config/example/ir.yaml index 3dca0017..0e1b12bf 100644 --- a/config/example/ir.yaml +++ b/config/example/ir.yaml @@ -83,7 +83,6 @@ workers: container: 10 # Number of workers to process events from container contract in parallel frostfs: 10 # Number of workers to process events from frostfs contracts in parallel netmap: 10 # Number of workers to process events from netmap contract in parallel - reputation: 10 # Number of workers to process events from reputation contract in parallel subnet: 10 # Number of workers to process events from subnet contract in parallel audit: @@ -117,7 +116,6 @@ contracts: frostfsid: 9f5866decbc751a099e74c7c7bc89f609201755a # Optional: override address of frostfsid contract in sidechain netmap: 83c600c81d47a1b1b7cf58eb49ae7ee7240dc742 # Optional: override address of netmap contract in sidechain proxy: abc8794bb40a21f2db5f21ae62741eb46c8cad1c # Optional: override address of proxy contract in sidechain; ignore if notary is disabled in sidechain - reputation: d793b842ff0c103fe89e385069e82a27602135ff # Optional: override address of reputation contract in sidechain subnet: e9266864d3c562c6e17f2bb9cb1392aaa293d93a # Optional: override address of subnet contract in sidechain alphabet: amount: 7 # Optional: override amount of alphabet contracts diff --git a/config/example/node.env b/config/example/node.env index a4088f75..b3fb4f9f 100644 --- a/config/example/node.env +++ b/config/example/node.env @@ -58,7 +58,6 @@ FROSTFS_CONTROL_GRPC_ENDPOINT=localhost:8090 FROSTFS_CONTRACTS_BALANCE=5263abba1abedbf79bb57f3e40b50b4425d2d6cd FROSTFS_CONTRACTS_CONTAINER=5d084790d7aa36cea7b53fe897380dab11d2cd3c FROSTFS_CONTRACTS_NETMAP=0cce9e948dca43a6b592efe59ddb4ecb89bdd9ca -FROSTFS_CONTRACTS_REPUTATION=441995f631c1da2b133462b71859494a5cd45e90 FROSTFS_CONTRACTS_PROXY=ad7c6b55b737b696e5c82c85445040964a03e97f # Morph chain section diff --git a/config/example/node.json b/config/example/node.json index 8cfb5bb6..9e2a0a48 100644 --- a/config/example/node.json +++ b/config/example/node.json @@ -96,7 +96,6 @@ "balance": "5263abba1abedbf79bb57f3e40b50b4425d2d6cd", "container": "5d084790d7aa36cea7b53fe897380dab11d2cd3c", "netmap": "0cce9e948dca43a6b592efe59ddb4ecb89bdd9ca", - "reputation": "441995f631c1da2b133462b71859494a5cd45e90", "proxy": "ad7c6b55b737b696e5c82c85445040964a03e97f" }, "morph": { diff --git a/config/example/node.yaml b/config/example/node.yaml index 0d71f0fd..54d77417 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -78,7 +78,6 @@ contracts: # side chain NEOFS contract script hashes; optional, override values balance: 5263abba1abedbf79bb57f3e40b50b4425d2d6cd container: 5d084790d7aa36cea7b53fe897380dab11d2cd3c netmap: 0cce9e948dca43a6b592efe59ddb4ecb89bdd9ca - reputation: 441995f631c1da2b133462b71859494a5cd45e90 proxy: ad7c6b55b737b696e5c82c85445040964a03e97f morph: diff --git a/config/mainnet/config.yml b/config/mainnet/config.yml index 2b240e0b..7db476e5 100644 --- a/config/mainnet/config.yml +++ b/config/mainnet/config.yml @@ -68,4 +68,3 @@ contracts: balance: dc1ec98d9d0c5f9dfade16144defe08cffc5ca55 container: 1b6e68d299b570e1cb7e86eadfdc06aa2e8e0cc5 netmap: 7c5bdb23e36cc7cce95bf42f3ab9e452c2501df1 - reputation: 7ad824fd1eeb1565be2cee3889214b9aa605d2fc diff --git a/config/testnet/config.yml b/config/testnet/config.yml index 416ba35e..76b36cdf 100644 --- a/config/testnet/config.yml +++ b/config/testnet/config.yml @@ -16,7 +16,6 @@ contracts: balance: e0420c216003747626670d1424569c17c79015bf container: 9dbd2b5e67568ed285c3d6f96bac4edf5e1efba0 netmap: d4b331639799e2958d4bc5b711b469d79de94e01 - reputation: 376c23a2ae1fad088c82046abb59984e3c4519d9 node: key: /node.key diff --git a/docs/storage-node-configuration.md b/docs/storage-node-configuration.md index 6ecd1590..30657730 100644 --- a/docs/storage-node-configuration.md +++ b/docs/storage-node-configuration.md @@ -113,7 +113,6 @@ contracts: balance: 5263abba1abedbf79bb57f3e40b50b4425d2d6cd container: 5d084790d7aa36cea7b53fe897380dab11d2cd3c netmap: 0cce9e948dca43a6b592efe59ddb4ecb89bdd9ca - reputation: 441995f631c1da2b133462b71859494a5cd45e90 proxy: ad7c6b55b737b696e5c82c85445040964a03e97f ``` @@ -123,7 +122,6 @@ contracts: | `balance` | `hash160` | | Balance contract hash. | | `container` | `hash160` | | Container contract hash. | | `netmap` | `hash160` | | Netmap contract hash. | -| `reputation` | `hash160` | | Reputation contract hash. | | `subnet` | `hash160` | | Subnet contract hash. | # `morph` section diff --git a/pkg/innerring/contracts.go b/pkg/innerring/contracts.go index c280eb4b..f723d350 100644 --- a/pkg/innerring/contracts.go +++ b/pkg/innerring/contracts.go @@ -18,7 +18,6 @@ type contracts struct { audit util.Uint160 // in morph proxy util.Uint160 // in morph processing util.Uint160 // in mainnet - reputation util.Uint160 // in morph subnet util.Uint160 // in morph frostfsID util.Uint160 // in morph @@ -61,7 +60,6 @@ func parseContracts(cfg *viper.Viper, morph *client.Client, withoutMainNet, with {"contracts.balance", client.NNSBalanceContractName, &result.balance}, {"contracts.container", client.NNSContainerContractName, &result.container}, {"contracts.audit", client.NNSAuditContractName, &result.audit}, - {"contracts.reputation", client.NNSReputationContractName, &result.reputation}, {"contracts.subnet", client.NNSSubnetworkContractName, &result.subnet}, {"contracts.frostfsid", client.NNSFrostFSIDContractName, &result.frostfsID}, }