<p>(I don't think of this as a standard term, so the context was useful for me to figure out what this question was asking -- then I realized you're asking about a specific usage I have used regarding some p2p logic!)</p>
<p>I've used the term &quot;stale tip&quot; in the context of Bitcoin Core's p2p logic to specifically refer to the case of our tip not having advanced for a long time. This can arise benignly if the network is slow to find a block, of course; but it can also arise if our peers are not giving us blocks that are being found for some reason.</p>
<p>The &quot;stale tip&quot; detection logic in Bitcoin Core (see <a href="https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L251-L252" rel="noreferrer">here</a>, <a href="https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L1232" rel="noreferrer">here</a>, and <a href="https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L649-L656" rel="noreferrer">here</a>) is a simple check to see if our tip hasn't updated for a given amount of time (30 minutes), and if that condition triggers, our p2p logic will try to <a href="https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L3995" rel="noreferrer">find new outbound peers</a> to connect to with the goal of checking to see if any peer we can find has a more-work chain than the one we're on (and if we succeed, we will <a href="https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L3923-L3980" rel="noreferrer">evict</a> an existing peer).</p>
<p>A writeup of this behavior (and some other p2p design considerations) is <a href="https://github.com/bitcoin-core/bitcoin-devwiki/wiki/P2P-Design-Philosophy" rel="noreferrer">available on the Bitcoin Core wiki</a>.</p>

CC BY-SA 4.0
2023-02-03T07:40:15.580Z
Such happens when importing many keys by importwallet. Bitcoin Core 24.0.1.
pbies
CC BY-SA 4.0
2020-12-02T17:52:50.903Z
2020-12-02T17:52:50.903Z
sdaftuar
<p>Stale blocks and orphaned blocks are defined <a href="https://bitcoin.stackexchange.com/questions/5859/what-are-orphaned-and-stale-blocks/">here</a>.</p>
<p>What is a stale blockchain tip? Is it a blockchain tip missing the latest mined block? Or is it a blockchain with a stale block (as defined in that post) at its tip?</p>
<p>This question was asked during <a href="https://bitcoincore.reviews/19858" rel="nofollow noreferrer">this</a> Bitcoin Core PR review club session on Bitcoin Core <a href="https://github.com/bitcoin/bitcoin/pull/19858" rel="nofollow noreferrer">PR 19858</a></p>

<bitcoin-core-development><blockchain-fork><terminology><stale-block>
What is a stale blockchain tip? Is it a blockchain tip missing the latest mined block?
Michael Folkson
# What is a stale blockchain tip? Is it a blockchain tip missing the latest mined block?

(Asked by: username_0 on 2020-12-02)

Stale blocks and orphaned blocks are defined [here](https://bitcoin.stackexchange.com/questions/5859/what-are-orphaned-and-stale-blocks/).

What is a stale blockchain tip? Is it a blockchain tip missing the latest mined block? Or is it a blockchain with a stale block (as defined in that post) at its tip?

This question was asked during [this](https://bitcoincore.reviews/19858) Bitcoin Core PR review club session on Bitcoin Core [PR 19858](https://github.com/bitcoin/bitcoin/pull/19858)

**Tags:** bitcoin-core-development, blockchain-fork, terminology, stale-block


---

## 1 answers

### Answer by username_1 on 2020-12-02. Score: 6 | Accepted answer

(I don't think of this as a standard term, so the context was useful for me to figure out what this question was asking -- then I realized you're asking about a specific usage I have used regarding some p2p logic!)

I've used the term "stale tip" in the context of Bitcoin Core's p2p logic to specifically refer to the case of our tip not having advanced for a long time. This can arise benignly if the network is slow to find a block, of course; but it can also arise if our peers are not giving us blocks that are being found for some reason.

The "stale tip" detection logic in Bitcoin Core (see [here](https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L251-L252), [here](https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L1232), and [here](https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L649-L656)) is a simple check to see if our tip hasn't updated for a given amount of time (30 minutes), and if that condition triggers, our p2p logic will try to [find new outbound peers](https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L3995) to connect to with the goal of checking to see if any peer we can find has a more-work chain than the one we're on (and if we succeed, we will [evict](https://github.com/bitcoin/bitcoin/blob/a35b948836db20fab9b48d3b77cf9f23ffee109a/src/net_processing.cpp#L3923-L3980) an existing peer).

A writeup of this behavior (and some other p2p design considerations) is [available on the Bitcoin Core wiki](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/P2P-Design-Philosophy).

> **Comments:**
> **username_2**: Such happens when importing many keys by importwallet. Bitcoin Core 24.0.1.  

---

