Safenode-manager

anyone else having a play with the safenode-manager yet ?

think iv got a local test net up with the command safenode-manager run --count 250

250 nodes online and faucet is online :slight_smile:

Node started

PeerId is 12D3KooWSbgm83tvTqw2wEJkKrw7CfumqLfV2QqLiC7CsTa4RrQw
You can check your reward balance by running:
`safe wallet balance --peer-id=12D3KooWSbgm83tvTqw2wEJkKrw7CfumqLfV2QqLiC7CsTa4RrQw`
    
RPC Server listening on 127.0.0.1:55423
Launching the faucet server...
Logging to directory: "/root/.local/share/safe/test_faucet/logs"
⠂ Connecting to The SAFE Network...                                                                                                                                                                                                                                                                                                                                                                                              🔗 Connected to the Network                                                                                                                                                                                                                                                                                                                                                                                                      Loading faucet...
Loading faucet wallet... "/root/.local/share/safe/test_faucet"
Faucet wallet balance: 1288489588.500000000
Genesis claimed!
Starting http server listening on port 8000...

only problem im having is i cant get any coins out the faucet

root@AERO:~# safe --peer "/ip4/127.0.0.1/udp/36002/quic-v1/p2p/12D3KooWQexmxofbLadVRmTs2HVF185shr51umbUxBMuJon5WxSg" wallet address
Logging to directory: "/root/.local/share/safe/client/logs/log_2024-01-27_10-37-58"
Built with git version: 6b3573a / main / 6b3573a
a1e384ebbdd327780d3c96a43ff2aa3fd3b80e8e3f59101a8e053d5eacd94e526805213d1e21115aa4082effe901428e

root@AERO:~# safe --peer "/ip4/127.0.0.1/udp/36002/quic-v1/p2p/12D3KooWQexmxofbLadVRmTs2HVF185shr51umbUxBMuJon5WxSg" wallet get-faucet 127.0.0.1:8000
Logging to directory: "/root/.local/share/safe/client/logs/log_2024-01-27_10-38-16"
Built with git version: 6b3573a / main / 6b3573a
Instantiating a SAFE client...
Connecting to the network with 1 peers
🔗 Connected to the Network                                                                                                                                                                                                                                                                                                                                                                                                      Requesting token for wallet address: a1e384ebbdd327780d3c96a43ff2aa3fd3b80e8e3f59101a8e053d5eacd94e526805213d1e21115aa4082effe901428e
received request! method: Get, url: "/a1e384ebbdd327780d3c96a43ff2aa3fd3b80e8e3f59101a8e053d5eacd94e526805213d1e21115aa4082effe901428e", headers: [Header { field: HeaderField("accept"), value: "*/*" }, Header { field: HeaderField("host"), value: "127.0.0.1:8000" }]
Loading faucet...
Loading faucet wallet... "/root/.local/share/safe/test_faucet"
Faucet wallet balance: 1288489588.500000000
Failed to send tokens to a1e384ebbdd327780d3c96a43ff2aa3fd3b80e8e3f59101a8e053d5eacd94e526805213d1e21115aa4082effe901428e: Transfer Error Failed to send tokens due to The transfer was not successfully registered in the network: CouldNotSendMoney("Network Error GetRecord Query Error RecordNotFound.").
Failed to get tokens from faucet, server responded with: "Failed to send tokens: Transfer Error Failed to send tokens due to The transfer was not successfully registered in the network: CouldNotSendMoney(\"Network Error GetRecord Query Error RecordNotFound.\")."

so close yet so far !!

13 Likes

A 250-node local network is quite ambitious! :slight_smile:

As for the faucet problem, I’m not sure about what could be causing that. What if you tried run with just the default 20 nodes?

Btw, are you using the node manager from the safe_network repo? We just moved it in there this week. The standalone sn-node-manager repository will no longer be maintained.

Another thing you can try from the safe_network repo is this:

cargo build --bin safenode
cargo build --bin faucet
cargo run --bin safenode-manager -- run --node-path <path> --faucet-path <path>

That will ensure the faucet and safenode binaries are from the same codebase. The default behaviour is to download the latest versions of both binaries, but it’s possible these are not completely compatible at the moment, because we’ve stopped doing the faucet as a Github release.

