[Offline] BbbbBadNet [21/03/2024 Testnet]

For our next trick, we’ve added basic bad node detection, as well as fixed some issues from node startups in the previous testnet.

On top of this, we’ve tweaked the storage pricing algorithm to increase more over time to see what impact this has on node storage/hypothetical demand.

We’re really aiming to check out if there’s any major issues with these changes (and while the underlying bug that was causing bad nodes to surface should have been fixed, it’ll be interesting to see if we get any under normal use).

Network Details

Node version: 0.104.41
Client version: 0.89.85
Faucet url: 178.128.175.208:8000

We have 101 droplets running a total of 2001 nodes. One droplet has 2vcpu and 4GB of memory.


If you are a regular user, see the ‘quickstart’ section for getting up and running.

If you are a first-time user, or would like more information, see the ‘further information’ section.


Quickstart

If you already have safeup, you can obtain the client and node binaries:

safeup client --version 0.89.85
safeup node --version 0.104.41

Run a Node

Linux/macOS:

safenode

Windows:

safenode

Check local node’s reward balance

Your local node’s peer id will be printed to the terminal on startup with an example command). (You can also retrieve this from the node directory.)

safe wallet balance --peer-id="<local-node-peer-id>"

Connect to the Network as a Client

Linux/macOS:

safe wallet get-faucet 178.128.175.208:8000
safe files upload <directory-path>

Windows:

safe wallet get-faucet 178.128.175.208:8000
safe files upload <directory-path>

To do this with non-default batch-sizes (along with SAFE_PEERS set as above):

safe files upload --batch-size 40 <directory-path> 

40 being the integer value you want to set


Further Information

You can participate in the testnet either by connecting as a client or running your own node.

Connecting as a client requires the safe client binary; running a node requires the safenode binary.

Obtaining Binaries

We have a tool named safeup which is intended to make it easy to obtain the client, node, and other utility binaries.

Installing Safeup

On Linux/macOS, run the following command in your terminal:

curl -sSL https://raw.githubusercontent.com/maidsafe/safeup/main/install.sh | bash

On Windows, run the following command in a Powershell session (be careful to use Powershell, not cmd.exe):

iex (Invoke-RestMethod -Uri "https://raw.githubusercontent.com/maidsafe/safeup/main/install.ps1")

On either platform, you may need to restart your shell session for safeup to become available.

Installing Binaries

After obtaining safeup, you can install binaries like so:

safeup client # get the latest version of the client
safeup client --version 0.89.85 # get a specific version

safeup node # get the latest version of the node
safeup node --version 0.104.41 # get a specific version

safeup update # update all installed components to latest versions

When participating in our testnets, it is recommended to use a specific version. In our project we release a new version of the binaries every time we merge new code. This happens frequently, so over the lifetime of a testnet, many new releases will probably occur. So for participating in this particular testnet, you may not want the latest version.

The binaries are installed to ~/.local/bin on Linux and macOS, and on Windows they go to C:\Users\<username>\safe. Windows doesn’t really have a standard location for binaries that doesn’t require elevated privileges.

The safeup tool will modify the PATH variable on Linux/macOS, or the user Path variable on Windows. The effect of this is that the installed binaries will then become available in your shell without having to refer to them with their full paths. However, if you’re installing for the first time, you may need to start a new shell session for this change to be picked up.

Running a Node

You can participate in the testnet by running your own node. At the moment, you may not be successful if you’re running the node from your home machine. This is a situation we are working on. If you run from a cloud provider like Digital Ocean or AWS, you should be able to participate.

You can run the node process like so:

# Linux/macOS
safenode

# Windows
safenode

This will output all the logs to the filesystem, with the location of logs being platform specific:

# Linux
~/.local/share/safe/node/<peer id>/logs

# macOS
/Users/<username>/Library/Application Support/safe/node/<peer id>/logs

# Windows
C:\Users\<username>\AppData\Roaming\safe\node\<peer-id>\logs

If you wish, you can also provide your own path:

# Linux/macOS
SN_LOG=all safenode --log-output-dest <path>

# Windows
$env:SN_LOG = "all"; safenode --log-output-dest <path>

The advantage of using the predefined data-dir location is you can run multiple nodes on one machine without having to specify your own unique path for each node and manage that overhead yourself.

Connecting as a Client

You can use the safe client binary to connect as a client and upload or download files to/from the network.

Using the Client

You’ll first need to get some Safe Network Tokens:

safe wallet get-faucet 178.128.175.208:8000

You can now proceed to use the client, by, e.g., uploading files:

safe files upload <directory-path>

To download that same content:

safe files download

This will download the files to the default location, which is platform specific:

# Linux
~/.local/share/safe/client/downloaded_files

# macOS
/Users/<username>/Library/Application Support/safe/client/downloaded_files

# Windows
C:\Users\<username>\AppData\Roaming\safe\client\downloaded_files

To download to a particular file or directory:

safe file download [directory/filename] [NetworkAddress]

Troubleshooting

Cleanup

If you’ve used previous versions of the network before and you find problems when running commands, you may want to consider clearing out previous data (worthless DBCs from previous runs, old logs, old keys, etc.).

# Linux
rm -rf ~/.local/share/safe

# macOS
rm -rf ~/Library/Application\ Support/safe

# Windows
rmdir /s C:\Users\<username>\AppData\Roaming\safe

