-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
With 0.15 we released all the new taproot hotness. However, the full node backends of all nodes might not actually be updated. In this case, if they're running an old enough version, they may not be able to broadcast transactions with taproot outputs. This can cause protocols to enter a weird intermediate state since everything worked, but we weren't able to broadcast our transactions.
To remedy this, we should add a basic check to see if the backend even understands the soft fork. For btcd
, we can use getblockchaininfo
, and for bitcoind
we can use either getdeploymentinfo
or getblockchaininfo
.
A nice way to implement this would be as an in-memory RPC interceptor. We'd only need the unary version likely. When a call comes across and we see our backend doesn't know of taproot, we'll return a nice error. This should also likely be cached to avoid hammering the RPC interface each time a call comes across.