Rename contract-related neofs occurences #11

Merged
fyrchik merged 6 commits from fix-adm into master 2023-01-12 05:55:47 +00:00
63 changed files with 113 additions and 113 deletions

View file

@ -1,9 +1,9 @@
# NeoFS Admin Tool
# FrostFS Admin Tool
## Overview
Admin tool provides an easier way to deploy and maintain private installation
of NeoFS. Private installation provides a set of N3 consensus nodes, NeoFS
of FrostFS. Private installation provides a set of N3 consensus nodes, FrostFS
Alphabet, and Storage nodes. Admin tool generates consensus keys, initializes
the sidechain, and provides functions to update the network and register new
Storage nodes.
@ -16,7 +16,7 @@ For clean build inside a docker container, use `make docker/bin/frostfs-adm`.
Build docker image with `make image-adm`.
At NeoFS private install deployment, frostfs-adm requires compiled NeoFS
At FrostFS private install deployment, frostfs-adm requires compiled FrostFS
contracts. Find them in the latest release of
[frostfs-contract repository](https://github.com/TrueCloudLab/frostfs-contract/releases).
@ -35,8 +35,8 @@ Config example:
rpc-endpoint: https://address:port # sidechain RPC node endpoint
alphabet-wallets: /path # path to consensus node / alphabet wallets storage
network:
max_object_size: 67108864 # max size of a single NeoFS object, bytes
epoch_duration: 240 # duration of a NeoFS epoch in blocks, consider block generation frequency in the sidechain
max_object_size: 67108864 # max size of a single FrostFS object, bytes
epoch_duration: 240 # duration of a FrostFS epoch in blocks, consider block generation frequency in the sidechain
basic_income_rate: 0 # basic income rate, for private consider 0
fee:
audit: 0 # network audit fee, for private installation consider 0
@ -62,18 +62,18 @@ credentials: # passwords for consensus node / alphabet wallets
Alphabet nodes.
- `init` initializes the sidechain by deploying smart contracts and
setting provided NeoFS network configuration.
setting provided FrostFS network configuration.
- `generate-storage-wallet` generates a wallet for the Storage node that
is ready for deployment. It also transfers a bit of sidechain GAS, so this
wallet can be used for NeoFS bootstrap.
wallet can be used for FrostFS bootstrap.
#### Network maintenance
- `set-config` add/update configuration values in the Netmap contract.
- `force-new-epoch` increments NeoFS epoch number and executes new epoch
handlers in NeoFS nodes.
- `force-new-epoch` increments FrostFS epoch number and executes new epoch
handlers in FrostFS nodes.
- `refill-gas` transfers sidechain GAS to the specified wallet.
@ -94,9 +94,9 @@ info. These commands **do not migrate actual objects**.
#### Network info
- `dump-config` prints NeoFS network configuration.
- `dump-config` prints FrostFS network configuration.
- `dump-hashes` prints NeoFS contract addresses stored in NNS.
- `dump-hashes` prints FrostFS contract addresses stored in NNS.
## Private network deployment

View file

@ -1,6 +1,6 @@
# Step-by-step private NeoFS deployment
# Step-by-step private FrostFS deployment
This is a short guide on how to deploy a private NeoFS storage network on bare
This is a short guide on how to deploy a private FrostFS storage network on bare
metal without docker images. This guide does not cover details on how to start
consensus, Alphabet, or Storage nodes. This guide covers only `frostfs-adm`
related configuration details.
@ -118,7 +118,7 @@ and possible overload issues.
## Step 3: Initialize sidechain
Use archive with compiled NeoFS contracts to initialize the sidechain.
Use archive with compiled FrostFS contracts to initialize the sidechain.
```
$ tar -xzvf frostfs-contract-v0.11.0.tar.gz
@ -130,7 +130,7 @@ Stage 2: set notary and alphabet nodes in designate contract.
Waiting for transactions to persist...
Stage 3: deploy NNS contract.
Waiting for transactions to persist...
Stage 4: deploy NeoFS contracts.
Stage 4: deploy FrostFS contracts.
Waiting for transactions to persist...
Stage 4.1: Transfer GAS to proxy contract.
Waiting for transactions to persist...
@ -140,14 +140,14 @@ Stage 6: transfer NEO to alphabet contracts.
Waiting for transactions to persist...
Stage 7: set addresses in NNS.
Waiting for transactions to persist...
NNS: Set alphabet0.neofs -> f692dfb4d43a15b464eb51a7041160fb29c44b6a
NNS: Set audit.neofs -> 7df847b993affb3852074345a7c2bd622171ee0d
NNS: Set balance.neofs -> 103519b3067a66307080a66570c0491ee8f68879
NNS: Set container.neofs -> cae60bdd689d185901e495352d0247752ce50846
NNS: Set neofsid.neofs -> c421fb60a3895865a8f24d197d6a80ef686041d2
NNS: Set netmap.neofs -> 894eb854632f50fb124412ce7951ebc00763525e
NNS: Set proxy.neofs -> ac6e6fe4b373d0ca0ca4969d1e58fa0988724e7d
NNS: Set reputation.neofs -> 6eda57c9d93d990573646762d1fea327ce41191f
NNS: Set alphabet0.frostfs -> f692dfb4d43a15b464eb51a7041160fb29c44b6a
NNS: Set audit.frostfs -> 7df847b993affb3852074345a7c2bd622171ee0d
NNS: Set balance.frostfs -> 103519b3067a66307080a66570c0491ee8f68879
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...
```
@ -196,7 +196,7 @@ node:
password: "foobar"
```
The storage node will be included in the network map in the next NeoFS epoch. To
The storage node will be included in the network map in the next FrostFS epoch. To
speed up this process, you can increment epoch counter immediately.
```
@ -207,5 +207,5 @@ Waiting for transactions to persist...
---
After that, NeoFS Storage is ready to work. You can access it directly or
After that, FrostFS Storage is ready to work. You can access it directly or
with protocol gates.

View file

@ -1,6 +1,6 @@
# NeoFS subnetwork creation
# FrostFS subnetwork creation
This is a short guide on how to create NeoFS subnetworks. This guide
This is a short guide on how to create FrostFS subnetworks. This guide
considers that the sidechain and the inner ring (alphabet nodes) have already been
deployed and the sidechain contains a deployed `subnet` contract.
@ -9,7 +9,7 @@ deployed and the sidechain contains a deployed `subnet` contract.
To follow this guide, you need:
- neo-go sidechain RPC endpoint;
- latest released version of [frostfs-adm](https://github.com/TrueCloudLab/frostfs-node/releases);
- wallet with NeoFS account.
- wallet with FrostFS account.
## Creation

View file

@ -1,6 +1,6 @@
# Managing Subnetworks
This is a short guide on how to manage NeoFS subnetworks. This guide
This is a short guide on how to manage FrostFS subnetworks. This guide
considers that the sidechain and the inner ring (alphabet nodes) have already been
deployed, and the sidechain contains a deployed `subnet` contract.
@ -12,7 +12,7 @@ deployed, and the sidechain contains a deployed `subnet` contract.
- wallet with the account that owns the subnetwork;
- public key of the Storage Node;
- public keys of the node and client administrators;
- owner IDs of the NeoFS users.
- owner IDs of the FrostFS users.
## Add node administrator
@ -99,7 +99,7 @@ configuration:
node:
...
subnet:
entries: # list of IDs of subnets to enter in a text format of NeoFS API protocol (overrides corresponding attributes)
entries: # list of IDs of subnets to enter in a text format of FrostFS API protocol (overrides corresponding attributes)
- <subnetwork_ID>
...
...

View file

@ -36,13 +36,13 @@ 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"
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,
@ -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)
@ -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)

