[MemDebugNet] [4/10/23 Testnet] [Offline]

We’ve another testnet hopeful to address some replication flows (or at least give us more insight into any issue) and to allow for sampling of node memory for debugging any memory leaks that may still persist (or at least identify if it is just the cost of connections thus far).

We’ve other improvements to logging around the same topic, removal of some tracing instrumentation (that could well have been a leak location), reinstated an older replication mechanism as the current one looks to be too frail, and some client tweaks too!

For examaple:

  • More retries of failed chunks in the client
  • Reduced metrics logging across the board
  • Removal of failed records should write to disk fail (a potential source of wild incomes :money_mouth_face: )
  • More feedback when getting costs takes time (thanks @mav)

Network Details

Node version: 0.91.16
Client version: 0.83.17
Faucet url: 138.68.161.29: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.83.17
safeup node --version 0.91.16

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 138.68.161.29:8000
safe files upload <directory-path>

Windows:

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

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

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

10 and 40 being the integer values you want to set for each


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.83.17 # get a specific version

safeup node # get the latest version of the node
safeup node --version 0.91.16 # 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 138.68.161.29: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] [XORURL]

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.

28 Likes

First!

Then to read…

14 Likes

adding nodes now Beb blag test is passed :slight_smile:

safe files download BegBlagandSteal.mp3 80744b3d25bab269cab54e8baccf4f54f1aa01615230b99171bc3576c1ca7230
14 Likes

Hey Neik, wanna some money? Post your address!

8 Likes

you know i do b4b282e3d7dcf035a6f28d9aadab7298efb579e5a4ab0ea96e882061e2995a33290628eb979d6343c1707df5ab648341

faucet is very speedy today !!

9 Likes

@joshuef, the client logs don’t appear to have the command line at the beginning. If there would be quick fix for this, I’d become a happy man.

6 Likes

So are transfers!

real	0m6,838s
user	0m0,968s
sys	0m0,220s

Here you go, now buy something nice for yourself!

time safe wallet receive 6f6fd0bf0acdaa041b95fe2b1cfb6973b73db31d6a0dca4197ffa518434f1793089eec20a7c1ccb4c44c4b1b1864de0f05f5180f43a842c41dde332b4eae142b6664773995473e70cebe2dafdfb36b16818d6a865e40abe65ce54c9d9b962d8e29ff4a6782195b947713d569b2df4d7f6492221a8e5c5a2eea5332deada45c76d574b5a544e318f090473c135a35c54040fb46a4eab079bd2225036ef12525c722a246e394a15f1cc61da13082af5d56658711ce369080ffddd9437574cec79e15c81900000000000000638aef4b2e9d6b1b60e49ed0c3aca9d64cbb8cc60ed747f7a7e9eee2ffe8e2f7d2dbb542f6f8a0a7d0b4468d09d604e4880000000000000001
4 Likes

Error in uploading:

Summary
Uploaded 40 chunks in 32.310868489s. Current progress is 720/1045.
Getting upload costs from network for 40 chunks...
Transfers applied locally
Error: 
   0: Transfer Error Failed to send tokens due to Network Error Could not retrieve the record after storing it: f6a94fed485f58af958f4ae2a8b37f334e71d64dc7f4d55a460da7406e104cc7..
   1: Failed to send tokens due to Network Error Could not retrieve the record after storing it: f6a94fed485f58af958f4ae2a8b37f334e71d64dc7f4d55a460da7406e104cc7.

Location:
   sn_cli/src/subcommands/files.rs:209

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

real	10m21,733s
user	16m23,846s
sys	1m10,333s

EDIT: Hmm… maybe I blew it by sending money to @neik while uploading :face_with_peeking_eye:

5 Likes

You are correct :thinking: I think I’ve done something dumb with my commit and pushed another branch I was working on which is in. The code isn’t there.

Doing another one now. A new client version will that soon!

11 Likes

Thanks, will make things so much easier for us :raised_hands:

4 Likes

Ah yeh, that will bork things still, I’m afraid. Clear our and re-faucet yersel and off you go again! :smiley:

7 Likes

no dice :frowning:

