Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT)

Post Reply
BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT)

Unread post by BuckoNZ » Sun Sep 09, 2018 4:24 am

Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT) – NavPi Replacement.

https://build.nav.community/master/
https://github.com/NAVCoin/navcoin-core/releases

In a previous thread, I provided instructions about how to setup an Odroid XU4 to be a NavCoin Stakebox, but using the CLI command line only. These instructions is for a GUI version of the same, utilising QT - but you can use the CLI with this build as well.

This is something I was unable to get working, however with the release of NavCoin v4.3.0 there appears to be some additions or fixes, that gets QT functionality - at least in a 32bit ARM environment - working.

My usual warning - I am not a developer. I am not a linux guru. In fact, I have no idea what I’m doing, so take that into consideration when you are following these steps.

UPDATE - Mar. 2019: While the instructions provided here do work, there appears to be an unusual issue, which was first identified by Odroid users and then appeared on other ARM platforms, where the CFund cycle "locks up" and stops NavCore from keeping up with the block chain. The good news is:
1) The boot strap is now updated weekly and not monthly. If you come across this issue, simply power down your XU4, wait 7 days, power back up again and boot strap NavCore again. This will get you past the blockage and back up and running.
2) The NavCore team is now woring on the official NavDroid release, which when available, will make these instructions effectively reduntant. I'll provide a further update when this is ready.


STEPS:

1) Install a fresh full XU4 Ubuntu MATE image onto your eMMC storage card, using the USB connector. The image used here was the one dated 20180501 – this will install Ubuntu 18.04 LTS.

2) When first logging in, configure the usual look and feel, network settings and date/time, etc..

3) There are a number of build prerequisites that are required, including the Boost development packages, miniupnpc and Synaptic & Htop (because it's handy to have) :
$ sudo apt-get install build-essential libcurl3-dev libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils libqrencode-dev libboost-all-dev libminiupnpc-dev synaptic htop libunbound-dev libzmq3-dev libunivalue-dev

4) QT has a number of it's own dependencies and we need those as well for the GUI:
$ sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

5) We will need Git to grab the NavCore build:
$ sudo apt install git

6) BerkeleyDB is also required for wallet functionality, so we need to grab that:
$ sudo add-apt-repository ppa:bitcoin/bitcoin
$ sudo apt-get update
$ sudo apt-get install libdb4.8-dev libdb4.8++-dev


7) Lets reboot the XU4 at this point:
$ sudo reboot

8) After the reboot, we need to grab ‘NavCoin’ itself:
$ git clone https://github.com/navcoin/navcoin-core.git

9) We also need to make sure that the XU4 OS and components are all up to date before progressing further:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo reboot


10) After the reboot, move to the new ‘navcoin-core’ folder that is now on your XU4:
cd ~/navcoin-core

11) Lets now install NavCoin:
$ ./autogen.sh
$ ./configure CFLAGS="-O2 -mtune=cortex-a15.cortex-a7 -mfpu=neon" CXXFLAGS="-O2 -mtune=cortex-a15.cortex-a7 -mfpu=neon" --enable-hardening --with-gui
$ make
$ sudo make install


12) The above process will take some time to complete. Once complete, lets reboot the XU4:
$ sudo reboot

13) We need to setup a launcher for the desktop. Right mouse click on the Desktop and select the 'Create Launcher' option and put in these settings:
- Name: NavCoin x.y.z [Change x.y.z to the version you are installing]
- Command: /usr/local/bin/navcoin-qt
- Double click on the default icon (spring board looking thing?) and change it to a NavCoin one. The NavCoin ico file can be found in: /navcoin-core/src/qt/icons .

14) Double click on the newly created Desktop icon for NavCoin.
Instead of waiting hours for your NavCoin wallet to catchup with the blockchain, you can speed up this process by using the 'Bootstrap blockchain' option that comes with the current build - simply go to File > Bootstrap blockchain.

15) Using the web browser, go to the following URL to check what block the NavCoin blockchain is currently up too – take note of the block number at the very top of the web page:
https://chainz.cryptoid.info/nav/

16) To restore an existing Wallet, while the NavCoin application is closed, simply replace the new wallet.dat file created on initial startup, with an existing dat file backup.
Last edited by BuckoNZ on Sat Mar 09, 2019 4:11 am, edited 23 times in total.

BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT

Unread post by BuckoNZ » Sun Sep 09, 2018 4:54 am

Confirming the stability of NavCoin QT GUI build on the XU4

Test 1 - Receiving Nav from an External Party
- I sent 100 NAV from my primary NavCoin CLI stakebox, to the newly built NavCoin QT stakebox.
- Within a very short period (1 minute?), I received notification that I had an incoming 'receive' transaction into my new NavCoin QT stakebox.
- After a few minutes, this transaction was confirmed and the balance on my NavCoin QT stakebox was 100 NAV.
- The wallet balance on my primary NavCoin CLI stakebox dropped by a similar amount.
[Test 1 Passed]

Test 2 - Sending Nav from QT wallet on XU4 to an External Party
- Using the QT wallet, I sent 99.9 NAV back to my primary NavCoin CLI stakebox.
- Within a few minutes, the transaction was complete and the 99.9 NAV, plus the transaction fee was removed from the balance on my NavCoin QT stakebox.
- The wallet balance on my primary NavCoin CLI stakebox increased by a similar amount
[Test 2 Passed]

Test 3 - Receiving Stake Reward to the QT wallet on the XU4
- After approximately 5 days of running, a small stake amount was received.
[Test 3 Passed]

Test 4 - Restoring DAT from QT wallet onto External Platform
- Created a second instance of the NavCoin QT stakebox.
- After syncing up the blockchain, I exited the application, found the wallet.dat file in the .navcoin4 folder and deleted it.
- I then replaced the wallet.dat file with a backup I took from the initial NavCoin QT stakebox.
- On restarting NavCoin on the second stakebox, it now shows the balance, transactions and address from the initial NavCoin QT stakebox.
[Test 4 Passed]

Test 5 - Successfully Completed OpenAlias Registration
- Registered an OpenAlias friendly address name on the website.
- Open the console on the NavCoin QT stakebox and entered in the signmessage provided on the OpenAlias signup website.
- This resulted in a long string being provided. This was copied from the console on the QT stakebox and pasted into the relevant area on the OpenAlias signup page. Was advised that the Registration was successful.
[Test 5 Passed]
Last edited by BuckoNZ on Thu Sep 13, 2018 5:00 pm, edited 1 time in total.

User avatar
rooted
Posts: 6436
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT

Unread post by rooted » Sun Sep 09, 2018 10:55 am

Nice work on the write up.

caquinn7
Posts: 3
Joined: Sun Sep 02, 2018 1:36 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT

Unread post by caquinn7 » Mon Sep 10, 2018 12:41 am

Thanks to you I am now running 4.3.0 with the gui, and everything seems to be working fine. The getstakereport command that was previously causing a seg fault now works.

BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT

Unread post by BuckoNZ » Mon Sep 10, 2018 4:38 am

caquinn7 wrote:Thanks to you I am now running 4.3.0 with the gui, and everything seems to be working fine. The getstakereport command that was previously causing a seg fault now works.
That's great to hear!

BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT

Unread post by BuckoNZ » Sun Nov 11, 2018 1:55 pm

This is just a quick note to advise the the instructions detail in the initial post, work fine for the new release of NavCoin - v4.4.0.

BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT

Unread post by BuckoNZ » Thu Dec 13, 2018 5:33 pm

UPDATE - Dec. 2018: NavCoin has just released v4.5.0, which contains features such as voting on the Community Fund and Cold Staking. I have done a fresh test build on this new version and the instructions in the initial post appear to work fine for this new release.
Last edited by BuckoNZ on Sat Mar 09, 2019 4:12 am, edited 1 time in total.

BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT)

Unread post by BuckoNZ » Tue Jan 01, 2019 4:57 am

NavCoin-CLI Commands

