Coin Control

From HoboNickels Wiki
Revision as of 23:38, 6 December 2014 by Tranz (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Coin Control

One of the features added in Hobonickels version 1.3 is coin control. The original writeup for it can be found on bitcointalk. Coin control is an important tool for Proof of Stake (PoS) coins and lets users see what is happening during coin operations. By default when coins are sent, the coins are selected by giving priority to coins with lowest coin age blocks of coin – alternatively coin control lets users select specific coin blocks to use for transactions.

Optimizing PoS

Competing for Stake

Whether PoS is going to generate a block or not is determined by several factors. By looking at the age of the coins and the size of the blocks you can get a rough estimate of the possible rewards of running PoS. If none of the coin blocks are older than 10 days then they will not be eligible to compete for stake. Blocks become eligible after ten days of aging. After twenty days coin age has hit its maximum point for that particular block. Currently it is being debated whether or not the HoboNickels network should change to allow coins to continue to age until day 30 in order to allow smaller blocks of coin to be able to compete for stake more aggressively at older ages.

The HoboNickels network adjusts the PoS and PoW difficulties to target block creation once every 30 seconds.

Considering Block Size and Quantity

If a wallet holds small blocks that are not competitive once mature, the owner of the wallet has the ability to select the small blocks using coin control and combining them by either sending them to a new wallet or sending them to the same wallet that they are held in at the moment.

The quantity of blocks is factor that should be taken into consideration more seriously. Every block, once it matures and starts the staking process, is in competition with other blocks attempting to stake. Knowing that the network is setup to produce a block every 30 seconds, there is a limit of about 2880 blocks per day that can be produce between PoS and PoW. While having multiple block of coins ready to stake is a good thing for the network, it can be a resource intensive task for the CPU. The objective is to find an optimal range of block quantity so that the CPU isn't overloaded, and also that the staking process continues to add security to the network by having many blocks competing for stake.

Current Opinion on Optimal Block Size

It is recommended that users find the optimal block size composition for their wallet and goals. Although the state of the HoboNickels network is always evolving and user computer equipment varies, the current state of the HoboNickels network comfortably accommodates the following block conditions:

  • Up to 500 blocks, no real need to combine anything, maybe check for really small blocks (dust transactions, below 1 HBN) and combine those.
  • Between 500 and 1000 block, start analyzing your blocks and combine the youngest blocks into fewer blocks.
  • Over 1000 blocks, you might actually see your computer or the wallets performance affected by the PoS process, there is a lot of block trying to stake. Definitely try to combine into fewer blocks.

Considering Block Size and Quantity

If a wallet holds small blocks that are not competitive once mature, the owner of the wallet has the ability to select the small blocks using coin control and combining them by either sending them to a new wallet or sending them to the same wallet that they are held in at the moment.

The quantity of blocks is factor that should be taken into consideration more seriously. Every block, once it matures and starts the staking process, is in competition with other blocks attempting to stake. Knowing that the network is setup to produce a block every 30 seconds, there is a limit of about 2880 blocks per day that can be produce between PoS and PoW. While having multiple block of coins ready to stake is a good thing for the network, it can be a resource intensive task for the CPU. The objective is to find an optimal range of block quantity so that the CPU isn't overloaded, and also that the staking process continues to add security to the network by having many blocks competing for stake.

Current Opinion on Optimal Block Size

It is recommended that users find the optimal block size composition for their wallet and goals. Although the state of the HoboNickels network is always evolving and user computer equipment varies, the current state of the HoboNickels network comfortably accommodates the following block conditions:

  • Up to 500 blocks, no real need to combine anything, maybe check for really small blocks (dust transactions, below 1 HBN) and combine those.
  • Between 500 and 1000 block, start analyzing your blocks and combine the youngest blocks into fewer blocks.
  • Over 1000 blocks, you might actually see your computer or the wallets performance affected by the PoS process, there is a lot of block trying to stake. Definitely try to combine into fewer blocks.

While these are just guideline to get you started, try to find what works best for you in your situation. You might now understand why the nominal size of the block is less important than the quantity of blocks in your wallet when it comes to resource consumption. When network stake weight is relatively high, it might be useful to carry larger blocks of coin rather than smaller blocks.

Benefits of larger blocks:

  • Larger reward on PoS generation
  • Lowers the CPU use to run stake (multiple small blocks are more difficult to process)
  • Faster generation of stake (wastes less power running computers)

Benefits of smaller blocks:

  • Enhances network security (more hash rate devoted to PoS)
  • Easier for the network to process
  • Slows the rate new coins are generated

Coin generation analysis

If left alone (not recombined) and not spent, eventually the block size of coins run with PoS in a wallet will get so small that the effective reward for PoS will be minimal. For example imagine if a wallet containing 5000, 30 day old coins with an average block size of two coins was run with PoS. If it generated an average of four new blocks per hour (network workload may vary) it would produce at most (2 * .06) * 4 * 24 = 11.52 new coins in a day while reseting the age on 192 coins. After 10 days of running 24/7 it would not even reset the age of half the coins in the wallet.

If the same wallet had 1000 coin blocks it could potentially generate up to 300 new coins in just over an hours time running PoS and reset the coin age on the entire wallet, however, an orphan block could be costly.

Advanced coin control really helps to efficiently run PoS and maximize returns; it is worth looking at your coin age and block size.

Tutorial

Lets say that I have a wallet with three blocks of 100 coins and I have a friend that I would like to send one of the blocks to. These blocks have matured for about 5 days, so I want to make sure to only disturb the coin age of the one block that I am sending so that the other two blocks will still be able to stake in 5 days. It is important to take into account that this transaction will send 99.999 HBN because the fee will be taken from the block being sent rather than the other two blocks in the wallet.

Enabled Coin Control

In the wallet client, go to settings and then select options. Click on the tab that says Display. Check the box that says Display coin control features (experts only!). Press OK.

Select Wallet and Blocks

I select the wallet in the multi-wallet window, this particular wallet is called wallet-mine.

After selecting the wallet I will hit the send coins button.

There will be a box titled Coin Control Features inside of this box I will hit the inputs button. A new window will appear called Coin Control. In this window you have the option to use the tree mode or the list mode, I prefer list mode, but decide yourself which you like the best.

You will see the total amount of coins held in the wallet with the amount of blocks held in the wallet in parenthesis. If you are using tree mode, hit the arrow to expand the view and display your wallet's blocks, if you are using list mode the blocks are already displayed. Select the block with the smallest amount of confirmations. For my transaction I select the 100 HBN block with the smallest amount of confirmations, but you are also able to select more than one block if you transaction requires more than one block. Press OK.

You will now be taken back to the Send Coins screen and the details to include in your transaction are prepared for you.

Send the Blocks

This is the important part of the tutorial. I want my 0.001 transaction fee to be taken out of the block I am sending so that my other two 100 HBN blocks do not change their coin age. If the transaction fee is taken out of the wrong block then it will leave me with only one block of 100 HBN that has aged five days, and my other 100 HBN block will turn into a 99.999 block of HBN that will have 0 days of aging.

Look at the information in the Coin Control box. It will tell the amount of blocks you are sending (mine is 1), the amount of HBN being removed from your wallet (mine is 100 HBN), the transaction fee (0.001), and the amount that will be received by the other party after the fee is taken into account (mine is 99.999).

Copy the After Fee amount and paste it into the Amount field at the bottom of the client. Double check the Change = 0.00

Put the receiving wallet address in the Pay To field, not into the custom change address field.

Press Send

My block has now been sent to my friend's address, who will see 99.999 HBN deposited into their wallet. The 0.001 transaction fee was taken out of the 100 HBN block and my other blocks do not have their aging process disturbed.