• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Activating Masternode via SPORK

Look at chainparams.cpp for strSporkPubKey.
You need your own key pair.
To change sporks you need to provide valid private key in command line to dashd or dash-qt with param -sporkkey

hello, but how to get these key pairs ?
I failed to make these thru openssl...
 
Hello,

Please help with the usage , I have to run just -sporkkey <privkey>

What is a syntaxis

Do I need to convert privkey to wif ?

Thank you
 
Hello,

Please help with the usage , I have to run just -sporkkey <privkey>

What is a syntaxis

Do I need to convert privkey to wif ?

Thank you
We are pleased to announce the Dash-Docs developer documentation website (https://dash-docs.github.io) that has been in development for several months. Based on a fork of bitcoin.org, the site focuses specifically on providing access to technical information related to the Dash project/protocol.

In addition to information that overlaps with Bitcoin, the site was expanded with information on all Dash specific features (InstantSend, PrivateSend, Masternodes, and Governance).

Coverage includes:
** As with bitcoin.org, this documentation has not been extensively reviewed by Dash experts and likely contains errors. The Issue and Edit links on subheading can be used to help improve the content.

The closest I could find that may help you answer your question is this:
https://dash-docs.github.io/en/glossary/spork
https://dash-docs.github.io/en/developer-reference#spork
 
Last edited:
Hello,

Please help with the usage , I have to run just -sporkkey <privkey>

What is a syntaxis

Do I need to convert privkey to wif ?

Thank you

Sporks are used to enable and disable network features. They can be triggered by a message signed by multiple core team members at the moment, but there is talk of implementing the ability to overrule this through a masternode consensus vote. Normal users like yourself cannot change the status of a spork flag, even on testnet.

Not an answer to the privkey format question, but some clarification - sporks can only be modified by the core team at this time as indicated by strophy.

Look at chainparams.cpp for strSporkPubKey.
You need your own key pair.
To change sporks you need to provide valid private key in command line to dashd or dash-qt with param -sporkkey

If you wanted to use your own key, that would require modifying the Dash Core source. At that point, you would have effectively forked it and not be in consensus with the Dash network. If you didn't also modify it to prevent relaying the spork message, you would be immediately banned from the Dash network by nodes running with default ban score parameter (see the last entry in the Misbehaving Nodes table or this part of the Spork message processing logic). This is because the spork message signature verification would fail due to you using a key other than the one hard-coded into Core.
 
Hello,

I was reading the developer references and this thread. Sorry for bringing it back to life, I was unable to find a proper answer, to this question (which is what I believe the OP was trying to ask).

For the purpose of your own private testnet (and maybe an altcoin fork), is there a documented way of generating your own public+private key pair?
 
I haven't seen any documentation regarding how to do that, but in the future there should be an easier way of doing this on a private network. Some work has been done on this, but I don't know if it will be included in the 12.3 release.
 
I have found this:

Code:
generate:

openssl ecparam -genkey -name secp256k1 -out tmp/data.pem

get private key:

openssl ec -in tmp/data.pem -outform DER|tail -c +8|head -c 32|xxd -p -c 32

get public key:

openssl ec -in tmp/data.pem -pubout -outform DER|tail -c 65|xxd -p -c 65

(from stackexchange, but I can't link)

I believe this is the proper way of getting a compatible private+pub key.
 
I have found this:

Code:
generate:

openssl ecparam -genkey -name secp256k1 -out tmp/data.pem

get private key:

openssl ec -in tmp/data.pem -outform DER|tail -c +8|head -c 32|xxd -p -c 32

get public key:

openssl ec -in tmp/data.pem -pubout -outform DER|tail -c 65|xxd -p -c 65

(from stackexchange, but I can't link)

I believe this is the proper way of getting a compatible private+pub key.
I understood that the generated public key should be hard coded in the dash (or the code cloned from dash) code of chainparams.cppp and privatekey should be used to sign message for enable/disable sporks.
what is the exact way of doing this?what is the method/syntax?
only spork show, spork active rpc methods are available.
can some one know exactly how to do this ?
 
There should actually also be a `spork update` option. But I do not know the method. In 12.3 it should be much easier to play around with via a devnet and command line parameters.
 
I got the answer to my own question. Find it here:
1. replace the dash's spork pub key
2. Private key should be converted to WIF format (use proper byte version during this process).
3. place this key in .conf file as sporkkey=<private key in wif format>
4. open debug console and use this command:
spork SPORK_NAME [value]

this works perfectly, I tested it.
 
Now I have a different problem, My wallet is not syncing completely even after cloning , signing spork keys.stuck at "Synchronising spork data" which is showing "loading additional data 25%" on status bar. Without this I can't test the masternode functionality. only after loading sporks data , masternodes data get loaded.

Can someone please suggest how can I make sporks data loaded?
(I have tried all sanitary options like deleting all folders and restarting wallet, waiting for it to sync etc.)

Note: I have cloned and created my own genesis block and even mining is working fine till last POW block
 
Probably i know how to help you, also i need your help to convert my spork private key to wif, i tried some times without look. Check your pm
 
Back
Top