Zcash node hardware guide, anybody?

Do not quite understand the part about the VM, but regarding the “cheap old machine” part, that is basically what I am going to do. Except I do not own any cheap old machines. I am going to buy or build one. A Single Board Computer (SBC) or something just good enough to be a full node. And then call it something cool similar to the btc ln Thundroid thingie, except something Zcash related :slight_smile: Problem is my computer knowledge is limited. I could never have built a “perfect bitcoin lighnting node” without that guide above. And now I am looking for a similar small, cheap computer for my Zcash node, but it needs to have more than 4 GB of RAM. Can I stack 4 Odroid HC2s or HC1s for that purpose?

My initial post is quite long and maybe somewhat unclear. I made a post on another forum, the BleepingComputer, which is more down to the point if anyone want to have a read:

First issue is does zcashd even run on ARM?

Memory requirements for sending sheilded txs will be dramatically reduced come Sapling (which is expected late September) where it’ll be ~40MB. Also, it’s currently 1.7GB of RAM required for a shielded tx currently, albeit a lot more will be eaten up by system processes. I wouldn’t go down the 4 Odroid HC1 path as a setup similar to the Lightning node would be long-term preferable assuming it can run on ARM.

I would just buy an old SBC that’s based on an intel processsor or buy an old workstation like the HP z400 or Dell t3500. you can get the x55** series ones for practically nothing, or the X56** for marginally more.

Can you elaborate?

Oh, I was not aware. This is great!

@Kahooli: I need to emphasize the “simple” part in my description, and add “small” and “low impact”. Does not have to be the cheapest, but it should not be big and consist of uneccessary hardware that draws extra power, and makes lots of noise and heat. Something like, as you mention, a SBC that is compatible with zcashd should be perfect.

The best solution for this use case is probably a low end NUC running Ubuntu.

You don’t have to worry about finding ARM binaries, you can follow the official documentation, and it’s more compact than almost any SBC build. RAM and a hard drive take maybe 5 minutes to install and you’re done.

I definitely recommend at least 4GB of RAM since zcashd can get a little resource hungry and you’d probably want to run that alongside zcash-cli.

In regards to mining, it may not be worth it. A NUC would be much more powerful than almost any SBC, and you’re still looking at ~0.05 ZEC/year max assuming 100% uptime. Difficulty is also increasing dramatically, so that number is going to get much smaller.

Thank you very much for this reply. I will look into the NUC.

Oh, we are talking that low numbers regarding mining. Then I will not bother considering mining when building my node.

I’d like to revive this thread to ask for hardware advice.

I’m thinking of buying a single board computer. It should be able to run Tor, synch a zcashd full node from scratch, keep it synched, run zcash-cli and send fully shielded transactions. I want to avoid Intel NUCs if possible.

What board would you recommend?

And how would you change that recommendation if I also want to run a Monero full node in addition all of the above?

I was thinking of a Raspberry Pi but I’m not sure if it has enough RAM or if the lack of AES hardware support is a problem. I also saw people having issues building Zcash software for ARM and I’m not sure how to navigate those issues.

2 Likes

Pi4 has 8Gb so should be enough, build issues are basically that you have to x-compile which some find awkward.

2 Likes

FWIW, @ChileBob’s recommendation is likely the most stable 64bit ARM SBC available in the field ATM. Until Pine64 or Odroid come out with new 4GB+ SBCs, there isnt any other board with more than 4GB RAM on the market unfortunately. To be fair, you can run a full mainnet node on 4GB RAM 64bit ARM SBC, but it will not be stable. The only other hurdle, also mentioned in this thread, is syncing the node. There are several ways to mitigate this hurdle depending on your network setup, but we often find using IPFS or other network storage solutions the best way to overcome this.

2 Likes

I got a full node running on an ODroid C2 for months without issue until the old USB HDD I used to store the full node gave up.

More details here, including other ARM based boards:

4 Likes

According to this post that’s no longer necessary and you can build natively Trying to build on ARM - #102 by str4d

I’d also opt for the Pi4 with 8GB of RAM.

3 Likes

