diff --git a/README.md b/README.md
index 89877bf92..eb58f01ea 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Zcash 5.3.1-rc1
+Zcash 5.3.1
===========
diff --git a/configure.ac b/configure.ac
index 380b62c82..9744a6a9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 5)
define(_CLIENT_VERSION_MINOR, 3)
define(_CLIENT_VERSION_REVISION, 1)
-define(_CLIENT_VERSION_BUILD, 25)
+define(_CLIENT_VERSION_BUILD, 50)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
index 9af36624e..eb116d8be 100644
--- a/contrib/debian/changelog
+++ b/contrib/debian/changelog
@@ -1,3 +1,9 @@
+zcash (5.3.1) stable; urgency=medium
+
+ * 5.3.1 release.
+
+ -- Electric Coin Company Fri, 02 Dec 2022 02:46:42 +0000
+
zcash (5.3.1~rc1) stable; urgency=medium
* 5.3.1-rc1 release.
diff --git a/contrib/gitian-descriptors/gitian-linux-parallel.yml b/contrib/gitian-descriptors/gitian-linux-parallel.yml
index 9270523b7..22c5d9474 100644
--- a/contrib/gitian-descriptors/gitian-linux-parallel.yml
+++ b/contrib/gitian-descriptors/gitian-linux-parallel.yml
@@ -1,5 +1,5 @@
---
-name: "zcash-5.3.1-rc1"
+name: "zcash-5.3.1"
enable_cache: true
distro: "debian"
suites:
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index b7d437f20..297082bc0 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,5 +1,5 @@
---
-name: "zcash-5.3.1-rc1"
+name: "zcash-5.3.1"
enable_cache: true
distro: "debian"
suites:
diff --git a/doc/authors.md b/doc/authors.md
index d3a1e5457..3b125eb0a 100644
--- a/doc/authors.md
+++ b/doc/authors.md
@@ -1,11 +1,11 @@
Zcash Contributors
==================
-Jack Grigg (1243)
-Kris Nuttycombe (582)
+Jack Grigg (1244)
+Kris Nuttycombe (585)
Simon Liu (460)
Sean Bowe (389)
-Daira Hopwood (343)
+Daira Hopwood (364)
Eirik Ogilvie-Wigley (216)
Wladimir J. van der Laan (158)
Pieter Wuille (143)
@@ -18,8 +18,9 @@ Jay Graber (89)
Larry Ruane (88)
Marco Falke (86)
Cory Fields (78)
+sasha (62)
Matt Corallo (60)
-sasha (59)
+Greg Pfeil (60)
Nathan Wilcox (57)
practicalswift (42)
Kevin Gallagher (38)
@@ -30,7 +31,6 @@ Carl Dong (26)
Gregory Maxwell (24)
John Newbery (23)
Jorge Timón (22)
-Greg Pfeil (20)
furszy (18)
Jonathan "Duke" Leto (18)
syd (16)
@@ -38,13 +38,13 @@ Patick Strateman (16)
Charlie O'Keefe (15)
avnish (14)
Per Grön (14)
+Suhas Daftuar (13)
Benjamin Winston (13)
Steven Smith (12)
Pavel Janík (12)
Patrick Strateman (12)
Jeremy Rubin (12)
Ariel Gabizon (12)
-Suhas Daftuar (11)
Paige Peterson (11)
Kaz Wesley (11)
João Barbosa (11)
@@ -123,6 +123,7 @@ Pejvan (2)
Pavol Rusnak (2)
Pavel Vasin (2)
Mustafa (2)
+Miodrag Popović (2)
Matthew King (2)
Mary Moore-Simmons (2)
Marek (2)
@@ -159,6 +160,7 @@ kirkalx (1)
kazcw (1)
jeff-liang (1)
jc (1)
+idm (1)
glowang (1)
ewillbefull@gmail.com (1)
emilrus (1)
diff --git a/doc/man/zcash-cli.1 b/doc/man/zcash-cli.1
index 51f291e9d..0bdc056e1 100644
--- a/doc/man/zcash-cli.1
+++ b/doc/man/zcash-cli.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
-.TH ZCASH-CLI "1" "November 2022" "zcash-cli v5.3.1-rc1" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
+.TH ZCASH-CLI "1" "December 2022" "zcash-cli v5.3.1" "User Commands"
.SH NAME
-zcash-cli \- manual page for zcash-cli v5.3.1-rc1
+zcash-cli \- manual page for zcash-cli v5.3.1
.SH DESCRIPTION
-Zcash RPC client version v5.3.1\-rc1
+Zcash RPC client version v5.3.1
.PP
In order to ensure you are adequately protecting your privacy when using Zcash,
please see .
diff --git a/doc/man/zcash-tx.1 b/doc/man/zcash-tx.1
index 8182fec1a..94683fe57 100644
--- a/doc/man/zcash-tx.1
+++ b/doc/man/zcash-tx.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
-.TH ZCASH-TX "1" "November 2022" "zcash-tx v5.3.1-rc1" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
+.TH ZCASH-TX "1" "December 2022" "zcash-tx v5.3.1" "User Commands"
.SH NAME
-zcash-tx \- manual page for zcash-tx v5.3.1-rc1
+zcash-tx \- manual page for zcash-tx v5.3.1
.SH DESCRIPTION
-Zcash zcash\-tx utility version v5.3.1\-rc1
+Zcash zcash\-tx utility version v5.3.1
.SS "Usage:"
.TP
zcash\-tx [options] [commands]
diff --git a/doc/man/zcashd-wallet-tool.1 b/doc/man/zcashd-wallet-tool.1
index 35b5e036c..01ba08888 100644
--- a/doc/man/zcashd-wallet-tool.1
+++ b/doc/man/zcashd-wallet-tool.1
@@ -1,7 +1,7 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
-.TH ZCASHD-WALLET-TOOL "1" "November 2022" "zcashd-wallet-tool v5.3.1-rc1" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
+.TH ZCASHD-WALLET-TOOL "1" "December 2022" "zcashd-wallet-tool v5.3.1" "User Commands"
.SH NAME
-zcashd-wallet-tool \- manual page for zcashd-wallet-tool v5.3.1-rc1
+zcashd-wallet-tool \- manual page for zcashd-wallet-tool v5.3.1
.SH SYNOPSIS
.B zcashd-wallet-tool
[\fI\,OPTIONS\/\fR]
diff --git a/doc/man/zcashd.1 b/doc/man/zcashd.1
index 2162c5595..e9b7a3c3a 100644
--- a/doc/man/zcashd.1
+++ b/doc/man/zcashd.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
-.TH ZCASHD "1" "November 2022" "zcashd v5.3.1-rc1" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
+.TH ZCASHD "1" "December 2022" "zcashd v5.3.1" "User Commands"
.SH NAME
-zcashd \- manual page for zcashd v5.3.1-rc1
+zcashd \- manual page for zcashd v5.3.1
.SH DESCRIPTION
-Zcash Daemon version v5.3.1\-rc1
+Zcash Daemon version v5.3.1
.PP
In order to ensure you are adequately protecting your privacy when using Zcash,
please see .
@@ -94,7 +94,7 @@ Keep at most unconnectable transactions in memory (default: 100)
.HP
\fB\-par=\fR
.IP
-Set the number of script verification threads (\fB\-8\fR to 16, 0 = auto, <0 =
+Set the number of script verification threads (\fB\-6\fR to 16, 0 = auto, <0 =
leave that many cores free, default: 0)
.HP
\fB\-pid=\fR
diff --git a/doc/release-notes.md b/doc/release-notes.md
index c33136abc..a29094b51 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -4,42 +4,3 @@ release-notes at release time)
Notable changes
===============
-Fixed
------
-
-This release fixes an error "Assertion `uResultHeight == rewindHeight` failed" (#5958)
-that could sometimes happen when restarting a node.
-
-Memory Usage Improvement
-------------------------
-
-The memory usage of zcashd has been reduced by not keeping Equihash solutions for all
-block headers in memory.
-
-RPC changes
------------
-
-The following RPC methods that query wallet state now support an optional `asOfHeight`
-parameter, to execute the query as if it were run when the blockchain was at the height
-specified by this argument:
-
-* `getbalance`
-* `getreceivedbyaddress`
-* `gettransaction` (*)
-* `getwalletinfo`
-* `listaddressgroupings`
-* `listreceivedbyaddress` (*)
-* `listsinceblock` (*)
-* `listtransactions`
-* `listunspent` (*)
-* `z_getbalanceforaccount`
-* `z_getbalanceforviewingkey`
-* `z_getmigrationstatus`
-* `z_getnotescount`
-* `z_listreceivedbyaddress`
-* `z_listunspent`
-
-(*) For these methods, additional parameters have been added to maintain
-compatibility of parameter lists with Bitcoin Core. Default values should be
-passed for these additional parameters in order to use `asOfHeight`. See the
-[RPC documentation](https://zcash.github.io/) for details.
diff --git a/doc/release-notes/release-notes-5.3.1.md b/doc/release-notes/release-notes-5.3.1.md
new file mode 100644
index 000000000..0b1c23103
--- /dev/null
+++ b/doc/release-notes/release-notes-5.3.1.md
@@ -0,0 +1,135 @@
+Notable changes
+===============
+
+Fixed
+-----
+
+This release fixes an error "Assertion `uResultHeight == rewindHeight` failed" (#5958)
+that could sometimes happen when restarting a node.
+
+Memory Usage Improvement
+------------------------
+
+The memory usage of zcashd has been reduced by not keeping Equihash solutions for all
+block headers in memory.
+
+RPC changes
+-----------
+
+The following RPC methods that query wallet state now support an optional `asOfHeight`
+parameter, to execute the query as if it were run when the blockchain was at the height
+specified by this argument:
+
+* `getbalance`
+* `getreceivedbyaddress`
+* `gettransaction` (*)
+* `getwalletinfo`
+* `listaddressgroupings`
+* `listreceivedbyaddress` (*)
+* `listsinceblock` (*)
+* `listtransactions`
+* `listunspent` (*)
+* `z_getbalanceforaccount`
+* `z_getbalanceforviewingkey`
+* `z_getmigrationstatus`
+* `z_getnotescount`
+* `z_listreceivedbyaddress`
+* `z_listunspent`
+
+(*) For these methods, additional parameters have been added to maintain
+compatibility of parameter lists with Bitcoin Core. Default values should be
+passed for these additional parameters in order to use `asOfHeight`. See the
+[RPC documentation](https://zcash.github.io/) for details.
+
+Changelog
+=========
+
+Daira Hopwood (21):
+ Always use a tuple as right argument of % in new Python code.
+ Report the prevout for each transparent input as it is being checked
+ Update authors of librustzcash to include Greg Pfeil.
+ Ensure that the optimization of not scanning blocks prior to the wallet's birthday does not cause us to try to "rewind" the Orchard wallet to a height after its current checkpoint.
+ Improve a comment about the wallet birthday scanning optimization.
+ Add release notes for the fix to #5958.
+ Fix a Markdown syntax error
+ Error reporting improvements.
+ Fix a dependency of the `show_help` RPC test on the number of cores, and an incompatibility with Python 3.9 in the test framework that affected the `receivedby` extended RPC test.
+ Avoid storing the Equihash solution in a CBlockIndex object once it has been written to the leveldb database.
+ Improve handling of database read errors.
+ Add Prometheus metrics so we have more visibility into what is going on with the Equihash solution trimming:
+ Declare `CBlockTreeDB::Read*` methods as `const` when they are trivially so.
+ Update constants
+ Add release notes for #6122 (`asOfHeight` RPC parameters).
+ Update release notes: z_getnotescount already had the minconf parameter
+ Add release notes for #6122 (`asOfHeight` RPC parameters).
+ Update release notes: z_getnotescount already had the minconf parameter
+ Bump timestamps and add libcxx/native_clang 15.0.6 in `postponed-updates.txt`.
+ make-release.py: Versioning changes for 5.3.1.
+ make-release.py: Updated manpages for 5.3.1.
+
+Greg Pfeil (40):
+ Fix display of binary name in error messages.
+ Address review feedback and fixed test failures
+ Check dependency updates on the correct branch
+ updatecheck: fix GitHub auth
+ updatecheck: simplify token handling
+ updatecheck: support XDG-based token location
+ `zcash --help` test improvements
+ Remove the PR template
+ Apply suggestions from code review
+ Small formatting change
+ Improve z_sendmany documentation
+ Avoid inconsistent Python lookup
+ Propagate asOfHeight to all relevant RPC calls
+ Implement `asOfHeight`
+ Add additional asOfHeight tests
+ Don’t ignore asOfHeight in IsSpent calls
+ Extract asOfHeight info from RPC calls
+ Ignore mempool when asOfHeight is set
+ Fix calls that should have specified asOfHeight
+ GetUnconfirmedBalance should not take asOfHeight
+ Require minconf > 0 when asOfHeight is provided
+ Add error cases and default to `asOfHeight`
+ Work around #6262 in wallet_listunspent
+ Don’t trust mempool tx when using `asOfHeight`
+ Apply suggestions from code review
+ Add matured_at_height test helper
+ Add FIXMEs to repair comments after #6262 is fixed
+ Update src/rpc/server.cpp
+ Apply suggestions from code review
+ Fix small error in code review suggestions
+ Revert change to getbalance minconf
+ Revert getinfo support of asOfHeight
+ Change asOfHeight to use -1 as default
+ Change asOfHeight to preserve Bitcoin compat
+ Apply suggestions from code review
+ Simplify filtering AvailableCoins by destination
+ Postpone dependency updates for v5.3.1
+ make-release.py: Versioning changes for 5.3.1-rc1.
+ make-release.py: Updated manpages for 5.3.1-rc1.
+ make-release.py: Updated release notes and changelog for 5.3.1-rc1.
+
+Jack Grigg (1):
+ Place zcashd.debug.* metrics behind a -debugmetrics config option
+
+Kris Nuttycombe (3):
+ Add extra detail related to transparent inputs and outputs.
+ Add `unspent_as_of` argument to `listunspent`
+ Add RPC test for wallet_listunspent changes
+
+Miodrag Popović (2):
+ FindNextBlocksToDownload(): Fetch active consensus params to read nMinimumChainWork
+ Headers sync timeout: Use EstimateNetHeight() for closer approximation of remaining headers to download
+
+Suhas Daftuar (2):
+ Delay parallel block download until chain has sufficient work
+ Add timeout for headers sync
+
+idm (1):
+ fix aarch64 dependency native clang download URL
+
+sasha (3):
+ Update gitian-linux-parallel.yml
+ Fix gitian version string issue by reverting the GIT_DIR backport commit
+ Remove `git_check_in_repo` from genbuild.sh to fix gitian version string
+
diff --git a/qa/zcash/postponed-updates.txt b/qa/zcash/postponed-updates.txt
index 67f728d05..32aa0713a 100644
--- a/qa/zcash/postponed-updates.txt
+++ b/qa/zcash/postponed-updates.txt
@@ -4,55 +4,57 @@
# bdb 18.1.40 2020-09-01
#
-native_cxxbridge 1.0.80 2022-12-01
-native_cxxbridge 1.0.81 2022-12-01
-native_cxxbridge 1.0.82 2022-12-01
-native_rust 1.65.0 2022-12-01
-rustcxx 1.0.80 2022-12-01
-rustcxx 1.0.81 2022-12-01
-rustcxx 1.0.82 2022-12-01
-utfcpp 3.2.2 2022-12-01
+native_cxxbridge 1.0.80 2022-12-03
+native_cxxbridge 1.0.81 2022-12-03
+native_cxxbridge 1.0.82 2022-12-03
+native_rust 1.65.0 2022-12-03
+rustcxx 1.0.80 2022-12-03
+rustcxx 1.0.81 2022-12-03
+rustcxx 1.0.82 2022-12-03
+utfcpp 3.2.2 2022-12-03
# Ccache 4.0 requires adding CMake to the depends system.
-native_ccache 4.0 2022-12-01
-native_ccache 4.1 2022-12-01
-native_ccache 4.2 2022-12-01
-native_ccache 4.2.1 2022-12-01
-native_ccache 4.3 2022-12-01
-native_ccache 4.4 2022-12-01
-native_ccache 4.4.1 2022-12-01
-native_ccache 4.4.2 2022-12-01
-native_ccache 4.5 2022-12-01
-native_ccache 4.5.1 2022-12-01
-native_ccache 4.6 2022-12-01
-native_ccache 4.6.1 2022-12-01
-native_ccache 4.6.2 2022-12-01
-native_ccache 4.6.3 2022-12-01
-native_ccache 4.7 2022-12-01
-native_ccache 4.7.1 2022-12-01
-native_ccache 4.7.2 2022-12-01
-native_ccache 4.7.3 2022-12-01
-native_ccache 4.7.4 2022-12-01
+native_ccache 4.0 2022-12-03
+native_ccache 4.1 2022-12-03
+native_ccache 4.2 2022-12-03
+native_ccache 4.2.1 2022-12-03
+native_ccache 4.3 2022-12-03
+native_ccache 4.4 2022-12-03
+native_ccache 4.4.1 2022-12-03
+native_ccache 4.4.2 2022-12-03
+native_ccache 4.5 2022-12-03
+native_ccache 4.5.1 2022-12-03
+native_ccache 4.6 2022-12-03
+native_ccache 4.6.1 2022-12-03
+native_ccache 4.6.2 2022-12-03
+native_ccache 4.6.3 2022-12-03
+native_ccache 4.7 2022-12-03
+native_ccache 4.7.1 2022-12-03
+native_ccache 4.7.2 2022-12-03
+native_ccache 4.7.3 2022-12-03
+native_ccache 4.7.4 2022-12-03
# Clang and Rust are currently pinned to LLVM 14
-libcxx 15.0.0 2022-12-01
-libcxx 15.0.1 2022-12-01
-libcxx 15.0.2 2022-12-01
-libcxx 15.0.3 2022-12-01
-libcxx 15.0.4 2022-12-01
-libcxx 15.0.5 2022-12-01
-native_clang 15.0.0 2022-12-01
-native_clang 15.0.1 2022-12-01
-native_clang 15.0.2 2022-12-01
-native_clang 15.0.3 2022-12-01
-native_clang 15.0.4 2022-12-01
-native_clang 15.0.5 2022-12-01
+libcxx 15.0.0 2022-12-03
+libcxx 15.0.1 2022-12-03
+libcxx 15.0.2 2022-12-03
+libcxx 15.0.3 2022-12-03
+libcxx 15.0.4 2022-12-03
+libcxx 15.0.5 2022-12-03
+libcxx 15.0.6 2022-12-03
+native_clang 15.0.0 2022-12-03
+native_clang 15.0.1 2022-12-03
+native_clang 15.0.2 2022-12-03
+native_clang 15.0.3 2022-12-03
+native_clang 15.0.4 2022-12-03
+native_clang 15.0.5 2022-12-03
+native_clang 15.0.6 2022-12-03
# We're never updating to this version
bdb 18.1.40 2024-02-01
# Google Test 1.10.0 requires adding CMake to the depends system.
-googletest 1.10.0 2022-12-01
-googletest 1.11.0 2022-12-01
-googletest 1.12.0 2022-12-01
-googletest 1.12.1 2022-12-01
+googletest 1.10.0 2022-12-03
+googletest 1.11.0 2022-12-03
+googletest 1.12.0 2022-12-03
+googletest 1.12.1 2022-12-03
diff --git a/src/clientversion.h b/src/clientversion.h
index 9ec780893..8ce5dd199 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -18,7 +18,7 @@
#define CLIENT_VERSION_MAJOR 5
#define CLIENT_VERSION_MINOR 3
#define CLIENT_VERSION_REVISION 1
-#define CLIENT_VERSION_BUILD 25
+#define CLIENT_VERSION_BUILD 50
//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/deprecation.h b/src/deprecation.h
index 8f723c11d..bfc3fed77 100644
--- a/src/deprecation.h
+++ b/src/deprecation.h
@@ -10,7 +10,7 @@
// Per https://zips.z.cash/zip-0200
// Shut down nodes running this version of code, 16 weeks' worth of blocks after the estimated
// release block height. A warning is shown during the 14 days' worth of blocks prior to shut down.
-static const int APPROX_RELEASE_HEIGHT = 1889497;
+static const int APPROX_RELEASE_HEIGHT = 1898500;
static const int RELEASE_TO_DEPRECATION_WEEKS = 16;
static const int EXPECTED_BLOCKS_PER_HOUR = 3600 / Consensus::POST_BLOSSOM_POW_TARGET_SPACING;
static_assert(EXPECTED_BLOCKS_PER_HOUR == 48, "The value of Consensus::POST_BLOSSOM_POW_TARGET_SPACING was chosen such that this assertion holds.");