Skip to content

EXPERIMENTAL: simplified commitment support#3010

Merged
niftynei merged 11 commits into
ElementsProject:masterfrom
rustyrussell:guilt/simplfied_commitment
Sep 10, 2019
Merged

EXPERIMENTAL: simplified commitment support#3010
niftynei merged 11 commits into
ElementsProject:masterfrom
rustyrussell:guilt/simplfied_commitment

Conversation

@rustyrussell
Copy link
Copy Markdown
Contributor

This implements option_simplified_commitment as described in lightning/bolts#642

It passes the latest protocol tests for option_simplified_commitment in: https://github.com/ElementsProject/lightning-rfc-protocol-test

@rustyrussell rustyrussell requested a review from cdecker as a code owner August 29, 2019 07:07
@rustyrussell rustyrussell force-pushed the guilt/simplfied_commitment branch 2 times, most recently from 904297a to 5f074ab Compare August 30, 2019 01:27
Copy link
Copy Markdown
Collaborator

@niftynei niftynei left a comment

Choose a reason for hiding this comment

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

😎

@cdecker cdecker changed the title EXPERIMENTAL: simplfied commitment support EXPERIMENTAL: simplified commitment support Sep 6, 2019
@rustyrussell rustyrussell force-pushed the guilt/simplfied_commitment branch from fa0dd9e to 4fc54b3 Compare September 7, 2019 01:03
@rustyrussell rustyrussell added this to the 0.7.3 milestone Sep 7, 2019
@rustyrussell rustyrussell force-pushed the guilt/simplfied_commitment branch from 4fc54b3 to 1f98677 Compare September 7, 2019 01:07
@rustyrussell
Copy link
Copy Markdown
Contributor Author

rustyrussell commented Sep 7, 2019

Rebased.... twicethree times! Master moving too fast :) Mainly db changes.

@rustyrussell rustyrussell force-pushed the guilt/simplfied_commitment branch from 1f98677 to 66ba2a4 Compare September 7, 2019 04:02
…ent.

Insist it be prefixed with '* '.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Somehow this change got lost, but it's needed for option_static_remotekey,
to quote gen_peer_wire_csv:

    msgtype,channel_reestablish,136
    msgdata,channel_reestablish,channel_id,channel_id,
    msgdata,channel_reestablish,next_commitment_number,u64,
    msgdata,channel_reestablish,next_revocation_number,u64,
    msgdata,channel_reestablish,your_last_per_commitment_secret,byte,32,option_data_loss_protect,option_static_remotekey
    msgdata,channel_reestablish,my_current_per_commitment_point,point,,option_data_loss_protect

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Aka. BOLTVERSION=930a9b44076a8f25a8626b31b3d5a55c0888308c from
lightning/bolts#642

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…emotekey`

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We don't rotate key for option_static_remotekey, so we don't need
this point for such channels.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
The largest change is inside hsmd: it hands a null per-commitment key
to the wallet to tell it to spend the to_remote output.

It can also now resolve unknown commitments, even if it doesn't have a
possible_remote_per_commitment_point from the peer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…atic_remotekey

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    /bin/sh: 1: ccan/ccan/cdump/tools/cdump-enumstr: Text file busy
    make[1]: *** [common/Makefile:81: common/gen_htlc_state_names.h] Error 2
    make[1]: *** Waiting for unfinished jobs....

The fix is to make sure all generated headers are made first, and
thus cdump-enumstr.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lightning/bolts@531c8d7

In this one, we always send my_current_per_commitment_point, though it's
ignored.  And we have our official feature numbers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the guilt/simplfied_commitment branch from 66ba2a4 to 7529744 Compare September 10, 2019 03:28
@niftynei
Copy link
Copy Markdown
Collaborator

ACK 7529744

@niftynei niftynei merged commit 226e2ae into ElementsProject:master Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants