What is Nostr?
0xB10C [ARCHIVE] /
npub12kg…09h5
2023-06-07 23:00:34

0xB10C [ARCHIVE] on Nostr: đź“… Original date posted:2021-11-24 đź“ť Original message:Thanks, Michael, for ...

đź“… Original date posted:2021-11-24
đź“ť Original message: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
Author Public Key
npub12kg887ucnasl9h5ygj2c5ks9dexkdu0qsmhx348vuej33aq8dnmsd409h5