lnwire: add new HtlcPoint to OpenChannel and AcceptChannel

In this commit, we begin implementing the latest spec change to reduce
the attack surface on online channels. In this commit, we introduce a
distinct HTLC base point which will be used to sign the second-level
HTLC transactions for each active HLTC on the commitment transaction of
the remote node. With this, we allow the commitment key to remain
offline, as it isn’t needed in routine channel updates, unless we need
to go to chain.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-11-16 19:59:50 -08:00
1 parent caec23a236
commit a14a15641b
3 files changed
+30 -4

No files matched your search

+10
View File
@@ -188,6 +188,11 @@ func TestLightningWireProtocol(t *testing.T) {
t.Fatalf("unable to generate key: %v", err)
return
}
req.HtlcPoint, err = randPubKey()
if err != nil {
t.Fatalf("unable to generate key: %v", err)
return
}
req.FirstCommitmentPoint, err = randPubKey()
if err != nil {
t.Fatalf("unable to generate key: %v", err)
@@ -233,6 +238,11 @@ func TestLightningWireProtocol(t *testing.T) {
t.Fatalf("unable to generate key: %v", err)
return
}
req.HtlcPoint, err = randPubKey()
if err != nil {
t.Fatalf("unable to generate key: %v", err)
return
}
req.FirstCommitmentPoint, err = randPubKey()
if err != nil {
t.Fatalf("unable to generate key: %v", err)