NatNet [May 26 Testnet 2023] [Offline]

Ah - yes I have a rogue older version hanging about :pray:

4 Likes

Seems I’m in with my Windows node. Manually forwarded port. Is there any way to know for sure? I have this in my log, for example:

Query task QueryId(8) returned with peers GetClosestPeersOk

And thanks everyone for helping with the Linux stuff! :heartpulse:

6 Likes

Upload some files, make and edit a few registers then check for chunks in /tmp/safenodedata

3 Likes

Ah…

willie@gagarin:~$ export SAFE_PEERS=/ip4/206.189.29.202/tcp/38379/p2p/12D3KooWN7AJe7wxVckZ6SF3ybYXVgetQ9hkYWHCHLokpSRC31W2
willie@gagarin:~$ .safe/safe files upload ~/Videos/cooking/madhur/madhur05.avi 
Removed old logs from directory: "/tmp/safe-client"
Starting logging to directory: "/tmp/safe-client"
Instantiating a SAFE client...
Current build's git commit hash: ---- No git commit hash found ----
Client successfully connected to the Network.
Storing file "madhur05.avi" of 362742180 bytes..
Did not store file "madhur05.avi" to all nodes in the close group! Network Error Outbound Error.
Writing 8 bytes to "/home/willie/.safe/client/uploaded_files/file_names_2023-05-26_19-08-10"

My cunning plan to provide some chunks for @Toivo’s node failed… curses!!!

EDIT: Do we still have a 10Mb file upload limit?

2 Likes

Lets just all agree this last post didnt happen until I check something, OK?

Yeah - it’s OK - my mistake - registers are working just fine

3 Likes

I kept getting the following error message after extracting the safenode-x86_64-unknown-linux-musl.zip from github and putting it in an alpine LXC at the following locations:

/usr/local/bin/safenode
/root/.safe/node/safenode

which showed ‘safenode’ at /usr/local/bin/ but when I run it produces the following message:
safenode: not found.

I tried chmod +x but that didn’t help either. I didn’t dig into it further.

I then downloaded the natnat github branch, and compiled the safenode binary in debug.

The local compiled binary was able to display the -help properly! With that my first attempt as behind NAT resulted in:

AutoNAT status changed: Unknown -> Private

Error: We have been determined to be behind a NAT. This means we are not reachable externally by other nodes. In the future, the network will implement relays that allow us to still join the network.

Then I tried again this time with NAT port forward rules setup on the router, and providing the --port argument to the local compiled debug safenode binary, and it successfully connected to the network:

AutoNAT status changed: Unknown -> Public
[2023-05-26T18:26:33.476233Z INFO safenode] Connected to the Network

6 Likes

Yaay!!! Found a new error/status message!!!

willie@gagarin:~$ ~/.safe/safe register edit the-new-list "A flock of effing seagulls"
Removed old logs from directory: "/tmp/safe-client"
Starting logging to directory: "/tmp/safe-client"
Instantiating a SAFE client...
Current build's git commit hash: ---- No git commit hash found ----
Client successfully connected to the Network.
Trying to retrieve Register from eefa33(11101110).., 3006
Successfully retrieved Register 'the-new-list' from eefa33.., 3006!
Editing Register 'the-new-list' with: A flock of effing seagulls
We need to merge 2 branches in Register entries: Content branches detected in the Register which need to be merged/resolved by user. Entries hashes of branches are: {(b6ce0d.., [78, 111, 114, 116, 104, 45, 102, 97, 99, 105, 110, 103, 32, 100, 105, 115, 104, 119, 97, 115, 104, 101, 114, 115, 32, 111, 102, 32, 67, 101, 110, 116, 114, 97, 108, 32, 80, 114, 97, 103, 117, 101]), (e57526.., [116, 111, 98, 98, 101, 116, 106])}

And then it exhibits inconsistent behaviour…

