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

go.mod: update lnd to v0.18.3-beta #161

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cmd/chantools/fakechanbackup.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,15 @@ func newSingle(fundingOutPoint wire.OutPoint, shortChanID lnwire.ShortChannelID,

func fakeChanCfg(nodePubkey *btcec.PublicKey) channeldb.ChannelConfig {
return channeldb.ChannelConfig{
ChannelConstraints: channeldb.ChannelConstraints{
DustLimit: 500,
ChannelStateBounds: channeldb.ChannelStateBounds{
ChanReserve: 5000,
MaxPendingAmount: 1,
MinHTLC: 1,
MaxAcceptedHtlcs: 200,
CsvDelay: 144,
},
CommitmentParams: channeldb.CommitmentParams{
DustLimit: 500,
CsvDelay: 144,
},
MultiSigKey: keychain.KeyDescriptor{
PubKey: nodePubkey,
Expand Down
3 changes: 2 additions & 1 deletion cmd/chantools/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const (

// lndVersion is the current version of lnd that we support. This is
// shown in some commands that affect the database and its migrations.
lndVersion = "v0.18.0-beta"
// Run "make docs" after changing this value.
lndVersion = "v0.18.3-beta"
Copy link
Member

Choose a reason for hiding this comment

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

We should run make docs after changing this value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

Also updated the comments in go.mod and cmd/chantools/root.go adding the instruction to run make docs after changing LND version.


Commit = ""
)
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_deletepayments.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If only the failed payments should be deleted (and not the successful ones), the

CAUTION: Running this command will make it impossible to use the channel DB
with an older version of lnd. Downgrading is not possible and you'll need to
run lnd v0.18.0-beta or later after using this command!'
run lnd v0.18.3-beta or later after using this command!'

```
chantools deletepayments [flags]
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_dropchannelgraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ without removing any other data.

CAUTION: Running this command will make it impossible to use the channel DB
with an older version of lnd. Downgrading is not possible and you'll need to
run lnd v0.18.0-beta or later after using this command!'
run lnd v0.18.3-beta or later after using this command!'

```
chantools dropchannelgraph [flags]
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_dropgraphzombies.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ be helpful to fix a graph that is out of sync with the network.

CAUTION: Running this command will make it impossible to use the channel DB
with an older version of lnd. Downgrading is not possible and you'll need to
run lnd v0.18.0-beta or later after using this command!'
run lnd v0.18.3-beta or later after using this command!'

```
chantools dropgraphzombies [flags]
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_fakechanbackup.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ chantools fakechanbackup --from_channel_graph lncli_describegraph.json \
--channelpoint string funding transaction outpoint of the channel to rescue (<txid>:<txindex>) as it is displayed on 1ml.com
--from_channel_graph string the full LN channel graph in the JSON format that the 'lncli describegraph' returns
-h, --help help for fakechanbackup
--multi_file string the fake channel backup file to create (default "results/fake-2024-06-18-10-55-31.backup")
--multi_file string the fake channel backup file to create (default "results/fake-2024-09-20-09-53-53.backup")
--remote_node_addr string the remote node connection information in the format pubkey@host:port
--rootkey string BIP32 HD root key of the wallet to use for encrypting the backup; leave empty to prompt for lnd 24 word aezeed
--short_channel_id string the short channel ID in the format <blockheight>x<transactionindex>x<outputindex>
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_migratedb.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ needs to read the database content.

CAUTION: Running this command will make it impossible to use the channel DB
with an older version of lnd. Downgrading is not possible and you'll need to
run lnd v0.18.0-beta or later after using this command!'
run lnd v0.18.3-beta or later after using this command!'

```
chantools migratedb [flags]
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_removechannel.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ channel was never confirmed on chain!

CAUTION: Running this command will make it impossible to use the channel DB
with an older version of lnd. Downgrading is not possible and you'll need to
run lnd v0.18.0-beta or later after using this command!
run lnd v0.18.3-beta or later after using this command!

```
chantools removechannel [flags]
Expand Down
1 change: 1 addition & 0 deletions doc/chantools_rescueclosed.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ chantools rescueclosed --fromsummary results/summary-xxxxxx.json \
-h, --help help for rescueclosed
--listchannels string channel input is in the format of lncli's listchannels format; specify '-' to read from stdin
--lnd_log string the lnd log file to read to get the commit_point values when rescuing multiple channels at the same time
--num_keys uint32 the number of keys to derive for the brute force attack (default 5000)
--pendingchannels string channel input is in the format of lncli's pendingchannels format; specify '-' to read from stdin
--rootkey string BIP32 HD root key of the wallet to use for decrypting the backup; leave empty to prompt for lnd 24 word aezeed
--walletdb string read the seed/master root key to use fro decrypting the backup from an lnd wallet.db file instead of asking for a seed or providing the --rootkey flag
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_sweeptimelockmanual.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ chantools sweeptimelockmanual \
--listchannels string channel input is in the format of lncli's listchannels format; specify '-' to read from stdin
--maxcsvlimit uint16 maximum CSV limit to use (default 2016)
--maxnumchanstotal uint16 maximum number of keys to try, set to maximum number of channels the local node potentially has or had (default 500)
--maxnumchanupdates uint maximum number of channel updates to try, set to maximum number of times the channel was used (default 500)
--maxnumchanupdates uint maximum number of channel updates to try, set to maximum number of times the channel was used (default 1000)
Copy link
Member

Choose a reason for hiding this comment

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

Looks like I forgot to update the docs a couple of times.

--pendingchannels string channel input is in the format of lncli's pendingchannels format; specify '-' to read from stdin
--publish publish sweep TX to the chain API instead of just printing the TX
--remoterevbasepoint string remote node's revocation base point, can be found in a channel.backup file
Expand Down
2 changes: 1 addition & 1 deletion doc/chantools_zombierecovery_preparekeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ chantools zombierecovery preparekeys \
-h, --help help for preparekeys
--match_file string the match JSON file that was sent to both nodes by the match maker
--num_keys uint32 the number of multisig keys to derive (default 2500)
--payout_addr string the address where this node's rescued funds should be sent to, must be a P2WPKH (native SegWit) address
--payout_addr string the address where this node's rescued funds should be sent to, must be a P2WPKH (native SegWit) or P2TR (Taproot) address
--rootkey string BIP32 HD root key of the wallet to use for deriving the multisig keys; leave empty to prompt for lnd 24 word aezeed
--walletdb string read the seed/master root key to use fro deriving the multisig keys from an lnd wallet.db file instead of asking for a seed or providing the --rootkey flag
```
Expand Down
18 changes: 15 additions & 3 deletions dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/keychain"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwire"
)
Expand Down Expand Up @@ -116,7 +117,10 @@ type ClosedChannel struct {
// configuration. See `channeldb.ChannelConfig` for more information about the
// fields.
type ChannelConfig struct {
channeldb.ChannelConstraints
channeldb.ChannelStateBounds

channeldb.CommitmentParams

MultiSigKey KeyDescriptor
RevocationBasePoint KeyDescriptor
PaymentBasePoint KeyDescriptor
Expand Down Expand Up @@ -238,8 +242,15 @@ func CollectDebugInfo(channel *channeldb.OpenChannel,
theirChanCfg := &channel.RemoteChanCfg
leaseExpiry := channel.ThawHeight

var whoseCommit lntypes.ChannelParty
if ourCommit {
whoseCommit = lntypes.Local
} else {
whoseCommit = lntypes.Remote
}

keyRing := lnwallet.DeriveCommitmentKeys(
commitPoint, ourCommit, chanType, ourChanCfg, theirChanCfg,
commitPoint, whoseCommit, chanType, ourChanCfg, theirChanCfg,
)

// First, we create the script for the delayed "pay-to-self" output.
Expand Down Expand Up @@ -400,7 +411,8 @@ func ToChannelConfig(params *chaincfg.Params,
cfg channeldb.ChannelConfig) ChannelConfig {

return ChannelConfig{
ChannelConstraints: cfg.ChannelConstraints,
ChannelStateBounds: cfg.ChannelStateBounds,
CommitmentParams: cfg.CommitmentParams,
MultiSigKey: ToKeyDescriptor(params, cfg.MultiSigKey),
RevocationBasePoint: ToKeyDescriptor(
params, cfg.RevocationBasePoint,
Expand Down
25 changes: 13 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/lightninglabs/chantools
go 1.22.3

require (
github.com/btcsuite/btcd v0.24.2-beta.rc1.0.20240403021926-ae5533602c46
github.com/btcsuite/btcd v0.24.2-beta.rc1.0.20240625142744-cc26860b4026
github.com/btcsuite/btcd/btcec/v2 v2.3.3
github.com/btcsuite/btcd/btcutil v1.1.5
github.com/btcsuite/btcd/btcutil/psbt v1.1.8
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/btcsuite/btcwallet v0.16.10-0.20240410030101-6fe19a472a62
github.com/btcsuite/btcwallet v0.16.10-0.20240718224643-db3a4a2543bd
github.com/btcsuite/btcwallet/wallet/txrules v1.2.1 // indirect
github.com/btcsuite/btcwallet/walletdb v1.4.2
github.com/coreos/bbolt v1.3.3
Expand All @@ -22,9 +22,9 @@ require (
// The current version of lnd we are compatible with, mostly affects the
// commands that touch the channel DB and has an impact on the DB schema.
// NOTE: When updating this version, make sure to also update the string in
// cmd/chantools/root.go.
github.com/lightningnetwork/lnd v0.18.0-beta.1
github.com/lightningnetwork/lnd/kvdb v1.4.8
// cmd/chantools/root.go and run "make docs".
Copy link
Member

Choose a reason for hiding this comment

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

👍

github.com/lightningnetwork/lnd v0.18.3-beta
github.com/lightningnetwork/lnd/kvdb v1.4.10
github.com/lightningnetwork/lnd/queue v1.1.1
github.com/lightningnetwork/lnd/ticker v1.1.1
github.com/lightningnetwork/lnd/tor v1.1.3
Expand Down Expand Up @@ -97,6 +97,7 @@ require (
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgx/v4 v4.18.2 // indirect
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jessevdk/go-flags v1.4.0 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/jrick/logrotate v1.0.0 // indirect
Expand All @@ -112,11 +113,11 @@ require (
github.com/lightninglabs/neutrino v0.16.1-0.20240425105051-602843d34ffd // indirect
github.com/lightninglabs/neutrino/cache v1.1.2 // indirect
github.com/lightninglabs/pool/auctioneerrpc v1.1.2 // indirect
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f // indirect
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb // indirect
github.com/lightningnetwork/lnd/clock v1.1.1 // indirect
github.com/lightningnetwork/lnd/fn v1.0.8 // indirect
github.com/lightningnetwork/lnd/healthcheck v1.2.4 // indirect
github.com/lightningnetwork/lnd/sqldb v1.0.2 // indirect
github.com/lightningnetwork/lnd/fn v1.2.1 // indirect
github.com/lightningnetwork/lnd/healthcheck v1.2.5 // indirect
github.com/lightningnetwork/lnd/sqldb v1.0.4 // indirect
github.com/lightningnetwork/lnd/tlv v1.2.6 // indirect
github.com/ltcsuite/ltcd v0.0.0-20191228044241-92166e412499 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand Down Expand Up @@ -177,8 +178,8 @@ require (
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
Expand All @@ -200,7 +201,7 @@ require (
modernc.org/libc v1.49.3 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.8.0 // indirect
modernc.org/sqlite v1.29.8 // indirect
modernc.org/sqlite v1.29.10 // indirect
modernc.org/strutil v1.2.0 // indirect
modernc.org/token v1.1.0 // indirect
nhooyr.io/websocket v1.8.7 // indirect
Expand Down
Loading
Loading