If you encounter a problem running any of our binaries on Windows, it’s possible you need the Visual C++ Redistributable installed.

32 Likes

Yay, I needed my fix! :tada:
So far so good, nodes running lean, uploads running ok (not the fastest I’ve seen , as first impression, but still pretty good)
Test download:

"TheBrain 13.0.28.0 Installer.exe" 8adfcc68bf780404b65a7cc4863a52cba3a9063bc31e0713209d44dad870169d
13 Likes

I’m receiving this error as sudo or regular user on Ubuntu 20.04.6 LTS.
I’ve verified the directory /tmp/tmp.5d8RZEV7SF/ exists however the tar.gz is not within it

:~/maidsafe$ rm -rf ~/.local/share/safe
:~/maidsafe$ sudo curl -sSL https://raw.githubusercontent.com/maidsafe/safeup/main/install.sh | bash


  •                                *
    
  •     Installing safeup          *
    
  •                                *
    

Will retrieve safeup for x86_64-unknown-linux-musl architecture
Latest version of safeup is 0.7.0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0Warning: Failed to open the file /tmp/tmp.5d8RZEV7SF/safeup.tar.gz: No such
Warning: file or directory
0 4483k 0 1405 0 0 1558 0 0:49:06 --:–:-- 0:49:06 3946
curl: (23) Failure writing output to destination

3 Likes

See if this solves the problem for you;

4 Likes

How to check if my node was detected as bad by the network?

4 Likes

We do still need port forwarding for nodes from home correct?

8 Likes

Thx 4 the testnet Maidsafe devs, yall’s bad to the bone :sunglasses:

Now test and happy testing super ants

Thought this was fixed in another testnet, no biggie renamed and uploaded

eddy@Hal9000:~$ safe files upload /home/eddy/Downloads/OIG (2).jpeg
bash: syntax error near unexpected token `(’

“electrons.mp4” 6b3add09ce25f62f71acc150baa23a52418b5f7b51fc83c8f5ce95257b35fb37

6 Likes

Great I think I’ll be adding one certain-to-turn-bad node later tonight!

8 Likes

And we’re off… my usual ten cloud nodes:

After seven hours, and having remembered to tell vdash to get prices :man_facepalming:

10 Likes

Which port should we forward? 443?

2 Likes
5 Likes
root@6654ad5899fd:~# time safe files upload -p openSUSE-Tumbleweed-NET-x86_64-Current.iso 
Logging to directory: "/root/.local/share/safe/client/logs/log_2024-03-21_09-48-58"
Built with git version: 01c2e57 / main / 01c2e57
Instantiating a SAFE client...
Trying to fetch the bootstrap peers from https://sn-testnet.s3.eu-west-2.amazonaws.com/network-contacts
Connecting to the network with 49 peers
🔗 Connected to the Network                                                                                                                          Chunking 1 files...
"openSUSE-Tumbleweed-NET-x86_64-Current.iso" will be made public and linkable
Splitting and uploading "openSUSE-Tumbleweed-NET-x86_64-Current.iso" into 553 chunks
**************************************
*          Uploaded Files            *
**************************************
"openSUSE-Tumbleweed-NET-x86_64-Current.iso" d143cc9cc859038d2380237f14244dee0292c210728232e1d5e4ebff57d1cc98
Among 553 chunks, found 0 already existed in network, uploaded the leftover 553 chunks in 3 minutes 31 seconds
**************************************
*          Payment Details           *
**************************************
Made payment of 0.000007946 for 553 chunks
Made payment of 0.000001017 for royalties fees
New wallet balance: 199.999991037

real    4m17.425s
user    3m1.102s
sys     1m26.658s
root@6654ad5899fd:~# ls -lh openSUSE-Tumbleweed-NET-x86_64-Current.iso 
-rw-r--r-- 1 root root 276M Mar 20 06:21 openSUSE-Tumbleweed-NET-x86_64-Current.iso
2 Likes

hmmm - am i the only one having difficulties downloading data that has been uploaded by others here? :thinking: … trying with smaller batch sizes …

2 Likes

I’ve just uploaded a file with the “-p” (public) parameter, maybe that’s the issue? You could try downloading this: 6a3f1090166211886176577f02d06aea38e498235e41a3847e593ac0f5167a65

1 Like

Needs filename also

1 Like

all good - i downloaded @Mindphreaker s file giving it a new name :slight_smile:
aaand downloaded the OpenSuse-File successfully with smaller batch-sizes =)

…the default of 16 seems to be problematic for me right now =)

safe files download “openSUSE-Tumbleweed-NET-x86_64-Current.iso” d143cc9cc859038d2380237f14244dee0292c210728232e1d5e4ebff57d1cc98 --batch-size 4

was no problem =)

6 Likes

safe files download "ant.jpg" d08540ed7fd4f59ada41712c9222bc6f34fc1c7acd8e693a934d570c1465ad3b

safe files download "antopia.jpg" 302d3989f5fb31aede96fc607ed4650507c626efc135cebd4a07f7b2e7663da5

3 Likes

This one is not working for me:

Downloading "electrons.mp4" from 6b3add09ce25f62f71acc150baa23a52
418b5f7b51fc83c8f5ce95257b35fb37 with batch-size 16
Error downloading "electrons.mp4": Network Error GetRecord Query
Error RecordNotFound.
3 Likes

Strange I just downloaded it and it works for me at least…

2 Likes

?

2 Likes