From: Anthony Towns <aj@erisian.com.au>
To: Antoine Poinsot <darosior@protonmail.com>
Cc: Ram <pseudoramdom8@gmail.com>,
Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Subject: Re: [bitcoindev] [BIP Proposal] Stale Tip Relay
Date: Mon, 16 Nov 2026 16:49:09 +1000 [thread overview]
Message-ID: <avqnZeBFkF5hQNuU@erisian.com.au> (raw)
In-Reply-To: <ktZb1ZnKZJb1qh4uGvGybRoeiMA8nD-BfozO92FtGWs3ELzPPM8QMcwL8qZJVRF9kk0jDdubLPUlxhj2YHk1Ndu2A5uMVGC8swfHAuE-IrQ=@protonmail.com>
On Wed, Nov 11, 2026 at 10:04:55PM +0000, 'Antoine Poinsot' via Bitcoin Development Mailing List wrote:
> On Monday, November 9th, 2026 at 11:23 AM, Anthony Towns <aj@erisian.com.au> wrote:
> > On Thu, Nov 05, 2026 at 11:19:58PM +0000, 'Antoine Poinsot' via Bitcoin Development Mailing List wrote:
> > > I'd like to suggest an incremental approach, and to start relaying only stale
> > > headers at first.
> > The reference implementation [0] offers three modes: no stale relay,
> > stale header relay only, or stale block relay, and defaults to none:
> Just one more knob!
Bit snarky there...
> My point is that it’s not worth working this out rigorously now,
> when relaying headers alone gets most of the benefits without raising the
> question.
Hmm, Claude argues that I unfairly misinterpreted this (namely, as "I'll
nack stale block relay, and also I'll refuse to listen to any arguments
as to why it's worthwhile"). So, trying not to do that...
I think the only benefit that stale header sharing alone gives is the
ability to get a better estimate on how much hashrate is wasted on stale
blocks, and (if relayed quickly) perhaps give advance notice that an
honest reorg might happen in the near future, though without providing
any indication of what the consequences of that reorg would be.
While that's a big point, I don't think I'd say that's "most of the
benefit" -- I think being able to analyse the contents of the stale blocks
(for double spends, censored/prioritised transactions, timeliness of
transactions, and/or inclusion of non-standard transactions) also matters.
I guess I'd say that the availability of stale headers can help **raise**
concerns (maybe a selfish mining attack is happening? maybe block relay or
work delivery is too inefficient? maybe there's a soft fork going on?),
while the availability of the corresponding block data **eases** those
concerns, or (in the cases where there is an attack and it's appropriate
to be concerned) at least clarifies them.
I guess my conception is more along the lines of:
a) increased availability of stale block info is useful, and
it's currently very easy for that data to get completely lost (eg,
nodes generally won't share blocks they haven't fully validated,
so even if the block propagated a little, if it didn't make it to
a researcher's own node to be manually shared, it's lost)
b) increased availability of just stale headers could be useful on its
own, and is lightweight enough that it's worth splitting out as
an option
c) having many nodes relay stale headers, and *also* the associated block
data if they happen to have it due to luck seems likely to be an
effective way to inject stale block data into the network reliably,
with very little overhead
d) having the data in real-time could be useful, but only marginally --
it doesn't seem likely to make reorgs meaningfully faster, and
the existance of recent stale work is generally not automatically
actionable, even if you know there's potential double-spends
So if I were wanting to reduce knobs here, I'd be more inclined to drop
stale headers; but I think point (c) means stale header relay nodes that
occassionally reports have_block=true makes stale block relay a lot more
useful, so, I'd still be reluctant there.
> I think an option for this kind of thing is counterproductive. It needs to
> be on by default to have an effect anyways,
This isn't true. Presuming stale headers/blocks are relayed via
block-relay-only connections, and stale tips within the last 4+ days
are relayed, you get near 100% of stale tips relayed even if only 1%
of ~10k listening nodes use this new feature. Essentially:
* 100 listening nodes support the feature
* 1 such node hears about the stale block at time t=0
* every five minutes, every node that knows about the stale tip connects
to a random listening node, with 1% chance that that node supports
stale tip relay, in which case it's shared if that node doesn't also
already know about the stale tip
* this happens about 1000 times over four days
So if the outcome you're interested in is just greater awareness of
stale blocks for research and analysis purposes, this works fine.
Alternatively, if your goal is improved relay of block data in the event
of a reorg due to a child of a stale block becoming the new most-work
tip, you also don't need many nodes: you just need a backbone of nodes
that relay stale blocks to each other, and that are geographically
distributed, reasonably well-connected, and validate new blocks fairly
quickly. That allows those nodes to update quickly, and allows them
to quickly relay validated blocks to their nearby peers, so that the
round-trip delay is tens of milliseconds (due to locality) rather than
hundreds of milliseconds.
So personally, I strongly disagree with the conclusion that there's a
need for this to be either mandatory or on-by-default for it to be useful.
> and if we think that it could
> impose costs substantial enough that a node runner may want to disable it (i
> don't) then we should reconsider our approach to data collection.
I haven't seen this code run in the wild, so personally I think it's
premature to talk about enabling it by default at all, so I think "none"
as the default is sensible as things stand.
On signet in particular, I think sharing stale headers only has potential
DoS issues, since generating "fake" headers by reusing an existing
signature isn't hard, and PoW-valid stale headers aren't pruned. The BIP
addresses this for signet by recommending setting the "prefers_blocks"
flag to true, but that's only possible if that option exists.
For mainnet, if the code does turn out to work as expected/advertised,
I think relaying stale headers by default is reasonable.
The two potential downsides for relaying stale blocks (not just headers)
that I see are that it's marginally more data (probably less than an
extra 0.5%?) which might be marginally annoying for people running pruned
nodes, but more importantly I expect stale blocks will end up being sent
as a `BLOCK` message rather than as a compact block, and processing a
2MB stale block might unnecessarily result in a small delay in relay
of new tips in some cases, which I don't think is worthwhile for most
people. Like I said, though, I haven't seen the code run in the wild;
maybe it could do better than that in practice.
For me, the tradeoff there adds up to preferring that some percentage of
nodes relays stale blocks (5% perhaps?), but not everyone. Equally if
some of the "connect to everyone and monitor the network" nodes enable
stale block sharing, that probably also works well, without requiring
everyone to do it.
> > > This gives you most of the benefits, without having to make an argument that the
> > > protocol change does not negatively affect mining incentives.
> > I think there are a few simple arguments why this does not meaningfully
> > affect mining incentives:
> > (a) any miner that would benefit from improved stale block relay can
> > cheaply implement this themselves; this is cheap particularly when
> > compared to the resources needed to deploy an attack controlling
> > a significant portion of mainnet hashrate.
> > (b) mining incentives are centred on the block with the highest
> > cumulative proof of work, which is never a stale block; so this
> > can have at most second order effects: ie, far weaker than the
> > incentives to avoid mining stale blocks in the first place
> > (c) it only changes relay speeds, and relay of a new tip that's based
> > off previously stale blocks is already quite fast, so any incremental
> > improvement here only has the potential for a very small impact.
> I think it's more complicated than that. The current public relay network
> is an equilibrium that may be costly for each individual miner to deviate
> from.
Pretty much that exact argument has been made repeatedly over the past
few years, and been demonstrably wrong each time: for opt-in RBF, large
OP_RETURNs, and sub-1sat feerates. Bitcoin is only censorship-resistant if
the cost of routing around a censor is cheap, as otherwise a prospective
censor could simply regulate and DoS any part of the public network that
doesn't comply with its dictates. But fortunately it is cheap and easy
to route around the public network if necessary/desirable.
> > This is effectively https://en.wikipedia.org/wiki/Precautionary_principle
> >
> > I don't think it makes sense -- if we're afraid this feature would be
> > detrimental, then we should be equally worried about it if an attacker
> > were to implement something similar in secret, and should thus perform
> > the analysis and, if appropriate, implement countermeasures anyway:
>
> I disagree. The current public relay network is the status quo. Changing
> the default behaviour of the public relay network is not the same as
> miners coordinating to deviate from it.
A peer-to-peer network means that you don't get any control over whether
it changes or not -- that's up to each individual peer.
In so far as any participant thinks they'll benefit from something other
than the status-quo, they'll deviate from it. The only coordination
required is amongst the individuals that see a benefit to a change.
> For instance, a miner may not want to develop infrastructure to relay
> stale blocks, then go lobby other miners to adopt it, for a slight increase
> in expected revenue. But that same miner might well tweak their job
> distribution, if the relay infrastructure is already deployed across the
> network.
> The effect here is in the event of a race, non-selfish miners can reorg
> faster to a non-selfish miner winning the race. That's true, but the
> advantage is dwarfed by that of Selfish mining, and i think all bets
> are off anyways if a miner is actively attacking the network.
>
> My point was how this change might incentivize (or not!) a pool operator
> to tweak their settings slightly, within the framework of not trying to
> bypass the public relay network / pull off an involved attack like
> Selfish mining.
I had assumed you were talking about miners being incentivised to attack
bitcoin (or to violate the criteria that make someone an "honest" miner),
not to merely "tweak their job distrubution".
To be explicit, I think an "attack" looks like either:
* miners don't publish the full block data when they find a block with
valid PoW, and/or
* miners mine blocks with the "prev_block" hash referring to a block
with less cumulative PoW than some other known (valid) block
Conversely, for "tweaking their pool/template settings" the only relevant
thing I can think of is running "preciousblock" so that they switch to
a block with equal cumulative PoW, rather than mining on top of the
first-seen block with that amount of work. I think that is already the
rational thing to do, and that stale block relay doesn't change this; I'll
do numbers on that below. I also don't think that has any impact on the
network as a whole, provided neither of the "attacks" above take place.
Other settings tweaks (eg spy mining, empty block mining, min fee
settings, a soft block size limit or censoring/filtering various classes
of transactions) don't seem likely to be encouraged or discouraged by
availability of stale blocks, to me.
> I agree the effects are most likely small, i’m just not convinced they are
> negligible.
So numbers. A block is found. A pool with 20% hashrate sees the new block,
then moments later one of its workers submits a competing solve at the
same height with the same parent, and hence the same cumulative PoW. The
pool has two options:
* mine on top of the first seen block: receive 3.125 BTC with about
20% chance (exp value 0.625 BTC)
* mine on top of its own competing block: receive 6.25 BTC with perhaps
19.8% chance (5s additional relay time due to a 1-block reorg creating
additional potential for a race; exp value 1.24 BTC)
Assuming miners request new work every 3s, then a miner with 20% hashrate
would expect to hit that tradeoff once every 2 weeks [0]. So expected
benefit of mining on their own block is about 16.1 BTC per year already,
and that miner would be expected to trigger a one block reorg once every
10 weeks or so, I think.
[0] 1/(1-exp(3/2 / -600 * 20%)) = 2000 blocks
If you improve the reorg-race window substantially, dropping it from
5s to 1s, the expected value over a year rises to 16.36 BTC; if you
think the reorg-race window was originally much worse, say 60s, then
the expected value over a year was still about 13.3 BTC.
Those numbers vary with the pool's hashrate (lower hashrate reduces
both the expected value and the frequency of events), and don't take
principal/agent considerations into account (eg, a PPLNS pool will
only receive the pool fee as additional revenue, so a 20% PPLNS pool
with 2% fees might only see a 0.32 BTC increase in expected revenue
over the year for their effort and not feel justified in investing the
engineering resources; while a FPPS pool would see the revenue directly,
effectively as savings from a decrease in their orphan rate, since orphan
rate doesn't affect the payout directly in FPPS pools).
> > There are, I think, two main benefits to relaying stale blocks at the same
> > height as the current tip [1]:
> >
> > * it gives awareness to the network as a whole into what exactly is
> > being mined, removing concerns that an honest miner working on a
> > stale block might have been engaging in a block-withholding attack
> > when a reorg later occurs
>
> Fair, it would make it possible to observe pools that start implementing
> some strategic block publications without going all the way to full Selfish
> mining.
>
> >
> > * it makes it apparent if there were double-spends, or if a
> > significant percentage of hashrate is censoring transactions (either
> > due to a widely accepted soft fork, or due to an attempted 51% attack).
>
> I don't think transaction censorship detection is a valid argument here: at
> any non-catastrophic stale rate, this barely gives any more information than
> the miner's mainchain blocks.
The scenario I'm thinking about there is a soft fork that isn't backed
by (approximately) 100% of hashrate; so something like the BIP110
activation attempt where there is an ongoing minority chain being mined,
and a significant portion of hashrate is censoring transactions and also
invalidating blocks that include those transactions. If it's a minority
doing the censoring, that might show up as a stale chain that keeps
being extended (like the BIP110 chain); if it's the majority doing the
censoring, it might show up us regular stale tips, as minority miners
keep attempting to mine censored transactions and have their blocks
ignored by the majority of hashrate as a result.
Being able to see the contents of the stale blocks in those scenarios
lets you analyse what's actually going on, in case that either it was
coordinated in secret, or the spec turns out not to have been implemented
consistently/correctly.
> > [1] I don't think there's any concern about sharing stale blocks that
> > have signficantly less cumulative work than the current tip, which
> > already occurs via the stale-blocks repo at
> > https://github.com/bitcoin-data/stale-blocks/
> Fair to distinguish between relaying near tip vs historical blocks. But
> this is not about sharing, it's about what should be relayed on the public
> network in real time, so i don't think the Github repo is relevant here.
The github repo probably could be made a real-time resource; on
the publish side you'd automatically merge PRs after validating
proof-of-work and recency (PRs are already automatically
created for stale blocks seen by fork-observer instances,
though not promptly), and on the receive side you'd monitor
https://api.github.com/repos/bitcoin-data/stale-blocks/commits/HEAD
and fetch updates when that changes, then submitblock any new (recent)
block data. Centralised, permissioned, vulnerable to github outages,
and requires a bunch of extra technology layers though.
So I think it's directly comparable, particularly for the purposes of any
concerns about the impact of additional data availability on incentives.
That said, while they exist, I don't think the benefits of real-time
relay of stale block data are particularly large, so I don't think that's
worth prioritising very much.
My suspicion is that with widespread stale header relay we'll see an
increase in the observable stale block rate from 1-in-1000 to perhaps
1-in-400 (the sqrt of the observed frequency of two-block-reorgs [1]) or
more. If we don't also support stale block relay, I think we'll miss out
on the ability to analyse those stale blocks, which would be disappointing
from a research angle, and may raise avoidable fears/concerns from a
"don't trust, verify" / paranoia angle.
[1] https://bnoc.xyz/t/two-block-reorg-at-height-941880/97/9
> (Also, not important to your argument, but there is a typo in your
> numbers with a lower hashrate: s/3.139/3.137/)
(Yeah, I manually transcribed and rounded, and missed a 6)
Cheers,
aj
--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/avqnZeBFkF5hQNuU%40erisian.com.au.
prev parent reply other threads:[~2026-11-16 7:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 17:21 [bitcoindev] [BIP Proposal] Stale Tip Relay Ram
2026-08-11 13:51 ` Edil Guimarães de Medeiros
2026-08-13 18:53 ` Ram
2026-11-05 23:19 ` 'Antoine Poinsot' via Bitcoin Development Mailing List
2026-11-09 16:07 ` Anthony Towns
2026-11-11 22:04 ` 'Antoine Poinsot' via Bitcoin Development Mailing List
2026-11-16 6:49 ` Anthony Towns [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avqnZeBFkF5hQNuU@erisian.com.au \
--to=aj@erisian.com.au \
--cc=bitcoindev@googlegroups.com \
--cc=darosior@protonmail.com \
--cc=pseudoramdom8@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox