Yesterday @nuad01 posted a good summary under the Gridcoin tag describing the different kinds of forks we can come across in the cryptocurrency landscape. I would like to take this opportunity to further explore the cause and effects of the silent fork type he mentioned. This is the only fork type that the Gridcoin network experiences regularly, but the underlying logic and causes apply to all blockchains.
Lets assume that we start this discussion with all wallet clients on the same chain, and everything is running smoothly. The wallet which successfully stakes the next block is allowed to add this block onto the Gridcoin blockchain, increasing the block height by one. However, sometimes two (or even three) clients may all stake a block at roughly the same time, and both of these staked blocks have the same block height. This results in a fork in the chain, as shown in the illustration below:
Each wallet (the technical term is a node) on the network will individually choose which block, and thus chain, to accept and support. Generally speaking, this will always be the first chain they encounter. Soon, a miner on one of the two forks will produce another block on that chain, which makes that side of the fork stronger. This will cause wallets on the weaker chain to migrate to the stronger chain. The extra block on the weaker chain will be abandoned - this block is known as an orphaned block. All of this happens automatically, behind the scenes, without any need for user intervention.
Sometimes, both forks are relatively strong and will continue to stake for some time. This rare phenomenon is called extended forking, and is demonstrated in the illustration below. Again, this is generally fixed by the network nodes without any need for user intervention.
Fork FAQ
I just staked a POR reward, but it disappeared again!
This happens when your wallet is on the forked chain that is abandoned. The block you staked is orphaned, and therefore the rewards that you were given are lost as they were not recorded on the surviving chain. Not to worry though - the surviving chain also never recorded that you were paid out! Therefore, you will be paid out again for this research at a later date (when you next stake).
My wallet says it is out of sync. What do I do?
Sometimes, your wallet does not make its own way back onto the correct chain. In this rare circumstance, your first fix would be to shut down and then restart the client. In 99% of cases, this will sync your wallet back up to the correct chain. If this fails to remedy the situation, instruct your wallet to download the blockchain again.
I think that https://www.gridcoinstats.eu is on a fork. What do I do?
Don't worry - just like your wallet https://www.gridcoinstats.eu will sync back up to the correct chain in a short while. If the website fails to sync up for an extended period of time (which I am yet to see happen) you can ping the creator/administrator Startail on the developer's Slack.
Why does the Gridcoin blockchain have forks?
Actually, this is a 'problem' faced by every blockchain, as communication between nodes is never instantaneous so near simultaneous block staking is not unusual. There is nothing to worry about.
Image credit:
Banner, @joshoeah
Chain Images, @me-shell
You are on fire dutch :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
A lot of information to get out today. This was something else on the to-do list.
Thanks for the support! =)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for this. Good information to have. Learning more every day.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Worse case, re-downloading the blockchain worked for me but to save time and data, I have backed up my gridcoinresearch.conf, wallet and txleveldb folder as at the last working session before the fork or corruption, I just restore.
Thank you.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit