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

branch: merge 0.18 staging branch into master #8067

Merged
merged 75 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
b7d1c66
docs/release-notes: add template for 0.18.0
saubyk Aug 22, 2023
21cecc4
channeldb: return error when payment is not found in duplicate payments
yyforyongyu Nov 24, 2022
6be3817
channeldb: return error when payment is not initialized
yyforyongyu Nov 24, 2022
30fd293
channeldb: add new payment status `StatusInitiated`
yyforyongyu Nov 24, 2022
de33c3e
channeldb: add method `initializable` to decide initiating payment
yyforyongyu Nov 24, 2022
a6f4f0d
channeldb: add method `removable` to decide removing payments
yyforyongyu Nov 24, 2022
105c275
channeldb: add method `updatable` to decide updating payments
yyforyongyu Nov 24, 2022
c716011
channeldb: fix variable name used in `RegisterAttempt`
yyforyongyu Feb 7, 2023
09b67af
channeldb: add method `Registrable` to decide adding HTLCs
yyforyongyu May 25, 2023
390f3c8
channeldb: expand PaymentStatus to explicitly represent payment status
yyforyongyu Nov 24, 2022
fac6044
channeldb: add unit test for `decidePaymentStatus`
yyforyongyu Feb 7, 2023
c175386
channeldb+routing: apply method `Terminated` to decide a payment's te…
yyforyongyu Nov 17, 2022
65879a4
lnrpc: update routerrpc to use the new status
yyforyongyu Nov 24, 2022
17a0a8d
cmd+lntest: use the new rpc field `Payment_INITIATED`
yyforyongyu Nov 24, 2022
36f9d7b
routerrpc: make sure error is transformed into grpc error code
yyforyongyu Jun 19, 2023
f6664d5
docs: update release notes for payment status
yyforyongyu Nov 18, 2022
ba93cde
sample-lnd.conf: remove litecoin conf options
ellemouton Aug 3, 2023
3912d5a
multi: remove Litecoin config options
ellemouton Aug 3, 2023
d128c18
keychain+chainreg: remove Litecoin CoinType
ellemouton Aug 3, 2023
a76bdf6
chainreg: let IsTestnet consider bitcoin only
ellemouton Aug 3, 2023
913aa36
chainreg: remove Litecoin support
ellemouton Aug 3, 2023
94c4642
lncfg+config: only allow btcd or bitcoind backends
ellemouton Aug 3, 2023
a24a4c2
zpay32: remove litecoin tests
ellemouton Aug 3, 2023
be90bcb
multi: remove litecoin references and comments
ellemouton Aug 3, 2023
0d89a45
docs: remove Litecoin references from INSTALL.md file
ellemouton Aug 3, 2023
215e0f2
docker: remove litcoin docker scripts
ellemouton Aug 3, 2023
2a7fffe
lnrpc: remove litecoin from lightning.proto
ellemouton Aug 3, 2023
031dbd7
multi: remove ChainRegistry
ellemouton Aug 3, 2023
77908d6
lnrpc: deprecate chains field in GetInfoResponse
ellemouton Aug 3, 2023
7fa05f9
htlcswitch: remove Network type
ellemouton Aug 3, 2023
a7e723e
lncli: remove chain option from profile
ellemouton Aug 3, 2023
23a63ef
config: update to satisfy linter
ellemouton Aug 3, 2023
a454a8a
docs: add release note for 7867
ellemouton Aug 3, 2023
275201d
scripts: remove litecoin strings from script
ellemouton Aug 4, 2023
8a195ed
sample-lnd.conf: replace ${chain} with "bitcoin"
ellemouton Aug 4, 2023
1211e7e
multi: use "bitcoin" chain name constant
ellemouton Sep 5, 2023
53b33c7
config: edit error strings to account for signet option
ellemouton Sep 5, 2023
3549e32
lnwire: encode channel_update type in onion errors
morehouse May 3, 2023
ba007d9
itest: fix itest logs upload
yyforyongyu Aug 20, 2023
66b8700
multi: add debug logs to catch slow shutdown
yyforyongyu Sep 7, 2023
60a44c3
sweep: lower the max allowed fee rate for sweeping inputs
yyforyongyu Jul 12, 2023
bea0ffd
chainfee: add new unit `SatPerVByte`
yyforyongyu Jul 26, 2023
258fe79
sweep+itest: change `MaxFeeRate` to use `SatPerVbyte`
yyforyongyu Jul 26, 2023
063fb9d
multi: make max fee rate configurable
yyforyongyu Jul 12, 2023
32fccc4
docs: update release note for maxfeerate
yyforyongyu Jul 12, 2023
42ff52b
sweep: cap to max fee rate instead of failing
yyforyongyu Aug 18, 2023
24fa35e
multi: make sure CPFP won't exceed max allowed fee rate
yyforyongyu Aug 22, 2023
25d82fd
rpcserver+sweep: fix linter re unused params
yyforyongyu Aug 22, 2023
3259557
routing: fix format and add more docs
yyforyongyu Nov 8, 2022
942697a
routing: shorten variable name currentState -> ps
yyforyongyu Nov 16, 2022
3c8784d
routing: change variable name numShardsInFlight -> numAttemptsInFlight
yyforyongyu Nov 16, 2022
42f1c0f
routing: refactor `createNewPaymentAttempt` and `sendPaymentAttempt`
yyforyongyu Jun 26, 2022
bf99e42
routing: rename `handleSendError` to `handleSwitchErr`
yyforyongyu Nov 8, 2022
52c00e8
multi: move payment state handling into `MPPayment`
yyforyongyu Feb 7, 2023
89ac071
channeldb: add `HasSettledHTLC` and `PaymentFailed` fields to state
yyforyongyu Mar 6, 2023
e5840f6
channeldb+routing: add `NeedWaitAttempts` to decide waiting for attempts
yyforyongyu Mar 6, 2023
c412ab5
routing: add `exitWithErr` to handle error logging
yyforyongyu Jun 26, 2022
34d0e5d
routing+channeldb: make MPPayment into an interface
yyforyongyu Feb 9, 2023
a6be939
routing: add `newPaymentLifecycle` to properly init lifecycle
yyforyongyu Feb 13, 2023
20e7e80
routing+channeldb: use `HTLCAttempt` instead of `HTLCAttemptInfo`
yyforyongyu Mar 6, 2023
539a275
routing: add representation of blinded payments
carlaKC May 31, 2023
fee0e05
multi: add blinded path TLVs to onion payload / hops
carlaKC Oct 26, 2022
940b491
routing: only pack amount and cltv if populated
carlaKC Dec 20, 2022
11a007d
routing: account for blinded routes in fee calculation
carlaKC Dec 20, 2022
48e36d9
multi/refactor: add RouteRequest to hold FindRoute parameters
carlaKC Dec 19, 2022
c9609b8
multi: add blinded route to route requests expressed as hints
carlaKC Dec 15, 2022
014683e
routing: include route blinding fields in blinded portion of path
carlaKC Dec 20, 2022
c2aebe2
lnrpc: surface blinded payment fields in hops
carlaKC Dec 19, 2022
63b4ac8
lnrpc/refactor: move query routes request parsing into method
carlaKC May 31, 2023
cae22dc
lnrpc: add blinded payment to QueryRoutes request
carlaKC Dec 16, 2022
0e179fa
routing: remove 0-value warning log in pathfinding
carlaKC Aug 9, 2023
eb31ff5
lntest/itest: add coverage for querying routes to blinded paths
carlaKC Oct 31, 2022
b42a621
lntest: add coverage for single hop blinded route query routes
carlaKC Jan 19, 2023
32ea77b
lncli: add blinded route cli flags to query routes
carlaKC Jan 25, 2023
b994b6f
docs: add release notes
carlaKC Aug 28, 2023
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
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,10 @@ issues:
# if the returned value doesn't match the type, so there's no need to
# check the convert.
- forcetypeassert

