# Equihash solver for n,k=48,5 (other than default 200,9)?

**URL:** <https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062>\
**Category:** Mining\
**Created:** [November 24, 2016, 5:03pm UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062 "2016-11-24T17:03:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebstar](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/sebstar/32/2883_2.png) [@sebstar](https://forum.zcashcommunity.com/u/sebstar)\
**Post date:** [November 24, 2016, 5:03pm UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/1 "2016-11-24T17:03:33Z")

</div>

Hi,  
I wrote a Zcash Genesis Block Miner/Generator in Python, which uses silentarmy’s sa-solver binary for finding valid Equihash solutions. Everything works well and I could reproduce the Zcash and Zclassic mainnet and testnet Genesis blocks.  
But now for the trivial/computationally inexpensive task of mining a valid regtest block, I need an equihash solver that supports other settings of n,k, namely, 48,5. I browsed through the solvers in the open source challenge but none seem to directly offer a solver that I can simply call for n,k=48,5.

Are there any?

When this problem is solved, I’ll release the source code on Github.

---

<div class="post-metadata">

**Author:** ![cascadiacrypto](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/cascadiacrypto/32/745_2.png) [@cascadiacrypto](https://forum.zcashcommunity.com/u/cascadiacrypto)\
**Post date:** [November 24, 2016, 5:08pm UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/2 "2016-11-24T17:08:11Z")

</div>

> [@sebstar](#):
>
> Hi,  
> I wrote a Zcash Genesis Block Miner/Generator in Python, which uses silentarmy’s sa-solver binary for finding valid Equihash solutions. Everything works well and I could reproduce the Zcash and Zclassic mainnet and testnet Genesis blocks.

After the Thanksgiving Holiday @voxelot might be able to help you. It’s good to see different approaches to tackle the same problem.

---

<div class="post-metadata">

**Author:** ![tromp](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/tromp/32/522_2.png) [@tromp](https://forum.zcashcommunity.com/u/tromp)\
**Post date:** [November 24, 2016, 5:13pm UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/3 "2016-11-24T17:13:16Z")

</div>

You can try my [GitHub - tromp/equihash: multi-parameter Equihash proof-of-work multi-threaded C solvers](https://github.com/tromp/equihash) solver compiled with -DWN=48 -DWK=5 -DRESTBITS=0  
You’ll get some errors about not implemented, which should be straightforward to fix with a few extra lines of code grabbing the appropriate bits.

---

<div class="post-metadata">

**Author:** ![sebstar](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/sebstar/32/2883_2.png) [@sebstar](https://forum.zcashcommunity.com/u/sebstar)\
**Post date:** [March 27, 2017, 9:33pm UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/4 "2017-03-27T21:33:33Z")

</div>

Thank you for implementing the missing bits for the 48,5 version!  
[Edit: Compilation works.]

---

<div class="post-metadata">

**Author:** ![str4d](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/str4d/32/64_2.png) [@str4d](https://forum.zcashcommunity.com/u/str4d)\
**Post date:** [March 27, 2017, 11:05pm UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/5 "2017-03-27T23:05:04Z")

</div>

The default miner also supports 48,5 (see the bottom of `src/crypto/equihash.h`), and should support any parameters (albeit much more slowly than the mining challenge participants, but that shouldn’t matter for regtest-level parameters).

---

<div class="post-metadata">

**Author:** ![sebstar](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/sebstar/32/2883_2.png) [@sebstar](https://forum.zcashcommunity.com/u/sebstar)\
**Post date:** [March 28, 2017, 8:34am UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/6 "2017-03-28T08:34:02Z")

</div>

Yes I know – in theory. There’s no API or easy way to use the miner of the zcash node from an external program. You would need to extract all mining/equihash solver code into a standalone application. This is what happened [here](https://github.com/aabc/equihash-zcash-c).

---

<div class="post-metadata">

**Author:** ![Marco74](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@Marco74](https://forum.zcashcommunity.com/u/Marco74)\
**Post date:** [December 5, 2017, 1:37am UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/7 "2017-12-05T01:37:06Z")

</div>

Hi sebstar!  
Did you found a solution? I’m looking for a tool to generare my genesis block on regtest. I used successfully your tool for mainnet and testnet, but not for regtest.

Thanks,  
Marco

---

<div class="post-metadata">

**Author:** ![Marco74](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@Marco74](https://forum.zcashcommunity.com/u/Marco74)\
**Post date:** [December 13, 2017, 6:40pm UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/8 "2017-12-13T18:40:39Z")

</div>

Hi Sebstar.  
Did you wrote the genesis generator for 48,5?  
I need the same.  
Thanks,

---

<div class="post-metadata">

**Author:** ![sebstar](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/sebstar/32/2883_2.png) [@sebstar](https://forum.zcashcommunity.com/u/sebstar)\
**Post date:** [May 17, 2018, 10:25am UTC](https://forum.zcashcommunity.com/t/equihash-solver-for-n-k-48-5-other-than-default-200-9/9062/9 "2018-05-17T10:25:38Z")

</div>

regtest mining works now with trump. I’ve updated my GenesisZ miner accordingly and made a [public release](https://forum.zcashcommunity.com/t/genesisz-mine-the-genesis-block-for-your-zcashy-altcoin/29041) in this forum.
