Cars have check oil lights. Nodes have debug logs. This section aims to help you understand what your debug log is trying to tell you.
The UpdateTip log line is probably the most frequent log line one will see when running a node. It is emitted when your node validates a new block which increases the height of your copy of your validated blockchain.
See more: Does debug log show bitcoin value
The source code for this function can be seen in the bitcoin repo .
Below we elaborate on each variable you see in the UpdateTip log statement.
The hash of the block which your node has so far validated to be the tip of the longest chain of blocks with the most work done on it. The string is a sha256 hash of the merkle root and the leading zeros are what is targeted by the difficulty that blockchain was at the time the block got mined.
This is the height at which the validated block height is currently at. At correlates to the best hash string.
Can be seen in the Bitcoin repo .
The version is hexidecimal 4 byte value that miners can use to signal which consensus rules their are in support of. It forms a part of the block header and part of Bitcoins consensus protocol.
Maybe you are interested: Kidney disease and dialysis information – DaVita
You know the saying the valid chain has the most work. The log2_work string in your debug log is actually the log2 of the work done by the chain up until the corresponding block height. log2(nChainWork)
The definition of nChainWork can be seen in the bitcoin repo .
This tells you the number of accumulated transactions from the tip of the current block till the genesis block. It is a currently defined as a 32-bit positive number.
Can be seen in the bitcoin repo .
Date that the block was mined. This string is a ISO 8601 format.
Estimated progress that your node has made in syncing the chain. This value is calculated by dividing the number of transactions your node has validate and the number of transactions being reported at the tip of the best chain on the Bitcoin network.
Function can be seen on the bitcoin repo .
Ask the closest Bitcoiner you know what the cache item in the UpdateTip log line means.
# New outbound peer
# Ping Timeout
Ping timeouts happen when a node lose a connection to a peer.
Your node is just one of many nodes that collaborate to keep consensus on the state of the Bitcoin blockchain. A healthy node is a well connected node which can send a receive messages with a diverse set of peers to verify the current state of the valid Bitcoin blockchain with the most work on it.
For a node to know whether it is still connected to a peer it will need to ping it’s peer every once in a while. Think of pings as you checking in on a colleague at the office during a productive work day.
Ping timeouts happen when a certain amount of time goes by without a node getting a response back from it’s peer after sending it a ping.
The log shows you the amount of time that went by without getting a response back from a peer. The TIMEOUT_INTERVAL is set to 1200 seconds (20 minutes). You will notice that the ping timeout is long enough to fit prime time TV show episode. This allows a well connected node to not spend most of it’s time responding to pings from it’s peers and spend that time looking out for the next tip of the blockchain.
The ping message is an unsigned 64-bit integer. When your node pings a peer it sends it a random nonce. The peer would respond with this nonce to acknowledge your ping.
Your node disconnects to the peer that doesn’t respond to it’s ping in a timely fashion. Which is how you get the ping timeout log line.
# Pre-allocating block
# Leaving block file
While validating the blockchain your node stores the blocks in block files. Which can be found in the “blocks” data directory which your bitcoin daemon is running in.