Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Activating Masternode via SPORK

Discussion in 'Development Tech Discussion' started by vovannovig, Oct 27, 2017.

Tags:
  1. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Good afternoon.
    Tell me, please, where can you find the instruction manual SPORK?

    There is one project in which
    {
    "SPORK_2_INSTANTSEND_ENABLED": true,
    "SPORK_3_INSTANTSEND_BLOCK_FILTERING": true,
    "SPORK_5_INSTANTSEND_MAX_VALUE": true,
    "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT": false,
    "SPORK_9_SUPERBLOCKS_ENABLED": false,
    "SPORK_10_MASTERNODE_PAY_UPDATED_NODES": false,
    "SPORK_12_RECONSIDER_BLOCKS": true,
    "SPORK_13_OLD_SUPERBLOCK_FLAG": false,
    "SPORK_14_REQUIRE_SENTINEL_FLAG": false
    }

    {
    "SPORK_2_INSTANTSEND_ENABLED": 0,
    "SPORK_3_INSTANTSEND_BLOCK_FILTERING": 0,
    "SPORK_5_INSTANTSEND_MAX_VALUE": 1000,
    "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT": 4070908800,
    "SPORK_9_SUPERBLOCKS_ENABLED": 4070908800,
    "SPORK_10_MASTERNODE_PAY_UPDATED_NODES": 4070908800,
    "SPORK_12_RECONSIDER_BLOCKS": 0,
    "SPORK_13_OLD_SUPERBLOCK_FLAG": 4070908800,
    "SPORK_14_REQUIRE_SENTINEL_FLAG": 4070908800
    }



    How to enable MasterNode? Once again, I'm sorry, and thanks.

    I do not understand how to manage it at all.
    Give please the instruction or even better the example of the SPORK commands to activate MasterNode!


    THANK YOU!
     
  2. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Really no one knows ???
     
    • Dislike Dislike x 1
  3. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    It is written in the code how sporks are enabled. Cant you read the code? If yes, then why dont you read it?

    Reading the code, is a service. If you cant read the law, you pay a lawyer to read it for you. If you cant read the code, you pay a programmer to read it for you.

    Why someone to read the code for you? What you have to offer, in order for someone to help you? Do you think that the dash community is a charity and helps anyone, regardless of its incentives?
     
    #3 demo, Oct 28, 2017
    Last edited: Oct 28, 2017
    • Agree Agree x 2
  4. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I immediately wrote that I was interested in the description and examples of commands.

    Please specify where exactly is the description?
    I'll read it myself.
    Thank you!
     
  5. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    As far as i know there is no description. Most of the dash code is undocumented. You have to be able to read the code directly. But you are lucky, they use readable names for their variables. They could obfuscate the names of the variables, and make the code even harder to read. But they didnt. Most of the code is readable. So start reading.

    If you want to increase the chances for someone to help you for free, you have to explain your incentives, and the reason why you are searching the sporks.
     
    #5 demo, Oct 28, 2017
    Last edited: Oct 28, 2017
  6. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I have an academic interest, I do not create a fork.
    For this reason, I can not and will not pay for someone's services.

    My question arose because my friends were running a test network and they could not configure SPORK to run MasterNode.

    I know that SPORK is added to the latest versions, I know why, but I have not seen the description.

    The search in the search engines (google) gave nothing.

    I read the code, but I did not understand how to use it.

    Many other projects are based on Dash and make his forks.
    I am sure that this question interests many.
     
    • Informative Informative x 1
  7. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    Where is this network? Can you give us their IP addresses?
     
    • Like Like x 1
  8. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    This network is test and is not in public use (it has gray IP address).
    As already mentioned academic interest is. Not for business.
     
    • Agree Agree x 1
  9. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    Where is the academic institute you are located? Does it have a name?
     
    • Dumb Dumb x 1
  10. qwizzie

    qwizzie Well-known Member

    Joined:
    Aug 6, 2014
    Messages:
    1,515
    Likes Received:
    717
    Trophy Points:
    183
    There is no need to have an instruction manual for sporks, they are not responsible for enabling your masternode. Sporks are conditions for the network, not for masternodes seperately.

    To enable your masternode on Mainnet follow one of these guides :

    https://dashpay.atlassian.net/wiki/spaces/DOC/pages/113934340/Masternode+Setup
    https://www.dash.org/forum/threads/taos-masternode-setup-guide-for-dummies-updated-for-12-1.2680/

    To enable your masternode on Testnet go here :

    https://dashpay.atlassian.net/wiki/spaces/DOC/pages/118162190/Masternodes+under+testnet

    Sentinel : https://github.com/dashpay/sentinel/tree/core-v0.12.2.x

    NOTE: Make sure you pulled Sentinel from `core-v0.12.2.x` branch and changed network to `testnet` in `sentinel.conf`. If you already have a mainnet masternode on the same server, do NOT run testnet masternode in the same datadir as your mainnet masternode (i.e. `.dashcore`). Create new folder specifically for testing (e.g. `.dashcore_test`) and make sure you use `-datadir=<yourtestnetdatadirhere>` cmd-line parameter for dashd and dash-cli. You'll also need a separate crontab line for testnet Sentinel. If you are not 100% sure what you are doing, I'd recommend setting up a new machine/instance for testing purposes only instead of reusing your mainnet server.
     
    #10 qwizzie, Oct 28, 2017
    Last edited: Oct 28, 2017
    • Like Like x 1
    • Useful Useful x 1
  11. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    You sat in what is the problem?

    In the test network, everything works, coins are obtained.

    But there is a problem - the MasterNode of the node gets less and less with growth. See one PoW user all right, run 10 miners and MasterNode start getting very little!

    Analyzing logs of view:
    IsBlockPayeeValid - WARNING: forced payment execution in Masternode is disabled, accepting any payee.

    We came to the conclusion that the problem of SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT is true !!!

    How to make SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT true ???
     
  12. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    So your academic institute, which has no name, has fierce interest in masternode payments.
    Any other academic interests?
     
    #12 demo, Oct 28, 2017
    Last edited: Oct 28, 2017
  13. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    And if you discover a bug related to network randomness in masternodes payee selection, dont ask to @jimbursch to give you a bugcrowd reward for this. I deserve this reward , in case one day it is proved that it was a bug indeed. (Yes, yes, I know. My chances for this to be a real bug are non-existent as long as @UdjinM6 says so. But hope dies last...:p)
     
    #13 demo, Oct 28, 2017
    Last edited: Oct 28, 2017
  14. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    You dont seem to have any other academic interests. Only masternode payments are important for you.
    So let me trigger you. Why dont you investigate ways to improve Dash's governance system?
     
  15. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I did not see a solution. Threw this problem.
    Good mood to you all.
     
  16. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    Of course there is a solution. But in order for someone to help you for free, you have to reveal your real incentives.
    Be honest. Say exactly what you want to accomplish, and what your real goals are.
    Even if you say ''I want to be Caliph in the place of Caliph !!!'' you may still find people to help you for free (those who hate the Caliph).
    Be honest. Nobody likes people who are lying or who are telling the half truth.
     
    #16 demo, Oct 28, 2017
    Last edited: Oct 28, 2017
  17. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    684
    Likes Received:
    385
    Trophy Points:
    133
    Hi vovannovig, welcome to Dash. I see you have met our resident troll already!

    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.

    Hope this helps?
     
    • Like Like x 1
    • Winner Winner x 1
  18. vovannovig

    vovannovig New Member

    Joined:
    Oct 27, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Yes thank you.
    I understand that there is some password or key to accomplish this.
     
  19. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    What are you talking about??? Of course normal users can change the status of a spork flag, in their own private masternodes network!!! We are talking here about a private masternodes network, which is tottaly controlled by @vovannovig and his friends. Of course they can initiate sporks there!

    As you can see @vovannovig, in this world there are two main categories of persons. The rude trolls and the polite liars. :p

    Welcome to Dash community @vovannovig. After meeting the trolls, you have also met our polite liars too! Your basic education is completed. Beware! The polite liars are too many over here, and much more dangerous than the rude trolls.
     
    #19 demo, Oct 30, 2017
    Last edited: Oct 30, 2017
  20. alex9

    alex9 Member

    Joined:
    Feb 4, 2017
    Messages:
    57
    Likes Received:
    7
    Trophy Points:
    48
    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
     
    • Useful Useful x 2
    • Like Like x 1
    • Agree Agree x 1
  21. ksplit

    ksplit New Member

    Joined:
    Nov 4, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hello, but how to get these key pairs ?
    I failed to make these thru openssl...
     
  22. chuathoatvidiadem

    chuathoatvidiadem New Member

    Joined:
    Dec 8, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I can not apply
     
  23. DobriyBit

    DobriyBit New Member

    Joined:
    Jan 15, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  24. demo

    demo Well-known Member

    Joined:
    Apr 23, 2016
    Messages:
    3,114
    Likes Received:
    263
    Trophy Points:
    153
    Dash Address:
    XnpT2YQaYpyh7F9twM6EtDMn1TCDCEEgNX
    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
     
    #24 demo, Jan 16, 2018
    Last edited: Jan 16, 2018
  25. thephez

    thephez Member
    Dash Core Team

    Joined:
    Jan 23, 2016
    Messages:
    113
    Likes Received:
    49
    Trophy Points:
    78
    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.

    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.
     
    • Useful Useful x 1
  26. Znuff

    Znuff New Member

    Joined:
    Mar 1, 2018
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    3
    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?
     
  27. thephez

    thephez Member
    Dash Core Team

    Joined:
    Jan 23, 2016
    Messages:
    113
    Likes Received:
    49
    Trophy Points:
    78
    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.
     
  28. Znuff

    Znuff New Member

    Joined:
    Mar 1, 2018
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    3
    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.
     
    • Like Like x 1
  29. CryptoGeek

    CryptoGeek New Member

    Joined:
    Apr 28, 2018
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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 ?
     
  30. thephez

    thephez Member
    Dash Core Team

    Joined:
    Jan 23, 2016
    Messages:
    113
    Likes Received:
    49
    Trophy Points:
    78
    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.