ubuntu@safe-byres:~$ time safe wallet receive 6f6fd0bf0acdaa041b95fe2b1cfb6973b73db31d6a0dca4197ffa518434f1793089eec20a7c1ccb4c44c4b1b1864de0f05f5180f43a842c41dde332b4eae142b6664773995473e70cebe2dafdfb36b16818d6a865e40abe65ce54c9d9b962d8e29ff4a6782195b947713d569b2df4d7f6492221a8e5c5a2eea5332deada45c76d574b5a544e318f090473c135a35c54040fb46a4eab079bd2225036ef12525c722a246e394a15f1cc61da13082af5d56658711ce369080ffddd9437574cec79e15c81900000000000000638aef4b2e9d6b1b60e49ed0c3aca9d64cbb8cc60ed747f7a7e9eee2ffe8e2f7d2dbb542f6f8a0a7d0b4468d09d604e48800000000000000018aef4b2e9d6b1b60e49ed0c3aca9d64cbb8cc60ed747f7a7e9eee2ffe8e2f7d2dbb542f6f8a0a7d0b4468d09d60                                                        Logging to directory: "/home/ubuntu/.local/share/safe/client/logs/log_2023-10-04_12-23-05"
Built with git version: 46bfcca / main / 46bfcca
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 w/peers: ["/ip4/138.68.175.236/tcp/38365/p2p/12D3KooWBk7HqragMtCdmfTYVAy8T9jJuPRbade5BjE3q7sDXuYC", "/ip4/134.122.110.132/tcp/42537/p2p/12D3KooW9x133NoUsif3aXLw33MinDLXMKvdQwL8Fy6FPnKk1U1p", "/ip4/138.68.178.41/tcp/35753/p2p/12D3KooW9t3EoKMrxY98Hd8m92rkKzDguyP7qmNP1Yb5nzKHsUsX", "/ip4/209.97.183.90/tcp/35353/p2p/12D3KooWBJQSD2qrpqdHau6dti5tihkK8NBFAyjeRuHR5aZgZ7EZ", "/ip4/209.97.134.128/tcp/36563/p2p/12D3KooW9uycSAMUxnVMXBFDtvFkmSmZJ2p5vJy6mvyv6986WkVw", "/ip4/165.22.114.243/tcp/43507/p2p/12D3KooWA88RP5cNNxQZrnLHGxU21EYFvfDjVYZkn3aestkqDyze", "/ip4/165.227.226.209/tcp/37861/p2p/12D3KooW9rENjfWvuoHahcQiziWk4B9Yfzw7kBSi6BrBFp4rUhp3", "/ip4/167.99.89.78/tcp/39385/p2p/12D3KooWAUUTizhiGYqFcJksDk7YbWXMra7DhkJormQY5LwstXbV", "/ip4/178.62.5.22/tcp/41709/p2p/12D3KooWA4WvSGtGkFVJT14q7kSss8UZZHm1PMSntuJNE5tSoSut", "/ip4/134.122.110.125/tcp/43885/p2p/12D3KooWCUxxiNK4TU98yiSbZf1pAVTai5qcH9sTvkN2QjHRiTno", "/ip4/138.68.182.225/tcp/34247/p2p/12D3KooWA4YKEECUHGBmAAGsLsuCihdb5mMgkJSfbvt9ysaLASFQ", "/ip4/138.68.190.1/tcp/37523/p2p/12D3KooWADMxubnokBfg1xNwMUwY2Z4yqYjrRjTB6CXkrh48L7Ne", "/ip4/142.93.35.1/tcp/44573/p2p/12D3KooWBLJGVswdvJvvBLU33WCwJdLSxzKmWdPyghLvKaxHt9xN", "/ip4/167.99.89.55/tcp/36549/p2p/12D3KooWAbPRA4MjFnpcdsTEHdiifLctywvanMQgRj91cSgm2eq4", "/ip4/165.227.238.161/tcp/39591/p2p/12D3KooWB5PKufJLJ2Lzm16uBzFHPXK46Qz2RPbmm6K4mTVxeHBF", "/ip4/165.232.98.177/tcp/42309/p2p/12D3KooW9rHbExmGFDu3rEx5Cei57vH5ahftncZXRBCuQjAxhjrv", "/ip4/209.97.128.181/tcp/45271/p2p/12D3KooWAkJybhpGKrpurFN3XkLxKnKc8CLSSJDNMaEPgZrk6nQs", "/ip4/68.183.33.142/tcp/34385/p2p/12D3KooW9qo2TEV6jTrFe8JCTs4CdGwjoZHKVFwpiWmjyQGRxN9a", "/ip4/209.97.143.12/tcp/45085/p2p/12D3KooWCKZyxndJoL7snv1w6q4WkgsDzQB6n3rPFVCCSpcePbVd", "/ip4/161.35.161.196/tcp/44469/p2p/12D3KooW9uZJEnTm2eg6CrMvbepn5RSgkAMU4RQsNzk9nmBbwX55"]...
🔗 Connected to the Network                                                                                                                                                                                                                  Successfully parsed transfer.
Verifying transfer with the Network...
Failed to verify and redeem transfer: CouldNotReceiveMoney("InvalidTransfer(\"None of the CashNoteRedemptions are refered to in upstream Txs\")")

