Bitcoin Development Mailinglist
 help / color / mirror / Atom feed
From: "'Antoine Poinsot' via Bitcoin Development Mailing List" <bitcoindev@googlegroups.com>
To: Anthony Towns <aj@erisian.com.au>
Cc: Ram <pseudoramdom8@gmail.com>,
	Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Subject: Re: [bitcoindev] [BIP Proposal] Stale Tip Relay
Date: Thu, 19 Nov 2026 17:29:20 +0000	[thread overview]
Message-ID: <oBD8E4x4wLHU_TcMdLuADKLL48HcUAhyf7NCDOufueOMfRuJnF1bDnmCzUxqkscA41b1dVgC8lVH3nsueIYVVjTiDnobz0M3e345qHttx4w=@protonmail.com> (raw)
In-Reply-To: <avqnZeBFkF5hQNuU@erisian.com.au>

On Monday, November 16th, 2026 at 2:18 AM, Anthony Towns <aj@erisian.com.au> wrote:

> Hmm, Claude argues that I unfairly misinterpreted this [...]

Had a similar experience in drafting my previous reply. Claude for Nobel Peace Prize?


> > 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.

Good point, i had overlooked that. Wouldn't this approach have the same blind spot as today's
though? It would work well for races, where parts of the network are split between two blocks,
which already reach monitors today with high probability, but would fail to detect "late solves",
since it would require the pool's node to turn on the option.


> 
> 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.

Yes, that was a misunderstanding on my part, though i think the point above, that keeping stale
block relay optional would mostly help relay the type of stale blocks we already know about, holds.

Optional stale block relay also slows their propagation, which reduces the concern about changing
the default block relay incentive structure.


> 
> > 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.

Sure, but it would have also been possible to introduce the code behind a debug-only option at
first, to be removed at the same time it is enabled by default.


> 
> 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.

Ok fair enough. I was going to point out that Signet is already DoSable, but how stale tip relay
amplifies that DoS is a meaningful change. I’m not sure though how much complexity is warranted to
avoid making signet more DoSable, given we already assume there isn’t someone out there who cares
enough to DoS it.


> 
> 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 a false equivalence. For censorship resistance, you need a single miner defecting. For
changing the default mining incentives, you need miners coordinating around an alternative block
relay infrastructure.

Furthermore, in the censorship resistance case, the single miner is incentivized to mine the
censored transaction. In the changing mining incentives case, the miner who wants to spend a bit
more time mining on their stale blocks needs to convince the other miners to opt into their
alternative relay network, and it's not clear that they are incentivized to do that.


> 
> > > 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.

Heh, now it's you being snarky..

Of course this was not about controlling what people run, but being honest about the impact that
changing Bitcoin Core's defaults has.


> 
> 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.

This part of your response reads as if i was proposing a change to block relay policy that
each individual miner could benefit by deviating from. That's a bit frustrating, as in reality i'm
not the one proposing a change, and i am simply giving an argument that a change to default block
relay policy may be beneficial to some individual miners, without meaning they would have
necessarily sought it had the default not been changed (because it would have meant coordinating
with other miners etc.).


> 
> > 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".

Ok, maybe i could have been clearer. Stale block relay is insignificant in the case of a Selfish
Mining attack. I'm simply pointing out that changing default relay policy may incentivize some
miners to change their strategy slightly, which could result in overall inferior network conditions.

The example i gave in my first reply was that they may be incentivized to briefly keep mining on a
stale block after it lost a race, because stale block relay increases the expected revenues of doing
so. (Which doesn't necessarily mean it makes it profitable! See below.)

In this example, should it turn out that they profit from doing so, the resulting inferior network
conditions would probably not have happened if it was not for the default block relay policy change.
Because achieving the same would have required convincing all (or most) other miners to deviate to a
different block relay regime, all that for little expected revenues for the interested miners, and
probably little to no benefit to other miners.

To be clear, again, i am not particularly concerned about this. Any change in incentives i can think
of is tiny (though i may be missing some!) and i merely pointed out that changing these incentives
was unnecessary to get what i consider to be most of the value of stale tip relay.

You disagree that only relaying headers gives most of the value. I'm not convinced, but if others
think the value of relaying full blocks is worth it, i do not want to be a blocker (at least not on
these grounds).


> 
> 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

If we apply this definition strictly, all pools "attack" the network in the (non trivial --see
stratum.work) time interval between receiving a new block and switching all their hashers to a new
job. So i think it's more nuanced, and there is a meaningful distinction between a pool delaying job
renewal / not trying to minimize it as much, and a pool implementing a full Selfish Mining like
strategy.


> 
> 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. [...]

One example i gave is to not renew the jobs to your hashers immediately after you lost a race. This
is a small effect, much smaller than switching your strategy from "stock Bitcoin Core" to
"preciousblock", but if a miner can just do it unilaterally and benefit, they might.

As per my answer to your numbers below, turns out that doing so is not profitable, at least without
turning it into a complete strategy that i would qualify as an attack. But it's a different effect
from the only relevant one you could think of, so i think we shouldn't be too confident that we can
anticipate all possible ways a block relay policy change may affect mining incentives.


> [...] I also don't think that has any impact on the
> network as a whole, provided neither of the "attacks" above take place.

This is incorrect. Not mining on the first seen tip decreases the stale rate of the larger miners
and increases the stale rate of the smaller miners. From a simulation run which approximates
current network conditions [0], this shifts stale rates for the biggest miner from 0.368% to 0.352%,
and that of the smallest miner from 0.556% to 0.590%. With profit margins at 2% of revenue, that's
about +0.8% of profit for the largest miner and -1.7% of profit for the smallest miner.

[0]: Using the branch at https://github.com/darosior/miningsimulation/issues/2 with 2s of external
     propagation time and 1s of internal propagation time, uniform across miners.


> 
> > 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.

So this improves the expected revenue of an already widespread (but still detrimental) strategy by
about 0.26 BTC/yr (for a 20% miner), in the pessimistic case. The gains scale linearly with the time
saved, and quadratically with the share of the hashrate.

But this merely strengthens the incentive to switch to a (detrimental but) already widely adopted
strategy. What i had in mind was a different effect, which my Claude tells me is known as Stubborn
mining (Nayak et al.), and as far as i know is not widely adopted. For a 40% miner, default stale
block relay would increase the expected revenues of stubbornly mining on top of his own block in
the event he lost a race by roughly 0.4BTC/yr. That comes on top of the ~0.9 BTC/yr that stale relay
adds to preciousblock for a 40% miner (the effect you estimated).

But stubborn mining is only profitable if you actually adopt it as a long term strategy. Stale block
relay does increase the expected revenue of continuing to mine briefly on your block after you lost
a race, but it does not quite make it profitable. So this is much more than simply tweaking job
distribution, and moreover would definitely fall into the attack category at this point.

What you calculated seems indeed to be the extent of the effect of stale block relay on "honest"
mining incentives, as far as i can tell.


>
> > > [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.

I don't think it is, because it would still require getting all other miners to connect to that
alternative relay mechanism, as per the discussion above.


> 
> 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.

Fair enough. Reassuring people who jump to conclusions with no evidence isn’t an argument I buy, but
i understand where you are coming from and i agree it’s a nice to have.


> 
> [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

Best,
Antoine

-- 
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/oBD8E4x4wLHU_TcMdLuADKLL48HcUAhyf7NCDOufueOMfRuJnF1bDnmCzUxqkscA41b1dVgC8lVH3nsueIYVVjTiDnobz0M3e345qHttx4w%3D%40protonmail.com.


      reply	other threads:[~2026-11-19 17:41 UTC|newest]

Thread overview: 8+ 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
2026-11-19 17:29         ` 'Antoine Poinsot' via Bitcoin Development Mailing List [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='oBD8E4x4wLHU_TcMdLuADKLL48HcUAhyf7NCDOufueOMfRuJnF1bDnmCzUxqkscA41b1dVgC8lVH3nsueIYVVjTiDnobz0M3e345qHttx4w=@protonmail.com' \
    --to=bitcoindev@googlegroups.com \
    --cc=aj@erisian.com.au \
    --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