Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for 192,7 #14

Open
tearodactyl opened this issue Jun 19, 2018 · 2 comments
Open

Support for 192,7 #14

tearodactyl opened this issue Jun 19, 2018 · 2 comments

Comments

@tearodactyl
Copy link

In trying to use GenesisZ to re-generate the settings for the testnet for Zero Currency, I've discovered that currently the Zcash 200,9 Equihash parameters and 1364 byte solution size are hard coded.
For example, zcash/core/init.py line 20
More importantly, solvers.py lines 109 and 120.

Zero uses 192,7 and provides a higher level of ASIC resistance, with an order of magnitude larger memory requirements, while the solution size is 420 bytes.
Tromp support is in place, via the eq1927 make target.

Also, you may have heard that in response to the Bitmain ASIC miner introduction, several Equihash based coins are changing their settings, so there will be a bit of interest in a broader range of Equihash parameters. Say BTCG is moving to 144,5, and Tromp already has a version for that.

Do you see a way to relax those solution size checks or to make them configurable, please? I can hack at it and comment them out, but wanted to ask about a more proper approach.

Attached is the Zero chainparams.cpp, if you wanted to review specifically how the genesis block is configured.

Do not hesitate to give suggestions or to ask any questions.
tearodactylus@gmail.com

chainparams.cpp.gz

@sebastianst
Copy link
Owner

I think the cleanest way to implement this is to add the functionality to set custom N and K parameters in the zcash module (currently, only Zcash mainnet, testnet, regtest can be selected) so that the solution checking and array (un)packing functions work for arbitrary altcoins. Then GenesisZ can just select those parameters and everything else should work, given that altcoins like Zero don't change the structure of the header struct. I'll have a look into that soon.

@tearodactyl
Copy link
Author

Per request, Tromp added a way to pass the blake2b 'personal' string via a -p argument tromp/equihash#19

For Zero coin we need the following values:
class ZCoreMainParams(CoreMainParams):
N, K = 192, 7
SOL_SIZE = 420
PROOF_OF_WORK_LIMIT = 0x0AB1Efffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

NNONCE = 0x4c697665206c6f6e6720616e642070726f7370657221014592005a64336e336b
NBITS = 0x200A1FA0

As appropriate, can find out what other Zcash / Zclassic clones use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants