I’m trying to run a local test network to try out the examples in the safe_network
README. First question: should this work or am I jumping the gun?!
I’m using the latest rust and safe_network
(just pulled) code but having some issues (using these instructions).
Starting the network takes a while but is reliable. Other commands can be flaky though - typically failing with “permission denied” - for both the status command (see below) and getting from the faucet. Then trying carefully from scratch getting from the faucet worked and I went on to the register example, but getting status has never worked. This happens every time:
$ cargo run --bin safenode-manager --features local-discovery -- status
Finished dev [unoptimized + debuginfo] target(s) in 0.29s
Running `target/debug/safenode-manager status`
Error:
0: Permission denied (os error 13)
Location:
sn_node_manager/src/config.rs:21
Register example
After getting the faucet command to work I have been able to create the register and write to it as alice, but the time it took to create and get to the text input was long (minutes).
Once created alice seemed able to write and update the text quite quickly, but in the second terminal bob sees a blank, no text from alice. Maybe this is expected behaviour: both appear able to write but neither sees the text from the other, only their own text?
Here’s the output of alice’s terminal:
Starting SAFE client...
SAFE client signer public key: PublicKey(019e..2214)
Retrieving Register 'myregister' from SAFE, as user 'alice'
Register 'myregister' not found, creating it at 50f4c9(a31104(10100011)..)
Successfully made payment of 0.000000011 for a Register (At a cost per record of NanoTokens(11).)
Successfully stored wallet with cached payment proofs, and new balance 99.999999989.
Register address: "50f4c9d55aa1f4fc19149a86e023cd189e509519788b4ad8625a1ce62932d193a19ef12a469a58eb81ab145dfa8cd55b6776746b7e56ac8b516b1421edca34ff621033b7eae13ce8040d14dd0935af95"
Register owned by: PublicKey(019e..2214)
Register permissions: Permissions { anyone_can_write: true, writers: {PublicKey(019e..2214)} }
Current total number of items in Register: 0
Latest value (more than one if concurrent writes were made):
--------------
--------------
Enter new text to write onto the Register:
hi, alice here!
Writing msg (offline) to Register: 'hi, alice here!'
Syncing with SAFE in 2s...
synced!
Current total number of items in Register: 1
Latest value (more than one if concurrent writes were made):
--------------
[alice]: hi, alice here!
--------------
Enter new text to write onto the Register:
are you there?
Writing msg (offline) to Register: 'are you there?'
Syncing with SAFE in 2s...
synced!
Current total number of items in Register: 2
Latest value (more than one if concurrent writes were made):
--------------
[alice]: are you there?
--------------
Enter new text to write onto the Register:
hey bob are you therer?
Writing msg (offline) to Register: 'hey bob are you therer?'
Syncing with SAFE in 2s...
synced!
Current total number of items in Register: 3
Latest value (more than one if concurrent writes were made):
--------------
[alice]: hey bob are you therer?
--------------
Enter new text to write onto the Register:
Writing msg (offline) to Register: ''
Syncing with SAFE in 2s...
synced!
Current total number of items in Register: 4
Latest value (more than one if concurrent writes were made):
--------------
[alice]:
--------------
Enter new text to write onto the Register:
And here’s bob’s although he typed ‘mark’ by mistake:
Starting SAFE client...
SAFE client signer public key: PublicKey(1198..8741)
Retrieving Register 'myregister' from SAFE, as user 'mark'
Register 'myregister' not found, creating it at 50f4c9(933012(10010011)..)
Successfully made payment of 0.000000011 for a Register (At a cost per record of NanoTokens(11).)
Successfully stored wallet with cached payment proofs, and new balance 99.999999978.
Register address: "50f4c9d55aa1f4fc19149a86e023cd189e509519788b4ad8625a1ce62932d193b198cd804b1177db21bcf81d9ca8a8641d75db2c6da821aef8f5193f861859ec38438a833c20e36bf59a83be4d73ae12"
Register owned by: PublicKey(1198..8741)
Register permissions: Permissions { anyone_can_write: true, writers: {PublicKey(1198..8741)} }
Current total number of items in Register: 0
Latest value (more than one if concurrent writes were made):
--------------
--------------
Enter new text to write onto the Register:
not sure
Writing msg (offline) to Register: 'not sure'
Syncing with SAFE in 2s...
synced!
Current total number of items in Register: 1
Latest value (more than one if concurrent writes were made):
--------------
[mark]: not sure
--------------
Enter new text to write onto the Register:
Writing msg (offline) to Register: ''
Syncing with SAFE in 2s...
synced!
Current total number of items in Register: 2
Latest value (more than one if concurrent writes were made):
--------------
[mark]:
--------------
Enter new text to write onto the Register: