Zcash node hardware guide, anybody?

+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