Importing Wallet
Assuming you already have a NavCoin wallet - I tried using the importwallet CLI command and this didn't work for me. I had too:
- Reboot the XU4
- Move into the /home/odroid/.navcoin4 folder.
- Using the MV command, change the name of wallet.dat to something else - I think I used wallet_old.dat .
- Using the CP command, I copied my wallet.dat file from my previous wallet into the .navcoin4 folder.
- Started the navcoind process.

Checking Your Wallet & Balance
Once I started the navcoind process, again I waited the 5 minutes for it to settle in and used the getwalletinfo CLI command, which returned the balance of NavCoin wallet.
To return the addresses associated with the wallet use the CLI command getaddressesbyaccount "".
If you have imported a previous wallet, you will probably see two addresses associated with your account - the first one would have been created with the build and the second (and any others) due to the import.

Starting To Stake
Using the -staking flag when starting the navcoind process, starts the NavCoin core with an intent to stake your coins. However just like you need to do on your Windows or NavPi wallet, you need to "unlock" your wallet, before staking commences.
- Using the getstakinginfo CLI command, you will see that Enabled returns TRUE and Staking returns FALSE. So as mentioned above, the NavCoin core is expecting you to stake and is ready to do so, but it's not currently staking.
- To unlock your encrypted wallet to begin staking, you need to use the following CLI command: walletpassphrase "password" 9999999 true
- However if your password contains special characters (like ! etc., as it should), you need to use single quotes (') around your password instead of double quotes ("). So the command would look like: walletpassphrase 'password' 9999999 true
- If you run the getstakinginfo CLI command again, you will then see that both Enabled and Staking now return TRUE. You are staking!
The value of 9999999 (that is seven 9's) should keep your XU4 staking for approx. 110 days, so if you factor in a restart every quarter (3 months) and repeat of the above process, it will ensure you keep staking.

Backing Up Your Wallet
Unlike the importwallet CLI command that didn't work for me, the backupwallet CLI command appeared to work fine.
The full command is: backupwallet "destination".
For my test, I sent the backup dat file to the Desktop, so the syntax I used was: backupwallet "/home/odroid/Desktop/wallet_YYYYMMDD.dat" .

Sending Nav
In order to send Nav from your wallet on the XU4, you first need to unlock it for the purposes of a transaction. The command is very similar to the one used to unlock your wallet for Staking except (a) you don't want a significant timeout value associated with it and (b) you do not use the true flag at the end.
The CLI command to use is: walletpassphrase "password" 300.
The timeout value of 300 will give you 5 minutes in order to perform the command to send Nav to another wallet.
The CLI command to send Nav is: sendtoaddress "walletaddress" value
Once you're done, remember to use the wallet unlock command specifically for Staking to ensure you start Staking again.

BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT)

Unread post by BuckoNZ » Wed Feb 13, 2019 3:50 pm

UPDATE - Feb. 2019: NavCoin has just released v4.5.2 of NavCore, which contains a hard fork, a number of Community Fund hotfixes and allows for faster syncing of the blockchain. In regards to the build instructions, I have removed Zram which provided swap memory as there is a suspicion that it caused issues for XU4 users. I also removed the use of sudo from some of the NavCore compiling steps, allowing it to be more user friendly.
Last edited by BuckoNZ on Sat Mar 09, 2019 4:12 am, edited 1 time in total.

BuckoNZ
Posts: 19
Joined: Sun Jan 07, 2018 10:27 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: Using An Odroid XU4 For A NavCoin Stakebox (GUI using QT)

Unread post by BuckoNZ » Sat Mar 09, 2019 4:11 am

UPDATE - Mar. 2019: While the instructions provided here do work, there appears to be an unusual issue, which was first identified by Odroid users and then appeared on other ARM platforms, where the CFund cycle "locks up" and stops NavCore from keeping up with the block chain. The good news is:
1) The boot strap is now updated weekly and not monthly. If you come across this issue, simply power down your XU4, wait 7 days, power back up again and boot strap NavCore again. This will get you past the blockage and back up and running.
2) The NavCore team is now woring on the official NavDroid release, which when available, will make these instructions effectively reduntant. I'll provide a further update when this is ready.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests