From de8db479c02e4c266449948bd2773d8c2ae7f2ad Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 7 Nov 2026 16:07:28 +0000 Subject: [PATCH 1/8] multi: check destination address types explicitly Loop Out accepts only P2PKH, P2SH, P2WPKH, P2WSH and P2TR destination addresses. Instant Out and the autoloop destination accepted any type that the address decoder returns, which for Instant Out included raw public keys. The btcd v2 address package also decodes pay-to-anchor addresses, which anyone can spend. Move the Loop Out check into utils.IsSupportedDestAddr. Apply it to Instant Out before the swap starts and to the autoloop parameters when they are validated, so that a decoder change can't widen the accepted destination types. --- instantout/instantout_test.go | 35 ++++++++++++++++++ instantout/manager.go | 7 ++++ liquidity/liquidity.go | 5 +++ liquidity/parameters.go | 7 ++++ liquidity/parameters_test.go | 51 ++++++++++++++++++++++++++ loopd/swapclient_server.go | 10 ++---- utils/address.go | 22 ++++++++++++ utils/address_test.go | 67 +++++++++++++++++++++++++++++++++++ 8 files changed, 196 insertions(+), 8 deletions(-) create mode 100644 utils/address.go create mode 100644 utils/address_test.go diff --git a/instantout/instantout_test.go b/instantout/instantout_test.go index 7ebea3e9fd..be1a37b1a9 100644 --- a/instantout/instantout_test.go +++ b/instantout/instantout_test.go @@ -6,6 +6,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/wire" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" @@ -269,3 +270,37 @@ func TestNewInstantOutRejectsNegativeMaxSwapFee(t *testing.T) { _, err := manager.NewInstantOut(t.Context(), nil, "", -1) require.ErrorContains(t, err, "maximum swap fee must not be negative") } + +// TestNewInstantOutRejectsUnsupportedDestAddr verifies that an instant out +// cannot pay to a destination type that loop out rejects. +func TestNewInstantOutRejectsUnsupportedDestAddr(t *testing.T) { + tests := []struct { + name string + addr string + }{ + { + // The compressed secp256k1 generator point. + name: "raw public key", + addr: "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce" + + "28d959f2815b16f81798", + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + // A manager that only knows the network verifies that + // the destination is rejected before the swap starts. + manager := &Manager{ + cfg: &Config{Network: &chaincfg.MainNetParams}, + } + + _, err := manager.NewInstantOut( + t.Context(), nil, test.addr, 0, + ) + require.ErrorContains( + t, err, "unsupported destination address type", + ) + require.Empty(t, manager.activeInstantOuts) + }) + } +} diff --git a/instantout/manager.go b/instantout/manager.go index 9a98020e41..1a53af032f 100644 --- a/instantout/manager.go +++ b/instantout/manager.go @@ -11,6 +11,7 @@ import ( "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightninglabs/loop/utils" "github.com/lightningnetwork/lnd/lntypes" ) @@ -154,6 +155,12 @@ func (m *Manager) NewInstantOut(ctx context.Context, if err != nil { return nil, err } + + // Reject the destination types that loop out rejects too. + if !utils.IsSupportedDestAddr(sweepAddr) { + return nil, fmt.Errorf("unsupported destination "+ + "address type %T", sweepAddr) + } } m.Lock() diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index bcf8476f6e..f77741e5ea 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -164,6 +164,11 @@ var ( // a extended public key account is set. ErrAmbiguousDestAddr = errors.New("ambiguous destination address") + // ErrUnsupportedDestAddr is returned when the destination address has + // a type that loop out does not pay to. + ErrUnsupportedDestAddr = errors.New("unsupported destination address " + + "type") + // ErrAccountAndAddrType indicates if an account is set but the // account address type is not or vice versa. ErrAccountAndAddrType = errors.New("account and address type have " + diff --git a/liquidity/parameters.go b/liquidity/parameters.go index 3b365cc01a..05ffc20f59 100644 --- a/liquidity/parameters.go +++ b/liquidity/parameters.go @@ -10,6 +10,7 @@ import ( "github.com/lightninglabs/lndclient" clientrpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swap" + "github.com/lightninglabs/loop/utils" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" "github.com/lightningnetwork/lnd/lnwallet/chainfee" "github.com/lightningnetwork/lnd/lnwire" @@ -281,6 +282,12 @@ func (p Parameters) validate(minConfs int32, openChans []lndclient.ChannelInfo, return ErrAmbiguousDestAddr } + // Autoloop must not sweep to a destination type that loop out + // rejects. + if p.DestAddr != nil && !utils.IsSupportedDestAddr(p.DestAddr) { + return fmt.Errorf("%w: %T", ErrUnsupportedDestAddr, p.DestAddr) + } + // If an account is specified the respective address type must be // specified as well, or both must be unset. if len(p.Account) == 0 != diff --git a/liquidity/parameters_test.go b/liquidity/parameters_test.go index 7af73c0dd9..7d469eaf2b 100644 --- a/liquidity/parameters_test.go +++ b/liquidity/parameters_test.go @@ -1,8 +1,11 @@ package liquidity import ( + "encoding/hex" "testing" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" clientrpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swap" "github.com/stretchr/testify/require" @@ -110,3 +113,51 @@ func TestValidateRestrictions(t *testing.T) { }) } } + +// TestParametersRejectUnsupportedDestAddr verifies that autoloop cannot sweep +// to a destination type that loop out rejects. +func TestParametersRejectUnsupportedDestAddr(t *testing.T) { + params := &chaincfg.MainNetParams + + p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash( + make([]byte, 20), params, + ) + require.NoError(t, err) + + // The compressed secp256k1 generator point serves as a raw public key. + pubKey, err := hex.DecodeString("0279be667ef9dcbbac55a06295ce870b0" + + "7029bfcdb2dce28d959f2815b16f81798") + require.NoError(t, err) + + rawPubKey, err := btcutil.NewAddressPubKey(pubKey, params) + require.NoError(t, err) + + tests := []struct { + name string + addr btcutil.Address + err error + }{ + { + name: "p2wpkh", + addr: p2wpkh, + }, + { + name: "raw public key", + addr: rawPubKey, + err: ErrUnsupportedDestAddr, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + cfg, _ := newTestConfig() + manager := NewManager(cfg) + + newParams := defaultParameters + newParams.DestAddr = test.addr + + err := manager.setParameters(t.Context(), newParams) + require.ErrorIs(t, err, test.err) + }) + } +} diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 9cbd6b2073..e6fcf499e5 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -38,6 +38,7 @@ import ( "github.com/lightninglabs/loop/staticaddr/withdraw" "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightninglabs/loop/utils" "github.com/lightninglabs/taproot-assets/rfqmath" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" "github.com/lightningnetwork/lnd/lntypes" @@ -3055,14 +3056,7 @@ func validateLoopOutRequest(ctx context.Context, lnd lndclient.LightningClient, // Check that the provided destination address is a supported // address format. - switch sweepAddr.(type) { - case *btcutil.AddressTaproot, - *btcutil.AddressWitnessScriptHash, - *btcutil.AddressWitnessPubKeyHash, - *btcutil.AddressScriptHash, - *btcutil.AddressPubKeyHash: - - default: + if !utils.IsSupportedDestAddr(sweepAddr) { return 0, errInvalidAddress } diff --git a/utils/address.go b/utils/address.go new file mode 100644 index 0000000000..c14a66be9f --- /dev/null +++ b/utils/address.go @@ -0,0 +1,22 @@ +package utils + +import "github.com/btcsuite/btcd/btcutil" + +// IsSupportedDestAddr returns whether addr has a type that Loop pays swap and +// sweep outputs to: P2PKH, P2SH, P2WPKH, P2WSH or P2TR. It rejects any other +// type that an address decoder may return, such as a raw public key or a +// pay-to-anchor output, which anyone can spend. +func IsSupportedDestAddr(addr btcutil.Address) bool { + switch addr.(type) { + case *btcutil.AddressPubKeyHash, + *btcutil.AddressScriptHash, + *btcutil.AddressWitnessPubKeyHash, + *btcutil.AddressWitnessScriptHash, + *btcutil.AddressTaproot: + + return true + + default: + return false + } +} diff --git a/utils/address_test.go b/utils/address_test.go new file mode 100644 index 0000000000..cc4a205b5d --- /dev/null +++ b/utils/address_test.go @@ -0,0 +1,67 @@ +package utils + +import ( + "encoding/hex" + "testing" + + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" + "github.com/stretchr/testify/require" +) + +// TestIsSupportedDestAddr checks which address types are accepted as swap +// and sweep destinations. +func TestIsSupportedDestAddr(t *testing.T) { + t.Parallel() + + params := &chaincfg.MainNetParams + hash20 := make([]byte, 20) + hash32 := make([]byte, 32) + + // The compressed secp256k1 generator point serves as a raw public key. + pubKey, err := hex.DecodeString("0279be667ef9dcbbac55a06295ce870b0" + + "7029bfcdb2dce28d959f2815b16f81798") + require.NoError(t, err) + + p2pkh, err := btcutil.NewAddressPubKeyHash(hash20, params) + require.NoError(t, err) + + p2sh, err := btcutil.NewAddressScriptHashFromHash(hash20, params) + require.NoError(t, err) + + p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash(hash20, params) + require.NoError(t, err) + + p2wsh, err := btcutil.NewAddressWitnessScriptHash(hash32, params) + require.NoError(t, err) + + p2tr, err := btcutil.NewAddressTaproot(hash32, params) + require.NoError(t, err) + + p2pk, err := btcutil.NewAddressPubKey(pubKey, params) + require.NoError(t, err) + + tests := []struct { + name string + addr btcutil.Address + supported bool + }{ + {name: "p2pkh", addr: p2pkh, supported: true}, + {name: "p2sh", addr: p2sh, supported: true}, + {name: "p2wpkh", addr: p2wpkh, supported: true}, + {name: "p2wsh", addr: p2wsh, supported: true}, + {name: "p2tr", addr: p2tr, supported: true}, + {name: "raw public key", addr: p2pk, supported: false}, + {name: "nil", addr: nil, supported: false}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + t.Parallel() + + require.Equal( + t, test.supported, IsSupportedDestAddr(test.addr), + ) + }) + } +} From e3de3e06ee7e8b25a088eb3b4ef70591c41fd5d8 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 7 Nov 2026 18:23:01 +0000 Subject: [PATCH 2/8] liquidity: decode the autoloop destination for the active network RpcToParameters decoded the autoloop destination address with nil chain parameters. For P2PKH and P2SH addresses and raw public keys, the decoder dereferences the parameters, so a SetLiquidityParams call with such an address panicked. loopd does not recover from panics in RPC handlers, so the daemon crashed. Pass the chain parameters of the active network to RpcToParameters and decode the address with them. A raw public key now decodes and fails the destination type check. --- docs/release-notes/release-notes-next.md | 4 ++ liquidity/liquidity.go | 2 +- liquidity/parameters.go | 10 +-- liquidity/parameters_test.go | 82 ++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 5 deletions(-) diff --git a/docs/release-notes/release-notes-next.md b/docs/release-notes/release-notes-next.md index 9ccd887c46..ffa0f465b2 100644 --- a/docs/release-notes/release-notes-next.md +++ b/docs/release-notes/release-notes-next.md @@ -11,6 +11,10 @@ requests could open more connections than the server accepts. If the option isn't set, loopd now opens at most 25 connections. +* Setting a P2PKH or P2SH address or a raw public key as the autoloop + destination no longer crashes loopd. The address is now decoded for the + active network, and a raw public key is rejected. + #### Maintenance #### Contributors (Alphabetical Order) diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index f77741e5ea..bd4ae8f396 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -382,7 +382,7 @@ func (m *Manager) GetParameters() Parameters { func (m *Manager) SetParameters(ctx context.Context, req *clientrpc.LiquidityParameters) error { - params, err := RpcToParameters(req) + params, err := RpcToParameters(req, m.cfg.Lnd.ChainParams) if err != nil { return err } diff --git a/liquidity/parameters.go b/liquidity/parameters.go index 05ffc20f59..0971ba613e 100644 --- a/liquidity/parameters.go +++ b/liquidity/parameters.go @@ -7,6 +7,7 @@ import ( "time" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" "github.com/lightninglabs/lndclient" clientrpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swap" @@ -469,9 +470,10 @@ func loopInSourceToRPC(source LoopInSource) (clientrpc.LoopInSource, error) { } // RpcToParameters takes a `LiquidityParameters` and creates a `Parameters` -// from it. -func RpcToParameters(req *clientrpc.LiquidityParameters) (*Parameters, - error) { +// from it. It decodes the autoloop destination address for the network with +// the given chain parameters. +func RpcToParameters(req *clientrpc.LiquidityParameters, + chainParams *chaincfg.Params) (*Parameters, error) { feeLimit, err := rpcToFee(req) if err != nil { @@ -484,7 +486,7 @@ func RpcToParameters(req *clientrpc.LiquidityParameters) (*Parameters, destaddr = nil } else { destaddr, err = btcutil.DecodeAddress( - req.AutoloopDestAddress, nil, + req.AutoloopDestAddress, chainParams, ) if err != nil { return nil, err diff --git a/liquidity/parameters_test.go b/liquidity/parameters_test.go index 7d469eaf2b..cde7b2f168 100644 --- a/liquidity/parameters_test.go +++ b/liquidity/parameters_test.go @@ -1,6 +1,7 @@ package liquidity import ( + "context" "encoding/hex" "testing" @@ -161,3 +162,84 @@ func TestParametersRejectUnsupportedDestAddr(t *testing.T) { }) } } + +// TestSetParametersDestAddr verifies that the autoloop destination address is +// decoded for the active network. Base58 addresses and raw public keys used to +// crash loopd, because the decoder dereferences the chain parameters for them. +func TestSetParametersDestAddr(t *testing.T) { + _, lnd := newTestConfig() + params := lnd.ChainParams + + p2pkh, err := btcutil.NewAddressPubKeyHash(make([]byte, 20), params) + require.NoError(t, err) + + p2sh, err := btcutil.NewAddressScriptHashFromHash( + make([]byte, 20), params, + ) + require.NoError(t, err) + + mainnetP2PKH, err := btcutil.NewAddressPubKeyHash( + make([]byte, 20), &chaincfg.MainNetParams, + ) + require.NoError(t, err) + + tests := []struct { + name string + addr string + destAddr btcutil.Address + err error + }{ + { + name: "p2pkh", + addr: p2pkh.EncodeAddress(), + destAddr: p2pkh, + }, + { + name: "p2sh", + addr: p2sh.EncodeAddress(), + destAddr: p2sh, + }, + { + // The compressed secp256k1 generator point. + name: "raw public key", + addr: "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce" + + "28d959f2815b16f81798", + err: ErrUnsupportedDestAddr, + }, + { + name: "p2pkh of another network", + addr: mainnetP2PKH.EncodeAddress(), + err: btcutil.ErrUnknownAddressType, + }, + { + name: "default", + addr: "default", + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + cfg, _ := newTestConfig() + cfg.PutLiquidityParams = func(context.Context, + []byte) error { + + return nil + } + manager := NewManager(cfg) + + req, err := ParametersToRpc(defaultParameters) + require.NoError(t, err) + req.AutoloopDestAddress = test.addr + + err = manager.SetParameters(t.Context(), req) + require.ErrorIs(t, err, test.err) + if test.err != nil { + return + } + + require.Equal( + t, test.destAddr, manager.GetParameters().DestAddr, + ) + }) + } +} From 52f1ef4ee32ec0e616f543c4cb29a95748df21c1 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sat, 7 Nov 2026 18:27:13 +0000 Subject: [PATCH 3/8] multi: reject destination addresses of other networks Loop Out rejects a destination address that does not belong to the active network. Autoloop, Instant Out, static address withdrawals and manual HTLC sweeps did not. The decoder accepts bech32 addresses of all known networks, and their output scripts don't depend on the network, so these paths paid to the same witness program on the active network. Add utils.CheckAddrNetwork and call it after each of these decodes. Earlier versions saved the autoloop destination without the check. If the saved destination belongs to another network, loopd removes it at startup and autoloop pays to wallet addresses, because failing to start would leave no way to change the parameters. --- docs/release-notes/release-notes-next.md | 5 ++ instantout/instantout_test.go | 20 ++++++++ instantout/manager.go | 5 ++ liquidity/liquidity.go | 41 ++++++++++++---- liquidity/liquidity_test.go | 42 ++++++++++++++++ liquidity/parameters.go | 5 ++ liquidity/parameters_test.go | 26 +++++++++- loopd/sweep_htlc.go | 6 +++ loopd/sweep_htlc_test.go | 14 ++++++ staticaddr/withdraw/manager.go | 7 +++ staticaddr/withdraw/manager_test.go | 10 ++++ utils/address.go | 25 +++++++++- utils/address_test.go | 62 ++++++++++++++++++++++++ 13 files changed, 256 insertions(+), 12 deletions(-) diff --git a/docs/release-notes/release-notes-next.md b/docs/release-notes/release-notes-next.md index ffa0f465b2..b619f33209 100644 --- a/docs/release-notes/release-notes-next.md +++ b/docs/release-notes/release-notes-next.md @@ -15,6 +15,11 @@ destination no longer crashes loopd. The address is now decoded for the active network, and a raw public key is rejected. +* Autoloop, Instant Out, static address withdrawals and manual HTLC sweeps now + reject destination addresses of another network, as Loop Out already did. If + the saved autoloop destination belongs to another network, loopd removes it + at startup, and autoloop pays to wallet addresses. + #### Maintenance #### Contributors (Alphabetical Order) diff --git a/instantout/instantout_test.go b/instantout/instantout_test.go index be1a37b1a9..9213560f08 100644 --- a/instantout/instantout_test.go +++ b/instantout/instantout_test.go @@ -11,6 +11,7 @@ import ( "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" + "github.com/lightninglabs/loop/utils" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lnwire" "github.com/stretchr/testify/require" @@ -304,3 +305,22 @@ func TestNewInstantOutRejectsUnsupportedDestAddr(t *testing.T) { }) } } + +// TestNewInstantOutRejectsWrongNetworkDestAddr verifies that an instant out +// cannot pay to an address of another network. +func TestNewInstantOutRejectsWrongNetworkDestAddr(t *testing.T) { + addr, err := btcutil.NewAddressWitnessPubKeyHash( + make([]byte, 20), &chaincfg.TestNet3Params, + ) + require.NoError(t, err) + + // A manager that only knows the network verifies that the destination + // is rejected before the swap starts. + manager := &Manager{cfg: &Config{Network: &chaincfg.MainNetParams}} + + _, err = manager.NewInstantOut( + t.Context(), nil, addr.EncodeAddress(), 0, + ) + require.ErrorIs(t, err, utils.ErrWrongNetwork) + require.Empty(t, manager.activeInstantOuts) +} diff --git a/instantout/manager.go b/instantout/manager.go index 1a53af032f..f2173170d1 100644 --- a/instantout/manager.go +++ b/instantout/manager.go @@ -156,6 +156,11 @@ func (m *Manager) NewInstantOut(ctx context.Context, return nil, err } + err = utils.CheckAddrNetwork(sweepAddr, m.cfg.Network) + if err != nil { + return nil, err + } + // Reject the destination types that loop out rejects too. if !utils.IsSupportedDestAddr(sweepAddr) { return nil, fmt.Errorf("unsupported destination "+ diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index bd4ae8f396..346088940f 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -50,6 +50,7 @@ import ( "github.com/lightninglabs/loop/loopdb" clientrpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swap" + "github.com/lightninglabs/loop/utils" "github.com/lightninglabs/taproot-assets/rfqmsg" "github.com/lightningnetwork/lnd/clock" "github.com/lightningnetwork/lnd/funding" @@ -309,19 +310,12 @@ func (m *Manager) Run(ctx context.Context) error { m.cfg.AutoloopTicker.Resume() defer m.cfg.AutoloopTicker.Stop() - // Before we start the main loop, load the params from db. - req, err := m.loadParams(ctx) + // Before we start the main loop, restore the params from db. + err := m.restoreParams(ctx) if err != nil { return err } - // Set the params if there's one. - if req != nil { - if err := m.SetParameters(ctx, req); err != nil { - return err - } - } - for { select { case <-m.cfg.AutoloopTicker.Ticks(): @@ -458,6 +452,35 @@ func (m *Manager) saveParams(ctx context.Context, req proto.Message) error { return nil } +// restoreParams sets the parameters saved in the db, if there are any. +func (m *Manager) restoreParams(ctx context.Context) error { + req, err := m.loadParams(ctx) + if err != nil { + return err + } + + // There is nothing to restore if no params were saved. + if req == nil { + return nil + } + + err = m.SetParameters(ctx, req) + if !errors.Is(err, utils.ErrWrongNetwork) { + return err + } + + // Earlier versions saved the autoloop destination address without + // checking its network. Remove such an address, so that autoloop pays + // to wallet addresses, instead of failing to start: the params can't + // be changed while loopd is down. + log.Warnf("Removing the saved autoloop destination address %v: %v", + req.AutoloopDestAddress, err) + + req.AutoloopDestAddress = "" + + return m.SetParameters(ctx, req) +} + // loadParams unmarshals a serialized RPC request from db and returns the RPC // request. func (m *Manager) loadParams(ctx context.Context) ( diff --git a/liquidity/liquidity_test.go b/liquidity/liquidity_test.go index a7f8977aa8..0af5f373ab 100644 --- a/liquidity/liquidity_test.go +++ b/liquidity/liquidity_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" @@ -441,6 +442,47 @@ func TestPersistParams(t *testing.T) { ) } +// TestRestoreParamsWrongNetworkDestAddr verifies that loopd removes a saved +// autoloop destination address of another network at startup, instead of +// failing to start. +func TestRestoreParamsWrongNetworkDestAddr(t *testing.T) { + ctx := t.Context() + + var paramsBytes []byte + cfg, _ := newTestConfig() + cfg.FetchLiquidityParams = func(context.Context) ([]byte, error) { + return paramsBytes, nil + } + cfg.PutLiquidityParams = func(_ context.Context, data []byte) error { + paramsBytes = data + + return nil + } + manager := NewManager(cfg) + + // The mock lnd runs on testnet3. Earlier versions could save a mainnet + // destination address there. + destAddr, err := btcutil.NewAddressWitnessPubKeyHash( + make([]byte, 20), &chaincfg.MainNetParams, + ) + require.NoError(t, err) + + req, err := ParametersToRpc(defaultParameters) + require.NoError(t, err) + req.AutoloopDestAddress = destAddr.EncodeAddress() + req.AutoMaxInFlight = 3 + require.NoError(t, manager.saveParams(ctx, req)) + + // The other params are restored without the destination address. + require.NoError(t, manager.restoreParams(ctx)) + require.Nil(t, manager.GetParameters().DestAddr) + require.Equal(t, 3, manager.GetParameters().MaxAutoInFlight) + + req, err = manager.loadParams(ctx) + require.NoError(t, err) + require.Empty(t, req.AutoloopDestAddress) +} + // TestStaticAddressAutoloopRequiresExperimental verifies that static-address // loop-in sources are rejected unless the daemon enabled the experimental // static autoloop path. diff --git a/liquidity/parameters.go b/liquidity/parameters.go index 0971ba613e..4c2e9e552b 100644 --- a/liquidity/parameters.go +++ b/liquidity/parameters.go @@ -491,6 +491,11 @@ func RpcToParameters(req *clientrpc.LiquidityParameters, if err != nil { return nil, err } + + err = utils.CheckAddrNetwork(destaddr, chainParams) + if err != nil { + return nil, err + } } } diff --git a/liquidity/parameters_test.go b/liquidity/parameters_test.go index cde7b2f168..9360d42326 100644 --- a/liquidity/parameters_test.go +++ b/liquidity/parameters_test.go @@ -9,6 +9,7 @@ import ( "github.com/btcsuite/btcd/chaincfg" clientrpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swap" + "github.com/lightninglabs/loop/utils" "github.com/stretchr/testify/require" ) @@ -164,8 +165,9 @@ func TestParametersRejectUnsupportedDestAddr(t *testing.T) { } // TestSetParametersDestAddr verifies that the autoloop destination address is -// decoded for the active network. Base58 addresses and raw public keys used to -// crash loopd, because the decoder dereferences the chain parameters for them. +// decoded and checked for the active network. Base58 addresses and raw public +// keys used to crash loopd, because the decoder dereferences the chain +// parameters for them. func TestSetParametersDestAddr(t *testing.T) { _, lnd := newTestConfig() params := lnd.ChainParams @@ -178,11 +180,21 @@ func TestSetParametersDestAddr(t *testing.T) { ) require.NoError(t, err) + p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash( + make([]byte, 20), params, + ) + require.NoError(t, err) + mainnetP2PKH, err := btcutil.NewAddressPubKeyHash( make([]byte, 20), &chaincfg.MainNetParams, ) require.NoError(t, err) + mainnetP2WPKH, err := btcutil.NewAddressWitnessPubKeyHash( + make([]byte, 20), &chaincfg.MainNetParams, + ) + require.NoError(t, err) + tests := []struct { name string addr string @@ -206,11 +218,21 @@ func TestSetParametersDestAddr(t *testing.T) { "28d959f2815b16f81798", err: ErrUnsupportedDestAddr, }, + { + name: "p2wpkh", + addr: p2wpkh.EncodeAddress(), + destAddr: p2wpkh, + }, { name: "p2pkh of another network", addr: mainnetP2PKH.EncodeAddress(), err: btcutil.ErrUnknownAddressType, }, + { + name: "p2wpkh of another network", + addr: mainnetP2WPKH.EncodeAddress(), + err: utils.ErrWrongNetwork, + }, { name: "default", addr: "default", diff --git a/loopd/sweep_htlc.go b/loopd/sweep_htlc.go index 771df0b645..1851af2196 100644 --- a/loopd/sweep_htlc.go +++ b/loopd/sweep_htlc.go @@ -207,6 +207,12 @@ func sweepHtlc(ctx context.Context, req *looprpc.SweepHtlcRequest, return nil, status.Errorf(codes.InvalidArgument, "invalid dest_address: %v", err) } + + err = utils.CheckAddrNetwork(sweepAddr, chainParams) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, + "invalid dest_address: %v", err) + } } var ( diff --git a/loopd/sweep_htlc_test.go b/loopd/sweep_htlc_test.go index 88d0fbb2a3..93c2804eed 100644 --- a/loopd/sweep_htlc_test.go +++ b/loopd/sweep_htlc_test.go @@ -183,6 +183,20 @@ var sweepHtlcTests = []struct { req.HtlcAddress = "notanaddress" }, }, + { + name: "dest address of another network", + amount: 100_000, + satPerVByte: 10, + expectErrMsg: "invalid dest_address: address belongs to " + + "another network", + expectLogs: []string{}, + expectRegister: false, + modifyReq: func(req *looprpc.SweepHtlcRequest) { + // A mainnet P2WPKH address from BIP 173. The mock lnd + // runs on testnet3. + req.DestAddress = "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" + }, + }, { name: "no matching swap", amount: 100_000, diff --git a/staticaddr/withdraw/manager.go b/staticaddr/withdraw/manager.go index 3940c36fd1..fb00189457 100644 --- a/staticaddr/withdraw/manager.go +++ b/staticaddr/withdraw/manager.go @@ -22,6 +22,7 @@ import ( "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/staticutil" staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightninglabs/loop/utils" "github.com/lightningnetwork/lnd/funding" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lnrpc" @@ -560,6 +561,12 @@ func (m *Manager) withdrawalAddress(ctx context.Context, destAddr string, if err != nil { return nil, err } + + err = utils.CheckAddrNetwork(address, m.cfg.ChainParams) + if err != nil { + return nil, err + } + if prevPkScript == nil { return address, nil } diff --git a/staticaddr/withdraw/manager_test.go b/staticaddr/withdraw/manager_test.go index fdd2dc01f6..7e17d74f85 100644 --- a/staticaddr/withdraw/manager_test.go +++ b/staticaddr/withdraw/manager_test.go @@ -14,6 +14,7 @@ import ( "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightninglabs/loop/test" + "github.com/lightninglabs/loop/utils" "github.com/lightningnetwork/lnd/funding" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lnrpc" @@ -753,6 +754,15 @@ func TestWithdrawalAddress(t *testing.T) { require.NoError(t, err) require.Equal(t, walletAddress.String(), address.String()) + // A withdrawal can't pay to an address of another network. + mainnetAddress, err := btcutil.NewAddressTaproot( + bytes.Repeat([]byte{3}, 32), &chaincfg.MainNetParams, + ) + require.NoError(t, err) + + _, err = m.withdrawalAddress(t.Context(), mainnetAddress.String(), nil) + require.ErrorIs(t, err, utils.ErrWrongNetwork) + // A fee bump pays the address of the withdrawal that it replaces, and // can't request another one. address, err = m.withdrawalAddress(t.Context(), "", prevWithdrawalTx) diff --git a/utils/address.go b/utils/address.go index c14a66be9f..0c4898c021 100644 --- a/utils/address.go +++ b/utils/address.go @@ -1,6 +1,16 @@ package utils -import "github.com/btcsuite/btcd/btcutil" +import ( + "errors" + "fmt" + + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" +) + +// ErrWrongNetwork is returned when an address belongs to another network than +// the active one. +var ErrWrongNetwork = errors.New("address belongs to another network") // IsSupportedDestAddr returns whether addr has a type that Loop pays swap and // sweep outputs to: P2PKH, P2SH, P2WPKH, P2WSH or P2TR. It rejects any other @@ -20,3 +30,16 @@ func IsSupportedDestAddr(addr btcutil.Address) bool { return false } } + +// CheckAddrNetwork returns an error wrapping ErrWrongNetwork if addr does not +// belong to the network with the given chain parameters. The decoder accepts +// bech32 addresses of all known networks, and their output scripts don't +// depend on the network. +func CheckAddrNetwork(addr btcutil.Address, params *chaincfg.Params) error { + if addr.IsForNet(params) { + return nil + } + + return fmt.Errorf("%w, the active network is %v", ErrWrongNetwork, + params.Name) +} diff --git a/utils/address_test.go b/utils/address_test.go index cc4a205b5d..22326a12ba 100644 --- a/utils/address_test.go +++ b/utils/address_test.go @@ -65,3 +65,65 @@ func TestIsSupportedDestAddr(t *testing.T) { }) } } + +// TestCheckAddrNetwork checks that an address is only accepted on its own +// network. +func TestCheckAddrNetwork(t *testing.T) { + t.Parallel() + + hash20 := make([]byte, 20) + + p2pkh, err := btcutil.NewAddressPubKeyHash( + hash20, &chaincfg.MainNetParams, + ) + require.NoError(t, err) + + p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash( + hash20, &chaincfg.MainNetParams, + ) + require.NoError(t, err) + + regtestP2WPKH, err := btcutil.NewAddressWitnessPubKeyHash( + hash20, &chaincfg.RegressionNetParams, + ) + require.NoError(t, err) + + tests := []struct { + name string + addr btcutil.Address + params *chaincfg.Params + err error + }{ + { + name: "p2pkh", + addr: p2pkh, + params: &chaincfg.MainNetParams, + }, + { + name: "p2pkh of another network", + addr: p2pkh, + params: &chaincfg.TestNet3Params, + err: ErrWrongNetwork, + }, + { + name: "p2wpkh", + addr: p2wpkh, + params: &chaincfg.MainNetParams, + }, + { + name: "p2wpkh of another network", + addr: regtestP2WPKH, + params: &chaincfg.MainNetParams, + err: ErrWrongNetwork, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + t.Parallel() + + err := CheckAddrNetwork(test.addr, test.params) + require.ErrorIs(t, err, test.err) + }) + } +} From e7fda4d74125d97c6114c21d741cb135a9be44c9 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Tue, 11 Aug 2026 01:02:38 -0500 Subject: [PATCH 4/8] multi: migrate to btcd v2 modules Update LND, Aperture, and Taproot Assets to revisions using the btcd v2 modules, and update lndclient to v0.21.0-3. Migrate Loop chain, transaction, and address types to their corresponding v2 packages. The lndclient release includes the migration from: https://github.com/lightninglabs/lndclient/pull/280 Taproot Assets is temporarily replaced with its btcd v2 revision because the v0.8 release branch has not adopted the new modules. The v2 address decoder also accepts pay-to-anchor addresses. The destination type checks reject them, and tests now cover this case. This changes exported address types. --- assets/client.go | 2 +- assets/client_test.go | 2 +- client.go | 13 +- client_test.go | 9 +- cmd/loop/feecap.go | 2 +- cmd/loop/feecap_test.go | 2 +- cmd/loop/loopout.go | 2 +- cmd/loop/main.go | 2 +- cmd/loop/quote.go | 2 +- cmd/loop/staticaddr_test.go | 6 +- cmd/loop/sweephtlc.go | 2 +- cmd/loop/terms.go | 2 +- cost_migration.go | 2 +- cost_migration_test.go | 2 +- docs/release-notes/release-notes-next.md | 5 + go.mod | 86 +-- go.sum | 558 ++++-------------- instantout/actions.go | 7 +- instantout/cleanup_test.go | 7 +- instantout/fsm.go | 2 +- instantout/instantout.go | 13 +- instantout/instantout_test.go | 14 +- instantout/interfaces.go | 6 +- instantout/manager.go | 7 +- instantout/reservation/actions.go | 2 +- instantout/reservation/actions_test.go | 6 +- instantout/reservation/manager.go | 2 +- instantout/reservation/manager_test.go | 2 +- instantout/reservation/reservation.go | 4 +- instantout/reservation/script/script.go | 2 +- instantout/reservation/store.go | 6 +- instantout/reservation/store_test.go | 4 +- instantout/store.go | 11 +- interface.go | 15 +- liquidity/autoloop_test.go | 9 +- liquidity/autoloop_testcontext_test.go | 2 +- liquidity/balances.go | 2 +- liquidity/easy_autoloop_exclusions_test.go | 2 +- liquidity/fees.go | 2 +- liquidity/interface.go | 2 +- liquidity/liquidity.go | 2 +- liquidity/liquidity_test.go | 7 +- liquidity/loopin.go | 2 +- liquidity/loopin_builder.go | 2 +- liquidity/loopin_builder_test.go | 2 +- liquidity/loopout.go | 2 +- liquidity/loopout_builder.go | 2 +- liquidity/parameters.go | 11 +- liquidity/parameters_test.go | 32 +- liquidity/restrictions.go | 2 +- liquidity/static_loopin.go | 4 +- liquidity/static_loopin_test.go | 2 +- liquidity/threshold_rule.go | 2 +- liquidity/threshold_rule_test.go | 2 +- loopd/config.go | 2 +- loopd/config_test.go | 2 +- loopd/htlc_confirmed_recovery.go | 4 +- loopd/htlc_confirmed_recovery_test.go | 9 +- loopd/static_loopin_status_updater.go | 2 +- loopd/swapclient_server.go | 15 +- loopd/swapclient_server_deposit_test.go | 4 +- loopd/swapclient_server_staticaddr_test.go | 9 +- loopd/swapclient_server_test.go | 33 +- loopd/sweep_htlc.go | 21 +- loopd/sweep_htlc_test.go | 21 +- loopd/utils.go | 4 +- loopd/view.go | 2 +- loopdb/loop.go | 2 +- loopdb/loopout.go | 11 +- loopdb/meta.go | 2 +- loopdb/migrate_test.go | 6 +- loopdb/migration_01_costs.go | 2 +- .../migration_02_swap_publication_deadline.go | 2 +- loopdb/migration_03_last_hop.go | 2 +- loopdb/migration_04_updates.go | 2 +- loopdb/migration_04_updates_test.go | 2 +- loopdb/postgres.go | 2 +- loopdb/postgres_test.go | 2 +- loopdb/sql_store.go | 9 +- loopdb/sql_test.go | 6 +- loopdb/sqlite.go | 2 +- loopdb/store.go | 4 +- loopdb/store_test.go | 4 +- loopdb/swapstate.go | 4 +- loopin.go | 9 +- loopin_test.go | 4 +- loopin_testcontext_test.go | 2 +- loopout.go | 6 +- loopout_blinded_test.go | 4 +- loopout_feerate.go | 13 +- loopout_feerate_test.go | 9 +- loopout_test.go | 4 +- routing_plugin.go | 2 +- routing_plugin_test.go | 2 +- server_mock_test.go | 6 +- staticaddr/address/manager.go | 14 +- staticaddr/address/manager_test.go | 8 +- staticaddr/deposit/actions.go | 4 +- staticaddr/deposit/actions_test.go | 4 +- staticaddr/deposit/deposit.go | 6 +- staticaddr/deposit/fsm.go | 4 +- staticaddr/deposit/fsm_test.go | 4 +- staticaddr/deposit/interface.go | 4 +- staticaddr/deposit/manager.go | 4 +- staticaddr/deposit/manager_height_test.go | 4 +- staticaddr/deposit/manager_hold_test.go | 4 +- .../deposit/manager_onchain_cost_test.go | 13 +- staticaddr/deposit/manager_reconcile_test.go | 6 +- staticaddr/deposit/manager_test.go | 11 +- staticaddr/deposit/onchain_cost.go | 6 +- staticaddr/deposit/onchain_cost_store_test.go | 4 +- staticaddr/deposit/onchain_cost_test.go | 6 +- staticaddr/deposit/outpoint.go | 2 +- staticaddr/deposit/outpoint_test.go | 4 +- staticaddr/deposit/sql_store.go | 6 +- staticaddr/deposit/sql_store_test.go | 2 +- staticaddr/loopin/actions.go | 6 +- staticaddr/loopin/actions_test.go | 4 +- staticaddr/loopin/autoloop.go | 2 +- staticaddr/loopin/autoloop_dp.go | 2 +- staticaddr/loopin/autoloop_dp_test.go | 2 +- staticaddr/loopin/autoloop_test.go | 2 +- staticaddr/loopin/deduce_amount_test.go | 2 +- .../loopin/deposit_swaphash_migration_test.go | 11 +- staticaddr/loopin/interface.go | 4 +- staticaddr/loopin/loopin.go | 15 +- staticaddr/loopin/loopin_test.go | 11 +- staticaddr/loopin/manager.go | 12 +- staticaddr/loopin/manager_test.go | 8 +- staticaddr/loopin/onchain_cost.go | 2 +- staticaddr/loopin/onchain_cost_test.go | 4 +- .../loopin/selected_amount_migration.go | 2 +- .../loopin/selected_amount_migration_test.go | 11 +- staticaddr/loopin/sql_store.go | 11 +- staticaddr/loopin/sql_store_test.go | 25 +- staticaddr/loopin/txout_checker.go | 2 +- staticaddr/loopin/txout_checker_test.go | 2 +- staticaddr/openchannel/interface.go | 6 +- staticaddr/openchannel/manager.go | 11 +- staticaddr/openchannel/manager_test.go | 12 +- staticaddr/script/script.go | 6 +- staticaddr/script/script_test.go | 4 +- staticaddr/staticutil/outpoints.go | 2 +- staticaddr/staticutil/utils.go | 8 +- staticaddr/staticutil/utils_test.go | 6 +- staticaddr/withdraw/funding_values_test.go | 11 +- staticaddr/withdraw/interface.go | 2 +- staticaddr/withdraw/manager.go | 33 +- staticaddr/withdraw/manager_hold_test.go | 14 +- staticaddr/withdraw/manager_test.go | 21 +- staticaddr/withdraw/sql_store.go | 6 +- staticaddr/withdraw/sql_store_test.go | 4 +- staticaddr/withdraw/withdrawal.go | 4 +- swap/fees.go | 4 +- swap/htlc.go | 24 +- swap/htlc_test.go | 15 +- swap/tx.go | 4 +- swap_server_client.go | 4 +- sweep/sweeper.go | 29 +- sweepbatcher/batch_selection_mode_test.go | 6 +- sweepbatcher/construction_error_test.go | 6 +- sweepbatcher/greedy_batch_selection.go | 11 +- sweepbatcher/greedy_batch_selection_test.go | 18 +- sweepbatcher/presigned.go | 15 +- sweepbatcher/presigned_test.go | 13 +- sweepbatcher/retry_recovery_test.go | 6 +- sweepbatcher/store.go | 8 +- sweepbatcher/store_mock.go | 4 +- sweepbatcher/sweep_batch.go | 25 +- sweepbatcher/sweep_batch_test.go | 23 +- sweepbatcher/sweep_batcher.go | 15 +- sweepbatcher/sweep_batcher_presigned_test.go | 8 +- sweepbatcher/sweep_batcher_test.go | 13 +- test/blinded_invoice.go | 6 +- test/chainnotifier_mock.go | 4 +- test/context.go | 2 +- test/lightning_client_mock.go | 4 +- test/lnd_services_mock.go | 4 +- test/signer_mock.go | 2 +- test/testutils.go | 9 +- test/walletkit_mock.go | 16 +- testcontext_test.go | 4 +- utils.go | 6 +- utils/address.go | 18 +- utils/address_test.go | 30 +- utils/dust_limit.go | 4 +- utils/fees.go | 2 +- utils/fees_test.go | 2 +- utils/htlc_utils.go | 2 +- utils/htlc_utils_test.go | 4 +- utils/tx_sort.go | 2 +- 191 files changed, 843 insertions(+), 1094 deletions(-) diff --git a/assets/client.go b/assets/client.go index 4de89eb3f8..827c77fb18 100644 --- a/assets/client.go +++ b/assets/client.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/taproot-assets/rfqmath" "github.com/lightninglabs/taproot-assets/taprpc" "github.com/lightninglabs/taproot-assets/taprpc/priceoraclerpc" diff --git a/assets/client_test.go b/assets/client_test.go index 49687e763a..e495a03fd0 100644 --- a/assets/client_test.go +++ b/assets/client_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/taproot-assets/taprpc/rfqrpc" "github.com/lightninglabs/taproot-assets/taprpc/universerpc" "github.com/lightningnetwork/lnd/lnwire" diff --git a/client.go b/client.go index 62179dc2c7..a639d1512e 100644 --- a/client.go +++ b/client.go @@ -9,10 +9,11 @@ import ( "sync/atomic" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/aperture/l402" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/assets" @@ -714,7 +715,7 @@ func (s *Client) getLoopOutSweepFee(ctx context.Context, confTarget int32) ( // type is chosen because it adds the most weight of all output types // and we want the quote to return a worst case value. wsh := [32]byte{} - p2wshAddress, err := btcutil.NewAddressWitnessScriptHash( + p2wshAddress, err := btcaddr.NewAddressWitnessScriptHash( wsh[:], s.lndServices.ChainParams, ) if err != nil { @@ -916,7 +917,7 @@ func (s *Client) estimateFee(ctx context.Context, amt btcutil.Amount, confTarget int32) (btcutil.Amount, error) { var ( - address btcutil.Address + address btcaddr.Address err error ) // Generate a dummy address for fee estimation. @@ -927,11 +928,11 @@ func (s *Client) estimateFee(ctx context.Context, amt btcutil.Amount, ) if scriptVersion != swap.HtlcV3 { - address, err = btcutil.NewAddressWitnessScriptHash( + address, err = btcaddr.NewAddressWitnessScriptHash( witnessProg[:], s.lndServices.ChainParams, ) } else { - address, err = btcutil.NewAddressTaproot( + address, err = btcaddr.NewAddressTaproot( witnessProg[:], s.lndServices.ChainParams, ) } diff --git a/client_test.go b/client_test.go index 15b9c7c9d7..f6e332c3b2 100644 --- a/client_test.go +++ b/client_test.go @@ -6,9 +6,10 @@ import ( "errors" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" @@ -23,7 +24,7 @@ import ( ) var ( - testAddr, _ = btcutil.NewAddressScriptHash( + testAddr, _ = btcaddr.NewAddressScriptHash( []byte{123}, &chaincfg.TestNet3Params, ) diff --git a/cmd/loop/feecap.go b/cmd/loop/feecap.go index dfe580b571..36c19201c5 100644 --- a/cmd/loop/feecap.go +++ b/cmd/loop/feecap.go @@ -4,7 +4,7 @@ import ( "fmt" "math/big" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/looprpc" ) diff --git a/cmd/loop/feecap_test.go b/cmd/loop/feecap_test.go index 0f284c5a6e..87dbbd623e 100644 --- a/cmd/loop/feecap_test.go +++ b/cmd/loop/feecap_test.go @@ -4,7 +4,7 @@ import ( "math" "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/looprpc" "github.com/stretchr/testify/require" ) diff --git a/cmd/loop/loopout.go b/cmd/loop/loopout.go index 8e6edf0df9..76e2db3ac8 100644 --- a/cmd/loop/loopout.go +++ b/cmd/loop/loopout.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/loopdb" diff --git a/cmd/loop/main.go b/cmd/loop/main.go index 127634d2f3..e8413fe5bf 100644 --- a/cmd/loop/main.go +++ b/cmd/loop/main.go @@ -14,7 +14,7 @@ import ( "syscall" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/loopd" diff --git a/cmd/loop/quote.go b/cmd/loop/quote.go index 46826eaef9..6d25290c79 100644 --- a/cmd/loop/quote.go +++ b/cmd/loop/quote.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/taproot-assets/rfqmath" diff --git a/cmd/loop/staticaddr_test.go b/cmd/loop/staticaddr_test.go index 2cc88ad664..03036a3f58 100644 --- a/cmd/loop/staticaddr_test.go +++ b/cmd/loop/staticaddr_test.go @@ -4,9 +4,9 @@ import ( "strings" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/loopin" diff --git a/cmd/loop/sweephtlc.go b/cmd/loop/sweephtlc.go index 5104094c26..06bb62caac 100644 --- a/cmd/loop/sweephtlc.go +++ b/cmd/loop/sweephtlc.go @@ -6,7 +6,7 @@ import ( "encoding/hex" "fmt" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/looprpc" "github.com/urfave/cli/v3" ) diff --git a/cmd/loop/terms.go b/cmd/loop/terms.go index fd87c6b360..1f895a691f 100644 --- a/cmd/loop/terms.go +++ b/cmd/loop/terms.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/looprpc" "github.com/urfave/cli/v3" ) diff --git a/cost_migration.go b/cost_migration.go index d99ef58b79..2e6e26a89e 100644 --- a/cost_migration.go +++ b/cost_migration.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" diff --git a/cost_migration_test.go b/cost_migration_test.go index abdc80d3be..3c5cb09100 100644 --- a/cost_migration_test.go +++ b/cost_migration_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/test" diff --git a/docs/release-notes/release-notes-next.md b/docs/release-notes/release-notes-next.md index b619f33209..08be548f2c 100644 --- a/docs/release-notes/release-notes-next.md +++ b/docs/release-notes/release-notes-next.md @@ -4,6 +4,11 @@ #### Breaking Changes +* Loop now uses the btcd v2 modules. Projects compiling against Loop's + exported Go APIs must migrate address, transaction, and related types to the + corresponding btcd v2 packages. + [PR #1199](https://github.com/lightninglabs/loop/pull/1199) + #### Bug Fixes * The `postgres.maxconnections` option now limits the number of open diff --git a/go.mod b/go.mod index e55dcf2f61..42d3883c15 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,18 @@ module github.com/lightninglabs/loop require ( - github.com/btcsuite/btcd v0.25.1-0.20260310163610-1c55c7c18179 - github.com/btcsuite/btcd/btcec/v2 v2.3.6 - github.com/btcsuite/btcd/btcutil v1.1.6 - github.com/btcsuite/btcd/btcutil/psbt v1.1.10 - github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 + github.com/btcsuite/btcd v0.26.0 + github.com/btcsuite/btcd/address/v2 v2.0.0 + github.com/btcsuite/btcd/btcec/v2 v2.5.0 + github.com/btcsuite/btcd/btcutil/v2 v2.0.0 + github.com/btcsuite/btcd/chaincfg/v2 v2.0.0 + github.com/btcsuite/btcd/chainhash/v2 v2.0.0 + github.com/btcsuite/btcd/psbt/v2 v2.0.0 + github.com/btcsuite/btcd/txscript/v2 v2.0.0 + github.com/btcsuite/btcd/wire/v2 v2.0.0 github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b - github.com/btcsuite/btcwallet v0.16.18 - github.com/btcsuite/btcwallet/wtxmgr v1.5.6 + github.com/btcsuite/btcwallet v0.18.0 + github.com/btcsuite/btcwallet/wtxmgr v1.6.0 github.com/davecgh/go-spew v1.1.1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 github.com/fortytw2/leaktest v1.3.0 @@ -16,23 +20,23 @@ require ( github.com/google/go-cmp v0.7.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 - github.com/jackc/pgx/v5 v5.9.2 + github.com/jackc/pgx/v5 v5.11.0 github.com/jessevdk/go-flags v1.6.1 github.com/lib/pq v1.10.9 - github.com/lightninglabs/aperture v0.4.0 - github.com/lightninglabs/lndclient v0.21.0-2 + github.com/lightninglabs/aperture v0.5.1-0.20260706191149-3c889b604a94 + github.com/lightninglabs/lndclient v0.21.0-3 github.com/lightninglabs/loop/looprpc v1.0.17-0.20261021185954-333ed1efccdd github.com/lightninglabs/loop/swapserverrpc v1.0.14 - github.com/lightninglabs/taproot-assets v0.8.1 - github.com/lightninglabs/taproot-assets/taprpc v1.2.0 - github.com/lightningnetwork/lightning-onion v1.3.0 - github.com/lightningnetwork/lnd v0.21.0-beta + github.com/lightninglabs/taproot-assets v0.8.6 + github.com/lightninglabs/taproot-assets/taprpc v1.3.3 + github.com/lightningnetwork/lightning-onion v1.4.0 + github.com/lightningnetwork/lnd v0.21.3-beta github.com/lightningnetwork/lnd/cert v1.2.2 github.com/lightningnetwork/lnd/clock v1.1.1 github.com/lightningnetwork/lnd/queue v1.2.0 github.com/lightningnetwork/lnd/ticker v1.1.1 - github.com/lightningnetwork/lnd/tlv v1.3.2 - github.com/lightningnetwork/lnd/tor v1.1.6 + github.com/lightningnetwork/lnd/tlv v1.4.0 + github.com/lightningnetwork/lnd/tor v1.2.0 github.com/ory/dockertest/v3 v3.10.0 github.com/stretchr/testify v1.11.1 github.com/urfave/cli-docs/v3 v3.1.1-0.20251020101624-bec07369b4f6 @@ -44,7 +48,7 @@ require ( google.golang.org/protobuf v1.36.11 gopkg.in/macaroon-bakery.v2 v2.3.0 gopkg.in/macaroon.v2 v2.1.0 - modernc.org/sqlite v1.34.5 + modernc.org/sqlite v1.59.0 ) require ( @@ -61,10 +65,10 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd/v2transport v1.0.1 // indirect github.com/btcsuite/btclog v1.0.0 // indirect - github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5 // indirect - github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 // indirect - github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5 // indirect - github.com/btcsuite/btcwallet/walletdb v1.5.1 // indirect + github.com/btcsuite/btcwallet/wallet/txauthor v1.4.0 // indirect + github.com/btcsuite/btcwallet/wallet/txrules v1.3.0 // indirect + github.com/btcsuite/btcwallet/wallet/txsizes v1.3.0 // indirect + github.com/btcsuite/btcwallet/walletdb v1.6.0 // indirect github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect github.com/btcsuite/winsvc v1.0.0 // indirect @@ -79,13 +83,13 @@ require ( github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect - github.com/decred/dcrd/lru v1.1.2 // indirect + github.com/decred/dcrd/lru v1.1.3 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/cli v29.4.1+incompatible // indirect github.com/docker/go-connections v0.7.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/felixge/httpsnoop v1.1.0 // indirect github.com/fergusstrange/embedded-postgres v1.25.0 // indirect github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -94,7 +98,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v1.0.0 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect @@ -112,19 +116,19 @@ require ( github.com/jonboulle/clockwork v0.2.2 // indirect github.com/jrick/logrotate v1.1.2 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kcalvinalvin/anet v0.0.0-20251112173137-d8ddc1f6dbee // indirect github.com/kkdai/bstream v1.0.0 // indirect github.com/klauspost/compress v1.18.7 // indirect github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect - github.com/lightninglabs/neutrino v0.17.1 // indirect - github.com/lightninglabs/neutrino/cache v1.1.3 // indirect + github.com/lightninglabs/neutrino v0.18.0 // indirect + github.com/lightninglabs/neutrino/cache v1.1.4 // indirect github.com/lightningnetwork/lnd/actor v0.0.6 // indirect github.com/lightningnetwork/lnd/fn/v2 v2.0.9 // indirect github.com/lightningnetwork/lnd/healthcheck v1.2.6 // indirect github.com/lightningnetwork/lnd/kvdb v1.5.1 // indirect github.com/lightningnetwork/lnd/sqldb v1.0.13 // indirect github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mattn/go-isatty v0.0.24 // indirect github.com/miekg/dns v1.1.50 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/moby/api v1.54.2 // indirect @@ -133,15 +137,16 @@ require ( github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/ncruces/go-strftime v0.1.9 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/ncruces/go-strftime v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/opencontainers/runc v1.3.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/client_golang v1.23.2 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.66.1 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rogpeppe/fastuuid v1.2.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -178,6 +183,7 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.55.0 // indirect golang.org/x/exp v0.0.0-20250811191247-51f88131bc50 // indirect @@ -194,9 +200,9 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/libc v1.55.3 // indirect - modernc.org/mathutil v1.6.0 // indirect - modernc.org/memory v1.8.0 // indirect + modernc.org/libc v1.75.7 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.12.1 // indirect pgregory.net/rapid v1.2.0 // indirect sigs.k8s.io/yaml v1.2.0 // indirect ) @@ -239,3 +245,11 @@ godebug multipathtcp=0 // vulnerable legacy pgx v4/pgproto3 dependency chain. Remove this replacement // once the required lnd version includes an sqldb release with that migration. replace github.com/lightningnetwork/lnd/sqldb v1.0.13 => github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260514041430-e9b422f78581 + +// Use the btcd v2 migration of v0.8.6, preserving the released RFQ and proof +// fixes until an upstream v2-compatible release is available. +// See https://github.com/lightninglabs/taproot-assets/pull/2366. +replace github.com/lightninglabs/taproot-assets => github.com/hieblmi/taro v0.1.0-alpha.0.20261021105727-9b4c853b36ca + +// Released RPC submodules still require the legacy lnd dependency line. +replace github.com/lightningnetwork/lnd => github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260903094101-d66a7c137d32 diff --git a/go.sum b/go.sum index f6325acd2d..5831c37080 100644 --- a/go.sum +++ b/go.sum @@ -1,42 +1,10 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c h1:pxW6RcqyfI9/kWtOwnv/G+AzdKuy2ZrqINhenH4HyNs= github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e h1:n+DcnTNkQnHlwpsrHoQtkrJIO7CBx029fw6oR4vIob4= @@ -51,66 +19,53 @@ github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmH github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= -github.com/btcsuite/btcd v0.24.2/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= -github.com/btcsuite/btcd v0.25.1-0.20260310163610-1c55c7c18179 h1:yJOTxkbxxtuSFrErMqYRvqZLfWggHssioBiWebkV9yo= -github.com/btcsuite/btcd v0.25.1-0.20260310163610-1c55c7c18179/go.mod h1:qbPE+pEiR9643E1s1xu57awsRhlCIm1ZIi6FfeRA4KE= -github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= -github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.3.6 h1:IzlsEr9olcSRKB/n7c4351F3xHKxS2lma+1UFGCYd4E= -github.com/btcsuite/btcd/btcec/v2 v2.3.6/go.mod h1:m22FrOAiuxl/tht9wIqAoGHcbnCCaPWyauO8y2LGGtQ= -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.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= -github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= -github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= -github.com/btcsuite/btcd/btcutil/psbt v1.1.10 h1:TC1zhxhFfhnGqoPjsrlEpoqzh+9TPOHrCgnPR47Mj9I= -github.com/btcsuite/btcd/btcutil/psbt v1.1.10/go.mod h1:ehBEvU91lxSlXtA+zZz3iFYx7Yq9eqnKx4/kSrnsvMY= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= -github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd v0.26.0 h1:yntnSshlG3+H7dTwIOR4LTFXDPojVBsFORBNN5y5c/c= +github.com/btcsuite/btcd v0.26.0/go.mod h1:7ft7+a/MoJHFouFopCb1zyiR9IWPlrcPVn6K/lJ1dcA= +github.com/btcsuite/btcd/address/v2 v2.0.0 h1:UVu8Hal6Siu4XastFe+JX5JkeBYONbDUIY5E+SVTs6I= +github.com/btcsuite/btcd/address/v2 v2.0.0/go.mod h1:htJK1AtaeK3bKNfZY63ep2oN8LbrI6qvmPGe1vekb3I= +github.com/btcsuite/btcd/btcec/v2 v2.5.0 h1:KioMXOWa76b86sTZZOmbzv/ldaQCmB8KFAyn5PbB8E8= +github.com/btcsuite/btcd/btcec/v2 v2.5.0/go.mod h1:+K/MYXcLBtHEQjRbjHuJChuybk4LCgjdjgRwil+e+Kk= +github.com/btcsuite/btcd/btcutil/v2 v2.0.0 h1:77pgf/4tjWaSBLdos8yiWVWL3rSphxWNqkLwcyONExA= +github.com/btcsuite/btcd/btcutil/v2 v2.0.0/go.mod h1:ZF8MMdsx1JGgvHJUanxbigekSO+8bN/ai34LBk/lg3c= +github.com/btcsuite/btcd/chaincfg/v2 v2.0.0 h1:M/RTtXfXA9odC1RUEOyZFXj/NXKVHPYZXVjb60xTOok= +github.com/btcsuite/btcd/chaincfg/v2 v2.0.0/go.mod h1:rHgHIXYYfn70m25a+BJ9f9z7VZAsTiDQGB2XYaippGQ= +github.com/btcsuite/btcd/chainhash/v2 v2.0.0 h1:PMLlSloHJuEeB80XG9EjpXWNEKAZAMLl6YHZ6YsEuoA= +github.com/btcsuite/btcd/chainhash/v2 v2.0.0/go.mod h1:mKxcZ7oGTXE7IRV+sS9hP4EVBwc/SzfNR+52IsOP9j8= +github.com/btcsuite/btcd/psbt/v2 v2.0.0 h1:vKBfHGkxsplVExwCozfK9VuioZ6D6cRpAhcMia2kgrQ= +github.com/btcsuite/btcd/psbt/v2 v2.0.0/go.mod h1:WdHfpXJDXklnMU8u22YXz8o12q8hPYr4b8CxpKdjGYs= +github.com/btcsuite/btcd/txscript/v2 v2.0.0 h1:pEmmHaC8eRx6KSB63zSVJD7qrit9/c9cLSrw++XrYP8= +github.com/btcsuite/btcd/txscript/v2 v2.0.0/go.mod h1:pZXabc11Xr9nz/18kXY3yErdAajYc3gi28Zqb3KqlFo= github.com/btcsuite/btcd/v2transport v1.0.1 h1:pIyyyBCPwd087K3Wdb/9tIvUubAQdzTJghjPgzTQVsE= github.com/btcsuite/btcd/v2transport v1.0.1/go.mod h1:N6H0HGSElVVJKntzaYHYVbW71DtWDLMw2yhwVRO3ZOE= +github.com/btcsuite/btcd/wire/v2 v2.0.0 h1:mYSKzZZ0a1sK+aMhXzfDSVsSzRkWkU3x2U04TFRS2z8= +github.com/btcsuite/btcd/wire/v2 v2.0.0/go.mod h1:bGxkPkk8IiDvUo1D96wE03llBIk7p2MdWYRyAQwLmqM= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btclog v1.0.0 h1:sEkpKJMmfGiyZjADwEIgB1NSwMyfdD1FB8v6+w1T0Ns= github.com/btcsuite/btclog v1.0.0/go.mod h1:w7xnGOhwT3lmrS4H3b/D1XAXxvh+tbhUm8xeHN2y3TQ= github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b h1:MQ+Q6sDy37V1wP1Yu79A5KqJutolqUGwA99UZWQDWZM= github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b/go.mod h1:XItGUfVOxotJL8kkuk2Hj3EVow5KCugXl3wWfQ6K0AE= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcwallet v0.16.18 h1:6h0kMxij4igPu35jOPAWZbn22ceOC4me4L3jj8Za6Zk= -github.com/btcsuite/btcwallet v0.16.18/go.mod h1:4TTru0cgIPbCZpY4aRfAVwX87zrQw4GXM8MH6+A5xZw= -github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5 h1:Rr0njWI3r341nhSPesKQ2JF+ugDSzdPoeckS75SeDZk= -github.com/btcsuite/btcwallet/wallet/txauthor v1.3.5/go.mod h1:+tXJ3Ym0nlQc/iHSwW1qzjmPs3ev+UVWMbGgfV1OZqU= -github.com/btcsuite/btcwallet/wallet/txrules v1.2.2 h1:YEO+Lx1ZJJAtdRrjuhXjWrYsmAk26wLTlNzxt2q0lhk= -github.com/btcsuite/btcwallet/wallet/txrules v1.2.2/go.mod h1:4v+grppsDpVn91SJv+mZT7B8hEV4nSmpREM4I8Uohws= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5 h1:93o5Xz9dYepBP4RMFUc9RGIFXwqP2volSWRkYJFrNtI= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.5/go.mod h1:lQ+e9HxZ85QP7r3kdxItkiMSloSLg1PEGis5o5CXUQw= -github.com/btcsuite/btcwallet/walletdb v1.5.1 h1:HgMhDNCrtEFPC+8q0ei5DQ5U9Tl4RCspA22DEKXlopI= -github.com/btcsuite/btcwallet/walletdb v1.5.1/go.mod h1:jk/hvpLFINF0C1kfTn0bfx2GbnFT+Nvnj6eblZALfjs= -github.com/btcsuite/btcwallet/wtxmgr v1.5.6 h1:Zwvr/rrJYdOLqdBCSr4eICEstnEA+NBUvjIWLkrXaYI= -github.com/btcsuite/btcwallet/wtxmgr v1.5.6/go.mod h1:lzVbDkk/jRao2ib5kge46aLZW1yFc8RFNycdYpnsmZA= +github.com/btcsuite/btcwallet v0.18.0 h1:VSRClNLT7NX0wmJEGALz3jOZRRjWPpUdp7VI1Akie1o= +github.com/btcsuite/btcwallet v0.18.0/go.mod h1:1ZMc1EEskov+AKKv4kCMZqN8BwVh9rpXwEyxbeWy2A4= +github.com/btcsuite/btcwallet/wallet/txauthor v1.4.0 h1:oIkGj32YK1CvWaJGlVwZA1f+y/KVHkfrd2PoST0ZpQs= +github.com/btcsuite/btcwallet/wallet/txauthor v1.4.0/go.mod h1:sGrBjcqQ8UPexuRajFs72+o544CJn3Pavv/5H0VAWVk= +github.com/btcsuite/btcwallet/wallet/txrules v1.3.0 h1:D5aGMwWIxdqek3xEJs4eOdMoh6iga2EI2xSlaXCdnNo= +github.com/btcsuite/btcwallet/wallet/txrules v1.3.0/go.mod h1:ZzSdn2XrsUDPa193Q/su1sJY+716rlFK2H1mYwbY/18= +github.com/btcsuite/btcwallet/wallet/txsizes v1.3.0 h1:2W9qt0edMoX8crx0Wm4Cv+eAj4B3jlbn0N/5fckLHSU= +github.com/btcsuite/btcwallet/wallet/txsizes v1.3.0/go.mod h1:42aE6+LMZSSEisQAa15Xml25ncuJFfhCrkcpB5OmkZk= +github.com/btcsuite/btcwallet/walletdb v1.6.0 h1:Yund5XbdqFxNW7+R2Sxs02bMC5fMrmORj4GN8MV55no= +github.com/btcsuite/btcwallet/walletdb v1.6.0/go.mod h1:q9xif0Csp52GVb3l252BbHCuyiCnuEbrPWu/HAsvaYc= +github.com/btcsuite/btcwallet/wtxmgr v1.6.0 h1:ivSSnYCD4Kb5yAMZVyBA1VMYABIFcopPEcmHCrRZXcE= +github.com/btcsuite/btcwallet/wtxmgr v1.6.0/go.mod h1:Raor7IBIwHSIKE9Lr5o+R9rwX7sRMHU1zjxgEQgn9h8= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/golangcrypto v0.0.0-20150304025918-53f62d9b43e8/go.mod h1:tYvUd8KLhm/oXvUeSEs2VlLghFjQt9+ZaF9ghH0JNjc= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= @@ -120,13 +75,8 @@ github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= @@ -154,15 +104,12 @@ github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U0x++OzVrdms8= github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/decred/dcrd/lru v1.1.2 h1:KdCzlkxppuoIDGEvCGah1fZRicrDH36IipvlB1ROkFY= -github.com/decred/dcrd/lru v1.1.2/go.mod h1:gEdCVgXs1/YoBvFWt7Scgknbhwik3FgVSzlnCcXL2N8= +github.com/decred/dcrd/lru v1.1.3 h1:w9EAbvGLyzm6jTjF83UKuqZEiUtJmvRhQDOCEIvSuE0= +github.com/decred/dcrd/lru v1.1.3/go.mod h1:Tw0i0pJyiLEx/oZdHLe1Wdv/Y7EGzAX+sYftnmxBR4o= github.com/dhui/dktest v0.4.5 h1:uUfYBIVREmj/Rw6MvgmqNAYzTiKOHJak+enB5Di73MM= github.com/dhui/dktest v0.4.5/go.mod h1:tmcyeHDKagvlDrz7gDKq4UAJOLIfVZYkfD5OnHDwcCo= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= @@ -181,8 +128,8 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.1.0 h1:3YtUj32ZZkqZtt3sZZsClsymw/QDuVfpNhoA31zeORc= +github.com/felixge/httpsnoop v1.1.0/go.mod h1:Zqxgdd+1Rkcz8euOqdr7lqgCRJztwr5hp9vDSi5UZCE= github.com/fergusstrange/embedded-postgres v1.25.0 h1:sa+k2Ycrtz40eCRPOzI7Ry7TtkWXXJ+YRsxpKMDhxK0= github.com/fergusstrange/embedded-postgres v1.25.0/go.mod h1:t/MLs0h9ukYM6FSt99R7InCHs1nW0ordoVCcnzmpTYw= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -198,17 +145,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -222,76 +160,42 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gonum/gonum v0.11.0 h1:Lffpf1Aq8WeVUJTbfiKHlOVlFm+c021iePrlwvE5woI= github.com/gonum/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= -github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3 h1:LMLX+LgTNWpfvCBdFebv6EsYotImrt/Ppc5cXIriCSo= +github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3/go.mod h1:jl5iWTm0/hd5PjEYEOuwAJ57L/CibdZfrqZ5XA5GrCk= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -307,26 +211,19 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hieblmi/taro v0.1.0-alpha.0.20261021105727-9b4c853b36ca h1:bxR/xxiiHVA+7146+E61n6nZMg++/Vjj5iJYVALGBX0= +github.com/hieblmi/taro v0.1.0-alpha.0.20261021105727-9b4c853b36ca/go.mod h1:06U9CTUjszbsyMppwRLqSSSFkEU5NM+io+mxFX8sHzc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w= -github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM= github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 h1:Dj0L5fhJ9F82ZJyVOmBx6msDp/kfd1t9GRfny/mfJA0= github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds= -github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag= -github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.9.2 h1:3ZhOzMWnR4yJ+RW1XImIPsD1aNSz4T4fyP7zlQb56hw= -github.com/jackc/pgx/v5 v5.9.2/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= +github.com/jackc/pgx/v5 v5.11.0 h1:IzBBtyK9AHqf98cctWFifYSci2hgQR/cd56wB4p+ogg= +github.com/jackc/pgx/v5 v5.11.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jackpal/gateway v1.0.5 h1:qzXWUJfuMdlLMtt0a3Dgt+xkWQiA5itDEITVJtuSwMc= @@ -334,29 +231,23 @@ github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQ github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad h1:heFfj7z0pGsNCekUlsFhO2jstxO4b5iQ665LjwM5mDc= github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4= github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc= github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/jrick/logrotate v1.1.2 h1:6ePk462NCX7TfKtNp5JJ7MbA2YIslkpfgP03TlTYMN0= github.com/jrick/logrotate v1.1.2/go.mod h1:f9tdWggSVK3iqavGpyvegq5IhNois7KXmasU6/N96OQ= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/juju/mgotest v1.0.1/go.mod h1:vTaDufYul+Ps8D7bgseHjq87X8eu0ivlKLp9mVc/Bfc= github.com/juju/postgrestest v1.1.0/go.mod h1:/n17Y2T6iFozzXwSCO0JYJ5gSiz2caEtSwAjh/uLXDM= github.com/juju/qthttptest v0.0.1/go.mod h1://LCf/Ls22/rPw2u1yWukUJvYtfPY4nYpWUl2uZhryo= github.com/juju/schema v1.0.0/go.mod h1:Y+ThzXpUJ0E7NYYocAbuvJ7vTivXfrof/IfRPq/0abI= github.com/juju/webbrowser v0.0.0-20160309143629-54b8c57083b4/go.mod h1:G6PCelgkM6cuvyD10iYJsjLBsSadVXtJ+nBxFAxE2BU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kcalvinalvin/anet v0.0.0-20251112173137-d8ddc1f6dbee h1:FPP9HDkBbPyniu+u7FHZg+kKFX1WW0gxOGteJ0h3AJk= +github.com/kcalvinalvin/anet v0.0.0-20251112173137-d8ddc1f6dbee/go.mod h1:N6sz6HwJAenJ6d+/xmSl0ikfV05ZrVGmjt1ryy/WOtE= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= @@ -365,8 +256,6 @@ github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+ github.com/klauspost/compress v1.18.7 h1:aUyZsS4kH3QTKurYhAOwAHxllVPnOthb3vPfnF1Ehjw= github.com/klauspost/compress v1.18.7/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -375,34 +264,34 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lightninglabs/aperture v0.4.0 h1:GxI7vypu8srbbGHiDgM2M/vSE8xj0LZzj3ASLC6crXY= -github.com/lightninglabs/aperture v0.4.0/go.mod h1:cQY0FwDqm6oBILlXWJC8toJssaH9F1qXVwghqSesyJI= +github.com/lightninglabs/aperture v0.5.1-0.20260706191149-3c889b604a94 h1:ZshIaxh+uyrB96Oz4hDZ4/yNVaJjbAzaFxvQaztiyHo= +github.com/lightninglabs/aperture v0.5.1-0.20260706191149-3c889b604a94/go.mod h1:gD6rxObWdKcEUyjAnDOxvvQ3xtBz8BgeWlbc3aDfk4M= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc= github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk= github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.4-0.20250610182311-2f1d46ef18b7 h1:373o5lNr1udAdhcf5+zq/0dYpRtkvYLl8Lk6wG7I0DY= github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.4-0.20250610182311-2f1d46ef18b7/go.mod h1:bDnEKRN1u13NFBuy/C+bFLhxA5bfd3clT25y76QY0AM= -github.com/lightninglabs/lndclient v0.21.0-2 h1:gA1utFMoKV6OZfHpYAQ1TX0wVs5cAtgTORRVavHR/ls= -github.com/lightninglabs/lndclient v0.21.0-2/go.mod h1:RUIcfPr82HrvZr3pu9f8nbD5v6VFbm+KgExqNNp5bE4= +github.com/lightninglabs/lndclient v0.21.0-3 h1:jAuSFNccTt3ix8g1AhZyrfCYE/hs+yoNLCu99t8ruKw= +github.com/lightninglabs/lndclient v0.21.0-3/go.mod h1:DtZg/wz7YFXVCwOwYOJyWKQBnUp1NFg4RQdax3MSYbc= github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2.0.20251211093704-71c1eef09789 h1:7kX7vUgHUazAHcCJ6uzBDa4/2MEGEbMEfa01GtfqmTQ= github.com/lightninglabs/migrate/v4 v4.18.2-9023d66a-fork-pr-2.0.20251211093704-71c1eef09789/go.mod h1:99BKpIi6ruaaXRM1A77eqZ+FWPQ3cfRa+ZVy5bmWMaY= -github.com/lightninglabs/neutrino v0.17.1 h1:lNhgq7ix/N81R6oATroP/kHMzH1qzVVF2dEGcTlN2t4= -github.com/lightninglabs/neutrino v0.17.1/go.mod h1:tcwCgRTGWcaua0L/xzdwllW8eslHDbux4XkiYsivvHE= -github.com/lightninglabs/neutrino/cache v1.1.3 h1:rgnabC41W+XaPuBTQrdeFjFCCAVKh1yctAgmb3Se9zA= -github.com/lightninglabs/neutrino/cache v1.1.3/go.mod h1:qxkJb+pUxR5p84jl5uIGFCR4dGdFkhNUwMSxw3EUWls= +github.com/lightninglabs/neutrino v0.18.0 h1:UsyeU3twkCSAXxUssVg8vGXcHkWKzHZ3xQCej57t5t0= +github.com/lightninglabs/neutrino v0.18.0/go.mod h1:TL52mV5nxeAN//WFHrU8XV9GZKwnrrNFL9/nKMX8sl4= +github.com/lightninglabs/neutrino/cache v1.1.4 h1:KVtvUmBwYr7eKtjfjHG/q6/cQlcrjHl23Gag+VdxF2g= +github.com/lightninglabs/neutrino/cache v1.1.4/go.mod h1:ZqLzxghPggIRfNXeAZN1VtTKofMyK/ALI6niYsPH6OE= github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display h1:w7FM5LH9Z6CpKxl13mS48idsu6F+cEZf0lkyiV+Dq9g= github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -github.com/lightninglabs/taproot-assets v0.8.1 h1:E0xbHcQ/B+KmMZz6o3nqiYSMcDs2Vu0aWd+FuomDFYg= -github.com/lightninglabs/taproot-assets v0.8.1/go.mod h1:iq4ZybixussUx6NUaMYyo20uXMptibhbVLM3y/0ihIc= -github.com/lightninglabs/taproot-assets/taprpc v1.2.0 h1:CDiGyo19DTUyJcZTdhp5d6AQBz94N+mpGQNO0kEcnPk= -github.com/lightninglabs/taproot-assets/taprpc v1.2.0/go.mod h1:RkBWxHKN8JpPtoa/yBK5qZW5svz5pR9GAOT2rUP7oOI= -github.com/lightningnetwork/lightning-onion v1.3.0 h1:FqILgHjD6euc/Muo1VOzZ4+XDPuFnw6EYROBq0rR/5c= -github.com/lightningnetwork/lightning-onion v1.3.0/go.mod h1:nP85zMHG7c0si/eHBbSQpuDCtnIXfSvFrK3tW6YWzmU= -github.com/lightningnetwork/lnd v0.21.0-beta h1:bDP5UH15E7DVGTztsmBPQLqgyilq5EXDrglvQFmRc3U= -github.com/lightningnetwork/lnd v0.21.0-beta/go.mod h1:HcKq9DyxbVEZXuR28TIyGbIIgAjANCxI+N6dqOnRBAA= +github.com/lightninglabs/taproot-assets/taprpc v1.3.3 h1:KwscIMQ7Nyy8SleDiUUTWPCgixpgrN9nunM+QwM/KJQ= +github.com/lightninglabs/taproot-assets/taprpc v1.3.3/go.mod h1:0dBS6jLkddm8EvpJSpJjPUMWr294/YRoM/IAzdfo3pw= +github.com/lightningnetwork/lightning-onion v1.4.0 h1:qWE1icOH4AKXRcq1KCzt6P/TesqptgBTP++V7wowTc0= +github.com/lightningnetwork/lightning-onion v1.4.0/go.mod h1:YDPkvVTVQ6FBBE6Yj93tDd7zA3iTSrryi9xq46i7bKE= +github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260903094101-d66a7c137d32 h1:lwPqwW244WCcdOZGwmS+rrieC1hTPYaRvkjHC8KXDeY= +github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260903094101-d66a7c137d32/go.mod h1:deRbYNteO2ZNleUYVQLHXCTMKbiuoUO7ShmYseVRRM8= github.com/lightningnetwork/lnd/actor v0.0.6 h1:Ge8N2wivARG+27qJBwTlB0vwsypStZYZy8vk4Zl38sU= github.com/lightningnetwork/lnd/actor v0.0.6/go.mod h1:YAsoniSbY/cAM9HTVNfZLvt7RI6swDxy6wzPspTcMZg= github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI= @@ -421,18 +310,15 @@ github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260514041430-e9b422f78581 h1:s github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260514041430-e9b422f78581/go.mod h1:PQvrB+2SlYuyAoe0ac/SUIMZ9rP73jYlanIN8O7/eA0= github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM= github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA= -github.com/lightningnetwork/lnd/tlv v1.3.2 h1:MO4FCk7F4k5xPMqVZF6Nb/kOpxlwPrUQpYjmyKny5s0= -github.com/lightningnetwork/lnd/tlv v1.3.2/go.mod h1:pJuiBj1ecr1WWLOtcZ+2+hu9Ey25aJWFIsjmAoPPnmc= -github.com/lightningnetwork/lnd/tor v1.1.6 h1:WHUumk7WgU6BUFsqHuqszI9P6nfhMeIG+rjJBlVE6OE= -github.com/lightningnetwork/lnd/tor v1.1.6/go.mod h1:qSRB8llhAK+a6kaTPWOLLXSZc6Hg8ZC0mq1sUQ/8JfI= +github.com/lightningnetwork/lnd/tlv v1.4.0 h1:qNGymEkOZsHbp4h8VjnkRGgLfmh+eJP1JQtz2/mJX2M= +github.com/lightningnetwork/lnd/tlv v1.4.0/go.mod h1:oL5WIFd3ZoEwh3oH1xzizeUl6pq3DIhx9ljDvRdvI3Q= +github.com/lightningnetwork/lnd/tor v1.2.0 h1:Xled9KE+rdTPEMDVJE5VrSoMNkJq6EfH3NCF6pLP4h4= +github.com/lightningnetwork/lnd/tor v1.2.0/go.mod h1:tB6/Hsk5nIm6xkOPaidd4q1at4x4gF6Bpu/t2UQxYgM= github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw= github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY= github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= +github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= @@ -448,27 +334,22 @@ github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFL github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= -github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= +github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= @@ -482,51 +363,30 @@ github.com/opencontainers/runc v1.3.6/go.mod h1:o1wyv76EDlTkcf0KTFgN8bMWLPvgF/Hf github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= @@ -535,17 +395,12 @@ github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 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.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -568,9 +423,7 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofm github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo= @@ -591,11 +444,6 @@ go.etcd.io/etcd/raft/v3 v3.5.12 h1:7r22RufdDsq2z3STjoR7Msz6fYH8tmbkdheGfwJNRmU= go.etcd.io/etcd/raft/v3 v3.5.12/go.mod h1:ERQuZVe79PI6vcC3DlKBukDCLja/L7YMu29B74Iwj4U= go.etcd.io/etcd/server/v3 v3.5.12 h1:EtMjsbfyfkwZuA2JlKOiBfuGkFCekv5H178qjXypbG8= go.etcd.io/etcd/server/v3 v3.5.12/go.mod h1:axB0oCjMy+cemo5290/CutIjoxlfA6KVYKD1w0uue10= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= @@ -629,188 +477,93 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M= golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20250811191247-51f88131bc50 h1:3yiSh9fhy5/RhCSntf4Sy0Tnx50DmMpQ4MQdKKk4yg4= golang.org/x/exp v0.0.0-20250811191247-51f88131bc50/go.mod h1:rT6SFzZ7oxADUDx58pcaKFTcZ+inxAa9fTrYx/uVYwg= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.38.0 h1:MECBjubtXD7yj4HrhIUcywNaGeNVUdfVnxmPajOk4yk= golang.org/x/mod v0.38.0/go.mod h1:V6Xz0pq8TQ3dGqVQ1FVHuelZpAL0uNhSkk9ogYP3c40= golang.org/x/net v0.0.0-20150829230318-ea47fc708ee3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -818,44 +571,10 @@ golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.48.0 h1:3+hClM1aLL5mjMKm5ovokw9epgRXPuu2tILgismM6RE= @@ -864,58 +583,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d h1:FarXi840EJWSHYTN3ERkADbPWjl307+FGrA22KAVjjc= @@ -923,30 +596,20 @@ google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d h1:IL4hdHzcUv2l/gcg98/Rj3FbtE6axwqslOW8SW0C+S0= google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v1 v1.0.0/go.mod h1:CxwszS/Xz1C49Ucd2i6Zil5UToP1EmyrFhKaMVbg1mk= gopkg.in/errgo.v1 v1.0.1 h1:oQFRXzZ7CkBGdm1XZm/EbQYaYNNEElNBOd09M6cqNso= gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/httprequest.v1 v1.2.0/go.mod h1:T61ZUaJLpMnzvoJDO03ZD8yRXD4nZzBeDoW5e9sffjg= gopkg.in/juju/environschema.v1 v1.0.0/go.mod h1:WTgU3KXKCVoO9bMmG/4KHzoaRvLeoxfjArpgd1MGWFA= @@ -963,7 +626,6 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -975,40 +637,36 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= 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= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ= -modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= -modernc.org/ccgo/v4 v4.19.2 h1:lwQZgvboKD0jBwdaeVCTouxhxAyN6iawF3STraAal8Y= -modernc.org/ccgo/v4 v4.19.2/go.mod h1:ysS3mxiMV38XGRTTcgo0DQTeTmAO4oCmJl1nX9VFI3s= -modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= -modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= -modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= -modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= -modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U= -modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w= -modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= -modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= -modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= -modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc= -modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss= -modernc.org/sqlite v1.34.5 h1:Bb6SR13/fjp15jt70CL4f18JIN7p7dnMExd+UFnF15g= -modernc.org/sqlite v1.34.5/go.mod h1:YLuNmX9NKs8wRNK2ko1LW1NGYcc9FkBO69JOt1AR9JE= -modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= -modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/cc/v4 v4.29.2 h1:h6+9ciCnPKutf4I03CvheAvDLX7+IHlqR6Iy6J+cgd8= +modernc.org/cc/v4 v4.29.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= +modernc.org/ccgo/v4 v4.35.0 h1:F+TUsmw09QxLzmi3aeYYGxjAXarmZaKgj3mKQHNaA8w= +modernc.org/ccgo/v4 v4.35.0/go.mod h1:qrVGs9S3Sr2Ztcg9ve+kTAYMp5a3YvWjo+SoN06kJ5I= +modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= +modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= +modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= +modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/gc/v3 v3.1.5 h1:21ldfPfRYE31Tb7B3mwAK8gy1AxP4+dKjrOQPfqakoc= +modernc.org/gc/v3 v3.1.5/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= +modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= +modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= +modernc.org/libc v1.75.7 h1:o3DTP9/0p9pKmY2WCKQaySW6wIiZhNM7wc2lUoyhfew= +modernc.org/libc v1.75.7/go.mod h1:bO5o2ztHxBb2rjz0PgdHN0sSMw57CgxGFLZ3Qd/QpVQ= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g= +modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= +modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.59.0 h1:X1es1GpqBlS/5T+vbM4HLUdaa8OtQx468DF2vrx+38A= +modernc.org/sqlite v1.59.0/go.mod h1:+paeT2A3iPRHkQDwG7oA6Tk0zQd5woMEI8q7orfry8k= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/instantout/actions.go b/instantout/actions.go index fa07348e25..27e0ed7e53 100644 --- a/instantout/actions.go +++ b/instantout/actions.go @@ -8,9 +8,10 @@ import ( "math" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/txscript/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" @@ -66,7 +67,7 @@ type InitInstantOutCtx struct { initationHeight int32 outgoingChanSet loopdb.ChannelSet protocolVersion ProtocolVersion - sweepAddress btcutil.Address + sweepAddress btcaddr.Address maxSwapFee btcutil.Amount } diff --git a/instantout/cleanup_test.go b/instantout/cleanup_test.go index b2f01cc599..d3acdf2a06 100644 --- a/instantout/cleanup_test.go +++ b/instantout/cleanup_test.go @@ -6,9 +6,10 @@ import ( "testing" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" @@ -142,7 +143,7 @@ func newInitCleanupTestFSM(t *testing.T, ) _, pubKey := btcec.PrivKeyFromBytes([]byte{1}) - sweepAddress, err := btcutil.NewAddressWitnessPubKeyHash( + sweepAddress, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), &chaincfg.TestNet3Params, ) require.NoError(t, err) diff --git a/instantout/fsm.go b/instantout/fsm.go index c188b15824..b5cd21510a 100644 --- a/instantout/fsm.go +++ b/instantout/fsm.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/swapserverrpc" diff --git a/instantout/instantout.go b/instantout/instantout.go index c700ee9177..218e0bf493 100644 --- a/instantout/instantout.go +++ b/instantout/instantout.go @@ -7,13 +7,14 @@ import ( "reflect" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" @@ -79,7 +80,7 @@ type InstantOut struct { htlcFeeRate chainfee.SatPerKWeight // sweepAddress is the address that is used to sweep the funds to. - sweepAddress btcutil.Address + sweepAddress btcaddr.Address // finalizedHtlcTx is the finalized htlc transaction that is used in the // non-cooperative path for the instant out swap. diff --git a/instantout/instantout_test.go b/instantout/instantout_test.go index 9213560f08..5c8d31122f 100644 --- a/instantout/instantout_test.go +++ b/instantout/instantout_test.go @@ -4,10 +4,11 @@ import ( "context" "testing" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" @@ -285,6 +286,11 @@ func TestNewInstantOutRejectsUnsupportedDestAddr(t *testing.T) { addr: "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce" + "28d959f2815b16f81798", }, + { + // Anyone can spend a pay-to-anchor output. + name: "pay to anchor", + addr: "bc1pfeessrawgf", + }, } for _, test := range tests { @@ -309,7 +315,7 @@ func TestNewInstantOutRejectsUnsupportedDestAddr(t *testing.T) { // TestNewInstantOutRejectsWrongNetworkDestAddr verifies that an instant out // cannot pay to an address of another network. func TestNewInstantOutRejectsWrongNetworkDestAddr(t *testing.T) { - addr, err := btcutil.NewAddressWitnessPubKeyHash( + addr, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), &chaincfg.TestNet3Params, ) require.NoError(t, err) diff --git a/instantout/interfaces.go b/instantout/interfaces.go index 2f9018e727..d05ab9528e 100644 --- a/instantout/interfaces.go +++ b/instantout/interfaces.go @@ -3,9 +3,9 @@ package instantout import ( "context" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/instantout/reservation" ) diff --git a/instantout/manager.go b/instantout/manager.go index f2173170d1..b944c852b2 100644 --- a/instantout/manager.go +++ b/instantout/manager.go @@ -7,7 +7,8 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/btcutil" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" "github.com/lightninglabs/loop/swapserverrpc" @@ -145,11 +146,11 @@ func (m *Manager) NewInstantOut(ctx context.Context, } var ( - sweepAddr btcutil.Address + sweepAddr btcaddr.Address err error ) if sweepAddress != "" { - sweepAddr, err = btcutil.DecodeAddress( + sweepAddr, err = btcaddr.DecodeAddress( sweepAddress, m.cfg.Network, ) if err != nil { diff --git a/instantout/reservation/actions.go b/instantout/reservation/actions.go index 9e62c01511..91deac8ac7 100644 --- a/instantout/reservation/actions.go +++ b/instantout/reservation/actions.go @@ -4,7 +4,7 @@ import ( "context" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/chainntnfs" diff --git a/instantout/reservation/actions_test.go b/instantout/reservation/actions_test.go index 643b8ce38b..253ad8018a 100644 --- a/instantout/reservation/actions_test.go +++ b/instantout/reservation/actions_test.go @@ -8,9 +8,9 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/swapserverrpc" diff --git a/instantout/reservation/manager.go b/instantout/reservation/manager.go index a2721435c3..de8183571c 100644 --- a/instantout/reservation/manager.go +++ b/instantout/reservation/manager.go @@ -9,7 +9,7 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/fsm" reservationrpc "github.com/lightninglabs/loop/swapserverrpc" ) diff --git a/instantout/reservation/manager_test.go b/instantout/reservation/manager_test.go index f56b1fdbdd..2fe20a524a 100644 --- a/instantout/reservation/manager_test.go +++ b/instantout/reservation/manager_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightninglabs/loop/test" diff --git a/instantout/reservation/reservation.go b/instantout/reservation/reservation.go index 8b83ae33c6..62b6439880 100644 --- a/instantout/reservation/reservation.go +++ b/instantout/reservation/reservation.go @@ -7,8 +7,8 @@ import ( "fmt" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" reservation_script "github.com/lightninglabs/loop/instantout/reservation/script" diff --git a/instantout/reservation/script/script.go b/instantout/reservation/script/script.go index a86504f523..606887e889 100644 --- a/instantout/reservation/script/script.go +++ b/instantout/reservation/script/script.go @@ -6,7 +6,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/txscript/v2" "github.com/lightningnetwork/lnd/input" ) diff --git a/instantout/reservation/store.go b/instantout/reservation/store.go index 72613f9cab..d24a083770 100644 --- a/instantout/reservation/store.go +++ b/instantout/reservation/store.go @@ -6,9 +6,9 @@ import ( "errors" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/loopdb/sqlc" diff --git a/instantout/reservation/store_test.go b/instantout/reservation/store_test.go index e5ed49636f..f6a614b16f 100644 --- a/instantout/reservation/store_test.go +++ b/instantout/reservation/store_test.go @@ -5,8 +5,8 @@ import ( "crypto/rand" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/loopdb" "github.com/lightningnetwork/lnd/keychain" diff --git a/instantout/store.go b/instantout/store.go index 0e2a5066fe..8610bc8cd3 100644 --- a/instantout/store.go +++ b/instantout/store.go @@ -6,11 +6,12 @@ import ( "database/sql" "fmt" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout/reservation" "github.com/lightninglabs/loop/loopdb" @@ -354,7 +355,7 @@ func (s *SQLStore) sqlInstantOutToInstantOut(ctx context.Context, reservations = append(reservations, reservation) } - sweepAddress, err := btcutil.DecodeAddress(row.SweepAddress, s.network) + sweepAddress, err := btcaddr.DecodeAddress(row.SweepAddress, s.network) if err != nil { return nil, err } diff --git a/interface.go b/interface.go index a10ce7d845..30ca51408c 100644 --- a/interface.go +++ b/interface.go @@ -3,7 +3,8 @@ package loop import ( "time" - "github.com/btcsuite/btcd/btcutil" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" @@ -20,7 +21,7 @@ type OutRequest struct { Amount btcutil.Amount // DestAddr is the destination address for the swap. - DestAddr btcutil.Address + DestAddr btcaddr.Address // IsExternalAddr indicates whether the provided destination address // does not belong to the underlying wallet. This helps indicate @@ -442,10 +443,10 @@ type LoopInSwapInfo struct { // nolint // HtlcAddressP2WSH contains the native segwit swap htlc address, // where the loop-in funds may be paid. - HtlcAddressP2WSH btcutil.Address + HtlcAddressP2WSH btcaddr.Address // HtlcAddressP2TR contains the v3 (pay to taproot) htlc address. - HtlcAddressP2TR btcutil.Address + HtlcAddressP2TR btcaddr.Address // ServerMessage is the human-readable message received from the loop // server. @@ -460,7 +461,7 @@ type LoopOutSwapInfo struct { // nolint:revive // HtlcAddress contains the swap htlc address that the server will // publish to. - HtlcAddress btcutil.Address + HtlcAddress btcaddr.Address // ServerMessage is the human-readable message received from the loop // server. @@ -508,11 +509,11 @@ type SwapInfo struct { // HtlcAddressP2WSH stores the address of the P2WSH (native segwit) // swap htlc. This is used for both loop-in and loop-out. - HtlcAddressP2WSH btcutil.Address + HtlcAddressP2WSH btcaddr.Address // HtlcAddressP2TR stores the address of the P2TR (taproot) swap htlc. // This is used for both internal and external loop-in and loop out. - HtlcAddressP2TR btcutil.Address + HtlcAddressP2TR btcaddr.Address // ExternalHtlc is set to true for external loop-in swaps. ExternalHtlc bool diff --git a/liquidity/autoloop_test.go b/liquidity/autoloop_test.go index b651bac06a..626eafe19b 100644 --- a/liquidity/autoloop_test.go +++ b/liquidity/autoloop_test.go @@ -7,7 +7,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" @@ -342,7 +343,7 @@ func TestAutoloopAddress(t *testing.T) { // Decode a dummy p2wkh address to use as the destination address for // the swaps. - addr, err := btcutil.DecodeAddress(p2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(p2wkhAddr, nil) if err != nil { t.Error(err) } @@ -1275,7 +1276,7 @@ func TestEasyAutoloop(t *testing.T) { // Decode a dummy p2wkh address to use as the destination address for // the swaps. - addr, err := btcutil.DecodeAddress(p2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(p2wkhAddr, nil) if err != nil { t.Error(err) } @@ -1545,7 +1546,7 @@ func TestEasyAssetAutoloop(t *testing.T) { // Common variables for asset tests. assetId := [32]byte{0x01} assetStr := hex.EncodeToString(assetId[:]) - addr, err := btcutil.DecodeAddress(p2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(p2wkhAddr, nil) require.NoError(t, err) // Sub-test 1: Single asset channel. diff --git a/liquidity/autoloop_testcontext_test.go b/liquidity/autoloop_testcontext_test.go index 958acbe5e2..1a0ab71cf9 100644 --- a/liquidity/autoloop_testcontext_test.go +++ b/liquidity/autoloop_testcontext_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/loopdb" diff --git a/liquidity/balances.go b/liquidity/balances.go index 63054db228..c970b68567 100644 --- a/liquidity/balances.go +++ b/liquidity/balances.go @@ -1,7 +1,7 @@ package liquidity import ( - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/routing/route" diff --git a/liquidity/easy_autoloop_exclusions_test.go b/liquidity/easy_autoloop_exclusions_test.go index e6e2362744..9d2b9fd38d 100644 --- a/liquidity/easy_autoloop_exclusions_test.go +++ b/liquidity/easy_autoloop_exclusions_test.go @@ -3,7 +3,7 @@ package liquidity import ( "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/routing/route" diff --git a/liquidity/fees.go b/liquidity/fees.go index dbc92acdaa..7956afe6ec 100644 --- a/liquidity/fees.go +++ b/liquidity/fees.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) diff --git a/liquidity/interface.go b/liquidity/interface.go index 96c5b064b4..b2fa6d1ec9 100644 --- a/liquidity/interface.go +++ b/liquidity/interface.go @@ -3,7 +3,7 @@ package liquidity import ( "context" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/lnwallet/chainfee" diff --git a/liquidity/liquidity.go b/liquidity/liquidity.go index 346088940f..c27f7b105e 100644 --- a/liquidity/liquidity.go +++ b/liquidity/liquidity.go @@ -43,7 +43,7 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" diff --git a/liquidity/liquidity_test.go b/liquidity/liquidity_test.go index 0af5f373ab..fc868c33ba 100644 --- a/liquidity/liquidity_test.go +++ b/liquidity/liquidity_test.go @@ -7,8 +7,9 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" @@ -462,7 +463,7 @@ func TestRestoreParamsWrongNetworkDestAddr(t *testing.T) { // The mock lnd runs on testnet3. Earlier versions could save a mainnet // destination address there. - destAddr, err := btcutil.NewAddressWitnessPubKeyHash( + destAddr, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), &chaincfg.MainNetParams, ) require.NoError(t, err) diff --git a/liquidity/loopin.go b/liquidity/loopin.go index 1631da1d83..2ce40c8b85 100644 --- a/liquidity/loopin.go +++ b/liquidity/loopin.go @@ -1,7 +1,7 @@ package liquidity import ( - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/input" diff --git a/liquidity/loopin_builder.go b/liquidity/loopin_builder.go index 91c8c30760..62a7eca418 100644 --- a/liquidity/loopin_builder.go +++ b/liquidity/loopin_builder.go @@ -3,7 +3,7 @@ package liquidity import ( "context" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/swap" diff --git a/liquidity/loopin_builder_test.go b/liquidity/loopin_builder_test.go index 35990bd01b..f80a19d0e8 100644 --- a/liquidity/loopin_builder_test.go +++ b/liquidity/loopin_builder_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/routing/route" diff --git a/liquidity/loopout.go b/liquidity/loopout.go index 17758e7f9d..0d4610c039 100644 --- a/liquidity/loopout.go +++ b/liquidity/loopout.go @@ -1,7 +1,7 @@ package liquidity import ( - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/routing/route" diff --git a/liquidity/loopout_builder.go b/liquidity/loopout_builder.go index e0c147ed72..80db5790bf 100644 --- a/liquidity/loopout_builder.go +++ b/liquidity/loopout_builder.go @@ -5,7 +5,7 @@ import ( "encoding/hex" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/loopdb" diff --git a/liquidity/parameters.go b/liquidity/parameters.go index 4c2e9e552b..7d85d28aab 100644 --- a/liquidity/parameters.go +++ b/liquidity/parameters.go @@ -6,8 +6,9 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/lndclient" clientrpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swap" @@ -48,7 +49,7 @@ type Parameters struct { // DestAddr is the address to be used for sweeping the on-chain HTLC // that is related with a loop out. - DestAddr btcutil.Address + DestAddr btcaddr.Address // An alternative destination address source for the swap. This field // represents the name of the account in the backing lnd instance. @@ -480,12 +481,12 @@ func RpcToParameters(req *clientrpc.LiquidityParameters, return nil, err } - var destaddr btcutil.Address + var destaddr btcaddr.Address if len(req.AutoloopDestAddress) != 0 { if req.AutoloopDestAddress == "default" { destaddr = nil } else { - destaddr, err = btcutil.DecodeAddress( + destaddr, err = btcaddr.DecodeAddress( req.AutoloopDestAddress, chainParams, ) if err != nil { diff --git a/liquidity/parameters_test.go b/liquidity/parameters_test.go index 9360d42326..2814871ecf 100644 --- a/liquidity/parameters_test.go +++ b/liquidity/parameters_test.go @@ -5,8 +5,8 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/chaincfg/v2" clientrpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/utils" @@ -121,7 +121,7 @@ func TestValidateRestrictions(t *testing.T) { func TestParametersRejectUnsupportedDestAddr(t *testing.T) { params := &chaincfg.MainNetParams - p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash( + p2wpkh, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), params, ) require.NoError(t, err) @@ -131,12 +131,15 @@ func TestParametersRejectUnsupportedDestAddr(t *testing.T) { "7029bfcdb2dce28d959f2815b16f81798") require.NoError(t, err) - rawPubKey, err := btcutil.NewAddressPubKey(pubKey, params) + rawPubKey, err := btcaddr.NewAddressPubKey(pubKey, params) + require.NoError(t, err) + + p2a, err := btcaddr.NewAddressPayToAnchor(params) require.NoError(t, err) tests := []struct { name string - addr btcutil.Address + addr btcaddr.Address err error }{ { @@ -148,6 +151,11 @@ func TestParametersRejectUnsupportedDestAddr(t *testing.T) { addr: rawPubKey, err: ErrUnsupportedDestAddr, }, + { + name: "pay to anchor", + addr: p2a, + err: ErrUnsupportedDestAddr, + }, } for _, test := range tests { @@ -172,25 +180,25 @@ func TestSetParametersDestAddr(t *testing.T) { _, lnd := newTestConfig() params := lnd.ChainParams - p2pkh, err := btcutil.NewAddressPubKeyHash(make([]byte, 20), params) + p2pkh, err := btcaddr.NewAddressPubKeyHash(make([]byte, 20), params) require.NoError(t, err) - p2sh, err := btcutil.NewAddressScriptHashFromHash( + p2sh, err := btcaddr.NewAddressScriptHashFromHash( make([]byte, 20), params, ) require.NoError(t, err) - p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash( + p2wpkh, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), params, ) require.NoError(t, err) - mainnetP2PKH, err := btcutil.NewAddressPubKeyHash( + mainnetP2PKH, err := btcaddr.NewAddressPubKeyHash( make([]byte, 20), &chaincfg.MainNetParams, ) require.NoError(t, err) - mainnetP2WPKH, err := btcutil.NewAddressWitnessPubKeyHash( + mainnetP2WPKH, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), &chaincfg.MainNetParams, ) require.NoError(t, err) @@ -198,7 +206,7 @@ func TestSetParametersDestAddr(t *testing.T) { tests := []struct { name string addr string - destAddr btcutil.Address + destAddr btcaddr.Address err error }{ { @@ -226,7 +234,7 @@ func TestSetParametersDestAddr(t *testing.T) { { name: "p2pkh of another network", addr: mainnetP2PKH.EncodeAddress(), - err: btcutil.ErrUnknownAddressType, + err: btcaddr.ErrUnknownAddressType, }, { name: "p2wpkh of another network", diff --git a/liquidity/restrictions.go b/liquidity/restrictions.go index 11ea76ef9e..b040ba64f7 100644 --- a/liquidity/restrictions.go +++ b/liquidity/restrictions.go @@ -3,7 +3,7 @@ package liquidity import ( "fmt" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" ) // Restrictions indicates the restrictions placed on a swap. diff --git a/liquidity/static_loopin.go b/liquidity/static_loopin.go index bfdcafbce3..0cdb1830ed 100644 --- a/liquidity/static_loopin.go +++ b/liquidity/static_loopin.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/txscript/v2" "github.com/lightninglabs/loop" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lntypes" diff --git a/liquidity/static_loopin_test.go b/liquidity/static_loopin_test.go index 9690a00f68..6ad7580577 100644 --- a/liquidity/static_loopin_test.go +++ b/liquidity/static_loopin_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/labels" diff --git a/liquidity/threshold_rule.go b/liquidity/threshold_rule.go index 8e50dfbf8d..9d3c53cf75 100644 --- a/liquidity/threshold_rule.go +++ b/liquidity/threshold_rule.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/swap" ) diff --git a/liquidity/threshold_rule_test.go b/liquidity/threshold_rule_test.go index 00abdfb080..21f7e043c0 100644 --- a/liquidity/threshold_rule_test.go +++ b/liquidity/threshold_rule_test.go @@ -3,7 +3,7 @@ package liquidity import ( "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/swap" "github.com/stretchr/testify/require" ) diff --git a/loopd/config.go b/loopd/config.go index bacfc45a68..6fec33e24a 100644 --- a/loopd/config.go +++ b/loopd/config.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/aperture/l402" "github.com/lightninglabs/loop/assets" "github.com/lightninglabs/loop/loopdb" diff --git a/loopd/config_test.go b/loopd/config_test.go index 87eda5fa93..405260b5be 100644 --- a/loopd/config_test.go +++ b/loopd/config_test.go @@ -4,7 +4,7 @@ import ( "path/filepath" "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/assets" "github.com/stretchr/testify/require" ) diff --git a/loopd/htlc_confirmed_recovery.go b/loopd/htlc_confirmed_recovery.go index 27000f56ca..7c038d1862 100644 --- a/loopd/htlc_confirmed_recovery.go +++ b/loopd/htlc_confirmed_recovery.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/swapserverrpc" ) diff --git a/loopd/htlc_confirmed_recovery_test.go b/loopd/htlc_confirmed_recovery_test.go index fc2d7f8655..39041de04c 100644 --- a/loopd/htlc_confirmed_recovery_test.go +++ b/loopd/htlc_confirmed_recovery_test.go @@ -6,9 +6,10 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/swapserverrpc" @@ -100,7 +101,7 @@ func newHtlcConfirmedRecoveryFixture( }, } - destAddr, err := btcutil.NewAddressWitnessPubKeyHash( + destAddr, err := btcaddr.NewAddressWitnessPubKeyHash( bytes.Repeat([]byte{2}, 20), lnd.ChainParams, ) require.NoError(t, err) diff --git a/loopd/static_loopin_status_updater.go b/loopd/static_loopin_status_updater.go index 1de93648b1..e7c72f65aa 100644 --- a/loopd/static_loopin_status_updater.go +++ b/loopd/static_loopin_status_updater.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/loopin" diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index e6fcf499e5..80b6e97fb0 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -15,10 +15,11 @@ import ( "sync" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/aperture/l402" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" @@ -168,7 +169,7 @@ func (s *swapClientServer) LoopOut(ctx context.Context, s.config.TotalPaymentTimeout) } - var sweepAddr btcutil.Address + var sweepAddr btcaddr.Address var isExternalAddr bool var err error //nolint:lll @@ -180,7 +181,7 @@ func (s *swapClientServer) LoopOut(ctx context.Context, case in.Dest != "": // Decode the client provided destination address for the loop // out sweep. - sweepAddr, err = btcutil.DecodeAddress( + sweepAddr, err = btcaddr.DecodeAddress( in.Dest, s.lnd.ChainParams, ) if err != nil { @@ -2444,7 +2445,7 @@ func staticAddressLoopInSwapInfoWithChainParams( // staticAddressLoopInHtlcAddress reconstructs the V2 P2WSH HTLC address from // the static-address loop-in's client and server keys. func staticAddressLoopInHtlcAddress(swp *loopin.StaticAddressLoopIn, - chainParams *chaincfg.Params) (btcutil.Address, error) { + chainParams *chaincfg.Params) (btcaddr.Address, error) { if swp.ClientPubkey == nil { return nil, errors.New("missing static address loop-in client HTLC key") @@ -3045,7 +3046,7 @@ func validateLoopInRequest(htlcConfTarget int32, external bool, // loop amount is valid given the available balance. func validateLoopOutRequest(ctx context.Context, lnd lndclient.LightningClient, chainParams *chaincfg.Params, req *looprpc.LoopOutRequest, - sweepAddr btcutil.Address, maxParts uint32) (int32, error) { + sweepAddr btcaddr.Address, maxParts uint32) (int32, error) { // Check that the provided destination address has the correct format // for the active network. diff --git a/loopd/swapclient_server_deposit_test.go b/loopd/swapclient_server_deposit_test.go index 3d4ce065a8..82dd02dc71 100644 --- a/loopd/swapclient_server_deposit_test.go +++ b/loopd/swapclient_server_deposit_test.go @@ -3,8 +3,8 @@ package loopd import ( "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/staticaddr/deposit" ) diff --git a/loopd/swapclient_server_staticaddr_test.go b/loopd/swapclient_server_staticaddr_test.go index 2dc70f5fe9..760b589190 100644 --- a/loopd/swapclient_server_staticaddr_test.go +++ b/loopd/swapclient_server_staticaddr_test.go @@ -4,10 +4,11 @@ import ( "context" "testing" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" @@ -120,7 +121,7 @@ func (s *staticAddrTestAddressManager) ListUnspent(context.Context, } func (s *staticAddrTestAddressManager) GetTaprootAddress( - *btcec.PublicKey, *btcec.PublicKey, int64) (*btcutil.AddressTaproot, + *btcec.PublicKey, *btcec.PublicKey, int64) (*btcaddr.AddressTaproot, error) { return nil, nil diff --git a/loopd/swapclient_server_test.go b/loopd/swapclient_server_test.go index 9452b593cd..065ff7026f 100644 --- a/loopd/swapclient_server_test.go +++ b/loopd/swapclient_server_test.go @@ -8,11 +8,12 @@ import ( "testing" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" @@ -41,18 +42,23 @@ import ( ) var ( - testnetAddr, _ = btcutil.NewAddressScriptHash( + testnetAddr, _ = btcaddr.NewAddressScriptHash( []byte{123}, &chaincfg.TestNet3Params, ) - mainnetAddr, _ = btcutil.NewAddressScriptHash( + mainnetAddr, _ = btcaddr.NewAddressScriptHash( []byte{123}, &chaincfg.MainNetParams, ) - nodepubkeyAddr, _ = btcutil.DecodeAddress( + nodepubkeyAddr, _ = btcaddr.DecodeAddress( mock_lnd.NewMockLnd().NodePubkey, &chaincfg.MainNetParams, ) + // Anyone can spend a pay-to-anchor output. + payToAnchorAddr, _ = btcaddr.DecodeAddress( + "bc1pfeessrawgf", &chaincfg.MainNetParams, + ) + chanID1 = lnwire.NewShortChanIDFromInt(1) chanID2 = lnwire.NewShortChanIDFromInt(2) chanID3 = lnwire.NewShortChanIDFromInt(3) @@ -1383,7 +1389,7 @@ func newGenericStaticLoopInServer(t *testing.T) (*swapClientServer, } func newTestStaticAddressParams(t *testing.T) (*script.Parameters, - *btcutil.AddressTaproot) { + *btcaddr.AddressTaproot) { t.Helper() @@ -1400,7 +1406,7 @@ func newTestStaticAddressParams(t *testing.T) (*script.Parameters, staticPkScript, err := staticAddress.StaticAddressScript() require.NoError(t, err) - taprootAddress, err := btcutil.NewAddressTaproot( + taprootAddress, err := btcaddr.NewAddressTaproot( schnorr.SerializePubKey(staticAddress.TaprootKey), &chaincfg.TestNet3Params, ) @@ -1683,7 +1689,7 @@ func TestValidateLoopOutRequest(t *testing.T) { name string chain chaincfg.Params confTarget int32 - destAddr btcutil.Address + destAddr btcaddr.Address label string channels []lndclient.ChannelInfo outgoingChanSet []uint64 @@ -1964,6 +1970,13 @@ func TestValidateLoopOutRequest(t *testing.T) { err: errInvalidAddress, expectedTarget: 0, }, + { + name: "pay to anchor as dest addr", + chain: chaincfg.MainNetParams, + destAddr: payToAnchorAddr, + err: errInvalidAddress, + expectedTarget: 0, + }, } for _, test := range tests { diff --git a/loopd/sweep_htlc.go b/loopd/sweep_htlc.go index 1851af2196..ff2fb47346 100644 --- a/loopd/sweep_htlc.go +++ b/loopd/sweep_htlc.go @@ -5,14 +5,15 @@ import ( "context" "fmt" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/loopdb" @@ -64,7 +65,7 @@ type htlcWallet interface { // NextAddr derives the next address from the given account and type. NextAddr(ctx context.Context, account string, addrType walletrpc.AddressType, - change bool) (btcutil.Address, error) + change bool) (btcaddr.Address, error) // PublishTransaction broadcasts the transaction with the given label. PublishTransaction(ctx context.Context, tx *wire.MsgTx, @@ -177,7 +178,7 @@ func sweepHtlc(ctx context.Context, req *looprpc.SweepHtlcRequest, } // Parse the inputs. - htlcAddr, err := btcutil.DecodeAddress( + htlcAddr, err := btcaddr.DecodeAddress( req.HtlcAddress, chainParams, ) if err != nil { @@ -198,9 +199,9 @@ func sweepHtlc(ctx context.Context, req *looprpc.SweepHtlcRequest, // Destination address: honor a provided override immediately so request // validation stays independent from swap lookup. - var sweepAddr btcutil.Address + var sweepAddr btcaddr.Address if req.DestAddress != "" { - sweepAddr, err = btcutil.DecodeAddress( + sweepAddr, err = btcaddr.DecodeAddress( req.DestAddress, chainParams, ) if err != nil { @@ -221,7 +222,7 @@ func sweepHtlc(ctx context.Context, req *looprpc.SweepHtlcRequest, targetHash lntypes.Hash preimage lntypes.Preimage heightHint int32 - storedDest btcutil.Address + storedDest btcaddr.Address keyDesc keychain.KeyDescriptor clientKey *btcec.PublicKey keyScanLimit uint32 diff --git a/loopd/sweep_htlc_test.go b/loopd/sweep_htlc_test.go index 93c2804eed..d6d65c514d 100644 --- a/loopd/sweep_htlc_test.go +++ b/loopd/sweep_htlc_test.go @@ -8,12 +8,13 @@ import ( "testing" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" @@ -615,7 +616,7 @@ func TestSweepHtlcCooperative(t *testing.T) { PkScript: htlc.PkScript, }) outpoint := wire.OutPoint{Hash: fundingTx.TxHash()} - destAddr, err := btcutil.NewAddressWitnessPubKeyHash( + destAddr, err := btcaddr.NewAddressWitnessPubKeyHash( bytes.Repeat([]byte{5}, 20), lnd.ChainParams, ) require.NoError(t, err) @@ -848,7 +849,7 @@ func TestSweepHtlcStateless(t *testing.T) { }) outpoint := wire.OutPoint{Hash: fundingTx.TxHash()} - destAddr, err := btcutil.NewAddressWitnessPubKeyHash( + destAddr, err := btcaddr.NewAddressWitnessPubKeyHash( bytes.Repeat([]byte{2}, 20), lnd.ChainParams, ) require.NoError(t, err) @@ -990,7 +991,7 @@ func TestSweepHtlcStatelessRejectsInvalidSignature(t *testing.T) { }) outpoint := wire.OutPoint{Hash: fundingTx.TxHash()} - destAddr, err := btcutil.NewAddressWitnessPubKeyHash( + destAddr, err := btcaddr.NewAddressWitnessPubKeyHash( bytes.Repeat([]byte{3}, 20), lnd.ChainParams, ) require.NoError(t, err) @@ -1093,7 +1094,7 @@ func TestSweepHtlcStatelessOnChainAddressMismatch(t *testing.T) { htlc := statelessTestHtlc( t, lnd, preimage, 500, serverPubKey, clientPubKey, ) - observedAddr, err := btcutil.NewAddressWitnessPubKeyHash( + observedAddr, err := btcaddr.NewAddressWitnessPubKeyHash( bytes.Repeat([]byte{4}, 20), lnd.ChainParams, ) require.NoError(t, err) @@ -1629,7 +1630,7 @@ func TestSweepHtlc(t *testing.T) { ProtocolVersion: loopdb.ProtocolVersionHtlcV2, } - destAddr, err := btcutil.NewAddressWitnessPubKeyHash( + destAddr, err := btcaddr.NewAddressWitnessPubKeyHash( bytes.Repeat([]byte{1}, 20), lnd.ChainParams, ) require.NoError(t, err) @@ -1802,7 +1803,7 @@ func TestSweepHtlc(t *testing.T) { // record does not define one. expectedAddr := loopOut.Contract.DestAddr if req.DestAddress != "" { - expectedAddr, err = btcutil.DecodeAddress( + expectedAddr, err = btcaddr.DecodeAddress( req.DestAddress, lnd.ChainParams, ) require.NoError(t, err) diff --git a/loopd/utils.go b/loopd/utils.go index f92eb1bf15..659ef6d71a 100644 --- a/loopd/utils.go +++ b/loopd/utils.go @@ -6,8 +6,8 @@ import ( "fmt" "slices" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/aperture/l402" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" diff --git a/loopd/view.go b/loopd/view.go index 86b9604a1f..498a73ca87 100644 --- a/loopd/view.go +++ b/loopd/view.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/assets" diff --git a/loopdb/loop.go b/loopdb/loop.go index 867476bc1a..508f36edfa 100644 --- a/loopdb/loop.go +++ b/loopdb/loop.go @@ -5,7 +5,7 @@ import ( "encoding/binary" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lntypes" ) diff --git a/loopdb/loopout.go b/loopdb/loopout.go index 477a990a17..e4c3e7d1a5 100644 --- a/loopdb/loopout.go +++ b/loopdb/loopout.go @@ -8,9 +8,10 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/wire/v2" ) // LoopOutContract contains the data that is serialized to persistent storage @@ -22,7 +23,7 @@ type LoopOutContract struct { SwapContract // DestAddr is the destination address of the loop out swap. - DestAddr btcutil.Address + DestAddr btcaddr.Address // IsExternalAddr indicates whether the destination address does not // belong to the backing lnd node. @@ -206,7 +207,7 @@ func deserializeLoopOutContract(value []byte, chainParams *chaincfg.Params) ( if err != nil { return nil, err } - contract.DestAddr, err = btcutil.DecodeAddress(addr, chainParams) + contract.DestAddr, err = btcaddr.DecodeAddress(addr, chainParams) if err != nil { return nil, err } diff --git a/loopdb/meta.go b/loopdb/meta.go index 8179576982..4e35d87a62 100644 --- a/loopdb/meta.go +++ b/loopdb/meta.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "go.etcd.io/bbolt" ) diff --git a/loopdb/migrate_test.go b/loopdb/migrate_test.go index cc36ecda00..2803327faf 100644 --- a/loopdb/migrate_test.go +++ b/loopdb/migrate_test.go @@ -7,15 +7,15 @@ import ( "context" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/stretchr/testify/require" ) var ( boltDbFile = "../loopdb-kon" addr = "bc1p4g493qcmzt79r87363fvyvq5sfz58q5gsz74g2c4ejqy5xnpcpesh3yq2y" - addrBtc, _ = btcutil.DecodeAddress(addr, &chaincfg.MainNetParams) + addrBtc, _ = btcaddr.DecodeAddress(addr, &chaincfg.MainNetParams) ) // TestMigrationFromOnDiskBoltdb tests migrating from an on-disk boltdb to an diff --git a/loopdb/migration_01_costs.go b/loopdb/migration_01_costs.go index 93ba0442f8..af9720d7ac 100644 --- a/loopdb/migration_01_costs.go +++ b/loopdb/migration_01_costs.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "go.etcd.io/bbolt" ) diff --git a/loopdb/migration_02_swap_publication_deadline.go b/loopdb/migration_02_swap_publication_deadline.go index 5347993f98..f5378ec499 100644 --- a/loopdb/migration_02_swap_publication_deadline.go +++ b/loopdb/migration_02_swap_publication_deadline.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "go.etcd.io/bbolt" ) diff --git a/loopdb/migration_03_last_hop.go b/loopdb/migration_03_last_hop.go index 340f650d01..1f52b0450a 100644 --- a/loopdb/migration_03_last_hop.go +++ b/loopdb/migration_03_last_hop.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "go.etcd.io/bbolt" ) diff --git a/loopdb/migration_04_updates.go b/loopdb/migration_04_updates.go index cb870a0543..0d9c31f274 100644 --- a/loopdb/migration_04_updates.go +++ b/loopdb/migration_04_updates.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "go.etcd.io/bbolt" ) diff --git a/loopdb/migration_04_updates_test.go b/loopdb/migration_04_updates_test.go index f0e85f49f5..7c5f5f5d4d 100644 --- a/loopdb/migration_04_updates_test.go +++ b/loopdb/migration_04_updates_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/stretchr/testify/require" "go.etcd.io/bbolt" ) diff --git a/loopdb/postgres.go b/loopdb/postgres.go index 2ce67f60ef..e11679683c 100644 --- a/loopdb/postgres.go +++ b/loopdb/postgres.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/golang-migrate/migrate/v4" postgres_migrate "github.com/golang-migrate/migrate/v4/database/postgres" _ "github.com/golang-migrate/migrate/v4/source/file" diff --git a/loopdb/postgres_test.go b/loopdb/postgres_test.go index 541b36a5bf..91b0adc1de 100644 --- a/loopdb/postgres_test.go +++ b/loopdb/postgres_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/golang-migrate/migrate/v4" "github.com/golang-migrate/migrate/v4/database" postgres_migrate "github.com/golang-migrate/migrate/v4/database/postgres" diff --git a/loopdb/sql_store.go b/loopdb/sql_store.go index f80abbab7e..d283bf40a8 100644 --- a/loopdb/sql_store.go +++ b/loopdb/sql_store.go @@ -8,9 +8,10 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/loop/loopdb/sqlc" "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lntypes" @@ -590,7 +591,7 @@ func ConvertLoopOutRow(network *chaincfg.Params, row sqlc.GetLoopOutSwapRow, return nil, err } - destAddress, err := btcutil.DecodeAddress(row.DestAddress, network) + destAddress, err := btcaddr.DecodeAddress(row.DestAddress, network) if err != nil { return nil, err } diff --git a/loopdb/sql_test.go b/loopdb/sql_test.go index ce80967b6c..6b1549e061 100644 --- a/loopdb/sql_test.go +++ b/loopdb/sql_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/loop/loopdb/sqlc" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/keychain" @@ -582,9 +582,7 @@ func randomStruct(v any) error { } val = val.Elem() - for i := range val.NumField() { - field := val.Field(i) - + for _, field := range val.Fields() { switch field.Kind() { case reflect.Int64: if field.CanSet() { diff --git a/loopdb/sqlite.go b/loopdb/sqlite.go index 0a0188e555..6b2f4044f5 100644 --- a/loopdb/sqlite.go +++ b/loopdb/sqlite.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" sqlite_migrate "github.com/golang-migrate/migrate/v4/database/sqlite" "github.com/lightninglabs/loop/loopdb/sqlc" "github.com/lightningnetwork/lnd/zpay32" diff --git a/loopdb/store.go b/loopdb/store.go index 15d6e427f6..caedc27927 100644 --- a/loopdb/store.go +++ b/loopdb/store.go @@ -11,8 +11,8 @@ import ( "path/filepath" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightningnetwork/lnd/lntypes" "go.etcd.io/bbolt" bbolterrors "go.etcd.io/bbolt/errors" diff --git a/loopdb/store_test.go b/loopdb/store_test.go index 86f9c35e43..77f941a623 100644 --- a/loopdb/store_test.go +++ b/loopdb/store_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lntypes" diff --git a/loopdb/swapstate.go b/loopdb/swapstate.go index fb9f910deb..0d355bccef 100644 --- a/loopdb/swapstate.go +++ b/loopdb/swapstate.go @@ -1,8 +1,8 @@ package loopdb import ( - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" ) // SwapState indicates the current state of a swap. This enumeration is the diff --git a/loopin.go b/loopin.go index 1f98fe42df..1aa4948fca 100644 --- a/loopin.go +++ b/loopin.go @@ -9,11 +9,12 @@ import ( "sync" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/btcsuite/btcd/mempool" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/loopdb" @@ -115,7 +116,7 @@ type loopInSwap struct { // htlcTxHash is the confirmed htlc tx id. htlcTxHash *chainhash.Hash - timeoutAddr btcutil.Address + timeoutAddr btcaddr.Address // invoiceSettled is set once the swap invoice is known to be settled. // Settlement is final, so the flag is never cleared. diff --git a/loopin_test.go b/loopin_test.go index d6b3e39710..08f6240ea8 100644 --- a/loopin_test.go +++ b/loopin_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" diff --git a/loopin_testcontext_test.go b/loopin_testcontext_test.go index d8a4601250..61775ec952 100644 --- a/loopin_testcontext_test.go +++ b/loopin_testcontext_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/sweep" diff --git a/loopout.go b/loopout.go index 59fa6f74a8..b1fff41ced 100644 --- a/loopout.go +++ b/loopout.go @@ -12,9 +12,9 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" diff --git a/loopout_blinded_test.go b/loopout_blinded_test.go index e7887be965..3a744b247b 100644 --- a/loopout_blinded_test.go +++ b/loopout_blinded_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swapserverrpc" diff --git a/loopout_feerate.go b/loopout_feerate.go index ec1b5d4534..12d1ce7504 100644 --- a/loopout_feerate.go +++ b/loopout_feerate.go @@ -4,10 +4,11 @@ import ( "context" "fmt" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/utils" @@ -24,7 +25,7 @@ type sweeper interface { // logging. It returns also the fee rate and transaction weight. GetSweepFeeDetails(ctx context.Context, addInputEstimate func(*input.TxWeightEstimator) error, - destAddr btcutil.Address, sweepConfTarget int32, label string) ( + destAddr btcaddr.Address, sweepConfTarget int32, label string) ( btcutil.Amount, chainfee.SatPerKWeight, lntypes.WeightUnit, error) } @@ -126,7 +127,7 @@ func (p *loopOutSweepFeerateProvider) GetConfTargetAndFeeRate( // Transaction weight might be important for feeRate, in case of high // priority proportional fee, so we accurately assess the size of input. // The size of output is almost the same for all types, so use P2TR. - var destAddr *btcutil.AddressTaproot + var destAddr *btcaddr.AddressTaproot // Get current height. height := p.getHeight() diff --git a/loopout_feerate_test.go b/loopout_feerate_test.go index 33efae2acd..cd1ed28eef 100644 --- a/loopout_feerate_test.go +++ b/loopout_feerate_test.go @@ -5,8 +5,9 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/sweep" "github.com/lightninglabs/loop/test" @@ -25,7 +26,7 @@ type testSweeper struct { // weight estimator. It returns also the fee rate and transaction weight. func (s testSweeper) GetSweepFeeDetails(ctx context.Context, addInputEstimate func(*input.TxWeightEstimator) error, - destAddr btcutil.Address, sweepConfTarget int32, + destAddr btcaddr.Address, sweepConfTarget int32, label string) (btcutil.Amount, chainfee.SatPerKWeight, lntypes.WeightUnit, error) { @@ -99,7 +100,7 @@ func TestLoopOutSweepFeerateProvider(t *testing.T) { } }() - var destAddr *btcutil.AddressTaproot + var destAddr *btcaddr.AddressTaproot swapInvoice := "lntb1230n1pjjszzgpp5j76f03wrkya4sm4gxv6az5nmz5aqsvmn4" + "tpguu2sdvdyygedqjgqdq9xyerxcqzzsxqr23ssp5rwzmwtfjmsgranfk8sr" + diff --git a/loopout_test.go b/loopout_test.go index 6b123d1fc9..41b8cbedb0 100644 --- a/loopout_test.go +++ b/loopout_test.go @@ -10,8 +10,8 @@ import ( "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" diff --git a/routing_plugin.go b/routing_plugin.go index 9e1553052d..65545796f2 100644 --- a/routing_plugin.go +++ b/routing_plugin.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/btcsuite/btclog/v2" "github.com/davecgh/go-spew/spew" "github.com/lightninglabs/lndclient" diff --git a/routing_plugin_test.go b/routing_plugin_test.go index dd6088f8ae..5d5ffccdc1 100644 --- a/routing_plugin_test.go +++ b/routing_plugin_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/clock" diff --git a/server_mock_test.go b/server_mock_test.go index 85dfd6546d..27d45e1db8 100644 --- a/server_mock_test.go +++ b/server_mock_test.go @@ -8,9 +8,9 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/test" diff --git a/staticaddr/address/manager.go b/staticaddr/address/manager.go index 322eed7392..9b47f8964d 100644 --- a/staticaddr/address/manager.go +++ b/staticaddr/address/manager.go @@ -7,11 +7,11 @@ import ( "sync" "sync/atomic" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightninglabs/loop/staticaddr/version" @@ -109,7 +109,7 @@ func (m *Manager) Run(ctx context.Context, initChan chan struct{}) error { // NewAddress creates a new static address with the server or returns an // existing one. -func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, +func (m *Manager) NewAddress(ctx context.Context) (*btcaddr.AddressTaproot, int64, error) { // If there's already a static address in the database, we can return @@ -275,7 +275,7 @@ func validateServerAddressParams( // GetTaprootAddress returns a taproot address for the given client and server // public keys and expiry. func (m *Manager) GetTaprootAddress(clientPubkey, serverPubkey *btcec.PublicKey, - expiry int64) (*btcutil.AddressTaproot, error) { + expiry int64) (*btcaddr.AddressTaproot, error) { staticAddress, err := script.NewStaticAddress( input.MuSig2Version100RC2, expiry, clientPubkey, serverPubkey, @@ -284,7 +284,7 @@ func (m *Manager) GetTaprootAddress(clientPubkey, serverPubkey *btcec.PublicKey, return nil, err } - return btcutil.NewAddressTaproot( + return btcaddr.NewAddressTaproot( schnorr.SerializePubKey(staticAddress.TaprootKey), m.cfg.ChainParams, ) @@ -292,7 +292,7 @@ func (m *Manager) GetTaprootAddress(clientPubkey, serverPubkey *btcec.PublicKey, // ListUnspentRaw returns a list of utxos at the static address. func (m *Manager) ListUnspentRaw(ctx context.Context, minConfs, - maxConfs int32) (*btcutil.AddressTaproot, []*lnwallet.Utxo, error) { + maxConfs int32) (*btcaddr.AddressTaproot, []*lnwallet.Utxo, error) { addresses, err := m.cfg.Store.GetAllStaticAddresses(ctx) switch { diff --git a/staticaddr/address/manager_test.go b/staticaddr/address/manager_test.go index b7bbf79aef..6e7f21b7ca 100644 --- a/staticaddr/address/manager_test.go +++ b/staticaddr/address/manager_test.go @@ -5,10 +5,10 @@ import ( "encoding/hex" "testing" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightninglabs/loop/swap" @@ -231,7 +231,7 @@ func TestNewAddressAcceptsMaxCSVExpiry(t *testing.T) { // GenerateExpectedTaprootAddress generates the expected taproot address that // the predefined parameters are supposed to generate. func GenerateExpectedTaprootAddress(t *ManagerTestContext) ( - *btcutil.AddressTaproot, error) { + *btcaddr.AddressTaproot, error) { keyIndex := int32(0) _, pubKey := test.CreateKey(keyIndex) @@ -252,7 +252,7 @@ func GenerateExpectedTaprootAddress(t *ManagerTestContext) ( return nil, err } - return btcutil.NewAddressTaproot( + return btcaddr.NewAddressTaproot( schnorr.SerializePubKey(staticAddress.TaprootKey), t.manager.cfg.ChainParams, ) diff --git a/staticaddr/deposit/actions.go b/staticaddr/deposit/actions.go index 77560eb242..1458182b43 100644 --- a/staticaddr/deposit/actions.go +++ b/staticaddr/deposit/actions.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/script" diff --git a/staticaddr/deposit/actions_test.go b/staticaddr/deposit/actions_test.go index 8c02112116..eb34f4c108 100644 --- a/staticaddr/deposit/actions_test.go +++ b/staticaddr/deposit/actions_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/stretchr/testify/require" ) diff --git a/staticaddr/deposit/deposit.go b/staticaddr/deposit/deposit.go index 21f20e9f4e..7fcf97bd07 100644 --- a/staticaddr/deposit/deposit.go +++ b/staticaddr/deposit/deposit.go @@ -5,9 +5,9 @@ import ( "fmt" "sync" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightningnetwork/lnd/lntypes" ) diff --git a/staticaddr/deposit/fsm.go b/staticaddr/deposit/fsm.go index c5bb85c303..5807aec8a2 100644 --- a/staticaddr/deposit/fsm.go +++ b/staticaddr/deposit/fsm.go @@ -6,8 +6,8 @@ import ( "fmt" "sync" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/script" diff --git a/staticaddr/deposit/fsm_test.go b/staticaddr/deposit/fsm_test.go index f174ad1dbd..1397e26ca3 100644 --- a/staticaddr/deposit/fsm_test.go +++ b/staticaddr/deposit/fsm_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/script" "github.com/stretchr/testify/mock" diff --git a/staticaddr/deposit/interface.go b/staticaddr/deposit/interface.go index 91f27022d0..17c8f78d23 100644 --- a/staticaddr/deposit/interface.go +++ b/staticaddr/deposit/interface.go @@ -3,8 +3,8 @@ package deposit import ( "context" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightningnetwork/lnd/lnwallet" @@ -60,5 +60,5 @@ type AddressManager interface { // GetTaprootAddress returns a taproot address. GetTaprootAddress(clientPubkey, serverPubkey *btcec.PublicKey, - expiry int64) (*btcutil.AddressTaproot, error) + expiry int64) (*btcaddr.AddressTaproot, error) } diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go index 201348ae2a..36e27c986a 100644 --- a/staticaddr/deposit/manager.go +++ b/staticaddr/deposit/manager.go @@ -10,8 +10,8 @@ import ( "sync/atomic" "time" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" diff --git a/staticaddr/deposit/manager_height_test.go b/staticaddr/deposit/manager_height_test.go index 557738d6ac..d9a7cf95c1 100644 --- a/staticaddr/deposit/manager_height_test.go +++ b/staticaddr/deposit/manager_height_test.go @@ -3,8 +3,8 @@ package deposit import ( "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/lnwallet" "github.com/stretchr/testify/require" diff --git a/staticaddr/deposit/manager_hold_test.go b/staticaddr/deposit/manager_hold_test.go index 90b2652e89..ebb8351f9c 100644 --- a/staticaddr/deposit/manager_hold_test.go +++ b/staticaddr/deposit/manager_hold_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightningnetwork/lnd/lnwallet" diff --git a/staticaddr/deposit/manager_onchain_cost_test.go b/staticaddr/deposit/manager_onchain_cost_test.go index 702efa899e..435279bd33 100644 --- a/staticaddr/deposit/manager_onchain_cost_test.go +++ b/staticaddr/deposit/manager_onchain_cost_test.go @@ -5,10 +5,11 @@ import ( "errors" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" @@ -33,9 +34,9 @@ func (w *txGetterWalletKit) GetTransaction(ctx context.Context, // NextAddr returns a fixed taproot address. func (w *txGetterWalletKit) NextAddr(context.Context, string, - walletrpc.AddressType, bool) (btcutil.Address, error) { + walletrpc.AddressType, bool) (btcaddr.Address, error) { - return btcutil.NewAddressTaproot( + return btcaddr.NewAddressTaproot( make([]byte, 32), &chaincfg.RegressionNetParams, ) } diff --git a/staticaddr/deposit/manager_reconcile_test.go b/staticaddr/deposit/manager_reconcile_test.go index 2d6845083c..c73de51d04 100644 --- a/staticaddr/deposit/manager_reconcile_test.go +++ b/staticaddr/deposit/manager_reconcile_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/script" diff --git a/staticaddr/deposit/manager_test.go b/staticaddr/deposit/manager_test.go index a96083f9bc..b2196d5b66 100644 --- a/staticaddr/deposit/manager_test.go +++ b/staticaddr/deposit/manager_test.go @@ -7,10 +7,11 @@ import ( "testing" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightninglabs/loop/swap" @@ -159,12 +160,12 @@ func (l *listUnspentOverride) ListUnspent(ctx context.Context, } func (m *mockAddressManager) GetTaprootAddress(clientPubkey, - serverPubkey *btcec.PublicKey, expiry int64) (*btcutil.AddressTaproot, + serverPubkey *btcec.PublicKey, expiry int64) (*btcaddr.AddressTaproot, error) { args := m.Called(clientPubkey, serverPubkey, expiry) - return args.Get(0).(*btcutil.AddressTaproot), + return args.Get(0).(*btcaddr.AddressTaproot), args.Error(1) } diff --git a/staticaddr/deposit/onchain_cost.go b/staticaddr/deposit/onchain_cost.go index 0ba0b93ae5..34f0f496ca 100644 --- a/staticaddr/deposit/onchain_cost.go +++ b/staticaddr/deposit/onchain_cost.go @@ -8,9 +8,9 @@ import ( "math/big" "strings" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btcwallet/wallet" "github.com/lightninglabs/lndclient" ) diff --git a/staticaddr/deposit/onchain_cost_store_test.go b/staticaddr/deposit/onchain_cost_store_test.go index 1e69aea41b..e40e5ef35c 100644 --- a/staticaddr/deposit/onchain_cost_store_test.go +++ b/staticaddr/deposit/onchain_cost_store_test.go @@ -3,8 +3,8 @@ package deposit import ( "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/stretchr/testify/require" ) diff --git a/staticaddr/deposit/onchain_cost_test.go b/staticaddr/deposit/onchain_cost_test.go index b5b60bb49d..c09adde03e 100644 --- a/staticaddr/deposit/onchain_cost_test.go +++ b/staticaddr/deposit/onchain_cost_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/lnrpc" "github.com/stretchr/testify/require" diff --git a/staticaddr/deposit/outpoint.go b/staticaddr/deposit/outpoint.go index 64a3a70100..5311cebc28 100644 --- a/staticaddr/deposit/outpoint.go +++ b/staticaddr/deposit/outpoint.go @@ -3,7 +3,7 @@ package deposit import ( "fmt" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" ) // CheckDuplicates returns an error if the outpoint list contains duplicates. diff --git a/staticaddr/deposit/outpoint_test.go b/staticaddr/deposit/outpoint_test.go index fff86458a7..9da6ceabe3 100644 --- a/staticaddr/deposit/outpoint_test.go +++ b/staticaddr/deposit/outpoint_test.go @@ -3,8 +3,8 @@ package deposit import ( "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/stretchr/testify/require" ) diff --git a/staticaddr/deposit/sql_store.go b/staticaddr/deposit/sql_store.go index 4c75edf819..ab77669a9e 100644 --- a/staticaddr/deposit/sql_store.go +++ b/staticaddr/deposit/sql_store.go @@ -8,9 +8,9 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/loopdb/sqlc" diff --git a/staticaddr/deposit/sql_store_test.go b/staticaddr/deposit/sql_store_test.go index 5656e386a7..30fc768706 100644 --- a/staticaddr/deposit/sql_store_test.go +++ b/staticaddr/deposit/sql_store_test.go @@ -4,7 +4,7 @@ import ( "database/sql" "testing" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/jackc/pgx/v5" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/loopdb/sqlc" diff --git a/staticaddr/loopin/actions.go b/staticaddr/loopin/actions.go index 24ad8c7432..63edd52955 100644 --- a/staticaddr/loopin/actions.go +++ b/staticaddr/loopin/actions.go @@ -10,9 +10,9 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btcwallet/chain" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" diff --git a/staticaddr/loopin/actions_test.go b/staticaddr/loopin/actions_test.go index e2ced3ba32..fa7887bf72 100644 --- a/staticaddr/loopin/actions_test.go +++ b/staticaddr/loopin/actions_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" diff --git a/staticaddr/loopin/autoloop.go b/staticaddr/loopin/autoloop.go index 0bfddaa4f5..71c43d0359 100644 --- a/staticaddr/loopin/autoloop.go +++ b/staticaddr/loopin/autoloop.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightningnetwork/lnd/routing/route" diff --git a/staticaddr/loopin/autoloop_dp.go b/staticaddr/loopin/autoloop_dp.go index 86e67fd19d..640fb35570 100644 --- a/staticaddr/loopin/autoloop_dp.go +++ b/staticaddr/loopin/autoloop_dp.go @@ -5,7 +5,7 @@ import ( "math/bits" "sort" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/staticaddr/deposit" ) diff --git a/staticaddr/loopin/autoloop_dp_test.go b/staticaddr/loopin/autoloop_dp_test.go index bf197ad7dd..3838b4a88d 100644 --- a/staticaddr/loopin/autoloop_dp_test.go +++ b/staticaddr/loopin/autoloop_dp_test.go @@ -3,7 +3,7 @@ package loopin import ( "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/stretchr/testify/require" ) diff --git a/staticaddr/loopin/autoloop_test.go b/staticaddr/loopin/autoloop_test.go index 5d4a788227..fcd83b1e6d 100644 --- a/staticaddr/loopin/autoloop_test.go +++ b/staticaddr/loopin/autoloop_test.go @@ -3,7 +3,7 @@ package loopin import ( "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/script" diff --git a/staticaddr/loopin/deduce_amount_test.go b/staticaddr/loopin/deduce_amount_test.go index a78a640523..c061447c81 100644 --- a/staticaddr/loopin/deduce_amount_test.go +++ b/staticaddr/loopin/deduce_amount_test.go @@ -3,7 +3,7 @@ package loopin import ( "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lnwallet" "github.com/stretchr/testify/require" diff --git a/staticaddr/loopin/deposit_swaphash_migration_test.go b/staticaddr/loopin/deposit_swaphash_migration_test.go index 34d063440e..5d321daccd 100644 --- a/staticaddr/loopin/deposit_swaphash_migration_test.go +++ b/staticaddr/loopin/deposit_swaphash_migration_test.go @@ -6,10 +6,11 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/loopdb/sqlc" "github.com/lightninglabs/loop/staticaddr/deposit" @@ -79,7 +80,7 @@ func TestDepositSwapHashMigration(t *testing.T) { } _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) swapHash := lntypes.Hash{0x1, 0x2, 0x3, 0x4} diff --git a/staticaddr/loopin/interface.go b/staticaddr/loopin/interface.go index d54355a7b3..92c3292ab8 100644 --- a/staticaddr/loopin/interface.go +++ b/staticaddr/loopin/interface.go @@ -3,8 +3,8 @@ package loopin import ( "context" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" diff --git a/staticaddr/loopin/loopin.go b/staticaddr/loopin/loopin.go index ba2217f59f..9e004f8f4e 100644 --- a/staticaddr/loopin/loopin.go +++ b/staticaddr/loopin/loopin.go @@ -9,13 +9,14 @@ import ( "sync" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" @@ -186,7 +187,7 @@ type StaticAddressLoopIn struct { HtlcTimeoutSweepTxHash *chainhash.Hash // HtlcTimeoutSweepAddress - HtlcTimeoutSweepAddress btcutil.Address + HtlcTimeoutSweepAddress btcaddr.Address mu sync.Mutex } @@ -369,7 +370,7 @@ func (l *StaticAddressLoopIn) htlcWeight(hasChange bool) lntypes.WeightUnit { // createHtlcSweepTx creates the htlc sweep transaction for the timeout path of // the loop-in htlc. func (l *StaticAddressLoopIn) createHtlcSweepTx(ctx context.Context, - signer lndclient.SignerClient, sweepAddress btcutil.Address, + signer lndclient.SignerClient, sweepAddress btcaddr.Address, feeRate chainfee.SatPerKWeight, network *chaincfg.Params, blockHeight uint32, maxFeePercentage float64) (*wire.MsgTx, error) { diff --git a/staticaddr/loopin/loopin_test.go b/staticaddr/loopin/loopin_test.go index 8b0892e660..dd313dca8b 100644 --- a/staticaddr/loopin/loopin_test.go +++ b/staticaddr/loopin/loopin_test.go @@ -6,11 +6,12 @@ import ( "testing" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/script" @@ -102,7 +103,7 @@ func TestCreateHtlcSweepTxSweepValue(t *testing.T) { PaymentTimeoutSeconds: 3600, } - sweepAddr, err := btcutil.NewAddressTaproot( + sweepAddr, err := btcaddr.NewAddressTaproot( make([]byte, 32), network, ) require.NoError(t, err) diff --git a/staticaddr/loopin/manager.go b/staticaddr/loopin/manager.go index 73681d51ff..a3efe70209 100644 --- a/staticaddr/loopin/manager.go +++ b/staticaddr/loopin/manager.go @@ -13,12 +13,12 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/fsm" diff --git a/staticaddr/loopin/manager_test.go b/staticaddr/loopin/manager_test.go index 49866c28d2..7aae1aec47 100644 --- a/staticaddr/loopin/manager_test.go +++ b/staticaddr/loopin/manager_test.go @@ -11,10 +11,10 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/fsm" diff --git a/staticaddr/loopin/onchain_cost.go b/staticaddr/loopin/onchain_cost.go index 0e2062b932..32acf52318 100644 --- a/staticaddr/loopin/onchain_cost.go +++ b/staticaddr/loopin/onchain_cost.go @@ -3,7 +3,7 @@ package loopin import ( "slices" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" ) diff --git a/staticaddr/loopin/onchain_cost_test.go b/staticaddr/loopin/onchain_cost_test.go index d9f76c6725..6c832141fd 100644 --- a/staticaddr/loopin/onchain_cost_test.go +++ b/staticaddr/loopin/onchain_cost_test.go @@ -3,8 +3,8 @@ package loopin import ( "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/stretchr/testify/require" diff --git a/staticaddr/loopin/selected_amount_migration.go b/staticaddr/loopin/selected_amount_migration.go index 168efe9315..ca7f8f44cf 100644 --- a/staticaddr/loopin/selected_amount_migration.go +++ b/staticaddr/loopin/selected_amount_migration.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightningnetwork/lnd/lntypes" diff --git a/staticaddr/loopin/selected_amount_migration_test.go b/staticaddr/loopin/selected_amount_migration_test.go index b68269fc04..b2f7c0cebb 100644 --- a/staticaddr/loopin/selected_amount_migration_test.go +++ b/staticaddr/loopin/selected_amount_migration_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/test" @@ -74,7 +75,7 @@ func TestMigrateSelectedSwapAmount(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) p2wkhAddr := "bcrt1qq68r6ff4k4pjx39efs44gcyccf7unqnu5qtjjz" - addr, err := btcutil.DecodeAddress(p2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(p2wkhAddr, nil) require.NoError(t, err) swap := StaticAddressLoopIn{ diff --git a/staticaddr/loopin/sql_store.go b/staticaddr/loopin/sql_store.go index c0c8b6f6bb..b3af105bd8 100644 --- a/staticaddr/loopin/sql_store.go +++ b/staticaddr/loopin/sql_store.go @@ -7,10 +7,11 @@ import ( "strings" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/loopdb/sqlc" @@ -651,9 +652,9 @@ func toStaticAddressLoopIn(_ context.Context, network *chaincfg.Params, } timeoutAddressString := swap.HtlcTimeoutSweepAddress - var timeoutAddress btcutil.Address + var timeoutAddress btcaddr.Address if timeoutAddressString != "" { - timeoutAddress, err = btcutil.DecodeAddress( + timeoutAddress, err = btcaddr.DecodeAddress( timeoutAddressString, network, ) if err != nil { diff --git a/staticaddr/loopin/sql_store_test.go b/staticaddr/loopin/sql_store_test.go index 560046218e..f7d0ab3de6 100644 --- a/staticaddr/loopin/sql_store_test.go +++ b/staticaddr/loopin/sql_store_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/test" @@ -140,7 +141,7 @@ func TestGetStaticAddressLoopInSwapsByStates(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) // Create pending swap. @@ -321,7 +322,7 @@ func TestCreateLoopIn(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) // Create pending swap. @@ -528,7 +529,7 @@ func TestGetLoopInByHashOrdersDepositsBySnapshot(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) swapHash := lntypes.Hash{0x1, 0x2, 0x3, 0x4} @@ -598,7 +599,7 @@ func TestGetLoopInByHashPreservesStoredDepositOutpoints(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) swapHash := lntypes.Hash{0x1, 0x2, 0x3, 0x4} @@ -674,7 +675,7 @@ func TestSqlStoreDepositsForSwap(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) createSwap := func(seed byte, @@ -744,7 +745,7 @@ func TestSqlStoreFailedSwapOnchainCost(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) // createFailedSwap stores a swap whose deposit is on the htlc timeout @@ -848,7 +849,7 @@ func TestLatestLoopInUpdateIsLastInserted(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) loopIn := &StaticAddressLoopIn{ @@ -938,7 +939,7 @@ func TestSqlStoreTimesOutsideUTC(t *testing.T) { _, clientPubKey := test.CreateKey(1) _, serverPubKey := test.CreateKey(2) - addr, err := btcutil.DecodeAddress(P2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(P2wkhAddr, nil) require.NoError(t, err) loopIn := &StaticAddressLoopIn{ diff --git a/staticaddr/loopin/txout_checker.go b/staticaddr/loopin/txout_checker.go index da14be7c0f..90336a2363 100644 --- a/staticaddr/loopin/txout_checker.go +++ b/staticaddr/loopin/txout_checker.go @@ -3,7 +3,7 @@ package loopin import ( "context" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" ) diff --git a/staticaddr/loopin/txout_checker_test.go b/staticaddr/loopin/txout_checker_test.go index 491d9ce9f0..c4e2ef339d 100644 --- a/staticaddr/loopin/txout_checker_test.go +++ b/staticaddr/loopin/txout_checker_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/lnrpc" "github.com/stretchr/testify/require" diff --git a/staticaddr/openchannel/interface.go b/staticaddr/openchannel/interface.go index ee6ed31a1d..bdf8291ef1 100644 --- a/staticaddr/openchannel/interface.go +++ b/staticaddr/openchannel/interface.go @@ -3,8 +3,8 @@ package openchannel import ( "context" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightningnetwork/lnd/lnrpc" @@ -33,7 +33,7 @@ type DepositManager interface { type WithdrawalManager interface { CreateFinalizedWithdrawalTx(ctx context.Context, - deposits []*deposit.Deposit, withdrawalAddress btcutil.Address, + deposits []*deposit.Deposit, withdrawalAddress btcaddr.Address, feeRate chainfee.SatPerKWeight, selectedWithdrawalAmount int64, commitmentType lnrpc.CommitmentType) (*wire.MsgTx, []byte, error) diff --git a/staticaddr/openchannel/manager.go b/staticaddr/openchannel/manager.go index d06d1217f9..952e3a88b8 100644 --- a/staticaddr/openchannel/manager.go +++ b/staticaddr/openchannel/manager.go @@ -10,10 +10,11 @@ import ( "strings" "sync" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" @@ -642,7 +643,7 @@ func (m *Manager) openChannelPsbt(ctx context.Context, // Create the psbt funding transaction for the // channel. Ensure the selected deposits amount // to the psbt funding amount. - channelFundingAddress, err := btcutil.DecodeAddress( + channelFundingAddress, err := btcaddr.DecodeAddress( addr, m.cfg.ChainParams, ) if err != nil { diff --git a/staticaddr/openchannel/manager_test.go b/staticaddr/openchannel/manager_test.go index d46c8c00b6..aba19f204e 100644 --- a/staticaddr/openchannel/manager_test.go +++ b/staticaddr/openchannel/manager_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" @@ -830,7 +830,7 @@ type mockWithdrawManager struct { func (m *mockWithdrawManager) CreateFinalizedWithdrawalTx( _ context.Context, _ []*deposit.Deposit, - _ btcutil.Address, _ chainfee.SatPerKWeight, _ int64, + _ btcaddr.Address, _ chainfee.SatPerKWeight, _ int64, _ lnrpc.CommitmentType) (*wire.MsgTx, []byte, error) { return m.tx, m.psbt, m.err @@ -838,7 +838,7 @@ func (m *mockWithdrawManager) CreateFinalizedWithdrawalTx( // testFundingAddress returns a valid regtest P2WPKH address for use in tests. func testFundingAddress() string { - addr, _ := btcutil.NewAddressWitnessPubKeyHash( + addr, _ := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), &chaincfg.RegressionNetParams, ) diff --git a/staticaddr/script/script.go b/staticaddr/script/script.go index 37e78a0729..1951424723 100644 --- a/staticaddr/script/script.go +++ b/staticaddr/script/script.go @@ -3,9 +3,9 @@ package script import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightningnetwork/lnd/input" ) diff --git a/staticaddr/script/script_test.go b/staticaddr/script/script_test.go index 9b9475efbb..5a55a3ee36 100644 --- a/staticaddr/script/script_test.go +++ b/staticaddr/script/script_test.go @@ -6,8 +6,8 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/test" "github.com/lightninglabs/loop/utils" "github.com/lightningnetwork/lnd/input" diff --git a/staticaddr/staticutil/outpoints.go b/staticaddr/staticutil/outpoints.go index 69325dad4c..b1546afc22 100644 --- a/staticaddr/staticutil/outpoints.go +++ b/staticaddr/staticutil/outpoints.go @@ -3,7 +3,7 @@ package staticutil import ( "fmt" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightningnetwork/lnd/lnrpc" ) diff --git a/staticaddr/staticutil/utils.go b/staticaddr/staticutil/utils.go index a250933392..1505d6b66c 100644 --- a/staticaddr/staticutil/utils.go +++ b/staticaddr/staticutil/utils.go @@ -6,10 +6,10 @@ import ( "fmt" "sort" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/script" diff --git a/staticaddr/staticutil/utils_test.go b/staticaddr/staticutil/utils_test.go index ae68b4895d..3e20455a76 100644 --- a/staticaddr/staticutil/utils_test.go +++ b/staticaddr/staticutil/utils_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightninglabs/loop/swapserverrpc" diff --git a/staticaddr/withdraw/funding_values_test.go b/staticaddr/withdraw/funding_values_test.go index 67c16a1a46..12fdbddcef 100644 --- a/staticaddr/withdraw/funding_values_test.go +++ b/staticaddr/withdraw/funding_values_test.go @@ -3,8 +3,9 @@ package withdraw import ( "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightningnetwork/lnd/funding" "github.com/lightningnetwork/lnd/input" @@ -208,12 +209,12 @@ func TestCalculateWithdrawalTxValuesCommitmentTypeParity(t *testing.T) { {Value: 300_000}, } - p2wshAddr, err := btcutil.NewAddressWitnessScriptHash( + p2wshAddr, err := btcaddr.NewAddressWitnessScriptHash( make([]byte, 32), &chaincfg.RegressionNetParams, ) require.NoError(t, err) - taprootAddr, err := btcutil.NewAddressTaproot( + taprootAddr, err := btcaddr.NewAddressTaproot( make([]byte, 32), &chaincfg.RegressionNetParams, ) require.NoError(t, err) @@ -221,7 +222,7 @@ func TestCalculateWithdrawalTxValuesCommitmentTypeParity(t *testing.T) { type testCase struct { name string commitmentType lnrpc.CommitmentType - addr btcutil.Address + addr btcaddr.Address } cases := []testCase{ diff --git a/staticaddr/withdraw/interface.go b/staticaddr/withdraw/interface.go index 77e8b644c4..a5df395df0 100644 --- a/staticaddr/withdraw/interface.go +++ b/staticaddr/withdraw/interface.go @@ -3,7 +3,7 @@ package withdraw import ( "context" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/script" diff --git a/staticaddr/withdraw/manager.go b/staticaddr/withdraw/manager.go index fb00189457..23ba46c96d 100644 --- a/staticaddr/withdraw/manager.go +++ b/staticaddr/withdraw/manager.go @@ -9,14 +9,15 @@ import ( "sync" "sync/atomic" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btcwallet/chain" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/staticaddr/deposit" @@ -541,7 +542,7 @@ func (m *Manager) WithdrawDeposits(ctx context.Context, // replaces, because the monitor of the withdrawal only completes it for a // spend that pays this address. func (m *Manager) withdrawalAddress(ctx context.Context, destAddr string, - prevWithdrawalTx *wire.MsgTx) (btcutil.Address, error) { + prevWithdrawalTx *wire.MsgTx) (btcaddr.Address, error) { var prevPkScript []byte if prevWithdrawalTx != nil { @@ -555,7 +556,7 @@ func (m *Manager) withdrawalAddress(ctx context.Context, destAddr string, switch { case destAddr != "": - address, err := btcutil.DecodeAddress( + address, err := btcaddr.DecodeAddress( destAddr, m.cfg.ChainParams, ) if err != nil { @@ -607,7 +608,7 @@ func (m *Manager) withdrawalAddress(ctx context.Context, destAddr string, // transaction that can be broadcast to the network. It returns the // signed *wire.MsgTx representation and the unsigned psbt. func (m *Manager) CreateFinalizedWithdrawalTx(ctx context.Context, - deposits []*deposit.Deposit, withdrawalAddress btcutil.Address, + deposits []*deposit.Deposit, withdrawalAddress btcaddr.Address, feeRate chainfee.SatPerKWeight, selectedWithdrawalAmount int64, commitmentType lnrpc.CommitmentType) (*wire.MsgTx, []byte, error) { @@ -965,7 +966,7 @@ func (m *Manager) signMusig2Tx(ctx context.Context, func (m *Manager) createWithdrawalTx(ctx context.Context, outpoints []wire.OutPoint, deposits []*deposit.Deposit, prevOuts map[wire.OutPoint]*wire.TxOut, - selectedWithdrawalAmount btcutil.Amount, withdrawAddr btcutil.Address, + selectedWithdrawalAmount btcutil.Amount, withdrawAddr btcaddr.Address, feeRate chainfee.SatPerKWeight, commitmentType lnrpc.CommitmentType) (*wire.MsgTx, []byte, error) { @@ -1022,7 +1023,7 @@ func (m *Manager) createWithdrawalTx(ctx context.Context, return nil, nil, fmt.Errorf("withdrawal failed") } - changeAddress, err := btcutil.NewAddressTaproot( + changeAddress, err := btcaddr.NewAddressTaproot( schnorr.SerializePubKey(staticAddress.TaprootKey), m.cfg.ChainParams, ) @@ -1074,7 +1075,7 @@ func (m *Manager) createWithdrawalTx(ctx context.Context, // error if any. func CalculateWithdrawalTxValues(deposits []*deposit.Deposit, selectedAmount btcutil.Amount, feeRate chainfee.SatPerKWeight, - withdrawalAddress btcutil.Address, + withdrawalAddress btcaddr.Address, commitmentType lnrpc.CommitmentType) (btcutil.Amount, btcutil.Amount, error) { @@ -1182,7 +1183,7 @@ func CalculateWithdrawalTxValues(deposits []*deposit.Deposit, } // WithdrawalTxWeight returns the weight for the withdrawal transaction. -func WithdrawalTxWeight(numInputs int, sweepAddress btcutil.Address, +func WithdrawalTxWeight(numInputs int, sweepAddress btcaddr.Address, commitmentType lnrpc.CommitmentType, hasChange bool) (lntypes.WeightUnit, error) { @@ -1205,13 +1206,13 @@ func WithdrawalTxWeight(numInputs int, sweepAddress btcutil.Address, } else { // Get the weight of the sweep output. switch sweepAddress.(type) { - case *btcutil.AddressWitnessPubKeyHash: + case *btcaddr.AddressWitnessPubKeyHash: weightEstimator.AddP2WKHOutput() - case *btcutil.AddressWitnessScriptHash: + case *btcaddr.AddressWitnessScriptHash: weightEstimator.AddP2WSHOutput() - case *btcutil.AddressTaproot: + case *btcaddr.AddressTaproot: weightEstimator.AddP2TROutput() default: diff --git a/staticaddr/withdraw/manager_hold_test.go b/staticaddr/withdraw/manager_hold_test.go index 79f4065d95..951686b434 100644 --- a/staticaddr/withdraw/manager_hold_test.go +++ b/staticaddr/withdraw/manager_hold_test.go @@ -7,12 +7,12 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/btcsuite/btcwallet/chain" "github.com/lightninglabs/lndclient" @@ -247,7 +247,7 @@ func TestWithdrawalHoldPreservesOrdering(t *testing.T) { require.NoError(t, err) pkScript, err := addr.StaticAddressScript() require.NoError(t, err) - dest, err := btcutil.NewAddressWitnessPubKeyHash( + dest, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), &chaincfg.RegressionNetParams, ) require.NoError(t, err) diff --git a/staticaddr/withdraw/manager_test.go b/staticaddr/withdraw/manager_test.go index 7e17d74f85..622f88145b 100644 --- a/staticaddr/withdraw/manager_test.go +++ b/staticaddr/withdraw/manager_test.go @@ -5,12 +5,13 @@ import ( "context" "testing" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightninglabs/loop/test" @@ -485,7 +486,7 @@ func TestCalculateWithdrawalTxValues(t *testing.T) { t.Parallel() // Create a taproot address for withdrawal. - taprootAddr, err := btcutil.NewAddressTaproot( + taprootAddr, err := btcaddr.NewAddressTaproot( make([]byte, 32), &chaincfg.RegressionNetParams, ) require.NoError(t, err) @@ -511,7 +512,7 @@ func TestCalculateWithdrawalTxValues(t *testing.T) { deposits []*deposit.Deposit localAmount btcutil.Amount feeRate chainfee.SatPerKWeight - withdrawAddr btcutil.Address + withdrawAddr btcaddr.Address commitmentType lnrpc.CommitmentType expectedErr string expectDustFee bool // change is dust, given to miners @@ -722,8 +723,8 @@ func TestWithdrawalAddress(t *testing.T) { }, 100) require.NoError(t, err) - newAddress := func(key byte) btcutil.Address { - address, err := btcutil.NewAddressTaproot( + newAddress := func(key byte) btcaddr.Address { + address, err := btcaddr.NewAddressTaproot( bytes.Repeat([]byte{key}, 32), mockLnd.ChainParams, ) require.NoError(t, err) @@ -755,7 +756,7 @@ func TestWithdrawalAddress(t *testing.T) { require.Equal(t, walletAddress.String(), address.String()) // A withdrawal can't pay to an address of another network. - mainnetAddress, err := btcutil.NewAddressTaproot( + mainnetAddress, err := btcaddr.NewAddressTaproot( bytes.Repeat([]byte{3}, 32), &chaincfg.MainNetParams, ) require.NoError(t, err) diff --git a/staticaddr/withdraw/sql_store.go b/staticaddr/withdraw/sql_store.go index df6f27f69a..3f7bd17683 100644 --- a/staticaddr/withdraw/sql_store.go +++ b/staticaddr/withdraw/sql_store.go @@ -5,9 +5,9 @@ import ( "context" "database/sql" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/loopdb/sqlc" "github.com/lightninglabs/loop/staticaddr/deposit" diff --git a/staticaddr/withdraw/sql_store_test.go b/staticaddr/withdraw/sql_store_test.go index 5897f20efc..d5e0566985 100644 --- a/staticaddr/withdraw/sql_store_test.go +++ b/staticaddr/withdraw/sql_store_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/stretchr/testify/require" diff --git a/staticaddr/withdraw/withdrawal.go b/staticaddr/withdraw/withdrawal.go index 9c32ec7369..b50519025f 100644 --- a/staticaddr/withdraw/withdrawal.go +++ b/staticaddr/withdraw/withdrawal.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/loop/staticaddr/deposit" ) diff --git a/swap/fees.go b/swap/fees.go index b74b9272cb..f53923011e 100644 --- a/swap/fees.go +++ b/swap/fees.go @@ -3,8 +3,8 @@ package swap import ( "errors" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/routing/route" "github.com/lightningnetwork/lnd/zpay32" diff --git a/swap/htlc.go b/swap/htlc.go index 2e87d8aeee..7a1fe6dc51 100644 --- a/swap/htlc.go +++ b/swap/htlc.go @@ -5,14 +5,14 @@ import ( "errors" "fmt" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lntypes" @@ -58,7 +58,7 @@ type HtlcScript interface { // lockingConditions return the address, pkScript and sigScript (if // required) for a htlc script. - lockingConditions(HtlcOutputType, *chaincfg.Params) (btcutil.Address, + lockingConditions(HtlcOutputType, *chaincfg.Params) (btcaddr.Address, []byte, []byte, error) // MaxSuccessWitnessSize returns the maximum witness size for the @@ -95,7 +95,7 @@ type Htlc struct { Hash lntypes.Hash OutputType HtlcOutputType ChainParams *chaincfg.Params - Address btcutil.Address + Address btcaddr.Address SigScript []byte } @@ -223,7 +223,7 @@ func NewHtlcV3(muSig2Version input.MuSig2Version, cltvExpiry int32, // segwitV0LockingConditions provides the address, pkScript and sigScript (if // required) for the segwit v0 script and output type provided. func segwitV0LockingConditions(outputType HtlcOutputType, - chainParams *chaincfg.Params, script []byte) (btcutil.Address, + chainParams *chaincfg.Params, script []byte) (btcaddr.Address, []byte, []byte, error) { switch outputType { @@ -233,7 +233,7 @@ func segwitV0LockingConditions(outputType HtlcOutputType, return nil, nil, nil, err } - address, err := btcutil.NewAddressWitnessScriptHash( + address, err := btcaddr.NewAddressWitnessScriptHash( pkScript[2:], chainParams, ) @@ -485,7 +485,7 @@ func (h *HtlcScriptV2) SigHash() txscript.SigHashType { // lockingConditions return the address, pkScript and sigScript (if // required) for a htlc script. func (h *HtlcScriptV2) lockingConditions(htlcOutputType HtlcOutputType, - params *chaincfg.Params) (btcutil.Address, []byte, []byte, error) { + params *chaincfg.Params) (btcaddr.Address, []byte, []byte, error) { return segwitV0LockingConditions(htlcOutputType, params, h.script) } @@ -793,7 +793,7 @@ func (h *HtlcScriptV3) SigHash() txscript.SigHashType { // lockingConditions return the address, pkScript and sigScript (if required) // for a htlc script. func (h *HtlcScriptV3) lockingConditions(outputType HtlcOutputType, - chainParams *chaincfg.Params) (btcutil.Address, []byte, []byte, error) { + chainParams *chaincfg.Params) (btcaddr.Address, []byte, []byte, error) { // HtlcV3 can only have taproot output type, because we utilize // tapscript claim paths. @@ -803,7 +803,7 @@ func (h *HtlcScriptV3) lockingConditions(outputType HtlcOutputType, } // Generate a tapscript address from our tree. - address, err := btcutil.NewAddressTaproot( + address, err := btcaddr.NewAddressTaproot( schnorr.SerializePubKey(h.TaprootKey), chainParams, ) if err != nil { diff --git a/swap/htlc_test.go b/swap/htlc_test.go index 87407f6153..6f20503f1d 100644 --- a/swap/htlc_test.go +++ b/swap/htlc_test.go @@ -6,12 +6,13 @@ import ( "fmt" "testing" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/input" @@ -371,7 +372,7 @@ func testHtlcV3(t *testing.T, muSig2Version input.MuSig2Version) { ) require.NoError(t, err) - trAddress, ok := htlc.Address.(*btcutil.AddressTaproot) + trAddress, ok := htlc.Address.(*btcaddr.AddressTaproot) require.True(t, ok) p2trPkScript, err := txscript.PayToAddrScript(trAddress) @@ -555,7 +556,7 @@ func testHtlcV3(t *testing.T, muSig2Version input.MuSig2Version) { ) require.NoError(t, err) - trAddress, ok := htlc.Address.(*btcutil.AddressTaproot) + trAddress, ok := htlc.Address.(*btcaddr.AddressTaproot) require.True(t, ok) p2trPkScript, err := txscript.PayToAddrScript( diff --git a/swap/tx.go b/swap/tx.go index 289cb1b625..f0614db613 100644 --- a/swap/tx.go +++ b/swap/tx.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" ) // GetScriptOutput locates the given script in the outputs of a transaction and diff --git a/swap_server_client.go b/swap_server_client.go index 256fdcc22a..d9ba32aac0 100644 --- a/swap_server_client.go +++ b/swap_server_client.go @@ -13,8 +13,8 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/aperture/l402" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" diff --git a/sweep/sweeper.go b/sweep/sweeper.go index edcce02568..83b4700e2c 100644 --- a/sweep/sweeper.go +++ b/sweep/sweeper.go @@ -5,11 +5,12 @@ import ( "context" "fmt" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/input" @@ -29,7 +30,7 @@ type Sweeper struct { func (s *Sweeper) CreateUnsignedTaprootKeySpendSweepTx( ctx context.Context, lockTime uint32, htlc *swap.Htlc, htlcOutpoint wire.OutPoint, - amount, fee btcutil.Amount, destAddr btcutil.Address) ( + amount, fee btcutil.Amount, destAddr btcaddr.Address) ( *wire.MsgTx, []byte, []byte, error) { if htlc.Version != swap.HtlcV3 { @@ -96,7 +97,7 @@ func (s *Sweeper) CreateSweepTx( keyBytes [33]byte, witnessScript []byte, witnessFunc func(sig []byte) (wire.TxWitness, error), amount, fee btcutil.Amount, - destAddr btcutil.Address) (*wire.MsgTx, error) { + destAddr btcaddr.Address) (*wire.MsgTx, error) { // Compose tx. sweepTx := wire.NewMsgTx(2) @@ -180,7 +181,7 @@ func (s *Sweeper) CreateSweepTx( // estimator. It also takes a label used for logging. func (s *Sweeper) GetSweepFee(ctx context.Context, addInputEstimate func(*input.TxWeightEstimator) error, - destAddr btcutil.Address, sweepConfTarget int32, label string) ( + destAddr btcaddr.Address, sweepConfTarget int32, label string) ( btcutil.Amount, error) { // Use GetSweepFeeDetails to get the fee and other unused data. @@ -197,7 +198,7 @@ func (s *Sweeper) GetSweepFee(ctx context.Context, // rate and transaction weight. func (s *Sweeper) GetSweepFeeDetails(ctx context.Context, addInputEstimate func(*input.TxWeightEstimator) error, - destAddr btcutil.Address, sweepConfTarget int32, label string) ( + destAddr btcaddr.Address, sweepConfTarget int32, label string) ( btcutil.Amount, chainfee.SatPerKWeight, lntypes.WeightUnit, error) { // Get fee estimate from lnd. @@ -237,22 +238,22 @@ func (s *Sweeper) GetSweepFeeDetails(ctx context.Context, // AddOutputEstimate adds output to weight estimator. func AddOutputEstimate(weightEstimate *input.TxWeightEstimator, - destAddr btcutil.Address) error { + destAddr btcaddr.Address) error { switch destAddr.(type) { - case *btcutil.AddressWitnessScriptHash: + case *btcaddr.AddressWitnessScriptHash: weightEstimate.AddP2WSHOutput() - case *btcutil.AddressWitnessPubKeyHash: + case *btcaddr.AddressWitnessPubKeyHash: weightEstimate.AddP2WKHOutput() - case *btcutil.AddressScriptHash: + case *btcaddr.AddressScriptHash: weightEstimate.AddP2SHOutput() - case *btcutil.AddressPubKeyHash: + case *btcaddr.AddressPubKeyHash: weightEstimate.AddP2PKHOutput() - case *btcutil.AddressTaproot: + case *btcaddr.AddressTaproot: weightEstimate.AddP2TROutput() default: diff --git a/sweepbatcher/batch_selection_mode_test.go b/sweepbatcher/batch_selection_mode_test.go index 485f89c4ce..42062f6ebe 100644 --- a/sweepbatcher/batch_selection_mode_test.go +++ b/sweepbatcher/batch_selection_mode_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lntypes" diff --git a/sweepbatcher/construction_error_test.go b/sweepbatcher/construction_error_test.go index 1dd59799df..a1e6ad42ad 100644 --- a/sweepbatcher/construction_error_test.go +++ b/sweepbatcher/construction_error_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" diff --git a/sweepbatcher/greedy_batch_selection.go b/sweepbatcher/greedy_batch_selection.go index 94d6df9161..273456de82 100644 --- a/sweepbatcher/greedy_batch_selection.go +++ b/sweepbatcher/greedy_batch_selection.go @@ -6,9 +6,10 @@ import ( "fmt" "sort" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" sweeppkg "github.com/lightninglabs/loop/sweep" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lntypes" @@ -194,7 +195,7 @@ func estimateBatchWeight(batch *batch) (feeDetails, error) { } // Find sweep destination address (type) for weight estimations. - var destAddr btcutil.Address + var destAddr btcaddr.Address if theSweep.isExternalAddr { if theSweep.destAddr == nil { return feeDetails{}, errors.New("isExternalAddr=true," + @@ -203,7 +204,7 @@ func estimateBatchWeight(batch *batch) (feeDetails, error) { destAddr = theSweep.destAddr } else { // Assume it is taproot by default. - destAddr = (*btcutil.AddressTaproot)(nil) + destAddr = (*btcaddr.AddressTaproot)(nil) } // Make a weight estimator. diff --git a/sweepbatcher/greedy_batch_selection_test.go b/sweepbatcher/greedy_batch_selection_test.go index 97c087f185..cb9571e96f 100644 --- a/sweepbatcher/greedy_batch_selection_test.go +++ b/sweepbatcher/greedy_batch_selection_test.go @@ -3,11 +3,11 @@ package sweepbatcher import ( "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lntypes" @@ -77,8 +77,8 @@ func testHtlcV3SuccessEstimator(estimator *input.TxWeightEstimator) error { func TestEstimateSweepFeeIncrement(t *testing.T) { // Useful variables reused in test cases. se3 := testHtlcV3SuccessEstimator - trAddr := (*btcutil.AddressTaproot)(nil) - p2pkhAddr := (*btcutil.AddressPubKeyHash)(nil) + trAddr := (*btcaddr.AddressTaproot)(nil) + p2pkhAddr := (*btcaddr.AddressPubKeyHash)(nil) outpoint1 := wire.OutPoint{ Hash: chainhash.Hash{1, 1, 1}, @@ -269,11 +269,11 @@ func TestEstimateBatchWeight(t *testing.T) { } se2 := testHtlcV2SuccessEstimator se3 := testHtlcV3SuccessEstimator - trAddr := (*btcutil.AddressTaproot)(nil) + trAddr := (*btcaddr.AddressTaproot)(nil) changeAddr := "bc1pdx9ggvtjjcpaqfqk375qhdmzx9xu8dcu7w94lqfcxhh0rj" + "lwyyeq5ryn6r" - changeAddress, err := btcutil.DecodeAddress(changeAddr, nil) + changeAddress, err := btcaddr.DecodeAddress(changeAddr, nil) require.NoError(t, err) changePkscript, err := txscript.PayToAddrScript(changeAddress) require.NoError(t, err) diff --git a/sweepbatcher/presigned.go b/sweepbatcher/presigned.go index e4b736f9b8..80276e2687 100644 --- a/sweepbatcher/presigned.go +++ b/sweepbatcher/presigned.go @@ -6,11 +6,12 @@ import ( "errors" "fmt" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/lnwallet/chainfee" "golang.org/x/sync/errgroup" @@ -315,7 +316,7 @@ type presigner interface { // gets LockTime equal to timeout minus 50 blocks, as a precautionary measure. // A feerate is considered high if it is at least 100 sat/vbyte AND is at least // 10x of the current next block feerate. -func presign(ctx context.Context, presigner presigner, destAddr btcutil.Address, +func presign(ctx context.Context, presigner presigner, destAddr btcaddr.Address, primarySweepID wire.OutPoint, sweeps []sweep, nextBlockFeeRate chainfee.SatPerKWeight, minRelayFeeRate chainfee.SatPerKWeight) error { @@ -572,7 +573,7 @@ type destPkScripter interface { // primary outpoint. The function must be used in presigned mode only. func getPresignedSweepsDestAddr(ctx context.Context, helper destPkScripter, primarySweepID wire.OutPoint, - chainParams *chaincfg.Params) (btcutil.Address, error) { + chainParams *chaincfg.Params) (btcaddr.Address, error) { // Load pkScript from the presigned helper. pkScriptBytes, err := helper.DestPkScript(ctx, primarySweepID) @@ -581,7 +582,7 @@ func getPresignedSweepsDestAddr(ctx context.Context, helper destPkScripter, "for primarySweepID %v: %w", primarySweepID, err) } - // Convert pkScript to btcutil.Address. + // Convert pkScript to btcaddr.Address. pkScript, err := txscript.ParsePkScript(pkScriptBytes) if err != nil { return nil, fmt.Errorf("txscript.ParsePkScript failed for "+ diff --git a/sweepbatcher/presigned_test.go b/sweepbatcher/presigned_test.go index bd37d83ad6..8c686d8388 100644 --- a/sweepbatcher/presigned_test.go +++ b/sweepbatcher/presigned_test.go @@ -6,11 +6,12 @@ import ( "sync" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/lnwallet/chainfee" "github.com/stretchr/testify/require" @@ -685,7 +686,7 @@ func TestPresign(t *testing.T) { presigner presigner primarySweepID wire.OutPoint sweeps []sweep - destAddr btcutil.Address + destAddr btcaddr.Address nextBlockFeeRate chainfee.SatPerKWeight minRelayFeeRate chainfee.SatPerKWeight wantErr string diff --git a/sweepbatcher/retry_recovery_test.go b/sweepbatcher/retry_recovery_test.go index 107ddd61d9..3401644e10 100644 --- a/sweepbatcher/retry_recovery_test.go +++ b/sweepbatcher/retry_recovery_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/test" diff --git a/sweepbatcher/store.go b/sweepbatcher/store.go index 4cf899c858..0cca98e750 100644 --- a/sweepbatcher/store.go +++ b/sweepbatcher/store.go @@ -5,10 +5,10 @@ import ( "database/sql" "fmt" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/loopdb/sqlc" "github.com/lightningnetwork/lnd/lntypes" diff --git a/sweepbatcher/store_mock.go b/sweepbatcher/store_mock.go index fac6ffec6b..75ddcaf57b 100644 --- a/sweepbatcher/store_mock.go +++ b/sweepbatcher/store_mock.go @@ -7,8 +7,8 @@ import ( "sort" "sync" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" ) // StoreMock implements a mock client swap store. diff --git a/sweepbatcher/sweep_batch.go b/sweepbatcher/sweep_batch.go index 238ea64734..e360c04722 100644 --- a/sweepbatcher/sweep_batch.go +++ b/sweepbatcher/sweep_batch.go @@ -13,15 +13,16 @@ import ( "sync/atomic" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" @@ -110,7 +111,7 @@ type sweep struct { isExternalAddr bool // destAddr is the destination address of the sweep. - destAddr btcutil.Address + destAddr btcaddr.Address // notifier is a collection of channels used to communicate the status // of the sweep back to the swap that requested it. @@ -276,7 +277,7 @@ type batch struct { batchPkScript []byte // batchAddress is the address of the batch transaction's output. - batchAddress btcutil.Address + batchAddress btcaddr.Address // rbfCache stores data related to the RBF fee bumping mechanism. rbfCache rbfCache @@ -1368,7 +1369,7 @@ func (b *batch) createPsbt(unsignedTx *wire.MsgTx, sweeps []sweep) ([]byte, // the first output of the transaction, followed by an optional list of change // outputs. If the main output value is below dust limit this function will // return an error. -func constructUnsignedTx(sweeps []sweep, address btcutil.Address, +func constructUnsignedTx(sweeps []sweep, address btcaddr.Address, currentHeight int32, feeRate chainfee.SatPerKWeight, minRelayFeeRate chainfee.SatPerKWeight) (*wire.MsgTx, lntypes.WeightUnit, btcutil.Amount, btcutil.Amount, error) { @@ -1600,7 +1601,7 @@ func (b *batch) publishMixedBatch(ctx context.Context) (btcutil.Amount, error, } // Find destination address. - var address btcutil.Address + var address btcaddr.Address if addrOverride { // Sanity check, there should be exactly 1 sweep in this batch. if len(sweeps) != 1 { @@ -2569,7 +2570,7 @@ func (b *batch) dbBatch() *dbBatch { // has already generated an address then the same one will be returned. // The method must not be used in presigned mode. Use getPresignedSweepsDestAddr // instead. -func (b *batch) getBatchDestAddr(ctx context.Context) (btcutil.Address, error) { +func (b *batch) getBatchDestAddr(ctx context.Context) (btcaddr.Address, error) { // Determine if we should use presigned mode for the batch. presigned, err := b.isPresigned() if err != nil { @@ -2583,7 +2584,7 @@ func (b *batch) getBatchDestAddr(ctx context.Context) (btcutil.Address, error) { "mode") } - var address btcutil.Address + var address btcaddr.Address // If a batch address is set, use that. Otherwise, generate a // new address. diff --git a/sweepbatcher/sweep_batch_test.go b/sweepbatcher/sweep_batch_test.go index 34cdb87e66..02f3d3477f 100644 --- a/sweepbatcher/sweep_batch_test.go +++ b/sweepbatcher/sweep_batch_test.go @@ -4,11 +4,12 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/utils" "github.com/lightningnetwork/lnd/input" @@ -39,14 +40,14 @@ func TestConstructUnsignedTx(t *testing.T) { p2trAddr := "bcrt1pa38tp2hgjevqv3jcsxeu7v72n0s5a3ck8q2u8r" + "k6mm67dv7uk26qq8je7e" - p2trAddress, err := btcutil.DecodeAddress(p2trAddr, nil) + p2trAddress, err := btcaddr.DecodeAddress(p2trAddr, nil) require.NoError(t, err) p2trPkScript, err := txscript.PayToAddrScript(p2trAddress) require.NoError(t, err) change1Addr := "bc1pdx9ggvtjjcpaqfqk375qhdmzx9xu8dcu7w94lqfcxhh0rj" + "lwyyeq5ryn6r" - change1Address, err := btcutil.DecodeAddress(change1Addr, nil) + change1Address, err := btcaddr.DecodeAddress(change1Addr, nil) require.NoError(t, err) change1Pkscript, err := txscript.PayToAddrScript(change1Address) require.NoError(t, err) @@ -57,7 +58,7 @@ func TestConstructUnsignedTx(t *testing.T) { change1PrimeAddr := "bc1pdx9ggvtjjcpaqfqk375qhdmzx9xu8dcu7w94lqfcxhh0rj" + "lwyyeq5ryn6r" - change1PrimeAddress, err := btcutil.DecodeAddress(change1PrimeAddr, nil) + change1PrimeAddress, err := btcaddr.DecodeAddress(change1PrimeAddr, nil) require.NoError(t, err) change1PrimePkscript, err := txscript.PayToAddrScript(change1PrimeAddress) require.NoError(t, err) @@ -68,7 +69,7 @@ func TestConstructUnsignedTx(t *testing.T) { change2Addr := "bc1psw0nrrulq4pgyuyk09a3wsutygltys4gxjjw3zl2uz4ep8pa" + "r2vsvntfe0" - change2Address, err := btcutil.DecodeAddress(change2Addr, nil) + change2Address, err := btcaddr.DecodeAddress(change2Addr, nil) require.NoError(t, err) change2Pkscript, err := txscript.PayToAddrScript(change2Address) require.NoError(t, err) @@ -83,7 +84,7 @@ func TestConstructUnsignedTx(t *testing.T) { 0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24, 0x89, 0x5d, 0xca, 0x52, 0xc6, 0xb4, } - p2pkAddress, err := btcutil.NewAddressPubKey( + p2pkAddress, err := btcaddr.NewAddressPubKey( serializedPubKey, &chaincfg.RegressionNetParams, ) require.NoError(t, err) @@ -112,7 +113,7 @@ func TestConstructUnsignedTx(t *testing.T) { cases := []struct { name string sweeps []sweep - address btcutil.Address + address btcaddr.Address currentHeight int32 feeRate chainfee.SatPerKWeight minRelayFeeRate chainfee.SatPerKWeight diff --git a/sweepbatcher/sweep_batcher.go b/sweepbatcher/sweep_batcher.go index 0404f7fb88..f94c3422e2 100644 --- a/sweepbatcher/sweep_batcher.go +++ b/sweepbatcher/sweep_batcher.go @@ -8,12 +8,13 @@ import ( "sync" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/btcsuite/btcwallet/chain" "github.com/lightninglabs/lndclient" @@ -119,7 +120,7 @@ type SweepInfo struct { IsExternalAddr bool // DestAddr is the destination address of the sweep. - DestAddr btcutil.Address + DestAddr btcaddr.Address // NonCoopHint is set, if the sweep can not be spent cooperatively and // has to be spent using preimage. This is only used in fee estimations @@ -760,7 +761,7 @@ func (b *Batcher) Run(ctx context.Context) error { // primarySweepID if the group starts a new batch. The change output may be nil // to indicate that the sweep group does not create a change output. func (b *Batcher) PresignSweepsGroup(ctx context.Context, inputs []Input, - sweepTimeout int32, destAddress btcutil.Address, + sweepTimeout int32, destAddress btcaddr.Address, changeOutput *wire.TxOut) error { if len(inputs) == 0 { diff --git a/sweepbatcher/sweep_batcher_presigned_test.go b/sweepbatcher/sweep_batcher_presigned_test.go index 606c5a8876..36fa50f81a 100644 --- a/sweepbatcher/sweep_batcher_presigned_test.go +++ b/sweepbatcher/sweep_batcher_presigned_test.go @@ -9,10 +9,10 @@ import ( "testing" "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/txscript/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" diff --git a/sweepbatcher/sweep_batcher_test.go b/sweepbatcher/sweep_batcher_test.go index 32fb63e81d..1be7a14bf8 100644 --- a/sweepbatcher/sweep_batcher_test.go +++ b/sweepbatcher/sweep_batcher_test.go @@ -13,13 +13,14 @@ import ( "testing" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btclog/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" @@ -52,9 +53,9 @@ const ( // destAddr is a dummy p2wkh address to use as the destination address for // the swaps. -var destAddr = func() btcutil.Address { +var destAddr = func() btcaddr.Address { p2wkhAddr := "bcrt1qq68r6ff4k4pjx39efs44gcyccf7unqnu5qtjjz" - addr, err := btcutil.DecodeAddress(p2wkhAddr, nil) + addr, err := btcaddr.DecodeAddress(p2wkhAddr, nil) if err != nil { panic(err) } diff --git a/test/blinded_invoice.go b/test/blinded_invoice.go index 9fc250223c..b34acf067e 100644 --- a/test/blinded_invoice.go +++ b/test/blinded_invoice.go @@ -4,9 +4,9 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2/ecdsa" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" sphinx "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/lnwire" diff --git a/test/chainnotifier_mock.go b/test/chainnotifier_mock.go index 1da5f87d4a..b64be47b9f 100644 --- a/test/chainnotifier_mock.go +++ b/test/chainnotifier_mock.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/lnrpc/chainrpc" diff --git a/test/context.go b/test/context.go index a81e7557b4..f44ee9c066 100644 --- a/test/context.go +++ b/test/context.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/lnrpc" diff --git a/test/lightning_client_mock.go b/test/lightning_client_mock.go index 350fb59a0f..f94e31e6ef 100644 --- a/test/lightning_client_mock.go +++ b/test/lightning_client_mock.go @@ -10,8 +10,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/ecdsa" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" invpkg "github.com/lightningnetwork/lnd/invoices" "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc" diff --git a/test/lnd_services_mock.go b/test/lnd_services_mock.go index a41a3dbc87..c8257f39e7 100644 --- a/test/lnd_services_mock.go +++ b/test/lnd_services_mock.go @@ -5,8 +5,8 @@ import ( "errors" "sync" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/lntypes" diff --git a/test/signer_mock.go b/test/signer_mock.go index 23ed69533b..efd9c78b5c 100644 --- a/test/signer_mock.go +++ b/test/signer_mock.go @@ -9,7 +9,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/keychain" diff --git a/test/testutils.go b/test/testutils.go index 8176e12dc0..0f3d43f903 100644 --- a/test/testutils.go +++ b/test/testutils.go @@ -7,9 +7,10 @@ import ( "testing" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2/ecdsa" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/lnwire" "github.com/lightningnetwork/lnd/zpay32" @@ -28,8 +29,8 @@ var ( ) // GetDestAddr deterministically generates a sweep address for testing. -func GetDestAddr(t *testing.T, nr byte) btcutil.Address { - destAddr, err := btcutil.NewAddressScriptHash( +func GetDestAddr(t *testing.T, nr byte) btcaddr.Address { + destAddr, err := btcaddr.NewAddressScriptHash( []byte{nr}, &chaincfg.MainNetParams, ) require.NoError(t, err) diff --git a/test/walletkit_mock.go b/test/walletkit_mock.go index 52b76dba20..563efd91f4 100644 --- a/test/walletkit_mock.go +++ b/test/walletkit_mock.go @@ -8,12 +8,12 @@ import ( "sync" "time" + btcaddr "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/psbt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/psbt/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/btcsuite/btcwallet/waddrmgr" "github.com/btcsuite/btcwallet/wallet" "github.com/btcsuite/btcwallet/wtxmgr" @@ -105,9 +105,9 @@ func (m *mockWalletKit) DeriveKey(ctx context.Context, in *keychain.KeyLocator) } func (m *mockWalletKit) NextAddr(context.Context, string, walletrpc.AddressType, - bool) (btcutil.Address, error) { + bool) (btcaddr.Address, error) { - addr, err := btcutil.NewAddressWitnessPubKeyHash( + addr, err := btcaddr.NewAddressWitnessPubKeyHash( make([]byte, 20), &chaincfg.TestNet3Params, ) if err != nil { @@ -337,7 +337,7 @@ func (m *mockWalletKit) ImportPublicKey(ctx context.Context, // ImportTaprootScript imports a user-provided taproot script into the // wallet. The imported script will act as a pay-to-taproot address. func (m *mockWalletKit) ImportTaprootScript(ctx context.Context, - tapscript *waddrmgr.Tapscript) (btcutil.Address, error) { + tapscript *waddrmgr.Tapscript) (btcaddr.Address, error) { return nil, nil } diff --git a/testcontext_test.go b/testcontext_test.go index 04fb6ce94e..3320a8ce48 100644 --- a/testcontext_test.go +++ b/testcontext_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" diff --git a/utils.go b/utils.go index 69d79fda9b..7e3a0c0774 100644 --- a/utils.go +++ b/utils.go @@ -8,9 +8,9 @@ import ( "strings" "github.com/btcsuite/btcd/btcec/v2" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/btcutil/v2" + "github.com/btcsuite/btcd/chainhash/v2" + "github.com/btcsuite/btcd/wire/v2" "github.com/lightninglabs/lndclient" "github.com/lightningnetwork/lnd/graph/db/models" "github.com/lightningnetwork/lnd/lnwire" diff --git a/utils/address.go b/utils/address.go index 0c4898c021..7015376c1a 100644 --- a/utils/address.go +++ b/utils/address.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/chaincfg/v2" ) // ErrWrongNetwork is returned when an address belongs to another network than @@ -16,13 +16,13 @@ var ErrWrongNetwork = errors.New("address belongs to another network") // sweep outputs to: P2PKH, P2SH, P2WPKH, P2WSH or P2TR. It rejects any other // type that an address decoder may return, such as a raw public key or a // pay-to-anchor output, which anyone can spend. -func IsSupportedDestAddr(addr btcutil.Address) bool { +func IsSupportedDestAddr(addr btcaddr.Address) bool { switch addr.(type) { - case *btcutil.AddressPubKeyHash, - *btcutil.AddressScriptHash, - *btcutil.AddressWitnessPubKeyHash, - *btcutil.AddressWitnessScriptHash, - *btcutil.AddressTaproot: + case *btcaddr.AddressPubKeyHash, + *btcaddr.AddressScriptHash, + *btcaddr.AddressWitnessPubKeyHash, + *btcaddr.AddressWitnessScriptHash, + *btcaddr.AddressTaproot: return true @@ -35,7 +35,7 @@ func IsSupportedDestAddr(addr btcutil.Address) bool { // belong to the network with the given chain parameters. The decoder accepts // bech32 addresses of all known networks, and their output scripts don't // depend on the network. -func CheckAddrNetwork(addr btcutil.Address, params *chaincfg.Params) error { +func CheckAddrNetwork(addr btcaddr.Address, params *chaincfg.Params) error { if addr.IsForNet(params) { return nil } diff --git a/utils/address_test.go b/utils/address_test.go index 22326a12ba..77b9624c4d 100644 --- a/utils/address_test.go +++ b/utils/address_test.go @@ -4,8 +4,8 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/chaincfg" + btcaddr "github.com/btcsuite/btcd/address/v2" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/stretchr/testify/require" ) @@ -23,27 +23,30 @@ func TestIsSupportedDestAddr(t *testing.T) { "7029bfcdb2dce28d959f2815b16f81798") require.NoError(t, err) - p2pkh, err := btcutil.NewAddressPubKeyHash(hash20, params) + p2pkh, err := btcaddr.NewAddressPubKeyHash(hash20, params) require.NoError(t, err) - p2sh, err := btcutil.NewAddressScriptHashFromHash(hash20, params) + p2sh, err := btcaddr.NewAddressScriptHashFromHash(hash20, params) require.NoError(t, err) - p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash(hash20, params) + p2wpkh, err := btcaddr.NewAddressWitnessPubKeyHash(hash20, params) require.NoError(t, err) - p2wsh, err := btcutil.NewAddressWitnessScriptHash(hash32, params) + p2wsh, err := btcaddr.NewAddressWitnessScriptHash(hash32, params) require.NoError(t, err) - p2tr, err := btcutil.NewAddressTaproot(hash32, params) + p2tr, err := btcaddr.NewAddressTaproot(hash32, params) require.NoError(t, err) - p2pk, err := btcutil.NewAddressPubKey(pubKey, params) + p2pk, err := btcaddr.NewAddressPubKey(pubKey, params) + require.NoError(t, err) + + p2a, err := btcaddr.NewAddressPayToAnchor(params) require.NoError(t, err) tests := []struct { name string - addr btcutil.Address + addr btcaddr.Address supported bool }{ {name: "p2pkh", addr: p2pkh, supported: true}, @@ -52,6 +55,7 @@ func TestIsSupportedDestAddr(t *testing.T) { {name: "p2wsh", addr: p2wsh, supported: true}, {name: "p2tr", addr: p2tr, supported: true}, {name: "raw public key", addr: p2pk, supported: false}, + {name: "pay to anchor", addr: p2a, supported: false}, {name: "nil", addr: nil, supported: false}, } @@ -73,24 +77,24 @@ func TestCheckAddrNetwork(t *testing.T) { hash20 := make([]byte, 20) - p2pkh, err := btcutil.NewAddressPubKeyHash( + p2pkh, err := btcaddr.NewAddressPubKeyHash( hash20, &chaincfg.MainNetParams, ) require.NoError(t, err) - p2wpkh, err := btcutil.NewAddressWitnessPubKeyHash( + p2wpkh, err := btcaddr.NewAddressWitnessPubKeyHash( hash20, &chaincfg.MainNetParams, ) require.NoError(t, err) - regtestP2WPKH, err := btcutil.NewAddressWitnessPubKeyHash( + regtestP2WPKH, err := btcaddr.NewAddressWitnessPubKeyHash( hash20, &chaincfg.RegressionNetParams, ) require.NoError(t, err) tests := []struct { name string - addr btcutil.Address + addr btcaddr.Address params *chaincfg.Params err error }{ diff --git a/utils/dust_limit.go b/utils/dust_limit.go index ba9b567a02..2d1a99fc06 100644 --- a/utils/dust_limit.go +++ b/utils/dust_limit.go @@ -1,9 +1,9 @@ package utils import ( - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/btcsuite/btcd/mempool" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" ) // DustLimitForPkScript returns the dust limit for a given pkScript. An output diff --git a/utils/fees.go b/utils/fees.go index 7d7ffb9126..d29ddcb32f 100644 --- a/utils/fees.go +++ b/utils/fees.go @@ -3,7 +3,7 @@ package utils import ( "fmt" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) diff --git a/utils/fees_test.go b/utils/fees_test.go index c0a1914b35..99e8d9ed38 100644 --- a/utils/fees_test.go +++ b/utils/fees_test.go @@ -3,7 +3,7 @@ package utils import ( "testing" - "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/v2" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/lnwallet/chainfee" "github.com/stretchr/testify/require" diff --git a/utils/htlc_utils.go b/utils/htlc_utils.go index 6550a5f9ee..db892010b0 100644 --- a/utils/htlc_utils.go +++ b/utils/htlc_utils.go @@ -3,7 +3,7 @@ package utils import ( "fmt" - "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/input" diff --git a/utils/htlc_utils_test.go b/utils/htlc_utils_test.go index b9345ed76c..63a627bb89 100644 --- a/utils/htlc_utils_test.go +++ b/utils/htlc_utils_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/btcsuite/btcd/btcec/v2/ecdsa" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/chaincfg/v2" + "github.com/btcsuite/btcd/chainhash/v2" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/test" "github.com/lightningnetwork/lnd/lntypes" diff --git a/utils/tx_sort.go b/utils/tx_sort.go index bc31e6a1b1..c8125f469f 100644 --- a/utils/tx_sort.go +++ b/utils/tx_sort.go @@ -3,7 +3,7 @@ package utils import ( "bytes" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcd/wire/v2" ) // Bip69Less is taken from btcd in btcutil/txsort/txsort.go. From 1d70621280b899ff9a72f06be311150a13cb9690 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 21 Oct 2026 13:04:03 +0200 Subject: [PATCH 5/8] ci: test with btcd v2 LiT companion --- .github/actions/lit-setup/action.yml | 2 +- .github/workflows/main.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/lit-setup/action.yml b/.github/actions/lit-setup/action.yml index a3f6a1704e..8052de6496 100644 --- a/.github/actions/lit-setup/action.yml +++ b/.github/actions/lit-setup/action.yml @@ -11,7 +11,7 @@ runs: - name: Clone LiT repository uses: actions/checkout@v4 with: - repository: lightninglabs/lightning-terminal + repository: ${{ env.LITD_ITEST_REPOSITORY || 'lightninglabs/lightning-terminal' }} ref: ${{ env.LITD_ITEST_BRANCH }} path: lightning-terminal diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 616bae201e..fbb0bf1878 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,9 @@ env: # If you change this value, please change it in the following files as well: # /Dockerfile GO_VERSION: 1.27.3 - LITD_ITEST_BRANCH: master + # Test the coordinated migration until lightning-terminal#1438 lands. + LITD_ITEST_REPOSITORY: hieblmi/lightning-terminal + LITD_ITEST_BRANCH: feab37aa372e2bb62052335dd678f1d305b253fc jobs: ######################## From 040a46ce35db918deeec8181bb96515787e97f24 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 21 Oct 2026 13:46:58 +0200 Subject: [PATCH 6/8] build: retain lnd recovery fixes in btcd v2 migration --- docs/release-notes/release-notes-next.md | 1 + go.mod | 23 ++++++++--------- go.sum | 32 ++++++++++++------------ 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/release-notes/release-notes-next.md b/docs/release-notes/release-notes-next.md index 08be548f2c..ce8e651dfa 100644 --- a/docs/release-notes/release-notes-next.md +++ b/docs/release-notes/release-notes-next.md @@ -7,6 +7,7 @@ * Loop now uses the btcd v2 modules. Projects compiling against Loop's exported Go APIs must migrate address, transaction, and related types to the corresponding btcd v2 packages. + The lnd snapshot retains the v0.21.4 forwarding-response recovery fixes. [PR #1199](https://github.com/lightninglabs/loop/pull/1199) #### Bug Fixes diff --git a/go.mod b/go.mod index 42d3883c15..edfd1e66fd 100644 --- a/go.mod +++ b/go.mod @@ -11,8 +11,8 @@ require ( github.com/btcsuite/btcd/txscript/v2 v2.0.0 github.com/btcsuite/btcd/wire/v2 v2.0.0 github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b - github.com/btcsuite/btcwallet v0.18.0 - github.com/btcsuite/btcwallet/wtxmgr v1.6.0 + github.com/btcsuite/btcwallet v0.18.1-0.20260903142755-a960541f35ed + github.com/btcsuite/btcwallet/wtxmgr v1.6.1-0.20260903142755-a960541f35ed github.com/davecgh/go-spew v1.1.1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 github.com/fortytw2/leaktest v1.3.0 @@ -33,7 +33,7 @@ require ( github.com/lightningnetwork/lnd v0.21.3-beta github.com/lightningnetwork/lnd/cert v1.2.2 github.com/lightningnetwork/lnd/clock v1.1.1 - github.com/lightningnetwork/lnd/queue v1.2.0 + github.com/lightningnetwork/lnd/queue v1.2.1-0.20260925031608-f2963ce1fd19 github.com/lightningnetwork/lnd/ticker v1.1.1 github.com/lightningnetwork/lnd/tlv v1.4.0 github.com/lightningnetwork/lnd/tor v1.2.0 @@ -123,7 +123,7 @@ require ( github.com/lightninglabs/neutrino v0.18.0 // indirect github.com/lightninglabs/neutrino/cache v1.1.4 // indirect github.com/lightningnetwork/lnd/actor v0.0.6 // indirect - github.com/lightningnetwork/lnd/fn/v2 v2.0.9 // indirect + github.com/lightningnetwork/lnd/fn/v2 v2.0.10-0.20260925031608-f2963ce1fd19 // indirect github.com/lightningnetwork/lnd/healthcheck v1.2.6 // indirect github.com/lightningnetwork/lnd/kvdb v1.5.1 // indirect github.com/lightningnetwork/lnd/sqldb v1.0.13 // indirect @@ -209,7 +209,7 @@ require ( // We want to format raw bytes as hex instead of base64. The forked version // allows us to specify that as an option. -replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display +replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.36.11-hex-display // We are using a fork of the migration library with custom functionality that // did not yet make it into the upstream repository. @@ -241,15 +241,14 @@ go 1.27.3 godebug multipathtcp=0 -// This sqldb revision contains lnd's pgx v5 migration, which removes the -// vulnerable legacy pgx v4/pgproto3 dependency chain. Remove this replacement -// once the required lnd version includes an sqldb release with that migration. -replace github.com/lightningnetwork/lnd/sqldb v1.0.13 => github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260514041430-e9b422f78581 +// Match the fixed lnd snapshot, including its pgx v5 SQL implementation. +// Remove this replacement once a compatible sqldb release is available. +replace github.com/lightningnetwork/lnd/sqldb => github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260925031608-f2963ce1fd19 // Use the btcd v2 migration of v0.8.6, preserving the released RFQ and proof // fixes until an upstream v2-compatible release is available. // See https://github.com/lightninglabs/taproot-assets/pull/2366. -replace github.com/lightninglabs/taproot-assets => github.com/hieblmi/taro v0.1.0-alpha.0.20261021105727-9b4c853b36ca +replace github.com/lightninglabs/taproot-assets => github.com/hieblmi/taro v0.1.0-alpha.0.20261021113806-b47086671590 -// Released RPC submodules still require the legacy lnd dependency line. -replace github.com/lightningnetwork/lnd => github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260903094101-d66a7c137d32 +// Keep the v2 migration on lnd code retaining the v0.21.4 recovery fixes. +replace github.com/lightningnetwork/lnd => github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260925031608-f2963ce1fd19 diff --git a/go.sum b/go.sum index 5831c37080..2c1bf50049 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,8 @@ github.com/btcsuite/btclog v1.0.0 h1:sEkpKJMmfGiyZjADwEIgB1NSwMyfdD1FB8v6+w1T0Ns github.com/btcsuite/btclog v1.0.0/go.mod h1:w7xnGOhwT3lmrS4H3b/D1XAXxvh+tbhUm8xeHN2y3TQ= github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b h1:MQ+Q6sDy37V1wP1Yu79A5KqJutolqUGwA99UZWQDWZM= github.com/btcsuite/btclog/v2 v2.0.1-0.20250728225537-6090e87c6c5b/go.mod h1:XItGUfVOxotJL8kkuk2Hj3EVow5KCugXl3wWfQ6K0AE= -github.com/btcsuite/btcwallet v0.18.0 h1:VSRClNLT7NX0wmJEGALz3jOZRRjWPpUdp7VI1Akie1o= -github.com/btcsuite/btcwallet v0.18.0/go.mod h1:1ZMc1EEskov+AKKv4kCMZqN8BwVh9rpXwEyxbeWy2A4= +github.com/btcsuite/btcwallet v0.18.1-0.20260903142755-a960541f35ed h1:2nmty4a4/GIqP+II2NXU+O6yZyRO1wgaeIjCHIZTvv4= +github.com/btcsuite/btcwallet v0.18.1-0.20260903142755-a960541f35ed/go.mod h1:IQrr6b13s0ZTaj9RlM/LhQ+Xvmo/gK86L9oGu2upIeQ= github.com/btcsuite/btcwallet/wallet/txauthor v1.4.0 h1:oIkGj32YK1CvWaJGlVwZA1f+y/KVHkfrd2PoST0ZpQs= github.com/btcsuite/btcwallet/wallet/txauthor v1.4.0/go.mod h1:sGrBjcqQ8UPexuRajFs72+o544CJn3Pavv/5H0VAWVk= github.com/btcsuite/btcwallet/wallet/txrules v1.3.0 h1:D5aGMwWIxdqek3xEJs4eOdMoh6iga2EI2xSlaXCdnNo= @@ -59,8 +59,8 @@ github.com/btcsuite/btcwallet/wallet/txsizes v1.3.0 h1:2W9qt0edMoX8crx0Wm4Cv+eAj github.com/btcsuite/btcwallet/wallet/txsizes v1.3.0/go.mod h1:42aE6+LMZSSEisQAa15Xml25ncuJFfhCrkcpB5OmkZk= github.com/btcsuite/btcwallet/walletdb v1.6.0 h1:Yund5XbdqFxNW7+R2Sxs02bMC5fMrmORj4GN8MV55no= github.com/btcsuite/btcwallet/walletdb v1.6.0/go.mod h1:q9xif0Csp52GVb3l252BbHCuyiCnuEbrPWu/HAsvaYc= -github.com/btcsuite/btcwallet/wtxmgr v1.6.0 h1:ivSSnYCD4Kb5yAMZVyBA1VMYABIFcopPEcmHCrRZXcE= -github.com/btcsuite/btcwallet/wtxmgr v1.6.0/go.mod h1:Raor7IBIwHSIKE9Lr5o+R9rwX7sRMHU1zjxgEQgn9h8= +github.com/btcsuite/btcwallet/wtxmgr v1.6.1-0.20260903142755-a960541f35ed h1:HhSbzqX5IJUlBehUY+HLAXM1At+QygEOq0FdLTC5DYY= +github.com/btcsuite/btcwallet/wtxmgr v1.6.1-0.20260903142755-a960541f35ed/go.mod h1:Raor7IBIwHSIKE9Lr5o+R9rwX7sRMHU1zjxgEQgn9h8= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/golangcrypto v0.0.0-20150304025918-53f62d9b43e8/go.mod h1:tYvUd8KLhm/oXvUeSEs2VlLghFjQt9+ZaF9ghH0JNjc= @@ -213,8 +213,8 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hieblmi/taro v0.1.0-alpha.0.20261021105727-9b4c853b36ca h1:bxR/xxiiHVA+7146+E61n6nZMg++/Vjj5iJYVALGBX0= -github.com/hieblmi/taro v0.1.0-alpha.0.20261021105727-9b4c853b36ca/go.mod h1:06U9CTUjszbsyMppwRLqSSSFkEU5NM+io+mxFX8sHzc= +github.com/hieblmi/taro v0.1.0-alpha.0.20261021113806-b47086671590 h1:Bqcb9duFh4Ge3Nckckvv4ydjeYdH6uRJR+v7aFIPfj8= +github.com/hieblmi/taro v0.1.0-alpha.0.20261021113806-b47086671590/go.mod h1:2rnd0303/ZgXuOUrAwupP7Aj/b2AQdelf27n7nvtW3w= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438 h1:Dj0L5fhJ9F82ZJyVOmBx6msDp/kfd1t9GRfny/mfJA0= github.com/jackc/pgerrcode v0.0.0-20240316143900-6e2875d9b438/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds= @@ -284,30 +284,30 @@ github.com/lightninglabs/neutrino v0.18.0 h1:UsyeU3twkCSAXxUssVg8vGXcHkWKzHZ3xQC github.com/lightninglabs/neutrino v0.18.0/go.mod h1:TL52mV5nxeAN//WFHrU8XV9GZKwnrrNFL9/nKMX8sl4= github.com/lightninglabs/neutrino/cache v1.1.4 h1:KVtvUmBwYr7eKtjfjHG/q6/cQlcrjHl23Gag+VdxF2g= github.com/lightninglabs/neutrino/cache v1.1.4/go.mod h1:ZqLzxghPggIRfNXeAZN1VtTKofMyK/ALI6niYsPH6OE= -github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display h1:w7FM5LH9Z6CpKxl13mS48idsu6F+cEZf0lkyiV+Dq9g= -github.com/lightninglabs/protobuf-go-hex-display v1.34.2-hex-display/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +github.com/lightninglabs/protobuf-go-hex-display v1.36.11-hex-display h1:fjePiMfYbg3KodAiSXwkpGZpYdPeNd9VnggJWiY6AaY= +github.com/lightninglabs/protobuf-go-hex-display v1.36.11-hex-display/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= github.com/lightninglabs/taproot-assets/taprpc v1.3.3 h1:KwscIMQ7Nyy8SleDiUUTWPCgixpgrN9nunM+QwM/KJQ= github.com/lightninglabs/taproot-assets/taprpc v1.3.3/go.mod h1:0dBS6jLkddm8EvpJSpJjPUMWr294/YRoM/IAzdfo3pw= github.com/lightningnetwork/lightning-onion v1.4.0 h1:qWE1icOH4AKXRcq1KCzt6P/TesqptgBTP++V7wowTc0= github.com/lightningnetwork/lightning-onion v1.4.0/go.mod h1:YDPkvVTVQ6FBBE6Yj93tDd7zA3iTSrryi9xq46i7bKE= -github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260903094101-d66a7c137d32 h1:lwPqwW244WCcdOZGwmS+rrieC1hTPYaRvkjHC8KXDeY= -github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260903094101-d66a7c137d32/go.mod h1:deRbYNteO2ZNleUYVQLHXCTMKbiuoUO7ShmYseVRRM8= +github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260925031608-f2963ce1fd19 h1:G9giyUy11ZVEUFd42spySFwh4Dl9otudhX0r/ZNFjDc= +github.com/lightningnetwork/lnd v0.21.0-beta.rc2.0.20260925031608-f2963ce1fd19/go.mod h1:s6Rs050GFHJJ9aGdjxdJw+gBLQcerjc5z6Ho9PyGifY= github.com/lightningnetwork/lnd/actor v0.0.6 h1:Ge8N2wivARG+27qJBwTlB0vwsypStZYZy8vk4Zl38sU= github.com/lightningnetwork/lnd/actor v0.0.6/go.mod h1:YAsoniSbY/cAM9HTVNfZLvt7RI6swDxy6wzPspTcMZg= github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI= github.com/lightningnetwork/lnd/cert v1.2.2/go.mod h1:jQmFn/Ez4zhDgq2hnYSw8r35bqGVxViXhX6Cd7HXM6U= github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0= github.com/lightningnetwork/lnd/clock v1.1.1/go.mod h1:mGnAhPyjYZQJmebS7aevElXKTFDuO+uNFFfMXK1W8xQ= -github.com/lightningnetwork/lnd/fn/v2 v2.0.9 h1:ZytG4ltPac/sCyg1EJDn10RGzPIDJeyennUMRdOw7Y8= -github.com/lightningnetwork/lnd/fn/v2 v2.0.9/go.mod h1:aPUJHJ31S+Lgoo8I5SxDIjnmeCifqujaiTXKZqpav3w= +github.com/lightningnetwork/lnd/fn/v2 v2.0.10-0.20260925031608-f2963ce1fd19 h1:9vlWL/qUM9jnKkQ+0CtaddUzZfxwcO/dUNW8VlfWNe8= +github.com/lightningnetwork/lnd/fn/v2 v2.0.10-0.20260925031608-f2963ce1fd19/go.mod h1:wg3OyJ9eS14Az8HAZMMxqVjJ+nkKw97uPF/45ICOvs4= github.com/lightningnetwork/lnd/healthcheck v1.2.6 h1:1sWhqr93GdkWy4+6U7JxBfcyZIE78MhIHTJZfPx7qqI= github.com/lightningnetwork/lnd/healthcheck v1.2.6/go.mod h1:Mu02um4CWY/zdTOvFje7WJgJcHyX2zq/FG3MhOAiGaQ= github.com/lightningnetwork/lnd/kvdb v1.5.1 h1:OG5cDbqggxiCFKAJbSPw0PfQovi+0odCZAAU5r5b+ho= github.com/lightningnetwork/lnd/kvdb v1.5.1/go.mod h1:5lubXYoXHDBWBYKmC+2we7qgkjjz0cEZ/5QSQkxQSec= -github.com/lightningnetwork/lnd/queue v1.2.0 h1:sSrn+u84OLuOT/F+xGxgg8VfknXeIZEAFQoMH6BL60s= -github.com/lightningnetwork/lnd/queue v1.2.0/go.mod h1:qLNP0L3B7piRGvDyhAyJKic4xTt+Mw4D7mWrQeuAwxY= -github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260514041430-e9b422f78581 h1:s0M+mUHRSlBZuz0qxKdr77oKDFff3Hdg5oysJ31BjiU= -github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260514041430-e9b422f78581/go.mod h1:PQvrB+2SlYuyAoe0ac/SUIMZ9rP73jYlanIN8O7/eA0= +github.com/lightningnetwork/lnd/queue v1.2.1-0.20260925031608-f2963ce1fd19 h1:Wnh145o/yq7/Bt/dKuVF9KxkH979DojVITOxoyEhKXY= +github.com/lightningnetwork/lnd/queue v1.2.1-0.20260925031608-f2963ce1fd19/go.mod h1:fiklX2b4LbkH80w/tJcYMeqvBGs3DVWjbD1aF3vfJS4= +github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260925031608-f2963ce1fd19 h1:2qmcpks9VbjjL+W2xLPpahPIdaVpPGp/7qbUbF8psFI= +github.com/lightningnetwork/lnd/sqldb v1.0.13-0.20260925031608-f2963ce1fd19/go.mod h1:azGYCw0hL/pBr5KP3AKuN98P61/qbJidlm6LpVRzdWY= github.com/lightningnetwork/lnd/ticker v1.1.1 h1:J/b6N2hibFtC7JLV77ULQp++QLtCwT6ijJlbdiZFbSM= github.com/lightningnetwork/lnd/ticker v1.1.1/go.mod h1:waPTRAAcwtu7Ji3+3k+u/xH5GHovTsCoSVpho0KDvdA= github.com/lightningnetwork/lnd/tlv v1.4.0 h1:qNGymEkOZsHbp4h8VjnkRGgLfmh+eJP1JQtz2/mJX2M= From ddfc9b7dc6d35ea6d338d8a05b0951ebc43c9483 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 21 Oct 2026 13:52:58 +0200 Subject: [PATCH 7/8] ci: test the lnd recovery fix in the combined daemon --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fbb0bf1878..92827e11da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ env: GO_VERSION: 1.27.3 # Test the coordinated migration until lightning-terminal#1438 lands. LITD_ITEST_REPOSITORY: hieblmi/lightning-terminal - LITD_ITEST_BRANCH: feab37aa372e2bb62052335dd678f1d305b253fc + LITD_ITEST_BRANCH: 020303943686284e08669995b02eda03841b06d2 jobs: ######################## From 11e22e841be967e5a662a09496155f32d05a994c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 21 Oct 2026 14:05:32 +0200 Subject: [PATCH 8/8] ci: respect configured Go module proxy Use Go's normal module proxy configuration for all four tidy checks. This avoids concurrent direct VCS fetch failures in CI and removes the redundant selective prefetch. Keep checksum verification and the final working-tree consistency check. --- Makefile | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 1caeef2da3..f587a7eae4 100644 --- a/Makefile +++ b/Makefile @@ -15,15 +15,6 @@ GOBUILD := CGO_ENABLED=0 GO111MODULE=on go build -v GOINSTALL := CGO_ENABLED=0 GO111MODULE=on go install -v GOMOD := GO111MODULE=on go mod -# GitLab-backed module sources can reject CI runner traffic. Seed GitLab and -# modernc.org modules through the public Go proxy before the direct check. -MOD_CHECK_FILES := go.mod go.sum swapserverrpc/go.mod swapserverrpc/go.sum \ - looprpc/go.mod looprpc/go.sum tools/go.mod tools/go.sum -MOD_CHECK_PREFETCH := $(shell awk '($$1 ~ /^(gitlab\.com\/|modernc\.org\/)/) { \ - version=$$2; sub("/go.mod$$", "", version); \ - if (version ~ /^v/) print $$1 "@" version; \ -}' $(MOD_CHECK_FILES) | sort -u) - COMMIT := $(shell git describe --abbrev=40 --dirty --tags) COMMIT_HASH := $(shell git rev-parse HEAD) DIRTY := $(shell git diff-index --quiet HEAD -- || echo dirty) @@ -165,13 +156,10 @@ mod-tidy: mod-check: @$(call print, "Checking modules.") -ifneq ($(MOD_CHECK_PREFETCH),) - @GOPROXY=https://proxy.golang.org $(GOMOD) download $(MOD_CHECK_PREFETCH) -endif - GOPROXY=direct $(GOMOD) tidy - cd swapserverrpc/ && GOPROXY=direct $(GOMOD) tidy - cd looprpc/ && GOPROXY=direct $(GOMOD) tidy - cd tools/ && GOPROXY=direct $(GOMOD) tidy + $(GOMOD) tidy + cd swapserverrpc/ && $(GOMOD) tidy + cd looprpc/ && $(GOMOD) tidy + cd tools/ && $(GOMOD) tidy if test -n "$$(git status --porcelain)"; then echo "Running go mod tidy changes go.mod/go.sum"; git status; git diff; exit 1; fi commitmsg-lint: