At the moment, the network cannot be used for communicating within the network.
If you want to share a file for example, you have to publish or send the link to the file via some other means, like this forum, email, or internet in general. Same thing if you want to send money to someone.
I would like to have a way to share and communicate within Safe Network, without the aid of other routes for communication.
Can we make that happen? How? Below are some thoughts from @happybeing as a response to my questions.
It may be impossible.
There should be some “entry point”, which allows to explore more network links.
If two persons shared their register addresses via external channels, then they can download fresh register versions from time to time and exchange information this way.
So I got the local testnet up and running along with the example register app, but as far as I can tell, it is not working as intended. The description states that:
You can run the registers example client app from multiple consoles simultaneously, to write to the same Register on the network, identified by its nickname and using different user names from each instance launched
but they seem to have their own copies instead, each writing to their own register - maybe I’m doing something wrong or it isn’t working yet?
cargo run … provides a rather different UI than accessing the registers from the binary
safe@CloserNetClient:~$ safe register get -n NewPublicRegister
Logging to directory: "/home/safe/.local/share/safe/client/logs/log_2023-12-17_02-19-04"
Built with git version: 7aa944e / main / 7aa944e
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 98 peers:
đź”— Connected to the Network Trying to retrieve Register 'NewPublicRegister' at b9513a(770ffa(01110111)..)
Successfully retrieved Register 'NewPublicRegister' at b9513a(770ffa(01110111)..)
Register entries:
d495e6..: second!
safe@CloserNetClient:~$ safe register edit -n NewPublicRegister "thats three now!"
Logging to directory: "/home/safe/.local/share/safe/client/logs/log_2023-12-17_02-20-47"
Built with git version: 7aa944e / main / 7aa944e
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 98 peers:
đź”— Connected to the Network Trying to retrieve Register from b9513a(770ffa(01110111)..)
Successfully retrieved Register 'NewPublicRegister' at b9513a(770ffa(01110111)..)
Editing Register 'NewPublicRegister' at b9513a(770ffa(01110111)..) with: thats three now!
safe@CloserNetClient:~$ safe register get -n NewPublicRegister
Logging to directory: "/home/safe/.local/share/safe/client/logs/log_2023-12-17_02-21-12"
Built with git version: 7aa944e / main / 7aa944e
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 98 peers:
đź”— Connected to the Network Trying to retrieve Register 'NewPublicRegister' at b9513a(770ffa(01110111)..)
Successfully retrieved Register 'NewPublicRegister' at b9513a(770ffa(01110111)..)
Register entries:
7d5e27..: thats three now!
safe@CloserNetClient:~$ safe register get b9513a(770ffa(01110111)..)
-bash: syntax error near unexpected token `('
I am failing at specifying a register by address
when I try to access NewPublicRegister by name from another instance it predictably fails cos the public keys dont match
safe@CloserNet01:~$ safe register get -n NewPublicRegister
Logging to directory: "/home/safe/.local/share/safe/client/logs/log_2023-12-17_02-50-38"
Built with git version: 7aa944e / main / 7aa944e
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 98 peers:
đź”— Connected to the Network Trying to retrieve Register 'NewPublicRegister' at b9513a(e8ef67(11101000)..)
Did not retrieve Register 'NewPublicRegister' at b9513a(e8ef67(11101000)..) from all nodes in the close group! Protocol error Register not found: b9513a(e8ef67(11101000)..).
Error:
0: Protocol error Register not found: b9513a(e8ef67(11101000)..).
1: Register not found: b9513a(e8ef67(11101000)..)
Location:
/rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/convert/mod.rs:716
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Im looking at gossipsub but so far I cannot see published messages from another instance.
Full address was printed when you created register.
Since now we have logs for every command execution, you can find corresponding file and address for your register should be there.
safe register get b2ca21f75c6ecf090012f0fed5c2b67a6a254c4c7cac2906120b34b146433a258cedd286b7570ef14aaffd417a3759030a60079b9291c8dc0f0009c96337c9c17261d65cc258e07541d34a2b855e027c
cargo run above was running a different binary, an example app that is supposed to showcase how two users can share a register (this one)
I think the issue is that the second user for some reason doesn’t find the existing Register and instead creates another one with the same name. Both users output this println!
Retrieving Register 'myregister' from SAFE, as user 'alice'
Register 'myregister' not found, creating it at 50f4c9(ebf6eb(11101011)..)
Retrieving Register 'myregister' from SAFE, as user 'bob'
Register 'myregister' not found, creating it at 50f4c9(31bd17(00110001)..)
Just created a new register but I don’t see anything immediately shareable like a hex string as @Vort had…
safe@CloserNetClient:~/safehome/client/logs$ safe register create -n "The Comms Faffing Blog"
Logging to directory: "/home/safe/.local/share/safe/client/logs/log_2023-12-17_16-17-55"
Built with git version: 7aa944e / main / 7aa944e
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 98 peers:
đź”— Connected to the Network Successfully made payment of 0.000001140 for a Register (At a cost per record of NanoTokens(1140).)
Successfully stored wallet with cached payment proofs, and new balance 199.928375714.
Successfully created register 'The Comms Faffing Blog' at 9b2bd5(5d2405(01011101)..) for NanoTokens(969) (royalties fees: NanoTokens(171))!
Gotcha, we’re on the same page. I’m very new to all this code, have not poked at gossipsub yet, don’t know much about it to be honest. I did notice that the example app creates a client with disabled gossibhub - not sure what that means though:
Maybe gossiphub is just scaffolding for now and we can expect more functionality later?
I could create a topic and (allegedly) publish on that but any client wanting to subscribe just hung there. It needs some work on the UI but its fun trying to work around these limitations.
WARNING WARNING - Boring nostalgia ahead
About 2015-16 when all was VERY new and in C++, I participated in the first (communtiy) exchange of messages over the SAFE with a couple of folk whose names I forget - one from Chicago , one from S Carolina, perhaps. We were able to insert text nto the payload of packets we managed to share.
It was like a very crude version of IRC. Wish I had taken care of the screenshots…
Still I am very motivated to get some kind of chat feature working.
Looks like log output was cleaned up and the whole id (64byte) truncated for easier reading. In this case that is wrong and it should be printed out clearly for you to read.
An old email server got turned off. Unfortunately my Github account was linked to it so I cannot get 2FA mails there so this is a new GitHub account. Hopefully only temporary…
Created a PR to fix this (to enable printing out and logging of the entire RegisterAddress)
Also noticed that the example registers app was creating a register writable only by the owner, so included a small fix to create a publicly writable one so that both alice and bob can write to it. But there is another issue hiding somewhere and the example still doesn’t work.