Also, coming soon will be a --build option on the run command, which will build the safenode and faucet binaries as one step; we couldn’t do this initially because the node manager was in a separate repo.

7 Likes

I was using safeup to install safenode-manager so guessing that as faucet is not the correct version.
ill have a play around later on and see how i get on :slight_smile:

2 Likes

Ah yeah, safeup has not been configured to use the node manager from the safe_network repo yet. So that will be pulling an old version.

3 Likes

I was actually playing around with it a bit myself this afternoon. I’ve decided I want to participate in our testnets with a few Raspberry Pis I have. I put Alpine on one of them, then used the node manager to create 20 services which I connected to a testnet on Digital Ocean:

pi4:~$ sudo safenode-manager status
=================================================
                Safenode Services
=================================================
Service Name       Peer ID                                              Status  Connected Peers
safenode1          12D3KooWSmtypj8kutbXPMaBJ6XtSFT9DyBZbenyZmDxtVRZabUA RUNNING               3
safenode2          12D3KooWFrbQE7oGdno6LNeFmgypojit1cDBD1eikrrXxdXhiVHS RUNNING              29
safenode3          12D3KooWMqWawBi4mjJ2o7rGTamfqGEP1RGeCse9ZYJ4JyXMCg7y RUNNING              18
safenode4          12D3KooWBHxBTNxqsARV2F8sYC39h6LFXxPujCbisGkSxxiDmpV9 RUNNING               9
safenode5          12D3KooWPjKh4jGxhMUvW6GAv8cvU3E8xDM1qdCe6t3LkritTv2x RUNNING              14
safenode6          12D3KooWBuNKTLnoAe7ugDWdthcU4bmaJSwWdiToZxQMP1UPx9i3 RUNNING               4
safenode7          12D3KooWE8Wkztgt4QsCwpBZsbfSwWnue8Fk1PVFjeVoeEnUUmnQ RUNNING              30
safenode8          12D3KooWBhq6hW2KsJEwskkkyVPR6HMx1J6kYGXVs4dF4yPRLb1T RUNNING              17
safenode9          12D3KooWRy8mrAY7ncsdRai6hYVDtK26cYYjeLvL5XFj1Lxi8kLX RUNNING              33
safenode10         12D3KooWEH6yVejZ9Y2cE2w1na6gk6oCwuU868oxJLaa66hXRpnm RUNNING              47
safenode11         12D3KooWJd4PMECTfXSEctgiNGmJjF3ruaUQP8DfsCxrAXEzV9fL RUNNING              35
safenode12         12D3KooWA3kEcpPzGQjZcQyxxrBBjoSTzHbRzXc2cnu6sJqcX44E RUNNING              25
safenode13         12D3KooWSCzbD1ZYZt1Qm6QgxjuULfYtL99ihgePMoeGRecrjx75 RUNNING             135
safenode14         12D3KooWEaeoETLkp7simsKu7enkEZMBmDt83BFHozTijKMj1pEB RUNNING             130
safenode15         12D3KooWHamAaFjSAHVzW27L5RqDcsxhffAS3DRPSuGtsNF7SGaF RUNNING              73
safenode16         12D3KooWAk7eCvnncTShBm8KrAVcpoDwpYxxF2eWvzKJwqhXLDg7 RUNNING             117
safenode17         12D3KooWCcuJrxUwrJmRuo6GCHcK346MdV3aKwa5E8W6dVoPu188 RUNNING             141
safenode18         12D3KooWS7RK3YrsDQbdr6esH683j5NhKXZ1nd1G2pLBE4A4ggek RUNNING             147
safenode19         12D3KooWCGmpF27tsPj5dhdjtscCy7s3dZw5j4gFA8y8W2T3Sgio RUNNING             158
safenode20         12D3KooWCNug4a9ecjXvkdHo9Znzz6sjfwV15wfj6Wt8v3iD3A5K RUNNING             132

I’m quite happy with this. Alpine uses OpenRC rather than Systemd, and I thought the service manager crate we were using had fairly limited support for OpenRC, but it seems to work OK.

I’m thinking now about how to extend testnet-deploy to support deployments to machines on a local network, so that I can update the three Pis at the same time. We’ve recently just changed the testnet-deploy tool to use the node manager.

After that I want to see about getting vdash and the metrics server setup.

5 Likes