NeoFS T5 Testnet has been started

Neo SPCC
6 min readAug 1, 2022

--

NeoSPCC continues to work on distributed decentralized object storage NeoFS. We have already launched the Testnet T5 with all our services.

Up-to-date information on the NeoFS network can now always be viewed on the new website https://status.fs.neo.org.

With the latest NeoFS release we have implemented a lot of improvements and updates to make the storage system more reliable, faster and safer.

Also, we will start soon a new service based on NeoFS — NeoFS.СDN. It will open the world of WEB3.0 for modern Web developers and will make it very easy to deploy your sites on the decentralized Internet. Stay tuned.

We will talk about a huge number of innovations in separate in-depth guides, but for now let’s look at basic operations through neofs-cli, so that you can try the NeoFS service without much preparation or deep technical knowledge.

How to start with NeoFS T5 Testnet

Create Wallet and get neofs-cli

First, you need to create a wallet and request N3 Testnet GAS tokens.

Get NeoGo (will be used here). NeoGo’s latest releases are available here. All wallet-related actions can be done with other wallet apps, here you can find more information.

Get neofs-cli binary from the latest release here.

$ wget https://github.com/nspcc-dev/neo-go/releases/download/v0.99.1/neo-go-linux-amd64 -O neo-go$ chmod +x neo-go$ cp neo-go /usr/local/bin/neo-go$ neo-go --version
neo-go version 0.99.1
$ wget https://github.com/nspcc-dev/neofs-node/releases/download/v0.30.1/neofs-cli-amd64 -O neofs-cli$ chmod +x neofs-cli$ cp neofs-cli /usr/local/bin/neofs-cli$ neofs-cli --version
NeoFS CLI
Version: v0.30.1
GoVersion: go1.17.11
  • Create an N3 wallet and check your address.
$ neo-go wallet init -w wallet.json -a
  • To get your wallet address and the public key, you can use the following command:
$ neo-go wallet dump-keys -w wallet.json
NTRyEpPKFHaxj8uphYi54DJtbbCUtyYjyg (simple signature contract):
027810f6af30862884c7b0cd2d7705fffaa7e3254cecd8707fbd0223e8864c2be4

Now you can request N3 T5 Testnet GAS via the NGD N3 TestNet faucet.

  1. Open NEO3 Testnet Faucet and request GAS.
  2. Check your address here to see that everything is done correctly.

Make a Deposit

To make a deposit to the NeoFS account, execute the transfer method to the NeoFS Smart Contract address.

neo-go wallet nep17 transfer -w wallet.json -r https://rpc.t5.n3.nspcc.ru:20331 --from {address} --to  NZAUkYbJ1Cb2HrNmwZ1pg9xYHBhm2FgtKV--token GAS --amount {amount}
  • {address} — N3 address from your wallet (NTRyEpPKFHaxj8uphYi54DJtbbCUtyYjyg in example above)
  • {amount} — number of gas tokens to add to the NeoFS balance

example:

$ neo-go wallet nep17 transfer -w wallet.json -r https://rpc.t5.n3.nspcc.ru:20331 --from NTRyEpPKFHaxj8uphYi54DJtbbCUtyYjyg --to NZAUkYbJ1Cb2HrNmwZ1pg9xYHBhm2FgtKV --token GAS --amount 20Enter password > 
Network fee: 0.00123252
System fee: 0.01451339
Total fee: 0.01574591
Relay transaction (y|N)> y
00fe1882fef5ab5edaca153b4cfb8949328873b4e52577b36341705a15b64ebd

Check NeoFS balance

To get NeoFS balance, execute the command below:

$ neofs-cli -r {NEOFS_ENDPOINT} -w wallet.json accounting balance
  • {NEOFS_ENDPOINT} — any NeoFS node. Actual endpoints information is available here.

For example:

$ neofs-cli -r st1.t5.fs.neo.org:8080 -w wallet.json accounting balance Enter password > 
106.00173390

Create your first container

In NeoFS, users put their data into Containers. Containers are like folders in a file system or buckets in Amazon’s S3 but with Storage Policy attached. Storage Policy is set up by the user and defines how objects in this container should be stored.

The policy can use nodes attributes as follows, “Store data in three different countries on two different continents in three copies on nodes with SSD disks and good reputation.” Storage nodes will do their best to keep data in accordance with this policy. Otherwise, they will not get paid for their service.

To create a container, one has to set Storage Policy via neofs-cli command. For now, we will give a simple example of storing several copies of data on random storage nodes. For instance, to store an object in 3 copies, we should declare such policy as REP 3.

On T5 testnet, anyone can easily add and kill their own node, as this network is designed for testing and development. Therefore, we recommend for the first time to create a container with the storage rule 'REP 2 IN X CBF 2 SELECT 2 FROM F AS X FILTER "Deployed" EQ "NSPCC" AS F'. Such placement policy stores objects on nodes which are deployed by NeoSPCC.

There are several predefined basic Access Control Lists (ACL):

  • private,
  • public-read,
  • public-read-write.

In a public-read-write container, everyone can read and write objects to the container. In a private container, only the owner of the container can execute read and write operations. In a public-read (read-only) container, only the owner can write to the container, but anyone can read data from it. In our example, we will use the predefined public-read basic ACL.

To do it, we should execute neofs-cli command as follows:

$ neofs-cli -r st1.t5.fs.neo.org:8080 -w wallet.json container create --policy 'REP 2 IN X CBF 2 SELECT 2 FROM F AS X FILTER "Deployed" EQ "NSPCC" AS F' --basic-acl public-read --awaitEnter password > 
container ID: 7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv
awaiting...
container has been persisted on sidechain

It can take some time to process the transaction on N3 Testnet.

Container ID for your data is 7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv.

Once the container is created, we can upload data to the NeoFS network.

Upload a file to NeoFS

To put an object in our container, we should execute the neofs-cli command.

We can also add some user headers to the object to run search operations by specific filters in the future.

We will set content_tag as cat and my_attr as cute, for example.

$ neofs-cli -r st1.t5.fs.neo.org:8080 -w wallet.json object put --file cat.jpg --cid 7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv --attributes content_tag=cat,my_attr=cuteEnter password > 
233776 / 233776 [===============================================================================================================================================================================] 100.00% 1s
[cat.jpg] Object successfully stored
ID: C4FWmxCGyv6vkXbnnAMXRFMSnkEfZCSG8FJ2WdEr2noS
CID: 7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv

And in addition, we will upload a video file cat.mp4.

Get your file or share it with friends

To get the object, you can use the command below with either any key (in case of public container) or an owner key (in case of private container):

$ neofs-cli -r st1.t5.fs.neo.org:8080 -w wallet.json object get --cid {CONTAINER_ID} --oid {OBJECT_ID} --file {PATH_TO_FILE}

Search for objects with some specific attributes in the container

To run search operation, you can use different filters by meta information of the objects. For example, you can filter objects by attributes declared in the previous steps:

$ neofs-cli -r st1.t5.fs.neo.org:8080 -w wallet.json object search --cid 7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv --filters 'content_tag EQ cat' --filters 'my_attr EQ cute'Enter password > 
Found 2 objects.
FVaR4RiwzeG79BURYHU4xVNE2BcHB7NaGpEDH5nsEGue
C4FWmxCGyv6vkXbnnAMXRFMSnkEfZCSG8FJ2WdEr2noS

Try our public HTTP Gateway

We provide a demo HTTP gateway, but recommend to deploy your own instance for your applications.

How to launch your HTTP-gateway — we will describe it in detail in the following articles.

In the meantime, you can use the description from the repository — https://github.com/nspcc-dev/neofs-http-gw.

To open a file in the browser just use links like:

https://http.t5.fs.neo.org/7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv/{Object ID or file name}

For uploaded examples:

https://http.t5.fs.neo.org/7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv/cat.jpg

https://http.t5.fs.neo.org/7gHG4HB3BrpFcH9BN3KMZg6hEETx4mFP71nEoNXHFqrv/cat.mp4

Disclaimer

Remember, though, that it is Testnet. If you have any problems, mail us via ops@nspcc.ru or file issues on Github. Also, be aware that depending on the capacity of the test network and production needs, we can periodically clear all data stored in N3 TestNet.

The service is designed for individuals 18 years of age or older. As a user of the service, you undertake to follow these terms of service and be responsible for all activities and content you post/upload. In addition to following these terms of service, you are responsible for adhering to all applicable local and national laws. NEO SPCC is not responsible for the content uploaded by users.

--

--

No responses yet