View file

@ -18,7 +18,7 @@ func StringifySubnetClientGroupID(id *SubnetClientGroupID) string {
return string(text)
}
// MarshalText encodes SubnetClientGroupID into text format according to NeoFS API V2 protocol:
// MarshalText encodes SubnetClientGroupID into text format according to FrostFS API V2 protocol:
// value in base-10 integer string format.
//
// It implements encoding.TextMarshaler.
@ -28,7 +28,7 @@ func (x *SubnetClientGroupID) MarshalText() ([]byte, error) {
return []byte(strconv.FormatUint(uint64(num), 10)), nil
}
// UnmarshalText decodes the SubnetID from the text according to NeoFS API V2 protocol:
// UnmarshalText decodes the SubnetID from the text according to FrostFS API V2 protocol:
// should be base-10 integer string format with bitsize = 32.
//
// Returns strconv.ErrRange if integer overflows uint32.
@ -47,13 +47,13 @@ func (x *SubnetClientGroupID) UnmarshalText(txt []byte) error {
return nil
}
// Marshal encodes the SubnetClientGroupID into a binary format of NeoFS API V2 protocol
// Marshal encodes the SubnetClientGroupID into a binary format of FrostFS API V2 protocol
// (Protocol Buffers with direct field order).
func (x *SubnetClientGroupID) Marshal() ([]byte, error) {
return proto.Marshal(x)
}
// Unmarshal decodes the SubnetClientGroupID from NeoFS API V2 binary format (see Marshal). Must not be called on nil.
// Unmarshal decodes the SubnetClientGroupID from FrostFS API V2 binary format (see Marshal). Must not be called on nil.
func (x *SubnetClientGroupID) Unmarshal(data []byte) error {
return proto.Unmarshal(data, x)
}