willie@gagarin:~$ ~/.safe/safe register edit the-new-list "Further entries"
Removed old logs from directory: "/tmp/safe-client"
Starting logging to directory: "/tmp/safe-client"
Instantiating a SAFE client...
Current build's git commit hash: ---- No git commit hash found ----
Client successfully connected to the Network.
Trying to retrieve Register from eefa33(11101110).., 3006
Successfully retrieved Register 'the-new-list' from eefa33.., 3006!
Editing Register 'the-new-list' with: Further entries
Error: Network Error Outbound Error.

Caused by:
   0: Outbound Error
   1: Connection was closed before a response was received

Location:
    /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/convert/mod.rs:726:9
willie@gagarin:~$ ~/.safe/safe register edit the-new-list "no further entries"
Removed old logs from directory: "/tmp/safe-client"
Starting logging to directory: "/tmp/safe-client"
Instantiating a SAFE client...
Current build's git commit hash: ---- No git commit hash found ----
Client successfully connected to the Network.
Trying to retrieve Register from eefa33(11101110).., 3006
Successfully retrieved Register 'the-new-list' from eefa33.., 3006!
Editing Register 'the-new-list' with: no further entries
We need to merge 2 branches in Register entries: Content branches detected in the Register which need to be merged/resolved by user. Entries hashes of branches are: {(7a8469.., [65, 32, 102, 108, 111, 99, 107, 32, 111, 102, 32, 101, 102, 102, 105, 110, 103, 32, 115, 101, 97, 103, 117, 108, 108, 115]), (7cfa8f.., [70, 117, 114, 116, 104, 101, 114, 32, 101, 110, 116, 114, 105, 101, 115])}

Can someone else try to edit/get register “the-new-list” , please?

2 Likes

I think I have a few of your chunks @Southside

Scotcoin Version 3.0
====================

Scotcoin version 3.0 repository for Sawtooth blockchain infrastructure with ERC-20 Scotcoin token implementation.

## Design

- [**Architecture**](./docs/architecture.md)
- [**Components**](./docs/components.md)
- [**Deployment**](./docs/deployment.md)
- [**Identity**](./docs/identity.md)

## Smart Contracts

- [**Token**](./docs/token.md)
- [**Contracts**](./docs/contracts.md)

---
Copyright 2018 by Blockchain Technology Partners
1 Like

Yes I felt these files should at least be used for something useful cos Blockchain Technology Partners certainly did NOT deliver any useful working code.
So we get some use out of the 6-figure sum they took under false pretences. Good croissants at their Agile scrum meetings though, classy offices as well. The CEO of Blockchain Technology Partners was eventually found to have 3 separate identities at Companies House. But thats another story…

3 Likes

Refresh me please!
What is the size limit at which chunks are not encrypted, or how exactly does it get determined. I have a few of yours that I can view, all Scotcoin related. (sadly nothing blackmail worthy yet :slight_smile: )

3 Likes

funny that…

I think it is <1Mb is unencrypted - for now

1 Like
safe register get the-new-list
Removed old logs from directory: "/tmp/safe-client"
Starting logging to directory: "/tmp/safe-client"
Instantiating a SAFE client...
Current build's git commit hash: ---- No git commit hash found ----
Client successfully connected to the Network.
Register name passed in via `register get` is 'the-new-list'...
Trying to retrieve Register from eefa33(11101110).., 3006
Successfully retrieved Register 'the-new-list' from eefa33.., 3006!
safe register edit the-new-list "Let's get registering"
Removed old logs from directory: "/tmp/safe-client"
Starting logging to directory: "/tmp/safe-client"
Instantiating a SAFE client...
Current build's git commit hash: ---- No git commit hash found ----
Client successfully connected to the Network.
Trying to retrieve Register from eefa33(11101110).., 3006
Successfully retrieved Register 'the-new-list' from eefa33.., 3006!
Editing Register 'the-new-list' with: Let's get registering

@Southside how do I see your entries?

3 Likes

I tried from a VM at home where I am behind a NAT (boo!) and got:-

Starting logging to directory: "/tmp/safenode"
Node is stopping in 1s... Node log path: /tmp/safenode
Error: We have been determined to be behind a NAT. This means we are not reachable externally by other nodes. In the future, the network will implement relays that allow us to still join the network.

Location:
    safenode/src/bin/safenode/main.rs:235:36

with this at the end of the log:-

[2023-05-26T19:37:00.586617Z INFO safenode] Connected to the Network
[2023-05-26T19:37:00.682756Z TRACE safenode::network::event] AutoNAT outbound probe: Error { probe_id: ProbeId(0), peer: Some(PeerId("12D3KooWJsX74Kx6RBGzEFtjjsFZ66D32euVZy4zbhtaEpeXh2ay")), error: Response(DialError) }
[2023-05-26T19:37:00.682773Z INFO safenode::network::event] AutoNAT status changed: Unknown -> Private
[2023-05-26T19:37:00.682781Z WARN safenode::node::api] NAT status is determined to be private!
[2023-05-26T19:37:00.682801Z INFO safenode] Node is stopping in 1s...

So I think that is what you were hoping to see!

I’d kind of been hoping I might have got away with joining because I have a port forwarding rule to port 12000 to this VM.

I tried with an AWS based node and got:-

Starting logging to directory: "/tmp/safenode"
Node is stopping in 1s... Node log path: /tmp/safenode
Error: We have been determined to be behind a NAT. This means we are not reachable externally by other nodes. In the future, the network will implement relays that allow us to still join the network.

Location:
    safenode/src/bin/safenode/main.rs:235:36

With this in the logs:-

[2023-05-26T20:08:56.581700Z INFO safenode::network::event] AutoNAT status changed: Unknown -> Private
[2023-05-26T20:08:56.581731Z DEBUG safenode::node::api] Network inactivity: get_closest returned [PeerId("12D3KooWNWaEZZuwxxSoXA8femh9ShianvKXNAQvZhvNVmpCnoU8"), PeerId("12D3KooWCv2tmdf36tBhtnnWPvz6LuDoA2uz4QVArjfttVDfG9Yr"), PeerId("12D3KooWFEjbmcA8EkkZJgZAj5naRcX1RGACTWeSbN2upzj8pL8G"), PeerId("12D3KooWCCPGiEdyM5N6dMijXE9i42Kbq7ZNCfHkDWLeUckEpveJ"), PeerId("12D3KooWDr4eh5RTZX7t9X3Xm2SwXpe9BA9Qbp4b13AiGJtrEhC2"), PeerId("12D3KooWGRmfEFqZNNrPJVLa97CsDaVKeFedvnFfP45UxRpqc31n"), PeerId("12D3KooWNahaJmDLtZasmQqPB4jhotMhZ47iFGFgdvV7wNuZdmak"), PeerId("12D3KooWPyUPc1DZKkrN5MnXeEUAxLg5v3DfKajZnrz5gHhUor8g")]
[2023-05-26T20:08:56.581791Z DEBUG safenode::node::api] PeerAdded: 12D3KooWFEjbmcA8EkkZJgZAj5naRcX1RGACTWeSbN2upzj8pL8G
[2023-05-26T20:08:56.581800Z DEBUG safenode::node::api] PeerAdded: 12D3KooWNWaEZZuwxxSoXA8femh9ShianvKXNAQvZhvNVmpCnoU8
[2023-05-26T20:08:56.581806Z WARN safenode::node::api] NAT status is determined to be private!
[2023-05-26T20:08:56.581825Z INFO safenode] Node is stopping in 1s...

