Sitelet https://github.com/lightningnetwork/lnd/issues/11213
Skip to content

itest: transition the integration build to anchors by default #11213

Description

@ziggie1984

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, where bob is created with nil args but alice
    runs with --protocol.anchors
  • psbt_funding_simple_taproot and psbt_external_funding_simple_taproot,
    where runPsbtChanFundingWithNodes creates alice with nil args while
    carol runs taproot
  • zero_conf-channel_policy_update_public and its zero-conf variant, where
    eve is created with nil args
  • option_scid_alias/private_chan-type, same shape with bob
  • channel_fundmax_error, where runFundMaxTestCase defaults to requesting
    STATIC_REMOTE_KEY from nodes that run with --protocol.anchors
  • remote_signer-psbt_outbound, which requests CommitmentType_LEGACY
    explicitly

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions