8

The new version of the daemon has the "alt_chain_info" command. The output looks like:

5 alternate chains found:
1 blocks long, from height 1264997 (5502 deep), diff 1746032035727893: 57519747c6f430928b39aaab4f68515640b219401ed3f8ce147ceadb1ce21e73
1 blocks long, from height 1269997 (502 deep), diff 1783031745233488: 4137fc903c86833cc876bc909a4286222e3eddb86a2f425d50180b2aa80858bc
1 blocks long, from height 1261802 (8697 deep), diff 1724749748888991: d2c43ed9754d9ffbbe22841b72dc7999d0521bcc0c63b62de38155315db3618c
1 blocks long, from height 1267367 (3132 deep), diff 1764072489331929: c209106962ffcf53d20502d19ef8bf4c5945d6b9f2d2af45c9f345ffc3d3f9ed
1 blocks long, from height 1270427 (72 deep), diff 1785919159112029: d5f4e42683b41ea68d2f1c7e1319cdca8df162dab7295d9d00e14230856a3c63

How does one interpret the output and how do I know that I'm on the "official" chain and not on an alternative one?

5

The "main" blockchain is the blockchain that follows consensus protocol with the most amount of work behind it, which almost universally means the blockchain with the highest height.

Here we have the chain your node is on and 5 alternate chains, each of which are 1 block long and at some depth. Depth refers to how many blocks behind that chain is from the main chain. If we add the heights to the depths for each alternate chain, we'll get the same answer: 1270499. That's the height of the main chain, which is higher than all the alternates.

In this case, even the closest alternate is 72 blocks behind, meaning it would need to catch up by 72 alternate blocks in order to surpass the main chain. Once an alternate chain gets to a certain depth, the daemon will forget about it, as it becomes precipitously less likely that the blockchain could ever reorganize around that alternate chain due to the amount of work that would be required to do so.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.