- path: mock*
linters:
# forcetypeassert is skipped for the mock because the test would fail
# if the returned value doesn't match the type, so there's no need to
# check the convert.
- forcetypeassert
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ itest-race: build-itest-race itest-only
itest-parallel: build-itest db-instance
@$(call print, "Running tests")
rm -rf itest/*.log itest/.logs-*; date
EXEC_SUFFIX=$(EXEC_SUFFIX) echo "$$(seq 0 $$(expr $(ITEST_PARALLELISM) - 1))" | xargs -P $(ITEST_PARALLELISM) -n 1 -I {} scripts/itest_part.sh {} $(NUM_ITEST_TRANCHES) $(TEST_FLAGS) $(ITEST_FLAGS)
EXEC_SUFFIX=$(EXEC_SUFFIX) scripts/itest_parallel.sh $(ITEST_PARALLELISM) $(NUM_ITEST_TRANCHES) $(TEST_FLAGS) $(ITEST_FLAGS)

itest-clean:
@$(call print, "Cleaning old itest processes")
Expand Down
3 changes: 2 additions & 1 deletion chainntnfs/bitcoindnotify/bitcoind.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ func (b *BitcoindNotifier) Stop() error {
return nil
}

chainntnfs.Log.Info("bitcoind notifier shutting down")
chainntnfs.Log.Info("bitcoind notifier shutting down...")
defer chainntnfs.Log.Debug("bitcoind notifier shutdown complete")

// Shutdown the rpc client, this gracefully disconnects from bitcoind,
// and cleans up all related resources.
Expand Down
3 changes: 2 additions & 1 deletion chainntnfs/btcdnotify/btcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ func (b *BtcdNotifier) Stop() error {
return nil
}

chainntnfs.Log.Info("btcd notifier shutting down")
chainntnfs.Log.Info("btcd notifier shutting down...")
defer chainntnfs.Log.Debug("btcd notifier shutdown complete")

// Shutdown the rpc client, this gracefully disconnects from btcd, and
// cleans up all related resources.
Expand Down
2 changes: 2 additions & 0 deletions chainntnfs/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ func (m *MempoolNotifier) ProcessRelevantSpendTx(tx *btcutil.Tx) {
// TearDown stops the notifier and cleans up resources.
func (m *MempoolNotifier) TearDown() {
Log.Infof("Stopping mempool notifier")
defer Log.Debug("mempool notifier stopped")

close(m.quit)
m.wg.Wait()
}
Expand Down
3 changes: 2 additions & 1 deletion chainntnfs/neutrinonotify/neutrino.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ func (n *NeutrinoNotifier) Stop() error {
return nil
}

chainntnfs.Log.Info("neutrino notifier shutting down")
chainntnfs.Log.Info("neutrino notifier shutting down...")
defer chainntnfs.Log.Debug("neutrino notifier shutdown complete")

close(n.quit)
n.wg.Wait()
Expand Down
25 changes: 0 additions & 25 deletions chainreg/chaincode.go

This file was deleted.

94 changes: 1 addition & 93 deletions chainreg/chainparams.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package chainreg

import (
"github.com/btcsuite/btcd/chaincfg"
bitcoinCfg "github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
bitcoinWire "github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/keychain"
litecoinCfg "github.com/ltcsuite/ltcd/chaincfg"
litecoinWire "github.com/ltcsuite/ltcd/wire"
)

// BitcoinNetParams couples the p2p parameters of a network with the
Expand All @@ -18,14 +14,6 @@ type BitcoinNetParams struct {
CoinType uint32
}

// LitecoinNetParams couples the p2p parameters of a network with the
// corresponding RPC port of a daemon running on the particular network.
type LitecoinNetParams struct {
*litecoinCfg.Params
RPCPort string
CoinType uint32
}

// BitcoinTestNetParams contains parameters specific to the 3rd version of the
// test network.
var BitcoinTestNetParams = BitcoinNetParams{
Expand Down Expand Up @@ -57,38 +45,6 @@ var BitcoinSigNetParams = BitcoinNetParams{
CoinType: keychain.CoinTypeTestnet,
}

// LitecoinSimNetParams contains parameters specific to the simulation test
// network.
var LitecoinSimNetParams = LitecoinNetParams{
Params: &litecoinCfg.TestNet4Params,
RPCPort: "18556",
CoinType: keychain.CoinTypeTestnet,
}

// LitecoinTestNetParams contains parameters specific to the 4th version of the
// test network.
var LitecoinTestNetParams = LitecoinNetParams{
Params: &litecoinCfg.TestNet4Params,
RPCPort: "19334",
CoinType: keychain.CoinTypeTestnet,
}

// LitecoinMainNetParams contains the parameters specific to the current
// Litecoin mainnet.
var LitecoinMainNetParams = LitecoinNetParams{
Params: &litecoinCfg.MainNetParams,
RPCPort: "9334",
CoinType: keychain.CoinTypeLitecoin,
}

// LitecoinRegTestNetParams contains parameters specific to a local litecoin
// regtest network.
var LitecoinRegTestNetParams = LitecoinNetParams{
Params: &litecoinCfg.RegressionNetParams,
RPCPort: "18334",
CoinType: keychain.CoinTypeTestnet,
}

// BitcoinRegTestNetParams contains parameters specific to a local bitcoin
// regtest network.
var BitcoinRegTestNetParams = BitcoinNetParams{
Expand All @@ -97,56 +53,8 @@ var BitcoinRegTestNetParams = BitcoinNetParams{
CoinType: keychain.CoinTypeTestnet,
}

// ApplyLitecoinParams applies the relevant chain configuration parameters that
// differ for litecoin to the chain parameters typed for btcsuite derivation.
// This function is used in place of using something like interface{} to
// abstract over _which_ chain (or fork) the parameters are for.
func ApplyLitecoinParams(params *BitcoinNetParams,
litecoinParams *LitecoinNetParams) {

params.Name = litecoinParams.Name
params.Net = bitcoinWire.BitcoinNet(litecoinParams.Net)
params.DefaultPort = litecoinParams.DefaultPort
params.CoinbaseMaturity = litecoinParams.CoinbaseMaturity

copy(params.GenesisHash[:], litecoinParams.GenesisHash[:])

// Address encoding magics
params.PubKeyHashAddrID = litecoinParams.PubKeyHashAddrID
params.ScriptHashAddrID = litecoinParams.ScriptHashAddrID
params.PrivateKeyID = litecoinParams.PrivateKeyID
params.WitnessPubKeyHashAddrID = litecoinParams.WitnessPubKeyHashAddrID
params.WitnessScriptHashAddrID = litecoinParams.WitnessScriptHashAddrID
params.Bech32HRPSegwit = litecoinParams.Bech32HRPSegwit

copy(params.HDPrivateKeyID[:], litecoinParams.HDPrivateKeyID[:])
copy(params.HDPublicKeyID[:], litecoinParams.HDPublicKeyID[:])

params.HDCoinType = litecoinParams.HDCoinType

checkPoints := make([]chaincfg.Checkpoint, len(litecoinParams.Checkpoints))
for i := 0; i < len(litecoinParams.Checkpoints); i++ {
var chainHash chainhash.Hash
copy(chainHash[:], litecoinParams.Checkpoints[i].Hash[:])

checkPoints[i] = chaincfg.Checkpoint{
Height: litecoinParams.Checkpoints[i].Height,
Hash: &chainHash,
}
}
params.Checkpoints = checkPoints

params.RPCPort = litecoinParams.RPCPort
params.CoinType = litecoinParams.CoinType
}

// IsTestnet tests if the givern params correspond to a testnet
// parameter configuration.
func IsTestnet(params *BitcoinNetParams) bool {
switch params.Params.Net {
case bitcoinWire.TestNet3, bitcoinWire.BitcoinNet(litecoinWire.TestNet4):
return true
default:
return false
}
return params.Params.Net == bitcoinWire.TestNet3
}
Loading
Loading