From 19d180b510d0b8b291fe119000e8f5cbf957aa68 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 10 Jan 2023 15:50:17 +0300 Subject: [PATCH] [#11] Rename `neofs` contract to `frostfs` Signed-off-by: Evgenii Stratonikov --- .../internal/modules/morph/initialize_deploy.go | 8 ++++---- pkg/innerring/innerring.go | 4 ++-- pkg/innerring/processors/balance/process_assets.go | 4 ++-- pkg/innerring/processors/balance/processor.go | 2 +- pkg/innerring/processors/{neofs => frostfs}/handlers.go | 2 +- .../processors/{neofs => frostfs}/process_assets.go | 2 +- .../processors/{neofs => frostfs}/process_bind.go | 2 +- .../processors/{neofs => frostfs}/process_config.go | 2 +- pkg/innerring/processors/{neofs => frostfs}/processor.go | 2 +- pkg/innerring/processors/governance/process_update.go | 2 +- pkg/innerring/processors/governance/processor.go | 2 +- pkg/morph/client/{neofs => frostfs}/bind.go | 0 pkg/morph/client/{neofs => frostfs}/cheque.go | 0 pkg/morph/client/{neofs => frostfs}/client.go | 4 ++-- pkg/morph/event/{neofs => frostfs}/bind.go | 0 pkg/morph/event/{neofs => frostfs}/bind_test.go | 0 pkg/morph/event/{neofs => frostfs}/cheque.go | 0 pkg/morph/event/{neofs => frostfs}/cheque_test.go | 0 pkg/morph/event/{neofs => frostfs}/config.go | 0 pkg/morph/event/{neofs => frostfs}/config_test.go | 0 pkg/morph/event/{neofs => frostfs}/deposit.go | 0 pkg/morph/event/{neofs => frostfs}/deposit_test.go | 0 pkg/morph/event/{neofs => frostfs}/ir_update.go | 0 pkg/morph/event/{neofs => frostfs}/ir_update_test.go | 0 pkg/morph/event/{neofs => frostfs}/unbind.go | 0 pkg/morph/event/{neofs => frostfs}/unbind_test.go | 0 pkg/morph/event/{neofs => frostfs}/withdraw.go | 0 pkg/morph/event/{neofs => frostfs}/withdraw_test.go | 0 28 files changed, 18 insertions(+), 18 deletions(-) rename pkg/innerring/processors/{neofs => frostfs}/handlers.go (99%) rename pkg/innerring/processors/{neofs => frostfs}/process_assets.go (99%) rename pkg/innerring/processors/{neofs => frostfs}/process_bind.go (96%) rename pkg/innerring/processors/{neofs => frostfs}/process_config.go (98%) rename pkg/innerring/processors/{neofs => frostfs}/processor.go (99%) rename pkg/morph/client/{neofs => frostfs}/bind.go (100%) rename pkg/morph/client/{neofs => frostfs}/cheque.go (100%) rename pkg/morph/client/{neofs => frostfs}/client.go (95%) rename pkg/morph/event/{neofs => frostfs}/bind.go (100%) rename pkg/morph/event/{neofs => frostfs}/bind_test.go (100%) rename pkg/morph/event/{neofs => frostfs}/cheque.go (100%) rename pkg/morph/event/{neofs => frostfs}/cheque_test.go (100%) rename pkg/morph/event/{neofs => frostfs}/config.go (100%) rename pkg/morph/event/{neofs => frostfs}/config_test.go (100%) rename pkg/morph/event/{neofs => frostfs}/deposit.go (100%) rename pkg/morph/event/{neofs => frostfs}/deposit_test.go (100%) rename pkg/morph/event/{neofs => frostfs}/ir_update.go (100%) rename pkg/morph/event/{neofs => frostfs}/ir_update_test.go (100%) rename pkg/morph/event/{neofs => frostfs}/unbind.go (100%) rename pkg/morph/event/{neofs => frostfs}/unbind_test.go (100%) rename pkg/morph/event/{neofs => frostfs}/withdraw.go (100%) rename pkg/morph/event/{neofs => frostfs}/withdraw_test.go (100%) diff --git a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go index 1c80df007..ff14e87be 100644 --- a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go +++ b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go @@ -36,7 +36,7 @@ import ( const ( nnsContract = "nns" - neofsContract = "neofs" // not deployed in side-chain. + frostfsContract = "frostfs" // not deployed in side-chain. processingContract = "processing" // not deployed in side-chain. alphabetContract = "alphabet" auditContract = "audit" @@ -80,7 +80,7 @@ var ( } fullContractList = append([]string{ - neofsContract, + frostfsContract, processingContract, nnsContract, alphabetContract, @@ -519,13 +519,13 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []in items[0] = false // notaryDisabled is false switch ctrName { - case neofsContract: + case frostfsContract: items = append(items, c.Contracts[processingContract].Hash, keysParam, smartcontract.Parameter{}) case processingContract: - items = append(items, c.Contracts[neofsContract].Hash) + items = append(items, c.Contracts[frostfsContract].Hash) return items[1:] // no notary info case auditContract: items = append(items, c.Contracts[netmapContract].Hash) diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go index 30e1371e9..909dd9e69 100644 --- a/pkg/innerring/innerring.go +++ b/pkg/innerring/innerring.go @@ -13,8 +13,8 @@ import ( "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/audit" "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/balance" "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/container" + frostfs "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/frostfs" "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/governance" - frostfs "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/neofs" "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap" nodevalidator "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap/nodevalidation" addrvalidator "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap/nodevalidation/maddress" @@ -29,7 +29,7 @@ import ( auditClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/audit" balanceClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/balance" cntClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/container" - frostfsClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofs" + frostfsClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfs" "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap" repClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/reputation" diff --git a/pkg/innerring/processors/balance/process_assets.go b/pkg/innerring/processors/balance/process_assets.go index 63be70a07..68d7c8dc2 100644 --- a/pkg/innerring/processors/balance/process_assets.go +++ b/pkg/innerring/processors/balance/process_assets.go @@ -1,7 +1,7 @@ package balance import ( - neofscontract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofs" + frostfsContract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfs" balanceEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/balance" "go.uber.org/zap" ) @@ -14,7 +14,7 @@ func (bp *Processor) processLock(lock *balanceEvent.Lock) { return } - prm := neofscontract.ChequePrm{} + prm := frostfsContract.ChequePrm{} prm.SetID(lock.ID()) prm.SetUser(lock.User()) diff --git a/pkg/innerring/processors/balance/processor.go b/pkg/innerring/processors/balance/processor.go index 3013781fe..73eebbd93 100644 --- a/pkg/innerring/processors/balance/processor.go +++ b/pkg/innerring/processors/balance/processor.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - frostfscontract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofs" + frostfscontract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfs" "github.com/TrueCloudLab/frostfs-node/pkg/morph/event" balanceEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/balance" "github.com/TrueCloudLab/frostfs-node/pkg/util/logger" diff --git a/pkg/innerring/processors/neofs/handlers.go b/pkg/innerring/processors/frostfs/handlers.go similarity index 99% rename from pkg/innerring/processors/neofs/handlers.go rename to pkg/innerring/processors/frostfs/handlers.go index e5b1f091b..588e5b8c9 100644 --- a/pkg/innerring/processors/neofs/handlers.go +++ b/pkg/innerring/processors/frostfs/handlers.go @@ -4,7 +4,7 @@ import ( "encoding/hex" "github.com/TrueCloudLab/frostfs-node/pkg/morph/event" - frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/neofs" + frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs" "github.com/nspcc-dev/neo-go/pkg/util/slice" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/neofs/process_assets.go b/pkg/innerring/processors/frostfs/process_assets.go similarity index 99% rename from pkg/innerring/processors/neofs/process_assets.go rename to pkg/innerring/processors/frostfs/process_assets.go index aa752035e..d6330fac8 100644 --- a/pkg/innerring/processors/neofs/process_assets.go +++ b/pkg/innerring/processors/frostfs/process_assets.go @@ -2,7 +2,7 @@ package frostfs import ( "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/balance" - frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/neofs" + frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs" "github.com/nspcc-dev/neo-go/pkg/util" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/neofs/process_bind.go b/pkg/innerring/processors/frostfs/process_bind.go similarity index 96% rename from pkg/innerring/processors/neofs/process_bind.go rename to pkg/innerring/processors/frostfs/process_bind.go index 567f04c7f..e7641f394 100644 --- a/pkg/innerring/processors/neofs/process_bind.go +++ b/pkg/innerring/processors/frostfs/process_bind.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" - frostfs "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/neofs" + frostfs "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs" "github.com/TrueCloudLab/frostfs-sdk-go/user" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/util" diff --git a/pkg/innerring/processors/neofs/process_config.go b/pkg/innerring/processors/frostfs/process_config.go similarity index 98% rename from pkg/innerring/processors/neofs/process_config.go rename to pkg/innerring/processors/frostfs/process_config.go index a2e7e4c5e..05492e356 100644 --- a/pkg/innerring/processors/neofs/process_config.go +++ b/pkg/innerring/processors/frostfs/process_config.go @@ -2,7 +2,7 @@ package frostfs import ( nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap" - frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/neofs" + frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs" "go.uber.org/zap" ) diff --git a/pkg/innerring/processors/neofs/processor.go b/pkg/innerring/processors/frostfs/processor.go similarity index 99% rename from pkg/innerring/processors/neofs/processor.go rename to pkg/innerring/processors/frostfs/processor.go index 54c782539..3b052f134 100644 --- a/pkg/innerring/processors/neofs/processor.go +++ b/pkg/innerring/processors/frostfs/processor.go @@ -10,7 +10,7 @@ import ( "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap" "github.com/TrueCloudLab/frostfs-node/pkg/morph/event" - frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/neofs" + frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs" "github.com/TrueCloudLab/frostfs-node/pkg/util/logger" lru "github.com/hashicorp/golang-lru/v2" "github.com/nspcc-dev/neo-go/pkg/encoding/fixedn" diff --git a/pkg/innerring/processors/governance/process_update.go b/pkg/innerring/processors/governance/process_update.go index 1f59f8b4d..587e57533 100644 --- a/pkg/innerring/processors/governance/process_update.go +++ b/pkg/innerring/processors/governance/process_update.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/TrueCloudLab/frostfs-node/pkg/morph/client" - frostfscontract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofs" + frostfscontract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfs" nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/util" diff --git a/pkg/innerring/processors/governance/processor.go b/pkg/innerring/processors/governance/processor.go index cdafbbc71..1aa8c281a 100644 --- a/pkg/innerring/processors/governance/processor.go +++ b/pkg/innerring/processors/governance/processor.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/TrueCloudLab/frostfs-node/pkg/morph/client" - frostfscontract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofs" + frostfscontract "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfs" nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap" "github.com/TrueCloudLab/frostfs-node/pkg/morph/event" "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/rolemanagement" diff --git a/pkg/morph/client/neofs/bind.go b/pkg/morph/client/frostfs/bind.go similarity index 100% rename from pkg/morph/client/neofs/bind.go rename to pkg/morph/client/frostfs/bind.go diff --git a/pkg/morph/client/neofs/cheque.go b/pkg/morph/client/frostfs/cheque.go similarity index 100% rename from pkg/morph/client/neofs/cheque.go rename to pkg/morph/client/frostfs/cheque.go diff --git a/pkg/morph/client/neofs/client.go b/pkg/morph/client/frostfs/client.go similarity index 95% rename from pkg/morph/client/neofs/client.go rename to pkg/morph/client/frostfs/client.go index 2257c5665..1db7594b5 100644 --- a/pkg/morph/client/neofs/client.go +++ b/pkg/morph/client/frostfs/client.go @@ -10,14 +10,14 @@ import ( // Client is a wrapper over StaticClient // which makes calls with the names and arguments -// of the NeoFS contract. +// of the FrostFS contract. // // Working client must be created via constructor New. // Using the Client that has been created with new(Client) // expression (or just declaring a Client variable) is unsafe // and can lead to panic. type Client struct { - client *client.StaticClient // static NeoFS contract client + client *client.StaticClient // static FrostFS contract client } const ( diff --git a/pkg/morph/event/neofs/bind.go b/pkg/morph/event/frostfs/bind.go similarity index 100% rename from pkg/morph/event/neofs/bind.go rename to pkg/morph/event/frostfs/bind.go diff --git a/pkg/morph/event/neofs/bind_test.go b/pkg/morph/event/frostfs/bind_test.go similarity index 100% rename from pkg/morph/event/neofs/bind_test.go rename to pkg/morph/event/frostfs/bind_test.go diff --git a/pkg/morph/event/neofs/cheque.go b/pkg/morph/event/frostfs/cheque.go similarity index 100% rename from pkg/morph/event/neofs/cheque.go rename to pkg/morph/event/frostfs/cheque.go diff --git a/pkg/morph/event/neofs/cheque_test.go b/pkg/morph/event/frostfs/cheque_test.go similarity index 100% rename from pkg/morph/event/neofs/cheque_test.go rename to pkg/morph/event/frostfs/cheque_test.go diff --git a/pkg/morph/event/neofs/config.go b/pkg/morph/event/frostfs/config.go similarity index 100% rename from pkg/morph/event/neofs/config.go rename to pkg/morph/event/frostfs/config.go diff --git a/pkg/morph/event/neofs/config_test.go b/pkg/morph/event/frostfs/config_test.go similarity index 100% rename from pkg/morph/event/neofs/config_test.go rename to pkg/morph/event/frostfs/config_test.go diff --git a/pkg/morph/event/neofs/deposit.go b/pkg/morph/event/frostfs/deposit.go similarity index 100% rename from pkg/morph/event/neofs/deposit.go rename to pkg/morph/event/frostfs/deposit.go diff --git a/pkg/morph/event/neofs/deposit_test.go b/pkg/morph/event/frostfs/deposit_test.go similarity index 100% rename from pkg/morph/event/neofs/deposit_test.go rename to pkg/morph/event/frostfs/deposit_test.go diff --git a/pkg/morph/event/neofs/ir_update.go b/pkg/morph/event/frostfs/ir_update.go similarity index 100% rename from pkg/morph/event/neofs/ir_update.go rename to pkg/morph/event/frostfs/ir_update.go diff --git a/pkg/morph/event/neofs/ir_update_test.go b/pkg/morph/event/frostfs/ir_update_test.go similarity index 100% rename from pkg/morph/event/neofs/ir_update_test.go rename to pkg/morph/event/frostfs/ir_update_test.go diff --git a/pkg/morph/event/neofs/unbind.go b/pkg/morph/event/frostfs/unbind.go similarity index 100% rename from pkg/morph/event/neofs/unbind.go rename to pkg/morph/event/frostfs/unbind.go diff --git a/pkg/morph/event/neofs/unbind_test.go b/pkg/morph/event/frostfs/unbind_test.go similarity index 100% rename from pkg/morph/event/neofs/unbind_test.go rename to pkg/morph/event/frostfs/unbind_test.go diff --git a/pkg/morph/event/neofs/withdraw.go b/pkg/morph/event/frostfs/withdraw.go similarity index 100% rename from pkg/morph/event/neofs/withdraw.go rename to pkg/morph/event/frostfs/withdraw.go diff --git a/pkg/morph/event/neofs/withdraw_test.go b/pkg/morph/event/frostfs/withdraw_test.go similarity index 100% rename from pkg/morph/event/neofs/withdraw_test.go rename to pkg/morph/event/frostfs/withdraw_test.go