Pos Mining

Discussion in 'Tickets' started by VanQ, Feb 22, 2016.

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

    VanQ New Member

    Dec 31, 2015
    60
    2
    Male
    How do i know if my wallet is automatically voting?
    I have 2 tickets both 2dcr each
     
  2. blackdragon

    blackdragon New Member

    Dec 28, 2015
    19
    9
    Male
    If you enabled it with --enablestakemining and then unlocked with dcrctl --wallet walletpassphrase ... 0, then it should begin voting without any further input.
     
    Kandiru likes this.
  3. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    As blackdragon said, you must have your dcrwallet.conf file setup properly (OR have started your wallet with the proper CLI flags):
    Windows CLI command:
    Code:
     dcrwallet --username USER --password PASS --enablestakemining true --balancetomaintain 10 --ticketmaxprice 5 --walletpass PUBLICWALLETPASSWORD
    dcrwallet.conf file:
    Code:
    username=username
    password=password
    enablestakemining=true
    balancetomaintain=10
    ticketmaxprice=5
    walletpass="publicwalletpassword"
    The walletpass is only needed if you added a public wallet passphrase when you created your wallet. If your wallet only has one password then leave this flag out.

    Regardless of which method you use to start dcrwallet (either CLI flags or the dcrwallet.conf file in C:\Users\yourusername\AppData\Local\Dcrwallet), as soon as you start dcrwallet you should see some output like:
    Code:
    [INF] WLLT: Stake mining is enabled. Votebits: 1, minimum wallet balance 0
    [INF] WLLT: PLEASE ENSURE YOUR WALLET IS UNLOCKED SO IT MAY VOTE ON BLOCKS AND RECEIVE STAKE REWARDS
    Now you can unlock your wallet, either indefinitely (indicated by the 0 after your wallet passphrase) or with a fixed time limit:
    Code:
    dcrctl --wallet walletpassphrase YOURWALLETPASSPHRASE 0
    Now you just sit there and wait.. leave everything running, and eventually you will see something like this in the dcrwallet window which indicates a successful vote.
    Code:
    07:39:51 2016-02-22 [INF] WLLT: Voted on block 0000000000002e92569e0fbb70399fe82fddf374c5cdbc0b3624f0243f51b012 (height 4261) using ticket  xxxxxxxxxxxxxx7edcf6dcbc81ca72b9436b2d7xf20dcb7b107141f6f69 (vote hash: xxxxxxxxxxxxxxx24a05b51d79c88dccex5df5dd395ddd95c17be86d072)
     
  4. blackdragon

    blackdragon New Member

    Dec 28, 2015
    19
    9
    Male
    Note that you can control your votes by setting --votebits= (1 for Yes, 0 for No). Default is 1, and unless you want to veto every block you don't need to change this.
     
    eshriek likes this.
  5. Bill007

    Bill007 New Member
    Translator (Français)

    Jan 25, 2016
    33
    17
    How long have you been waiting to receive your PoS mining reward and with how many coins are you stake mining ?
     
  6. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    It takes 256 confirmations (~1 day) for your stake reward to show up in dcrctl --wallet getbalance and become usable again, AFTER it gets called to vote.. However, you can see what your balance will be with the command
    Code:
    dcrctl --wallet getbalance default 0 all
    This command shows you what your hypothetical net Decred holdings are (Current usable balance + amount spent on tickets + rewards from successful votes). It is accurate as soon as one block after a transaction.

    The number of coins you wish to stake mine is entirely up to you. It is controlled by the parameters when you bring your wallet online. The current ticket price has been stable at 2 DCR... So you will be stake mining with 2 DCR per ticket (+ the 0.05 transaction fee which you will get back).
     
    Bill007 likes this.
  7. Bill007

    Bill007 New Member
    Translator (Français)

    Jan 25, 2016
    33
    17
    Thank you for your explanation !
     
  8. bones261

    bones261 New Member

    Feb 13, 2016
    8
    1
    Male
    I'm sorry if this question was asked elsewhere. I just discovered that I am moving 2 weeks from now, so the computer running my solo POS mining will be offline. I'm considering getting a VPN, but have read elsewhere that If you run the same seed on a VPN and your local computer, this will cause issues. So, is the best bet just to potentially miss votes? I only have 75 coins, so it's not many tickets. (But I think the POW miners are getting irritated with all of the missed votes. Or are people already putting their votes on veto?)
     
  9. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    Hey bones261 - I think you are referring to a VPS... and in that case you should be fine to run a secondary wallet on a VPS while your main PC is offline, as long as you don't purchase any tickets or send any funds using the wallet running on the VPS. Several of us have already setup redundant wallets and I personally have not seen any issues yet. Issues will arise, however, if you purchase tickets or send funds from the VPS and bring your main wallet back online.
     
  10. bones261

    bones261 New Member

    Feb 13, 2016
    8
    1
    Male
    Yes, I do mean VPS. I'll look into it. Thanks for the reply. I don't think my employer would appreciate it, if I try to do it by using VPN into their system. LOL
     
    David likes this.
  11. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    Amazon Web Service seems to be pretty cool - and they offer 1 year free as long as you don't push the limits of the free service allotments. I can't imagine your employer would be amused! Good luck.
     
    bones261 likes this.
  12. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    So I've been trying to figure this out for awhile... but what exactly happens to a ticket if it was called to vote but the vote was missed? Do the original funds minus the transaction fee (so 1.95 DCR) used to purchase the ticket get sent back 256 blocks after the missed vote? It looks like the funds for a missed ticket came back and immediately went back out to purchase another ticket, even though I should not be buying any tickets at this time. I've been keeping track of my balance with 100% accuracy so far, both through PoW and PoS mining, but a missed vote threw me off several hundredths of a coin.. I can't seem to follow what happened here.
     
  13. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    Missed/Revoked tickets are sent back to wallet and require a 0.025 DCR tx fee. That might correct your calculations. 2 of my tickets were revoked after successful vote so i have loss of 0.15 DCR(0.05 for purchase + 0.025 for missed ticket fund)*2 on those tickets in mining fee. Its interesting to see that block explorer shows fee on tx sending back the funds as 0.075 DCR.
     
  14. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    Hmm... looking further into it, I don't see a 0.025 tx fee anywhere. My vote was supposed to be included in block # 4316, and as you can see there were only 3 voters for that round. My transaction list shows 2 DCR being recieved in block # 4352, and immediately being spent on a new ticket, all in the same transaction ID. The block explorer, however, only shows me purchasing a new ticket in block # 4352. I'll see if the numbers change tomorrow after the transaction matures, but trying to follow what happened here isn't easy! The TxID in question is 4f1e6039abb13d2a208c92cf2c2663800c3d6ffb939b1c7a628b3de6ea5f56c4. Unfortunately in the blockchain explorer it just looks like a normal ticket purchase. In my wallet, there are two entries with the same transaction ID (a receive, then a send immediately after).

    Keep in mind my wallet is configured right now to only purchase tickets if I have 1000000+ DCR... and I'm not quite there yet :D
     
  15. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    Here is how a revoked ticket's 2 dcr are sent back to me.

    Code:
    09:32:06 2016-02-24 [INF] WLLT: Revoked missed ticket 30affe49e265ab492626f9c5f6
    02e0d254f0ff9dbe3207c6419f4142e205b19b (tx hash: 4b504f179d8787bf6e4994949a24586
    6771889516252555922294fc2069d96a6)
    https://mainnet.decred.org/tx/4b504f179d8787bf6e4994949a245866771889516252555922294fc2069d96a6

    and i received only 1.925 DCR from that tx so i put in 2 DCR and if ticket missed/revoked i get 0.075 DCR less. I am assuming 0.05 for initial tx & 0.025 for sent back fund. That way total balance is also matching up. I think explorer thinks of tickets purchase & sent back fund as one tx with 0.075 DCR fee.
     
    David likes this.
  16. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    Thanks for the info @sambiohazard. I'm going to dig through each one of my transactions manually to determine what happened. Right now, from what I calculated and what getbalance is showing me, I am 0.10325 DCR short of the getbalance output. Interestingly, if I manually calculate my "getbalance default 0 all", I am 0.0532504 DCR short. Subtracting the differences in my calculations between "getbalance" and "getbalance default 0 all" yields a result of 0.0499996. Hmmmm... looks like a missing TX fee to me!
     
    sambiohazard likes this.
  17. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    That should be a ticket that you bought and didn't count tx fees.
     
    David likes this.
  18. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    I hate to speculate right now - but that could be the ticket that was automatically purchased after I failed to vote when my ticket was called. I'll get to the bottom of it!
     
  19. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    I think if you count the sstx it will sort itself out and count revoked tickets as -0.075 DCR, that is the total price of tx fee for a revoked vote.
     
    David likes this.
  20. neo cortex

    neo cortex New Member

    Dec 17, 2015
    7
    1
    Male
    #20 neo cortex, Feb 26, 2016
    Last edited: Feb 26, 2016
    Quick question regarding PoS voting and PoS pools, im still trying to wrap my head around it. I hope this is the right thread :)
    From the wiki
    https://wiki.decred.org/Introduction
    • PoS acts as a "2nd authentication factor" on the content of blocks created by PoW miners, providing a check on the power of PoW miners.
    • PoS can effectively force soft and hard fork upgrades by voting against PoW blocks that do not adhere to new rules. This creates a notion of continuity across forks that is not possible when using pure PoW.
    • PoS helps to democratize the process of deciding what software upgrades should and should not happen.
    • PoS rewards create an incentive for users to hold their coins and participate in the PoS consensus process.
    This is my understanding of how PoS works, please please correct me if im wrong :)
    PoS miners vote on whether a block that is mined is okay with the community, so assuming we have block size issues in future(I hope not lol) and a miner decides to mine a 48MB block; PoS can vote against it and render it invalid.

    1)What happens to the transactions in that 48MB block, are they lined up for the next(valid) block?

    2)suppose Im solo staking( that the correct term yea?) and I buy a truck load of tickets does that not increase my chances of being selected(albeit randomly) to vote? if not please explain the ticketing system to me

    The testnet PoS pool is live (or being tested) yea? so assuming all goes well and a mainnet pool is live, and everybody joins 1 mainnet pool;
    3) does that not 'centralize' the voting process?
    From what I have seen so far there is no limit on the amount of 'voters' a pool can have, so the biggest pool with a shit load of tickets(this refers to question 2 if Im correct about this) have the higher chances of being selected to vote(tons of voters with tons of tickets),
    4) What measures are in check to ensure certain pools don't drive their own agenda; or to phrase it differently are there limits to the size of PoS pools or anything that prevent a certain pool from wielding too much power over voting?

    5) Also in a PoS pool how are the votes counted? is it a case of simple majority? more 1's than 0's mean 1's have the vote?

    6) another one for you, there is a 30% of the block subsidy (same as reward yea?) that goes to PoS mines. How is the reward divided in a PoS pool? is it divided into 100 equal parts for the 100 voters in that pool or what?

    Just trying to understand the PoS concept here gents, any help is welcome :D :D
     

Share This Page