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

Regtest network bug with wrong values in K,N #76

Closed
evgenyundefined opened this issue Oct 24, 2017 · 9 comments
Closed

Regtest network bug with wrong values in K,N #76

evgenyundefined opened this issue Oct 24, 2017 · 9 comments

Comments

@evgenyundefined
Copy link

evgenyundefined commented Oct 24, 2017

Regtest network have init K and N params different from mainnet and testnet.
On mainnet and testnet K, N
const size_t N = 200, K = 9; // Same as mainchain.
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K));
nEquihashN = N;
nEquihashK = K;
On regtest K, N (chainparams.cpp:344)
const size_t N = 48, K = 5;
BOOST_STATIC_ASSERT(equihash_parameters_acceptable(N, K));
nEquihashN = N;
nEquihashK = K;

With public miners on mainnet and testnet all works fine, but if you make regtest network (for some test) daemon reject all shares from public miners. (this problem have all forks of zerocash).

Please make regtest params same mainnet and make genesis block for regtest with K,N 200,9 and not with K,N 48,5

@martin-key
Copy link
Collaborator

martin-key commented Oct 24, 2017 via email

@evgenyundefined
Copy link
Author

evgenyundefined commented Oct 24, 2017

thanks, this bug in chainparams.cpp:344 for fix this in zcash i copy genesis block from testnet and change K,N. Make some magic for make working private testnet)

@h4x3rotab
Copy link
Member

IMHO parameters (48,5) are intendedly chosen for regtest mode, which is only for local regression tests. So it's not designed to talk with mainnet and testnet clients. Larger numbers will slow down the test duration.

Please correct me if I'm wrong.

@martin-key
Copy link
Collaborator

@evgenyundefined please review the statement of @h4x3rotab. I agree with him.

@evgenyundefined
Copy link
Author

evgenyundefined commented Oct 25, 2017

Regtest network starts from low difficulty and no have problems with test duration. Ok, agree with him, but for pool developers this actual problem. I continue use my solution with some magic of testnet genesis block.
Can close this issue.

@h4x3rotab
Copy link
Member

Testnet is on the way. I'm going to close this issue.

@oliverw
Copy link

oliverw commented Nov 21, 2017

@evgenyundefined Any chance for sharing your updated chainparams.cpp?

@evgenyundefined
Copy link
Author

evgenyundefined commented Nov 21, 2017

@oliverw i not make chainparams for bgold, at first time see this problem on zcash and make only for zcash (check sources others cryptocoins and see same problem) if you need modificated sources of zcash with working regtest on kn same on mainnet write for me (zuenko@gmail.com)

@ghost
Copy link

ghost commented Dec 13, 2017

@evgenyundefined I have the same problem. I'd like to generate the regtest genesis block that include a valid equihash solution inside the block but I'm not able to find a easy solution for this. Could you help me please?

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

4 participants