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

EXPERIMENTAL: simplified commitment support #3010

Merged

Conversation

@rustyrussell
Copy link
Contributor

rustyrussell commented Aug 29, 2019

This implements option_simplified_commitment as described in lightningnetwork/lightning-rfc#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 Aug 29, 2019
@rustyrussell rustyrussell force-pushed the rustyrussell:guilt/simplfied_commitment branch 2 times, most recently from 904297a to 5f074ab Aug 29, 2019
Copy link
Collaborator

niftynei left a comment

😎

@cdecker cdecker changed the title EXPERIMENTAL: simplfied commitment support EXPERIMENTAL: simplified commitment support Sep 6, 2019
@rustyrussell rustyrussell force-pushed the rustyrussell:guilt/simplfied_commitment branch from fa0dd9e to 4fc54b3 Sep 7, 2019
@rustyrussell rustyrussell added this to the 0.7.3 milestone Sep 7, 2019
@rustyrussell rustyrussell force-pushed the rustyrussell:guilt/simplfied_commitment branch from 4fc54b3 to 1f98677 Sep 7, 2019
@rustyrussell

This comment has been minimized.

Copy link
Contributor Author

rustyrussell commented Sep 7, 2019

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

@rustyrussell rustyrussell force-pushed the rustyrussell:guilt/simplfied_commitment branch from 1f98677 to 66ba2a4 Sep 7, 2019
@rustyrussell rustyrussell added the spec label Sep 9, 2019
rustyrussell added 11 commits Sep 10, 2019
…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
lightningnetwork/lightning-rfc#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>
lightningnetwork/lightning-rfc@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 rustyrussell:guilt/simplfied_commitment branch from 66ba2a4 to 7529744 Sep 10, 2019
@niftynei

This comment has been minimized.

Copy link
Collaborator

niftynei commented Sep 10, 2019

ACK 7529744

@niftynei niftynei merged commit 226e2ae into ElementsProject:master Sep 10, 2019
3 checks passed
3 checks passed
ackbot PR ack'd by niftynei
bitcoin-bot/fixups PR does not contain unsquashed fixups
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.