diff --git a/Makefile b/Makefile index ea87a6505e..cdc60c0a9d 100644 --- a/Makefile +++ b/Makefile @@ -35,13 +35,13 @@ ITEST_LDFLAGS := -ldflags "-X $(PKG)/build.Commit=$(COMMIT)" RELEASE_LDFLAGS := $(call make_ldflags, $(RELEASE_TAGS), -s -w -buildid=) DCRD_REPO := github.com/decred/dcrd -DCRD_COMMIT := v1.8.0 +DCRD_COMMIT := 3d4d27280b43207c2891b733a3d33fdfb411b555 DCRD_META := "$(DCRD_COMMIT).from-dcrlnd" DCRD_LDFLAGS := "-X github.com/decred/dcrd/internal/version.BuildMetadata=$(DCRD_META)" DCRD_TMPDIR := $(shell mktemp -d) DCRWALLET_REPO := github.com/decred/dcrwallet -DCRWALLET_COMMIT := v3.0.0 +DCRWALLET_COMMIT := 1920377bb49f66318ed4630de9a32b245f90d2a2 DCRWALLET_META := $(DCRWALLET_COMMIT).from-dcrlnd DCRWALLET_LDFLAGS := "-X decred.org/dcrwallet/version.BuildMetadata=$(DCRWALLET_META)" DCRWALLET_TMPDIR := $(shell mktemp -d) diff --git a/build/version.go b/build/version.go index 628cb0bec7..c04541f4c8 100644 --- a/build/version.go +++ b/build/version.go @@ -26,7 +26,7 @@ const ( // versioning 2.0.0 spec (https://semver.org/). const ( appMajor uint = 0 - appMinor uint = 6 + appMinor uint = 7 appPatch uint = 0 ) diff --git a/chainntnfs/dcrwnotify/dcrw.go b/chainntnfs/dcrwnotify/dcrw.go index 0146d548c4..387389cdec 100644 --- a/chainntnfs/dcrwnotify/dcrw.go +++ b/chainntnfs/dcrwnotify/dcrw.go @@ -3,7 +3,7 @@ package dcrwnotify import ( "context" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/wire" diff --git a/chainntnfs/dcrwnotify/driver.go b/chainntnfs/dcrwnotify/driver.go index bd051ffee8..e1b212c598 100644 --- a/chainntnfs/dcrwnotify/driver.go +++ b/chainntnfs/dcrwnotify/driver.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrlnd/blockcache" "github.com/decred/dcrlnd/chainntnfs" diff --git a/chainntnfs/remotedcrwnotify/remotedcrw.go b/chainntnfs/remotedcrwnotify/remotedcrw.go index 15dc818ca2..25f10ca43c 100644 --- a/chainntnfs/remotedcrwnotify/remotedcrw.go +++ b/chainntnfs/remotedcrwnotify/remotedcrw.go @@ -3,7 +3,7 @@ package remotedcrwnotify import ( "context" - "decred.org/dcrwallet/v3/rpc/walletrpc" + "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/wire" diff --git a/chainntnfs/test/test_interface.go b/chainntnfs/test/test_interface.go index ba5a6685e5..f08dfccfab 100644 --- a/chainntnfs/test/test_interface.go +++ b/chainntnfs/test/test_interface.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/dcrutil/v4" diff --git a/chainscan/csdrivers/dcrwdriver.go b/chainscan/csdrivers/dcrwdriver.go index 3d71a57dce..b4fe571b50 100644 --- a/chainscan/csdrivers/dcrwdriver.go +++ b/chainscan/csdrivers/dcrwdriver.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "decred.org/dcrwallet/v3/errors" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/errors" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/gcs/v4" "github.com/decred/dcrd/wire" diff --git a/chainscan/csdrivers/dcrwdriver_test.go b/chainscan/csdrivers/dcrwdriver_test.go index dcfb928bcc..f5122d9e55 100644 --- a/chainscan/csdrivers/dcrwdriver_test.go +++ b/chainscan/csdrivers/dcrwdriver_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "decred.org/dcrwallet/v3/rpc/walletrpc" + "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/gcs/v4" diff --git a/chainscan/csdrivers/remotedcrwdriver.go b/chainscan/csdrivers/remotedcrwdriver.go index 69d218fcc0..103f115ae1 100644 --- a/chainscan/csdrivers/remotedcrwdriver.go +++ b/chainscan/csdrivers/remotedcrwdriver.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "decred.org/dcrwallet/v3/rpc/walletrpc" + "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/gcs/v4" "github.com/decred/dcrd/gcs/v4/blockcf2" diff --git a/chainscan/examples/dcrwallethistorical/main.go b/chainscan/examples/dcrwallethistorical/main.go index b07d35c83a..6b930ce274 100644 --- a/chainscan/examples/dcrwallethistorical/main.go +++ b/chainscan/examples/dcrwallethistorical/main.go @@ -12,7 +12,7 @@ import ( "path/filepath" "time" - "decred.org/dcrwallet/v3/rpc/walletrpc" + "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/dcrutil/v4" "github.com/decred/dcrd/txscript/v4/stdaddr" diff --git a/config_builder.go b/config_builder.go index 1f0d43c216..9f0a648e53 100644 --- a/config_builder.go +++ b/config_builder.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrlnd/blockcache" "github.com/decred/dcrlnd/btcwalletcompat" @@ -568,10 +568,11 @@ func (d *DefaultWalletImpl) BuildWalletConfig(ctx context.Context, d.cfg.ActiveNetParams.Params) case !isRemoteWallet && d.cfg.Dcrwallet.SPV: spvCfg := &dcrwallet.SPVSyncerConfig{ - Peers: d.cfg.Dcrwallet.SPVConnect, - Net: d.cfg.ActiveNetParams.Params, - AppDataDir: filepath.Join(d.cfg.Decred.ChainDir), - DialFunc: d.cfg.Dcrwallet.DialFunc, + Peers: d.cfg.Dcrwallet.SPVConnect, + Net: d.cfg.ActiveNetParams.Params, + AppDataDir: filepath.Join(d.cfg.Decred.ChainDir), + DialFunc: d.cfg.Dcrwallet.DialFunc, + DisableRelayTx: d.cfg.Dcrwallet.DisableRelayTx, } walletConfig.Syncer, err = dcrwallet.NewSPVSyncer(spvCfg) } @@ -932,6 +933,7 @@ func waitForWalletPassword(cfg *Config, birthday = cipherSeed.BirthdayTime() newWallet, err = loader.CreateNewWallet( ctx, password, password, cipherSeed.Entropy[:], + birthday, ) // No seed was given, we're importing a wallet from its extended diff --git a/dcrlnd.go b/dcrlnd.go index 79c49d0f07..13db835d10 100644 --- a/dcrlnd.go +++ b/dcrlnd.go @@ -6,8 +6,9 @@ import ( "errors" "fmt" "io" + "time" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrlnd/chainreg" "github.com/decred/dcrlnd/lnrpc/initchainsyncrpc" "github.com/decred/dcrlnd/lnwallet" @@ -81,7 +82,8 @@ func noSeedBackupWalletInit(ctx context.Context, cfg *Config, privPass, pubPass if _, err := io.ReadFull(rand.Reader, seed[:]); err != nil { return nil, err } - return loader.CreateNewWallet(ctx, pubPass, privPass, seed[:]) + return loader.CreateNewWallet(ctx, pubPass, privPass, seed[:], + time.Now().Add(-time.Hour*24)) } type RemoteWalletBuilder struct { diff --git a/docker/dcrwallet/main.go b/docker/dcrwallet/main.go index 3a69051a5a..f591c143ab 100644 --- a/docker/dcrwallet/main.go +++ b/docker/dcrwallet/main.go @@ -7,7 +7,7 @@ import ( "fmt" "os" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) diff --git a/go.mod b/go.mod index 8f1491a5ff..d59dc3c121 100644 --- a/go.mod +++ b/go.mod @@ -1,33 +1,33 @@ module github.com/decred/dcrlnd -go 1.18 +go 1.20 require ( - decred.org/dcrwallet/v3 v3.1.1-0.20240303162647-7352f6fb06da + decred.org/dcrwallet/v4 v4.0.0-20240516171148-1920377bb49f github.com/NebulousLabs/go-upnp v0.0.0-20181203152547-b32978b8ccbf github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 github.com/bahlo/generic-list-go v0.2.0 github.com/btcsuite/btcwallet/walletdb v1.4.0 github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/davecgh/go-spew v1.1.1 - github.com/decred/dcrd/addrmgr/v2 v2.0.2 + github.com/decred/dcrd/addrmgr/v2 v2.0.3 github.com/decred/dcrd/bech32 v1.1.3 - github.com/decred/dcrd/blockchain/stake/v5 v5.0.0 - github.com/decred/dcrd/blockchain/standalone/v2 v2.2.0 + github.com/decred/dcrd/blockchain/stake/v5 v5.0.1 + github.com/decred/dcrd/blockchain/standalone/v2 v2.2.1 github.com/decred/dcrd/chaincfg/chainhash v1.0.4 - github.com/decred/dcrd/chaincfg/v3 v3.2.0 + github.com/decred/dcrd/chaincfg/v3 v3.2.1 github.com/decred/dcrd/connmgr v1.1.1 github.com/decred/dcrd/dcrec v1.0.1 github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 github.com/decred/dcrd/dcrjson/v4 v4.0.1 - github.com/decred/dcrd/dcrutil/v4 v4.0.1 - github.com/decred/dcrd/gcs/v4 v4.0.0 - github.com/decred/dcrd/hdkeychain/v3 v3.1.1 - github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.1.0 - github.com/decred/dcrd/rpcclient/v8 v8.0.0 - github.com/decred/dcrd/txscript/v4 v4.1.0 - github.com/decred/dcrd/wire v1.6.0 + github.com/decred/dcrd/dcrutil/v4 v4.0.2 + github.com/decred/dcrd/gcs/v4 v4.1.0 + github.com/decred/dcrd/hdkeychain/v3 v3.1.2 + github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.2.0 + github.com/decred/dcrd/rpcclient/v8 v8.0.1 + github.com/decred/dcrd/txscript/v4 v4.1.1 + github.com/decred/dcrd/wire v1.7.0 github.com/decred/dcrtest/dcrdtest v1.0.1-0.20231217203517-3d06801da382 github.com/decred/lightning-onion/v4 v4.0.0 github.com/decred/slog v1.2.0 @@ -37,7 +37,7 @@ require ( github.com/golang/glog v1.1.2 github.com/golang/protobuf v1.5.3 github.com/google/btree v1.1.2 - github.com/gorilla/websocket v1.5.0 + github.com/gorilla/websocket v1.5.1 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 @@ -60,12 +60,12 @@ require ( go.etcd.io/etcd/client/pkg/v3 v3.5.7 go.etcd.io/etcd/client/v3 v3.5.7 go.etcd.io/etcd/server/v3 v3.5.7 - golang.org/x/crypto v0.15.0 + golang.org/x/crypto v0.23.0 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/net v0.18.0 - golang.org/x/sync v0.5.0 - golang.org/x/sys v0.14.0 - golang.org/x/term v0.14.0 + golang.org/x/net v0.25.0 + golang.org/x/sync v0.7.0 + golang.org/x/sys v0.20.0 + golang.org/x/term v0.20.0 golang.org/x/time v0.1.0 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 google.golang.org/grpc v1.59.0 @@ -76,7 +76,7 @@ require ( ) require ( - decred.org/cspp/v2 v2.1.0 // indirect + decred.org/cspp/v2 v2.2.0 // indirect github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -88,16 +88,17 @@ require ( github.com/dchest/siphash v1.2.3 // indirect github.com/decred/base58 v1.0.5 // indirect github.com/decred/dcrd v1.8.0 // indirect - github.com/decred/dcrd/certgen v1.1.2 // indirect + github.com/decred/dcrd/certgen v1.1.3 // indirect github.com/decred/dcrd/chaincfg v1.5.2 // indirect - github.com/decred/dcrd/connmgr/v3 v3.1.1 // indirect + github.com/decred/dcrd/connmgr/v3 v3.1.2 // indirect github.com/decred/dcrd/container/apbf v1.0.1 // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect github.com/decred/dcrd/crypto/ripemd160 v1.0.2 // indirect - github.com/decred/dcrd/database/v3 v3.0.1 // indirect + github.com/decred/dcrd/database/v3 v3.0.2 // indirect github.com/decred/dcrd/dcrec/edwards/v2 v2.0.3 // indirect github.com/decred/dcrd/lru v1.1.2 // indirect github.com/decred/dcrd/math/uint256 v1.0.1 // indirect + github.com/decred/dcrd/mixing v0.1.0 // indirect github.com/decred/dcrd/peer/v3 v3.0.2 // indirect github.com/decred/go-socks v1.1.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -160,7 +161,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/tools v0.15.0 // indirect google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect @@ -169,6 +170,6 @@ 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 - lukechampine.com/blake3 v1.2.1 // indirect + lukechampine.com/blake3 v1.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 351f826103..8d790b510a 100644 --- a/go.sum +++ b/go.sum @@ -33,10 +33,10 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo 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= -decred.org/cspp/v2 v2.1.0 h1:HeHb9+BFqrBaAPc6CsPiUpPFmC1uyBM2mJZUAbUXkRw= -decred.org/cspp/v2 v2.1.0/go.mod h1:9nO3bfvCheOPIFZw5f6sRQ42CjBFB5RKSaJ9Iq6G4MA= -decred.org/dcrwallet/v3 v3.1.1-0.20240303162647-7352f6fb06da h1:+Eo0YaA1yYjBrur5TXcQ2WCR8b/nLGYqVVMvWIrkQyo= -decred.org/dcrwallet/v3 v3.1.1-0.20240303162647-7352f6fb06da/go.mod h1:KYWzL2R6ghBLSvB7XXU9S29QwgcqnApCvONMDJ6KCR0= +decred.org/cspp/v2 v2.2.0 h1:VSOUC1w0Wo+QOGS0r1XO6TLnO16X67KuvpDmRRYyr08= +decred.org/cspp/v2 v2.2.0/go.mod h1:9nO3bfvCheOPIFZw5f6sRQ42CjBFB5RKSaJ9Iq6G4MA= +decred.org/dcrwallet/v4 v4.0.0-20240516171148-1920377bb49f h1:N5J6Dyq1yN8kDcF8S6MPgLDx0WmGqtyY5k3mXpgDCzE= +decred.org/dcrwallet/v4 v4.0.0-20240516171148-1920377bb49f/go.mod h1:LiqE26KHkc+yiDA5D/wp+x/4ir1ylHQurDNxwgsfkP4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -109,17 +109,17 @@ github.com/decred/base58 v1.0.5 h1:hwcieUM3pfPnE/6p3J100zoRfGkQxBulZHo7GZfOqic= github.com/decred/base58 v1.0.5/go.mod h1:s/8lukEHFA6bUQQb/v3rjUySJ2hu+RioCzLukAVkrfw= github.com/decred/dcrd v1.8.0 h1:aIqX3VnY9CCcOwI5kskGTw+LH5B4Am+6kjfnN/xkyks= github.com/decred/dcrd v1.8.0/go.mod h1:s8ccr5TraoSCGorOTpnludpwfKqEI8cjoAbmylbb6uw= -github.com/decred/dcrd/addrmgr/v2 v2.0.2 h1:h7PF1FoWcGUBcOhon7hK4Du7gT4KJb2/dCC4SVVnvgI= -github.com/decred/dcrd/addrmgr/v2 v2.0.2/go.mod h1:lMupOhByAzVJN7EFWSGLeGTrlvvx38uCY4D+bPf2AT4= +github.com/decred/dcrd/addrmgr/v2 v2.0.3 h1:Bf52dr7abbXiSy9WOoEt1NaZGZyk43x7GcoFfiZJSUo= +github.com/decred/dcrd/addrmgr/v2 v2.0.3/go.mod h1:661DIS/De2iLNLMwIKazUQfQypUqJ5om7PXNX0fEMms= github.com/decred/dcrd/bech32 v1.1.3 h1:EeipVC1dO4zkjTjyqvrWt6JT2Ajr1EHZt+BAmWN864s= github.com/decred/dcrd/bech32 v1.1.3/go.mod h1:jliqHZmCbVfT06Lh1mQywEKFVidRclbBJIUmwdoKhu0= -github.com/decred/dcrd/blockchain/stake/v5 v5.0.0 h1:WyxS8zMvTMpC5qYC9uJY+UzuV/x9ko4z20qBtH5Hzzs= -github.com/decred/dcrd/blockchain/stake/v5 v5.0.0/go.mod h1:5sSjMq9THpnrLkW0SjEqIBIo8qq2nXzc+m7k9oFVVmY= -github.com/decred/dcrd/blockchain/standalone/v2 v2.2.0 h1:v3yfo66axjr3oLihct+5tLEeM9YUzvK3i/6e2Im6RO0= -github.com/decred/dcrd/blockchain/standalone/v2 v2.2.0/go.mod h1:JsOpl2nHhW2D2bWMEtbMuAE+mIU/Pdd1i1pmYR+2RYI= -github.com/decred/dcrd/blockchain/v5 v5.0.0 h1:eAI9zbNpCFR6Xik6RLUEijAL3BO4QVJQ0Az3sz7ZGqk= -github.com/decred/dcrd/certgen v1.1.2 h1:6gvI74y9+IGUHPSXv1bWcAhGvT4Enm1Z808lyhLqqrs= -github.com/decred/dcrd/certgen v1.1.2/go.mod h1:Od5y39J+r2ZlvrizyWu2cylcYu0+emTTVm3eix4W8bw= +github.com/decred/dcrd/blockchain/stake/v5 v5.0.1 h1:KDm6myUPi8j2TTL7LZ+iT+R/pIbxd8qG89fjJNitzx0= +github.com/decred/dcrd/blockchain/stake/v5 v5.0.1/go.mod h1:y1tMD1TssTlPmKDYbSrF3Ujznj+STkXFfYPwoVfe+xA= +github.com/decred/dcrd/blockchain/standalone/v2 v2.2.1 h1:zeI9CHkLM9be4QOBmIAtoPfs6NCgJM1lpmRUYE61I8o= +github.com/decred/dcrd/blockchain/standalone/v2 v2.2.1/go.mod h1:yXZz/EgWdGw5nqMEvyKj/iXZ9I2VSyO95xKj6mRUMIM= +github.com/decred/dcrd/blockchain/v5 v5.0.1 h1:IGr8rJsgBVKDBI8STzeuGF6Mej0xbIX4gVVBA9yEMRU= +github.com/decred/dcrd/certgen v1.1.3 h1:MYENpBWVSP6FkkLBSSnaBGEOWobPcgYBLDDo88szi9c= +github.com/decred/dcrd/certgen v1.1.3/go.mod h1:Od5y39J+r2ZlvrizyWu2cylcYu0+emTTVm3eix4W8bw= github.com/decred/dcrd/chaincfg v1.5.2 h1:dd6l9rqcpxg2GF5neBmE2XxRc5Lqda45fWmN4XOJRW8= github.com/decred/dcrd/chaincfg v1.5.2/go.mod h1:FukMzTjkwzjPU+hK7CqDMQe3NMbSZAYU5PAcsx1wlv0= github.com/decred/dcrd/chaincfg/chainhash v1.0.1/go.mod h1:OVfvaOsNLS/A1y4Eod0Ip/Lf8qga7VXCQjUQLbkY0Go= @@ -128,12 +128,12 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.3/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D github.com/decred/dcrd/chaincfg/chainhash v1.0.4 h1:zRCv6tdncLfLTKYqu7hrXvs7hW+8FO/NvwoFvGsrluU= github.com/decred/dcrd/chaincfg/chainhash v1.0.4/go.mod h1:hA86XxlBWwHivMvxzXTSD0ZCG/LoYsFdWnCekkTMCqY= github.com/decred/dcrd/chaincfg/v3 v3.1.0/go.mod h1:4XF9nlx2NeGD4xzw1+L0DGICZMl0a5rKV8nnuHLgk8o= -github.com/decred/dcrd/chaincfg/v3 v3.2.0 h1:6WxA92AGBkycEuWvxtZMvA76FbzbkDRoK8OGbsR2muk= -github.com/decred/dcrd/chaincfg/v3 v3.2.0/go.mod h1:2rHW1TKyFmwZTVBLoU/Cmf0oxcpBjUEegbSlBfrsriI= +github.com/decred/dcrd/chaincfg/v3 v3.2.1 h1:x9zKJaU24WAKbxAR1UyFKHlM3oJgP0H9LodokM4X5lM= +github.com/decred/dcrd/chaincfg/v3 v3.2.1/go.mod h1:SDCWDtY7BLj0leXc9FuoA1YjSVKyCIBVAyxwZn6+sXc= github.com/decred/dcrd/connmgr v1.1.1 h1:YSoVJLFEfWwFojRIIKF0HqEOMtHXXbMHjrPKc2ncqDo= github.com/decred/dcrd/connmgr v1.1.1/go.mod h1:D9FHoebgawwWZzq39nzsdIBBVphz8+Zi51pvNnYHRUo= -github.com/decred/dcrd/connmgr/v3 v3.1.1 h1:si7bgYlyeSbB0Ewe+bfoO/RAzxuPwPkL40DDZhyITmo= -github.com/decred/dcrd/connmgr/v3 v3.1.1/go.mod h1:YlRGPagi/6SJbG9CFq2ZnorX9+deRNb6+m0ovkNDcKY= +github.com/decred/dcrd/connmgr/v3 v3.1.2 h1:+xNopie2L3YYwwkz51k0h/pASATOBzHtl2O8eodGg04= +github.com/decred/dcrd/connmgr/v3 v3.1.2/go.mod h1:tdbErFiNOuy/sHrX2mwaOk+r1HLs3EBz2EGxsocMPe4= github.com/decred/dcrd/container/apbf v1.0.1 h1:oepQzRtLADudsrx0AmmowoU1kambozINTMXduH6Mge0= github.com/decred/dcrd/container/apbf v1.0.1/go.mod h1:paQplssZMsRhwOUcP6LDNDypyb7lwsFHrUKUkAPFWtQ= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= @@ -142,8 +142,8 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPc github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg= github.com/decred/dcrd/crypto/ripemd160 v1.0.2 h1:TvGTmUBHDU75OHro9ojPLK+Yv7gDl2hnUvRocRCjsys= github.com/decred/dcrd/crypto/ripemd160 v1.0.2/go.mod h1:uGfjDyePSpa75cSQLzNdVmWlbQMBuiJkvXw/MNKRY4M= -github.com/decred/dcrd/database/v3 v3.0.1 h1:oaklASAsUBwDoRgaS961WYqecFMZNhI1k+BmGgeW7/U= -github.com/decred/dcrd/database/v3 v3.0.1/go.mod h1:IErr/Z62pFLoPZTMPGxedbcIuseGk0w3dszP3AFbXyw= +github.com/decred/dcrd/database/v3 v3.0.2 h1:rgP7XNZemTs8ZC7bnTKO8JO79Woj5nq+yQYmB9ry7yM= +github.com/decred/dcrd/database/v3 v3.0.2/go.mod h1:3Ge1yoxEOsqd72V5LTA9g0B7mlY0MGbpxeE1fniIXsQ= github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8= github.com/decred/dcrd/dcrec v1.0.1 h1:gDzlndw0zYxM5BlaV17d7ZJV6vhRe9njPBFeg4Db2UY= github.com/decred/dcrd/dcrec v1.0.1/go.mod h1:CO+EJd8eHFb8WHa84C7ZBkXsNUIywaTHb+UAuI5uo6o= @@ -155,34 +155,36 @@ github.com/decred/dcrd/dcrec/secp256k1 v1.0.1/go.mod h1:lhu4eZFSfTJWUnR3CFRcpD+V github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1 h1:18HurQ6DfHeNvwIjvOmrgr44bPdtVaQAe/WWwHg9goM= github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.1/go.mod h1:XmyzkaXBy7ZvHdrTAlXAjpog8qKSAWa3ze7yqzWmgmc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/dcrjson/v4 v4.0.1 h1:vyQuB1miwGqbCVNm8P6br3V65WQ6wyrh0LycMkvaBBg= github.com/decred/dcrd/dcrjson/v4 v4.0.1/go.mod h1:2qVikafVF9/X3PngQVmqkbUbyAl32uik0k/kydgtqMc= github.com/decred/dcrd/dcrutil/v4 v4.0.0/go.mod h1:QQpX5WVH3/ixVtiW15xZMe+neugXX3l2bsrYgq6nz4M= -github.com/decred/dcrd/dcrutil/v4 v4.0.1 h1:E+d2TNbpOj0f1L9RqkZkEm1QolFjajvkzxWC5WOPf1s= -github.com/decred/dcrd/dcrutil/v4 v4.0.1/go.mod h1:7EXyHYj8FEqY+WzMuRkF0nh32ueLqhutZDoW4eQ+KRc= -github.com/decred/dcrd/gcs/v4 v4.0.0 h1:bet+Ax1ZFUqn2M0g1uotm0b8F6BZ9MmblViyJ088E8k= -github.com/decred/dcrd/gcs/v4 v4.0.0/go.mod h1:9z+EBagzpEdAumwS09vf/hiGaR8XhNmsBgaVq6u7/NI= -github.com/decred/dcrd/hdkeychain/v3 v3.1.1 h1:4WhyHNBy7ec6qBUC7Fq7JFVGSd7bpuR5H+AJRID8Lyk= -github.com/decred/dcrd/hdkeychain/v3 v3.1.1/go.mod h1:HaabrLc27lnny5/Ph9+6I3szp0op5MCb7smEwlzfD60= +github.com/decred/dcrd/dcrutil/v4 v4.0.2 h1:eIl3E6gGln54qE8nk5o5lLtjh2/9C2Rz63OpD662h+8= +github.com/decred/dcrd/dcrutil/v4 v4.0.2/go.mod h1:iS3JB1ac3R3FgfpTF1kBD+SPNet8TmiW3Br+/Jc5MC8= +github.com/decred/dcrd/gcs/v4 v4.1.0 h1:tpW7JW53yJZlgNwl/n2NL1b8NxHaIPRUyNuLMkB/Hks= +github.com/decred/dcrd/gcs/v4 v4.1.0/go.mod h1:nPTbGM/I3Ihe5KFvUmxZEqQP/jDZQjQ63+WEi/f4lqU= +github.com/decred/dcrd/hdkeychain/v3 v3.1.2 h1:x25WuuE7zM/20EynuVMyOhL0K8BwGBBsexGq8xTiHFA= +github.com/decred/dcrd/hdkeychain/v3 v3.1.2/go.mod h1:FnNJmZ7jqUDeAo6/c/xkQi5cuxh3EWtJeMmW6/Z8lcc= 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/math/uint256 v1.0.1 h1:SUMHmqi4GQwBNdueS5Pjj6Pzr3fZrc31skpSuEb6e64= github.com/decred/dcrd/math/uint256 v1.0.1/go.mod h1:7M/y9wJJvlyNG/f/X6mxxhxo9dgloZHFiOfbiscl75A= +github.com/decred/dcrd/mixing v0.1.0 h1:XmRdBipQE7dSpY/5VAvI2EOqGu9bzAh2KzS0JSZ1CIs= +github.com/decred/dcrd/mixing v0.1.0/go.mod h1:W3K7yJKmoI03G2U5Yw+HSRNe6lLBegi63ZR6fFLnM9c= github.com/decred/dcrd/peer/v3 v3.0.2 h1:akcB/L5tZcV/LV5LsiAAeShzvus8mjwvkLI20b1aSUM= github.com/decred/dcrd/peer/v3 v3.0.2/go.mod h1:J3Wwi3biKzsIoQS61LnpFyjDgP7oigdoptf2r6yNMBQ= -github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.1.0 h1:kQFK7FMTmMDX9amyhh8IR0vwwI8dH0KCBm42C64bWVs= -github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.1.0/go.mod h1:dDHO7ivrPAhZjFD3LoOJN/kdq5gi0sxie6zCsWHAiUo= -github.com/decred/dcrd/rpcclient/v8 v8.0.0 h1:O4B5d+8e2OjbeFW+c1XcZNQzyp++04ArWhXgYrsURus= -github.com/decred/dcrd/rpcclient/v8 v8.0.0/go.mod h1:gx4+DI5apuOEeLwPBJFlMoj3GFWq1I7/X8XCQmMTi8Q= +github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.2.0 h1:BmxdaVwddO5UeYkWFO1JIZiQe8kE1DdNkohlLx9aDec= +github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.2.0/go.mod h1:dDHO7ivrPAhZjFD3LoOJN/kdq5gi0sxie6zCsWHAiUo= +github.com/decred/dcrd/rpcclient/v8 v8.0.1 h1:hd81e4w1KSqvPcozJlnz6XJfWKDNuahgooH/N5E8vOU= +github.com/decred/dcrd/rpcclient/v8 v8.0.1/go.mod h1:97XD5P/XrZzedePPFPJzc8el2o00q2Kr+Epi4AvRL3o= github.com/decred/dcrd/txscript/v4 v4.0.0/go.mod h1:OJtxNc5RqwQyfrRnG2gG8uMeNPo8IAJp+TD1UKXkqk8= -github.com/decred/dcrd/txscript/v4 v4.1.0 h1:uEdcibIOl6BuWj3AqmXZ9xIK/qbo6lHY9aNk29FtkrU= -github.com/decred/dcrd/txscript/v4 v4.1.0/go.mod h1:OVguPtPc4YMkgssxzP8B6XEMf/J3MB6S1JKpxgGQqi0= +github.com/decred/dcrd/txscript/v4 v4.1.1 h1:R4M2+jMujgQA91899SkL0cW66d6DC76Gx+1W1oEHjc0= +github.com/decred/dcrd/txscript/v4 v4.1.1/go.mod h1:7ybmJoI+b6dxvQ+0aXdZpkyrj0PbnylJCzFxD1g8+/A= github.com/decred/dcrd/wire v1.2.0/go.mod h1:/JKOsLInOJu6InN+/zH5AyCq3YDIOW/EqcffvU8fJHM= github.com/decred/dcrd/wire v1.5.0/go.mod h1:fzAjVqw32LkbAZIt5mnrvBR751GTa3e0rRQdOIhPY3w= -github.com/decred/dcrd/wire v1.6.0 h1:YOGwPHk4nzGr6OIwUGb8crJYWDiVLpuMxfDBCCF7s/o= -github.com/decred/dcrd/wire v1.6.0/go.mod h1:XQ8Xv/pN/3xaDcb7sH8FBLS9cdgVctT7HpBKKGsIACk= +github.com/decred/dcrd/wire v1.7.0 h1:5JHiDjEQeS4XUl4PfnTZYLwAD/E/+LwBmPRec/fP76o= +github.com/decred/dcrd/wire v1.7.0/go.mod h1:lAqrzV0SU4kyV6INLEJgDtUjJaTaVKrbF4LHtaYl+zU= github.com/decred/dcrtest/dcrdtest v1.0.1-0.20231217203517-3d06801da382 h1:8BmWipm7/z/HwcN1hD+JMne7xF66SqJEGASs/qBmN0o= github.com/decred/dcrtest/dcrdtest v1.0.1-0.20231217203517-3d06801da382/go.mod h1:kbRQzyWu1IfukYZqCioVyJokzu1ifvIXzVDrXReeOsQ= github.com/decred/go-socks v1.1.0 h1:dnENcc0KIqQo3HSXdgboXAHgqsCIutkqq6ntQjYtm2U= @@ -332,8 +334,8 @@ github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= 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.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= @@ -661,8 +663,8 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= 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= @@ -739,8 +741,8 @@ golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 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= @@ -760,8 +762,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/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.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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= @@ -816,14 +818,14 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 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= @@ -834,8 +836,8 @@ golang.org/x/text v0.3.5/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.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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= @@ -1041,8 +1043,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh 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= -lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= -lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= +lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= +lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= matheusd.com/testctx v0.1.0 h1:MBpaNuqr23ugnkA59gz8Bd6BQIGkvZr7M4vYAc/Apzc= matheusd.com/testctx v0.1.0/go.mod h1:u9la0YA1XIBcEpTU/aHJ9q4/L0VttkwhkG2m4lrj7Ls= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/testutils/embeddedwallet.go b/internal/testutils/embeddedwallet.go index 1c171af3d0..83dbaa66d4 100644 --- a/internal/testutils/embeddedwallet.go +++ b/internal/testutils/embeddedwallet.go @@ -8,10 +8,11 @@ import ( "os" "time" - "decred.org/dcrwallet/v3/chain" - "decred.org/dcrwallet/v3/p2p" - "decred.org/dcrwallet/v3/spv" - wallet "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/chain" + "decred.org/dcrwallet/v4/p2p" + "decred.org/dcrwallet/v4/spv" + wallet "decred.org/dcrwallet/v4/wallet" + "decred.org/dcrwallet/v4/wallet/udb" "github.com/decred/dcrd/addrmgr/v2" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" @@ -33,6 +34,8 @@ func init() { wallet.UseLogger(build.NewSubLogger("DCRW", nil)) p2p.UseLogger(build.NewSubLogger("DCRW", nil)) spv.UseLogger(build.NewSubLogger("DCRW", nil)) + chain.UseLogger(build.NewSubLogger("DCRW", nil)) + udb.UseLogger(build.NewSubLogger("DCRW", nil)) } // NewRPCSyncingTestWallet creates a test wallet that syncs itself using the @@ -56,8 +59,9 @@ func NewRPCSyncingTestWallet(t TB, rpcConfig *rpcclient.ConnConfig) (*wallet.Wal pass := []byte("test") + birthday := time.Now().Add(-time.Hour * 24) w, err := loader.CreateNewWallet( - context.Background(), pass, pass, testHDSeed[:], + context.Background(), pass, pass, testHDSeed[:], birthday, ) if err != nil { t.Fatal(err) @@ -77,7 +81,13 @@ func NewRPCSyncingTestWallet(t TB, rpcConfig *rpcclient.ConnConfig) (*wallet.Wal syncerCtx, cancel := context.WithCancel(context.Background()) initialSync := make(chan struct{}) syncer.SetCallbacks(&chain.Callbacks{ - Synced: func(_ bool) { close(initialSync) }, + Synced: func(_ bool) { + select { + case <-initialSync: + default: + close(initialSync) + } + }, }) go syncer.Run(syncerCtx) @@ -121,8 +131,9 @@ func NewSPVSyncingTestWallet(t TB, p2pAddr string) (*wallet.Wallet, func()) { pass := []byte("test") + birthday := time.Now().Add(-time.Hour * 24) w, err := loader.CreateNewWallet( - context.Background(), pass, pass, testHDSeed[:], + context.Background(), pass, pass, testHDSeed[:], birthday, ) if err != nil { t.Fatal(err) @@ -138,11 +149,33 @@ func NewSPVSyncingTestWallet(t TB, p2pAddr string) (*wallet.Wallet, func()) { lp := p2p.NewLocalPeer(w.ChainParams(), addr, amgr) syncer := spv.NewSyncer(w, lp) syncer.SetPersistentPeers([]string{p2pAddr}) + syncedChan := make(chan struct{}) + spvNtfns := &spv.Notifications{ + Synced: func(isSynced bool) { + if isSynced { + select { + case <-syncedChan: + default: + close(syncedChan) + } + } + }, + } + syncer.SetNotifications(spvNtfns) w.SetNetworkBackend(syncer) ctx, cancel := context.WithCancel(context.Background()) syncerChan := make(chan error, 1) go func() { syncerChan <- syncer.Run(ctx) }() + // Wait until the initial sync completes. + select { + case <-syncedChan: + case err := <-syncerChan: + t.Fatalf("syncer.Run failed: %v", err) + case <-time.After(30 * time.Second): + t.Fatalf("timeout waiting for initial spv sync") + } + cleanUp := func() { cancel() select { diff --git a/internal/testutils/remotewallet.go b/internal/testutils/remotewallet.go index 3a7abf7526..5c30ec97da 100644 --- a/internal/testutils/remotewallet.go +++ b/internal/testutils/remotewallet.go @@ -12,7 +12,7 @@ import ( "sync/atomic" "time" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/rpcclient/v8" "github.com/decred/dcrlnd/lntest/wait" "google.golang.org/grpc" diff --git a/lncfg/dcrwallet.go b/lncfg/dcrwallet.go index e67afa0330..073b5bce6f 100644 --- a/lncfg/dcrwallet.go +++ b/lncfg/dcrwallet.go @@ -1,6 +1,6 @@ package lncfg -import "decred.org/dcrwallet/v3/p2p" +import "decred.org/dcrwallet/v4/p2p" type DcrwalletConfig struct { GRPCHost string `long:"grpchost" description:"The wallet's grpc listening address. If a port is omitted, then the default port for the selected chain parameters will be used."` @@ -12,5 +12,7 @@ type DcrwalletConfig struct { SPV bool `long:"spv" description:"Whether to use SPV mode when using an embedded wallet"` SPVConnect []string `long:"spvconnect" description:"Addresses to connect to when using spv mode"` + DisableRelayTx bool `long:"disablerelaytx" description:"Disable receiving mempool transactions in SPV mode"` + DialFunc p2p.DialFunc } diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index d94455e19d..c83ee3e038 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -13,7 +13,7 @@ import ( "path/filepath" "time" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/blockchain/standalone/v2" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec" diff --git a/lntest/dcrd.go b/lntest/dcrd.go index 4ca1b16011..5018af4506 100644 --- a/lntest/dcrd.go +++ b/lntest/dcrd.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/rpcclient/v8" rpctest "github.com/decred/dcrtest/dcrdtest" ) diff --git a/lntest/dcrlnd_harness.go b/lntest/dcrlnd_harness.go index a075bc7fc5..f3859dbe71 100644 --- a/lntest/dcrlnd_harness.go +++ b/lntest/dcrlnd_harness.go @@ -10,7 +10,7 @@ import ( "strings" "time" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrutil/v4" "github.com/decred/dcrd/hdkeychain/v3" diff --git a/lntest/harness_node.go b/lntest/harness_node.go index 24f053a372..52146838a9 100644 --- a/lntest/harness_node.go +++ b/lntest/harness_node.go @@ -18,7 +18,7 @@ import ( "sync/atomic" "time" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/dcrutil/v4" "github.com/decred/dcrd/wire" diff --git a/lntest/mock/walletcontroller.go b/lntest/mock/walletcontroller.go index 7a68272a91..1a55c2080d 100644 --- a/lntest/mock/walletcontroller.go +++ b/lntest/mock/walletcontroller.go @@ -5,8 +5,8 @@ import ( "sync/atomic" "time" - "decred.org/dcrwallet/v3/wallet" - "decred.org/dcrwallet/v3/wallet/txauthor" + "decred.org/dcrwallet/v4/wallet" + "decred.org/dcrwallet/v4/wallet/txauthor" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/dcrec/secp256k1/v4" diff --git a/lntest/spv.go b/lntest/spv.go index 4ed3eea364..a28d6cf40c 100644 --- a/lntest/spv.go +++ b/lntest/spv.go @@ -7,7 +7,7 @@ import ( "context" "testing" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" rpctest "github.com/decred/dcrtest/dcrdtest" ) diff --git a/lnwallet/dcrwallet/config.go b/lnwallet/dcrwallet/config.go index 62cec335af..58ec97f5fa 100644 --- a/lnwallet/dcrwallet/config.go +++ b/lnwallet/dcrwallet/config.go @@ -11,14 +11,14 @@ import ( "github.com/decred/dcrlnd/lnwallet" "github.com/decred/dcrlnd/lnwallet/chainfee" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" walletloader "github.com/decred/dcrlnd/lnwallet/dcrwallet/loader" // This is required to register bdb as a valid walletdb driver. In the // init function of the package, it registers itself. The import is used // to activate the side effects w/o actually binding the package name to // a file-level variable. - _ "decred.org/dcrwallet/v3/wallet/drivers/bdb" + _ "decred.org/dcrwallet/v4/wallet/drivers/bdb" ) // WalletSyncer is an exported interface for the available wallet sync backends diff --git a/lnwallet/dcrwallet/dcrwchainio.go b/lnwallet/dcrwallet/dcrwchainio.go index 83f2d3c8be..55695d373f 100644 --- a/lnwallet/dcrwallet/dcrwchainio.go +++ b/lnwallet/dcrwallet/dcrwchainio.go @@ -11,8 +11,8 @@ import ( "github.com/decred/dcrlnd/chainscan/csdrivers" "github.com/decred/dcrlnd/lnwallet" - "decred.org/dcrwallet/v3/errors" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/errors" + "decred.org/dcrwallet/v4/wallet" ) // Compile time check to ensure DcrWallet fulfills lnwallet.BlockChainIO. diff --git a/lnwallet/dcrwallet/extended_wallet.go b/lnwallet/dcrwallet/extended_wallet.go index 3532facf35..b10cf3e40e 100644 --- a/lnwallet/dcrwallet/extended_wallet.go +++ b/lnwallet/dcrwallet/extended_wallet.go @@ -3,9 +3,9 @@ package dcrwallet import ( "context" - "decred.org/dcrwallet/v3/errors" - walleterr "decred.org/dcrwallet/v3/errors" - base "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/errors" + walleterr "decred.org/dcrwallet/v4/errors" + base "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/decred/dcrd/dcrutil/v4" diff --git a/lnwallet/dcrwallet/keychain.go b/lnwallet/dcrwallet/keychain.go index 9db38958ce..017bbcd2a2 100644 --- a/lnwallet/dcrwallet/keychain.go +++ b/lnwallet/dcrwallet/keychain.go @@ -6,8 +6,8 @@ import ( "github.com/decred/dcrlnd/channeldb" "github.com/decred/dcrlnd/keychain" - "decred.org/dcrwallet/v3/wallet" - "decred.org/dcrwallet/v3/wallet/udb" + "decred.org/dcrwallet/v4/wallet" + "decred.org/dcrwallet/v4/wallet/udb" "github.com/decred/dcrd/hdkeychain/v3" ) diff --git a/lnwallet/dcrwallet/keychain_test.go b/lnwallet/dcrwallet/keychain_test.go index 6e0e9f93b5..52679076de 100644 --- a/lnwallet/dcrwallet/keychain_test.go +++ b/lnwallet/dcrwallet/keychain_test.go @@ -5,11 +5,12 @@ import ( "io/ioutil" "os" "testing" + "time" "github.com/decred/dcrlnd/channeldb" "github.com/decred/dcrlnd/keychain" - wallet "decred.org/dcrwallet/v3/wallet" + wallet "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" walletloader "github.com/decred/dcrlnd/lnwallet/dcrwallet/loader" @@ -34,8 +35,9 @@ func createTestWallet() (func(), *wallet.Wallet, *channeldb.DB, error) { pass := []byte("test") + birthday := time.Now().Add(-time.Hour * 24) baseWallet, err := loader.CreateNewWallet( - context.Background(), pass, pass, testHDSeed[:], + context.Background(), pass, pass, testHDSeed[:], birthday, ) if err != nil { return nil, nil, nil, err diff --git a/lnwallet/dcrwallet/loader/loader.go b/lnwallet/dcrwallet/loader/loader.go index abcc811855..0ec48d6f45 100644 --- a/lnwallet/dcrwallet/loader/loader.go +++ b/lnwallet/dcrwallet/loader/loader.go @@ -13,10 +13,11 @@ import ( "sync" "time" - "decred.org/dcrwallet/v3/errors" - "decred.org/dcrwallet/v3/wallet" - _ "decred.org/dcrwallet/v3/wallet/drivers/bdb" // driver loaded during init - "decred.org/dcrwallet/v3/wallet/txrules" + "decred.org/dcrwallet/v4/errors" + "decred.org/dcrwallet/v4/wallet" + _ "decred.org/dcrwallet/v4/wallet/drivers/bdb" // driver loaded during init + "decred.org/dcrwallet/v4/wallet/txrules" + "decred.org/dcrwallet/v4/wallet/udb" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/dcrutil/v4" "github.com/decred/dcrd/hdkeychain/v3" @@ -205,7 +206,8 @@ func (l *Loader) CreateNewWalletExtendedKey(ctx context.Context, // CreateNewWallet creates a new wallet using the provided public and private // passphrases. The seed is optional. If non-nil, addresses are derived from // this seed. If nil, a secure random seed is generated. -func (l *Loader) CreateNewWallet(ctx context.Context, pubPassphrase, privPassphrase, seed []byte) (w *wallet.Wallet, err error) { +func (l *Loader) CreateNewWallet(ctx context.Context, pubPassphrase, + privPassphrase, seed []byte, birthday time.Time) (w *wallet.Wallet, err error) { const op errors.Op = "loader.CreateNewWallet" defer l.mu.Unlock() @@ -281,6 +283,14 @@ func (l *Loader) CreateNewWallet(ctx context.Context, pubPassphrase, privPassphr return nil, errors.E(op, err) } + bs := &udb.BirthdayState{ + SetFromTime: true, + Time: birthday, + } + if err := w.SetBirthState(ctx, bs); err != nil { + return nil, errors.E(op, err) + } + l.onLoaded(w, db) return w, nil } diff --git a/lnwallet/dcrwallet/log.go b/lnwallet/dcrwallet/log.go index a0f348595c..a8a8cf0455 100644 --- a/lnwallet/dcrwallet/log.go +++ b/lnwallet/dcrwallet/log.go @@ -1,11 +1,11 @@ package dcrwallet import ( - "decred.org/dcrwallet/v3/chain" - "decred.org/dcrwallet/v3/p2p" - "decred.org/dcrwallet/v3/spv" - base "decred.org/dcrwallet/v3/wallet" - "decred.org/dcrwallet/v3/wallet/udb" + "decred.org/dcrwallet/v4/chain" + "decred.org/dcrwallet/v4/p2p" + "decred.org/dcrwallet/v4/spv" + base "decred.org/dcrwallet/v4/wallet" + "decred.org/dcrwallet/v4/wallet/udb" "github.com/decred/dcrd/addrmgr/v2" "github.com/decred/dcrlnd/build" "github.com/decred/dcrlnd/lnwallet/dcrwallet/loader" diff --git a/lnwallet/dcrwallet/rpcchainio.go b/lnwallet/dcrwallet/rpcchainio.go index d0cd7cc4d2..c4177578ad 100644 --- a/lnwallet/dcrwallet/rpcchainio.go +++ b/lnwallet/dcrwallet/rpcchainio.go @@ -14,7 +14,7 @@ import ( "github.com/decred/dcrlnd/blockcache" "github.com/decred/dcrlnd/lnwallet" - "decred.org/dcrwallet/v3/errors" + "decred.org/dcrwallet/v4/errors" ) var ( diff --git a/lnwallet/dcrwallet/rpcsync.go b/lnwallet/dcrwallet/rpcsync.go index 2fcb9be59f..6cb7df2fa7 100644 --- a/lnwallet/dcrwallet/rpcsync.go +++ b/lnwallet/dcrwallet/rpcsync.go @@ -8,8 +8,8 @@ import ( "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/rpcclient/v8" - "decred.org/dcrwallet/v3/chain" - "decred.org/dcrwallet/v3/errors" + "decred.org/dcrwallet/v4/chain" + "decred.org/dcrwallet/v4/errors" ) // RPCSyncer implements the required methods for synchronizing a DcrWallet diff --git a/lnwallet/dcrwallet/signer.go b/lnwallet/dcrwallet/signer.go index 434abf71e0..1e985e8eed 100644 --- a/lnwallet/dcrwallet/signer.go +++ b/lnwallet/dcrwallet/signer.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "decred.org/dcrwallet/v3/errors" - base "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/errors" + base "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec" "github.com/decred/dcrd/dcrec/secp256k1/v4" diff --git a/lnwallet/dcrwallet/spvsync.go b/lnwallet/dcrwallet/spvsync.go index 04eec4bddb..1b2950d996 100644 --- a/lnwallet/dcrwallet/spvsync.go +++ b/lnwallet/dcrwallet/spvsync.go @@ -10,15 +10,16 @@ import ( "github.com/decred/dcrd/addrmgr/v2" "github.com/decred/dcrd/chaincfg/v3" - "decred.org/dcrwallet/v3/p2p" - "decred.org/dcrwallet/v3/spv" + "decred.org/dcrwallet/v4/p2p" + "decred.org/dcrwallet/v4/spv" ) type SPVSyncerConfig struct { - Peers []string - Net *chaincfg.Params - AppDataDir string - DialFunc p2p.DialFunc + Peers []string + Net *chaincfg.Params + AppDataDir string + DialFunc p2p.DialFunc + DisableRelayTx bool } // SPVSyncer implements the required methods for synchronizing a DcrWallet @@ -59,6 +60,7 @@ func (s *SPVSyncer) start(w *DcrWallet) error { if s.cfg.DialFunc != nil { lp.SetDialFunc(s.cfg.DialFunc) } + lp.SetDisableRelayTx(s.cfg.DisableRelayTx) syncer := spv.NewSyncer(w.wallet, lp) if len(s.cfg.Peers) > 0 { diff --git a/lnwallet/dcrwallet/wallet.go b/lnwallet/dcrwallet/wallet.go index e0796e6940..a6b28f8aca 100644 --- a/lnwallet/dcrwallet/wallet.go +++ b/lnwallet/dcrwallet/wallet.go @@ -23,10 +23,10 @@ import ( "github.com/decred/dcrlnd/lnwallet" "github.com/decred/dcrlnd/lnwallet/chainfee" - "decred.org/dcrwallet/v3/wallet" - base "decred.org/dcrwallet/v3/wallet" - "decred.org/dcrwallet/v3/wallet/txauthor" - "decred.org/dcrwallet/v3/wallet/udb" + "decred.org/dcrwallet/v4/wallet" + base "decred.org/dcrwallet/v4/wallet" + "decred.org/dcrwallet/v4/wallet/txauthor" + "decred.org/dcrwallet/v4/wallet/udb" walletloader "github.com/decred/dcrlnd/lnwallet/dcrwallet/loader" ) @@ -122,7 +122,7 @@ func New(cfg Config) (*DcrWallet, error) { if !walletExists { // Wallet has never been created, perform initial set up. wallet, err = loader.CreateNewWallet(context.TODO(), cfg.PublicPass, cfg.PrivatePass, - cfg.HdSeed) + cfg.HdSeed, time.Now().Add(-time.Hour*24)) if err != nil { return nil, err } diff --git a/lnwallet/interface.go b/lnwallet/interface.go index d43d3ab2ae..57ed3722c0 100644 --- a/lnwallet/interface.go +++ b/lnwallet/interface.go @@ -6,8 +6,8 @@ import ( "sync" "time" - "decred.org/dcrwallet/v3/wallet" - "decred.org/dcrwallet/v3/wallet/txauthor" + "decred.org/dcrwallet/v4/wallet" + "decred.org/dcrwallet/v4/wallet/txauthor" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa" diff --git a/lnwallet/parameters.go b/lnwallet/parameters.go index 00922e1e6d..63ed1affd6 100644 --- a/lnwallet/parameters.go +++ b/lnwallet/parameters.go @@ -1,7 +1,7 @@ package lnwallet import ( - "decred.org/dcrwallet/v3/wallet/txrules" + "decred.org/dcrwallet/v4/wallet/txrules" "github.com/decred/dcrd/dcrutil/v4" "github.com/decred/dcrlnd/input" "github.com/decred/dcrlnd/lnwallet/chainfee" diff --git a/lnwallet/remotedcrwallet/extended_wallet.go b/lnwallet/remotedcrwallet/extended_wallet.go index aebe499f09..2c2a75beb4 100644 --- a/lnwallet/remotedcrwallet/extended_wallet.go +++ b/lnwallet/remotedcrwallet/extended_wallet.go @@ -4,7 +4,7 @@ import ( "errors" "io" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/decred/dcrd/txscript/v4/stdaddr" diff --git a/lnwallet/remotedcrwallet/keychain_test.go b/lnwallet/remotedcrwallet/keychain_test.go index 7d2a9d1822..f4e0a44a8b 100644 --- a/lnwallet/remotedcrwallet/keychain_test.go +++ b/lnwallet/remotedcrwallet/keychain_test.go @@ -6,12 +6,13 @@ import ( "io/ioutil" "os" "testing" + "time" "github.com/decred/dcrlnd/channeldb" "github.com/decred/dcrlnd/keychain" "github.com/decred/dcrlnd/lnwallet" - base "decred.org/dcrwallet/v3/wallet" + base "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" @@ -77,8 +78,9 @@ func createTestWallet() (func(), *hdkeychain.ExtendedKey, *channeldb.DB, onchain pass := []byte("test") + birthday := time.Now().Add(-time.Hour * 24) baseWallet, err := loader.CreateNewWallet( - context.Background(), pass, pass, testHDSeed[:], + context.Background(), pass, pass, testHDSeed[:], birthday, ) if err != nil { return nil, nil, nil, nil, err diff --git a/lnwallet/remotedcrwallet/remotedcrwchainio.go b/lnwallet/remotedcrwallet/remotedcrwchainio.go index 53e4649d7f..8723f034c0 100644 --- a/lnwallet/remotedcrwallet/remotedcrwchainio.go +++ b/lnwallet/remotedcrwallet/remotedcrwchainio.go @@ -4,7 +4,7 @@ import ( "context" "time" - "decred.org/dcrwallet/v3/rpc/walletrpc" + "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/wire" diff --git a/lnwallet/remotedcrwallet/signer.go b/lnwallet/remotedcrwallet/signer.go index 693f0ef54b..7cec8632d7 100644 --- a/lnwallet/remotedcrwallet/signer.go +++ b/lnwallet/remotedcrwallet/signer.go @@ -9,7 +9,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrec" "github.com/decred/dcrd/dcrec/secp256k1/v4" diff --git a/lnwallet/remotedcrwallet/wallet.go b/lnwallet/remotedcrwallet/wallet.go index 8b87a29655..2f576d742f 100644 --- a/lnwallet/remotedcrwallet/wallet.go +++ b/lnwallet/remotedcrwallet/wallet.go @@ -11,12 +11,12 @@ import ( "sync/atomic" "time" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" - "decred.org/dcrwallet/v3/wallet" - base "decred.org/dcrwallet/v3/wallet" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" + "decred.org/dcrwallet/v4/wallet" + base "decred.org/dcrwallet/v4/wallet" "google.golang.org/grpc" - "decred.org/dcrwallet/v3/wallet/txauthor" + "decred.org/dcrwallet/v4/wallet/txauthor" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/dcrec" diff --git a/lnwallet/test/test_interface.go b/lnwallet/test/test_interface.go index 28b53cff86..3b65e8f007 100644 --- a/lnwallet/test/test_interface.go +++ b/lnwallet/test/test_interface.go @@ -24,7 +24,7 @@ import ( "golang.org/x/exp/slices" "matheusd.com/testctx" - _ "decred.org/dcrwallet/v3/wallet/drivers/bdb" + _ "decred.org/dcrwallet/v4/wallet/drivers/bdb" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" diff --git a/routing/chainview/dcrwallet.go b/routing/chainview/dcrwallet.go index 55da436450..82c0fc6fc5 100644 --- a/routing/chainview/dcrwallet.go +++ b/routing/chainview/dcrwallet.go @@ -1,7 +1,7 @@ package chainview import ( - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrlnd/blockcache" "github.com/decred/dcrlnd/chainntnfs/dcrwnotify" "github.com/decred/dcrlnd/chainntnfs/remotedcrwnotify" diff --git a/routing/chainview/interface_test.go b/routing/chainview/interface_test.go index 97e35d7e97..1f2bb144f9 100644 --- a/routing/chainview/interface_test.go +++ b/routing/chainview/interface_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrd/dcrec" @@ -546,16 +546,31 @@ func testFilterBlockDisconnected(node *rpctest.Harness, ctxb := context.Background() + // NOTE(decred): the original upstream test that reorgs all the way to + // genesis has been removed here in favor of only testing the 10-way + // reorg due to SPV not (easily) exposing a reorg all the way to + // genesis. + // Create a node that has a shorter chain than the main chain, so we // can trigger a reorg. reorgNode, err := testutils.NewSetupRPCTest( - testctx.New(t), 5, netParams, nil, []string{"--txindex"}, true, 5, + testctx.New(t), 5, netParams, nil, []string{"--txindex"}, false, 0, ) if err != nil { t.Fatalf("unable to create mining node: %v", err) } defer reorgNode.TearDown() + // Connect the node with the short chain to the main node, and wait + // for their chains to synchronize. + if err := rpctest.ConnectNode(ctxb, reorgNode, node); err != nil { + t.Fatalf("unable to connect harnesses: %v", err) + } + nodeSlice := []*rpctest.Harness{node, reorgNode} + if err := rpctest.JoinNodes(ctxb, nodeSlice, rpctest.Blocks); err != nil { + t.Fatalf("unable to join node on blocks: %v", err) + } + // Init a chain view that has this node as its block source. cleanUpFunc, reorgView, err := chainViewInit(t, reorgNode) if err != nil { @@ -575,60 +590,11 @@ func testFilterBlockDisconnected(node *rpctest.Harness, newBlocks := reorgView.FilteredBlocks() disconnectedBlocks := reorgView.DisconnectedBlocks() - _, oldHeight, err := reorgNode.Node.GetBestBlock(context.TODO()) - if err != nil { - t.Fatalf("unable to get current height: %v", err) - } - - // Now connect the node with the short chain to the main node, and wait - // for their chains to synchronize. The short chain will be reorged all - // the way back to genesis. - if err := rpctest.ConnectNode(ctxb, reorgNode, node); err != nil { - t.Fatalf("unable to connect harnesses: %v", err) - } - nodeSlice := []*rpctest.Harness{node, reorgNode} - if err := rpctest.JoinNodes(ctxb, nodeSlice, rpctest.Blocks); err != nil { - t.Fatalf("unable to join node on blocks: %v", err) - } - _, newHeight, err := reorgNode.Node.GetBestBlock(context.TODO()) if err != nil { t.Fatalf("unable to get current height: %v", err) } - // We should be getting oldHeight number of blocks marked as - // stale/disconnected. We expect to first get all stale blocks, - // then the new blocks. We also ensure a strict ordering. - for i := int64(0); i < oldHeight+newHeight; i++ { - select { - case block := <-newBlocks: - if i < oldHeight { - t.Fatalf("did not expect to get new block "+ - "in iteration %d, old height: %v", i, - oldHeight) - } - expectedHeight := i - oldHeight + 1 - if block.Height != expectedHeight { - t.Fatalf("expected to receive connected "+ - "block at height %d, instead got at %d", - expectedHeight, block.Height) - } - case block := <-disconnectedBlocks: - if i >= oldHeight { - t.Fatalf("did not expect to get stale block "+ - "in iteration %d", i) - } - expectedHeight := oldHeight - i - if block.Height != expectedHeight { - t.Fatalf("expected to receive disconnected "+ - "block at height %d, instead got at %d", - expectedHeight, block.Height) - } - case <-time.After(10 * time.Second): - t.Fatalf("timeout waiting for block") - } - } - // Now we trigger a small reorg, by disconnecting the nodes, mining // a few blocks on each, then connecting them again. peers, err := reorgNode.Node.GetPeerInfo(context.TODO()) @@ -689,7 +655,7 @@ func testFilterBlockDisconnected(node *rpctest.Harness, } } - _, oldHeight, err = reorgNode.Node.GetBestBlock(context.TODO()) + _, oldHeight, err := reorgNode.Node.GetBestBlock(context.TODO()) if err != nil { t.Fatalf("unable to get current height: %v", err) } diff --git a/rpcserver.go b/rpcserver.go index a720cc050a..1eff2d259c 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -17,7 +17,7 @@ import ( "sync/atomic" "time" - "decred.org/dcrwallet/v3/wallet/txauthor" + "decred.org/dcrwallet/v4/wallet/txauthor" "github.com/davecgh/go-spew/spew" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v3" diff --git a/sample-dcrlnd.conf b/sample-dcrlnd.conf index f8017369cc..a7f9afd47c 100644 --- a/sample-dcrlnd.conf +++ b/sample-dcrlnd.conf @@ -567,6 +567,10 @@ ; instead of performing node address discovery. ; dcrwallet.spvconnect = 127.0.0.1:9108 +; Whether to disable receiving mempool transactions from other peers when in SPV +; mode. +; dcrwallet.disablerelaytx = 1 + [autopilot] ; If the autopilot agent should be active or not. The autopilot agent will diff --git a/walletunlocker/dcrlnd_service.go b/walletunlocker/dcrlnd_service.go index 7bbb2e1bff..a1b3127906 100644 --- a/walletunlocker/dcrlnd_service.go +++ b/walletunlocker/dcrlnd_service.go @@ -7,7 +7,7 @@ import ( "fmt" "io/ioutil" - pb "decred.org/dcrwallet/v3/rpc/walletrpc" + pb "decred.org/dcrwallet/v4/rpc/walletrpc" "github.com/decred/dcrd/hdkeychain/v3" "github.com/decred/dcrlnd/lnrpc" "google.golang.org/grpc" diff --git a/walletunlocker/service.go b/walletunlocker/service.go index c2d1e3fdea..7d8716f528 100644 --- a/walletunlocker/service.go +++ b/walletunlocker/service.go @@ -20,7 +20,7 @@ import ( "github.com/decred/dcrlnd/lnwallet" "github.com/decred/dcrlnd/macaroons" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrlnd/lnwallet/dcrwallet" walletloader "github.com/decred/dcrlnd/lnwallet/dcrwallet/loader" "google.golang.org/grpc" @@ -339,11 +339,15 @@ func (u *UnlockerService) GenSeed(_ context.Context, } } + // Subtract 24h from the birthday, to ensure no reorgs could possibly + // make us miss some transactions. + birthday := time.Now().Add(-time.Hour * 24) + // Now that we have our set of entropy, we'll create a new cipher seed // instance. // cipherSeed, err := aezeed.New( - keychain.KeyDerivationVersion, &entropy, time.Now(), + keychain.KeyDerivationVersion, &entropy, birthday, ) if err != nil { return nil, err diff --git a/walletunlocker/service_test.go b/walletunlocker/service_test.go index 5e1ab63c61..c3d1cf3d64 100644 --- a/walletunlocker/service_test.go +++ b/walletunlocker/service_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "decred.org/dcrwallet/v3/wallet" + "decred.org/dcrwallet/v4/wallet" "github.com/decred/dcrd/chaincfg/v3" "github.com/decred/dcrlnd/aezeed" "github.com/decred/dcrlnd/keychain" @@ -69,10 +69,11 @@ func createTestWalletWithPw(t *testing.T, pubPw, privPw []byte, dir string, */ // Create a new test wallet that uses fast scrypt as KDF. + birthday := time.Now().Add(-time.Hour * 24) netDir := dcrwallet.NetworkDir(dir, netParams) loader := walletloader.NewLoader(netParams, netDir, wallet.DefaultGapLimit) _, err := loader.CreateNewWallet( - context.Background(), pubPw, privPw, testSeed, + context.Background(), pubPw, privPw, testSeed, birthday, ) require.NoError(t, err) err = loader.UnloadWallet()