real    0m1.837s
user    0m0.231s
sys     0m0.043s

1 Like

Double-spend prevention in action! … which also blowed my upload.

But interestingly the 22 tokens I tried to send to @neik were not reduced from my wallet balance. Oh, but of course the “double” of the double spend would be just the few nanos that were spent for the payment of chunks. :ok_hand:

And now that I started a new upload after successfully sending 22 tokens, the new balance is that expected 22 tokens lower. So when accidentally double spending, only the few nanos got wasted, I guess.

That was not necessary, upload succeeded just by retrying.

@neik, have some more, I bet this time it comes through:

Summary
time safe wallet receive 8c9be448443acba1d899499728762d32741963e68602e2667937aabc59c379d7518c875cf160639dd42486b4cc876f11de81e5e272aaa86e1e69497a8882d3bb8e871e9a5b5e2bee3ad4ddb66160bd818a3ce73e68b462765ec5515edc55ae92b18ae5ed509dd858c3463e00e6f40def72ebbb21e62968980ba19387583ad7f97da13c8a28fd6fe5bae6a04d4a6f68f660b28e092d1db3c18d04ed2e83110a0051bea3b9e05f80001972016905fd470a3c001c795e2007990e1191ce2fe0648cf8570000000000000062651836d29a973e78a26dff1a546252876f4863e0350c3a84b58e07066b85481d9c34601fe44e85944f7c53781f880ab70000000000000001
5 Likes

Out for a bite to eat I’ll get on it when I get back to the keyboard

4 Likes

in the queue

5 Likes

Year of the testnet continues. Congrats yet again

Now I have to try and remember how many so far :partying_face: :tada:

14 Likes

Error in the first upload. The initial 200 chunks was OK but the next chunks give this error.

Error:
0: Transfer Error Failed to send tokens due to Network Error Could not retrieve the record after storing it: cd6182bd93a5558e4c2c507e3c498b6645520b2592d2efe0534c0e100a14d85b…
1: Failed to send tokens due to Network Error Could not retrieve the record after storing it: cd6182bd93a5558e4c2c507e3c498b6645520b2592d2efe0534c0e100a14d85b.

Location:
sn_cli/src/subcommands/files.rs:209

3 Likes

22 coins well recieved :slight_smile:

