From 9cb4b4cc1721d8082cf286345a839ebbd2463443 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 10 Jan 2023 16:01:54 +0300 Subject: [PATCH] [#11] Rename `neofsid` contract to `frostfsid` Signed-off-by: Evgenii Stratonikov --- .../internal/modules/morph/initialize_deploy.go | 8 ++++---- pkg/innerring/innerring.go | 4 ++-- pkg/innerring/processors/container/common.go | 4 ++-- pkg/innerring/processors/container/processor.go | 6 +++--- pkg/innerring/processors/frostfs/process_bind.go | 4 ++-- pkg/innerring/processors/frostfs/processor.go | 6 +++--- pkg/morph/client/{neofsid => frostfsid}/addrm_keys.go | 2 +- pkg/morph/client/{neofsid => frostfsid}/client.go | 2 +- pkg/morph/client/{neofsid => frostfsid}/keys.go | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) rename pkg/morph/client/{neofsid => frostfsid}/addrm_keys.go (98%) rename pkg/morph/client/{neofsid => frostfsid}/client.go (98%) rename pkg/morph/client/{neofsid => frostfsid}/keys.go (98%) diff --git a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go index ff14e87b..27016ce5 100644 --- a/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go +++ b/cmd/frostfs-adm/internal/modules/morph/initialize_deploy.go @@ -42,7 +42,7 @@ const ( auditContract = "audit" balanceContract = "balance" containerContract = "container" - neofsIDContract = "neofsid" + frostfsIDContract = "frostfsid" netmapContract = "netmap" proxyContract = "proxy" reputationContract = "reputation" @@ -72,7 +72,7 @@ var ( auditContract, balanceContract, containerContract, - neofsIDContract, + frostfsIDContract, netmapContract, proxyContract, reputationContract, @@ -543,10 +543,10 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []in items = append(items, c.Contracts[netmapContract].Hash, c.Contracts[balanceContract].Hash, - c.Contracts[neofsIDContract].Hash, + c.Contracts[frostfsIDContract].Hash, nnsCs.Hash, "container") - case neofsIDContract: + case frostfsIDContract: items = append(items, c.Contracts[netmapContract].Hash, c.Contracts[containerContract].Hash) diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go index 909dd9e6..69dfed1d 100644 --- a/pkg/innerring/innerring.go +++ b/pkg/innerring/innerring.go @@ -30,7 +30,7 @@ import ( 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/frostfs" - "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" + "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid" nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap" repClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/reputation" morphsubnet "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/subnet" @@ -508,7 +508,7 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan return nil, err } - frostfsIDClient, err := neofsid.NewFromMorph(server.morphClient, server.contracts.frostfsID, fee, neofsid.TryNotary(), neofsid.AsAlphabet()) + frostfsIDClient, err := frostfsid.NewFromMorph(server.morphClient, server.contracts.frostfsID, fee, frostfsid.TryNotary(), frostfsid.AsAlphabet()) if err != nil { return nil, err } diff --git a/pkg/innerring/processors/container/common.go b/pkg/innerring/processors/container/common.go index 608e66de..07920d08 100644 --- a/pkg/innerring/processors/container/common.go +++ b/pkg/innerring/processors/container/common.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" + "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid" cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id" frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa" "github.com/TrueCloudLab/frostfs-sdk-go/session" @@ -113,7 +113,7 @@ func (cp *Processor) verifySignature(v signatureVerificationData) error { return errors.New("invalid signature calculated by container owner's key") } } else { - var prm neofsid.AccountKeysPrm + var prm frostfsid.AccountKeysPrm prm.SetID(v.ownerContainer) ownerKeys, err := cp.idClient.AccountKeys(prm) diff --git a/pkg/innerring/processors/container/processor.go b/pkg/innerring/processors/container/processor.go index f670d994..b8cc3c8b 100644 --- a/pkg/innerring/processors/container/processor.go +++ b/pkg/innerring/processors/container/processor.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/container" - "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" + "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid" morphsubnet "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/subnet" "github.com/TrueCloudLab/frostfs-node/pkg/morph/event" containerEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/container" @@ -27,7 +27,7 @@ type ( pool *ants.Pool alphabetState AlphabetState cnrClient *container.Client // notary must be enabled - idClient *neofsid.Client + idClient *frostfsid.Client subnetClient *morphsubnet.Client netState NetworkState notaryDisabled bool @@ -39,7 +39,7 @@ type ( PoolSize int AlphabetState AlphabetState ContainerClient *container.Client - NeoFSIDClient *neofsid.Client + NeoFSIDClient *frostfsid.Client SubnetClient *morphsubnet.Client NetworkState NetworkState NotaryDisabled bool diff --git a/pkg/innerring/processors/frostfs/process_bind.go b/pkg/innerring/processors/frostfs/process_bind.go index e7641f39..d1c28fcf 100644 --- a/pkg/innerring/processors/frostfs/process_bind.go +++ b/pkg/innerring/processors/frostfs/process_bind.go @@ -4,7 +4,7 @@ import ( "crypto/elliptic" "fmt" - "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" + "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid" 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" @@ -87,7 +87,7 @@ func (np *Processor) approveBindCommon(e *bindCommonContext) { var id user.ID id.SetScriptHash(u160) - prm := neofsid.CommonBindPrm{} + prm := frostfsid.CommonBindPrm{} prm.SetOwnerID(id.WalletBytes()) prm.SetKeys(e.Keys()) prm.SetHash(e.bindCommon.TxHash()) diff --git a/pkg/innerring/processors/frostfs/processor.go b/pkg/innerring/processors/frostfs/processor.go index 3b052f13..12634394 100644 --- a/pkg/innerring/processors/frostfs/processor.go +++ b/pkg/innerring/processors/frostfs/processor.go @@ -7,7 +7,7 @@ import ( "github.com/TrueCloudLab/frostfs-node/pkg/morph/client" "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/balance" - "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid" + "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid" 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/frostfs" @@ -52,7 +52,7 @@ type ( mintEmitValue fixedn.Fixed8 gasBalanceThreshold int64 - frostfsIDClient *neofsid.Client + frostfsIDClient *frostfsid.Client } // Params of the processor constructor. @@ -60,7 +60,7 @@ type ( Log *logger.Logger PoolSize int NeoFSContract util.Uint160 - NeoFSIDClient *neofsid.Client + NeoFSIDClient *frostfsid.Client BalanceClient *balance.Client NetmapClient *nmClient.Client MorphClient *client.Client diff --git a/pkg/morph/client/neofsid/addrm_keys.go b/pkg/morph/client/frostfsid/addrm_keys.go similarity index 98% rename from pkg/morph/client/neofsid/addrm_keys.go rename to pkg/morph/client/frostfsid/addrm_keys.go index e5b1bd75..3bfa7c64 100644 --- a/pkg/morph/client/neofsid/addrm_keys.go +++ b/pkg/morph/client/frostfsid/addrm_keys.go @@ -1,4 +1,4 @@ -package neofsid +package frostfsid import ( "fmt" diff --git a/pkg/morph/client/neofsid/client.go b/pkg/morph/client/frostfsid/client.go similarity index 98% rename from pkg/morph/client/neofsid/client.go rename to pkg/morph/client/frostfsid/client.go index f2c6a59a..c388834b 100644 --- a/pkg/morph/client/neofsid/client.go +++ b/pkg/morph/client/frostfsid/client.go @@ -1,4 +1,4 @@ -package neofsid +package frostfsid import ( "fmt" diff --git a/pkg/morph/client/neofsid/keys.go b/pkg/morph/client/frostfsid/keys.go similarity index 98% rename from pkg/morph/client/neofsid/keys.go rename to pkg/morph/client/frostfsid/keys.go index cde5d2f9..f7d725ee 100644 --- a/pkg/morph/client/neofsid/keys.go +++ b/pkg/morph/client/frostfsid/keys.go @@ -1,4 +1,4 @@ -package neofsid +package frostfsid import ( "crypto/elliptic"