Jump to content

theotherjay

HBN-Specific Staking Question

Recommended Posts

theotherjay

I would like some clarity around Proof-of-Stake (PoS) as it relates to the Hobonickels wallet.  Here is what I know and what I am unsure of.  Let me know what I'm missing:

 

Here are the (mostly) easy bits:

  1. PoS can only occur on coins that have sat in the same wallet *address* for 10 days or more (this is not the same as shifting amounts within the same wallet).
  2. HBN Wallet must be open/running
    1. If you are on v1.2.2.0 or earlier of the wallet, you must unlock the wallet manually to enable PoS minting (goto Debug Window > Console > enter "walletpassphrase [password] [timeout to keep wallet open]"  (e.g., walletpassphrase mypassword 999999)
    2. If you are on v.1.2.2.3 or higher version of the wallet, you do not need to manually unlock the wallet since PoS minting is performing the unlock under the covers while keeping the wallet locked for user-initiated transactions
  3. On startup of the HBN Wallet, worker threads (for the layman, this means processing that is occurring behind the scenes on your computer) are started to perform PoS minting.  One thread per coin "chunk" (where "chunk" refers to coins send via a single transaction)?
  4.  Each "chunk" of coins that has a coin age of 10 days or more will automatically be part of the PoS minting process while the wallet is open (and manually unlocked for v1.2.2.0 or earlier).
  5. Chunks as small as 5 HBN can take part in PoS

 

Here are the more hazy bits:

  1. How often do PoS blocks get created globally?  Is there a set timeframe (like 1 out of every 100 blocks will be a PoS block) or am I way off in my understanding?
  2. I understand that PoS minting is proportional to the total number of HBN in the PoS "chunk" relative to the total amount of mined HBN
    1. Does this mean you have a chance at getting PoS proportional to total minted HBN globally? (e.g., a chunk of 100 HBN with global mined HBN at 2000000 would give you a 0.005% chance at generating a PoS block)
    2. Or... does it mean that every PoS block is split globally among all wallets that are performing PoS minting (e.g., based on the same 100/2000000 scenario above, you would receive 0.005% of the PoS block)?

Last question:  Is there any indicators prior to receiving PoS coins in your wallet that you are performing PoS correctly?  I have coins that are older than 10 days but running my wallet overnight using v1.2.2.0 windows client with wallet unlocked did not cause me to receive any PoS coins (the staked amount on overview screen is still sitting at zero).

 

Share this post


Link to post
Share on other sites
Tranz

You have a few misconceptions.

1) If you move coins from the same wallet or even from the same address, the coins days are destroyed. So they will have to reset. It won't be for the entire balance of the wallet, unless you uses it all.But only for the amount of coins moved. However this is also somewhat deceiving . As if I have a block that contains 1000 coins, and I want to send just 1 coin to another address. The software will take the 1000, and send 1 coin to the receiver and 999(minus fee) back to your wallet address. This will cause you to lose the coin days on that entire 1000 block.

2) All version of the software require you to unlock an encrypted wallet in order for it to mint. As it will require access the private sections of the wallet. Which are not accessible if the wallet is encrypted and locked.

3) The threads are started up for each wallet, and run the the CPUMiner embedded in the code.

4) This is correct. 10 days is the start of the PoS time. It can take much longer. depending on PoS difficulty and how big your coins and how old they are. At 30 days your coins have reached max stake weight, and will have the best chance compared to all other coins.

5) Even lower amount of coins can stake. I have had stakes work below 1 HBN.

PoS block are allowed to be generated every 30 seconds. If the network detects faster generation the PoS difficulty is increased to slow them down.

You are in competition for stake, the more people that stake, the higher the difficulty and the longer it will take, and the lower the stake will be.

  • Like 1

Share this post


Link to post
Share on other sites
theotherjay

Thank you Tranz for providing clarity on these issues.  I am going to compile all of this information into a single thread once everything is clear and then it would be nice to pin the topic for everyone's benefit.  I have a few more questions:

 

1) If you move coins from the same wallet or even from the same address, the coins days are destroyed. So they will have to reset. It won't be for the entire balance of the wallet, unless you uses it all.But only for the amount of coins moved. However this is also somewhat deceiving . As if I have a block that contains 1000 coins, and I want to send just 1 coin to another address. The software will take the 1000, and send 1 coin to the receiver and 999(minus fee) back to your wallet address. This will cause you to lose the coin days on that entire 1000 block.

 So payouts from a block reset coin age for everything in that block because all coins are moved during the transaction, is that correct?  If so, how does our wallet decide which coins to use for payment when sending coins?  If I have a wallet address that contains 2 blocks of coins at different coin ages (block 1 has 1000 coins that are > 30 days old and block 2 has 20 coins that are 3 days old), will the wallet pick the "youngest" coins for a 10 coin payment so as to avoid resetting coin age on the "oldest" coins?

Share this post


Link to post
Share on other sites
Tranz

It is both random and smart. It looks for coins that will can be combined to send at the lowest fee, it also chooses the address bases on randomness.

 

There is a feature in some wallets NVC, King and a few other that allow you to choose which coins to send. It is called Advanced Coin Control.  I do have plans to implement this into HBN. It is tricky, especially with mulit-wallets. But hopefully it can be brought int soon enough.

  • Like 1

Share this post


Link to post
Share on other sites
theotherjay

Last question: Is there any indicators prior to receiving PoS coins in your wallet that you are performing PoS correctly? I have coins that are older than 10 days but running my wallet overnight using v1.2.2.0 windows client with wallet unlocked did not cause me to receive any PoS coins (the staked amount on overview screen is still sitting at zero).

I'm sorry if this is becoming tedious (I will be cleaning this up into a nice to read thread we can pin, don't forget :) ), but the initial question here wasn't answered. I have no visual indications that my wallet is performing PoS minting and I'd like to know if any are supposed to exist in the current build (1.2.2.0 or 1.2.2.3) of the wallet. Using an unlocked wallet with coins I'm 99% sure have >10 days coin age, should I see anything? Here's what I find when calling getmininginfo:

 

{

"blocks" : 427110,

"currentblocksize" : 1230,

"currentblocktx" : 1,

"difficulty" : 0.39363670,

"errors" : "",

"netmhashps" : 52.83302382,

"netstakeweight" : 27962,

"generate" : false,

"genproclimit" : -1,

"hashespersec" : 0,

"stakeweight" : 0,

"stakeinterest" : 0,

"pooledtx" : 1,

"testnet" : false

}

 

For example, should I see a stakeweight > 0?

Share this post


Link to post
Share on other sites
Tranz

No problem Jay, this is new for everyone, including myself.

 

There is not a lot of indication that you are performing stake.  One way is watching the cpu usage. The more coins you have trying to stake the better higher the % of cpu you will see being used.   The other, as you mentioned is stakeweight.  This is integer value, which if you are below 1 will only show as zero. To get to 1 you need  many coins, or coins of greater weight.

 

Give it time. Most of my coins do take some time to begin staking, generally 11-13 days. But the staking process is working great.

 

PoS was originally developed by Sunny King of PPC. There maybe much more in depth information there. Feel free to browse those threads and see if that helps.

 

I do appreciate you trying to write a nice FAQ on stake. It is a wonderful yet complex system.

Share this post


Link to post
Share on other sites
presstab

Good info here. Theotherjay, after you compile your summary, would you mind if I had a page dedicated to it on Hobonickels.info?  I am playing with the idea of having our next advertising campaign based around the stake, and linking directly to that page. 

Share this post


Link to post
Share on other sites
theotherjay

Good info here. Theotherjay, after you compile your summary, would you mind if I had a page dedicated to it on Hobonickels.info?  I am playing with the idea of having our next advertising campaign based around the stake, and linking directly to that page. 

 

