JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
765 stars 543 forks source link

Coinbase Transaction (CbTx) support? #328

Closed SpecialCoins closed 2 years ago

SpecialCoins commented 3 years ago

Since dash v13 moved to use Deterministic Masternodes: Cpuminer and solomining is not possible anymore,(using own wallet, no solopools), with dash/firo based coins, some people would still want to use that feature.

Couple links for quick reading: https://github.com/dashpay/dips/blob/master/dip-0002-special-transactions.md https://github.com/dashpay/p2pool-dash/commit/853fc7e4da0abe4304a5f4300f9fd5439a272c04

Error on wallet log: 2021-06-20 22:22:54 ERROR: AcceptBlock: bad-cb-type, coinbase is not a CbTx (code 16) 2021-06-20 22:22:54 ERROR: ProcessNewBlock: AcceptBlock FAILED

Error on cpuminer 13.6.3: 2 Submitted Diff 0.0018947, Block 508, Ntime 971ed060 2 A0 S0 Rejected 2 B0, 0.939 sec (1ms) Diff 0.0018947, Block 508 Reject reason: bad-cb-type Hash: 0000020fcd3d4bbbdb60000000000000ffffffffffffffff Target: 000003abef00000000000000000000000000000000000000

Hoping you can add this feature, but thanks anyway!

JayDDee commented 3 years ago

I looked into CBTx and I don't think I could do it and I'm not sure it would be of any use. I don't know how many coins use this and how many of them are CPU mineable but both Dash and Firo are not.

CBTx adds a new field to the coinbase transaction and it's value is quite complicated to calculate. I'm also not setup to test solo mining and this would require a lot of testing, mostly the trial and error type.

If there is a known working implementation that is comaptible with cpuminer it would be low risk to port it, but Im not going to try to implement it from scratch.

JayDDee commented 2 years ago

I left this issue open in case a workable miner implementation of CbTx that I could import and some indication of growing support for the feature by more coins. So far no further information has been provided and I have found nothing.

I'll wait a little longer, but not much longer.

JayDDee commented 2 years ago

No interest it seems.

andrewtookay commented 2 years ago

There are a few coins based on Dash that have made the upgrade to use CbTx. I'm a developer at Alterdot and people can't solomine with the cpuminer because of this. Maybe we could reopen the issue?

JayDDee commented 2 years ago

I still need a working, compatible, mining client implementation and a test plan for it.

andrewtookay commented 2 years ago

I guess you can use both the code of the yiimp pools that implemented CbTx (https://github.com/Kudaraidee/yiimp) as well as our in-wallet miner (https://github.com/Alterdot/Alterdot) for inspiration.