Skip to content

Commit

Permalink
Merge pull request #7155 from Roasbeef/v0-15-5-branch-rc1
Browse files Browse the repository at this point in the history
release: create v0.15.5-rc1 release branch
  • Loading branch information
Roasbeef authored Nov 15, 2022
2 parents 96fe51e + 24b0b6d commit 179d625
Show file tree
Hide file tree
Showing 12 changed files with 148 additions and 70 deletions.
15 changes: 15 additions & 0 deletions docs/release-notes/release-notes-0.15.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Release Notes

## Bug Fixes

* [A Taproot related key tweak issue was fixed in `btcd` that affected remote
signing setups](https://github.com/lightningnetwork/lnd/pull/7130).

* [Sleep for one second when funding locked message is not
received](https://github.com/lightningnetwork/lnd/pull/7095) to avoid CPU
spike.

# Contributors (Alphabetical Order)

* Oliver Gugger
* Yong Yu
11 changes: 11 additions & 0 deletions funding/config_rpctest.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//go:build rpctest

package funding

import "time"

func init() {
// For itest, we will use a much shorter checking interval here as
// local communications are very fast.
checkPeerFundingLockInterval = 10 * time.Millisecond
}
101 changes: 59 additions & 42 deletions funding/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ var (
// byteOrder defines the endian-ness we use for encoding to and from
// buffers.
byteOrder = binary.BigEndian

// checkPeerFundingLockInterval is used when we are waiting for the
// peer to send us FundingLocked. We will check every 1 second to see
// if the message is received.
//
// NOTE: for itest, this value is changed to 10ms.
checkPeerFundingLockInterval = 1 * time.Second
)

// WriteOutpoint writes an outpoint to an io.Writer. This is not the same as
Expand Down Expand Up @@ -993,7 +1000,14 @@ func (f *Manager) stateStep(channel *channeldb.OpenChannel,

if !received {
// We haven't received FundingLocked, so we'll continue
// to the next iteration of the loop.
// to the next iteration of the loop after sleeping for
// checkPeerFundingLockInterval.
select {
case <-time.After(checkPeerFundingLockInterval):
case <-f.quit:
return ErrFundingManagerShuttingDown
}

return nil
}

Expand Down Expand Up @@ -2416,18 +2430,22 @@ func (f *Manager) fundingTimeout(c *channeldb.OpenChannel,
go func() {
defer f.wg.Done()

peerChan := make(chan lnpeer.Peer, 1)
var peerKey [33]byte
copy(peerKey[:], c.IdentityPub.SerializeCompressed())
peer, err := f.waitForPeerOnline(c.IdentityPub)
switch err {
// We're already shutting down, so we can just return.
case ErrFundingManagerShuttingDown:
return

f.cfg.NotifyWhenOnline(peerKey, peerChan)
// nil error means we continue on.
case nil:

var peer lnpeer.Peer
select {
case peer = <-peerChan:
case <-f.quit:
return
// For unexpected errors, we print the error and still try to
// fail the funding flow.
default:
log.Errorf("Unexpected error while waiting for peer "+
"to come online: %v", err)
}

// TODO(halseth): should this send be made
// reliable?

Expand Down Expand Up @@ -2818,14 +2836,9 @@ func (f *Manager) sendFundingLocked(completeChan *channeldb.OpenChannel,
// send fundingLocked until we succeed, or the fundingManager is shut
// down.
for {
connected := make(chan lnpeer.Peer, 1)
f.cfg.NotifyWhenOnline(peerKey, connected)

var peer lnpeer.Peer
select {
case peer = <-connected:
case <-f.quit:
return ErrFundingManagerShuttingDown
peer, err := f.waitForPeerOnline(completeChan.IdentityPub)
if err != nil {
return err
}

localAlias := peer.LocalFeatures().HasFeature(
Expand Down Expand Up @@ -2901,18 +2914,10 @@ func (f *Manager) receivedFundingLocked(node *btcec.PublicKey,
default:
}

// Check whether the peer is online. If it's not, we'll wait for them
// to come online before proceeding. This is to avoid a tight loop if
// they're offline.
connected := make(chan lnpeer.Peer, 1)
var peerKey [33]byte
copy(peerKey[:], node.SerializeCompressed())
f.cfg.NotifyWhenOnline(peerKey, connected)

select {
case <-connected:
case <-f.quit:
return false, ErrFundingManagerShuttingDown
// Avoid a tight loop if peer is offline.
if _, err := f.waitForPeerOnline(node); err != nil {
log.Errorf("Wait for peer online failed: %v", err)
return false, err
}

channel, err := f.cfg.FindChannel(node, chanID)
Expand Down Expand Up @@ -3046,18 +3051,9 @@ func (f *Manager) annAfterSixConfs(completeChan *channeldb.OpenChannel,
log.Debugf("Will not announce private channel %v.",
shortChanID.ToUint64())

peerChan := make(chan lnpeer.Peer, 1)

var peerKey [33]byte
copy(peerKey[:], completeChan.IdentityPub.SerializeCompressed())

f.cfg.NotifyWhenOnline(peerKey, peerChan)

var peer lnpeer.Peer
select {
case peer = <-peerChan:
case <-f.quit:
return ErrFundingManagerShuttingDown
peer, err := f.waitForPeerOnline(completeChan.IdentityPub)
if err != nil {
return err
}

nodeAnn, err := f.cfg.CurrentNodeAnnouncement()
Expand Down Expand Up @@ -4338,3 +4334,24 @@ func (f *Manager) selectShutdownScript(taprootOK bool,

return txscript.PayToAddrScript(addr)
}

// waitForPeerOnline blocks until the peer specified by peerPubkey comes online
// and then returns the online peer.
func (f *Manager) waitForPeerOnline(peerPubkey *btcec.PublicKey) (lnpeer.Peer,
error) {

peerChan := make(chan lnpeer.Peer, 1)

var peerKey [33]byte
copy(peerKey[:], peerPubkey.SerializeCompressed())

f.cfg.NotifyWhenOnline(peerKey, peerChan)

var peer lnpeer.Peer
select {
case peer = <-peerChan:
case <-f.quit:
return peer, ErrFundingManagerShuttingDown
}
return peer, nil
}
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/lightningnetwork/lnd
require (
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344
github.com/btcsuite/btcd v0.23.3
github.com/btcsuite/btcd/btcec/v2 v2.2.1
github.com/btcsuite/btcd v0.23.4
github.com/btcsuite/btcd/btcec/v2 v2.2.2
github.com/btcsuite/btcd/btcutil v1.1.2
github.com/btcsuite/btcd/btcutil/psbt v1.1.5
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/btcsuite/btcwallet v0.16.1
github.com/btcsuite/btcwallet v0.16.2-0.20221109224534-84bf4e34c816
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0
github.com/btcsuite/btcwallet/walletdb v1.4.0
Expand Down Expand Up @@ -44,7 +44,7 @@ require (
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796
github.com/miekg/dns v1.1.43
github.com/prometheus/client_golang v1.11.0
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.8.0
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02
github.com/urfave/cli v1.22.9
go.etcd.io/etcd/client/pkg/v3 v3.5.0
Expand Down Expand Up @@ -119,7 +119,7 @@ require (
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
Expand Down Expand Up @@ -153,7 +153,7 @@ require (
gopkg.in/errgo.v1 v1.0.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)

Expand Down
21 changes: 12 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ github.com/btcsuite/btcd v0.22.0-beta.0.20220207191057-4dc4ff7963b4/go.mod h1:7a
github.com/btcsuite/btcd v0.22.0-beta.0.20220316175102-8d5c75c28923/go.mod h1:taIcYprAW2g6Z9S0gGUxyR+zDwimyDMK5ePOX+iJ2ds=
github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.3 h1:4KH/JKy9WiCd+iUS9Mu0Zp7Dnj17TGdKrg9xc/FGj24=
github.com/btcsuite/btcd v0.23.3/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd v0.23.4 h1:IzV6qqkfwbItOS/sg/aDfPDsjPP8twrCOE2R93hxMlQ=
github.com/btcsuite/btcd v0.23.4/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY=
github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA=
github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
github.com/btcsuite/btcd/btcec/v2 v2.2.1 h1:xP60mv8fvp+0khmrN0zTdPC3cNm24rfeE6lh2R/Yv3E=
github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8=
github.com/btcsuite/btcd/btcec/v2 v2.2.2 h1:5uxe5YjoCq+JeOpg0gZSNHuFgeogrocBYxvg6w9sAgc=
github.com/btcsuite/btcd/btcec/v2 v2.2.2/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8=
github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A=
github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE=
github.com/btcsuite/btcd/btcutil v1.1.1/go.mod h1:nbKlBMNm9FGsdvKvu0essceubPiAcI57pYBNnsLAa34=
Expand All @@ -98,8 +98,8 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtyd
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
github.com/btcsuite/btcwallet v0.16.1 h1:nD8qXJeAU8c7a0Jlx5jwI2ufbf/9ouy29XGapRLTmos=
github.com/btcsuite/btcwallet v0.16.1/go.mod h1:NCO8+5rIcbUm5CtVNSQM0xrtK4iYprlyuvpGzhkejaM=
github.com/btcsuite/btcwallet v0.16.2-0.20221109224534-84bf4e34c816 h1:t4wbkXekvTc1eOGDv2h8l6mkLPnqP93hnRHvNtgpiHQ=
github.com/btcsuite/btcwallet v0.16.2-0.20221109224534-84bf4e34c816/go.mod h1:d8AETQyIIWTtC9CnoCMBmDARp9P65oX4IoBdEP3fDK4=
github.com/btcsuite/btcwallet/wallet/txauthor v1.2.3/go.mod h1:T2xSiKGpUkSLCh68aF+FMXmKK9mFqNdHl9VaqOr+JjU=
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 h1:etuLgGEojecsDOYTII8rYiGHjGyV5xTqsXi+ZQ715UU=
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2/go.mod h1:Zpk/LOb2sKqwP2lmHjaZT9AdaKsHPSbNLm2Uql5IQ/0=
Expand Down Expand Up @@ -638,16 +638,18 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=
Expand Down Expand Up @@ -1128,8 +1130,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
2 changes: 1 addition & 1 deletion keychain/btcwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func (b *BtcWalletKeyRing) SignMessageSchnorr(keyLoc KeyLocator,
}

if len(taprootTweak) > 0 {
privKey = txscript.TweakTaprootPrivKey(privKey, taprootTweak)
privKey = txscript.TweakTaprootPrivKey(*privKey, taprootTweak)
}

var digest []byte
Expand Down
7 changes: 7 additions & 0 deletions lntest/itest/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ func openChannelAndAssert(t *harnessTest, net *lntest.NetworkHarness,
"unable to assert channel existence",
)

// They should also notice this channel from topology subscription.
err = alice.WaitForNetworkChannelOpen(fundingChanPoint)
require.NoError(t.t, err)

err = bob.WaitForNetworkChannelOpen(fundingChanPoint)
require.NoError(t.t, err)

return fundingChanPoint
}

Expand Down
4 changes: 4 additions & 0 deletions lntest/itest/lnd_channel_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,10 @@ func testUpdateChannelPolicyForPrivateChannel(net *lntest.NetworkHarness,
)
defer closeChannelAndAssert(t, net, net.Bob, chanPointBobCarol, false)

// Carol should be aware of the channel between Alice and Bob.
err = carol.WaitForNetworkChannelOpen(chanPointAliceBob)
require.NoError(t.t, err)

// Get Bob's funding point.
bobChanTXID, err := lnrpc.GetChanPointFundingTxid(chanPointBobCarol)
require.NoError(t.t, err, "unable to get txid")
Expand Down
15 changes: 15 additions & 0 deletions lntest/itest/lnd_psbt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,21 @@ func assertPsbtSpend(ctx context.Context, t *harnessTest,
finalTx, err := psbt.Extract(signedPacket)
require.NoError(t.t, err)

// Make sure we can also sign a second time. This makes sure any key
// tweaking that happened for the signing didn't affect any keys in the
// cache.
signResp2, err := alice.WalletKitClient.SignPsbt(
ctx, &walletrpc.SignPsbtRequest{
FundedPsbt: buf.Bytes(),
},
)
require.NoError(t.t, err)
signedPacket2, err := psbt.NewFromRawBytes(
bytes.NewReader(signResp2.SignedPsbt), false,
)
require.NoError(t.t, err)
verifySigned(signedPacket2)

buf.Reset()
err = finalTx.Serialize(&buf)
require.NoError(t.t, err)
Expand Down
8 changes: 5 additions & 3 deletions lntest/itest/lnd_remote_signer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) {
runCPFP(net, tt, wo, carol)
},
}, {
name: "psbt",
name: "psbt",
randomSeed: true,
fn: func(tt *harnessTest, wo, carol *lntest.HarnessNode) {
runPsbtChanFunding(net, tt, carol, wo)
runSignPsbtSegWitV0P2WKH(tt, net, wo)
Expand All @@ -124,8 +125,9 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) {
runSignVerifyMessage(tt, net, wo)
},
}, {
name: "taproot",
sendCoins: true,
name: "taproot",
sendCoins: true,
randomSeed: true,
fn: func(tt *harnessTest, wo, carol *lntest.HarnessNode) {
ctxt, cancel := context.WithTimeout(
ctxb, 3*defaultTimeout,
Expand Down
2 changes: 1 addition & 1 deletion lntest/mock/secretkeyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (s *SecretKeyRing) SignMessageSchnorr(_ keychain.KeyLocator,

privKey := s.RootKey
if len(taprootTweak) > 0 {
privKey = txscript.TweakTaprootPrivKey(privKey, taprootTweak)
privKey = txscript.TweakTaprootPrivKey(*privKey, taprootTweak)
}

return schnorr.Sign(privKey, digest)
Expand Down
Loading

0 comments on commit 179d625

Please sign in to comment.