About Pos Mining

Discussion in 'Proof-of-stake Mining' started by hepilord, Mar 11, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. hepilord

    hepilord New Member

    Jan 22, 2016
    27
    4
    How do you think what is more profitable?
    Staking on one wallet with higher amount or two wallets with lower.
    Maybe beter is staking on staking pool?
     
  2. Noah

    Noah Member
    Advocate (Twitter)

    Feb 1, 2016
    154
    97
    Male
    Amsterdam
    Can you explain why you would expect to have different outcomes? You are buying tickets in a lottery system. It doesn't really matter if you have two wallets online or just one. What DOES matter is whether they are online 24/7, otherwise they might miss the opportunity to vote. For people who cannot keep their wallets online all the time, it is recommended to use the pool. Again, theoretically it shouldn't matter whether you use the pool or whether you run your own wallet(s).

    In case you are interested in joining the pool, this guide will help you out:
    decreddiscovery.blogspot.com/2016/03/making-profit-with-decred-beginner.html
     
  3. Shadowlance

    Shadowlance Full Member

    Jan 9, 2016
    220
    155
    Male
    Doesn't matter. Staking in a pool right now is the same as solo staking in that rewards aren't shared. In your ticket comes up you get paid. If someone else in the same pool comes up you don't get paid. The main advantage is that the pool does the vote on your behalf so you don't need to keep your wallet on 24/7.

    As for two wallet staking, don't bother. First, say you had two wallets and set your max fee to 10 DCR. Then you have one wallet and set it to 20. If the ticket price is 5 DCR, each of your two wallets buys 2 tickets for a total of 4 tickets. Your single wallet buys 4 tickets for a total of 4 tickets.

    Next round the price goes up to 15 DCR. Now your two wallets don't buy any tickets, but your single wallet buys one. So after two rounds your two wallets have 4 tickets and your single wallet has 5.

    Second, as Noah said, it's a lottery system. The origin of the tickets does not matter. You could have a thousand wallets with one ticket each and still have the same chances as one wallet with a thousand tickets.
     
  4. mreichardt

    mreichardt New Member

    Jan 16, 2016
    37
    17
    Male
    Developer
    St. Louis, MO
    Like others have stated, it does not matter if you stake on your local hardware or through a stake pool. This WILL not always be the case in the future though. Future staking pools being developed will take a % of your vote earnings and give it to the pool operators to help subside their server and operating costs. This is more than fair though, because you no longer have to worry about maintaining your system online 24/7/365 and will not have to worry about any electricity costs.

    In my opinion go out and buy a Raspberry Pi 3 with a 32gb-64gb microSD and learn how to do it locally. CPU/GPU does not matter for PoS mining and it is a fun card to play with. Also it is powered off of USB 2.5v and costs pennies in electric.
     
  5. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    Does anyone have an example of a stake pool ticket on the block explorer? I'm curious as to how large they are, as I was wondering if they required a higher fee.
     
  6. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
  7. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    Interestingly the stake pool transaction is 2 bytes smaller! 295 bytes vs 297 bytes. The difference seems to be the stake pool has:
    Code:
    OP_SSTX OP_HASH160 028cfcb147364b4ce8950bde729c6c1da4bd23d4 OP_EQUAL
    
    While the normal ticket has:
    Code:
    OP_SSTX OP_DUP OP_HASH160 0d320ec666fd2aa4b9ec426c9b9afd35ade6bea3 OP_EQUALVERIFY
    
    I'm not sure on the exact meaning of OP_SSTX, but it's curious that the pool doesn't have the OP_DUP. I understand that OP_EQUAL and OP_EQUALVERIFY will do essentially the same thing at the end of the instruction set. Is the OP_DUP necessary in the normal SSTX transaction?
     
  8. davecgh

    davecgh Hero Member
    Developer Organizer

    Dec 31, 2015
    642
    788
    Male
    United States
    @Kandiru:

    You're only considering half of the full script. The full script is a combination of the output script (public key script) and the redeeming script (signature script) that is part of the input to the transaction that redeems it.

    In the case of a pay-to-script-hash address such as first one you provided:

    Code:
    OP_SSTX OP_HASH160 028cfcb147364b4ce8950bde729c6c1da4bd23d4 OP_EQUAL
    
    The other side of the script (signature script) contains some data as well as a sort of sub-script (one that hashes to the value you see here) that is executed as well. In the case of the stake pool, that script is a 1-of-2 multi-signature script which is what allows either you or the stake pool to vote.

    EDIT: Specifically for the transaction in question, we can see that the script which is being paid to is:

    Code:
    $ dcrctl decodescript 512103199b7b4cd0d6bc87363cb7b71a709c41d93574b314f1ebb370ab259ad27dd7ea210350fc901bca8e909b70a83b16f533545e69ed94c5ae6f6889b5bb3c09878a400352ae
    {
      "asm": "1 03199b7b4cd0d6bc87363cb7b71a709c41d93574b314f1ebb370ab259ad27dd7ea 0350fc901bca8e909b70a83b16f533545e69ed94c5ae6f6889b5bb3c09878a4003 2 OP_CHECKMULTISIG",
      "reqSigs": 1,
      "type": "multisig",
      "addresses": [
      "Dsd6jm1oXPRMHHzSjTPDfSfJxYjXjoi5AM9",
      "DsUTVNM7rve1Md4TzuKbweNmMF1wpmzcgEN"
      ],
      "p2sh": "DcXh5JkUrVuQQLoVfE17zUgEXBFjbhnasrY"
    }
    

    On the other hand, in the case of a pay-to-pubkey-hash address such as the second one you provided (notice that I added the OP_CHECKSIG opcode that you seem to be missing):

    Code:
    OP_SSTX OP_DUP OP_HASH160 0d320ec666fd2aa4b9ec426c9b9afd35ade6bea3 OP_EQUALVERIFY OP_CHECKSIG
    
    The other side of the script (signature script) will have the public key that hashes to the hash you see here and a signature that proves the redeemer is the owner of the public key and therefore is allowed to spend the coins.

    So, if you consider the entirety of the scripts, the stake pool scripts are larger.
     
    chappjc likes this.
  9. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    @davecgh

    Ah I see, that make sense. I copied the OP codes from the blockexplorer, I think it must have dropped off the OP_CHECKSIG from the end for space reasons.

    This is interesting, as stake tickets have a minimum fee / kB to be accepted by the network (0.01 DCR/KB). While votes have no fee. The stake pool has twice as large a voting transaction, but a 2 byte smaller ticket transaction. Since only the ticket transaction requires a fee, it's slightly cheaper to buy pool tickets!

    Of course, the larger the voting transaction, the slower the vote will propagate through the network. This means you might have a slightly higher risk of a missed vote. Actually, with TCP the packet size is probably large enough for both to be contained in 1 packet, so there shouldn't actually be any difference!

    Not sure 2 bytes is enough to make a noticeable difference in fee though.
     
    chappjc likes this.

Share This Page