Rename contract-related neofs occurences #11
63 changed files with 113 additions and 113 deletions
|
@ -1,9 +1,9 @@
|
||||||
# NeoFS Admin Tool
|
# FrostFS Admin Tool
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Admin tool provides an easier way to deploy and maintain private installation
|
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
|
Alphabet, and Storage nodes. Admin tool generates consensus keys, initializes
|
||||||
the sidechain, and provides functions to update the network and register new
|
the sidechain, and provides functions to update the network and register new
|
||||||
Storage nodes.
|
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`.
|
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
|
contracts. Find them in the latest release of
|
||||||
[frostfs-contract repository](https://github.com/TrueCloudLab/frostfs-contract/releases).
|
[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
|
rpc-endpoint: https://address:port # sidechain RPC node endpoint
|
||||||
alphabet-wallets: /path # path to consensus node / alphabet wallets storage
|
alphabet-wallets: /path # path to consensus node / alphabet wallets storage
|
||||||
network:
|
network:
|
||||||
max_object_size: 67108864 # max size of a single NeoFS object, bytes
|
max_object_size: 67108864 # max size of a single FrostFS object, bytes
|
||||||
epoch_duration: 240 # duration of a NeoFS epoch in blocks, consider block generation frequency in the sidechain
|
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
|
basic_income_rate: 0 # basic income rate, for private consider 0
|
||||||
fee:
|
fee:
|
||||||
audit: 0 # network audit fee, for private installation consider 0
|
audit: 0 # network audit fee, for private installation consider 0
|
||||||
|
@ -62,18 +62,18 @@ credentials: # passwords for consensus node / alphabet wallets
|
||||||
Alphabet nodes.
|
Alphabet nodes.
|
||||||
|
|
||||||
- `init` initializes the sidechain by deploying smart contracts and
|
- `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
|
- `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
|
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
|
#### Network maintenance
|
||||||
|
|
||||||
- `set-config` add/update configuration values in the Netmap contract.
|
- `set-config` add/update configuration values in the Netmap contract.
|
||||||
|
|
||||||
- `force-new-epoch` increments NeoFS epoch number and executes new epoch
|
- `force-new-epoch` increments FrostFS epoch number and executes new epoch
|
||||||
handlers in NeoFS nodes.
|
handlers in FrostFS nodes.
|
||||||
|
|
||||||
- `refill-gas` transfers sidechain GAS to the specified wallet.
|
- `refill-gas` transfers sidechain GAS to the specified wallet.
|
||||||
|
|
||||||
|
@ -94,9 +94,9 @@ info. These commands **do not migrate actual objects**.
|
||||||
|
|
||||||
#### Network info
|
#### 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
|
## Private network deployment
|
||||||
|
|
|
@ -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
|
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`
|
consensus, Alphabet, or Storage nodes. This guide covers only `frostfs-adm`
|
||||||
related configuration details.
|
related configuration details.
|
||||||
|
@ -118,7 +118,7 @@ and possible overload issues.
|
||||||
|
|
||||||
## Step 3: Initialize sidechain
|
## 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
|
$ 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...
|
Waiting for transactions to persist...
|
||||||
Stage 3: deploy NNS contract.
|
Stage 3: deploy NNS contract.
|
||||||
Waiting for transactions to persist...
|
Waiting for transactions to persist...
|
||||||
Stage 4: deploy NeoFS contracts.
|
Stage 4: deploy FrostFS contracts.
|
||||||
Waiting for transactions to persist...
|
Waiting for transactions to persist...
|
||||||
Stage 4.1: Transfer GAS to proxy contract.
|
Stage 4.1: Transfer GAS to proxy contract.
|
||||||
Waiting for transactions to persist...
|
Waiting for transactions to persist...
|
||||||
|
@ -140,14 +140,14 @@ Stage 6: transfer NEO to alphabet contracts.
|
||||||
Waiting for transactions to persist...
|
Waiting for transactions to persist...
|
||||||
Stage 7: set addresses in NNS.
|
Stage 7: set addresses in NNS.
|
||||||
Waiting for transactions to persist...
|
Waiting for transactions to persist...
|
||||||
NNS: Set alphabet0.neofs -> f692dfb4d43a15b464eb51a7041160fb29c44b6a
|
NNS: Set alphabet0.frostfs -> f692dfb4d43a15b464eb51a7041160fb29c44b6a
|
||||||
NNS: Set audit.neofs -> 7df847b993affb3852074345a7c2bd622171ee0d
|
NNS: Set audit.frostfs -> 7df847b993affb3852074345a7c2bd622171ee0d
|
||||||
NNS: Set balance.neofs -> 103519b3067a66307080a66570c0491ee8f68879
|
NNS: Set balance.frostfs -> 103519b3067a66307080a66570c0491ee8f68879
|
||||||
NNS: Set container.neofs -> cae60bdd689d185901e495352d0247752ce50846
|
NNS: Set container.frostfs -> cae60bdd689d185901e495352d0247752ce50846
|
||||||
NNS: Set neofsid.neofs -> c421fb60a3895865a8f24d197d6a80ef686041d2
|
NNS: Set frostfsid.frostfs -> c421fb60a3895865a8f24d197d6a80ef686041d2
|
||||||
NNS: Set netmap.neofs -> 894eb854632f50fb124412ce7951ebc00763525e
|
NNS: Set netmap.frostfs -> 894eb854632f50fb124412ce7951ebc00763525e
|
||||||
NNS: Set proxy.neofs -> ac6e6fe4b373d0ca0ca4969d1e58fa0988724e7d
|
NNS: Set proxy.frostfs -> ac6e6fe4b373d0ca0ca4969d1e58fa0988724e7d
|
||||||
NNS: Set reputation.neofs -> 6eda57c9d93d990573646762d1fea327ce41191f
|
NNS: Set reputation.frostfs -> 6eda57c9d93d990573646762d1fea327ce41191f
|
||||||
Waiting for transactions to persist...
|
Waiting for transactions to persist...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ node:
|
||||||
password: "foobar"
|
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.
|
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.
|
with protocol gates.
|
||||||
|
|
|
@ -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
|
considers that the sidechain and the inner ring (alphabet nodes) have already been
|
||||||
deployed and the sidechain contains a deployed `subnet` contract.
|
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:
|
To follow this guide, you need:
|
||||||
- neo-go sidechain RPC endpoint;
|
- neo-go sidechain RPC endpoint;
|
||||||
- latest released version of [frostfs-adm](https://github.com/TrueCloudLab/frostfs-node/releases);
|
- latest released version of [frostfs-adm](https://github.com/TrueCloudLab/frostfs-node/releases);
|
||||||
- wallet with NeoFS account.
|
- wallet with FrostFS account.
|
||||||
|
|
||||||
## Creation
|
## Creation
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Managing Subnetworks
|
# 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
|
considers that the sidechain and the inner ring (alphabet nodes) have already been
|
||||||
deployed, and the sidechain contains a deployed `subnet` contract.
|
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;
|
- wallet with the account that owns the subnetwork;
|
||||||
- public key of the Storage Node;
|
- public key of the Storage Node;
|
||||||
- public keys of the node and client administrators;
|
- public keys of the node and client administrators;
|
||||||
- owner IDs of the NeoFS users.
|
- owner IDs of the FrostFS users.
|
||||||
|
|
||||||
## Add node administrator
|
## Add node administrator
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ configuration:
|
||||||
node:
|
node:
|
||||||
...
|
...
|
||||||
subnet:
|
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>
|
- <subnetwork_ID>
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
|
|
|
@ -36,13 +36,13 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
nnsContract = "nns"
|
nnsContract = "nns"
|
||||||
neofsContract = "neofs" // not deployed in side-chain.
|
frostfsContract = "frostfs" // not deployed in side-chain.
|
||||||
processingContract = "processing" // not deployed in side-chain.
|
processingContract = "processing" // not deployed in side-chain.
|
||||||
alphabetContract = "alphabet"
|
alphabetContract = "alphabet"
|
||||||
auditContract = "audit"
|
auditContract = "audit"
|
||||||
balanceContract = "balance"
|
balanceContract = "balance"
|
||||||
containerContract = "container"
|
containerContract = "container"
|
||||||
neofsIDContract = "neofsid"
|
frostfsIDContract = "frostfsid"
|
||||||
netmapContract = "netmap"
|
netmapContract = "netmap"
|
||||||
proxyContract = "proxy"
|
proxyContract = "proxy"
|
||||||
reputationContract = "reputation"
|
reputationContract = "reputation"
|
||||||
|
@ -72,7 +72,7 @@ var (
|
||||||
auditContract,
|
auditContract,
|
||||||
balanceContract,
|
balanceContract,
|
||||||
containerContract,
|
containerContract,
|
||||||
neofsIDContract,
|
frostfsIDContract,
|
||||||
netmapContract,
|
netmapContract,
|
||||||
proxyContract,
|
proxyContract,
|
||||||
reputationContract,
|
reputationContract,
|
||||||
|
@ -80,7 +80,7 @@ var (
|
||||||
}
|
}
|
||||||
|
|
||||||
fullContractList = append([]string{
|
fullContractList = append([]string{
|
||||||
neofsContract,
|
frostfsContract,
|
||||||
processingContract,
|
processingContract,
|
||||||
nnsContract,
|
nnsContract,
|
||||||
alphabetContract,
|
alphabetContract,
|
||||||
|
@ -519,13 +519,13 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []in
|
||||||
items[0] = false // notaryDisabled is false
|
items[0] = false // notaryDisabled is false
|
||||||
|
|
||||||
switch ctrName {
|
switch ctrName {
|
||||||
case neofsContract:
|
case frostfsContract:
|
||||||
items = append(items,
|
items = append(items,
|
||||||
c.Contracts[processingContract].Hash,
|
c.Contracts[processingContract].Hash,
|
||||||
keysParam,
|
keysParam,
|
||||||
smartcontract.Parameter{})
|
smartcontract.Parameter{})
|
||||||
case processingContract:
|
case processingContract:
|
||||||
items = append(items, c.Contracts[neofsContract].Hash)
|
items = append(items, c.Contracts[frostfsContract].Hash)
|
||||||
return items[1:] // no notary info
|
return items[1:] // no notary info
|
||||||
case auditContract:
|
case auditContract:
|
||||||
items = append(items, c.Contracts[netmapContract].Hash)
|
items = append(items, c.Contracts[netmapContract].Hash)
|
||||||
|
@ -543,10 +543,10 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []in
|
||||||
items = append(items,
|
items = append(items,
|
||||||
c.Contracts[netmapContract].Hash,
|
c.Contracts[netmapContract].Hash,
|
||||||
c.Contracts[balanceContract].Hash,
|
c.Contracts[balanceContract].Hash,
|
||||||
c.Contracts[neofsIDContract].Hash,
|
c.Contracts[frostfsIDContract].Hash,
|
||||||
nnsCs.Hash,
|
nnsCs.Hash,
|
||||||
"container")
|
"container")
|
||||||
case neofsIDContract:
|
case frostfsIDContract:
|
||||||
items = append(items,
|
items = append(items,
|
||||||
c.Contracts[netmapContract].Hash,
|
c.Contracts[netmapContract].Hash,
|
||||||
c.Contracts[containerContract].Hash)
|
c.Contracts[containerContract].Hash)
|
||||||
|
|
|
@ -18,7 +18,7 @@ func StringifySubnetClientGroupID(id *SubnetClientGroupID) string {
|
||||||
return string(text)
|
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.
|
// value in base-10 integer string format.
|
||||||
//
|
//
|
||||||
// It implements encoding.TextMarshaler.
|
// It implements encoding.TextMarshaler.
|
||||||
|
@ -28,7 +28,7 @@ func (x *SubnetClientGroupID) MarshalText() ([]byte, error) {
|
||||||
return []byte(strconv.FormatUint(uint64(num), 10)), nil
|
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.
|
// should be base-10 integer string format with bitsize = 32.
|
||||||
//
|
//
|
||||||
// Returns strconv.ErrRange if integer overflows uint32.
|
// Returns strconv.ErrRange if integer overflows uint32.
|
||||||
|
@ -47,13 +47,13 @@ func (x *SubnetClientGroupID) UnmarshalText(txt []byte) error {
|
||||||
return nil
|
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).
|
// (Protocol Buffers with direct field order).
|
||||||
func (x *SubnetClientGroupID) Marshal() ([]byte, error) {
|
func (x *SubnetClientGroupID) Marshal() ([]byte, error) {
|
||||||
return proto.Marshal(x)
|
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 {
|
func (x *SubnetClientGroupID) Unmarshal(data []byte) error {
|
||||||
return proto.Unmarshal(data, x)
|
return proto.Unmarshal(data, x)
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -4,7 +4,7 @@ package neo.fs.v2.refs;
|
||||||
|
|
||||||
option go_package = "github.com/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/internal";
|
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.
|
// String representation of a value is base-10 integer.
|
||||||
//
|
//
|
||||||
|
|
|
@ -77,7 +77,7 @@ workers:
|
||||||
alphabet: 10 # Number of workers to process events from alphabet contract in parallel
|
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
|
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
|
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
|
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
|
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
|
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
|
threshold: 3 # Number of NeoFS epoch without bootstrap request from storage node before it considered stale
|
||||||
|
|
||||||
contracts:
|
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
|
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
|
audit: 219e37aed2180b87e7fe945dbf97d67125e8d73f # Optional: override address of audit contract in sidechain
|
||||||
balance: d2aa48d14b17b11bc4c68205027884a96706dd16 # Optional: override address of balance contract in sidechain
|
balance: d2aa48d14b17b11bc4c68205027884a96706dd16 # Optional: override address of balance contract in sidechain
|
||||||
container: ed4a7a66fe3f9bfe50f214b49be8f215a3c886b6 # Optional: override address of container 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
|
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
|
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
|
reputation: d793b842ff0c103fe89e385069e82a27602135ff # Optional: override address of reputation contract in sidechain
|
||||||
|
|
|
@ -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
|
```shell
|
||||||
$ frostfs-adm morph set-config MaintenanceModeAllowed=true|false
|
$ 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
|
## 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
|
maintained in the current repository always denies all object operations with
|
||||||
dedicated status `NODE_UNDER_MAINTENANCE`.
|
dedicated status `NODE_UNDER_MAINTENANCE`.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# NeoFS Storage node configuration file
|
# FrostFS Storage node configuration file
|
||||||
|
|
||||||
This section contains detailed FrostFS Storage node configuration file description
|
This section contains detailed FrostFS Storage node configuration file description
|
||||||
including default config values and some tips to set up configurable values.
|
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) |
|
| `pprof` | [PProf configuration](#pprof-section) |
|
||||||
| `prometheus` | [Prometheus metrics configuration](#prometheus-section) |
|
| `prometheus` | [Prometheus metrics configuration](#prometheus-section) |
|
||||||
| `control` | [Control service configuration](#control-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) |
|
| `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) |
|
| `policer` | [Policer service configuration](#policer-section) |
|
||||||
| `replicator` | [Replicator service configuration](#replicator-section) |
|
| `replicator` | [Replicator service configuration](#replicator-section) |
|
||||||
| `storage` | [Storage engine configuration](#storage-section) |
|
| `storage` | [Storage engine configuration](#storage-section) |
|
||||||
|
|
|
@ -63,7 +63,7 @@ func parseContracts(cfg *viper.Viper, morph *client.Client, withoutMainNet, with
|
||||||
{"contracts.audit", client.NNSAuditContractName, &result.audit},
|
{"contracts.audit", client.NNSAuditContractName, &result.audit},
|
||||||
{"contracts.reputation", client.NNSReputationContractName, &result.reputation},
|
{"contracts.reputation", client.NNSReputationContractName, &result.reputation},
|
||||||
{"contracts.subnet", client.NNSSubnetworkContractName, &result.subnet},
|
{"contracts.subnet", client.NNSSubnetworkContractName, &result.subnet},
|
||||||
{"contracts.frostfsid", client.NNSNeoFSIDContractName, &result.frostfsID},
|
{"contracts.frostfsid", client.NNSFrostFSIDContractName, &result.frostfsID},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, t := range targets {
|
for _, t := range targets {
|
||||||
|
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/audit"
|
"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/balance"
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/container"
|
"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"
|
"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"
|
"github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap"
|
||||||
nodevalidator "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap/nodevalidation"
|
nodevalidator "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap/nodevalidation"
|
||||||
addrvalidator "github.com/TrueCloudLab/frostfs-node/pkg/innerring/processors/netmap/nodevalidation/maddress"
|
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"
|
auditClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/audit"
|
||||||
balanceClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/balance"
|
balanceClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/balance"
|
||||||
cntClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/container"
|
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"
|
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid"
|
||||||
nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
|
nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
|
||||||
repClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/reputation"
|
repClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/reputation"
|
||||||
morphsubnet "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/subnet"
|
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
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,7 @@ func New(ctx context.Context, log *logger.Logger, cfg *viper.Viper, errChan chan
|
||||||
// create governance processor
|
// create governance processor
|
||||||
governanceProcessor, err := governance.New(&governance.Params{
|
governanceProcessor, err := governance.New(&governance.Params{
|
||||||
Log: log,
|
Log: log,
|
||||||
NeoFSClient: frostfsCli,
|
FrostFSClient: frostfsCli,
|
||||||
NetmapClient: server.netmapClient,
|
NetmapClient: server.netmapClient,
|
||||||
AlphabetState: server,
|
AlphabetState: server,
|
||||||
EpochState: 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"),
|
PoolSize: cfg.GetInt("workers.container"),
|
||||||
AlphabetState: server,
|
AlphabetState: server,
|
||||||
ContainerClient: cnrClient,
|
ContainerClient: cnrClient,
|
||||||
NeoFSIDClient: frostfsIDClient,
|
FrostFSIDClient: frostfsIDClient,
|
||||||
NetworkState: server.netmapClient,
|
NetworkState: server.netmapClient,
|
||||||
NotaryDisabled: server.sideNotaryConfig.disabled,
|
NotaryDisabled: server.sideNotaryConfig.disabled,
|
||||||
SubnetClient: subnetClient,
|
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{
|
balanceProcessor, err := balance.New(&balance.Params{
|
||||||
Log: log,
|
Log: log,
|
||||||
PoolSize: cfg.GetInt("workers.balance"),
|
PoolSize: cfg.GetInt("workers.balance"),
|
||||||
NeoFSClient: frostfsCli,
|
FrostFSClient: frostfsCli,
|
||||||
BalanceSC: server.contracts.balance,
|
BalanceSC: server.contracts.balance,
|
||||||
AlphabetState: server,
|
AlphabetState: server,
|
||||||
Converter: &server.precision,
|
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{
|
frostfsProcessor, err := frostfs.New(&frostfs.Params{
|
||||||
Log: log,
|
Log: log,
|
||||||
PoolSize: cfg.GetInt("workers.frostfs"),
|
PoolSize: cfg.GetInt("workers.frostfs"),
|
||||||
NeoFSContract: server.contracts.frostfs,
|
FrostFSContract: server.contracts.frostfs,
|
||||||
NeoFSIDClient: frostfsIDClient,
|
FrostFSIDClient: frostfsIDClient,
|
||||||
BalanceClient: server.balanceClient,
|
BalanceClient: server.balanceClient,
|
||||||
NetmapClient: server.netmapClient,
|
NetmapClient: server.netmapClient,
|
||||||
MorphClient: server.morphClient,
|
MorphClient: server.morphClient,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package balance
|
package balance
|
||||||
|
|
||||||
import (
|
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"
|
balanceEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/balance"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,7 @@ func (bp *Processor) processLock(lock *balanceEvent.Lock) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
prm := neofscontract.ChequePrm{}
|
prm := frostfsContract.ChequePrm{}
|
||||||
|
|
||||||
prm.SetID(lock.ID())
|
prm.SetID(lock.ID())
|
||||||
prm.SetUser(lock.User())
|
prm.SetUser(lock.User())
|
||||||
|
@ -22,7 +22,7 @@ func (bp *Processor) processLock(lock *balanceEvent.Lock) {
|
||||||
prm.SetLock(lock.LockAccount())
|
prm.SetLock(lock.LockAccount())
|
||||||
prm.SetHash(lock.TxHash())
|
prm.SetHash(lock.TxHash())
|
||||||
|
|
||||||
err := bp.neofsClient.Cheque(prm)
|
err := bp.frostfsClient.Cheque(prm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
bp.log.Error("can't send lock asset tx", zap.Error(err))
|
bp.log.Error("can't send lock asset tx", zap.Error(err))
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"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"
|
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event"
|
||||||
balanceEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/balance"
|
balanceEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/balance"
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||||
|
@ -28,7 +28,7 @@ type (
|
||||||
Processor struct {
|
Processor struct {
|
||||||
log *logger.Logger
|
log *logger.Logger
|
||||||
pool *ants.Pool
|
pool *ants.Pool
|
||||||
neofsClient *frostfscontract.Client
|
frostfsClient *frostfscontract.Client
|
||||||
balanceSC util.Uint160
|
balanceSC util.Uint160
|
||||||
alphabetState AlphabetState
|
alphabetState AlphabetState
|
||||||
converter PrecisionConverter
|
converter PrecisionConverter
|
||||||
|
@ -38,7 +38,7 @@ type (
|
||||||
Params struct {
|
Params struct {
|
||||||
Log *logger.Logger
|
Log *logger.Logger
|
||||||
PoolSize int
|
PoolSize int
|
||||||
NeoFSClient *frostfscontract.Client
|
FrostFSClient *frostfscontract.Client
|
||||||
BalanceSC util.Uint160
|
BalanceSC util.Uint160
|
||||||
AlphabetState AlphabetState
|
AlphabetState AlphabetState
|
||||||
Converter PrecisionConverter
|
Converter PrecisionConverter
|
||||||
|
@ -70,7 +70,7 @@ func New(p *Params) (*Processor, error) {
|
||||||
return &Processor{
|
return &Processor{
|
||||||
log: p.Log,
|
log: p.Log,
|
||||||
pool: pool,
|
pool: pool,
|
||||||
neofsClient: p.NeoFSClient,
|
frostfsClient: p.FrostFSClient,
|
||||||
balanceSC: p.BalanceSC,
|
balanceSC: p.BalanceSC,
|
||||||
alphabetState: p.AlphabetState,
|
alphabetState: p.AlphabetState,
|
||||||
converter: p.Converter,
|
converter: p.Converter,
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"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"
|
cid "github.com/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||||
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
frostfsecdsa "github.com/TrueCloudLab/frostfs-sdk-go/crypto/ecdsa"
|
||||||
"github.com/TrueCloudLab/frostfs-sdk-go/session"
|
"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")
|
return errors.New("invalid signature calculated by container owner's key")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var prm neofsid.AccountKeysPrm
|
var prm frostfsid.AccountKeysPrm
|
||||||
prm.SetID(v.ownerContainer)
|
prm.SetID(v.ownerContainer)
|
||||||
|
|
||||||
ownerKeys, err := cp.idClient.AccountKeys(prm)
|
ownerKeys, err := cp.idClient.AccountKeys(prm)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client/container"
|
"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"
|
morphsubnet "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/subnet"
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event"
|
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event"
|
||||||
containerEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/container"
|
containerEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/container"
|
||||||
|
@ -27,7 +27,7 @@ type (
|
||||||
pool *ants.Pool
|
pool *ants.Pool
|
||||||
alphabetState AlphabetState
|
alphabetState AlphabetState
|
||||||
cnrClient *container.Client // notary must be enabled
|
cnrClient *container.Client // notary must be enabled
|
||||||
idClient *neofsid.Client
|
idClient *frostfsid.Client
|
||||||
subnetClient *morphsubnet.Client
|
subnetClient *morphsubnet.Client
|
||||||
netState NetworkState
|
netState NetworkState
|
||||||
notaryDisabled bool
|
notaryDisabled bool
|
||||||
|
@ -39,7 +39,7 @@ type (
|
||||||
PoolSize int
|
PoolSize int
|
||||||
AlphabetState AlphabetState
|
AlphabetState AlphabetState
|
||||||
ContainerClient *container.Client
|
ContainerClient *container.Client
|
||||||
NeoFSIDClient *neofsid.Client
|
FrostFSIDClient *frostfsid.Client
|
||||||
SubnetClient *morphsubnet.Client
|
SubnetClient *morphsubnet.Client
|
||||||
NetworkState NetworkState
|
NetworkState NetworkState
|
||||||
NotaryDisabled bool
|
NotaryDisabled bool
|
||||||
|
@ -80,7 +80,7 @@ func New(p *Params) (*Processor, error) {
|
||||||
return nil, errors.New("ir/container: global state is not set")
|
return nil, errors.New("ir/container: global state is not set")
|
||||||
case p.ContainerClient == nil:
|
case p.ContainerClient == nil:
|
||||||
return nil, errors.New("ir/container: Container client is not set")
|
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")
|
return nil, errors.New("ir/container: NeoFS ID client is not set")
|
||||||
case p.NetworkState == nil:
|
case p.NetworkState == nil:
|
||||||
return nil, errors.New("ir/container: network state is not set")
|
return nil, errors.New("ir/container: network state is not set")
|
||||||
|
@ -100,7 +100,7 @@ func New(p *Params) (*Processor, error) {
|
||||||
pool: pool,
|
pool: pool,
|
||||||
alphabetState: p.AlphabetState,
|
alphabetState: p.AlphabetState,
|
||||||
cnrClient: p.ContainerClient,
|
cnrClient: p.ContainerClient,
|
||||||
idClient: p.NeoFSIDClient,
|
idClient: p.FrostFSIDClient,
|
||||||
netState: p.NetworkState,
|
netState: p.NetworkState,
|
||||||
notaryDisabled: p.NotaryDisabled,
|
notaryDisabled: p.NotaryDisabled,
|
||||||
subnetClient: p.SubnetClient,
|
subnetClient: p.SubnetClient,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event"
|
"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"
|
"github.com/nspcc-dev/neo-go/pkg/util/slice"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
|
@ -2,7 +2,7 @@ package frostfs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client/balance"
|
"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"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"crypto/elliptic"
|
"crypto/elliptic"
|
||||||
"fmt"
|
"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/neofs"
|
frostfs "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs"
|
||||||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
|
@ -87,7 +87,7 @@ func (np *Processor) approveBindCommon(e *bindCommonContext) {
|
||||||
var id user.ID
|
var id user.ID
|
||||||
id.SetScriptHash(u160)
|
id.SetScriptHash(u160)
|
||||||
|
|
||||||
prm := neofsid.CommonBindPrm{}
|
prm := frostfsid.CommonBindPrm{}
|
||||||
prm.SetOwnerID(id.WalletBytes())
|
prm.SetOwnerID(id.WalletBytes())
|
||||||
prm.SetKeys(e.Keys())
|
prm.SetKeys(e.Keys())
|
||||||
prm.SetHash(e.bindCommon.TxHash())
|
prm.SetHash(e.bindCommon.TxHash())
|
|
@ -2,7 +2,7 @@ package frostfs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
|
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"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,10 +7,10 @@ import (
|
||||||
|
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client"
|
"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/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"
|
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"
|
||||||
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"
|
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||||
lru "github.com/hashicorp/golang-lru/v2"
|
lru "github.com/hashicorp/golang-lru/v2"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
||||||
|
@ -52,15 +52,15 @@ type (
|
||||||
mintEmitValue fixedn.Fixed8
|
mintEmitValue fixedn.Fixed8
|
||||||
gasBalanceThreshold int64
|
gasBalanceThreshold int64
|
||||||
|
|
||||||
frostfsIDClient *neofsid.Client
|
frostfsIDClient *frostfsid.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Params of the processor constructor.
|
// Params of the processor constructor.
|
||||||
Params struct {
|
Params struct {
|
||||||
Log *logger.Logger
|
Log *logger.Logger
|
||||||
PoolSize int
|
PoolSize int
|
||||||
NeoFSContract util.Uint160
|
FrostFSContract util.Uint160
|
||||||
NeoFSIDClient *neofsid.Client
|
FrostFSIDClient *frostfsid.Client
|
||||||
BalanceClient *balance.Client
|
BalanceClient *balance.Client
|
||||||
NetmapClient *nmClient.Client
|
NetmapClient *nmClient.Client
|
||||||
MorphClient *client.Client
|
MorphClient *client.Client
|
||||||
|
@ -113,7 +113,7 @@ func New(p *Params) (*Processor, error) {
|
||||||
return &Processor{
|
return &Processor{
|
||||||
log: p.Log,
|
log: p.Log,
|
||||||
pool: pool,
|
pool: pool,
|
||||||
frostfsContract: p.NeoFSContract,
|
frostfsContract: p.FrostFSContract,
|
||||||
balanceClient: p.BalanceClient,
|
balanceClient: p.BalanceClient,
|
||||||
netmapClient: p.NetmapClient,
|
netmapClient: p.NetmapClient,
|
||||||
morphClient: p.MorphClient,
|
morphClient: p.MorphClient,
|
||||||
|
@ -126,7 +126,7 @@ func New(p *Params) (*Processor, error) {
|
||||||
mintEmitValue: p.MintEmitValue,
|
mintEmitValue: p.MintEmitValue,
|
||||||
gasBalanceThreshold: p.GasBalanceThreshold,
|
gasBalanceThreshold: p.GasBalanceThreshold,
|
||||||
|
|
||||||
frostfsIDClient: p.NeoFSIDClient,
|
frostfsIDClient: p.FrostFSIDClient,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client"
|
"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"
|
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/crypto/keys"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client"
|
"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"
|
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"
|
||||||
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event/rolemanagement"
|
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event/rolemanagement"
|
||||||
|
@ -84,7 +84,7 @@ type (
|
||||||
|
|
||||||
MorphClient *client.Client
|
MorphClient *client.Client
|
||||||
MainnetClient *client.Client
|
MainnetClient *client.Client
|
||||||
NeoFSClient *frostfscontract.Client
|
FrostFSClient *frostfscontract.Client
|
||||||
NetmapClient *nmClient.Client
|
NetmapClient *nmClient.Client
|
||||||
|
|
||||||
NotaryDisabled bool
|
NotaryDisabled bool
|
||||||
|
@ -121,7 +121,7 @@ func New(p *Params) (*Processor, error) {
|
||||||
return &Processor{
|
return &Processor{
|
||||||
log: p.Log,
|
log: p.Log,
|
||||||
pool: pool,
|
pool: pool,
|
||||||
frostfsClient: p.NeoFSClient,
|
frostfsClient: p.FrostFSClient,
|
||||||
netmapClient: p.NetmapClient,
|
netmapClient: p.NetmapClient,
|
||||||
alphabetState: p.AlphabetState,
|
alphabetState: p.AlphabetState,
|
||||||
epochState: p.EpochState,
|
epochState: p.EpochState,
|
||||||
|
|
|
@ -163,7 +163,7 @@ func (e *notHaltStateError) Error() string {
|
||||||
|
|
||||||
var errEmptyInvocationScript = errors.New("got empty invocation script from neo node")
|
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 {
|
type frostfsError struct {
|
||||||
err error
|
err error
|
||||||
}
|
}
|
||||||
|
@ -172,8 +172,8 @@ func (e frostfsError) Error() string {
|
||||||
return fmt.Sprintf("frostfs error: %v", e.err)
|
return fmt.Sprintf("frostfs error: %v", e.err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// wraps NeoFS-specific error into frostfsError. Arg must not be nil.
|
// wraps FrostFS-specific error into frostfsError. Arg must not be nil.
|
||||||
func wrapNeoFSError(err error) error {
|
func wrapFrostFSError(err error) error {
|
||||||
return frostfsError{err}
|
return frostfsError{err}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ func (c *Client) TestInvoke(contract util.Uint160, method string, args ...interf
|
||||||
}
|
}
|
||||||
|
|
||||||
if val.State != HaltState {
|
if val.State != HaltState {
|
||||||
return nil, wrapNeoFSError(¬HaltStateError{state: val.State, exception: val.FaultException})
|
return nil, wrapFrostFSError(¬HaltStateError{state: val.State, exception: val.FaultException})
|
||||||
}
|
}
|
||||||
|
|
||||||
return val.Stack, nil
|
return val.Stack, nil
|
||||||
|
@ -433,7 +433,7 @@ func toStackParameter(value interface{}) (sc.Parameter, error) {
|
||||||
result.Type = sc.BoolType
|
result.Type = sc.BoolType
|
||||||
result.Value = v
|
result.Value = v
|
||||||
default:
|
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
|
return result, nil
|
||||||
|
|
|
@ -10,14 +10,14 @@ import (
|
||||||
|
|
||||||
// Client is a wrapper over StaticClient
|
// Client is a wrapper over StaticClient
|
||||||
// which makes calls with the names and arguments
|
// which makes calls with the names and arguments
|
||||||
// of the NeoFS contract.
|
// of the FrostFS contract.
|
||||||
//
|
//
|
||||||
// Working client must be created via constructor New.
|
// Working client must be created via constructor New.
|
||||||
// Using the Client that has been created with new(Client)
|
// Using the Client that has been created with new(Client)
|
||||||
// expression (or just declaring a Client variable) is unsafe
|
// expression (or just declaring a Client variable) is unsafe
|
||||||
// and can lead to panic.
|
// and can lead to panic.
|
||||||
type Client struct {
|
type Client struct {
|
||||||
client *client.StaticClient // static NeoFS contract client
|
client *client.StaticClient // static FrostFS contract client
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
|
@ -1,4 +1,4 @@
|
||||||
package neofsid
|
package frostfsid
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -1,4 +1,4 @@
|
||||||
package neofsid
|
package frostfsid
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -1,4 +1,4 @@
|
||||||
package neofsid
|
package frostfsid
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/elliptic"
|
"crypto/elliptic"
|
|
@ -26,8 +26,8 @@ const (
|
||||||
NNSBalanceContractName = "balance.frostfs"
|
NNSBalanceContractName = "balance.frostfs"
|
||||||
// NNSContainerContractName is a name of the container contract in NNS.
|
// NNSContainerContractName is a name of the container contract in NNS.
|
||||||
NNSContainerContractName = "container.frostfs"
|
NNSContainerContractName = "container.frostfs"
|
||||||
// NNSNeoFSIDContractName is a name of the frostfsid contract in NNS.
|
// NNSFrostFSIDContractName is a name of the frostfsid contract in NNS.
|
||||||
NNSNeoFSIDContractName = "frostfsid.frostfs"
|
NNSFrostFSIDContractName = "frostfsid.frostfs"
|
||||||
// NNSNetmapContractName is a name of the netmap contract in NNS.
|
// NNSNetmapContractName is a name of the netmap contract in NNS.
|
||||||
NNSNetmapContractName = "netmap.frostfs"
|
NNSNetmapContractName = "netmap.frostfs"
|
||||||
// NNSProxyContractName is a name of the proxy contract in NNS.
|
// NNSProxyContractName is a name of the proxy contract in NNS.
|
||||||
|
|
|
@ -243,12 +243,12 @@ func (c *Client) GetNotaryDeposit() (res int64, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(items) != 1 {
|
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()
|
bigIntDeposit, err := items[0].TryInteger()
|
||||||
if err != nil {
|
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
|
return bigIntDeposit.Int64(), nil
|
||||||
|
@ -475,12 +475,12 @@ func (c *Client) notaryInvoke(committee, invokedByAlpha bool, contract util.Uint
|
||||||
|
|
||||||
// check invocation state
|
// check invocation state
|
||||||
if test.State != HaltState {
|
if test.State != HaltState {
|
||||||
return wrapNeoFSError(¬HaltStateError{state: test.State, exception: test.FaultException})
|
return wrapFrostFSError(¬HaltStateError{state: test.State, exception: test.FaultException})
|
||||||
}
|
}
|
||||||
|
|
||||||
// if test invocation failed, then return error
|
// if test invocation failed, then return error
|
||||||
if len(test.Script) == 0 {
|
if len(test.Script) == 0 {
|
||||||
return wrapNeoFSError(errEmptyInvocationScript)
|
return wrapFrostFSError(errEmptyInvocationScript)
|
||||||
}
|
}
|
||||||
|
|
||||||
// after test invocation we build main multisig transaction
|
// 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)
|
multisigScript, err := sc.CreateMultiSigRedeemScript(m, ir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// wrap error as NeoFS-specific since the call is not related to any client
|
// 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{
|
s = append(s, transaction.Signer{
|
||||||
|
@ -704,7 +704,7 @@ func (c *Client) notaryMultisigAccount(ir []*keys.PublicKey, committee, invokedB
|
||||||
err := multisigAccount.ConvertMultisig(m, ir)
|
err := multisigAccount.ConvertMultisig(m, ir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// wrap error as NeoFS-specific since the call is not related to any client
|
// 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 {
|
} else {
|
||||||
// alphabet multisig redeem script is
|
// alphabet multisig redeem script is
|
||||||
|
@ -713,7 +713,7 @@ func (c *Client) notaryMultisigAccount(ir []*keys.PublicKey, committee, invokedB
|
||||||
multisigAccount, err = notary.FakeMultisigAccount(m, ir)
|
multisigAccount, err = notary.FakeMultisigAccount(m, ir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// wrap error as NeoFS-specific since the call is not related to any client
|
// 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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ func StringFromStackItem(param stackitem.Item) (string, error) {
|
||||||
func addFeeCheckerModifier(add int64) func(r *result.Invoke, t *transaction.Transaction) error {
|
func addFeeCheckerModifier(add int64) func(r *result.Invoke, t *transaction.Transaction) error {
|
||||||
return func(r *result.Invoke, t *transaction.Transaction) error {
|
return func(r *result.Invoke, t *transaction.Transaction) error {
|
||||||
if r.State != HaltState {
|
if r.State != HaltState {
|
||||||
return wrapNeoFSError(¬HaltStateError{state: r.State, exception: r.FaultException})
|
return wrapFrostFSError(¬HaltStateError{state: r.State, exception: r.FaultException})
|
||||||
}
|
}
|
||||||
|
|
||||||
t.SystemFee += add
|
t.SystemFee += add
|
||||||
|
|
BIN
pkg/services/control/ir/service.pb.go
generated
BIN
pkg/services/control/ir/service.pb.go
generated
Binary file not shown.
BIN
pkg/services/control/ir/service_grpc.pb.go
generated
BIN
pkg/services/control/ir/service_grpc.pb.go
generated
Binary file not shown.
BIN
pkg/services/control/ir/types.pb.go
generated
BIN
pkg/services/control/ir/types.pb.go
generated
Binary file not shown.
BIN
pkg/services/control/service.pb.go
generated
BIN
pkg/services/control/service.pb.go
generated
Binary file not shown.
BIN
pkg/services/control/service_grpc.pb.go
generated
BIN
pkg/services/control/service_grpc.pb.go
generated
Binary file not shown.
BIN
pkg/services/control/types.pb.go
generated
BIN
pkg/services/control/types.pb.go
generated
Binary file not shown.
BIN
pkg/services/tree/service.pb.go
generated
BIN
pkg/services/tree/service.pb.go
generated
Binary file not shown.
BIN
pkg/services/tree/service_grpc.pb.go
generated
BIN
pkg/services/tree/service_grpc.pb.go
generated
Binary file not shown.
BIN
pkg/services/tree/types.pb.go
generated
BIN
pkg/services/tree/types.pb.go
generated
Binary file not shown.
Loading…
Reference in a new issue