frostfs-node/config/testnet
Alex Vanin 6297bc8965 [#605] config/testnet: Update readme file
Replacing RC2 with RC3 and some rewording.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-11 17:22:14 +03:00
..
config.yml [#551] Add vmagent in neofs-storage testnet image 2021-06-10 20:26:40 +03:00
docker-compose.yml Update N3 RC3 testnet config 2021-06-10 21:09:43 +03:00
prometheus.yml [#551] Add vmagent in neofs-storage testnet image 2021-06-10 20:26:40 +03:00
README.md [#605] config/testnet: Update readme file 2021-06-11 17:22:14 +03:00

N3 testnet RC3 storage node configuration

There is a prepared configuration for NeoFS Storage Node deployment in N3 testnet RC3. The easiest way to deploy Storage Node is to use prepared docker image and run it with docker-compose.

Build image

Prepared neofs-storage-testnet image is available at Docker Hub. However, if you need to rebuild it for some reason, run make image-storage-testnet command.

$ make image-storage-testnet
...
Successfully built ab0557117b02
Successfully tagged nspccdev/neofs-storage-testnet:0.21.1

Deploy node

To run storage node in N3 testnet RC3 environment you should deposit GAS assets, update docker-compose file and start the node.

Deposit

Storage Node owner should deposit GAS to NeoFS smart contract. It generates a bit of side chain GAS in node's wallet. Side chain GAS used to send bootstrap tx.

First obtain GAS in N3 testnet RC3 chain. You can do that with faucet service.

Then make a deposit by transferring GAS to NeoFS contract in N3 testnet RC3. You can provide scripthash in the data argument of transfer tx to make a deposit to specified account. Otherwise, deposit is made to tx sender.

NeoFS contract scripthash in NEO testnet RC3 is 088c76a08c7b4546582fe95df1ba58f61f165645, so the address is NSEawP75SPnnH9sRtk18xJbjYGHu2q5m1W

See a deposit example with neo-go.

neo-go wallet nep17 transfer -w wallet.json -r https://rpc1.n3.nspcc.ru:20331 \
--from NXxRAFPqPstaPByndKMHuC8iGcaHgtRY3m \
--to NSEawP75SPnnH9sRtk18xJbjYGHu2q5m1W \
--token GAS \
--amount 1

Configure

Then configure docker-compose.yml file. Change endpoints values. Both should contain your public IP.

     environment:
       - NEOFS_NODE_ADDRESS=65.52.183.157:36512
       - NEOFS_GRPC_ENDPOINT=65.52.183.157:36512

Set up your UN/LOCODE attribute.

     environment:
       - NEOFS_NODE_ADDRESS=65.52.183.157:36512
       - NEOFS_GRPC_ENDPOINT=65.52.183.157:36512
       - NEOFS_NODE_ATTRIBUTE_1=UN-LOCODE:RU LED

You can validate UN/LOCODE attribute in NeoFS LOCODE database with neofs-cli.

$ neofs-cli util locode info --db ./locode_db --locode 'RU LED'
Country: Russia
Location: Saint Petersburg (ex Leningrad)
Continent: Europe
Subdivision: [SPE] Sankt-Peterburg
Coordinates: 59.53, 30.15

It is recommended to pass node's key as a file. To do so convert your wallet WIF to 32-byte hex (via neofs-cli for example) and save it to file.

// Print WIF in a 32-byte hex format
$ neofs-cli util keyer Kwp4Q933QujZLUCcn39tzY94itNQJS4EjTp28oAMzuxMwabm3p1s
PrivateKey      11ab917cd99170cb8d0d48e78fca317564e6b3aaff7f7058952d6175cdca0f56
PublicKey       02be8b2e837cab232168f5c3303f1b985818b7583682fb49026b8d2f43df7c1059
WIF             Kwp4Q933QujZLUCcn39tzY94itNQJS4EjTp28oAMzuxMwabm3p1s
Wallet3.0       Nfzmk7FAZmEHDhLePdgysQL2FgkJbaEMpQ
ScriptHash3.0   dffe39998f50d42f2e06807866161cd0440b4bdc
ScriptHash3.0BE dc4b0b44d01c16667880062e2fd4508f9939fedf

// Save 32-byte hex into a file
$ echo '11ab917cd99170cb8d0d48e78fca317564e6b3aaff7f7058952d6175cdca0f56' | xxd -r -p > my_wallet.key

Then specify path to this file in docker-compose

     volumes:
      - neofs_storage:/storage
      - ./my_wallet.key:/node.key

NeoFS objects will be stored on your machine. By default, docker-compose configured to store objects in named docker volume neofs_storage. You can specify directory on the filesystem to store objects there.

     volumes:
       - /home/username/neofs/rc3/storage:/storage
       - ./my_wallet.key:/node.key

Start

Run node with docker-compose up command and stop it with docker-compose down.

Debug

To print node logs use docker logs neofs-testnet. To print debug messages in log, setup log level to debug with this env:

     environment:
       - NEOFS_LOGGER_LEVEL=debug