It would be nice to plug the information into a wiki.  I began a wiki site last week, but I'm not sure when I'll have it up and running (and I'm wondering if the current host site and software are going to be too cumbersome and time consuming to use).  

 

presstab:  If you are able to incorporate a wiki package on your site, I'll be more than happy to start collecting and organizing HBN knowledge there instead of on a separate site.  If you are able to do it, please pick a wiki software that has a very simple and "organic" feel.  What I mean specifically is a wiki that allows you to add links to new pages that haven't been created yet by adding some specific markup (e.g., "[[my new wiki page]]") and then lets you click on that link to create your new page.  It doesn't have to do anything fancy, but basic wysiwyg editing would be nice.

Share this post


Link to post
Share on other sites
presstab

It would be nice to plug the information into a wiki.  I began a wiki site last week, but I'm not sure when I'll have it up and running (and I'm wondering if the current host site and software are going to be too cumbersome and time consuming to use).  

 

presstab:  If you are able to incorporate a wiki package on your site, I'll be more than happy to start collecting and organizing HBN knowledge there instead of on a separate site.  If you are able to do it, please pick a wiki software that has a very simple and "organic" feel.  What I mean specifically is a wiki that allows you to add links to new pages that haven't been created yet by adding some specific markup (e.g., "[[my new wiki page]]") and then lets you click on that link to create your new page.  It doesn't have to do anything fancy, but basic wysiwyg editing would be nice.

Sure I don't see why not. Let's finish this discussion via PM.

Share this post


Link to post
Share on other sites
Merick

Forgive me if this question has been answered already. I just want to know if I understand how to properly manage my wallet for a PoS coin like HBN.

Let me know if I properly understand the two concepts below.

 

I have one wallet.dat file that contains two adresses. I use one address for mining and misc transfers. The other address is used as a savings account. I expect that after 10 days the savings account will start minting coins. As long as I do not remove coins from the savings address the coin age will not reset. Does this mean that I can add coins to the savings address without affecting the age of the coins already there?

 

Minting is more CPU efficient if the coins in the savings account are moved there in larger blocks. For example moving 100 coins into savings will result in lower CPU usage during minting when compared to have 100 transactions of 1 coin each. Is this correct?

 

Thank you for your time.

Share this post


Link to post
Share on other sites
Tranz

Forgive me if this question has been answered already. I just want to know if I understand how to properly manage my wallet for a PoS coin like HBN.

Let me know if I properly understand the two concepts below.

 

I have one wallet.dat file that contains two adresses. I use one address for mining and misc transfers. The other address is used as a savings account. I expect that after 10 days the savings account will start minting coins. As long as I do not remove coins from the savings address the coin age will not reset. Does this mean that I can add coins to the savings address without affecting the age of the coins already there?

 

Minting is more CPU efficient if the coins in the savings account are moved there in larger blocks. For example moving 100 coins into savings will result in lower CPU usage during minting when compared to have 100 transactions of 1 coin each. Is this correct?

 

Thank you for your time.

 

 

You have a lot right and a few things slightly amiss.

 

In the current version you have you can't move specific coins from one address to another, within the same wallet.dat. You can create a new wallet.dat called wallet-stake.dat for example. And move coins from wallet.dat address to the address of wallet-stake.dat

 

You are correct that if you don't move your coins from your savings address it will stake. However the software that you have doesn't give you the option to move coins from one specific address or another. This is solved in version 1.3 with Advanced Coin Control. This should be released in a few days.

 

Mining coins in bigger blocks is more efficient. However if you are unlucky your coins could be orphaned, and they will have to try to stake again. Also it is healthier for the network that the coins be smaller in size. So the line is fine. It depends on the amount of coins you have as well as what you time you have to stake.

 

I think 100 coin blocks sent to a separate wallet is a good choice.

Share this post


Link to post
Share on other sites
unick

This is interesting and @theotherjay or @presstab if I can contribute in any way to wiki or marketing efforts, just pm me and let me know :)

 

So on the topic of clarifying PoS and optimizing returns, I read that once a PoS block is generated and rewarded, the coinage of the coins that served towards PoS is destroyed.  Is that correct?

 

Let's say I have transfered 1000 HBN on day 0, on day ~10 I get a PoS reward of 20 HBN. So the coin age of that first transaction (1000 HBN) is destroyed and a new cycle of 10 days with a "block" of 1020 HBN is started. Did I get that right?

 

Also, what is max stack weight exaclty? what happens after 30 days.  

 

From what I understand there is 3 possible scenarios.  

 

1. PoS was generated > 10 < 30 days (chances increases over this period because coin-age increases)

2. PoS generated > 30 days (best chance to generate a PoS since the weight is maximized but no further benefit from more days since coin-age is maxed at 30 days)

3. PoS is never generated due to lost reward by orphan block generated (any other possibilities???)

 

Did I miss something ?

 

If I got that all correct and in other terms,

Coins between 10 and 30 days are are "mature" for rewards and increasingly gaining more coin-age witch increases their chances of actually getting a reward. If they do produce rewards, they are destroyed and a new "block" of coins is created restarting a new cycle.  In that same exemple, my 1000 HBN is now "destroyed" and a new cycle is started with a 1020 HBN block of age 0.

Coins older than 30 days are still mature to generate reward but they would have capped their max-coinage and offer no other benefit in weight except for a bigger "block of coin" would win over a smaller "block of coin" (1000 HBN vs 100 HBN of same coin-age or in battle for PoS reward, 1000HBN would win the reward)

 

So in order to optimize the returns on HBN, it would be better to move a "block of coin" (my 1000HBN in this exemple) just after it gained reward since I wouldn't destroy that many coin-age.  Also, it would be wise to have smaller chunks of HBN instead of a bigger one to let stake since in the case of an orphan block, the lost reward would be less "hurting" in the first case then in the second one. (100 X 100HBN better than 10 X 1000 HBN better than 1 X 10 000HBN).

 

Thanks guys

:D

Share this post


Link to post
Share on other sites
Tranz

If you have 1 block of 1000 coins, and they go for stake, you are left with not 1020 coin block, but rather 2 blocks of 510. Each time a block of coins stake, they are split.

 

So you will see lower stake as time goes on, but it will be more frequent. Eventually it will split so much that it becomes too much for the algo to work with and you may need to combine a few of the smaller stakes into a bigger chunks.

 

1) 10 days is the start of the staking process, and often time it doesn't take long to generate stake.

