Transact with your Pi node & Sparrow

Matt
The Ubiq Report
Published in
3 min readNov 9, 2020

--

photo by philippsaal

Let’s discuss a good way for people to use their Raspberry Pi and similar single-board Ubiq nodes at home!

So far the node guides have been focused primarily on the hardware and software best suited for the job, as well as outlining the steps necessary to get the device online. But what comes next?

Providing a network relay like a single-board-computer node is not only a helpful and inexpensive way to contribute to Ubiq, it is also an important asset that can foster an increasingly permission-less environment. Providing users with a greater degree of control over their interactions with Ubiq’s chain is fundamental to that goal.

Recently, Octano Labs introduced a Uniswap-based AMM for the Ubiq network called Shinobi. You can read the all about it here. Using Shinobi requires a web3 wallet to connect and transact. Accordingly the Ubiq developers have reintroduced their MetaMask-based fork, Sparrow.

Sparrow includes all the familiar functionality, including the “Custom RPC” option. This configuration option includes a field to define a “RPC URL”. Having Sparrow set up in this way in combination with a properly configured instance of gubiq ( like that running on a Pi…) can route all transactions made using this wallet through one’s own node, including interactions with Shinobi.

If you created a Pi node with the node.sh setup script before October 2020, use these steps. If your node used the newer version after then, this functionality is including automatically during setup and you can skip ahead to the Sparrow section.

In a terminal:

Log in as “pi” on Raspberry Pi OS / Raspbian

or;

Log in as “root” on Armbian

Enter the following commands separately —

sed -i "/command=/c\command=/usr/bin/gubiq --verbosity 3 --http --http.addr "127.0.0.1" --http.port "8588" --http.api "eth,net,web3" --http.corsdomain "*" --http.vhosts "*" --maxpeers 100" /etc/supervisor/conf.d/gubiq.confnode_ip=$(hostname -I | cut -f1 -d’ ‘)
sed -i -e "s/127.0.0.1/$node_ip/" /etc/supervisor/conf.d/gubiq.conf

You will need to know your node’s IP address for the next step.

If you do not know the IP enter;

echo $node_ip 

…and jot it down before the next step.

In Sparrow:

Open Sparrow in your browser and select “Custom RPC” from the network drop-down menu options.

As was outlined in the guide “Adding Ubiq to MetaMask”, you will input the network details as follows —

Network Name: UbiqNew RPC URL: your node’s IP:8588 (example —  192.168.255.15:8588)ChainID: 8Symbol: UBQBlock Explorer URL: https://ubiqscan.io

That’s it! Using this configuration, Sparrow is getting it’s connection to the network from, and routing all transactions through your node. This includes any swaps made or liquidity pooled on Shinobi.

To be clear, your wallet’s keys are handled by Sparrow and not the Pi. If anything unfortunate were to happen to your node, you would not be at risk of losing funds. But as always, manage your private keys carefully!

If you have not yet set up a node for yourself, consider gathering the necessary components to do so. There are significant and anticipated improvements to the node configuration and operation UI on the way, along with additional guides detailing methods for node operators continue increasing the utility of their piece of the Ubiq network!

--

--