There’s a lot of fun avenues in the ARM Zcash eco system. Depending on local chain storage hardware, you can get fairly inexpensive solutions that do operate gracefully with tweaks mentioned above.

UPDATE: Finally found the RPi4 8GB model in stock, so once it arrives I’ll check out how it performs. If all goes well, I’ll update the docs with a tutorial and some tips and tricks.

4 Likes

That’s neat! Isn’t it a problem though that most build attempts fail or have warnings?

And are there plans to provide official ARM builds?

I’m confident there will be support for Apple’s new ARM computers when they are released and that will definitely help fix some of the underlying issues along the way.

1 Like

I haven’t actually tried a native build and the CI errors are probably one for @mdr0id.

Seems a sensible idea to offer ARM (and Windows for that matter) binaries.

1 Like

+1 for ARM binaries!

2 Likes

I’m sanity checking the ARM related CI issues on Friday hopefully, assuming my Rpi4 appears. This way I can get some context on bare metal. Working on cloud ARM rigs has been slightly annoying in the last couple of years due to cost and other things.

On the note of all the binaries, yes we are migrating some legacy things that will make this more feasible from a deployment perspective. The rest is essentially in the zcash stack, but we have been ahead of this to allow the prior mention stuff to actually be feasible in existing production environments. Ideally we’d like to get chocolately, brew, and other things to drive these binaries in a more formal way. How it will roll out initially and when, are not set in stone since they still are unsupported platforms unfortunately.

One of the major issues, until recently(thanks to our Docker work), has been some of the manual restrictions put in place by legacy Gitian.

1 Like

Thanks for the answers this far! Now a question about storage: SD card, HDD or SSD?

Also, can you please specify with actual numbers the recommended I/O for keeping a node in sync (so after it caught up to the chain head)?

At the moment the native ARM compile does not work on zcash master, unfortunately. IIRC, there are some tasks related to fixing this in the upcoming sprint.

Anyway, to cross compile for ARM from the X86 host on Ubuntu 18.04:

sudo apt install g++-aarch64-linux-gnu
HOST=aarch64-linux-gnu ./zcutil/build.sh -j$(nproc)

Assuming the compile is successful, you should have the following binaries available in zcash/src:

zcashd
zcash-cli
zcash-gtest
zcash-tx

At this point there are a number of ways you can get these binaries to the ARM board (e.g. Raspberry Pi4 8GB+ :nerd_face: ) . Personally, I typically ssh into the RPi that is running some standard OS (Raspian, Debian, Ubuntu etc). On the current RPi4, I installed Ubuntu 20.04 on a 128GB micro SD using the rpi-imager found at Raspberry Pi OS – Raspberry Pi.

Once your ARM board has the OS installed and establishes an IP, you can ssh into the RPi from x86 host:

ssh ubuntu@192.168.1.4

(note: ssh user and IP may vary depending on your setup)

Next install magic-wormhole on both the x86 host and RPi4:

sudo apt install magic-wormhole

Now send the desired zcash binaries to the RPi4 from x86host:

wormhole send zcashd

To receive the zcashd binary on the RPi4 issue:

wormhole recieve

The host will show a secret phrase to enter on the RPI, to ensure it properly receives the zcashd binary.

Finally, once you have transferred all the binaries(e.g zcashd and zcash-cli) from the host to the RPi4, there is one last task of getting the keys/params so the RPi4 node can start gracefully. If you already have them in ~/.zcash-params/, you can use magic wormhole to send them or you can send over the script that retrieves them (e.g ./zcutil/fetch-params.sh) and run it. Once transferred, you should now see the param files on the RPi4:

ls ~/.zcash-params/
README  sapling-output.params  sapling-spend.params  sprout-groth16.params

Lastly create a zcash.conf for this node(e.g touch ~/.zcash/zcash.conf).

:partying_face: Once your zcash.conf is configured, run zcash on the RPi4 using: zcashd

FWIW, my RPi4 node is still working to sync to current mainnet height on a 90.92 Mbit/s connection. It has been running for 23hrs. I’ll post later on some options to speed up syncing and things to consider for storage. Additionally, thoughts about how the newer 8GB+ RAM SBC performed :sunglasses:

1 Like