Skip to content

Pluggable anchors select itests#4001

Closed
halseth wants to merge 11 commits into
lightningnetwork:masterfrom
halseth:pluggable-anchors-select-itests
Closed

Pluggable anchors select itests#4001
halseth wants to merge 11 commits into
lightningnetwork:masterfrom
halseth:pluggable-anchors-select-itests

Conversation

@halseth
Copy link
Copy Markdown
Contributor

@halseth halseth commented Feb 13, 2020

This PR adds integration tests for a select set of integration tests with the channel type set to anchor:

  • basic funding flow
  • channel force closure
  • test multi-hop htlc local force close immediate expiry
  • test multi-hop htlc receiver chain claim
  • test multi-hop local force close on-chain htlc timeout
  • test multi-hop remote force close on-chain htlc timeout
  • test multi-hop htlc local chain claim
  • test multi-hop htlc remote chain claim

These are selected since they together test establishing channels of this new type in combination with the previous channel types, sweeping of commitment outputs, and HTLC sweep scenarios.

The goal is to later enable the whole integration test suite for this channel type, but it requires changes to most notably the channel backup format and watchtower.

Builds on #3821

@joostjager
Copy link
Copy Markdown
Contributor

TestLightningNetworkDaemon/basic_funding_flow/carol_commit=anchors,dave_commit=anchors fails

Comment thread rpcserver.go Outdated
// regardless of channel type, add any anchor fees we are
// paying for the two anchors back to our balance if we are the
// initiator.
if channel.IsInitiator {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

report real balance, anchors as separate field

Comment thread lnrpc/rpc.proto Outdated
outputs on the commitments, allowing fee bumping after a force close
transaction has been broadcast.
*/
int64 anchor_output_size = 26 [json_name = "anchor_output_size"];
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to firt PR

Comment thread lnrpc/rpc.proto Outdated


/**
If non-zero, then this channel uses a commitment format that has anchor
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

take into account one or two anchors on commitment?

return nil
}

func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move in separate (trivial) PR?

@halseth halseth force-pushed the pluggable-anchors-select-itests branch 5 times, most recently from 02fe6ff to 85a4d17 Compare February 21, 2020 09:29
@halseth halseth force-pushed the pluggable-anchors-select-itests branch 2 times, most recently from b449f45 to 25852ef Compare March 4, 2020 12:21
@Roasbeef
Copy link
Copy Markdown
Member

As brought up in the other PR, we should also expand the tests for breaches as well.

halseth added 6 commits March 19, 2020 08:56
To make it possible to run the for close test for multiple commit types,
we extract ut into a subtest, where the two nodes get passed in.
Now that the force closure test has been extracted, spin up new nodes
for each commit type, and ensure the test succeed for all types.
To make clear whcih sweep scenarios are actually being tested
halseth added 5 commits March 19, 2020 08:56
This will let us set their commitment type for the subtest.
These tests exercise the different ways of sweeping a commitment, so
we'll cover the modified scripts used for anchor commitments.

The only change we need for the tests to pass is to not assert exactly
which output is being swept, since this index depends on whether the
anchors are there or not.
@halseth halseth force-pushed the pluggable-anchors-select-itests branch from 0ac8689 to d8e0324 Compare March 19, 2020 08:08
@joostjager
Copy link
Copy Markdown
Contributor

Can be rebased on top of #4103

@joostjager joostjager added this to the 0.10.0 milestone Mar 19, 2020
@joostjager
Copy link
Copy Markdown
Contributor

Superseded by #4073

@joostjager joostjager closed this Mar 23, 2020
@joostjager joostjager removed the v0.10 label Mar 23, 2020
@joostjager joostjager removed this from the 0.10.0 milestone Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants