itest: transition the integration build to anchors by default
Anchors are off by default in the integration build
(lncfg/protocol_integration.go), so an itest node started without
--protocol.anchors can only ever negotiate a deprecated commitment type. That
is what the long-standing TODO(halseth): transition itests to anchors instead!
on the Anchors option refers to.
This became load-bearing in #11212, which stops lnd from opening or accepting new channels using the legacy and static remote key commitment types. Enforcing that unconditionally in the integration build breaks every test that pairs a default node with an anchors one, because the pair can no longer agree on a commitment type. Concretely, these fail:
batch_channel_funding, wherebobis created withnilargs butaliceruns with--protocol.anchorspsbt_funding_simple_taprootandpsbt_external_funding_simple_taproot, whererunPsbtChanFundingWithNodescreatesalicewithnilargs whilecarolruns taprootzero_conf-channel_policy_update_publicand its zero-conf variant, whereeveis created withnilargsoption_scid_alias/private_chan-type, same shape withbobchannel_fundmax_error, whererunFundMaxTestCasedefaults to requestingSTATIC_REMOTE_KEYfrom nodes that run with--protocol.anchorsremote_signer-psbt_outbound, which requestsCommitmentType_LEGACYexplicitly
So #11212 gates the new behavior behind --protocol.no-deprecated-chan-types,
an option that only exists in the integration build and is always on in
production. Only the test covering the new rejection opts in. That keeps the
change small enough to backport, but it means the itest suite runs a
configuration production no longer supports.
The fix is to make the integration build match production and default anchors
on, then work through the fallout: the default commitment type for the whole
suite shifts from static remote key to anchors, so fee math, sweep counts and
the anchor UTXO reserve all move with it. Once that is done, both
--protocol.no-deprecated-chan-types and --protocol.anchors can go away, and
the deprecated commitment types can be rejected unconditionally.
Worth doing on master only. It is far too broad to backport.
Source: lightningnetwork/lnd