Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pluggable anchors select itests #4001

Closed

Conversation

halseth
Copy link
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
Contributor

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

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
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

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
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

lnrpc/rpc.proto Outdated
@@ -1356,6 +1356,14 @@ message Channel {
*/
bool static_remote_key = 22 [json_name = "static_remote_key"];


/**
If non-zero, then this channel uses a commitment format that has anchor
Copy link
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?

@@ -498,3 +498,76 @@ func checkPaymentStatus(ctxt context.Context, node *lntest.HarnessNode,

return nil
}

func createThreeHopNetwork(t *harnessTest, net *lntest.NetworkHarness,
Copy link
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
Member

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

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
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
Contributor

Can be rebased on top of #4103

@joostjager joostjager added this to the 0.10.0 milestone Mar 19, 2020
@joostjager
Copy link
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