Repository: decred/dcrd
Pull request #2511 (2020-12-16 16:17:42)

multi: Start blockchain/stake v4 module dev cycle. 
This updates the `dcrec/secp256k1` module version to v4 and updates import and dep sites. `txscript`, `dcrutil` and `blockchain/stake` have also been bumped since they use types in their public APIs affected by these module version updates and have not already been bumped since the last release.


Patch:
diff --git a/blockchain/accept.go b/blockchain/accept.go
index 751ac7d4..f415068e 100644
--- a/blockchain/accept.go
+++ b/blockchain/accept.go
@@ -8,9 +8,9 @@ package blockchain
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // maybeAcceptBlock potentially accepts a block into the block chain and, if
diff --git a/blockchain/blockindex.go b/blockchain/blockindex.go
index 9e2a28fa..34ddd79d 100644
--- a/blockchain/blockindex.go
+++ b/blockchain/blockindex.go
@@ -12,7 +12,7 @@ import (
 	"sync"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
diff --git a/blockchain/chain.go b/blockchain/chain.go
index 2f1bd924..b418b036 100644
--- a/blockchain/chain.go
+++ b/blockchain/chain.go
@@ -13,17 +13,17 @@ import (
 	"sync"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4/indexers"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/gcs/v3/blockcf2"
 	"github.com/decred/dcrd/lru"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/chaingen/generator.go b/blockchain/chaingen/generator.go
index ece58ab2..1a40cc70 100644
--- a/blockchain/chaingen/generator.go
+++ b/blockchain/chaingen/generator.go
@@ -17,8 +17,8 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/chainio.go b/blockchain/chainio.go
index 322ca111..9a4b276a 100644
--- a/blockchain/chainio.go
+++ b/blockchain/chainio.go
@@ -15,11 +15,11 @@ import (
 	"sort"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/gcs/v3/blockcf2"
 	"github.com/decred/dcrd/wire"
diff --git a/blockchain/checkpoints.go b/blockchain/checkpoints.go
index fbcf5600..3f069063 100644
--- a/blockchain/checkpoints.go
+++ b/blockchain/checkpoints.go
@@ -11,8 +11,8 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 )
 
 // CheckpointConfirmations is the number of blocks before the end of the current
diff --git a/blockchain/compress.go b/blockchain/compress.go
index 74d95da8..d6765a66 100644
--- a/blockchain/compress.go
+++ b/blockchain/compress.go
@@ -8,9 +8,9 @@ package blockchain
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/txscript/v4"
 )
 
 // currentCompressionVersion is the current script compression version of the
diff --git a/blockchain/go.mod b/blockchain/go.mod
index fba6845d..2bd3a100 100644
--- a/blockchain/go.mod
+++ b/blockchain/go.mod
@@ -3,22 +3,26 @@ module github.com/decred/dcrd/blockchain/v4
 go 1.13
 
 require (
-	github.com/decred/dcrd/blockchain/stake/v3 v3.0.0
+	github.com/decred/dcrd/blockchain/stake/v4 v4.0.0
 	github.com/decred/dcrd/blockchain/standalone/v2 v2.0.0
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0
 	github.com/decred/dcrd/database/v2 v2.0.2
 	github.com/decred/dcrd/dcrec v1.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
-	github.com/decred/dcrd/dcrutil/v3 v3.0.0
+	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0
+	github.com/decred/dcrd/dcrutil/v4 v4.0.0
 	github.com/decred/dcrd/gcs/v3 v3.0.0
 	github.com/decred/dcrd/lru v1.1.0
-	github.com/decred/dcrd/txscript/v3 v3.0.0
+	github.com/decred/dcrd/txscript/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.1.0
 )
 
 replace (
+	github.com/decred/dcrd/blockchain/stake/v4 => ./stake
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../dcrutil
 	github.com/decred/dcrd/gcs/v3 => ../gcs
 	github.com/decred/dcrd/lru => ../lru
+	github.com/decred/dcrd/txscript/v4 => ../txscript
 )
diff --git a/blockchain/go.sum b/blockchain/go.sum
index 99a0ec80..820b00ae 100644
--- a/blockchain/go.sum
+++ b/blockchain/go.sum
@@ -6,8 +6,6 @@ github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4=
 github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
 github.com/decred/base58 v1.0.3 h1:KGZuh8d1WEMIrK0leQRM47W85KqCAdl2N+uagbctdDI=
 github.com/decred/base58 v1.0.3/go.mod h1:pXP9cXCfM2sFLb2viz2FNIdeMWmZDBKG3ZBYbiSM78E=
-github.com/decred/dcrd/blockchain/stake/v3 v3.0.0 h1:vr0o0ICjuEzg1End6YtBfwgDuPkg+FYIwGVEz18kFg0=
-github.com/decred/dcrd/blockchain/stake/v3 v3.0.0/go.mod h1:5GIUwsrHQCJauacgCegIR6t92SaeVi28Qls/BLN9vOw=
 github.com/decred/dcrd/blockchain/standalone/v2 v2.0.0 h1:9gUuH0u/IZNPWBK9K3CxgAWPG7nTqVSsZefpGY4Okns=
 github.com/decred/dcrd/blockchain/standalone/v2 v2.0.0/go.mod h1:t2qaZ3hNnxHZ5kzVJDgW5sp47/8T5hYJt7SR+/JtRhI=
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyLRN07EO0cNBV6DGU=
@@ -28,8 +26,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317h
 github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
 github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9rnZcIOZo=
 github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
-github.com/decred/dcrd/txscript/v3 v3.0.0 h1:74NmirXAIskbGP0g9OWtrmN7OxDbWJ9G73a5uoxTkcM=
-github.com/decred/dcrd/txscript/v3 v3.0.0/go.mod h1:pdvnlD4KGdDoc09cvWRJ8EoRQUaiUz41uDevOWuEfII=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
 github.com/decred/slog v1.1.0 h1:uz5ZFfmaexj1rEDgZvzQ7wjGkoSPjw2LCh8K+K1VrW4=
diff --git a/blockchain/headercmt.go b/blockchain/headercmt.go
index 9df364f1..24f7e0c8 100644
--- a/blockchain/headercmt.go
+++ b/blockchain/headercmt.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/blockchain/indexers/addrindex.go b/blockchain/indexers/addrindex.go
index b434e8ea..5dad123a 100644
--- a/blockchain/indexers/addrindex.go
+++ b/blockchain/indexers/addrindex.go
@@ -11,13 +11,13 @@ import (
 	"fmt"
 	"sync"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/indexers/cfindex.go b/blockchain/indexers/cfindex.go
index af8dae9d..b00e1e2f 100644
--- a/blockchain/indexers/cfindex.go
+++ b/blockchain/indexers/cfindex.go
@@ -13,7 +13,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/gcs/v3/blockcf"
 	"github.com/decred/dcrd/wire"
diff --git a/blockchain/indexers/common.go b/blockchain/indexers/common.go
index b73b1a85..3e6cc7aa 100644
--- a/blockchain/indexers/common.go
+++ b/blockchain/indexers/common.go
@@ -15,7 +15,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/indexers/existsaddrindex.go b/blockchain/indexers/existsaddrindex.go
index 0b5552a3..f4219011 100644
--- a/blockchain/indexers/existsaddrindex.go
+++ b/blockchain/indexers/existsaddrindex.go
@@ -8,11 +8,11 @@ import (
 	"context"
 	"sync"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/indexers/manager.go b/blockchain/indexers/manager.go
index 659f15b9..99d75571 100644
--- a/blockchain/indexers/manager.go
+++ b/blockchain/indexers/manager.go
@@ -13,7 +13,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 var (
diff --git a/blockchain/indexers/txindex.go b/blockchain/indexers/txindex.go
index 68e9138b..4296dacd 100644
--- a/blockchain/indexers/txindex.go
+++ b/blockchain/indexers/txindex.go
@@ -12,7 +12,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/notifications.go b/blockchain/notifications.go
index 2b6d9dbb..0c6b6562 100644
--- a/blockchain/notifications.go
+++ b/blockchain/notifications.go
@@ -9,7 +9,7 @@ import (
 	"fmt"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // NotificationType represents the type of a notification message.
diff --git a/blockchain/process.go b/blockchain/process.go
index e1f54a98..7e649e7e 100644
--- a/blockchain/process.go
+++ b/blockchain/process.go
@@ -9,7 +9,7 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // BehaviorFlags is a bitmask defining tweaks to the normal behavior when
diff --git a/blockchain/scriptval.go b/blockchain/scriptval.go
index a52fd572..7647f1b8 100644
--- a/blockchain/scriptval.go
+++ b/blockchain/scriptval.go
@@ -11,8 +11,8 @@ import (
 	"math"
 	"runtime"
 
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/sequencelock.go b/blockchain/sequencelock.go
index 98550aac..622a86be 100644
--- a/blockchain/sequencelock.go
+++ b/blockchain/sequencelock.go
@@ -7,9 +7,9 @@ package blockchain
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/stake/go.mod b/blockchain/stake/go.mod
index ec0d665c..023a0847 100644
--- a/blockchain/stake/go.mod
+++ b/blockchain/stake/go.mod
@@ -1,4 +1,4 @@
-module github.com/decred/dcrd/blockchain/stake/v3
+module github.com/decred/dcrd/blockchain/stake/v4
 
 go 1.13
 
@@ -7,9 +7,15 @@ require (
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0
 	github.com/decred/dcrd/database/v2 v2.0.2
 	github.com/decred/dcrd/dcrec v1.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
-	github.com/decred/dcrd/dcrutil/v3 v3.0.0
-	github.com/decred/dcrd/txscript/v3 v3.0.0
+	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0
+	github.com/decred/dcrd/dcrutil/v4 v4.0.0
+	github.com/decred/dcrd/txscript/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.1.0
 )
+
+replace (
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../../dcrutil
+	github.com/decred/dcrd/txscript/v4 => ../../txscript
+)
diff --git a/blockchain/stake/go.sum b/blockchain/stake/go.sum
index c9eb645e..8411cf64 100644
--- a/blockchain/stake/go.sum
+++ b/blockchain/stake/go.sum
@@ -24,8 +24,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317h
 github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
 github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9rnZcIOZo=
 github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
-github.com/decred/dcrd/txscript/v3 v3.0.0 h1:74NmirXAIskbGP0g9OWtrmN7OxDbWJ9G73a5uoxTkcM=
-github.com/decred/dcrd/txscript/v3 v3.0.0/go.mod h1:pdvnlD4KGdDoc09cvWRJ8EoRQUaiUz41uDevOWuEfII=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
 github.com/decred/slog v1.1.0 h1:uz5ZFfmaexj1rEDgZvzQ7wjGkoSPjw2LCh8K+K1VrW4=
diff --git a/blockchain/stake/internal/ticketdb/chainio.go b/blockchain/stake/internal/ticketdb/chainio.go
index 1e60e76c..235080eb 100644
--- a/blockchain/stake/internal/ticketdb/chainio.go
+++ b/blockchain/stake/internal/ticketdb/chainio.go
@@ -8,8 +8,8 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/dbnamespace"
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/tickettreap"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/dbnamespace"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/tickettreap"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
 )
diff --git a/blockchain/stake/internal/tickettreap/README.md b/blockchain/stake/internal/tickettreap/README.md
index eb933c24..bd9d423b 100644
--- a/blockchain/stake/internal/tickettreap/README.md
+++ b/blockchain/stake/internal/tickettreap/README.md
@@ -3,7 +3,7 @@ tickettreap
 
 [![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
 [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/blockchain/stake/v3/internal/tickettreap)
+[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/blockchain/stake/v4/internal/tickettreap)
 
 Package tickettreap implements a treap data structure that is used to hold
 live tickets ordered by their key along with some associated data using a
diff --git a/blockchain/stake/lottery.go b/blockchain/stake/lottery.go
index 708c42c5..b6e3aa41 100644
--- a/blockchain/stake/lottery.go
+++ b/blockchain/stake/lottery.go
@@ -10,7 +10,7 @@ import (
 	"encoding/binary"
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/tickettreap"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/tickettreap"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 )
 
diff --git a/blockchain/stake/scripttype.go b/blockchain/stake/scripttype.go
index 727b05f9..6b6f958d 100644
--- a/blockchain/stake/scripttype.go
+++ b/blockchain/stake/scripttype.go
@@ -5,7 +5,7 @@
 package stake
 
 import (
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 )
 
 // isScriptHashScript returns whether or not the passed script is a
diff --git a/blockchain/stake/staketx.go b/blockchain/stake/staketx.go
index fcd8aeaa..c0a55b95 100644
--- a/blockchain/stake/staketx.go
+++ b/blockchain/stake/staketx.go
@@ -17,8 +17,8 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/stake/tickets.go b/blockchain/stake/tickets.go
index 7e8011e5..cb0dcf55 100644
--- a/blockchain/stake/tickets.go
+++ b/blockchain/stake/tickets.go
@@ -7,9 +7,9 @@ package stake
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/dbnamespace"
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/ticketdb"
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/tickettreap"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/dbnamespace"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/ticketdb"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/tickettreap"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
 	"github.com/decred/dcrd/wire"
diff --git a/blockchain/stake/treasury.go b/blockchain/stake/treasury.go
index d3e5f255..d45c1705 100644
--- a/blockchain/stake/treasury.go
+++ b/blockchain/stake/treasury.go
@@ -7,9 +7,9 @@ package stake
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/stakeext.go b/blockchain/stakeext.go
index ccc2bb8c..e486339b 100644
--- a/blockchain/stakeext.go
+++ b/blockchain/stakeext.go
@@ -8,8 +8,8 @@ package blockchain
 import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 )
 
 // NextLotteryData returns the next tickets eligible for spending as SSGen
diff --git a/blockchain/stakenode.go b/blockchain/stakenode.go
index 26d2f336..a12661c5 100644
--- a/blockchain/stakenode.go
+++ b/blockchain/stakenode.go
@@ -8,7 +8,7 @@ package blockchain
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
 )
diff --git a/blockchain/subsidy.go b/blockchain/subsidy.go
index 211b320f..2e9abc73 100644
--- a/blockchain/subsidy.go
+++ b/blockchain/subsidy.go
@@ -9,11 +9,11 @@ import (
 	"bytes"
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/treasury.go b/blockchain/treasury.go
index 305521c3..0ff70a6e 100644
--- a/blockchain/treasury.go
+++ b/blockchain/treasury.go
@@ -10,13 +10,13 @@ import (
 	"errors"
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/upgrade.go b/blockchain/upgrade.go
index e9ca74ea..5bd38cc4 100644
--- a/blockchain/upgrade.go
+++ b/blockchain/upgrade.go
@@ -13,7 +13,7 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
diff --git a/blockchain/utxoviewpoint.go b/blockchain/utxoviewpoint.go
index 14308f6d..36e0be1a 100644
--- a/blockchain/utxoviewpoint.go
+++ b/blockchain/utxoviewpoint.go
@@ -8,12 +8,12 @@ package blockchain
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/validate.go b/blockchain/validate.go
index 7fb59a59..5b43e16c 100644
--- a/blockchain/validate.go
+++ b/blockchain/validate.go
@@ -14,14 +14,14 @@ import (
 	"math/big"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3/blockcf2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/cmd/addblock/config.go b/cmd/addblock/config.go
index da60b555..781248d6 100644
--- a/cmd/addblock/config.go
+++ b/cmd/addblock/config.go
@@ -13,7 +13,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	flags "github.com/jessevdk/go-flags"
 )
 
diff --git a/cmd/addblock/import.go b/cmd/addblock/import.go
index 72dfc4ea..f8477a5c 100644
--- a/cmd/addblock/import.go
+++ b/cmd/addblock/import.go
@@ -18,7 +18,7 @@ import (
 	"github.com/decred/dcrd/blockchain/v4/indexers"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/cmd/findcheckpoint/config.go b/cmd/findcheckpoint/config.go
index ba835556..88458a2f 100644
--- a/cmd/findcheckpoint/config.go
+++ b/cmd/findcheckpoint/config.go
@@ -13,7 +13,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	flags "github.com/jessevdk/go-flags"
 )
 
diff --git a/config.go b/config.go
index 5735de2a..8c962a3a 100644
--- a/config.go
+++ b/config.go
@@ -26,7 +26,7 @@ import (
 	"github.com/decred/dcrd/connmgr/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mempool"
 	"github.com/decred/dcrd/internal/version"
 	"github.com/decred/dcrd/rpc/jsonrpc/types/v2"
diff --git a/database/cmd/dbtool/globalconfig.go b/database/cmd/dbtool/globalconfig.go
index 162d3a62..37be468b 100644
--- a/database/cmd/dbtool/globalconfig.go
+++ b/database/cmd/dbtool/globalconfig.go
@@ -14,7 +14,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 var (
diff --git a/database/cmd/dbtool/insecureimport.go b/database/cmd/dbtool/insecureimport.go
index a076ea04..02ea3795 100644
--- a/database/cmd/dbtool/insecureimport.go
+++ b/database/cmd/dbtool/insecureimport.go
@@ -16,7 +16,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/database/go.mod b/database/go.mod
index bf83b960..77b6d8d3 100644
--- a/database/go.mod
+++ b/database/go.mod
@@ -5,9 +5,14 @@ go 1.13
 require (
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0
-	github.com/decred/dcrd/dcrutil/v3 v3.0.0
+	github.com/decred/dcrd/dcrutil/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.1.0
 	github.com/jessevdk/go-flags v1.4.0
 	github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca
 )
+
+replace (
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../dcrutil
+)
diff --git a/database/go.sum b/database/go.sum
index 247347dd..4262dd88 100644
--- a/database/go.sum
+++ b/database/go.sum
@@ -16,10 +16,6 @@ github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1 h1:V6eqU1crZzuoFT4KG2LhaU5xDSdkHuvLQsj25wd7Wb4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317hnwiq58Filgag2xw=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9rnZcIOZo=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
 github.com/decred/slog v1.1.0 h1:uz5ZFfmaexj1rEDgZvzQ7wjGkoSPjw2LCh8K+K1VrW4=
diff --git a/dcrec/secp256k1/README.md b/dcrec/secp256k1/README.md
index 94c28c00..2c386eb9 100644
--- a/dcrec/secp256k1/README.md
+++ b/dcrec/secp256k1/README.md
@@ -3,7 +3,7 @@ secp256k1
 
 [![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
 [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3)
+[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4)
 
 Package secp256k1 implements optimized secp256k1 elliptic curve operations.
 
@@ -63,7 +63,7 @@ $ go get -u github.com/decred/dcrd/dcrec/secp256k1/v3
 
 ## Examples
 
-* [Encryption](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3#example-package-EncryptDecryptMessage)
+* [Encryption](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4#example-package-EncryptDecryptMessage)
   Demonstrates encrypting and decrypting a message using a shared key derived
   through ECDHE.
 
diff --git a/dcrec/secp256k1/ecdsa/README.md b/dcrec/secp256k1/ecdsa/README.md
index ccf24e9a..0077efcc 100644
--- a/dcrec/secp256k1/ecdsa/README.md
+++ b/dcrec/secp256k1/ecdsa/README.md
@@ -3,7 +3,7 @@ ecdsa
 
 [![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
 [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa)
+[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa)
 
 Package ecdsa provides secp256k1-optimized ECDSA signing and verification.
 
@@ -40,11 +40,11 @@ $ go get -u github.com/decred/dcrd/dcrec/secp25k1/v3/ecdsa
 
 ## Examples
 
-* [Sign Message](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa#example-package-SignMessage)  
+* [Sign Message](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa#example-package-SignMessage)  
   Demonstrates signing a message with a secp256k1 private key that is first
   parsed from raw bytes and serializing the generated signature.
 
-* [Verify Signature](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa#example-Signature.Verify)  
+* [Verify Signature](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa#example-Signature.Verify)  
   Demonstrates verifying a secp256k1 signature against a public key that is
   first parsed from raw bytes.  The signature is also parsed from raw bytes.
 
diff --git a/dcrec/secp256k1/ecdsa/signature.go b/dcrec/secp256k1/ecdsa/signature.go
index da07a9a2..50f1721a 100644
--- a/dcrec/secp256k1/ecdsa/signature.go
+++ b/dcrec/secp256k1/ecdsa/signature.go
@@ -9,7 +9,7 @@ import (
 	"errors"
 	"fmt"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // References:
diff --git a/dcrec/secp256k1/genprecomps.go b/dcrec/secp256k1/genprecomps.go
index 2a12c93b..20dc1104 100644
--- a/dcrec/secp256k1/genprecomps.go
+++ b/dcrec/secp256k1/genprecomps.go
@@ -18,7 +18,7 @@ import (
 	"log"
 	"os"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 func main() {
diff --git a/dcrec/secp256k1/go.mod b/dcrec/secp256k1/go.mod
index 3c7ba1fc..344306de 100644
--- a/dcrec/secp256k1/go.mod
+++ b/dcrec/secp256k1/go.mod
@@ -1,4 +1,4 @@
-module github.com/decred/dcrd/dcrec/secp256k1/v3
+module github.com/decred/dcrd/dcrec/secp256k1/v4
 
 go 1.13
 
diff --git a/dcrec/secp256k1/schnorr/README.md b/dcrec/secp256k1/schnorr/README.md
index 180ceb81..2e696a63 100644
--- a/dcrec/secp256k1/schnorr/README.md
+++ b/dcrec/secp256k1/schnorr/README.md
@@ -3,7 +3,7 @@ schnorr
 
 [![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
 [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr)
+[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr)
 
 Package schnorr provides custom Schnorr signing and verification via secp256k1.
 
@@ -320,12 +320,12 @@ $ go get -u github.com/decred/dcrd/dcrec/secp25k1/v3/schnorr
 
 ## Examples
 
-* [Sign Message](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr#example-package-SignMessage)  
+* [Sign Message](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr#example-package-SignMessage)  
   Demonstrates signing a message with the EC-Schnorr-DCRv0 scheme using a
   secp256k1 private key that is first parsed from raw bytes and serializing the
   generated signature.
 
-* [Verify Signature](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr#example-Signature.Verify)  
+* [Verify Signature](https://pkg.go.dev/github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr#example-Signature.Verify)  
   Demonstrates verifying an EC-Schnorr-DCRv0 signature against a public key that
   is first parsed from raw bytes.  The signature is also parsed from raw bytes.
 
diff --git a/dcrec/secp256k1/schnorr/pubkey.go b/dcrec/secp256k1/schnorr/pubkey.go
index 2a46ee80..1c9174e8 100644
--- a/dcrec/secp256k1/schnorr/pubkey.go
+++ b/dcrec/secp256k1/schnorr/pubkey.go
@@ -8,7 +8,7 @@ package schnorr
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // These constants define the lengths of serialized public keys.
diff --git a/dcrec/secp256k1/schnorr/signature.go b/dcrec/secp256k1/schnorr/signature.go
index ac267e6d..9e454c26 100644
--- a/dcrec/secp256k1/schnorr/signature.go
+++ b/dcrec/secp256k1/schnorr/signature.go
@@ -9,7 +9,7 @@ import (
 	"fmt"
 
 	"github.com/decred/dcrd/crypto/blake256"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 const (
diff --git a/dcrutil/README.md b/dcrutil/README.md
index 1842ebcc..55b6ec88 100644
--- a/dcrutil/README.md
+++ b/dcrutil/README.md
@@ -4,7 +4,7 @@ dcrutil
 
 [![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
 [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrutil/v3)
+[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrutil/v4)
 
 Package dcrutil provides decred-specific convenience functions and types.
 A comprehensive suite of tests is provided to ensure proper functionality.
diff --git a/dcrutil/address.go b/dcrutil/address.go
index 976d2a9f..9090ee2b 100644
--- a/dcrutil/address.go
+++ b/dcrutil/address.go
@@ -13,8 +13,8 @@ import (
 	"github.com/decred/dcrd/crypto/ripemd160"
 	"github.com/decred/dcrd/dcrec"
 	"github.com/decred/dcrd/dcrec/edwards/v2"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr"
 )
 
 var (
diff --git a/dcrutil/go.mod b/dcrutil/go.mod
index 7534447e..b158e927 100644
--- a/dcrutil/go.mod
+++ b/dcrutil/go.mod
@@ -1,4 +1,4 @@
-module github.com/decred/dcrd/dcrutil/v3
+module github.com/decred/dcrd/dcrutil/v4
 
 go 1.13
 
@@ -9,6 +9,8 @@ require (
 	github.com/decred/dcrd/crypto/ripemd160 v1.0.1
 	github.com/decred/dcrd/dcrec v1.0.0
 	github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
+	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 )
+
+replace github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
diff --git a/dcrutil/go.sum b/dcrutil/go.sum
index f275830a..2cef87bb 100644
--- a/dcrutil/go.sum
+++ b/dcrutil/go.sum
@@ -14,7 +14,5 @@ github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1 h1:V6eqU1crZzuoFT4KG2LhaU5xDSdkHuvLQsj25wd7Wb4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317hnwiq58Filgag2xw=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
diff --git a/dcrutil/txsort/README.md b/dcrutil/txsort/README.md
index f6aa9a6f..98a5c170 100644
--- a/dcrutil/txsort/README.md
+++ b/dcrutil/txsort/README.md
@@ -3,7 +3,7 @@ txsort
 
 [![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
 [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrutil/v3/txsort)
+[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/dcrutil/v4/txsort)
 
 Package txsort provides stable transaction sorting.
 
diff --git a/dcrutil/util.go b/dcrutil/util.go
index 11956006..0357fcf2 100644
--- a/dcrutil/util.go
+++ b/dcrutil/util.go
@@ -11,7 +11,7 @@ import (
 	"fmt"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/dcrutil/wif.go b/dcrutil/wif.go
index c108863e..2d606ac6 100644
--- a/dcrutil/wif.go
+++ b/dcrutil/wif.go
@@ -14,7 +14,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/dcrec"
 	"github.com/decred/dcrd/dcrec/edwards/v2"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // ErrMalformedPrivateKey describes an error where a WIF-encoded private key
diff --git a/gcs/blockcf/blockcf.go b/gcs/blockcf/blockcf.go
index 7960aaf1..d14bdc46 100644
--- a/gcs/blockcf/blockcf.go
+++ b/gcs/blockcf/blockcf.go
@@ -21,10 +21,10 @@ package blockcf
 import (
 	"encoding/binary"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/gcs/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/gcs/blockcf2/blockcf.go b/gcs/blockcf2/blockcf.go
index 61c2b8d0..2ac61505 100644
--- a/gcs/blockcf2/blockcf.go
+++ b/gcs/blockcf2/blockcf.go
@@ -19,10 +19,10 @@ package blockcf2
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/gcs/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/gcs/go.mod b/gcs/go.mod
index e823d00a..21ba6938 100644
--- a/gcs/go.mod
+++ b/gcs/go.mod
@@ -4,9 +4,16 @@ go 1.13
 
 require (
 	github.com/dchest/siphash v1.2.1
-	github.com/decred/dcrd/blockchain/stake/v3 v3.0.0
+	github.com/decred/dcrd/blockchain/stake/v4 v4.0.0
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/crypto/blake256 v1.0.0
-	github.com/decred/dcrd/txscript/v3 v3.0.0
+	github.com/decred/dcrd/txscript/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 )
+
+replace (
+	github.com/decred/dcrd/blockchain/stake/v4 => ../blockchain/stake
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../dcrutil
+	github.com/decred/dcrd/txscript/v4 => ../txscript
+)
diff --git a/gcs/go.sum b/gcs/go.sum
index 859fdfee..25791bf0 100644
--- a/gcs/go.sum
+++ b/gcs/go.sum
@@ -6,8 +6,6 @@ github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4=
 github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
 github.com/decred/base58 v1.0.3 h1:KGZuh8d1WEMIrK0leQRM47W85KqCAdl2N+uagbctdDI=
 github.com/decred/base58 v1.0.3/go.mod h1:pXP9cXCfM2sFLb2viz2FNIdeMWmZDBKG3ZBYbiSM78E=
-github.com/decred/dcrd/blockchain/stake/v3 v3.0.0 h1:vr0o0ICjuEzg1End6YtBfwgDuPkg+FYIwGVEz18kFg0=
-github.com/decred/dcrd/blockchain/stake/v3 v3.0.0/go.mod h1:5GIUwsrHQCJauacgCegIR6t92SaeVi28Qls/BLN9vOw=
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyLRN07EO0cNBV6DGU=
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/chaincfg/v3 v3.0.0 h1:+TFbu7ZmvBwM+SZz5mrj6cun9ts/6DAL5sqnsaFBHGQ=
@@ -26,8 +24,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317h
 github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
 github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9rnZcIOZo=
 github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
-github.com/decred/dcrd/txscript/v3 v3.0.0 h1:74NmirXAIskbGP0g9OWtrmN7OxDbWJ9G73a5uoxTkcM=
-github.com/decred/dcrd/txscript/v3 v3.0.0/go.mod h1:pdvnlD4KGdDoc09cvWRJ8EoRQUaiUz41uDevOWuEfII=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
 github.com/decred/slog v1.1.0 h1:uz5ZFfmaexj1rEDgZvzQ7wjGkoSPjw2LCh8K+K1VrW4=
diff --git a/go.mod b/go.mod
index 2acc13dd..c2f33631 100644
--- a/go.mod
+++ b/go.mod
@@ -7,7 +7,7 @@ require (
 	github.com/decred/base58 v1.0.3
 	github.com/decred/dcrd/addrmgr v1.2.0
 	github.com/decred/dcrd/bech32 v1.1.1
-	github.com/decred/dcrd/blockchain/stake/v3 v3.0.0
+	github.com/decred/dcrd/blockchain/stake/v4 v4.0.0
 	github.com/decred/dcrd/blockchain/standalone/v2 v2.0.0
 	github.com/decred/dcrd/blockchain/v4 v4.0.0
 	github.com/decred/dcrd/certgen v1.1.1
@@ -17,16 +17,16 @@ require (
 	github.com/decred/dcrd/crypto/ripemd160 v1.0.1
 	github.com/decred/dcrd/database/v2 v2.0.2
 	github.com/decred/dcrd/dcrec v1.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
+	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0
 	github.com/decred/dcrd/dcrjson/v3 v3.1.0
-	github.com/decred/dcrd/dcrutil/v3 v3.0.0
+	github.com/decred/dcrd/dcrutil/v4 v4.0.0
 	github.com/decred/dcrd/gcs/v3 v3.0.0
 	github.com/decred/dcrd/hdkeychain/v3 v3.0.0
 	github.com/decred/dcrd/lru v1.1.0
 	github.com/decred/dcrd/peer/v2 v2.2.0
 	github.com/decred/dcrd/rpc/jsonrpc/types/v2 v2.2.0
 	github.com/decred/dcrd/rpcclient/v7 v7.0.0
-	github.com/decred/dcrd/txscript/v3 v3.0.0
+	github.com/decred/dcrd/txscript/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/go-socks v1.1.0
 	github.com/decred/slog v1.1.0
@@ -43,7 +43,7 @@ require (
 replace (
 	github.com/decred/dcrd/addrmgr => ./addrmgr
 	github.com/decred/dcrd/bech32 => ./bech32
-	github.com/decred/dcrd/blockchain/stake/v3 => ./blockchain/stake
+	github.com/decred/dcrd/blockchain/stake/v4 => ./blockchain/stake
 	github.com/decred/dcrd/blockchain/standalone/v2 => ./blockchain/standalone
 	github.com/decred/dcrd/blockchain/v4 => ./blockchain
 	github.com/decred/dcrd/certgen => ./certgen
@@ -54,9 +54,9 @@ replace (
 	github.com/decred/dcrd/crypto/ripemd160 => ./crypto/ripemd160
 	github.com/decred/dcrd/database/v2 => ./database
 	github.com/decred/dcrd/dcrec => ./dcrec
-	github.com/decred/dcrd/dcrec/secp256k1/v3 => ./dcrec/secp256k1
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ./dcrec/secp256k1
 	github.com/decred/dcrd/dcrjson/v3 => ./dcrjson
-	github.com/decred/dcrd/dcrutil/v3 => ./dcrutil
+	github.com/decred/dcrd/dcrutil/v4 => ./dcrutil
 	github.com/decred/dcrd/gcs/v3 => ./gcs
 	github.com/decred/dcrd/hdkeychain/v3 => ./hdkeychain
 	github.com/decred/dcrd/limits => ./limits
@@ -64,6 +64,6 @@ replace (
 	github.com/decred/dcrd/peer/v2 => ./peer
 	github.com/decred/dcrd/rpc/jsonrpc/types/v2 => ./rpc/jsonrpc/types
 	github.com/decred/dcrd/rpcclient/v7 => ./rpcclient
-	github.com/decred/dcrd/txscript/v3 => ./txscript
+	github.com/decred/dcrd/txscript/v4 => ./txscript
 	github.com/decred/dcrd/wire => ./wire
 )
diff --git a/hdkeychain/extendedkey.go b/hdkeychain/extendedkey.go
index 12f23155..6d3d4003 100644
--- a/hdkeychain/extendedkey.go
+++ b/hdkeychain/extendedkey.go
@@ -21,7 +21,7 @@ import (
 	"github.com/decred/base58"
 	"github.com/decred/dcrd/crypto/blake256"
 	"github.com/decred/dcrd/crypto/ripemd160"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 const (
diff --git a/hdkeychain/go.mod b/hdkeychain/go.mod
index b5de567d..046129c4 100644
--- a/hdkeychain/go.mod
+++ b/hdkeychain/go.mod
@@ -8,6 +8,11 @@ require (
 	github.com/decred/dcrd/crypto/blake256 v1.0.0
 	github.com/decred/dcrd/crypto/ripemd160 v1.0.1
 	github.com/decred/dcrd/dcrec v1.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
-	github.com/decred/dcrd/dcrutil/v3 v3.0.0
+	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0
+	github.com/decred/dcrd/dcrutil/v4 v4.0.0
+)
+
+replace (
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../dcrutil
 )
diff --git a/hdkeychain/go.sum b/hdkeychain/go.sum
index 1af26721..f8fd4e9b 100644
--- a/hdkeychain/go.sum
+++ b/hdkeychain/go.sum
@@ -16,9 +16,5 @@ github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1 h1:V6eqU1crZzuoFT4KG2LhaU5xDSdkHuvLQsj25wd7Wb4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317hnwiq58Filgag2xw=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9rnZcIOZo=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
diff --git a/internal/fees/cmd/dumpfeedb/dumpfeedb.go b/internal/fees/cmd/dumpfeedb/dumpfeedb.go
index c8653228..61e64c3d 100644
--- a/internal/fees/cmd/dumpfeedb/dumpfeedb.go
+++ b/internal/fees/cmd/dumpfeedb/dumpfeedb.go
@@ -11,7 +11,7 @@ import (
 	"os"
 	"path"
 
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/fees"
 	flags "github.com/jessevdk/go-flags"
 )
diff --git a/internal/fees/estimator.go b/internal/fees/estimator.go
index 7bfe90ef..a065307c 100644
--- a/internal/fees/estimator.go
+++ b/internal/fees/estimator.go
@@ -13,9 +13,9 @@ import (
 	"sort"
 	"sync"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/syndtr/goleveldb/leveldb"
 	ldbutil "github.com/syndtr/goleveldb/leveldb/util"
 )
diff --git a/internal/mempool/mempool.go b/internal/mempool/mempool.go
index 754054b2..90a8a85a 100644
--- a/internal/mempool/mempool.go
+++ b/internal/mempool/mempool.go
@@ -13,15 +13,15 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/blockchain/v4/indexers"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mining"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mempool/policy.go b/internal/mempool/policy.go
index aa67a7f1..c3a29ff0 100644
--- a/internal/mempool/policy.go
+++ b/internal/mempool/policy.go
@@ -9,10 +9,10 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/v4"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mining/bgblktmplgenerator.go b/internal/mining/bgblktmplgenerator.go
index 6d938ded..a98ff1d3 100644
--- a/internal/mining/bgblktmplgenerator.go
+++ b/internal/mining/bgblktmplgenerator.go
@@ -12,10 +12,10 @@ import (
 	"sync"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/lru"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/internal/mining/cpuminer/cpuminer.go b/internal/mining/cpuminer/cpuminer.go
index 232db13a..17ba42ce 100644
--- a/internal/mining/cpuminer/cpuminer.go
+++ b/internal/mining/cpuminer/cpuminer.go
@@ -18,7 +18,7 @@ import (
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mining"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/internal/mining/mining.go b/internal/mining/mining.go
index 119c0581..6c24a81e 100644
--- a/internal/mining/mining.go
+++ b/internal/mining/mining.go
@@ -13,14 +13,14 @@ import (
 	"sort"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3/blockcf2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mining/mining_view.go b/internal/mining/mining_view.go
index a29d1fad..e7d25eda 100644
--- a/internal/mining/mining_view.go
+++ b/internal/mining/mining_view.go
@@ -6,7 +6,7 @@ package mining
 
 import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 const (
diff --git a/internal/mining/policy.go b/internal/mining/policy.go
index 0b67f4b0..59962d66 100644
--- a/internal/mining/policy.go
+++ b/internal/mining/policy.go
@@ -6,8 +6,8 @@
 package mining
 
 import (
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mining/tx_desc_graph.go b/internal/mining/tx_desc_graph.go
index 88fc69f6..4492daed 100644
--- a/internal/mining/tx_desc_graph.go
+++ b/internal/mining/tx_desc_graph.go
@@ -6,7 +6,7 @@ package mining
 
 import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // txDescGraph relates a set of transactions to their respective descendants and
diff --git a/internal/mining/txpriorityqueue.go b/internal/mining/txpriorityqueue.go
index cf576d91..1146afda 100644
--- a/internal/mining/txpriorityqueue.go
+++ b/internal/mining/txpriorityqueue.go
@@ -8,7 +8,7 @@ package mining
 import (
 	"container/heap"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 )
 
 // txPrioItem houses a transaction along with extra information that allows the
diff --git a/internal/netsync/interface.go b/internal/netsync/interface.go
index 4a9ac79b..a1c4196c 100644
--- a/internal/netsync/interface.go
+++ b/internal/netsync/interface.go
@@ -6,7 +6,7 @@ package netsync
 
 import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/peer/v2"
 )
 
diff --git a/internal/netsync/manager.go b/internal/netsync/manager.go
index ce70b197..1603e8fb 100644
--- a/internal/netsync/manager.go
+++ b/internal/netsync/manager.go
@@ -17,12 +17,12 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mempool"
 	"github.com/decred/dcrd/internal/progresslog"
 	"github.com/decred/dcrd/internal/rpcserver"
 	peerpkg "github.com/decred/dcrd/peer/v2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/rpcserver/interface.go b/internal/rpcserver/interface.go
index 0fb6d7d1..16b832fa 100644
--- a/internal/rpcserver/interface.go
+++ b/internal/rpcserver/interface.go
@@ -11,12 +11,12 @@ import (
 	"time"
 
 	"github.com/decred/dcrd/addrmgr"
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/blockchain/v4/indexers"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/internal/mempool"
 	"github.com/decred/dcrd/internal/mining"
diff --git a/internal/rpcserver/rpcserver.go b/internal/rpcserver/rpcserver.go
index 9073d078..efb9d3df 100644
--- a/internal/rpcserver/rpcserver.go
+++ b/internal/rpcserver/rpcserver.go
@@ -36,20 +36,20 @@ import (
 
 	"github.com/gorilla/websocket"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
 	"github.com/decred/dcrd/dcrjson/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mempool"
 	"github.com/decred/dcrd/internal/mining"
 	"github.com/decred/dcrd/internal/version"
 	"github.com/decred/dcrd/rpc/jsonrpc/types/v2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 	"github.com/jrick/bitset"
 )
diff --git a/internal/rpcserver/rpcwebsocket.go b/internal/rpcserver/rpcwebsocket.go
index 2d488545..84a87929 100644
--- a/internal/rpcserver/rpcwebsocket.go
+++ b/internal/rpcserver/rpcwebsocket.go
@@ -22,17 +22,17 @@ import (
 
 	"github.com/gorilla/websocket"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/crypto/ripemd160"
 	"github.com/decred/dcrd/dcrjson/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mining"
 	"github.com/decred/dcrd/rpc/jsonrpc/types/v2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/log.go b/log.go
index e7289a6c..cb132573 100644
--- a/log.go
+++ b/log.go
@@ -11,7 +11,7 @@ import (
 	"path/filepath"
 
 	"github.com/decred/dcrd/addrmgr"
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/blockchain/v4/indexers"
 	"github.com/decred/dcrd/connmgr/v3"
@@ -23,7 +23,7 @@ import (
 	"github.com/decred/dcrd/internal/netsync"
 	"github.com/decred/dcrd/internal/rpcserver"
 	"github.com/decred/dcrd/peer/v2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/slog"
 	"github.com/jrick/logrotate/rotator"
 )
diff --git a/peer/go.mod b/peer/go.mod
index d8c1d3d1..32e44a99 100644
--- a/peer/go.mod
+++ b/peer/go.mod
@@ -6,8 +6,14 @@ require (
 	github.com/davecgh/go-spew v1.1.1
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/lru v1.1.0
-	github.com/decred/dcrd/txscript/v3 v3.0.0
+	github.com/decred/dcrd/txscript/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/go-socks v1.1.0
 	github.com/decred/slog v1.1.0
 )
+
+replace (
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../dcrutil
+	github.com/decred/dcrd/txscript/v4 => ../txscript
+)
diff --git a/peer/go.sum b/peer/go.sum
index 483169ab..f0d39eb1 100644
--- a/peer/go.sum
+++ b/peer/go.sum
@@ -18,14 +18,8 @@ github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1 h1:V6eqU1crZzuoFT4KG2LhaU5xDSdkHuvLQsj25wd7Wb4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317hnwiq58Filgag2xw=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9rnZcIOZo=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
 github.com/decred/dcrd/lru v1.1.0 h1:QwT6v8LFKOL3xQ3qtucgRk4pdiawrxIfCbUXWpm+JL4=
 github.com/decred/dcrd/lru v1.1.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
-github.com/decred/dcrd/txscript/v3 v3.0.0 h1:74NmirXAIskbGP0g9OWtrmN7OxDbWJ9G73a5uoxTkcM=
-github.com/decred/dcrd/txscript/v3 v3.0.0/go.mod h1:pdvnlD4KGdDoc09cvWRJ8EoRQUaiUz41uDevOWuEfII=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
 github.com/decred/go-socks v1.1.0 h1:dnENcc0KIqQo3HSXdgboXAHgqsCIutkqq6ntQjYtm2U=
diff --git a/peer/log.go b/peer/log.go
index 8a48f4bd..4bb25a46 100644
--- a/peer/log.go
+++ b/peer/log.go
@@ -11,7 +11,7 @@ import (
 	"time"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 	"github.com/decred/slog"
 )
diff --git a/require.go b/require.go
index 6422d2a9..5e58010b 100644
--- a/require.go
+++ b/require.go
@@ -13,5 +13,5 @@ package main
 
 import (
 	_ "github.com/decred/dcrd/bech32"
-	_ "github.com/decred/dcrd/dcrec/secp256k1/v3"
+	_ "github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
diff --git a/rpcadaptors.go b/rpcadaptors.go
index cd871a5b..87add513 100644
--- a/rpcadaptors.go
+++ b/rpcadaptors.go
@@ -11,11 +11,11 @@ import (
 	"net"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mempool"
 	"github.com/decred/dcrd/internal/mining"
 	"github.com/decred/dcrd/internal/mining/cpuminer"
diff --git a/rpcclient/chain.go b/rpcclient/chain.go
index a4c19158..e0a18f4a 100644
--- a/rpcclient/chain.go
+++ b/rpcclient/chain.go
@@ -14,7 +14,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/dcrjson/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/gcs/v3/blockcf"
 	"github.com/decred/dcrd/gcs/v3/blockcf2"
diff --git a/rpcclient/examples/dcrdwebsockets/main.go b/rpcclient/examples/dcrdwebsockets/main.go
index 9ab3b44b..c5c3db8c 100644
--- a/rpcclient/examples/dcrdwebsockets/main.go
+++ b/rpcclient/examples/dcrdwebsockets/main.go
@@ -12,7 +12,7 @@ import (
 	"path/filepath"
 	"time"
 
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/rpcclient/v7"
 )
 
diff --git a/rpcclient/extensions.go b/rpcclient/extensions.go
index 2f1eb925..ef5de266 100644
--- a/rpcclient/extensions.go
+++ b/rpcclient/extensions.go
@@ -10,7 +10,7 @@ import (
 	"encoding/json"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	chainjson "github.com/decred/dcrd/rpc/jsonrpc/types/v2"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/rpcclient/go.mod b/rpcclient/go.mod
index 3f86e56c..612860f0 100644
--- a/rpcclient/go.mod
+++ b/rpcclient/go.mod
@@ -5,7 +5,7 @@ go 1.13
 require (
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/dcrjson/v3 v3.1.0
-	github.com/decred/dcrd/dcrutil/v3 v3.0.0
+	github.com/decred/dcrd/dcrutil/v4 v4.0.0
 	github.com/decred/dcrd/gcs/v3 v3.0.0
 	github.com/decred/dcrd/rpc/jsonrpc/types/v2 v2.2.0
 	github.com/decred/dcrd/wire v1.4.0
@@ -14,4 +14,10 @@ require (
 	github.com/gorilla/websocket v1.4.2
 )
 
-replace github.com/decred/dcrd/gcs/v3 => ../gcs
+replace (
+	github.com/decred/dcrd/blockchain/stake/v4 => ../blockchain/stake
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../dcrutil
+	github.com/decred/dcrd/gcs/v3 => ../gcs
+	github.com/decred/dcrd/txscript/v4 => ../txscript
+)
diff --git a/rpcclient/go.sum b/rpcclient/go.sum
index 6dd11afe..6b96059b 100644
--- a/rpcclient/go.sum
+++ b/rpcclient/go.sum
@@ -6,8 +6,6 @@ github.com/dchest/siphash v1.2.1 h1:4cLinnzVJDKxTCl9B01807Yiy+W7ZzVHj/KIroQRvT4=
 github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
 github.com/decred/base58 v1.0.3 h1:KGZuh8d1WEMIrK0leQRM47W85KqCAdl2N+uagbctdDI=
 github.com/decred/base58 v1.0.3/go.mod h1:pXP9cXCfM2sFLb2viz2FNIdeMWmZDBKG3ZBYbiSM78E=
-github.com/decred/dcrd/blockchain/stake/v3 v3.0.0 h1:vr0o0ICjuEzg1End6YtBfwgDuPkg+FYIwGVEz18kFg0=
-github.com/decred/dcrd/blockchain/stake/v3 v3.0.0/go.mod h1:5GIUwsrHQCJauacgCegIR6t92SaeVi28Qls/BLN9vOw=
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyLRN07EO0cNBV6DGU=
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/chaincfg/v3 v3.0.0 h1:+TFbu7ZmvBwM+SZz5mrj6cun9ts/6DAL5sqnsaFBHGQ=
@@ -30,8 +28,6 @@ github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9r
 github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
 github.com/decred/dcrd/rpc/jsonrpc/types/v2 v2.2.0 h1:8xxN/nKOO2yx29oZEL8METscZ3eJnvbl68oFiNg2+SI=
 github.com/decred/dcrd/rpc/jsonrpc/types/v2 v2.2.0/go.mod h1:krn89ZOgSa8yc7sA4WpDK95p61NnjNWFkNlMnGrKbMc=
-github.com/decred/dcrd/txscript/v3 v3.0.0 h1:74NmirXAIskbGP0g9OWtrmN7OxDbWJ9G73a5uoxTkcM=
-github.com/decred/dcrd/txscript/v3 v3.0.0/go.mod h1:pdvnlD4KGdDoc09cvWRJ8EoRQUaiUz41uDevOWuEfII=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
 github.com/decred/go-socks v1.1.0 h1:dnENcc0KIqQo3HSXdgboXAHgqsCIutkqq6ntQjYtm2U=
diff --git a/rpcclient/mining.go b/rpcclient/mining.go
index 43d6f332..512ca5f4 100644
--- a/rpcclient/mining.go
+++ b/rpcclient/mining.go
@@ -12,7 +12,7 @@ import (
 	"errors"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	chainjson "github.com/decred/dcrd/rpc/jsonrpc/types/v2"
 )
 
diff --git a/rpcclient/notify.go b/rpcclient/notify.go
index aa7e5302..57fa03c8 100644
--- a/rpcclient/notify.go
+++ b/rpcclient/notify.go
@@ -14,7 +14,7 @@ import (
 	"strconv"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	chainjson "github.com/decred/dcrd/rpc/jsonrpc/types/v2"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/rpcclient/rawtransactions.go b/rpcclient/rawtransactions.go
index 05927642..a4bb9240 100644
--- a/rpcclient/rawtransactions.go
+++ b/rpcclient/rawtransactions.go
@@ -13,7 +13,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/dcrjson/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	chainjson "github.com/decred/dcrd/rpc/jsonrpc/types/v2"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/server.go b/server.go
index e30d8970..8b9469a1 100644
--- a/server.go
+++ b/server.go
@@ -26,7 +26,7 @@ import (
 	"time"
 
 	"github.com/decred/dcrd/addrmgr"
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/blockchain/v4/indexers"
@@ -35,7 +35,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/connmgr/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/gcs/v3/blockcf"
 	"github.com/decred/dcrd/internal/fees"
@@ -47,7 +47,7 @@ import (
 	"github.com/decred/dcrd/internal/version"
 	"github.com/decred/dcrd/lru"
 	"github.com/decred/dcrd/peer/v2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/README.md b/txscript/README.md
index 82b39e6e..f9c28b5d 100644
--- a/txscript/README.md
+++ b/txscript/README.md
@@ -3,7 +3,7 @@ txscript
 
 [![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
 [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
-[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/txscript/v3)
+[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/txscript/v4)
 
 Package txscript implements the Decred transaction script language.  There is
 a comprehensive test suite.
@@ -25,18 +25,18 @@ $ go get -u github.com/decred/dcrd/txscript
 
 ## Examples
 
-* [Standard Pay-to-pubkey-hash Script](https://pkg.go.dev/github.com/decred/dcrd/txscript/v3#example-PayToAddrScript)
+* [Standard Pay-to-pubkey-hash Script](https://pkg.go.dev/github.com/decred/dcrd/txscript/v4#example-PayToAddrScript)
   Demonstrates creating a script which pays to a Decred address.  It also
   prints the created script hex and uses the DisasmString function to display
   the disassembled script.
 
-* [Extracting Details from Standard Scripts](https://pkg.go.dev/github.com/decred/dcrd/txscript/v3#example-ExtractPkScriptAddrs)
+* [Extracting Details from Standard Scripts](https://pkg.go.dev/github.com/decred/dcrd/txscript/v4#example-ExtractPkScriptAddrs)
   Demonstrates extracting information from a standard public key script.
 
-* [Manually Signing a Transaction Output](https://pkg.go.dev/github.com/decred/dcrd/txscript/v3#example-SignTxOutput)
+* [Manually Signing a Transaction Output](https://pkg.go.dev/github.com/decred/dcrd/txscript/v4#example-SignTxOutput)
   Demonstrates manually creating and signing a redeem transaction.
 
-* [Counting Opcodes in Scripts](https://pkg.go.dev/github.com/decred/dcrd/txscript/v3#example-ScriptTokenizer)
+* [Counting Opcodes in Scripts](https://pkg.go.dev/github.com/decred/dcrd/txscript/v4#example-ScriptTokenizer)
   Demonstrates creating a script tokenizer instance and using it to count the
   number of opcodes a script contains.
 
diff --git a/txscript/consensus.go b/txscript/consensus.go
index 1b35b35e..656da12e 100644
--- a/txscript/consensus.go
+++ b/txscript/consensus.go
@@ -7,7 +7,7 @@ package txscript
 import (
 	"fmt"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 const (
diff --git a/txscript/go.mod b/txscript/go.mod
index 81fd1152..38b5eda7 100644
--- a/txscript/go.mod
+++ b/txscript/go.mod
@@ -1,4 +1,4 @@
-module github.com/decred/dcrd/txscript/v3
+module github.com/decred/dcrd/txscript/v4
 
 go 1.13
 
@@ -9,8 +9,13 @@ require (
 	github.com/decred/dcrd/crypto/ripemd160 v1.0.1
 	github.com/decred/dcrd/dcrec v1.0.0
 	github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
-	github.com/decred/dcrd/dcrutil/v3 v3.0.0
+	github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0
+	github.com/decred/dcrd/dcrutil/v4 v4.0.0
 	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.1.0
 )
+
+replace (
+	github.com/decred/dcrd/dcrec/secp256k1/v4 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrutil/v4 => ../dcrutil
+)
diff --git a/txscript/go.sum b/txscript/go.sum
index 4ce8aeeb..b1d098a2 100644
--- a/txscript/go.sum
+++ b/txscript/go.sum
@@ -18,10 +18,6 @@ github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1 h1:V6eqU1crZzuoFT4KG2LhaU5xDSdkHuvLQsj25wd7Wb4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0 h1:sgNeV1VRMDzs6rzyPpxyM0jp317hnwiq58Filgag2xw=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0 h1:n6uQaTQynIhCY89XsoDk2WQqcUcnbD+zUM9rnZcIOZo=
-github.com/decred/dcrd/dcrutil/v3 v3.0.0/go.mod h1:iVsjcqVzLmYFGCZLet2H7Nq+7imV9tYcuY+0lC2mNsY=
 github.com/decred/dcrd/wire v1.4.0 h1:KmSo6eTQIvhXS0fLBQ/l7hG7QLcSJQKSwSyzSqJYDk0=
 github.com/decred/dcrd/wire v1.4.0/go.mod h1:WxC/0K+cCAnBh+SKsRjIX9YPgvrjhmE+6pZlel1G7Ro=
 github.com/decred/slog v1.1.0 h1:uz5ZFfmaexj1rEDgZvzQ7wjGkoSPjw2LCh8K+K1VrW4=
diff --git a/txscript/opcode.go b/txscript/opcode.go
index 0c651e65..79a84e15 100644
--- a/txscript/opcode.go
+++ b/txscript/opcode.go
@@ -18,9 +18,9 @@ import (
 	"github.com/decred/dcrd/crypto/ripemd160"
 	"github.com/decred/dcrd/dcrec"
 	"github.com/decred/dcrd/dcrec/edwards/v2"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/sigcache.go b/txscript/sigcache.go
index 8381b8eb..6190c4ea 100644
--- a/txscript/sigcache.go
+++ b/txscript/sigcache.go
@@ -12,8 +12,8 @@ import (
 
 	"github.com/dchest/siphash"
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/sign.go b/txscript/sign.go
index a1fb320e..1576760f 100644
--- a/txscript/sign.go
+++ b/txscript/sign.go
@@ -11,10 +11,10 @@ import (
 
 	"github.com/decred/dcrd/dcrec"
 	"github.com/decred/dcrd/dcrec/edwards/v2"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/standard.go b/txscript/standard.go
index fd75b8eb..9acf8f51 100644
--- a/txscript/standard.go
+++ b/txscript/standard.go
@@ -11,8 +11,8 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 const (


Test patch:
diff --git a/blockchain/agendas_test.go b/blockchain/agendas_test.go
index dd24890e..82bb19f3 100644
--- a/blockchain/agendas_test.go
+++ b/blockchain/agendas_test.go
@@ -8,11 +8,11 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/chain_test.go b/blockchain/chain_test.go
index 6f6937ac..b3b5f070 100644
--- a/blockchain/chain_test.go
+++ b/blockchain/chain_test.go
@@ -20,7 +20,7 @@ import (
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/chainio_test.go b/blockchain/chainio_test.go
index 774102c6..7894ef86 100644
--- a/blockchain/chainio_test.go
+++ b/blockchain/chainio_test.go
@@ -14,7 +14,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
diff --git a/blockchain/common_test.go b/blockchain/common_test.go
index ec1675c8..b3d9ed83 100644
--- a/blockchain/common_test.go
+++ b/blockchain/common_test.go
@@ -18,15 +18,15 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/lru"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/example_test.go b/blockchain/example_test.go
index 982d0f9f..5ebe5728 100644
--- a/blockchain/example_test.go
+++ b/blockchain/example_test.go
@@ -15,7 +15,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // This example demonstrates how to create a new chain instance and use
diff --git a/blockchain/fullblocks_test.go b/blockchain/fullblocks_test.go
index 6ea7acc3..6d7a784a 100644
--- a/blockchain/fullblocks_test.go
+++ b/blockchain/fullblocks_test.go
@@ -19,8 +19,8 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/fullblocktests/generate.go b/blockchain/fullblocktests/generate.go
index b1d4b434..ba78ef81 100644
--- a/blockchain/fullblocktests/generate.go
+++ b/blockchain/fullblocktests/generate.go
@@ -17,9 +17,9 @@ import (
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/sequencelock_test.go b/blockchain/sequencelock_test.go
index e35a49e1..4d74b662 100644
--- a/blockchain/sequencelock_test.go
+++ b/blockchain/sequencelock_test.go
@@ -10,7 +10,7 @@ import (
 	"time"
 
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/stake/error_test.go b/blockchain/stake/error_test.go
index ec3a1afc..54f4ce39 100644
--- a/blockchain/stake/error_test.go
+++ b/blockchain/stake/error_test.go
@@ -8,7 +8,7 @@ package stake_test
 import (
 	"testing"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 )
 
 // TestErrorCodeStringer tests the stringized output for the ErrorCode type.
diff --git a/blockchain/stake/internal/ticketdb/chainio_test.go b/blockchain/stake/internal/ticketdb/chainio_test.go
index 4beeb799..7096643b 100644
--- a/blockchain/stake/internal/ticketdb/chainio_test.go
+++ b/blockchain/stake/internal/ticketdb/chainio_test.go
@@ -14,8 +14,8 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/dbnamespace"
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/tickettreap"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/dbnamespace"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/tickettreap"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
diff --git a/blockchain/stake/internal/ticketdb/error_test.go b/blockchain/stake/internal/ticketdb/error_test.go
index 0d4e4e0e..41f8431c 100644
--- a/blockchain/stake/internal/ticketdb/error_test.go
+++ b/blockchain/stake/internal/ticketdb/error_test.go
@@ -8,7 +8,7 @@ package ticketdb_test
 import (
 	"testing"
 
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/ticketdb"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/ticketdb"
 )
 
 // TestErrorCodeStringer tests the stringized output for the ErrorCode type.
diff --git a/blockchain/stake/lottery_test.go b/blockchain/stake/lottery_test.go
index d2edade2..bbfd4e09 100644
--- a/blockchain/stake/lottery_test.go
+++ b/blockchain/stake/lottery_test.go
@@ -12,7 +12,7 @@ import (
 	"sort"
 	"testing"
 
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/tickettreap"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/tickettreap"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 )
 
diff --git a/blockchain/stake/scripttype_test.go b/blockchain/stake/scripttype_test.go
index 2fc83d72..773d7be1 100644
--- a/blockchain/stake/scripttype_test.go
+++ b/blockchain/stake/scripttype_test.go
@@ -7,8 +7,8 @@ package stake
 import (
 	"testing"
 
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 )
 
 var (
diff --git a/blockchain/stake/staketx_test.go b/blockchain/stake/staketx_test.go
index 9c262773..810458cf 100644
--- a/blockchain/stake/staketx_test.go
+++ b/blockchain/stake/staketx_test.go
@@ -11,10 +11,10 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/stake/tickets_test.go b/blockchain/stake/tickets_test.go
index 200ca215..107711ad 100644
--- a/blockchain/stake/tickets_test.go
+++ b/blockchain/stake/tickets_test.go
@@ -16,12 +16,12 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/decred/dcrd/blockchain/stake/v3/internal/tickettreap"
+	"github.com/decred/dcrd/blockchain/stake/v4/internal/tickettreap"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/stake/treasury_test.go b/blockchain/stake/treasury_test.go
index 7c27f468..44f14730 100644
--- a/blockchain/stake/treasury_test.go
+++ b/blockchain/stake/treasury_test.go
@@ -14,9 +14,9 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/treasury_test.go b/blockchain/treasury_test.go
index 0be6069c..e7d825af 100644
--- a/blockchain/treasury_test.go
+++ b/blockchain/treasury_test.go
@@ -15,18 +15,18 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3/blockcf2"
 	"github.com/decred/dcrd/lru"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/upgrade_test.go b/blockchain/upgrade_test.go
index f176ec57..a2f504a4 100644
--- a/blockchain/upgrade_test.go
+++ b/blockchain/upgrade_test.go
@@ -11,7 +11,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/blockchain/utxoviewpoint_test.go b/blockchain/utxoviewpoint_test.go
index 9aa8d6b4..95cda652 100644
--- a/blockchain/utxoviewpoint_test.go
+++ b/blockchain/utxoviewpoint_test.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/validate_test.go b/blockchain/validate_test.go
index 7f9b054e..52674b89 100644
--- a/blockchain/validate_test.go
+++ b/blockchain/validate_test.go
@@ -22,7 +22,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/blockchain/votebits_test.go b/blockchain/votebits_test.go
index 139688e6..05eef7ab 100644
--- a/blockchain/votebits_test.go
+++ b/blockchain/votebits_test.go
@@ -8,7 +8,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/v3"
 )
 
diff --git a/database/example_test.go b/database/example_test.go
index a4017be7..ba0ebc9e 100644
--- a/database/example_test.go
+++ b/database/example_test.go
@@ -14,7 +14,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	_ "github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/database/ffldb/bench_test.go b/database/ffldb/bench_test.go
index 7ce35b89..239681bb 100644
--- a/database/ffldb/bench_test.go
+++ b/database/ffldb/bench_test.go
@@ -12,7 +12,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // BenchmarkBlockHeader benchmarks how long it takes to load the mainnet genesis
diff --git a/database/ffldb/driver_test.go b/database/ffldb/driver_test.go
index 80e5e5b5..7ba56b5f 100644
--- a/database/ffldb/driver_test.go
+++ b/database/ffldb/driver_test.go
@@ -16,7 +16,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	"github.com/decred/dcrd/database/v2/ffldb"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // dbType is the database type name for this driver.
diff --git a/database/ffldb/interface_test.go b/database/ffldb/interface_test.go
index 86555c9c..e8755985 100644
--- a/database/ffldb/interface_test.go
+++ b/database/ffldb/interface_test.go
@@ -28,7 +28,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/database/ffldb/whitebox_test.go b/database/ffldb/whitebox_test.go
index f2220fff..1d22c648 100644
--- a/database/ffldb/whitebox_test.go
+++ b/database/ffldb/whitebox_test.go
@@ -21,7 +21,7 @@ import (
 	"testing"
 
 	"github.com/decred/dcrd/database/v2"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 	"github.com/syndtr/goleveldb/leveldb"
 	ldberrors "github.com/syndtr/goleveldb/leveldb/errors"
diff --git a/dcrec/secp256k1/ecdsa/bench_test.go b/dcrec/secp256k1/ecdsa/bench_test.go
index e2846d23..199bfe1a 100644
--- a/dcrec/secp256k1/ecdsa/bench_test.go
+++ b/dcrec/secp256k1/ecdsa/bench_test.go
@@ -10,7 +10,7 @@ import (
 	"math/big"
 	"testing"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // hexToModNScalar converts the passed hex string into a ModNScalar and will
diff --git a/dcrec/secp256k1/ecdsa/example_test.go b/dcrec/secp256k1/ecdsa/example_test.go
index 558b6623..6b93096d 100644
--- a/dcrec/secp256k1/ecdsa/example_test.go
+++ b/dcrec/secp256k1/ecdsa/example_test.go
@@ -10,8 +10,8 @@ import (
 	"fmt"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
 )
 
 // This example demonstrates signing a message with a secp256k1 private key that
diff --git a/dcrec/secp256k1/ecdsa/signature_test.go b/dcrec/secp256k1/ecdsa/signature_test.go
index 4158d2d8..20f6f787 100644
--- a/dcrec/secp256k1/ecdsa/signature_test.go
+++ b/dcrec/secp256k1/ecdsa/signature_test.go
@@ -13,7 +13,7 @@ import (
 	"fmt"
 	"testing"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // hexToBytes converts the passed hex string into bytes and will panic if there
diff --git a/dcrec/secp256k1/example_test.go b/dcrec/secp256k1/example_test.go
index 279dfa3c..f97a1a7d 100644
--- a/dcrec/secp256k1/example_test.go
+++ b/dcrec/secp256k1/example_test.go
@@ -13,7 +13,7 @@ import (
 	"encoding/hex"
 	"fmt"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // This example demonstrates use of GenerateSharedSecret to encrypt a message
diff --git a/dcrec/secp256k1/schnorr/example_test.go b/dcrec/secp256k1/schnorr/example_test.go
index 0a235882..aaade57d 100644
--- a/dcrec/secp256k1/schnorr/example_test.go
+++ b/dcrec/secp256k1/schnorr/example_test.go
@@ -9,8 +9,8 @@ import (
 	"fmt"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/schnorr"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/schnorr"
 )
 
 // This example demonstrates signing a message with the EC-Schnorr-DCRv0 scheme
diff --git a/dcrec/secp256k1/schnorr/signature_bench_test.go b/dcrec/secp256k1/schnorr/signature_bench_test.go
index 0dd5c355..b9c8a831 100644
--- a/dcrec/secp256k1/schnorr/signature_bench_test.go
+++ b/dcrec/secp256k1/schnorr/signature_bench_test.go
@@ -8,7 +8,7 @@ import (
 	"encoding/hex"
 	"testing"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // hexToModNScalar converts the passed hex string into a ModNScalar and will
diff --git a/dcrec/secp256k1/schnorr/signature_test.go b/dcrec/secp256k1/schnorr/signature_test.go
index 56e2329b..363bd957 100644
--- a/dcrec/secp256k1/schnorr/signature_test.go
+++ b/dcrec/secp256k1/schnorr/signature_test.go
@@ -12,7 +12,7 @@ import (
 	"time"
 
 	"github.com/decred/dcrd/crypto/blake256"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // TestSignatureParsing ensures that signatures are properly parsed including
diff --git a/dcrutil/address_test.go b/dcrutil/address_test.go
index e506e9be..a9274ff7 100644
--- a/dcrutil/address_test.go
+++ b/dcrutil/address_test.go
@@ -15,7 +15,7 @@ import (
 	"github.com/decred/base58"
 	"github.com/decred/dcrd/crypto/ripemd160"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // mockAddrParams implements the AddressParams interface and is used throughout
diff --git a/dcrutil/example_test.go b/dcrutil/example_test.go
index 14edf89f..10f0e9b0 100644
--- a/dcrutil/example_test.go
+++ b/dcrutil/example_test.go
@@ -9,7 +9,7 @@ import (
 	"math"
 
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 func ExampleAmount() {
diff --git a/hdkeychain/example_test.go b/hdkeychain/example_test.go
index 590d019a..f7d543fa 100644
--- a/hdkeychain/example_test.go
+++ b/hdkeychain/example_test.go
@@ -10,7 +10,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/hdkeychain/v3"
 )
 
diff --git a/hdkeychain/extendedkey_test.go b/hdkeychain/extendedkey_test.go
index bcb4a327..7d1e486f 100644
--- a/hdkeychain/extendedkey_test.go
+++ b/hdkeychain/extendedkey_test.go
@@ -16,7 +16,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
 )
 
 // mockNetParams implements the NetworkParams interface and is used throughout
diff --git a/internal/mempool/mempool_test.go b/internal/mempool/mempool_test.go
index cb0ae174..65ea82f9 100644
--- a/internal/mempool/mempool_test.go
+++ b/internal/mempool/mempool_test.go
@@ -16,17 +16,17 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/internal/mining"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mempool/policy_test.go b/internal/mempool/policy_test.go
index 84533659..cf5285bd 100644
--- a/internal/mempool/policy_test.go
+++ b/internal/mempool/policy_test.go
@@ -11,13 +11,13 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mining/mining_harness_test.go b/internal/mining/mining_harness_test.go
index f6d912c0..5443d81e 100644
--- a/internal/mining/mining_harness_test.go
+++ b/internal/mining/mining_harness_test.go
@@ -11,16 +11,16 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/blockchain/v4/chaingen"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mining/mining_test.go b/internal/mining/mining_test.go
index d68d52bc..741e6e08 100644
--- a/internal/mining/mining_test.go
+++ b/internal/mining/mining_test.go
@@ -11,8 +11,8 @@ import (
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mining/mining_view_test.go b/internal/mining/mining_view_test.go
index e089811d..6c3fb884 100644
--- a/internal/mining/mining_view_test.go
+++ b/internal/mining/mining_view_test.go
@@ -10,7 +10,7 @@ import (
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/internal/mining/txpriorityqueue_test.go b/internal/mining/txpriorityqueue_test.go
index ca6136c3..b0a1cb5d 100644
--- a/internal/mining/txpriorityqueue_test.go
+++ b/internal/mining/txpriorityqueue_test.go
@@ -10,7 +10,7 @@ import (
 	"math/rand"
 	"testing"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 )
 
 // TestStakeTxFeePrioHeap tests the priority heap including the stake types for
diff --git a/internal/rpcserver/rpcserverhandlers_test.go b/internal/rpcserver/rpcserverhandlers_test.go
index 56715734..c20858f1 100644
--- a/internal/rpcserver/rpcserverhandlers_test.go
+++ b/internal/rpcserver/rpcserverhandlers_test.go
@@ -25,7 +25,7 @@ import (
 
 	"github.com/davecgh/go-spew/spew"
 	"github.com/decred/dcrd/addrmgr"
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/blockchain/v4"
 	"github.com/decred/dcrd/blockchain/v4/indexers"
@@ -33,7 +33,7 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/database/v2"
 	"github.com/decred/dcrd/dcrjson/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/gcs/v3"
 	"github.com/decred/dcrd/gcs/v3/blockcf2"
 	"github.com/decred/dcrd/internal/mempool"
diff --git a/internal/rpcserver/treasury_test.go b/internal/rpcserver/treasury_test.go
index c9347781..e7c11852 100644
--- a/internal/rpcserver/treasury_test.go
+++ b/internal/rpcserver/treasury_test.go
@@ -14,16 +14,16 @@ import (
 	"testing"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/rpcclient/v7"
 	"github.com/decred/dcrd/rpctest"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/rpctest/memwallet.go b/rpctest/memwallet.go
index 21fe8476..e31d5927 100644
--- a/rpctest/memwallet.go
+++ b/rpctest/memwallet.go
@@ -17,11 +17,11 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/hdkeychain/v3"
 	"github.com/decred/dcrd/rpcclient/v7"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/rpctest/rpc_harness.go b/rpctest/rpc_harness.go
index 800cf913..996c2381 100644
--- a/rpctest/rpc_harness.go
+++ b/rpctest/rpc_harness.go
@@ -19,7 +19,7 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/rpcclient/v7"
 	"github.com/decred/dcrd/wire"
 )
diff --git a/rpctest/rpc_harness_test.go b/rpctest/rpc_harness_test.go
index 6b2634f6..d2498f74 100644
--- a/rpctest/rpc_harness_test.go
+++ b/rpctest/rpc_harness_test.go
@@ -17,9 +17,9 @@ import (
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	dcrdtypes "github.com/decred/dcrd/rpc/jsonrpc/types/v2"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 
 	"golang.org/x/sync/errgroup"
diff --git a/rpctest/votingwallet.go b/rpctest/votingwallet.go
index 8283c185..b6390fbc 100644
--- a/rpctest/votingwallet.go
+++ b/rpctest/votingwallet.go
@@ -11,16 +11,16 @@ import (
 	"strings"
 	"time"
 
-	"github.com/decred/dcrd/blockchain/stake/v3"
+	"github.com/decred/dcrd/blockchain/stake/v4"
 	"github.com/decred/dcrd/blockchain/standalone/v2"
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 	dcrdtypes "github.com/decred/dcrd/rpc/jsonrpc/types/v2"
 	"github.com/decred/dcrd/rpcclient/v7"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/example_test.go b/txscript/example_test.go
index cef06ae0..9c863ee3 100644
--- a/txscript/example_test.go
+++ b/txscript/example_test.go
@@ -12,9 +12,9 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
-	"github.com/decred/dcrd/txscript/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
+	"github.com/decred/dcrd/txscript/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/reference_test.go b/txscript/reference_test.go
index c5c06957..31aa40e9 100644
--- a/txscript/reference_test.go
+++ b/txscript/reference_test.go
@@ -18,7 +18,7 @@ import (
 	"testing"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/sigcache_test.go b/txscript/sigcache_test.go
index 8095736f..7127c8e6 100644
--- a/txscript/sigcache_test.go
+++ b/txscript/sigcache_test.go
@@ -13,8 +13,8 @@ import (
 	"testing"
 
 	"github.com/decred/dcrd/chaincfg/chainhash"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/sign_test.go b/txscript/sign_test.go
index 2704d5f9..cb30b933 100644
--- a/txscript/sign_test.go
+++ b/txscript/sign_test.go
@@ -16,8 +16,8 @@ import (
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
 	"github.com/decred/dcrd/dcrec/edwards/v2"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 	"github.com/decred/dcrd/wire"
 )
 
diff --git a/txscript/standard_test.go b/txscript/standard_test.go
index b148cfcb..a14daf9a 100644
--- a/txscript/standard_test.go
+++ b/txscript/standard_test.go
@@ -15,8 +15,8 @@ import (
 	"github.com/decred/dcrd/chaincfg/chainhash"
 	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
-	"github.com/decred/dcrd/dcrec/secp256k1/v3"
-	"github.com/decred/dcrd/dcrutil/v3"
+	"github.com/decred/dcrd/dcrec/secp256k1/v4"
+	"github.com/decred/dcrd/dcrutil/v4"
 )
 
 // mainNetParams is an instance of the main network parameters and is shared