2) At 30 days the coins have the highest weight.  So if it was one person with 100 coins at 10 days and another with 100 coins at 30 days. The 30 days should stake first. but there are other factors that can effect this including luck.

3) Don't worry about orphans, currently they are returned to the pool of coins working stake.

 

You are correct at the best time to use your coins, would be directly after they stake.

Share this post


Link to post
Share on other sites
unick

@Tranz Oh I didn't know about the split... Thanks for clarifying that up :) and about orphans... what you mean by currently returned to pool? in a future release this would be changed? So if they return to pool... there is no "real" loss of interest. It's only pushed forward in the cycle and it will "retry" to stake at a later time... is that correct?

 

 

And I played around with the new feature coin control.... it's tha BOMB  :P .

 

Seriously, you can really see the process of staking and the coin-age (and now I know why I have multiple block of same size... they splitted!).  So theorically, you can have blocks over 30 days, but in practice, it's less likely as they get prioritized with age.  You can clearly see with the coin control that blocks over 30 days are rare.  In other terms, the global supply of HBN is mostly always between 10-30 days old.  If people don't open their wallet for a long period of time... they might end up with coins over 30 days old witch, when they open their wallet, would be called to be staked and coin-age would then be refreshed... Pretty cool :)

 

Plus it's really easy to regroup the splitted blocks to make a newer and bigger block to stack... SWEET  :lol:

Share this post


Link to post
Share on other sites
Tranz

No orphans will not be changed to lose coin age.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Cryptocurrenytalk Logo

 

News, information, and discussions about cryptocurrencies, blockchains, technology, and events. Blockchaintalk is your source for advice on what to mine, technical details, new launch announcements, and advice from trusted members of the community. Cryptocurrencytalk is your source for everything crypto. We love discussing the world of cryptocurrencies.

 

   
×
×
  • Create New...

Important Information

By using CRYPTOCURRENCYTALK.COM, you agree to our Terms of Use.