public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: 0xB10C <0xb10c@gmail.com>
To: Michael Folkson <michaelfolkson@protonmail.com>,
	Bitcoin Protocol Discussion
	<bitcoin-dev@lists.linuxfoundation.org>,
	alejandro@pow.energy
Subject: Re: [bitcoin-dev] Taproot activates - A time/block line
Date: Wed, 24 Nov 2021 18:29:54 +0100	[thread overview]
Message-ID: <b6046d93-d8d1-bef4-5ed8-97f95b9f9e0d@gmail.com> (raw)
In-Reply-To: <HaQ-hY5Xi9DebQ3qteJXbi48IY8ojYlMWXeYrWcEFiKuy31TKY7lNAc42rTb2Sf_FMyhgCz9vp-cf8y-fVpFZ6XtWuR-sBsox1lOoSeGtxQ=@protonmail.com>

Thanks, Michael, for writing this up. I agree that it's good to archive
events like, for example, soft-fork activations in an ML post.

All bigger pools have now included multiple P2TR spends in their blocks.
I have a few comments on what happened at F2Pool and to some extend also
at AntPool. These were pool number three and pool number five to signal
taproot readiness. I'm not affiliated with them but was happy to help
F2Pool out and return the favor[1] when they asked for help debugging
why they don't include P2TR spends. I have the permission to share some
pool internals and hope this can help make future soft-forks even smoother.

Please take my comments with a grain of salt. On the one hand, it could
be that I'm naive in believing what the pools have told me in private
communication. On the other hand, I'm not as marked from the blocksize
war as others might be.


On 11/15/21 3:42 PM, Michael Folkson via bitcoin-dev wrote:
> [..]
>
> Block 709632: The first block where full nodes started enforcing
> Taproot rules was mined by F2Pool. It seems [2] F2Pool wasn’t
> enforcing Taproot rules and did not include any Taproot spends (some
> with high fee rates) in this block. [..] but it does lead to
> discussions for a later time on whether Speedy Trial signaling was
> effective if some mining pools signaled readiness months previous but
> then did not enforce the new soft fork rules on activation.
>
> Block 709633: Mined by AntPool. Similar to F2Pool they didn’t include
> any Taproot spends in this block and one would assume that they also
> weren’t enforcing Taproot rules though this has not been confirmed.
>
> Block 709634: Also mined by AntPool.
>
> Block 709635: The first block which included (numerous) valid Taproot
> spends (and no invalid Taproot spends) was mined by Foundry USA.
>
> [..]
>
> [1]: https://b10c.me/blog/007-spending-p2tr-pre-activation/
> [2]: https://twitter.com/satofishi/status/1459868549674065926
> <https://twitter.com/satofishi/status/1459868549674065926?s=20>
>
> [..]

While F2Pool responded they "Will upgrade soon" [2] to my question if
they haven't upgraded their nodes yet, I think they were primarily
buying time as they them-self weren't sure what the issue is. "We are
looking into it" could have been a better and more fitting response.

An F2Pool engineer reached out on the 16th (two days after activation),
mentioning they had been running Bitcoin Core v0.21.1 for a few weeks
now and upgraded to v22.0 today (on the 16th) in the hope that this
would fix their problem of not including P2TR spends. They asked if I
could create and _not_ broadcast a P2TR spending transaction for them to
check with testmempoolaccept/sendrawtransaction/getblocktemplate.

I constructed and sent a P2TR spend and asked them to check the versions
of their nodes peers too. testmempoolaccept returned "allowed": true
(expected as they were running >= v0.21.1). However, it turned out that
they weren't connected to any P2TR-spend-relaying peers. They didn't
receive any P2TR spending transaction and couldn't include them in their
block templates. It seems like this was caused by a) using addnode to
directly connect to known, external peers that hadn't upgraded. But more
importantly, b) by applying a custom patch to their node's peer
selection behavior based on a heuristic that worked for a few years but
at some point broke without being noticed (I'm not publishing details on
purpose). F2Pool has fixed this. With connections to >= v0.21.1 nodes,
they started receiving and constructing blocks with P2TR spends.

I haven't been in contact with AntPool directly and don't know details
about their situation. Alejandro De La Torre (@bitentrepreneur)
communicated with them and said I can include the following:

"I spoke with antpool after I noticed from b10c’s tweet that they had
not included P2TR [spends]. They were quick to react when I inquired.
They had not updated to bitcoind 22.0, but had tested it and were
planning to update soon. The next day they indeed updated and were able
to include a tx with a P2TR spend."

and

 "[Anpool] said that the old peer issue that F2Pool faced 'may be the
issue'."

AntPool didn't provide more information to Alejandro. It's not clear to
me what the actual issues and fixes were.


I'll leave it to someone else to properly reflect on speedy trial. I,
however, want to add: F2Pool mentioned that they "upgraded to v0.21.1
several weeks ago". This indicates that they were signaling without
being ready. I don't blame them and assume they were not the only pool
just setting the version bit. IMO some of the motivations for fake
signaling: a) Immense community pressure (e.g., on Twitter) to just set
the bit and then get ready in the next six months. b) Running nodes with
custom patches. These require longer to upgrade, especially if you want
to ensure there aren't any bugs in your patches...


It's out of the scope of the Bitcoin Core project to consider people's
custom patches, and it's impossible if they are unpublished. In this
particular case, upstreaming the patch does not make sense.

However, with only just above 50% of taproot nodes[3] (more than a week
after activation), there might still be motivation for having a feature
(sometime before the next soft-fork) to alert/warn a node operator if
his node does not have any peers relaying soft-fork X transaction.
Should PROTOCOL_VERSION be bumped to show support for soft-fork
transaction relay? Or does a service flag for relay makes sense (it
seems complicated to decommission service flags reliably)? Parsing the
subver (e.g. "/Satoshi:0.21.1/") doesn't make sense as there are not
only Bitcoin Core nodes on the network. Could there be a message that is
exchanged between two nodes to indicate soft-fork readiness?

How a node operator can be alerted, besides logging, is an
implementation detail of Bitcoin Core. Maybe a getnodealerts RPC that a
node operator can hook up to his monitoring?

Additionally, for the next soft-fork where relay is affected,
instructions for mining pool signaling could state: "Upgrade to version
Z and make sure you have a few version Z peers before starting to signal
readiness".

Thanks,
0xB10C

[3] http://azure.erisian.com.au/~aj/taproot/taproot.html







      reply	other threads:[~2021-11-24 17:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 14:42 [bitcoin-dev] Taproot activates - A time/block line Michael Folkson
2021-11-24 17:29 ` 0xB10C [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=b6046d93-d8d1-bef4-5ed8-97f95b9f9e0d@gmail.com \
    --to=0xb10c@gmail.com \
    --cc=alejandro@pow.energy \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=michaelfolkson@protonmail.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