dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

I want to ask how to start dashd automatic mining #2867

Closed summerxue1992 closed 4 years ago

summerxue1992 commented 5 years ago

I have spent the corresponding source, did not find how to open automatic mining。

CryptoTeller commented 5 years ago

Use SetGenerate ?

UdjinM6 commented 5 years ago

If by automatic mining you mean smth like setgenerate rpc then it's not possible anymore, it was deprecated few versions ago because CPU mining no longer makes sense even on testnet (diff is too high). You can use generate rpc to produce blocks on regtest/devnet.

summerxue1992 commented 5 years ago

Well, I'm learning the dash source code now.I want to build a private chain to test the synchronization and transaction between p2p nodes.During the process, a script started by a node loops through the call to the generate RPC interface to dig the block,If I launch mainnet,it didn't work.A regtest works.

summerxue1992 commented 5 years ago

Another problem is that the addnode RPC interface doesn't seem to work either.The nodes after addnode in BTC can be synchronized normally, while the dashd cannot be synchronized now.Why?

thephez commented 5 years ago

@summerxue1992 It sounds like you may want to set up a devnet. You can find some info here - https://blog.dash.org/dash-devnets-bc27ecbf0085.

Also, I would recommend going to either Discord or https://www.dash.org/forum/ for questions like this. In this repository, Github issues are intended to just be used for bug reporting/tracking and not general support.

UdjinM6 commented 5 years ago

If I launch mainnet,it didn't work.A regtest works.

That's because diff is way to high on mainnet - you won't find any blocks with cpu mining there. (well, you can, theoretically, but chances are ~0)

The nodes after addnode in BTC can be synchronized normally, while the dashd cannot be synchronized now.Why?

They should synchronize blocks but there is another additional step to synchronize sporks and governance data. You can force these steps to complete by using mnsync next rpc a couple of times (you can check current sync status via mnsync status).

summerxue1992 commented 5 years ago

@thephez ok,i see。Thanks for your help。I will go to https://www.dash.org/forum/ and all people to communicate。 @UdjinM6 I still has something don't understand.Do you have any sources on sporks and governance?

summerxue1992 commented 5 years ago

@thephez
There is a falut. I can't fill in "Verification:". SignUp-erro

thephez commented 5 years ago

@summerxue1992 Not sure what the issue is on the forum - maybe an adblocker or something?

Re: sporks/governance - https://docs.dash.org/en/stable/ and https://dash-docs.github.io/ have a lot of good info. You may find answers there (e.g. https://dash-docs.github.io/en/developer-reference#spork and https://docs.dash.org/en/stable/introduction/features.html#sporks)

PastaPastaPasta commented 4 years ago

Closing as it seems like all the answers have been answered and there's been no activity in ~1 year