with this at the end of the log:-
[2023-05-26T20:08:56.581700Z INFO safenode::network::event] AutoNAT status changed: Unknown -> Private
[2023-05-26T20:08:56.581731Z DEBUG safenode::node::api] Network inactivity: get_closest returned [PeerId("12D3KooWNWaEZZuwxxSoXA8femh9ShianvKXNAQvZhvNVmpCnoU8"), PeerId("12D3KooWCv2tmdf36tBhtnnWPvz6LuDoA2uz4QVArjfttVDfG9Yr"), PeerId("12D3KooWFEjbmcA8EkkZJgZAj5naRcX1RGACTWeSbN2upzj8pL8G"), PeerId("12D3KooWCCPGiEdyM5N6dMijXE9i42Kbq7ZNCfHkDWLeUckEpveJ"), PeerId("12D3KooWDr4eh5RTZX7t9X3Xm2SwXpe9BA9Qbp4b13AiGJtrEhC2"), PeerId("12D3KooWGRmfEFqZNNrPJVLa97CsDaVKeFedvnFfP45UxRpqc31n"), PeerId("12D3KooWNahaJmDLtZasmQqPB4jhotMhZ47iFGFgdvV7wNuZdmak"), PeerId("12D3KooWPyUPc1DZKkrN5MnXeEUAxLg5v3DfKajZnrz5gHhUor8g")]
[2023-05-26T20:08:56.581791Z DEBUG safenode::node::api] PeerAdded: 12D3KooWFEjbmcA8EkkZJgZAj5naRcX1RGACTWeSbN2upzj8pL8G
[2023-05-26T20:08:56.581800Z DEBUG safenode::node::api] PeerAdded: 12D3KooWNWaEZZuwxxSoXA8femh9ShianvKXNAQvZhvNVmpCnoU8
[2023-05-26T20:08:56.581806Z WARN safenode::node::api] NAT status is determined to be private!
[2023-05-26T20:08:56.581825Z INFO safenode] Node is stopping in 1s...


But it took longer to fail and the log is longer and it looked like is did more before it failed.
3 Likes

This is the problem with registers AFAICS - they are write/append only for now.
Sure you can GET a register but I havent found any way to actually read it.
Still you can look at the file structure alongside the chunks in ~/.safe/node/ whatever and see the encrypted entries and hence know all is probably OK — I’m sure the read functionality will be along Real Soon Now :slight_smile:

3 Likes

I forgot to let you know my peer IDs. This is the one for my home VM:-
12D3KooWHzfHSF7SdfrBqdKeFKD8XTMu2XkXKbziStmyuh5Qva1K

The strange this is that I tried to run the safenode command from the AWS Instance again after change the AWS Security Group to allow all Inbound just in case that would make a difference and this time no log file was produced!

I removed the /tmp/safe and /tmp/safenode directories and ran the command again and the log file was produced. Here is the peer ID for the AWS Instance:-
12D3KooWERXomKYtNZFxijXHT7aksHETGE71WaTLPecoDDVLscjN

3 Likes

@Southside have you tried to add a pi?

2 Likes

no - I dont see much point in cross-compiling for what will likely be a short-lived network

Well I think it will be short-lived anyway. AFAICS it proved early on what they needed to know so anything else is playtime bonus.

3 Likes

Doh! I flubbed the Security Group for allowing Inbound All (basically not defining a rule for Any 0.0.0.0/0). When I did it properly and started again and ran it from the AWS Instance I seem to have joined as node. Getting messages like:-

[2023-05-26T22:41:02.470343Z TRACE safenode::domain::storage::disk_backed_record_store] PUT request for Record key: Key(b"\xae\xe2\0\x10~m:9\xcc\xf0\xf98\xd7\x0b}\x94\x13\x89\xc2W\x0f\xfd\x15\xa8\x96\xb93\x83\x84\xfdn?")

So I think it’s joined!

Peer ID is:-
12D3KooWLQtKX23WepUn77JBsJqevcoA4X3qPmfxuQNTKVEAru9N

And the issue with the log file not being created was my doing as well! I was still in the /tmp/safenode directory and I think the whole directory gets removed and recreated and not just the logfile so I was stranded in a directory that didn’t exist anymore and therefore with nothing in it! So all I had to do is cd … and then go into the new /tmp/safenode directory and see the logfile.

6 Likes

I’ve not tried with a Pi because it is at home so behind NAT but if you are asking because it’s ARM based I compiled and joined with a ARM based AWS Instance that is quite Pi like in it being just 2 cores with not much grunt and 4GB RAM.

5 Likes

Logs from my nodes at home (Linux Manjaro) and public VPS (fresh Debian 12):

vps_safenode.log.zip (33.0 KB)
safenode.log.zip (5.5 KB)

Everything seems like expected – home node exited after 2 minutes, the public one runs and stores chunks ( :wave: Scotcoin @Southside)

11 Likes