View file

@ -4,7 +4,7 @@ package neo.fs.v2.refs;
option go_package = "github.com/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/internal";
// Client group identifier in the NeoFS subnet.
// Client group identifier in the FrostFS subnet.
//
// String representation of a value is base-10 integer.
//

View file

@ -77,7 +77,7 @@ workers:
alphabet: 10 # Number of workers to process events from alphabet contract in parallel
balance: 10 # Number of workers to process events from balance contract in parallel
container: 10 # Number of workers to process events from container contract in parallel
neofs: 10 # Number of workers to process events from neofs contracts 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
@ -105,12 +105,12 @@ netmap_cleaner:
threshold: 3 # Number of NeoFS epoch without bootstrap request from storage node before it considered stale
contracts:
neofs: ee3dee6d05dc79c24a5b8f6985e10d68b7cacc62 # Address of NeoFS contract in mainchain; ignore if mainchain is disabled
frostfs: ee3dee6d05dc79c24a5b8f6985e10d68b7cacc62 # Address of FrostFS contract in mainchain; ignore if mainchain is disabled
processing: 597f5894867113a41e192801709c02497f611de8 # Address of processing contract in mainchain; ignore if mainchain is disabled or notary is disabled in mainchain
audit: 219e37aed2180b87e7fe945dbf97d67125e8d73f # Optional: override address of audit contract in sidechain
balance: d2aa48d14b17b11bc4c68205027884a96706dd16 # Optional: override address of balance contract in sidechain
container: ed4a7a66fe3f9bfe50f214b49be8f215a3c886b6 # Optional: override address of container contract in sidechain
neofsid: 9f5866decbc751a099e74c7c7bc89f609201755a # Optional: override address of neofsid contract in sidechain
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

View file