$ time safe wallet receive 8c9be448443acba1d899499728762d32741963e68602e2667937aabc59c379d7518c875cf160639dd42486b4cc876f11de81e5e272aaa86e1e69497a8882d3bb8e871e9a5b5e2bee3ad4ddb66160bd818a3ce73e68b462765ec5515edc55ae92b18ae5ed509dd858c3463e00e6f40def72ebbb21e62968980ba19387583ad7f97da13c8a28fd6fe5bae6a04d4a6f68f660b28e092d1db3c18d04ed2e83110a0051bea3b9e05f80001972016905fd470a3c001c795e2007990e1191ce2fe0648cf8570000000000000062651836d29a973e78a26dff1a546252876f4863e0350c3a84b58e07066b85481d9c34601fe44e85944f7c53781f880ab70000000000000001
Logging to directory: "/home/ubuntu/.local/share/safe/client/logs/log_2023-10-04_13-39-13"
Built with git version: 46bfcca / main / 46bfcca
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 w/peers: ["/ip4/138.68.175.236/tcp/38365/p2p/12D3KooWBk7HqragMtCdmfTYVAy8T9jJuPRbade5BjE3q7sDXuYC", "/ip4/134.122.110.132/tcp/42537/p2p/12D3KooW9x133NoUsif3aXLw33MinDLXMKvdQwL8Fy6FPnKk1U1p", "/ip4/138.68.178.41/tcp/35753/p2p/12D3KooW9t3EoKMrxY98Hd8m92rkKzDguyP7qmNP1Yb5nzKHsUsX", "/ip4/209.97.183.90/tcp/35353/p2p/12D3KooWBJQSD2qrpqdHau6dti5tihkK8NBFAyjeRuHR5aZgZ7EZ", "/ip4/209.97.134.128/tcp/36563/p2p/12D3KooW9uycSAMUxnVMXBFDtvFkmSmZJ2p5vJy6mvyv6986WkVw", "/ip4/165.22.114.243/tcp/43507/p2p/12D3KooWA88RP5cNNxQZrnLHGxU21EYFvfDjVYZkn3aestkqDyze", "/ip4/165.227.226.209/tcp/37861/p2p/12D3KooW9rENjfWvuoHahcQiziWk4B9Yfzw7kBSi6BrBFp4rUhp3", "/ip4/167.99.89.78/tcp/39385/p2p/12D3KooWAUUTizhiGYqFcJksDk7YbWXMra7DhkJormQY5LwstXbV", "/ip4/178.62.5.22/tcp/41709/p2p/12D3KooWA4WvSGtGkFVJT14q7kSss8UZZHm1PMSntuJNE5tSoSut", "/ip4/134.122.110.125/tcp/43885/p2p/12D3KooWCUxxiNK4TU98yiSbZf1pAVTai5qcH9sTvkN2QjHRiTno", "/ip4/138.68.182.225/tcp/34247/p2p/12D3KooWA4YKEECUHGBmAAGsLsuCihdb5mMgkJSfbvt9ysaLASFQ", "/ip4/138.68.190.1/tcp/37523/p2p/12D3KooWADMxubnokBfg1xNwMUwY2Z4yqYjrRjTB6CXkrh48L7Ne", "/ip4/142.93.35.1/tcp/44573/p2p/12D3KooWBLJGVswdvJvvBLU33WCwJdLSxzKmWdPyghLvKaxHt9xN", "/ip4/167.99.89.55/tcp/36549/p2p/12D3KooWAbPRA4MjFnpcdsTEHdiifLctywvanMQgRj91cSgm2eq4", "/ip4/165.227.238.161/tcp/39591/p2p/12D3KooWB5PKufJLJ2Lzm16uBzFHPXK46Qz2RPbmm6K4mTVxeHBF", "/ip4/165.232.98.177/tcp/42309/p2p/12D3KooW9rHbExmGFDu3rEx5Cei57vH5ahftncZXRBCuQjAxhjrv", "/ip4/209.97.128.181/tcp/45271/p2p/12D3KooWAkJybhpGKrpurFN3XkLxKnKc8CLSSJDNMaEPgZrk6nQs", "/ip4/68.183.33.142/tcp/34385/p2p/12D3KooW9qo2TEV6jTrFe8JCTs4CdGwjoZHKVFwpiWmjyQGRxN9a", "/ip4/209.97.143.12/tcp/45085/p2p/12D3KooWCKZyxndJoL7snv1w6q4WkgsDzQB6n3rPFVCCSpcePbVd", "/ip4/161.35.161.196/tcp/44469/p2p/12D3KooW9uZJEnTm2eg6CrMvbepn5RSgkAMU4RQsNzk9nmBbwX55"]...
🔗 Connected to the Network                                                                                          Successfully parsed transfer.
Verifying transfer with the Network...
Successfully verified transfer.
Successfully stored cash_note to wallet dir.
Old balance: 499.999996496
New balance: 521.999996496

real    0m1.717s
user    0m0.331s
sys     0m0.093s


2 Likes

Can you send us logs please? :bowing_man:

2 Likes