bitcoin: Testnet4 consensus failure due to timewarp related "softfork"

#30647 was effectively a soft-fork on testnet4 with no activation plan.

It reduced the timewarp mitigation allowance from 7200 to 600 seconds.

It’s enforced by folks running v28.0rc1 and recent master, but not by miners.

This causes new nodes to be stuck at block 42,335: https://mempool.space/testnet4/block/00000000542792e54a720567ba66157d48cdae7bfd01c1b678d0f07a2ed56e99

As observed on BitcoinTalk: https://bitcointalk.org/index.php?topic=5499150.msg64488234#msg64488234 and pointed out by @garlonicon in https://github.com/bitcoin/bitcoin/issues/30614#issuecomment-2324516655

The simplest solution would for a majority of testnet4 hash power to upgrade to the release candidate and call:

  • bitcoin-cli -testnet4 invalidateblock 00000000000000263393ce5f648afd53676f13d360cc9f264b89351623bf1242
  • bitcoin-cli -testnet4 reconsiderblock 00000000000000263393ce5f648afd53676f13d360cc9f264b89351623bf1242

This would cause a 16+ hour reorg for any older testnet4 node that’s not stuck. Users who upgraded their node after this block was created, and accepted by their node under the old rules, can either wait for this reorg to happen, or also use the above commands.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 33 (21 by maintainers)

Most upvoted comments

My nodes’ logs indicate this was resolved at 2024-09-05 02:06:40 UTC when the new chain reorg’d the timewarped one.

everything still stacks on block 42335.

This is expected. You’ll have to wait for a miner to do the same. Welcome to the testnet4 UASF 😃

My question is why did we merge code into Core that forked T4 without contacting any of the larger swaths of hashrate and or having the HR to outrun the previously canonical chain?

There was no indication at the time that anyone would mine blocks that were outside of MAX_TIMEWARP of 600. And generally, the assumption is that if someone is running code from an unmerged PR, they should be following it and be aware that it might majorly change before it is merged.

Also, it’s testnet 🤷. We can just make another one.

I think there is a small risk, that we will see a huge double-spending attempt in testnet4, because after block 00000000000000263393ce5f648afd53676f13d360cc9f264b89351623bf1242, there are transactions in the old chain, which are not picked by nodes, mining the new chain. Which means, that suddenly, when the deep reorg will revert hundreds of blocks, all of those transactions will suddenly become unconfirmed.

So, if anyone has any coins, which were received after block number 42335, then they can be easily double-spent on the new chain, by anyone, just because all of those transactions will vanish. Which means, that as long, as the chain is not yet reorged, people can submit their double spending transactions to the new chain, get them confirmed, and successfully reverse a payment, which had hundreds of confirmations, when a huge chain reorg will kick in.

Also, there is some incentive to download transactions from old node, and pass it secretly to the new node (without broadcasting to the network), because in this way, a miner can get bigger coinbase amount, than other miners.

I don’t think there’s an incentive problem. Coins have no value and it’s easy enough to cpu mine some future blocks if you need tn4 coins.

While it might be annoying for users/developers to have their transactions rolled back, that’s a small price to pay for living on the edge and running a node with unmerged code, while there were still discussions going on about a consensus rule change. Bitcoin Core 28.0-RC1 is the first ‘official’ release with testnet4 support and that includes the time-warp fix.

I have the impression that the person that was selling testnet3 coins may be the one that has monopolized mining testnet4 now

@garlonicon I think you’re going a bit off topic here, a weak blocks proposals seems more suitable for the mailinglist.

I am on 28.0rc1 and seem to be on a different chain. Block is 00000000000044a7284978db5161b2f4ca012b3fb981a9405a4ce2473f3e4a5f for height 42545, unsure how to get to the main chain

Here’s my last chain tip in case you want to verify the correct chain. This is from Bitcoin Core version v28.0rc1

hashbender@macbook-pro-124: bitcoin-cli -testnet4 getchaintips
[
  {
    "height": 42375,
    "hash": "00000000000000306de15dd9ee1e6af0461e5bdef12d6dc6be212ca7f5296fa1",
    "branchlen": 0,
    "status": "active"
  }
]

ok will do

Anyone have an asic to reorg that?

MARA hash on the way! Luxor also said they are willing to help as well. Shout out to Nick to even turning me onto this problem.