@ -25,7 +25,7 @@ Maintenance mode allowed: true
...
```
To toggle the setting in the running NeoFS Sidechain, exec:
To toggle the setting in the running FrostFS Sidechain, exec:
```shell
$ frostfs-adm morph set-config MaintenanceModeAllowed=true|false
```
@ -46,7 +46,7 @@ in which a new version of the network map is released.
## Object service
Nodes under maintenance MAY fail operations of the NeoFS Object API. The node
Nodes under maintenance MAY fail operations of the FrostFS Object API. The node
maintained in the current repository always denies all object operations with
dedicated status `NODE_UNDER_MAINTENANCE`.

View file

@ -1,4 +1,4 @@
# NeoFS Storage node configuration file
# FrostFS Storage node configuration file
This section contains detailed FrostFS Storage node configuration file description
including default config values and some tips to set up configurable values.
@ -18,9 +18,9 @@ There are some custom types used for brevity:
| `pprof` | [PProf configuration](#pprof-section) |
| `prometheus` | [Prometheus metrics configuration](#prometheus-section) |
| `control` | [Control service configuration](#control-section) |
| `contracts` | [Override FrostFS contracts hashes](#contracts-section) |
| `contracts` | [Override FrostFS contracts hashes](#contracts-section) |
| `morph` | [N3 blockchain client configuration](#morph-section) |
| `apiclient` | [FrostFS API client configuration](#apiclient-section) |
| `apiclient` | [FrostFS API client configuration](#apiclient-section) |
| `policer` | [Policer service configuration](#policer-section) |
| `replicator` | [Replicator service configuration](#replicator-section) |
| `storage` | [Storage engine configuration](#storage-section) |

View file

@ -63,7 +63,7 @@ func parseContracts(cfg *viper.Viper, morph *client.Client, withoutMainNet, with
{"contracts.audit", client.NNSAuditContractName, &result.audit},
{"contracts.reputation", client.NNSReputationContractName, &result.reputation},
{"contracts.subnet", client.NNSSubnetworkContractName, &result.subnet},
{"contracts.frostfsid", client.NNSNeoFSIDContractName, &result.frostfsID},
{"contracts.frostfsid", client.NNSFrostFSIDContractName, &result.frostfsID},
}
for _, t := range targets {

View file

@ -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,8 +29,8 @@ 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"
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid"
frostfsClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfs"
"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
}
@ -670,7 +670,7 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
// create governance processor
governanceProcessor, err := governance.New(&governance.Params{
Log: log,
NeoFSClient: frostfsCli,
FrostFSClient: frostfsCli,
NetmapClient: server.netmapClient,
AlphabetState: server,
EpochState: server,
@ -743,7 +743,7 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
PoolSize: cfg.GetInt("workers.container"),
AlphabetState: server,
ContainerClient: cnrClient,
NeoFSIDClient: frostfsIDClient,
FrostFSIDClient: frostfsIDClient,
NetworkState: server.netmapClient,
NotaryDisabled: server.sideNotaryConfig.disabled,
SubnetClient: subnetClient,
@ -761,7 +761,7 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
balanceProcessor, err := balance.New(&balance.Params{
Log: log,
PoolSize: cfg.GetInt("workers.balance"),
NeoFSClient: frostfsCli,
FrostFSClient: frostfsCli,
BalanceSC: server.contracts.balance,
AlphabetState: server,
Converter: &server.precision,
@ -780,8 +780,8 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
frostfsProcessor, err := frostfs.New(&frostfs.Params{
Log: log,
PoolSize: cfg.GetInt("workers.frostfs"),
NeoFSContract: server.contracts.frostfs,
NeoFSIDClient: frostfsIDClient,
FrostFSContract: server.contracts.frostfs,
FrostFSIDClient: frostfsIDClient,
BalanceClient: server.balanceClient,
NetmapClient: server.netmapClient,
MorphClient: server.morphClient,

View file

@ -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())
@ -22,7 +22,7 @@ func (bp *Processor) processLock(lock *balanceEvent.Lock) {
prm.SetLock(lock.LockAccount())
prm.SetHash(lock.TxHash())
err := bp.neofsClient.Cheque(prm)
err := bp.frostfsClient.Cheque(prm)
if err != nil {
bp.log.Error("can't send lock asset tx", zap.Error(err))
}

View file

@ -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"
@ -28,7 +28,7 @@ type (
Processor struct {
log *logger.Logger
pool *ants.Pool
neofsClient *frostfscontract.Client
frostfsClient *frostfscontract.Client
balanceSC util.Uint160
alphabetState AlphabetState
converter PrecisionConverter
@ -38,7 +38,7 @@ type (
Params struct {
Log *logger.Logger
PoolSize int
NeoFSClient *frostfscontract.Client
FrostFSClient *frostfscontract.Client
BalanceSC util.Uint160
AlphabetState AlphabetState
Converter PrecisionConverter
@ -70,7 +70,7 @@ func New(p *Params) (*Processor, error) {
return &Processor{
log: p.Log,
pool: pool,
neofsClient: p.NeoFSClient,
frostfsClient: p.FrostFSClient,
balanceSC: p.BalanceSC,
alphabetState: p.AlphabetState,
converter: p.Converter,

View file

@ -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)

View file

@ -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
FrostFSIDClient *frostfsid.Client
SubnetClient *morphsubnet.Client
NetworkState NetworkState
NotaryDisabled bool
@ -80,7 +80,7 @@ func New(p *Params) (*Processor, error) {
return nil, errors.New("ir/container: global state is not set")
case p.ContainerClient == nil:
return nil, errors.New("ir/container: Container client is not set")
case p.NeoFSIDClient == nil:
case p.FrostFSIDClient == nil:
return nil, errors.New("ir/container: NeoFS ID client is not set")
case p.NetworkState == nil:
return nil, errors.New("ir/container: network state is not set")
@ -100,7 +100,7 @@ func New(p *Params) (*Processor, error) {
pool: pool,
alphabetState: p.AlphabetState,
cnrClient: p.ContainerClient,
idClient: p.NeoFSIDClient,
idClient: p.FrostFSIDClient,
netState: p.NetworkState,
notaryDisabled: p.NotaryDisabled,
subnetClient: p.SubnetClient,

View file

@ -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"
)

View file

@ -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"
)

View file

@ -4,8 +4,8 @@ import (
"crypto/elliptic"
"fmt"
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client/neofsid"
frostfs "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/neofs"
"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"
"github.com/nspcc-dev/neo-go/pkg/util"
@ -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())

View file

@ -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"
)

View file

@ -7,10 +7,10 @@ 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/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"
@ -52,15 +52,15 @@ type (
mintEmitValue fixedn.Fixed8
gasBalanceThreshold int64
frostfsIDClient *neofsid.Client
frostfsIDClient *frostfsid.Client
}
// Params of the processor constructor.
Params struct {
Log *logger.Logger
PoolSize int
NeoFSContract util.Uint160
NeoFSIDClient *neofsid.Client
FrostFSContract util.Uint160
FrostFSIDClient *frostfsid.Client
BalanceClient *balance.Client
NetmapClient *nmClient.Client
MorphClient *client.Client
@ -113,7 +113,7 @@ func New(p *Params) (*Processor, error) {
return &Processor{
log: p.Log,
pool: pool,
frostfsContract: p.NeoFSContract,
frostfsContract: p.FrostFSContract,
balanceClient: p.BalanceClient,
netmapClient: p.NetmapClient,
morphClient: p.MorphClient,
@ -126,7 +126,7 @@ func New(p *Params) (*Processor, error) {
mintEmitValue: p.MintEmitValue,
gasBalanceThreshold: p.GasBalanceThreshold,
frostfsIDClient: p.NeoFSIDClient,
frostfsIDClient: p.FrostFSIDClient,
}, nil
}

View file

@ -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"

View file

@ -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"
@ -84,7 +84,7 @@ type (
MorphClient *client.Client
MainnetClient *client.Client
NeoFSClient *frostfscontract.Client
FrostFSClient *frostfscontract.Client
NetmapClient *nmClient.Client
NotaryDisabled bool
@ -121,7 +121,7 @@ func New(p *Params) (*Processor, error) {
return &Processor{
log: p.Log,
pool: pool,
frostfsClient: p.NeoFSClient,
frostfsClient: p.FrostFSClient,
netmapClient: p.NetmapClient,
alphabetState: p.AlphabetState,
epochState: p.EpochState,

View file

@ -163,7 +163,7 @@ func (e *notHaltStateError) Error() string {
var errEmptyInvocationScript = errors.New("got empty invocation script from neo node")
// implementation of error interface for NeoFS-specific errors.
// implementation of error interface for FrostFS-specific errors.
type frostfsError struct {
err error
}
@ -172,8 +172,8 @@ func (e frostfsError) Error() string {
return fmt.Sprintf("frostfs error: %v", e.err)
}
// wraps NeoFS-specific error into frostfsError. Arg must not be nil.
func wrapNeoFSError(err error) error {
// wraps FrostFS-specific error into frostfsError. Arg must not be nil.
func wrapFrostFSError(err error) error {
return frostfsError{err}
}
@ -216,7 +216,7 @@ func (c *Client) TestInvoke(contract util.Uint160, method string, args ...interf
}
if val.State != HaltState {
return nil, wrapNeoFSError(&notHaltStateError{state: val.State, exception: val.FaultException})
return nil, wrapFrostFSError(&notHaltStateError{state: val.State, exception: val.FaultException})
}
return val.Stack, nil
@ -433,7 +433,7 @@ func toStackParameter(value interface{}) (sc.Parameter, error) {
result.Type = sc.BoolType
result.Value = v
default:
return result, wrapNeoFSError(fmt.Errorf("chain/client: unsupported parameter %v", value))
return result, wrapFrostFSError(fmt.Errorf("chain/client: unsupported parameter %v", value))
}
return result, nil

View file

@ -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 (

View file

@ -1,4 +1,4 @@
package neofsid
package frostfsid
import (
"fmt"

View file

@ -1,4 +1,4 @@
package neofsid
package frostfsid
import (
"fmt"

View file

@ -1,4 +1,4 @@
package neofsid
package frostfsid
import (
"crypto/elliptic"

View file

@ -26,8 +26,8 @@ const (
NNSBalanceContractName = "balance.frostfs"
// NNSContainerContractName is a name of the container contract in NNS.
NNSContainerContractName = "container.frostfs"
// NNSNeoFSIDContractName is a name of the frostfsid contract in NNS.
NNSNeoFSIDContractName = "frostfsid.frostfs"
// NNSFrostFSIDContractName is a name of the frostfsid contract in NNS.
NNSFrostFSIDContractName = "frostfsid.frostfs"
// NNSNetmapContractName is a name of the netmap contract in NNS.
NNSNetmapContractName = "netmap.frostfs"
// NNSProxyContractName is a name of the proxy contract in NNS.

View file

@ -243,12 +243,12 @@ func (c *Client) GetNotaryDeposit() (res int64, err error) {
}
if len(items) != 1 {
return 0, wrapNeoFSError(fmt.Errorf("%v: %w", notaryBalanceErrMsg, errUnexpectedItems))
return 0, wrapFrostFSError(fmt.Errorf("%v: %w", notaryBalanceErrMsg, errUnexpectedItems))
}
bigIntDeposit, err := items[0].TryInteger()
if err != nil {
return 0, wrapNeoFSError(fmt.Errorf("%v: %w", notaryBalanceErrMsg, err))
return 0, wrapFrostFSError(fmt.Errorf("%v: %w", notaryBalanceErrMsg, err))
}
return bigIntDeposit.Int64(), nil
@ -475,12 +475,12 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
// check invocation state
if test.State != HaltState {
return wrapNeoFSError(&notHaltStateError{state: test.State, exception: test.FaultException})
return wrapFrostFSError(&notHaltStateError{state: test.State, exception: test.FaultException})
}
// if test invocation failed, then return error
if len(test.Script) == 0 {
return wrapNeoFSError(errEmptyInvocationScript)
return wrapFrostFSError(errEmptyInvocationScript)
}
// after test invocation we build main multisig transaction
@ -570,7 +570,7 @@ func (c *Client) notaryCosigners(invokedByAlpha bool, ir []*keys.PublicKey, comm
multisigScript, err := sc.CreateMultiSigRedeemScript(m, ir)
if err != nil {
// wrap error as NeoFS-specific since the call is not related to any client
return nil, wrapNeoFSError(fmt.Errorf("can't create ir multisig redeem script: %w", err))
return nil, wrapFrostFSError(fmt.Errorf("can't create ir multisig redeem script: %w", err))
}
s = append(s, transaction.Signer{
@ -704,7 +704,7 @@ func (c *Client) notaryMultisigAccount(ir []*keys.PublicKey, committee, invokedB
err := multisigAccount.ConvertMultisig(m, ir)
if err != nil {
// wrap error as NeoFS-specific since the call is not related to any client
return nil, wrapNeoFSError(fmt.Errorf("can't convert account to inner ring multisig wallet: %w", err))
return nil, wrapFrostFSError(fmt.Errorf("can't convert account to inner ring multisig wallet: %w", err))
}
} else {
// alphabet multisig redeem script is
@ -713,7 +713,7 @@ func (c *Client) notaryMultisigAccount(ir []*keys.PublicKey, committee, invokedB
multisigAccount, err = notary.FakeMultisigAccount(m, ir)
if err != nil {
// wrap error as NeoFS-specific since the call is not related to any client
return nil, wrapNeoFSError(fmt.Errorf("can't make inner ring multisig wallet: %w", err))
return nil, wrapFrostFSError(fmt.Errorf("can't make inner ring multisig wallet: %w", err))
}
}

View file

@ -98,7 +98,7 @@ func StringFromStackItem(param stackitem.Item) (string, error) {
func addFeeCheckerModifier(add int64) func(r *result.Invoke, t *transaction.Transaction) error {
return func(r *result.Invoke, t *transaction.Transaction) error {
if r.State != HaltState {
return wrapNeoFSError(&notHaltStateError{state: r.State, exception: r.FaultException})
return wrapFrostFSError(&notHaltStateError{state: r.State, exception: r.FaultException})
}
t.SystemFee += add

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.