Repository: decred/dcrd
Pull request #2380 (2020-09-25 14:35:35)

multi: Fix treasury comments
This fixes a few treasury-related comments throughout the codebase.

It also has a commit to fix a possible race in an exported function due to missing RLock call.


Patch:
diff --git a/blockchain/go.mod b/blockchain/go.mod
index 441c1e6b..b258d875 100644
--- a/blockchain/go.mod
+++ b/blockchain/go.mod
@@ -9,11 +9,11 @@ require (
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0-20200921173733-67245079e9fb
 	github.com/decred/dcrd/database/v2 v2.0.1
 	github.com/decred/dcrd/dcrec v1.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200921173733-67245079e9fb
+	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
 	github.com/decred/dcrd/dcrutil/v3 v3.0.0-20200921173733-67245079e9fb
 	github.com/decred/dcrd/gcs/v2 v2.0.2-0.20200921173733-67245079e9fb
 	github.com/decred/dcrd/txscript/v3 v3.0.0-20200921173733-67245079e9fb
-	github.com/decred/dcrd/wire v1.3.1-0.20200921173733-67245079e9fb
+	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.0.0
 )
 
@@ -25,5 +25,4 @@ replace (
 	github.com/decred/dcrd/dcrutil/v3 => ../dcrutil
 	github.com/decred/dcrd/gcs/v2 => ../gcs
 	github.com/decred/dcrd/txscript/v3 => ../txscript
-	github.com/decred/dcrd/wire => ../wire
 )
diff --git a/blockchain/go.sum b/blockchain/go.sum
index e629aad4..786b3a96 100644
--- a/blockchain/go.sum
+++ b/blockchain/go.sum
@@ -20,16 +20,23 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/database/v2 v2.0.1 h1:ghLzkKpVpwvjrdRv3njrEfkvygQpYQX66sGVs8ha+E8=
 github.com/decred/dcrd/database/v2 v2.0.1/go.mod h1:ZOaWTv3IlNqCA+y7q3q5EozgmiDOmNwCSq3ntZn2CDo=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY=
 github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY=
 github.com/decred/dcrd/dcrutil/v2 v2.0.1 h1:aL+c7o7Q66HV1gIif+XkNYo9DeorN3l01Vns8mh0mqs=
 github.com/decred/dcrd/dcrutil/v2 v2.0.1/go.mod h1:JdEgF6eh0TTohPeiqDxqDSikTSvAczq0J7tFMyyeD+k=
+github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
 github.com/decred/slog v1.0.0/go.mod h1:zR98rEZHSnbZ4WHZtO0iqmSZjDLKhkXfrPTZQKtAonQ=
 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
diff --git a/blockchain/stake/go.mod b/blockchain/stake/go.mod
index 37ac4558..df0287ac 100644
--- a/blockchain/stake/go.mod
+++ b/blockchain/stake/go.mod
@@ -7,10 +7,10 @@ require (
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0-20200215031403-6b2ce76f0986
 	github.com/decred/dcrd/database/v2 v2.0.1
 	github.com/decred/dcrd/dcrec v1.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200215031403-6b2ce76f0986
+	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
 	github.com/decred/dcrd/dcrutil/v3 v3.0.0-20200215031403-6b2ce76f0986
 	github.com/decred/dcrd/txscript/v3 v3.0.0-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.0.0
 )
 
@@ -19,5 +19,4 @@ replace (
 	github.com/decred/dcrd/dcrec/secp256k1/v3 => ../../dcrec/secp256k1
 	github.com/decred/dcrd/dcrutil/v3 => ../../dcrutil
 	github.com/decred/dcrd/txscript/v3 => ../../txscript
-	github.com/decred/dcrd/wire => ../../wire
 )
diff --git a/blockchain/stake/go.sum b/blockchain/stake/go.sum
index e629aad4..786b3a96 100644
--- a/blockchain/stake/go.sum
+++ b/blockchain/stake/go.sum
@@ -20,16 +20,23 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/database/v2 v2.0.1 h1:ghLzkKpVpwvjrdRv3njrEfkvygQpYQX66sGVs8ha+E8=
 github.com/decred/dcrd/database/v2 v2.0.1/go.mod h1:ZOaWTv3IlNqCA+y7q3q5EozgmiDOmNwCSq3ntZn2CDo=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY=
 github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY=
 github.com/decred/dcrd/dcrutil/v2 v2.0.1 h1:aL+c7o7Q66HV1gIif+XkNYo9DeorN3l01Vns8mh0mqs=
 github.com/decred/dcrd/dcrutil/v2 v2.0.1/go.mod h1:JdEgF6eh0TTohPeiqDxqDSikTSvAczq0J7tFMyyeD+k=
+github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
 github.com/decred/slog v1.0.0/go.mod h1:zR98rEZHSnbZ4WHZtO0iqmSZjDLKhkXfrPTZQKtAonQ=
 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
diff --git a/blockchain/standalone/go.mod b/blockchain/standalone/go.mod
index 3ac85610..aae36991 100644
--- a/blockchain/standalone/go.mod
+++ b/blockchain/standalone/go.mod
@@ -4,12 +4,8 @@ go 1.11
 
 require (
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200608124004-b2f67c2dc475 // indirect
 	github.com/decred/dcrd/txscript/v3 v3.0.0-20200611204838-4c5825cf9054
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 )
 
-replace (
-	github.com/decred/dcrd/txscript/v3 => ../../txscript
-	github.com/decred/dcrd/wire => ../../wire
-)
+replace github.com/decred/dcrd/txscript/v3 => ../../txscript
diff --git a/blockchain/standalone/go.sum b/blockchain/standalone/go.sum
index 55169f37..f8965f30 100644
--- a/blockchain/standalone/go.sum
+++ b/blockchain/standalone/go.sum
@@ -15,17 +15,22 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY=
 github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200215023918-6247af01d5e3/go.mod h1:Ej0/gOv8NpFfaczyXGndw7eRMJFVhmY2faSeyxztSUw=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200215031403-6b2ce76f0986 h1:r8PwukjSzsZeVOgq1M3Q6ml6A7zZGvMTFjmxFcl2XX8=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200215031403-6b2ce76f0986/go.mod h1:Ej0/gOv8NpFfaczyXGndw7eRMJFVhmY2faSeyxztSUw=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200608124004-b2f67c2dc475 h1:N4p2A5SPMXm97Vc8LazxchwudeE5GDs6S0WxwcrRmog=
-github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200608124004-b2f67c2dc475/go.mod h1:J70FGZSbzsjecRTiTzER+3f1KZLNaXkuv+yeFTKoxM8=
+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-20200215031403-6b2ce76f0986 h1:oT+4AnwK68i+xJlMUAh7G2wiazWY7ZaMWbBdXvV29mA=
 github.com/decred/dcrd/dcrutil/v3 v3.0.0-20200215031403-6b2ce76f0986/go.mod h1:jFxEd2LWDLvrWlrIiyx9ZGTQjvoFHZ0OVfBdyIX7jSw=
+github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
 github.com/decred/slog v1.0.0/go.mod h1:zR98rEZHSnbZ4WHZtO0iqmSZjDLKhkXfrPTZQKtAonQ=
diff --git a/blockchain/treasury.go b/blockchain/treasury.go
index d22373dc..01be28ab 100644
--- a/blockchain/treasury.go
+++ b/blockchain/treasury.go
@@ -607,8 +607,6 @@ func VerifyTSpendSignature(msgTx *wire.MsgTx, signature, pubKey []byte) error {
 //
 // It also returns the node immediately before the last checked node (that is,
 // the node before node-nbBlocks).
-//
-// This function must be called with the block index read lock held.
 func (b *BlockChain) sumPastTreasuryExpenditure(preTVINode *blockNode, nbBlocks uint64) (int64, *blockNode, error) {
 	node := preTVINode
 	var total int64
@@ -634,7 +632,7 @@ func (b *BlockChain) sumPastTreasuryExpenditure(preTVINode *blockNode, nbBlocks
 			}
 		}
 
-		node = b.index.lookupNode(&node.parent.hash)
+		node = node.parent
 	}
 
 	return total, node, nil
@@ -646,8 +644,6 @@ func (b *BlockChain) sumPastTreasuryExpenditure(preTVINode *blockNode, nbBlocks
 // returned amount.
 //
 // The passed node MUST correspond to a node immediately prior to a TVI block.
-//
-// This function must be called with the block index read lock held.
 func (b *BlockChain) maxTreasuryExpenditure(preTVINode *blockNode) (int64, error) {
 	// The expenditure policy check is roughly speaking:
 	//
@@ -731,10 +727,7 @@ func (b *BlockChain) maxTreasuryExpenditure(preTVINode *blockNode) (int64, error
 // the treasury by a set of TSpends for a block that extends the given block
 // hash. Function will return 0 if it is called on an invalid TVI.
 func (b *BlockChain) MaxTreasuryExpenditure(preTVIBlock *chainhash.Hash) (int64, error) {
-	b.index.RLock()
-	defer b.index.RUnlock()
-
-	preTVINode := b.index.lookupNode(preTVIBlock)
+	preTVINode := b.index.LookupNode(preTVIBlock)
 	if preTVINode == nil {
 		return 0, fmt.Errorf("unknown block %s", preTVIBlock)
 	}
@@ -880,8 +873,9 @@ type tspendVotes struct {
 	no    int    // No vote tally
 }
 
-// tSpendCountVotes returns the vote tally for a given tspend.
-// NOTE: This function must only be called on a TVI.
+// tSpendCountVotes returns the vote tally for a given tspend up to the
+// specified block. Note that this function errors if the block is outside the
+// voting window for the given tspend.
 func (b *BlockChain) tSpendCountVotes(prevNode *blockNode, tspend *dcrutil.Tx) (*tspendVotes, error) {
 	trsyLog.Tracef("tSpendCountVotes: processing tspend %v", tspend.Hash())
 
@@ -949,7 +943,7 @@ func (b *BlockChain) tSpendCountVotes(prevNode *blockNode, tspend *dcrutil.Tx) (
 			t.no += no
 		}
 
-		node = b.index.lookupNode(&node.parent.hash)
+		node = node.parent
 		if node == nil {
 			break
 		}
@@ -989,9 +983,8 @@ func (b *BlockChain) TSpendCountVotes(block *chainhash.Hash, tspend *dcrutil.Tx)
 }
 
 // checkTSpendHasVotes verifies that the provided TSpend has enough votes to be
-// included in the provided block. This function must only be called on a TVI.
-// Note that block can be incomplete; it only must contain the right height.
-// This is needed in the mining path.
+// included in a block _after_ the provided block node. Such child node MUST be
+// on a TVI.
 func (b *BlockChain) checkTSpendHasVotes(prevNode *blockNode, tspend *dcrutil.Tx) error {
 	t, err := b.tSpendCountVotes(prevNode, tspend)
 	if err != nil {
@@ -1034,15 +1027,17 @@ func (b *BlockChain) checkTSpendHasVotes(prevNode *blockNode, tspend *dcrutil.Tx
 	return nil
 }
 
-// CheckTSpendHasVotes exports checkTSpendHasVotes for mining purposes.
+// CheckTSpendHasVotes checks whether the given tspend has enough votes to be
+// included in a block _after_ the specified prevHash block.
 //
-// Block MUST have the Header.Height set to the correct height of the (future)
-// block and Header.PrevBlock MUST be set to the hash of the parent block of
-// the future block.
+// Such child block MUST be on a TVI, otherwise the result of this function may
+// not correspond to the behavior of the consensus rules.
+//
+// This function is safe for concurrent access.
 func (b *BlockChain) CheckTSpendHasVotes(prevHash chainhash.Hash, tspend *dcrutil.Tx) error {
 	prevNode := b.index.LookupNode(&prevHash)
 	if prevNode == nil {
-		return fmt.Errorf("unknown previous block %s", prevHash)
+		return UnknownBlockError(prevHash)
 	}
 	return b.checkTSpendHasVotes(prevNode, tspend)
 }
diff --git a/chaincfg/go.mod b/chaincfg/go.mod
index c1c4a771..00442086 100644
--- a/chaincfg/go.mod
+++ b/chaincfg/go.mod
@@ -5,5 +5,5 @@ go 1.11
 require (
 	github.com/davecgh/go-spew v1.1.1
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 )
diff --git a/chaincfg/go.sum b/chaincfg/go.sum
index 82fe0fa0..d90765a1 100644
--- a/chaincfg/go.sum
+++ b/chaincfg/go.sum
@@ -4,5 +4,5 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
-github.com/decred/dcrd/wire v1.3.0 h1:X76I2/a8esUmxXmFpJpAvXEi014IA4twgwcOBeIS8lE=
-github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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/database/go.mod b/database/go.mod
index 97c7d301..3317d45d 100644
--- a/database/go.mod
+++ b/database/go.mod
@@ -6,7 +6,7 @@ require (
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0-20200215031403-6b2ce76f0986
 	github.com/decred/dcrd/dcrutil/v3 v3.0.0-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.0.0
 	github.com/golang/protobuf v1.3.2 // indirect
 	github.com/jessevdk/go-flags v1.4.0
@@ -21,5 +21,4 @@ replace (
 	github.com/decred/dcrd/dcrec/secp256k1/v3 => ../dcrec/secp256k1
 	github.com/decred/dcrd/dcrutil/v3 => ../dcrutil
 	github.com/decred/dcrd/txscript/v3 => ../txscript
-	github.com/decred/dcrd/wire => ../wire
 )
diff --git a/database/go.sum b/database/go.sum
index 4f76abfb..f61e8907 100644
--- a/database/go.sum
+++ b/database/go.sum
@@ -8,12 +8,14 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/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.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
 github.com/decred/slog v1.0.0/go.mod h1:zR98rEZHSnbZ4WHZtO0iqmSZjDLKhkXfrPTZQKtAonQ=
 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
diff --git a/dcrutil/go.mod b/dcrutil/go.mod
index f091014c..7534447e 100644
--- a/dcrutil/go.mod
+++ b/dcrutil/go.mod
@@ -6,15 +6,9 @@ require (
 	github.com/davecgh/go-spew v1.1.1
 	github.com/decred/base58 v1.0.3
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
-	github.com/decred/dcrd/chaincfg/v3 v3.0.0-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/crypto/ripemd160 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/edwards/v2 v2.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/wire v1.3.0
-)
-
-replace (
-	github.com/decred/dcrd/chaincfg/v3 => ../chaincfg
-	github.com/decred/dcrd/dcrec/secp256k1/v3 => ../dcrec/secp256k1
+	github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1
+	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
+	github.com/decred/dcrd/wire v1.4.0
 )
diff --git a/dcrutil/go.sum b/dcrutil/go.sum
index ac77a5f6..f275830a 100644
--- a/dcrutil/go.sum
+++ b/dcrutil/go.sum
@@ -8,11 +8,13 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/wire v1.3.0 h1:X76I2/a8esUmxXmFpJpAvXEi014IA4twgwcOBeIS8lE=
-github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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/docs/README.md b/docs/README.md
index c9f8c716..1cb426ed 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -200,9 +200,9 @@ The following versioned modules are provided by dcrd repository:
     Implements the edwards25519 twisted Edwards curve
 * [database/v2](https://github.com/decred/dcrd/tree/master/database) -
   Provides a database interface for the Decred block chain
-* [dcrutil/v2](https://github.com/decred/dcrd/tree/master/dcrutil) - Provides
+* [dcrutil/v3](https://github.com/decred/dcrd/tree/master/dcrutil) - Provides
   Decred-specific convenience functions and types
-* [chaincfg/v2](https://github.com/decred/dcrd/tree/master/chaincfg) - Defines
+* [chaincfg/v3](https://github.com/decred/dcrd/tree/master/chaincfg) - Defines
   chain configuration parameters for the standard Decred networks and allows
   callers to define their own custom Decred networks for testing puproses
   * [chainhash](https://github.com/decred/dcrd/tree/master/chaincfg/chainhash) -
diff --git a/docs/assets/module_hierarchy.gv b/docs/assets/module_hierarchy.gv
index 71adf4d3..e8d0c995 100644
--- a/docs/assets/module_hierarchy.gv
+++ b/docs/assets/module_hierarchy.gv
@@ -8,12 +8,12 @@ digraph {
 	types [label="rpc/jsonrpc/types" fillcolor=tomato]
 	wire [label="wire" fillcolor=coral]
 	addrmgr [label="addrmgr" fillcolor=lightsalmon]
-	chaincfg [label="chaincfg/v2" fillcolor=cadetblue]
+	chaincfg [label="chaincfg/v3" fillcolor=cadetblue]
 	connmgr [label="connmgr/v3" fillcolor=mistyrose]
 	dcrec [label="dcrec" fillcolor=mediumpurple]
 	edwards [label="dcrec/edwards/v2" fillcolor=lightseagreen]
 	secp256k1 [label="dcrec/secp256k1/v3" fillcolor=mediumvioletred]
-	dcrutil [label="dcrutil/v2" fillcolor=burlywood]
+	dcrutil [label="dcrutil/v3" fillcolor=burlywood]
 	database [label="database/v2" fillcolor=dodgerblue]
 	hdkeychain [label="hdkeychain/v2" fillcolor=deepskyblue]
 	txscript [label="txscript/v2" fillcolor=mediumspringgreen]
@@ -26,6 +26,8 @@ digraph {
 	rpcclient [label="rpcclient/v4" fillcolor=mediumseagreen]
 	dcrd [label="dcrd" fillcolor=chocolate]
 
+	{rank=same wire secp256k1 dcrjson}
+	{rank=same dcrec chaincfg edwards}
 	{rank=same connmgr addrmgr hdkeychain peer rpcclient}
 
 	certgen
@@ -35,7 +37,6 @@ digraph {
 	wire -> chaincfg [dir=back color=coral]
 	wire -> connmgr [dir=back color=coral]
 	chainhash -> secp256k1 [dir=back color=aquamarine]
-	chaincfg -> dcrutil [dir=back color=cadetblue]
 	dcrec -> dcrutil [dir=back color=mediumpurple]
 	edwards ->  dcrutil [dir=back color=lightseagreen]
 	secp256k1 ->  dcrutil [dir=back color=mediumvioletred]
diff --git a/docs/assets/module_hierarchy.svg b/docs/assets/module_hierarchy.svg
index 8b7329ac..f4f1839a 100644
--- a/docs/assets/module_hierarchy.svg
+++ b/docs/assets/module_hierarchy.svg
@@ -4,12 +4,12 @@
 <!-- Generated by graphviz version 2.38.0 (20140413.2041)
  -->
 <!-- Title: %3 Pages: 1 -->
-<svg width="621pt" height="720pt"
- viewBox="0.00 0.00 621.00 720.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<svg width="567pt" height="720pt"
+ viewBox="0.00 0.00 567.00 720.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 716)">
 <title>%3</title>
-<polygon fill="white" stroke="#000000" points="-4,4 -4,-716 617,-716 617,4 -4,4"/>
-<text text-anchor="start" x="240" y="-694.6" font-family="Times New Roman,serif" text-decoration="underline" font-size="18.00">Module Hierarchy</text>
+<polygon fill="white" stroke="#000000" points="-4,4 -4,-716 563,-716 563,4 -4,4"/>
+<text text-anchor="start" x="213" y="-694.6" font-family="Times New Roman,serif" text-decoration="underline" font-size="18.00">Module Hierarchy</text>
 <!-- certgen -->
 <g id="node1" class="node"><title>certgen</title>
 <path fill="darkkhaki" stroke="black" d="M45,-108C45,-108 12,-108 12,-108 6,-108 0,-102 0,-96 0,-96 0,-84 0,-84 0,-78 6,-72 12,-72 12,-72 45,-72 45,-72 51,-72 57,-78 57,-84 57,-84 57,-96 57,-96 57,-102 51,-108 45,-108"/>
@@ -21,254 +21,249 @@
 <text text-anchor="middle" x="253.5" y="-14.3" font-family="Times New Roman,serif" font-size="14.00">dcrd</text>
 </g>
 <!-- certgen&#45;&gt;dcrd -->
-<g id="edge24" class="edge"><title>certgen&#45;&gt;dcrd</title>
+<g id="edge23" class="edge"><title>certgen&#45;&gt;dcrd</title>
 <path fill="none" stroke="darkkhaki" d="M28.5,-61.9092C28.5,-61.9092 28.5,-12 28.5,-12 28.5,-12 166.517,-12 226.36,-12"/>
 <polygon fill="darkkhaki" stroke="darkkhaki" points="25.0001,-61.9091 28.5,-71.9092 32.0001,-61.9092 25.0001,-61.9091"/>
 </g>
 <!-- chainhash -->
 <g id="node2" class="node"><title>chainhash</title>
-<path fill="aquamarine" stroke="black" d="M483.5,-684C483.5,-684 385.5,-684 385.5,-684 379.5,-684 373.5,-678 373.5,-672 373.5,-672 373.5,-660 373.5,-660 373.5,-654 379.5,-648 385.5,-648 385.5,-648 483.5,-648 483.5,-648 489.5,-648 495.5,-654 495.5,-660 495.5,-660 495.5,-672 495.5,-672 495.5,-678 489.5,-684 483.5,-684"/>
-<text text-anchor="middle" x="434.5" y="-662.3" font-family="Times New Roman,serif" font-size="14.00">chaincfg/chainhash</text>
+<path fill="aquamarine" stroke="black" d="M342.5,-684C342.5,-684 244.5,-684 244.5,-684 238.5,-684 232.5,-678 232.5,-672 232.5,-672 232.5,-660 232.5,-660 232.5,-654 238.5,-648 244.5,-648 244.5,-648 342.5,-648 342.5,-648 348.5,-648 354.5,-654 354.5,-660 354.5,-660 354.5,-672 354.5,-672 354.5,-678 348.5,-684 342.5,-684"/>
+<text text-anchor="middle" x="293.5" y="-662.3" font-family="Times New Roman,serif" font-size="14.00">chaincfg/chainhash</text>
 </g>
 <!-- dcrjson -->
 <g id="node3" class="node"><title>dcrjson</title>
-<path fill="indianred" stroke="black" d="M581.5,-612C581.5,-612 529.5,-612 529.5,-612 523.5,-612 517.5,-606 517.5,-600 517.5,-600 517.5,-588 517.5,-588 517.5,-582 523.5,-576 529.5,-576 529.5,-576 581.5,-576 581.5,-576 587.5,-576 593.5,-582 593.5,-588 593.5,-588 593.5,-600 593.5,-600 593.5,-606 587.5,-612 581.5,-612"/>
-<text text-anchor="middle" x="555.5" y="-590.3" font-family="Times New Roman,serif" font-size="14.00">dcrjson/v3</text>
+<path fill="indianred" stroke="black" d="M319.5,-612C319.5,-612 267.5,-612 267.5,-612 261.5,-612 255.5,-606 255.5,-600 255.5,-600 255.5,-588 255.5,-588 255.5,-582 261.5,-576 267.5,-576 267.5,-576 319.5,-576 319.5,-576 325.5,-576 331.5,-582 331.5,-588 331.5,-588 331.5,-600 331.5,-600 331.5,-606 325.5,-612 319.5,-612"/>
+<text text-anchor="middle" x="293.5" y="-590.3" font-family="Times New Roman,serif" font-size="14.00">dcrjson/v3</text>
 </g>
 <!-- chainhash&#45;&gt;dcrjson -->
 <g id="edge1" class="edge"><title>chainhash&#45;&gt;dcrjson</title>
-<path fill="none" stroke="aquamarine" d="M505.709,-666C505.709,-666 555.5,-666 555.5,-666 555.5,-666 555.5,-633.498 555.5,-612.169"/>
-<polygon fill="aquamarine" stroke="aquamarine" points="505.709,-662.5 495.709,-666 505.709,-669.5 505.709,-662.5"/>
+<path fill="none" stroke="aquamarine" d="M293.5,-637.831C293.5,-637.831 293.5,-612.413 293.5,-612.413"/>
+<polygon fill="aquamarine" stroke="aquamarine" points="290,-637.831 293.5,-647.831 297,-637.831 290,-637.831"/>
 </g>
 <!-- wire -->
 <g id="node5" class="node"><title>wire</title>
-<path fill="coral" stroke="black" d="M216.5,-612C216.5,-612 186.5,-612 186.5,-612 180.5,-612 174.5,-606 174.5,-600 174.5,-600 174.5,-588 174.5,-588 174.5,-582 180.5,-576 186.5,-576 186.5,-576 216.5,-576 216.5,-576 222.5,-576 228.5,-582 228.5,-588 228.5,-588 228.5,-600 228.5,-600 228.5,-606 222.5,-612 216.5,-612"/>
-<text text-anchor="middle" x="201.5" y="-590.3" font-family="Times New Roman,serif" font-size="14.00">wire</text>
+<path fill="coral" stroke="black" d="M189.5,-612C189.5,-612 159.5,-612 159.5,-612 153.5,-612 147.5,-606 147.5,-600 147.5,-600 147.5,-588 147.5,-588 147.5,-582 153.5,-576 159.5,-576 159.5,-576 189.5,-576 189.5,-576 195.5,-576 201.5,-582 201.5,-588 201.5,-588 201.5,-600 201.5,-600 201.5,-606 195.5,-612 189.5,-612"/>
+<text text-anchor="middle" x="174.5" y="-590.3" font-family="Times New Roman,serif" font-size="14.00">wire</text>
 </g>
 <!-- chainhash&#45;&gt;wire -->
 <g id="edge2" class="edge"><title>chainhash&#45;&gt;wire</title>
-<path fill="none" stroke="aquamarine" d="M363.282,-666C363.282,-666 201.5,-666 201.5,-666 201.5,-666 201.5,-633.498 201.5,-612.169"/>
-<polygon fill="aquamarine" stroke="aquamarine" points="363.282,-669.5 373.282,-666 363.282,-662.5 363.282,-669.5"/>
+<path fill="none" stroke="aquamarine" d="M246.25,-637.831C246.25,-637.831 246.25,-594 246.25,-594 246.25,-594 221.944,-594 201.626,-594"/>
+<polygon fill="aquamarine" stroke="aquamarine" points="242.75,-637.831 246.25,-647.831 249.75,-637.831 242.75,-637.831"/>
 </g>
 <!-- secp256k1 -->
 <g id="node11" class="node"><title>secp256k1</title>
-<path fill="mediumvioletred" stroke="black" d="M487,-612C487,-612 382,-612 382,-612 376,-612 370,-606 370,-600 370,-600 370,-588 370,-588 370,-582 376,-576 382,-576 382,-576 487,-576 487,-576 493,-576 499,-582 499,-588 499,-588 499,-600 499,-600 499,-606 493,-612 487,-612"/>
-<text text-anchor="middle" x="434.5" y="-590.3" font-family="Times New Roman,serif" font-size="14.00">dcrec/secp256k1/v3</text>
+<path fill="mediumvioletred" stroke="black" d="M528,-612C528,-612 423,-612 423,-612 417,-612 411,-606 411,-600 411,-600 411,-588 411,-588 411,-582 417,-576 423,-576 423,-576 528,-576 528,-576 534,-576 540,-582 540,-588 540,-588 540,-600 540,-600 540,-606 534,-612 528,-612"/>
+<text text-anchor="middle" x="475.5" y="-590.3" font-family="Times New Roman,serif" font-size="14.00">dcrec/secp256k1/v3</text>
 </g>
 <!-- chainhash&#45;&gt;secp256k1 -->
 <g id="edge6" class="edge"><title>chainhash&#45;&gt;secp256k1</title>
-<path fill="none" stroke="aquamarine" d="M434.5,-637.831C434.5,-637.831 434.5,-612.413 434.5,-612.413"/>
-<polygon fill="aquamarine" stroke="aquamarine" points="431,-637.831 434.5,-647.831 438,-637.831 431,-637.831"/>
+<path fill="none" stroke="aquamarine" d="M343,-637.831C343,-637.831 343,-594 343,-594 343,-594 377.168,-594 410.803,-594"/>
+<polygon fill="aquamarine" stroke="aquamarine" points="339.5,-637.831 343,-647.831 346.5,-637.831 339.5,-637.831"/>
 </g>
 <!-- types -->
 <g id="node4" class="node"><title>types</title>
-<path fill="tomato" stroke="black" d="M601,-468C601,-468 510,-468 510,-468 504,-468 498,-462 498,-456 498,-456 498,-444 498,-444 498,-438 504,-432 510,-432 510,-432 601,-432 601,-432 607,-432 613,-438 613,-444 613,-444 613,-456 613,-456 613,-462 607,-468 601,-468"/>
-<text text-anchor="middle" x="555.5" y="-446.3" font-family="Times New Roman,serif" font-size="14.00">rpc/jsonrpc/types</text>
+<path fill="tomato" stroke="black" d="M340,-468C340,-468 249,-468 249,-468 243,-468 237,-462 237,-456 237,-456 237,-444 237,-444 237,-438 243,-432 249,-432 249,-432 340,-432 340,-432 346,-432 352,-438 352,-444 352,-444 352,-456 352,-456 352,-462 346,-468 340,-468"/>
+<text text-anchor="middle" x="294.5" y="-446.3" font-family="Times New Roman,serif" font-size="14.00">rpc/jsonrpc/types</text>
 </g>
 <!-- dcrjson&#45;&gt;types -->
-<g id="edge22" class="edge"><title>dcrjson&#45;&gt;types</title>
-<path fill="none" stroke="tomato" d="M555.5,-565.762C555.5,-565.762 555.5,-468.09 555.5,-468.09"/>
-<polygon fill="tomato" stroke="tomato" points="552,-565.762 555.5,-575.762 559,-565.762 552,-565.762"/>
+<g id="edge21" class="edge"><title>dcrjson&#45;&gt;types</title>
+<path fill="none" stroke="tomato" d="M288.5,-565.762C288.5,-565.762 288.5,-468.09 288.5,-468.09"/>
+<polygon fill="tomato" stroke="tomato" points="285,-565.762 288.5,-575.762 292,-565.762 285,-565.762"/>
 </g>
 <!-- rpcclient -->
 <g id="node22" class="node"><title>rpcclient</title>
-<path fill="mediumseagreen" stroke="black" d="M546.5,-108C546.5,-108 488.5,-108 488.5,-108 482.5,-108 476.5,-102 476.5,-96 476.5,-96 476.5,-84 476.5,-84 476.5,-78 482.5,-72 488.5,-72 488.5,-72 546.5,-72 546.5,-72 552.5,-72 558.5,-78 558.5,-84 558.5,-84 558.5,-96 558.5,-96 558.5,-102 552.5,-108 546.5,-108"/>
-<text text-anchor="middle" x="517.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">rpcclient/v4</text>
+<path fill="mediumseagreen" stroke="black" d="M328.5,-108C328.5,-108 270.5,-108 270.5,-108 264.5,-108 258.5,-102 258.5,-96 258.5,-96 258.5,-84 258.5,-84 258.5,-78 264.5,-72 270.5,-72 270.5,-72 328.5,-72 328.5,-72 334.5,-72 340.5,-78 340.5,-84 340.5,-84 340.5,-96 340.5,-96 340.5,-102 334.5,-108 328.5,-108"/>
+<text text-anchor="middle" x="299.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">rpcclient/v4</text>
 </g>
 <!-- types&#45;&gt;rpcclient -->
-<g id="edge23" class="edge"><title>types&#45;&gt;rpcclient</title>
-<path fill="none" stroke="indianred" d="M539.75,-421.653C539.75,-421.653 539.75,-108.31 539.75,-108.31"/>
-<polygon fill="indianred" stroke="indianred" points="536.25,-421.653 539.75,-431.653 543.25,-421.653 536.25,-421.653"/>
+<g id="edge22" class="edge"><title>types&#45;&gt;rpcclient</title>
+<path fill="none" stroke="indianred" d="M274.25,-421.653C274.25,-421.653 274.25,-108.31 274.25,-108.31"/>
+<polygon fill="indianred" stroke="indianred" points="270.75,-421.653 274.25,-431.653 277.75,-421.653 270.75,-421.653"/>
 </g>
 <!-- addrmgr -->
 <g id="node6" class="node"><title>addrmgr</title>
-<path fill="lightsalmon" stroke="black" d="M127.5,-108C127.5,-108 87.5,-108 87.5,-108 81.5,-108 75.5,-102 75.5,-96 75.5,-96 75.5,-84 75.5,-84 75.5,-78 81.5,-72 87.5,-72 87.5,-72 127.5,-72 127.5,-72 133.5,-72 139.5,-78 139.5,-84 139.5,-84 139.5,-96 139.5,-96 139.5,-102 133.5,-108 127.5,-108"/>
-<text text-anchor="middle" x="107.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">addrmgr</text>
+<path fill="lightsalmon" stroke="black" d="M228.5,-108C228.5,-108 188.5,-108 188.5,-108 182.5,-108 176.5,-102 176.5,-96 176.5,-96 176.5,-84 176.5,-84 176.5,-78 182.5,-72 188.5,-72 188.5,-72 228.5,-72 228.5,-72 234.5,-72 240.5,-78 240.5,-84 240.5,-84 240.5,-96 240.5,-96 240.5,-102 234.5,-108 228.5,-108"/>
+<text text-anchor="middle" x="208.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">addrmgr</text>
 </g>
 <!-- wire&#45;&gt;addrmgr -->
 <g id="edge3" class="edge"><title>wire&#45;&gt;addrmgr</title>
-<path fill="none" stroke="coral" d="M164.311,-594C164.311,-594 107.5,-594 107.5,-594 107.5,-594 107.5,-198.592 107.5,-108.235"/>
-<polygon fill="coral" stroke="coral" points="164.311,-597.5 174.311,-594 164.311,-590.5 164.311,-597.5"/>
+<path fill="none" stroke="coral" d="M190.75,-565.765C190.75,-565.765 190.75,-108.211 190.75,-108.211"/>
+<polygon fill="coral" stroke="coral" points="187.25,-565.765 190.75,-575.765 194.25,-565.765 187.25,-565.765"/>
 </g>
 <!-- chaincfg -->
 <g id="node7" class="node"><title>chaincfg</title>
-<path fill="cadetblue" stroke="black" d="M264,-540C264,-540 207,-540 207,-540 201,-540 195,-534 195,-528 195,-528 195,-516 195,-516 195,-510 201,-504 207,-504 207,-504 264,-504 264,-504 270,-504 276,-510 276,-516 276,-516 276,-528 276,-528 276,-534 270,-540 264,-540"/>
-<text text-anchor="middle" x="235.5" y="-518.3" font-family="Times New Roman,serif" font-size="14.00">chaincfg/v2</text>
+<path fill="cadetblue" stroke="black" d="M168,-540C168,-540 111,-540 111,-540 105,-540 99,-534 99,-528 99,-528 99,-516 99,-516 99,-510 105,-504 111,-504 111,-504 168,-504 168,-504 174,-504 180,-510 180,-516 180,-516 180,-528 180,-528 180,-534 174,-540 168,-540"/>
+<text text-anchor="middle" x="139.5" y="-518.3" font-family="Times New Roman,serif" font-size="14.00">chaincfg/v3</text>
 </g>
 <!-- wire&#45;&gt;chaincfg -->
 <g id="edge4" class="edge"><title>wire&#45;&gt;chaincfg</title>
-<path fill="none" stroke="coral" d="M211.75,-565.831C211.75,-565.831 211.75,-540.413 211.75,-540.413"/>
-<polygon fill="coral" stroke="coral" points="208.25,-565.831 211.75,-575.831 215.25,-565.831 208.25,-565.831"/>
+<path fill="none" stroke="coral" d="M163.75,-565.831C163.75,-565.831 163.75,-540.413 163.75,-540.413"/>
+<polygon fill="coral" stroke="coral" points="160.25,-565.831 163.75,-575.831 167.25,-565.831 160.25,-565.831"/>
 </g>
 <!-- connmgr -->
 <g id="node8" class="node"><title>connmgr</title>
-<path fill="mistyrose" stroke="black" d="M229,-108C229,-108 170,-108 170,-108 164,-108 158,-102 158,-96 158,-96 158,-84 158,-84 158,-78 164,-72 170,-72 170,-72 229,-72 229,-72 235,-72 241,-78 241,-84 241,-84 241,-96 241,-96 241,-102 235,-108 229,-108"/>
-<text text-anchor="middle" x="199.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">connmgr/v3</text>
+<path fill="mistyrose" stroke="black" d="M146,-108C146,-108 87,-108 87,-108 81,-108 75,-102 75,-96 75,-96 75,-84 75,-84 75,-78 81,-72 87,-72 87,-72 146,-72 146,-72 152,-72 158,-78 158,-84 158,-84 158,-96 158,-96 158,-102 152,-108 146,-108"/>
+<text text-anchor="middle" x="116.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">connmgr/v3</text>
 </g>
 <!-- wire&#45;&gt;connmgr -->
 <g id="edge5" class="edge"><title>wire&#45;&gt;connmgr</title>
-<path fill="none" stroke="coral" d="M184.75,-565.765C184.75,-565.765 184.75,-108.211 184.75,-108.211"/>
-<polygon fill="coral" stroke="coral" points="181.25,-565.765 184.75,-575.765 188.25,-565.765 181.25,-565.765"/>
+<path fill="none" stroke="coral" d="M137.294,-594C137.294,-594 87,-594 87,-594 87,-594 87,-198.592 87,-108.235"/>
+<polygon fill="coral" stroke="coral" points="137.294,-597.5 147.294,-594 137.294,-590.5 137.294,-597.5"/>
 </g>
 <!-- addrmgr&#45;&gt;dcrd -->
-<g id="edge25" class="edge"><title>addrmgr&#45;&gt;dcrd</title>
-<path fill="none" stroke="lightsalmon" d="M107.5,-61.9652C107.5,-61.9652 107.5,-24 107.5,-24 107.5,-24 184.159,-24 226.381,-24"/>
-<polygon fill="lightsalmon" stroke="lightsalmon" points="104,-61.9652 107.5,-71.9652 111,-61.9652 104,-61.9652"/>
-</g>
-<!-- dcrutil -->
-<g id="node12" class="node"><title>dcrutil</title>
-<path fill="burlywood" stroke="black" d="M382,-468C382,-468 337,-468 337,-468 331,-468 325,-462 325,-456 325,-456 325,-444 325,-444 325,-438 331,-432 337,-432 337,-432 382,-432 382,-432 388,-432 394,-438 394,-444 394,-444 394,-456 394,-456 394,-462 388,-468 382,-468"/>
-<text text-anchor="middle" x="359.5" y="-446.3" font-family="Times New Roman,serif" font-size="14.00">dcrutil/v2</text>
-</g>
-<!-- chaincfg&#45;&gt;dcrutil -->
-<g id="edge7" class="edge"><title>chaincfg&#45;&gt;dcrutil</title>
-<path fill="none" stroke="cadetblue" d="M267.5,-493.965C267.5,-493.965 267.5,-456 267.5,-456 267.5,-456 298.875,-456 324.981,-456"/>
-<polygon fill="cadetblue" stroke="cadetblue" points="264,-493.965 267.5,-503.965 271,-493.965 264,-493.965"/>
+<g id="edge24" class="edge"><title>addrmgr&#45;&gt;dcrd</title>
+<path fill="none" stroke="lightsalmon" d="M233.5,-61.8314C233.5,-61.8314 233.5,-36.4133 233.5,-36.4133"/>
+<polygon fill="lightsalmon" stroke="lightsalmon" points="230,-61.8313 233.5,-71.8314 237,-61.8314 230,-61.8313"/>
 </g>
 <!-- connmgr&#45;&gt;dcrd -->
-<g id="edge27" class="edge"><title>connmgr&#45;&gt;dcrd</title>
-<path fill="none" stroke="mistyrose" d="M233.75,-61.8314C233.75,-61.8314 233.75,-36.4133 233.75,-36.4133"/>
-<polygon fill="mistyrose" stroke="mistyrose" points="230.25,-61.8313 233.75,-71.8314 237.25,-61.8314 230.25,-61.8313"/>
+<g id="edge26" class="edge"><title>connmgr&#45;&gt;dcrd</title>
+<path fill="none" stroke="mistyrose" d="M116.5,-61.9652C116.5,-61.9652 116.5,-24 116.5,-24 116.5,-24 186.507,-24 226.433,-24"/>
+<polygon fill="mistyrose" stroke="mistyrose" points="113,-61.9652 116.5,-71.9652 120,-61.9652 113,-61.9652"/>
 </g>
 <!-- dcrec -->
 <g id="node9" class="node"><title>dcrec</title>
-<path fill="mediumpurple" stroke="black" d="M336.5,-540C336.5,-540 306.5,-540 306.5,-540 300.5,-540 294.5,-534 294.5,-528 294.5,-528 294.5,-516 294.5,-516 294.5,-510 300.5,-504 306.5,-504 306.5,-504 336.5,-504 336.5,-504 342.5,-504 348.5,-510 348.5,-516 348.5,-516 348.5,-528 348.5,-528 348.5,-534 342.5,-540 336.5,-540"/>
-<text text-anchor="middle" x="321.5" y="-518.3" font-family="Times New Roman,serif" font-size="14.00">dcrec</text>
+<path fill="mediumpurple" stroke="black" d="M363.5,-540C363.5,-540 333.5,-540 333.5,-540 327.5,-540 321.5,-534 321.5,-528 321.5,-528 321.5,-516 321.5,-516 321.5,-510 327.5,-504 333.5,-504 333.5,-504 363.5,-504 363.5,-504 369.5,-504 375.5,-510 375.5,-516 375.5,-516 375.5,-528 375.5,-528 375.5,-534 369.5,-540 363.5,-540"/>
+<text text-anchor="middle" x="348.5" y="-518.3" font-family="Times New Roman,serif" font-size="14.00">dcrec</text>
+</g>
+<!-- dcrutil -->
+<g id="node12" class="node"><title>dcrutil</title>
+<path fill="burlywood" stroke="black" d="M474,-468C474,-468 429,-468 429,-468 423,-468 417,-462 417,-456 417,-456 417,-444 417,-444 417,-438 423,-432 429,-432 429,-432 474,-432 474,-432 480,-432 486,-438 486,-444 486,-444 486,-456 486,-456 486,-462 480,-468 474,-468"/>
+<text text-anchor="middle" x="451.5" y="-446.3" font-family="Times New Roman,serif" font-size="14.00">dcrutil/v3</text>
 </g>
 <!-- dcrec&#45;&gt;dcrutil -->
-<g id="edge8" class="edge"><title>dcrec&#45;&gt;dcrutil</title>
-<path fill="none" stroke="mediumpurple" d="M336.75,-493.831C336.75,-493.831 336.75,-468.413 336.75,-468.413"/>
-<polygon fill="mediumpurple" stroke="mediumpurple" points="333.25,-493.831 336.75,-503.831 340.25,-493.831 333.25,-493.831"/>
+<g id="edge7" class="edge"><title>dcrec&#45;&gt;dcrutil</title>
+<path fill="none" stroke="mediumpurple" d="M363.75,-493.965C363.75,-493.965 363.75,-456 363.75,-456 363.75,-456 392.291,-456 416.819,-456"/>
+<polygon fill="mediumpurple" stroke="mediumpurple" points="360.25,-493.965 363.75,-503.965 367.25,-493.965 360.25,-493.965"/>
 </g>
 <!-- edwards -->
 <g id="node10" class="node"><title>edwards</title>
-<path fill="lightseagreen" stroke="black" d="M470.5,-540C470.5,-540 378.5,-540 378.5,-540 372.5,-540 366.5,-534 366.5,-528 366.5,-528 366.5,-516 366.5,-516 366.5,-510 372.5,-504 378.5,-504 378.5,-504 470.5,-504 470.5,-504 476.5,-504 482.5,-510 482.5,-516 482.5,-516 482.5,-528 482.5,-528 482.5,-534 476.5,-540 470.5,-540"/>
-<text text-anchor="middle" x="424.5" y="-518.3" font-family="Times New Roman,serif" font-size="14.00">dcrec/edwards/v2</text>
+<path fill="lightseagreen" stroke="black" d="M497.5,-540C497.5,-540 405.5,-540 405.5,-540 399.5,-540 393.5,-534 393.5,-528 393.5,-528 393.5,-516 393.5,-516 393.5,-510 399.5,-504 405.5,-504 405.5,-504 497.5,-504 497.5,-504 503.5,-504 509.5,-510 509.5,-516 509.5,-516 509.5,-528 509.5,-528 509.5,-534 503.5,-540 497.5,-540"/>
+<text text-anchor="middle" x="451.5" y="-518.3" font-family="Times New Roman,serif" font-size="14.00">dcrec/edwards/v2</text>
 </g>
 <!-- edwards&#45;&gt;dcrutil -->
-<g id="edge9" class="edge"><title>edwards&#45;&gt;dcrutil</title>
-<path fill="none" stroke="lightseagreen" d="M380.25,-493.831C380.25,-493.831 380.25,-468.413 380.25,-468.413"/>
-<polygon fill="lightseagreen" stroke="lightseagreen" points="376.75,-493.831 380.25,-503.831 383.75,-493.831 376.75,-493.831"/>
+<g id="edge8" class="edge"><title>edwards&#45;&gt;dcrutil</title>
+<path fill="none" stroke="lightseagreen" d="M451.5,-493.831C451.5,-493.831 451.5,-468.413 451.5,-468.413"/>
+<polygon fill="lightseagreen" stroke="lightseagreen" points="448,-493.831 451.5,-503.831 455,-493.831 448,-493.831"/>
 </g>
 <!-- secp256k1&#45;&gt;dcrutil -->
-<g id="edge10" class="edge"><title>secp256k1&#45;&gt;dcrutil</title>
-<path fill="none" stroke="mediumvioletred" d="M359.871,-594C359.871,-594 357.5,-594 357.5,-594 357.5,-594 357.5,-506.986 357.5,-468.238"/>
-<polygon fill="mediumvioletred" stroke="mediumvioletred" points="359.871,-597.5 369.871,-594 359.871,-590.5 359.871,-597.5"/>
+<g id="edge9" class="edge"><title>secp256k1&#45;&gt;dcrutil</title>
+<path fill="none" stroke="mediumvioletred" d="M529.833,-565.959C529.833,-565.959 529.833,-456 529.833,-456 529.833,-456 507.071,-456 486.086,-456"/>
+<polygon fill="mediumvioletred" stroke="mediumvioletred" points="526.333,-565.959 529.833,-575.959 533.333,-565.959 526.333,-565.959"/>
 </g>
 <!-- database -->
 <g id="node13" class="node"><title>database</title>
-<path fill="dodgerblue" stroke="black" d="M389,-396C389,-396 330,-396 330,-396 324,-396 318,-390 318,-384 318,-384 318,-372 318,-372 318,-366 324,-360 330,-360 330,-360 389,-360 389,-360 395,-360 401,-366 401,-372 401,-372 401,-384 401,-384 401,-390 395,-396 389,-396"/>
-<text text-anchor="middle" x="359.5" y="-374.3" font-family="Times New Roman,serif" font-size="14.00">database/v2</text>
+<path fill="dodgerblue" stroke="black" d="M383,-396C383,-396 324,-396 324,-396 318,-396 312,-390 312,-384 312,-384 312,-372 312,-372 312,-366 318,-360 324,-360 324,-360 383,-360 383,-360 389,-360 395,-366 395,-372 395,-372 395,-384 395,-384 395,-390 389,-396 383,-396"/>
+<text text-anchor="middle" x="353.5" y="-374.3" font-family="Times New Roman,serif" font-size="14.00">database/v2</text>
 </g>
 <!-- dcrutil&#45;&gt;database -->
-<g id="edge11" class="edge"><title>dcrutil&#45;&gt;database</title>
-<path fill="none" stroke="burlywood" d="M359.5,-421.831C359.5,-421.831 359.5,-396.413 359.5,-396.413"/>
-<polygon fill="burlywood" stroke="burlywood" points="356,-421.831 359.5,-431.831 363,-421.831 356,-421.831"/>
+<g id="edge10" class="edge"><title>dcrutil&#45;&gt;database</title>
+<path fill="none" stroke="burlywood" d="M406.822,-444C406.822,-444 384.5,-444 384.5,-444 384.5,-444 384.5,-415.576 384.5,-396.035"/>
+<polygon fill="burlywood" stroke="burlywood" points="406.823,-447.5 416.822,-444 406.822,-440.5 406.823,-447.5"/>
 </g>
 <!-- hdkeychain -->
 <g id="node14" class="node"><title>hdkeychain</title>
-<path fill="deepskyblue" stroke="black" d="M344,-108C344,-108 271,-108 271,-108 265,-108 259,-102 259,-96 259,-96 259,-84 259,-84 259,-78 265,-72 271,-72 271,-72 344,-72 344,-72 350,-72 356,-78 356,-84 356,-84 356,-96 356,-96 356,-102 350,-108 344,-108"/>
-<text text-anchor="middle" x="307.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">hdkeychain/v2</text>
+<path fill="deepskyblue" stroke="black" d="M547,-108C547,-108 474,-108 474,-108 468,-108 462,-102 462,-96 462,-96 462,-84 462,-84 462,-78 468,-72 474,-72 474,-72 547,-72 547,-72 553,-72 559,-78 559,-84 559,-84 559,-96 559,-96 559,-102 553,-108 547,-108"/>
+<text text-anchor="middle" x="510.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">hdkeychain/v2</text>
 </g>
 <!-- dcrutil&#45;&gt;hdkeychain -->
-<g id="edge12" class="edge"><title>dcrutil&#45;&gt;hdkeychain</title>
-<path fill="none" stroke="burlywood" d="M314.889,-444C314.889,-444 300,-444 300,-444 300,-444 300,-180.18 300,-108.042"/>
-<polygon fill="burlywood" stroke="burlywood" points="314.889,-447.5 324.889,-444 314.889,-440.5 314.889,-447.5"/>
+<g id="edge11" class="edge"><title>dcrutil&#45;&gt;hdkeychain</title>
+<path fill="none" stroke="burlywood" d="M496.382,-444C496.382,-444 519.667,-444 519.667,-444 519.667,-444 519.667,-180.18 519.667,-108.042"/>
+<polygon fill="burlywood" stroke="burlywood" points="496.382,-440.5 486.382,-444 496.382,-447.5 496.382,-440.5"/>
 </g>
 <!-- txscript -->
 <g id="node15" class="node"><title>txscript</title>
-<path fill="mediumspringgreen" stroke="black" d="M483.5,-396C483.5,-396 431.5,-396 431.5,-396 425.5,-396 419.5,-390 419.5,-384 419.5,-384 419.5,-372 419.5,-372 419.5,-366 425.5,-360 431.5,-360 431.5,-360 483.5,-360 483.5,-360 489.5,-360 495.5,-366 495.5,-372 495.5,-372 495.5,-384 495.5,-384 495.5,-390 489.5,-396 483.5,-396"/>
-<text text-anchor="middle" x="457.5" y="-374.3" font-family="Times New Roman,serif" font-size="14.00">txscript/v2</text>
+<path fill="mediumspringgreen" stroke="black" d="M477.5,-396C477.5,-396 425.5,-396 425.5,-396 419.5,-396 413.5,-390 413.5,-384 413.5,-384 413.5,-372 413.5,-372 413.5,-366 419.5,-360 425.5,-360 425.5,-360 477.5,-360 477.5,-360 483.5,-360 489.5,-366 489.5,-372 489.5,-372 489.5,-384 489.5,-384 489.5,-390 483.5,-396 477.5,-396"/>
+<text text-anchor="middle" x="451.5" y="-374.3" font-family="Times New Roman,serif" font-size="14.00">txscript/v2</text>
 </g>
 <!-- dcrutil&#45;&gt;txscript -->
-<g id="edge13" class="edge"><title>dcrutil&#45;&gt;txscript</title>
-<path fill="none" stroke="burlywood" d="M404.092,-450C404.092,-450 451,-450 451,-450 451,-450 451,-417.498 451,-396.169"/>
-<polygon fill="burlywood" stroke="burlywood" points="404.092,-446.5 394.092,-450 404.092,-453.5 404.092,-446.5"/>
+<g id="edge12" class="edge"><title>dcrutil&#45;&gt;txscript</title>
+<path fill="none" stroke="burlywood" d="M451.5,-421.831C451.5,-421.831 451.5,-396.413 451.5,-396.413"/>
+<polygon fill="burlywood" stroke="burlywood" points="448,-421.831 451.5,-431.831 455,-421.831 448,-421.831"/>
 </g>
 <!-- stake -->
 <g id="node16" class="node"><title>stake</title>
-<path fill="bisque" stroke="black" d="M509,-324C509,-324 406,-324 406,-324 400,-324 394,-318 394,-312 394,-312 394,-300 394,-300 394,-294 400,-288 406,-288 406,-288 509,-288 509,-288 515,-288 521,-294 521,-300 521,-300 521,-312 521,-312 521,-318 515,-324 509,-324"/>
-<text text-anchor="middle" x="457.5" y="-302.3" font-family="Times New Roman,serif" font-size="14.00">blockchain/stake/v2</text>
+<path fill="bisque" stroke="black" d="M405,-324C405,-324 302,-324 302,-324 296,-324 290,-318 290,-312 290,-312 290,-300 290,-300 290,-294 296,-288 302,-288 302,-288 405,-288 405,-288 411,-288 417,-294 417,-300 417,-300 417,-312 417,-312 417,-318 411,-324 405,-324"/>
+<text text-anchor="middle" x="353.5" y="-302.3" font-family="Times New Roman,serif" font-size="14.00">blockchain/stake/v2</text>
 </g>
 <!-- database&#45;&gt;stake -->
-<g id="edge14" class="edge"><title>database&#45;&gt;stake</title>
-<path fill="none" stroke="dodgerblue" d="M397.5,-349.831C397.5,-349.831 397.5,-324.413 397.5,-324.413"/>
-<polygon fill="dodgerblue" stroke="dodgerblue" points="394,-349.831 397.5,-359.831 401,-349.831 394,-349.831"/>
+<g id="edge13" class="edge"><title>database&#45;&gt;stake</title>
+<path fill="none" stroke="dodgerblue" d="M353.5,-349.831C353.5,-349.831 353.5,-324.413 353.5,-324.413"/>
+<polygon fill="dodgerblue" stroke="dodgerblue" points="350,-349.831 353.5,-359.831 357,-349.831 350,-349.831"/>
 </g>
 <!-- hdkeychain&#45;&gt;dcrd -->
-<g id="edge26" class="edge"><title>hdkeychain&#45;&gt;dcrd</title>
-<path fill="none" stroke="deepskyblue" d="M269.75,-61.8314C269.75,-61.8314 269.75,-36.4133 269.75,-36.4133"/>
-<polygon fill="deepskyblue" stroke="deepskyblue" points="266.25,-61.8313 269.75,-71.8314 273.25,-61.8314 266.25,-61.8313"/>
+<g id="edge25" class="edge"><title>hdkeychain&#45;&gt;dcrd</title>
+<path fill="none" stroke="deepskyblue" d="M510.5,-61.9092C510.5,-61.9092 510.5,-12 510.5,-12 510.5,-12 346.502,-12 280.518,-12"/>
+<polygon fill="deepskyblue" stroke="deepskyblue" points="507,-61.9091 510.5,-71.9092 514,-61.9092 507,-61.9091"/>
 </g>
 <!-- txscript&#45;&gt;stake -->
-<g id="edge15" class="edge"><title>txscript&#45;&gt;stake</title>
-<path fill="none" stroke="mediumspringgreen" d="M457.5,-349.831C457.5,-349.831 457.5,-324.413 457.5,-324.413"/>
-<polygon fill="mediumspringgreen" stroke="mediumspringgreen" points="454,-349.831 457.5,-359.831 461,-349.831 454,-349.831"/>
+<g id="edge14" class="edge"><title>txscript&#45;&gt;stake</title>
+<path fill="none" stroke="mediumspringgreen" d="M405.161,-378C405.161,-378 404.25,-378 404.25,-378 404.25,-378 404.25,-345.498 404.25,-324.169"/>
+<polygon fill="mediumspringgreen" stroke="mediumspringgreen" points="403.36,-381.5 413.36,-378 403.36,-374.5 403.36,-381.5"/>
 </g>
 <!-- gcs -->
 <g id="node18" class="node"><title>gcs</title>
-<path fill="gold" stroke="black" d="M505.5,-252C505.5,-252 475.5,-252 475.5,-252 469.5,-252 463.5,-246 463.5,-240 463.5,-240 463.5,-228 463.5,-228 463.5,-222 469.5,-216 475.5,-216 475.5,-216 505.5,-216 505.5,-216 511.5,-216 517.5,-222 517.5,-228 517.5,-228 517.5,-240 517.5,-240 517.5,-246 511.5,-252 505.5,-252"/>
-<text text-anchor="middle" x="490.5" y="-230.3" font-family="Times New Roman,serif" font-size="14.00">gcs</text>
+<path fill="gold" stroke="black" d="M339.5,-252C339.5,-252 309.5,-252 309.5,-252 303.5,-252 297.5,-246 297.5,-240 297.5,-240 297.5,-228 297.5,-228 297.5,-222 303.5,-216 309.5,-216 309.5,-216 339.5,-216 339.5,-216 345.5,-216 351.5,-222 351.5,-228 351.5,-228 351.5,-240 351.5,-240 351.5,-246 345.5,-252 339.5,-252"/>
+<text text-anchor="middle" x="324.5" y="-230.3" font-family="Times New Roman,serif" font-size="14.00">gcs</text>
 </g>
 <!-- stake&#45;&gt;gcs -->
-<g id="edge16" class="edge"><title>stake&#45;&gt;gcs</title>
-<path fill="none" stroke="bisque" d="M490.5,-277.831C490.5,-277.831 490.5,-252.413 490.5,-252.413"/>
-<polygon fill="bisque" stroke="bisque" points="487,-277.831 490.5,-287.831 494,-277.831 487,-277.831"/>
+<g id="edge15" class="edge"><title>stake&#45;&gt;gcs</title>
+<path fill="none" stroke="bisque" d="M324.5,-277.831C324.5,-277.831 324.5,-252.413 324.5,-252.413"/>
+<polygon fill="bisque" stroke="bisque" points="321,-277.831 324.5,-287.831 328,-277.831 321,-277.831"/>
 </g>
 <!-- standalone -->
 <g id="node17" class="node"><title>standalone</title>
-<path fill="#8b1a1a" stroke="black" d="M433.5,-252C433.5,-252 317.5,-252 317.5,-252 311.5,-252 305.5,-246 305.5,-240 305.5,-240 305.5,-228 305.5,-228 305.5,-222 311.5,-216 317.5,-216 317.5,-216 433.5,-216 433.5,-216 439.5,-216 445.5,-222 445.5,-228 445.5,-228 445.5,-240 445.5,-240 445.5,-246 439.5,-252 433.5,-252"/>
-<text text-anchor="middle" x="375.5" y="-230.3" font-family="Times New Roman,serif" font-size="14.00">blockchain/standalone</text>
+<path fill="#8b1a1a" stroke="black" d="M497.5,-252C497.5,-252 381.5,-252 381.5,-252 375.5,-252 369.5,-246 369.5,-240 369.5,-240 369.5,-228 369.5,-228 369.5,-222 375.5,-216 381.5,-216 381.5,-216 497.5,-216 497.5,-216 503.5,-216 509.5,-222 509.5,-228 509.5,-228 509.5,-240 509.5,-240 509.5,-246 503.5,-252 497.5,-252"/>
+<text text-anchor="middle" x="439.5" y="-230.3" font-family="Times New Roman,serif" font-size="14.00">blockchain/standalone</text>
 </g>
 <!-- blockchain -->
 <g id="node19" class="node"><title>blockchain</title>
-<path fill="orchid" stroke="black" d="M405,-180C405,-180 334,-180 334,-180 328,-180 322,-174 322,-168 322,-168 322,-156 322,-156 322,-150 328,-144 334,-144 334,-144 405,-144 405,-144 411,-144 417,-150 417,-156 417,-156 417,-168 417,-168 417,-174 411,-180 405,-180"/>
-<text text-anchor="middle" x="369.5" y="-158.3" font-family="Times New Roman,serif" font-size="14.00">blockchain/v2</text>
+<path fill="orchid" stroke="black" d="M483,-180C483,-180 412,-180 412,-180 406,-180 400,-174 400,-168 400,-168 400,-156 400,-156 400,-150 406,-144 412,-144 412,-144 483,-144 483,-144 489,-144 495,-150 495,-156 495,-156 495,-168 495,-168 495,-174 489,-180 483,-180"/>
+<text text-anchor="middle" x="447.5" y="-158.3" font-family="Times New Roman,serif" font-size="14.00">blockchain/v2</text>
 </g>
 <!-- standalone&#45;&gt;blockchain -->
-<g id="edge17" class="edge"><title>standalone&#45;&gt;blockchain</title>
-<path fill="none" stroke="#8b1a1a" d="M353.667,-205.831C353.667,-205.831 353.667,-180.413 353.667,-180.413"/>
-<polygon fill="#8b1a1a" stroke="#8b1a1a" points="350.167,-205.831 353.667,-215.831 357.167,-205.831 350.167,-205.831"/>
+<g id="edge16" class="edge"><title>standalone&#45;&gt;blockchain</title>
+<path fill="none" stroke="#8b1a1a" d="M463.333,-205.831C463.333,-205.831 463.333,-180.413 463.333,-180.413"/>
+<polygon fill="#8b1a1a" stroke="#8b1a1a" points="459.833,-205.831 463.333,-215.831 466.833,-205.831 459.833,-205.831"/>
 </g>
 <!-- gcs&#45;&gt;blockchain -->
-<g id="edge18" class="edge"><title>gcs&#45;&gt;blockchain</title>
-<path fill="none" stroke="gold" d="M476.5,-205.578C476.5,-205.578 476.5,-198 476.5,-198 476.5,-198 385.333,-198 385.333,-198 385.333,-198 385.333,-189.279 385.333,-180.422"/>
-<polygon fill="gold" stroke="gold" points="473,-205.578 476.5,-215.578 480,-205.578 473,-205.578"/>
+<g id="edge17" class="edge"><title>gcs&#45;&gt;blockchain</title>
+<path fill="none" stroke="gold" d="M339.5,-205.578C339.5,-205.578 339.5,-198 339.5,-198 339.5,-198 431.667,-198 431.667,-198 431.667,-198 431.667,-189.279 431.667,-180.422"/>
+<polygon fill="gold" stroke="gold" points="336,-205.578 339.5,-215.578 343,-205.578 336,-205.578"/>
 </g>
 <!-- gcs&#45;&gt;rpcclient -->
-<g id="edge19" class="edge"><title>gcs&#45;&gt;rpcclient</title>
-<path fill="none" stroke="gold" d="M503.5,-205.762C503.5,-205.762 503.5,-108.09 503.5,-108.09"/>
-<polygon fill="gold" stroke="gold" points="500,-205.762 503.5,-215.762 507,-205.762 500,-205.762"/>
+<g id="edge18" class="edge"><title>gcs&#45;&gt;rpcclient</title>
+<path fill="none" stroke="gold" d="M312.5,-205.762C312.5,-205.762 312.5,-108.09 312.5,-108.09"/>
+<polygon fill="gold" stroke="gold" points="309,-205.762 312.5,-215.762 316,-205.762 309,-205.762"/>
 </g>
 <!-- peer -->
 <g id="node21" class="node"><title>peer</title>
-<path fill="khaki" stroke="black" d="M420.5,-108C420.5,-108 386.5,-108 386.5,-108 380.5,-108 374.5,-102 374.5,-96 374.5,-96 374.5,-84 374.5,-84 374.5,-78 380.5,-72 386.5,-72 386.5,-72 420.5,-72 420.5,-72 426.5,-72 432.5,-78 432.5,-84 432.5,-84 432.5,-96 432.5,-96 432.5,-102 426.5,-108 420.5,-108"/>
-<text text-anchor="middle" x="403.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">peer/v2</text>
+<path fill="khaki" stroke="black" d="M404.5,-108C404.5,-108 370.5,-108 370.5,-108 364.5,-108 358.5,-102 358.5,-96 358.5,-96 358.5,-84 358.5,-84 358.5,-78 364.5,-72 370.5,-72 370.5,-72 404.5,-72 404.5,-72 410.5,-72 416.5,-78 416.5,-84 416.5,-84 416.5,-96 416.5,-96 416.5,-102 410.5,-108 404.5,-108"/>
+<text text-anchor="middle" x="387.5" y="-86.3" font-family="Times New Roman,serif" font-size="14.00">peer/v2</text>
 </g>
 <!-- blockchain&#45;&gt;peer -->
-<g id="edge21" class="edge"><title>blockchain&#45;&gt;peer</title>
-<path fill="none" stroke="orchid" d="M395.75,-133.831C395.75,-133.831 395.75,-108.413 395.75,-108.413"/>
-<polygon fill="orchid" stroke="orchid" points="392.25,-133.831 395.75,-143.831 399.25,-133.831 392.25,-133.831"/>
+<g id="edge20" class="edge"><title>blockchain&#45;&gt;peer</title>
+<path fill="none" stroke="orchid" d="M408.25,-133.831C408.25,-133.831 408.25,-108.413 408.25,-108.413"/>
+<polygon fill="orchid" stroke="orchid" points="404.75,-133.831 408.25,-143.831 411.75,-133.831 404.75,-133.831"/>
 </g>
 <!-- lru -->
 <g id="node20" class="node"><title>lru</title>
-<path fill="#3a5fcd" stroke="black" d="M477.5,-180C477.5,-180 447.5,-180 447.5,-180 441.5,-180 435.5,-174 435.5,-168 435.5,-168 435.5,-156 435.5,-156 435.5,-150 441.5,-144 447.5,-144 447.5,-144 477.5,-144 477.5,-144 483.5,-144 489.5,-150 489.5,-156 489.5,-156 489.5,-168 489.5,-168 489.5,-174 483.5,-180 477.5,-180"/>
-<text text-anchor="middle" x="462.5" y="-158.3" font-family="Times New Roman,serif" font-size="14.00">lru</text>
+<path fill="#3a5fcd" stroke="black" d="M369.5,-180C369.5,-180 339.5,-180 339.5,-180 333.5,-180 327.5,-174 327.5,-168 327.5,-168 327.5,-156 327.5,-156 327.5,-150 333.5,-144 339.5,-144 339.5,-144 369.5,-144 369.5,-144 375.5,-144 381.5,-150 381.5,-156 381.5,-156 381.5,-168 381.5,-168 381.5,-174 375.5,-180 369.5,-180"/>
+<text text-anchor="middle" x="354.5" y="-158.3" font-family="Times New Roman,serif" font-size="14.00">lru</text>
 </g>
 <!-- lru&#45;&gt;peer -->
-<g id="edge20" class="edge"><title>lru&#45;&gt;peer</title>
-<path fill="none" stroke="#3a5fcd" d="M425.822,-162C425.822,-162 424.75,-162 424.75,-162 424.75,-162 424.75,-129.498 424.75,-108.169"/>
-<polygon fill="#3a5fcd" stroke="#3a5fcd" points="425.467,-165.5 435.467,-162 425.467,-158.5 425.467,-165.5"/>
+<g id="edge19" class="edge"><title>lru&#45;&gt;peer</title>
+<path fill="none" stroke="#3a5fcd" d="M370,-133.831C370,-133.831 370,-108.413 370,-108.413"/>
+<polygon fill="#3a5fcd" stroke="#3a5fcd" points="366.5,-133.831 370,-143.831 373.5,-133.831 366.5,-133.831"/>
 </g>
 <!-- peer&#45;&gt;dcrd -->
-<g id="edge29" class="edge"><title>peer&#45;&gt;dcrd</title>
-<path fill="none" stroke="khaki" d="M403.5,-61.9652C403.5,-61.9652 403.5,-24 403.5,-24 403.5,-24 323.89,-24 280.664,-24"/>
-<polygon fill="khaki" stroke="khaki" points="400,-61.9652 403.5,-71.9652 407,-61.9652 400,-61.9652"/>
+<g id="edge28" class="edge"><title>peer&#45;&gt;dcrd</title>
+<path fill="none" stroke="khaki" d="M387.5,-61.9652C387.5,-61.9652 387.5,-24 387.5,-24 387.5,-24 319.772,-24 280.617,-24"/>
+<polygon fill="khaki" stroke="khaki" points="384,-61.9652 387.5,-71.9652 391,-61.9652 384,-61.9652"/>
 </g>
 <!-- rpcclient&#45;&gt;dcrd -->
-<g id="edge28" class="edge"><title>rpcclient&#45;&gt;dcrd</title>
-<path fill="none" stroke="mediumseagreen" d="M517.5,-61.9092C517.5,-61.9092 517.5,-12 517.5,-12 517.5,-12 348.21,-12 280.758,-12"/>
-<polygon fill="mediumseagreen" stroke="mediumseagreen" points="514,-61.9091 517.5,-71.9092 521,-61.9092 514,-61.9091"/>
+<g id="edge27" class="edge"><title>rpcclient&#45;&gt;dcrd</title>
+<path fill="none" stroke="mediumseagreen" d="M269.5,-61.8314C269.5,-61.8314 269.5,-36.4133 269.5,-36.4133"/>
+<polygon fill="mediumseagreen" stroke="mediumseagreen" points="266,-61.8313 269.5,-71.8314 273,-61.8314 266,-61.8313"/>
 </g>
 </g>
 </svg>
diff --git a/gcs/blockcf2/blockcf.go b/gcs/blockcf2/blockcf.go
index a22617a5..0cf5e583 100644
--- a/gcs/blockcf2/blockcf.go
+++ b/gcs/blockcf2/blockcf.go
@@ -319,6 +319,7 @@ func Regular(block *wire.MsgBlock, prevScripts PrevScripter) (*gcs.FilterV2, err
 	//
 	// - Treasury add:
 	//   - Input scripts that are payments to the treasury
+	//   - Output script for the second output if it exists (tadd change)
 	//
 	// - Treasury spends:
 	//   - Output scripts that make payments
diff --git a/gcs/go.mod b/gcs/go.mod
index 9c2003f9..f186ddb2 100644
--- a/gcs/go.mod
+++ b/gcs/go.mod
@@ -8,7 +8,7 @@ require (
 	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-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 )
 
 replace (
@@ -17,5 +17,4 @@ replace (
 	github.com/decred/dcrd/dcrec/secp256k1/v3 => ../dcrec/secp256k1
 	github.com/decred/dcrd/dcrutil/v3 => ../dcrutil
 	github.com/decred/dcrd/txscript/v3 => ../txscript
-	github.com/decred/dcrd/wire => ../wire
 )
diff --git a/gcs/go.sum b/gcs/go.sum
index e629aad4..786b3a96 100644
--- a/gcs/go.sum
+++ b/gcs/go.sum
@@ -20,16 +20,23 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/database/v2 v2.0.1 h1:ghLzkKpVpwvjrdRv3njrEfkvygQpYQX66sGVs8ha+E8=
 github.com/decred/dcrd/database/v2 v2.0.1/go.mod h1:ZOaWTv3IlNqCA+y7q3q5EozgmiDOmNwCSq3ntZn2CDo=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY=
 github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY=
 github.com/decred/dcrd/dcrutil/v2 v2.0.1 h1:aL+c7o7Q66HV1gIif+XkNYo9DeorN3l01Vns8mh0mqs=
 github.com/decred/dcrd/dcrutil/v2 v2.0.1/go.mod h1:JdEgF6eh0TTohPeiqDxqDSikTSvAczq0J7tFMyyeD+k=
+github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
 github.com/decred/slog v1.0.0/go.mod h1:zR98rEZHSnbZ4WHZtO0iqmSZjDLKhkXfrPTZQKtAonQ=
 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
diff --git a/go.mod b/go.mod
index 8628f881..b7760c97 100644
--- a/go.mod
+++ b/go.mod
@@ -15,10 +15,10 @@ require (
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0-20200921173733-67245079e9fb
 	github.com/decred/dcrd/connmgr/v3 v3.0.0-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/crypto/ripemd160 v1.0.0
+	github.com/decred/dcrd/crypto/ripemd160 v1.0.1
 	github.com/decred/dcrd/database/v2 v2.0.1
 	github.com/decred/dcrd/dcrec v1.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200921173733-67245079e9fb
+	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
 	github.com/decred/dcrd/dcrjson/v3 v3.0.1
 	github.com/decred/dcrd/dcrutil/v3 v3.0.0-20200921173733-67245079e9fb
 	github.com/decred/dcrd/gcs/v2 v2.0.2-0.20200921173733-67245079e9fb
@@ -28,9 +28,9 @@ require (
 	github.com/decred/dcrd/rpc/jsonrpc/types/v2 v2.0.1-0.20200503044000-76f6906e50e5
 	github.com/decred/dcrd/rpcclient/v6 v6.0.0-20200215031403-6b2ce76f0986
 	github.com/decred/dcrd/txscript/v3 v3.0.0
-	github.com/decred/dcrd/wire v1.3.1-0.20200921173733-67245079e9fb
+	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/go-socks v1.1.0
-	github.com/decred/slog v1.0.0
+	github.com/decred/slog v1.1.0
 	github.com/gorilla/websocket v1.4.2
 	github.com/jessevdk/go-flags v1.4.0
 	github.com/jrick/bitset v1.0.0
diff --git a/go.sum b/go.sum
index 2355828e..be57c78d 100644
--- a/go.sum
+++ b/go.sum
@@ -8,12 +8,14 @@ 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/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/go-socks v1.1.0 h1:dnENcc0KIqQo3HSXdgboXAHgqsCIutkqq6ntQjYtm2U=
 github.com/decred/go-socks v1.1.0/go.mod h1:sDhHqkZH0X4JjSa02oYOGhcGHYp12FsY1jQ/meV8md0=
 github.com/decred/slog v1.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
 github.com/decred/slog v1.0.0/go.mod h1:zR98rEZHSnbZ4WHZtO0iqmSZjDLKhkXfrPTZQKtAonQ=
+github.com/decred/slog v1.1.0 h1:uz5ZFfmaexj1rEDgZvzQ7wjGkoSPjw2LCh8K+K1VrW4=
+github.com/decred/slog v1.1.0/go.mod h1:kVXlGnt6DHy2fV5OjSeuvCJ0OmlmTF6LFpEPMu/fOY0=
 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
diff --git a/hdkeychain/go.mod b/hdkeychain/go.mod
index 635392a7..06ea1c6b 100644
--- a/hdkeychain/go.mod
+++ b/hdkeychain/go.mod
@@ -6,9 +6,9 @@ require (
 	github.com/decred/base58 v1.0.3
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0-20200215031403-6b2ce76f0986
 	github.com/decred/dcrd/crypto/blake256 v1.0.0
-	github.com/decred/dcrd/crypto/ripemd160 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-20200215031403-6b2ce76f0986
+	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0
 	github.com/decred/dcrd/dcrutil/v3 v3.0.0-20200215031403-6b2ce76f0986
 )
 
diff --git a/hdkeychain/go.sum b/hdkeychain/go.sum
index ac77a5f6..2cef87bb 100644
--- a/hdkeychain/go.sum
+++ b/hdkeychain/go.sum
@@ -8,11 +8,11 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/wire v1.3.0 h1:X76I2/a8esUmxXmFpJpAvXEi014IA4twgwcOBeIS8lE=
-github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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/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/peer/go.mod b/peer/go.mod
index 732ca818..505cc8f2 100644
--- a/peer/go.mod
+++ b/peer/go.mod
@@ -7,7 +7,7 @@ require (
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/lru v1.0.0
 	github.com/decred/dcrd/txscript/v3 v3.0.0-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/go-socks v1.1.0
 	github.com/decred/slog v1.0.0
 )
@@ -17,5 +17,4 @@ replace (
 	github.com/decred/dcrd/dcrec/secp256k1/v3 => ../dcrec/secp256k1
 	github.com/decred/dcrd/dcrutil/v3 => ../dcrutil
 	github.com/decred/dcrd/txscript/v3 => ../txscript
-	github.com/decred/dcrd/wire => ../wire
 )
diff --git a/peer/go.sum b/peer/go.sum
index e0e82bd8..7aa62d1a 100644
--- a/peer/go.sum
+++ b/peer/go.sum
@@ -10,14 +10,16 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8=
 github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
+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=
 github.com/decred/go-socks v1.1.0/go.mod h1:sDhHqkZH0X4JjSa02oYOGhcGHYp12FsY1jQ/meV8md0=
 github.com/decred/slog v1.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
diff --git a/rpcclient/go.mod b/rpcclient/go.mod
index e213f83d..d0c313cd 100644
--- a/rpcclient/go.mod
+++ b/rpcclient/go.mod
@@ -8,7 +8,7 @@ require (
 	github.com/decred/dcrd/dcrutil/v3 v3.0.0-20200503044000-76f6906e50e5
 	github.com/decred/dcrd/gcs/v2 v2.0.1
 	github.com/decred/dcrd/rpc/jsonrpc/types/v2 v2.0.1-0.20200503044000-76f6906e50e5
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/go-socks v1.1.0
 	github.com/decred/slog v1.0.0
 	github.com/gorilla/websocket v1.4.2
diff --git a/rpcclient/go.sum b/rpcclient/go.sum
index 7a9d5c67..95158833 100644
--- a/rpcclient/go.sum
+++ b/rpcclient/go.sum
@@ -22,12 +22,16 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
 github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/database/v2 v2.0.1 h1:ghLzkKpVpwvjrdRv3njrEfkvygQpYQX66sGVs8ha+E8=
 github.com/decred/dcrd/database/v2 v2.0.1/go.mod h1:ZOaWTv3IlNqCA+y7q3q5EozgmiDOmNwCSq3ntZn2CDo=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
 github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
+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/v2 v2.0.0 h1:3GIJYXQDAKpLEFriGFN8SbSffak10UXHGdIcFaMPykY=
 github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0/go.mod h1:3s92l0paYkZoIHuj4X93Teg/HB7eGM9x/zokGw+u4mY=
 github.com/decred/dcrd/dcrjson/v3 v3.0.1 h1:b9cpplNJG+nutE2jS8K/BtSGIJihEQHhFjFAsvJF/iI=
@@ -40,6 +44,8 @@ github.com/decred/dcrd/txscript/v2 v2.1.0 h1:IKIpNm0lPmNQoaZ2zxZm1qMwfmLb/XXeahx
 github.com/decred/dcrd/txscript/v2 v2.1.0/go.mod h1:XaJAVrZU4NWRx4UEzTiDAs86op1m8GRJLz24SDBKOi0=
 github.com/decred/dcrd/wire v1.3.0 h1:X76I2/a8esUmxXmFpJpAvXEi014IA4twgwcOBeIS8lE=
 github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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=
 github.com/decred/go-socks v1.1.0/go.mod h1:sDhHqkZH0X4JjSa02oYOGhcGHYp12FsY1jQ/meV8md0=
 github.com/decred/slog v1.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
diff --git a/txscript/go.mod b/txscript/go.mod
index 77074608..e95fe3bb 100644
--- a/txscript/go.mod
+++ b/txscript/go.mod
@@ -6,12 +6,12 @@ require (
 	github.com/dchest/siphash v1.2.1
 	github.com/decred/dcrd/chaincfg/chainhash v1.0.2
 	github.com/decred/dcrd/chaincfg/v3 v3.0.0-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/crypto/ripemd160 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/edwards/v2 v2.0.0
-	github.com/decred/dcrd/dcrec/secp256k1/v3 v3.0.0-20200215031403-6b2ce76f0986
+	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-20200215031403-6b2ce76f0986
-	github.com/decred/dcrd/wire v1.3.0
+	github.com/decred/dcrd/wire v1.4.0
 	github.com/decred/slog v1.0.0
 )
 
diff --git a/txscript/go.sum b/txscript/go.sum
index 47b00828..e72b054a 100644
--- a/txscript/go.sum
+++ b/txscript/go.sum
@@ -10,13 +10,13 @@ github.com/decred/dcrd/chaincfg/chainhash v1.0.2 h1:rt5Vlq/jM3ZawwiacWjPa+smINyL
 github.com/decred/dcrd/chaincfg/chainhash v1.0.2/go.mod h1:BpbrGgrPTr3YJYRN3Bm+D9NuaFd+zGyNeIKgrhCXK60=
 github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=
 github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0 h1:MciTnR4NfBqDFRFjFkrn8WPLP4Vo7t6ww6ghfn6wcXQ=
-github.com/decred/dcrd/crypto/ripemd160 v1.0.0/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1 h1:TjRL4LfftzTjXzaufov96iDAkbY2R3aTvH2YMYa1IOc=
+github.com/decred/dcrd/crypto/ripemd160 v1.0.1/go.mod h1:F0H8cjIuWTRoixr/LM3REB8obcWkmYx0gbxpQWR8RPg=
 github.com/decred/dcrd/dcrec v1.0.0 h1:W+z6Es+Rai3MXYVoPAxYr5U1DGis0Co33scJ6uH2J6o=
 github.com/decred/dcrd/dcrec v1.0.0/go.mod h1:HIaqbEJQ+PDzQcORxnqen5/V1FR3B4VpIfmePklt8Q8=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0 h1:E5KszxGgpjpmW8vN811G6rBAZg0/S/DftdGqN4FW5x4=
-github.com/decred/dcrd/dcrec/edwards/v2 v2.0.0/go.mod h1:d0H8xGMWbiIQP7gN3v2rByWUcuZPm9YsgmnfoxgbINc=
-github.com/decred/dcrd/wire v1.3.0 h1:X76I2/a8esUmxXmFpJpAvXEi014IA4twgwcOBeIS8lE=
-github.com/decred/dcrd/wire v1.3.0/go.mod h1:fnKGlUY2IBuqnpxx5dYRU5Oiq392OBqAuVjRVSkIoXM=
+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/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.0.0 h1:Dl+W8O6/JH6n2xIFN2p3DNjCmjYwvrXsjlSJTQQ4MhE=
 github.com/decred/slog v1.0.0/go.mod h1:zR98rEZHSnbZ4WHZtO0iqmSZjDLKhkXfrPTZQKtAonQ=


Test patch:
diff --git a/dcrutil/example_test.go b/dcrutil/example_test.go
index bd2bf91f..14edf89f 100644
--- a/dcrutil/example_test.go
+++ b/dcrutil/example_test.go
@@ -8,7 +8,6 @@ import (
 	"fmt"
 	"math"
 
-	"github.com/decred/dcrd/chaincfg/v3"
 	"github.com/decred/dcrd/dcrec"
 	"github.com/decred/dcrd/dcrutil/v3"
 )
@@ -80,6 +79,74 @@ func ExampleAmount_unitConversions() {
 	// Atom to Atom: 44433322211100 Atom
 }
 
+// mockAddrParams implements the AddressParams interface and is used throughout
+// the tests to mock multiple networks.
+type mockAddrParams struct {
+	pubKeyID     [2]byte
+	pkhEcdsaID   [2]byte
+	pkhEd25519ID [2]byte
+	pkhSchnorrID [2]byte
+	scriptHashID [2]byte
+	privKeyID    [2]byte
+}
+
+// AddrIDPubKeyV0 returns the magic prefix bytes associated with the mock params
+// for version 0 pay-to-pubkey addresses.
+//
+// This is part of the AddressParams interface.
+func (p *mockAddrParams) AddrIDPubKeyV0() [2]byte {
+	return p.pubKeyID
+}
+
+// AddrIDPubKeyHashECDSAV0 returns the magic prefix bytes associated with the
+// mock params for version 0 pay-to-pubkey-hash addresses where the underlying
+// pubkey is secp256k1 and the signature algorithm is ECDSA.
+//
+// This is part of the AddressParams interface.
+func (p *mockAddrParams) AddrIDPubKeyHashECDSAV0() [2]byte {
+	return p.pkhEcdsaID
+}
+
+// AddrIDPubKeyHashEd25519V0 returns the magic prefix bytes associated with the
+// mock params for version 0 pay-to-pubkey-hash addresses where the underlying
+// pubkey and signature algorithm are Ed25519.
+//
+// This is part of the AddressParams interface.
+func (p *mockAddrParams) AddrIDPubKeyHashEd25519V0() [2]byte {
+	return p.pkhEd25519ID
+}
+
+// AddrIDPubKeyHashSchnorrV0 returns the magic prefix bytes associated with the
+// mock params for version 0 pay-to-pubkey-hash addresses where the underlying
+// pubkey is secp256k1 and the signature algorithm is Schnorr.
+//
+// This is part of the AddressParams interface.
+func (p *mockAddrParams) AddrIDPubKeyHashSchnorrV0() [2]byte {
+	return p.pkhSchnorrID
+}
+
+// AddrIDScriptHashV0 returns the magic prefix bytes associated with the mock
+// params for version 0 pay-to-script-hash addresses.
+//
+// This is part of the AddressParams interface.
+func (p *mockAddrParams) AddrIDScriptHashV0() [2]byte {
+	return p.scriptHashID
+}
+
+// mockMainNetParams returns mock mainnet address parameters to use throughout
+// the tests.  They match the Decred mainnet params as of the time this comment
+// was written.
+func mockMainNetParams() *mockAddrParams {
+	return &mockAddrParams{
+		pubKeyID:     [2]byte{0x13, 0x86}, // starts with Dk
+		pkhEcdsaID:   [2]byte{0x07, 0x3f}, // starts with Ds
+		pkhEd25519ID: [2]byte{0x07, 0x1f}, // starts with De
+		pkhSchnorrID: [2]byte{0x07, 0x01}, // starts with DS
+		scriptHashID: [2]byte{0x07, 0x1a}, // starts with Dc
+		privKeyID:    [2]byte{0x22, 0xde}, // starts with Pm
+	}
+}
+
 // This example demonstrates decoding addresses, determining their underlying
 // type, and displaying their associated underlying hash160 and digital
 // signature algorithm.
@@ -87,7 +154,12 @@ func ExampleDecodeAddress() {
 	// Ordinarily addresses would be read from the user or the result of a
 	// derivation, but they are hard coded here for the purposes of this
 	// example.
-	mainNetParmas := chaincfg.MainNetParams()
+	//
+	// Also, the caller would ordinarily want to use parameters from chaincfg
+	// such as chaincfg.MainNetParams(), but mock parameters are used here for
+	// the purposes of this example to avoid an otherwise unnecessary dependency
+	// on the chaincfg module.
+	mainNetParmas := mockMainNetParams()
 	addrsToDecode := []string{
 		"DsRUvfCwTMrKz29dDiQBJhZii9GDN3bVx6Q", // pay-to-pubkey-hash ecdsa
 		"DSpf9Sru9MarMKQQnuzTiQ9tjWVJA3KSm2d", // pay-to-pubkey-hash schnorr
diff --git a/dcrutil/util_test.go b/dcrutil/util_test.go
index de5b704c..dbddd824 100644
--- a/dcrutil/util_test.go
+++ b/dcrutil/util_test.go
@@ -6,36 +6,51 @@ package dcrutil
 
 import (
 	"testing"
-
-	"github.com/decred/dcrd/chaincfg/v3"
 )
 
+// TestVerifyMessage ensures the verifying a message works as intended.
 func TestVerifyMessage(t *testing.T) {
+	mainNetParams := mockMainNetParams()
+	testNetParams := mockTestNetParams()
+
 	msg := "verifymessage test"
 
 	var tests = []struct {
+		name    string
 		addr    string
 		sig     string
 		params  AddressParams
 		isValid bool
-	}{
-		// valid
-		{"TsdbYVDoh3JsyP6oEg2aHVoTjsFuHzUgGKv", "IITPXfmkfLPULbX9Im3XIyHAKiXRw5N9j6P7qf0MdEP9YQinn51lWjS+8jbTceRxCWckKKssu3ZpQm1xCWKz9GA=", chaincfg.TestNet3Params(), true},
-
-		// wrong address
-		{"TsWeG3TJzucZgYyMfZFC2GhBvbeNfA48LTo", "IITPXfmkfLPULbX9Im3XIyHAKiXRw5N9j6P7qf0MdEP9YQinn51lWjS+8jbTceRxCWckKKssu3ZpQm1xCWKz9GA=", chaincfg.TestNet3Params(), false},
-
-		// wrong signature
-		{"TsdbYVDoh3JsyP6oEg2aHVoTjsFuHzUgGKv", "HxzZggzHMljSWpKHnw1Dow84KGWvTRBCG2JqBM5W4Q7iePW0dirZXCggSeXHVQ26D0MbDFffi3yw+x2Z5nQ94gg=", chaincfg.TestNet3Params(), false},
-
-		// wrong params
-		{"TsdbYVDoh3JsyP6oEg2aHVoTjsFuHzUgGKv", "IITPXfmkfLPULbX9Im3XIyHAKiXRw5N9j6P7qf0MdEP9YQinn51lWjS+8jbTceRxCWckKKssu3ZpQm1xCWKz9GA=", chaincfg.MainNetParams(), false},
-	}
-
-	for i, test := range tests {
+	}{{
+		name:    "valid",
+		addr:    "TsdbYVDoh3JsyP6oEg2aHVoTjsFuHzUgGKv",
+		sig:     "IITPXfmkfLPULbX9Im3XIyHAKiXRw5N9j6P7qf0MdEP9YQinn51lWjS+8jbTceRxCWckKKssu3ZpQm1xCWKz9GA=",
+		params:  testNetParams,
+		isValid: true,
+	}, {
+		name:    "wrong address",
+		addr:    "TsWeG3TJzucZgYyMfZFC2GhBvbeNfA48LTo",
+		sig:     "IITPXfmkfLPULbX9Im3XIyHAKiXRw5N9j6P7qf0MdEP9YQinn51lWjS+8jbTceRxCWckKKssu3ZpQm1xCWKz9GA=",
+		params:  testNetParams,
+		isValid: false,
+	}, {
+		name:    "wrong signature",
+		addr:    "TsdbYVDoh3JsyP6oEg2aHVoTjsFuHzUgGKv",
+		sig:     "HxzZggzHMljSWpKHnw1Dow84KGWvTRBCG2JqBM5W4Q7iePW0dirZXCggSeXHVQ26D0MbDFffi3yw+x2Z5nQ94gg=",
+		params:  testNetParams,
+		isValid: false,
+	}, {
+		name:    "wrong params",
+		addr:    "TsdbYVDoh3JsyP6oEg2aHVoTjsFuHzUgGKv",
+		sig:     "IITPXfmkfLPULbX9Im3XIyHAKiXRw5N9j6P7qf0MdEP9YQinn51lWjS+8jbTceRxCWckKKssu3ZpQm1xCWKz9GA=",
+		params:  mainNetParams,
+		isValid: false,
+	}}
+
+	for _, test := range tests {
 		err := VerifyMessage(test.addr, test.sig, msg, test.params)
 		if (test.isValid && err != nil) || (!test.isValid && err == nil) {
-			t.Fatalf("VerifyMessage test #%d failed", i+1)
+			t.Fatalf("%s: failed", test.name)
 		}
 	}
 }