diff --git a/Cargo.lock b/Cargo.lock
index 6534bbaec..67490b6d8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -538,7 +538,7 @@ checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
[[package]]
name = "equihash"
version = "0.1.0"
-source = "git+https://github.com/zcash/librustzcash.git?rev=a3df9dd47d6c3fa89b08483cb8276515464de321#a3df9dd47d6c3fa89b08483cb8276515464de321"
+source = "git+https://github.com/zcash/librustzcash.git?rev=ba3f13bbedd95908419f104f67b9fcd3b3e13111#ba3f13bbedd95908419f104f67b9fcd3b3e13111"
dependencies = [
"blake2b_simd",
"byteorder",
@@ -1110,7 +1110,7 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "orchard"
version = "0.0.0"
-source = "git+https://github.com/zcash/orchard.git?rev=78e22f6325d00ba69e3cb0860c6de27f5129ac04#78e22f6325d00ba69e3cb0860c6de27f5129ac04"
+source = "git+https://github.com/zcash/orchard.git?rev=f8280c98a3d0e41b8ff5b7f615802bd197f781e1#f8280c98a3d0e41b8ff5b7f615802bd197f781e1"
dependencies = [
"aes",
"arrayvec 0.7.1",
@@ -1817,17 +1817,18 @@ dependencies = [
[[package]]
name = "zcash_address"
version = "0.0.0"
-source = "git+https://github.com/zcash/librustzcash.git?rev=a3df9dd47d6c3fa89b08483cb8276515464de321#a3df9dd47d6c3fa89b08483cb8276515464de321"
+source = "git+https://github.com/zcash/librustzcash.git?rev=ba3f13bbedd95908419f104f67b9fcd3b3e13111#ba3f13bbedd95908419f104f67b9fcd3b3e13111"
dependencies = [
"bech32",
"blake2b_simd",
"bs58",
+ "zcash_encoding",
]
[[package]]
name = "zcash_encoding"
version = "0.0.0"
-source = "git+https://github.com/zcash/librustzcash.git?rev=a3df9dd47d6c3fa89b08483cb8276515464de321#a3df9dd47d6c3fa89b08483cb8276515464de321"
+source = "git+https://github.com/zcash/librustzcash.git?rev=ba3f13bbedd95908419f104f67b9fcd3b3e13111#ba3f13bbedd95908419f104f67b9fcd3b3e13111"
dependencies = [
"byteorder",
"nonempty",
@@ -1836,7 +1837,7 @@ dependencies = [
[[package]]
name = "zcash_history"
version = "0.2.0"
-source = "git+https://github.com/zcash/librustzcash.git?rev=a3df9dd47d6c3fa89b08483cb8276515464de321#a3df9dd47d6c3fa89b08483cb8276515464de321"
+source = "git+https://github.com/zcash/librustzcash.git?rev=ba3f13bbedd95908419f104f67b9fcd3b3e13111#ba3f13bbedd95908419f104f67b9fcd3b3e13111"
dependencies = [
"bigint",
"blake2b_simd",
@@ -1846,7 +1847,7 @@ dependencies = [
[[package]]
name = "zcash_note_encryption"
version = "0.0.0"
-source = "git+https://github.com/zcash/librustzcash.git?rev=a3df9dd47d6c3fa89b08483cb8276515464de321#a3df9dd47d6c3fa89b08483cb8276515464de321"
+source = "git+https://github.com/zcash/librustzcash.git?rev=ba3f13bbedd95908419f104f67b9fcd3b3e13111#ba3f13bbedd95908419f104f67b9fcd3b3e13111"
dependencies = [
"blake2b_simd",
"byteorder",
@@ -1861,7 +1862,7 @@ dependencies = [
[[package]]
name = "zcash_primitives"
version = "0.5.0"
-source = "git+https://github.com/zcash/librustzcash.git?rev=a3df9dd47d6c3fa89b08483cb8276515464de321#a3df9dd47d6c3fa89b08483cb8276515464de321"
+source = "git+https://github.com/zcash/librustzcash.git?rev=ba3f13bbedd95908419f104f67b9fcd3b3e13111#ba3f13bbedd95908419f104f67b9fcd3b3e13111"
dependencies = [
"aes",
"bip0039",
@@ -1895,7 +1896,7 @@ dependencies = [
[[package]]
name = "zcash_proofs"
version = "0.5.0"
-source = "git+https://github.com/zcash/librustzcash.git?rev=a3df9dd47d6c3fa89b08483cb8276515464de321#a3df9dd47d6c3fa89b08483cb8276515464de321"
+source = "git+https://github.com/zcash/librustzcash.git?rev=ba3f13bbedd95908419f104f67b9fcd3b3e13111#ba3f13bbedd95908419f104f67b9fcd3b3e13111"
dependencies = [
"bellman",
"blake2b_simd",
diff --git a/Cargo.toml b/Cargo.toml
index 458c1cac1..9a46be4a9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -71,9 +71,9 @@ codegen-units = 1
ed25519-zebra = { git = "https://github.com/ZcashFoundation/ed25519-zebra.git", rev = "d3512400227a362d08367088ffaa9bd4142a69c7" }
halo2 = { git = "https://github.com/zcash/halo2.git", rev = "26047eaf323929935fd1e6aa3ae100b1113706e0" }
incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "b7bd6246122a6e9ace8edb51553fbf5228906cbb" }
-orchard = { git = "https://github.com/zcash/orchard.git", rev = "78e22f6325d00ba69e3cb0860c6de27f5129ac04" }
-zcash_address = { git = "https://github.com/zcash/librustzcash.git", rev = "a3df9dd47d6c3fa89b08483cb8276515464de321" }
-zcash_history = { git = "https://github.com/zcash/librustzcash.git", rev = "a3df9dd47d6c3fa89b08483cb8276515464de321" }
-zcash_note_encryption = { git = "https://github.com/zcash/librustzcash.git", rev = "a3df9dd47d6c3fa89b08483cb8276515464de321" }
-zcash_primitives = { git = "https://github.com/zcash/librustzcash.git", rev = "a3df9dd47d6c3fa89b08483cb8276515464de321" }
-zcash_proofs = { git = "https://github.com/zcash/librustzcash.git", rev = "a3df9dd47d6c3fa89b08483cb8276515464de321" }
+orchard = { git = "https://github.com/zcash/orchard.git", rev = "f8280c98a3d0e41b8ff5b7f615802bd197f781e1" }
+zcash_address = { git = "https://github.com/zcash/librustzcash.git", rev = "ba3f13bbedd95908419f104f67b9fcd3b3e13111" }
+zcash_history = { git = "https://github.com/zcash/librustzcash.git", rev = "ba3f13bbedd95908419f104f67b9fcd3b3e13111" }
+zcash_note_encryption = { git = "https://github.com/zcash/librustzcash.git", rev = "ba3f13bbedd95908419f104f67b9fcd3b3e13111" }
+zcash_primitives = { git = "https://github.com/zcash/librustzcash.git", rev = "ba3f13bbedd95908419f104f67b9fcd3b3e13111" }
+zcash_proofs = { git = "https://github.com/zcash/librustzcash.git", rev = "ba3f13bbedd95908419f104f67b9fcd3b3e13111" }
diff --git a/README.md b/README.md
index 1a84cfe64..66528e79b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Zcash 4.4.1
+Zcash 4.5.0-rc1
===========
diff --git a/configure.ac b/configure.ac
index ac565f294..5683ff1ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 4)
-define(_CLIENT_VERSION_MINOR, 4)
-define(_CLIENT_VERSION_REVISION, 1)
-define(_CLIENT_VERSION_BUILD, 50)
+define(_CLIENT_VERSION_MINOR, 5)
+define(_CLIENT_VERSION_REVISION, 0)
+define(_CLIENT_VERSION_BUILD, 25)
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 91583c179..7e2a60180 100644
--- a/contrib/debian/changelog
+++ b/contrib/debian/changelog
@@ -1,3 +1,9 @@
+zcash (4.5.0~rc1) stable; urgency=medium
+
+ * 4.5.0-rc1 release.
+
+ -- Electric Coin Company Thu, 16 Sep 2021 23:34:14 +0100
+
zcash (4.4.1) stable; urgency=medium
* 4.4.1 release.
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 3eddeff5a..4c332d421 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,5 +1,5 @@
---
-name: "zcash-4.4.1"
+name: "zcash-4.5.0-rc1"
enable_cache: true
distro: "debian"
suites:
diff --git a/doc/man/zcash-cli.1 b/doc/man/zcash-cli.1
index f0161a6cc..4c52fe0da 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.47.13.
-.TH ZCASH-CLI "1" "June 2021" "zcash-cli v4.4.1" "User Commands"
+.TH ZCASH-CLI "1" "September 2021" "zcash-cli v4.5.0-rc1" "User Commands"
.SH NAME
-zcash-cli \- manual page for zcash-cli v4.4.1
+zcash-cli \- manual page for zcash-cli v4.5.0-rc1
.SH DESCRIPTION
-Zcash RPC client version v4.4.1
+Zcash RPC client version v4.5.0\-rc1
.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 950fdb388..a638db358 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.47.13.
-.TH ZCASH-TX "1" "June 2021" "zcash-tx v4.4.1" "User Commands"
+.TH ZCASH-TX "1" "September 2021" "zcash-tx v4.5.0-rc1" "User Commands"
.SH NAME
-zcash-tx \- manual page for zcash-tx v4.4.1
+zcash-tx \- manual page for zcash-tx v4.5.0-rc1
.SH DESCRIPTION
-Zcash zcash\-tx utility version v4.4.1
+Zcash zcash\-tx utility version v4.5.0\-rc1
.SS "Usage:"
.TP
zcash\-tx [options] [commands]
diff --git a/doc/man/zcashd.1 b/doc/man/zcashd.1
index cd103ba40..7bd7193d9 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.47.13.
-.TH ZCASHD "1" "June 2021" "zcashd v4.4.1" "User Commands"
+.TH ZCASHD "1" "September 2021" "zcashd v4.5.0-rc1" "User Commands"
.SH NAME
-zcashd \- manual page for zcashd v4.4.1
+zcashd \- manual page for zcashd v4.5.0-rc1
.SH DESCRIPTION
-Zcash Daemon version v4.4.1
+Zcash Daemon version v4.5.0\-rc1
.PP
In order to ensure you are adequately protecting your privacy when using Zcash,
please see .
@@ -99,9 +99,13 @@ Reverting this setting requires re\-downloading the entire blockchain.
(default: 0 = disable pruning blocks, >550 = target size in MiB to use
for block files)
.HP
+\fB\-reindex\-chainstate\fR
+.IP
+Rebuild chain state from the currently indexed blocks
+.HP
\fB\-reindex\fR
.IP
-Rebuild block chain index from current blk000??.dat files on startup
+Rebuild chain state and block index from the blk*.dat files on disk
.HP
\fB\-sysperms\fR
.IP
@@ -395,7 +399,7 @@ Debugging/Testing options:
Output debugging information (default: 0, supplying is
optional). If is not supplied or if = 1, output
all debugging information. can be: addrman, alert, bench,
-coindb, db, estimatefee, http, libevent, lock, mempool, net,
+coindb, db, estimatefee, http, libevent, lock, mempool, mempoolrej, net,
partitioncheck, pow, proxy, prune, rand, receiveunsafe, reindex, rpc,
selectcoins, tor, zmq, zrpc, zrpcunsafe (implies zrpc). For multiple
specific categories use \fB\-debug=\fR multiple times.
diff --git a/doc/release-notes/release-notes-4.5.0-rc1.md b/doc/release-notes/release-notes-4.5.0-rc1.md
new file mode 100644
index 000000000..c91384283
--- /dev/null
+++ b/doc/release-notes/release-notes-4.5.0-rc1.md
@@ -0,0 +1,311 @@
+Changelog
+=========
+
+Aditya Kulkarni (1):
+ Sort taddr txns by txindex in addition to height
+
+Alex Morcos (4):
+ Store the total sig op count of a tx.
+ Add a score index to the mempool.
+ Add TxPriority class and comparator
+ tidy up CInv::GetCommand
+
+Daira Hopwood (8):
+ Improve error message when a block would overfill the Orchard commitment tree.
+ More precise terminology: "lock free" -> "unlocked"
+ ZIP 339 support.
+ Update URL for Boost source download (from dl.bintray.com to boostorg.jfrog.io).
+ Cargo.toml: use librustzcash after the merge of https://github.com/zcash/librustzcash/pull/424 .
+ Update unified address test data to take account of HRPs in padding (https://github.com/zcash/librustzcash/pull/419).
+ Avoid need to cast away const in the C caller of zip339_free_phrase.
+ Update authors of librustzcash to everyone currently and formerly on Core team (in alphabetical order).
+
+Eric Lombrozo (2):
+ Removed ppszTypeName from protocol.cpp
+ getdata enum issue fix
+
+Ethan Heilman (1):
+ Fix typo adddrman to addrman as requested in #8070
+
+Ethan Heilman (1):
+ Remove non-determinism which is breaking net_tests #8069
+
+Gregory Maxwell (4):
+ Eliminate TX trickle bypass, sort TX invs for privacy and priority.
+ Move bloom and feerate filtering to just prior to tx sending.
+ Do not use mempool for GETDATA for tx accepted after the last mempool req.
+ Defer inserting into maprelay until just before relaying.
+
+Jack Grigg (109):
+ Re-include reading blocks from disk in block connection benchmark
+ cargo update
+ Migrate to latest zcash_* crates
+ metrics 0.16 and metrics-exporter-prometheus 0.5
+ Implement ZIP 216 consensus rules
+ Extract SpendDescriptionV5 and OutputDescriptionV5 classes
+ rust: Enable C++ streams to be passed into Rust code
+ ZIP 225 tx format constants
+ v5 transaction format parser
+ contrib: Add BOSL to contrib/debian/copyright
+ Remove early return logic from transaction parsing
+ rust: Document read_callback_t and write_callback_t
+ CTransaction: Make new ZIP 225 fields non-const and private
+ ZIP 244 transaction digests
+ ZIP 244 signature digests
+ ZIP 244 hashAuthDataRoot computation
+ Fix tests that assume CTxOuts can be "null"
+ test: Generate valid Sapling types
+ test: Small fixes to sighash test vector generation
+ test: Regenerate sighash.json after generator fixes
+ Throw an exception instead of asserting if Rust tx parser fails
+ CI: Publish correct book directory
+ CI: Build book with latest mdbook
+ rust: Documentation improvements to FFI methods
+ Implement Orchard authorization batch validator
+ Implement Orchard signature validation consensus rules
+ rust: Fix patched dependencies
+ book: Add dev guide page about Rust dependencies
+ Rename hashLightClientRoot to hashBlockCommitments in block header
+ ZIP 244 hashBlockCommitments implementation
+ test: Check for valid hashBlockCommitments construction post-NU5
+ Skip hashBlockCommitments check when testing block templates
+ test: Check hashBlockCommitments before, at, and after NU5 activation
+ ConnectBlock: Check NU activation when deriving block commitments
+ Copy authDigest in CTransaction::operator=(const CTransaction &tx)
+ rust: Move history tree FFI logic into a module
+ rust: Migrate to zcash_history with versioned trees
+ rust: Move history tree FFI declarations into a separate header
+ test: Use valid consensus branch IDs in history tree tests
+ Use V2 history trees from NU5 onward
+ test: Check history trees across Canopy and NU5 activations
+ rpc: Document getblock RPC finalorchardroot field, omit before NU5
+ rust: Document some requirements for history tree FFI methods
+ test: Add test case for popping from an empty history tree
+ Implement Orchard pool value tracking
+ rust: Load Orchard circuit parameters at startup
+ Check Orchard bundle-specific consensus rules, i.e. proofs
+ test: Update CCoinsViewTest with changes to CCoinsView interface
+ Include Orchard bundle in transaction dynamic usage
+ ZIP 203: Enforce coinbase nExpiryHeight consensus rule from NU5
+ test: Check for updated empty-tx reject messages in transaction tests
+ test: Fix OverwinterExpiryHeight test after ZIP 203 contextual changes
+ miner: Set coinbase expiry height to block height from NU5 activation
+ Introduce libzcash::RawAddress type
+ Use `libzcash::RawAddress` in `CWallet::GetFilteredNotes`
+ Use a visitor for handling -mineraddress config option
+ Add support for decoding and encoding Unified Addresses
+ Pass network type through to UA address handling logic
+ CI: Add workflow that runs general lints
+ CI: Check scripted diffs
+ CI: Add Rust lints
+ Document why a nested call to ExtractMinerAddress is not recursive
+ Add constants for UA typecodes
+ Postpone dependency updates we aren't doing in this release
+ depends: Update Rust to 1.54.0
+ depends: Update Clang / libcxx to LLVM 12
+ depends: Update utfcpp to 3.2.1
+ depends: Fix issue cross-compiling BDB to Windows with Clang 12
+ rust: cargo update
+ rust: metrics 0.17
+ CI: Use Rust 1.54 for lints
+ cargo fmt
+ test: Wait for transaction propagation in shorter_block_times RPC test
+ test: Fix race condition in p2p_txexpiringsoon
+ Revert "Remove reference to -reindex-chainstate"
+ test: Flush wallet in WriteCryptedSaplingZkeyDirectToDb before reopening
+ qa: Bump `sync_mempool` timeout for `prioritisetransaction.py`
+ ProcessGetData(): Rework IsExpiringSoon check
+ test: Print reject reason if RPC test block rejected instead of accepted
+ test: Fix pyflakes warnings
+ CI: Ignore errors from general lints we don't yet have passing
+ lint: remove duplicate include
+ lint: Add missing include guards
+ test: Add NU5 test cases to existing RPC tests
+ builder: Generate v5 transactions from NU5 activation
+ Print `nConsensusBranchId` in `CTransaction::ToString`
+ Separate the consensus and internal consistency checks for branch ID
+ Parse consensus branch ID when reading v5 transaction format
+ test: Use correct field of getnetworkinfo to read protocol version
+ CI: Add Dependabot config to keep Actions up-to-date
+ Introduce a WTxId struct
+ Implement CInv message type MSG_WTX
+ test: Fix bugs in mininode transaction parser
+ test: Add v5 tx support to mininode
+ ProcessGetData: Respond to MSG_WTX requests
+ Add MSG_WTX support to inv messages
+ Use wtxid for peer state management
+ test: Implement CInv.__eq__() for mininode to simplify RPC test
+ Postpone dependency updates that require CMake
+ depends: Update Rust to 1.54.0
+ test: Fix bug in mininode.SpendDescription.deserialize
+ Add named constants for legacy tx authDigest placeholder value
+ qa: Boost 1.77.0
+ cargo update
+ Migrate to latest revisions of Zcash Rust crates
+ test: Set up mininodes at the start of feature_zip239
+ net: Reject unknown CInv message types
+ make-release.py: Versioning changes for 4.5.0-rc1.
+ make-release.py: Updated manpages for 4.5.0-rc1.
+
+John Newbery (10):
+ [tests] Remove wallet accounts test
+ [wallet] GetBalance can take an isminefilter filter.
+ [wallet] Factor out GetWatchOnlyBalance()
+ [wallet] deduplicate GetAvailableCredit logic
+ [wallet] factor out GetAvailableWatchOnlyBalance()
+ [wallet] GetBalance can take a min_depth argument.
+ [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts.
+ [wallet] Remove wallet account RPCs
+ [wallet] Kill accounts
+ [net] split PushInventory()
+
+Jonas Schnelli (1):
+ fix locking issue with new mempool limiting
+
+Kris Nuttycombe (46):
+ Update transaction auth commitments for pre-v5 transactions.
+ Move OrchardBundle to its own header file.
+ Implement the Rust side of the incremental merkle tree FFI.
+ Orchard changes to coins & consensus.
+ Return std::optional for GetAnchor
+ Check nullifiers length against bundle actions length.
+ Add Orchard bundle commitments to merkle tree.
+ Add Orchard merkle tree anchor tests.
+ Documentation cleanup.
+ Update orchard dependency.
+ Update to released version of incrementalmerkletree
+ Apply suggestions from code review
+ Apply suggestions from code review
+ Fix Orchard incremental Merkle tree empty root.
+ Fix header guards for incremental_sinsemilla_tree.h
+ Apply style suggestions.
+ Consistently panic on null commitment tree pointers.
+ Fix implmentation of OrchardMerkleTree.DynamicMemoryUsage
+ Document source of Orchard merkle tree test data.
+ Apply suggestions from code review
+ Add consensus check for duplicate Orchard nullifiers within a single transaction.
+ Add Orchard nullifiers to nullifiers cache.
+ Apply suggestions from code review
+ Ensure Sapling versions are valid after NU5
+ Make CTransaction::nConsensusBranchId a std::optional
+ Add NU5 upper bound check on nSpendsSapling, nOutputsSapling, nActionsOrchard
+ Check consensus branch ID for V5 transactions.
+ Rename tx.valueBalance -> tx.valueBalanceSapling
+ Make valueBalanceSapling a private non-const member of CTransaction.
+ Add Orchard value balance checks.
+ Account for Orchard balance in GetValueOut and GetShieldedValueIn.
+ Retract partial Orchard test support.
+ Add check that v5 transactions have empty Sprout joinsplits.
+ Prevent undefined behaviour in `CTransaction::GetValueOut()`
+ ZIP 213: Add checks to support Orchard shielded coinbase outputs.
+ Add check for consistency between nActionsOrchard and Orchard flags.
+ Ensure that the Orchard note commitment tree does not exceed its maximum size.
+ Update Orchard commitment tree hashes to use total MerkleCRH^Orchard.
+ Apply suggestions from code review
+ Make Sapling Spend and Ouput count, and Orchard Action count checks be noncontextual.
+ Use DOS level 100 for noncontextual checks.
+ Fix error strings to correctly reflect context.
+ Remove unused account-related wallet methods.
+ Use manual serialization for Merkle frontiers rather than bincode.
+ Fix clippy complaints.
+ Lock the wallet in SetBestChainINTERNAL
+
+Larry Ruane (1):
+ ZIP 225: v5 transaction check rules
+
+Luke Dashjr (1):
+ Optimisation: Store transaction list order in memory rather than compute it every need
+
+Marco Falke (1):
+ [qa] py2: Unfiddle strings into bytes explicitly
+
+Matt Corallo (4):
+ Fix calling mempool directly, instead of pool, in ATMP
+ Track (and define) ::minRelayTxFee in CTxMemPool
+ Add CFeeRate += operator
+ Print mempool size in KB when adding txn
+
+Patrick Strateman (5):
+ Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk
+ Add CWallet::ListAccountCreditDebit
+ Add CWallet::ReorderTransactions and use in accounting_tests.cpp
+ Move CWalletDB::ReorderTransactions to CWallet
+ Move GetAccountBalance from rpcwallet.cpp into CWallet::GetAccountBalance
+
+Pieter Wuille (16):
+ Replace trickle nodes with per-node/message Poisson delays
+ Change mapRelay to store CTransactions
+ Make ProcessNewBlock dbp const and update comment
+ Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards
+ Optimize ActivateBestChain for long chains
+ Add -reindex-chainstate that does not rebuild block index
+ Report reindexing progress in GUI
+ Split up and optimize transaction and block inv queues
+ Handle mempool requests in send loop, subject to trickle
+ Return mempool queries in dependency order
+ Add support for unique_ptr and shared_ptr to memusage
+ Switch CTransaction storage in mempool to std::shared_ptr
+ Optimize the relay map to use shared_ptr's
+ Optimization: don't check the mempool at all if no mempool req ever
+ Optimization: use usec in expiration and reuse nNow
+ Get rid of CTxMempool::lookup() entirely
+
+Russell Yanofsky (2):
+ [wallet] Add GetLegacyBalance method to simplify getbalance RPC
+ [wallet] Remove unneeded legacy getbalance code
+
+Shaul Kfir (1):
+ Add absurdly high fee message to validation state (for RPC propagation)
+
+Suhas Daftuar (3):
+ Use txid as key in mapAlreadyAskedFor
+ Reverse the sort on the mempool's feerate index
+ Only use AddInventoryKnown for transactions
+
+Technetium (1):
+ add missing aarch64 build deps
+
+Wladimir J. van der Laan (17):
+ streams: Add data() method to CDataStream
+ streams: Remove special cases for ancient MSVC
+ dbwrapper: Use new .data() method of CDataStream
+ wallet: Use CDataStream.data()
+ net: Consistent checksum handling
+ net: Hardcode protocol sizes and use fixed-size types
+ protocol.h: Move MESSAGE_START_SIZE into CMessageHeader
+ protocol.h: Make enums in GetDataMsg concrete values
+ Add assertion and cast before sending reject code
+ Add debug message to CValidationState for optional extra information
+ Introduce REJECT_INTERNAL codes for local AcceptToMempool errors
+ Add function to convert CValidationState to a human-readable message
+ Remove most logging from transaction validation
+ Add information to errors in ConnectBlock, CheckBlock
+ Move mempool rejections to new debug category
+ net: Fix sent reject messages for blocks and transactions
+ test: Add basic test for `reject` code
+
+hexabot (2):
+ Update depends/packages/native_clang.mk
+ Update depends/packages/native_rust.mk
+
+Marshall Gaucher (5):
+ Remove sprout funding flow logic
+ Add fix and note for timing issue
+ Update funding logic bug
+ Add usage documentation for manual and faucet driven tests
+ Update funding logic
+
+Jack Grigg (12):
+ Document next_pow2 effects and algorithm source
+ Improvements to CBlock::BuildAuthDataMerkleTree
+ rust: Explicitly return null hash for pre-v5 auth digests
+ book: Note that cargo patches work with absolute paths
+ Improve docs about setting CBlockIndex hash fields
+ test: Cleanups to ZIP 221 Python test code
+ Minor fixes to documentation and formatting
+ Fix typo in method documentation
+ Track lengths when copying receiver data from C++ to Rust
+ depends: Greatly simplify the Clang 12 patch
+ Adjust code comments to remove topological-sort references
+ Fix typos
+
diff --git a/src/clientversion.h b/src/clientversion.h
index 7a8e56902..1a849b601 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -16,9 +16,9 @@
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 4
-#define CLIENT_VERSION_MINOR 4
-#define CLIENT_VERSION_REVISION 1
-#define CLIENT_VERSION_BUILD 50
+#define CLIENT_VERSION_MINOR 5
+#define CLIENT_VERSION_REVISION 0
+#define CLIENT_VERSION_BUILD 25
//! 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 e96630d6e..620e42a47 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 = 1279420;
+static const int APPROX_RELEASE_HEIGHT = 1392800;
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.");
diff --git a/src/key_io.cpp b/src/key_io.cpp
index 86bec602e..db83bea04 100644
--- a/src/key_io.cpp
+++ b/src/key_io.cpp
@@ -44,7 +44,7 @@ public:
std::string operator()(const CNoDestination& no) const { return {}; }
};
-static uint8_t GetTypecode(const void* ua, size_t index)
+static uint32_t GetTypecode(const void* ua, size_t index)
{
return std::visit(
TypecodeForReceiver(),
@@ -441,7 +441,7 @@ static bool AddP2PKHReceiver(void* ua, const unsigned char* raw)
return reinterpret_cast(ua)->AddReceiver(receiver);
}
-static bool AddUnknownReceiver(void* ua, uint8_t typecode, const unsigned char* data, size_t len)
+static bool AddUnknownReceiver(void* ua, uint32_t typecode, const unsigned char* data, size_t len)
{
libzcash::UnknownReceiver receiver(typecode, std::vector(data, data + len));
return reinterpret_cast(ua)->AddReceiver(receiver);
diff --git a/src/rust/include/rust/address.h b/src/rust/include/rust/address.h
index ab9e8750a..677349763 100644
--- a/src/rust/include/rust/address.h
+++ b/src/rust/include/rust/address.h
@@ -12,10 +12,10 @@ extern "C" {
typedef bool (*raw_to_receiver_t)(void* ua, const unsigned char* raw);
typedef bool (*unknown_receiver_t)(
void* ua,
- uint8_t typecode,
+ uint32_t typecode,
const unsigned char* data,
size_t len);
-typedef uint8_t (*get_typecode_t)(const void* ua, size_t index);
+typedef uint32_t (*get_typecode_t)(const void* ua, size_t index);
typedef size_t (*get_receiver_len_t)(const void* ua, size_t index);
typedef void (*get_receiver_t)(const void* ua, size_t index, unsigned char* data, size_t length);
diff --git a/src/rust/src/address_ffi.rs b/src/rust/src/address_ffi.rs
index 6694e25b8..a77488743 100644
--- a/src/rust/src/address_ffi.rs
+++ b/src/rust/src/address_ffi.rs
@@ -13,11 +13,11 @@ pub type AddReceiverCb =
unsafe extern "C" fn(ua: Option, raw: *const u8) -> bool;
pub type UnknownReceiverCb = unsafe extern "C" fn(
ua: Option,
- typecode: u8,
+ typecode: u32,
data: *const u8,
len: usize,
) -> bool;
-pub type GetTypecodeCb = unsafe extern "C" fn(ua: Option, index: usize) -> u8;
+pub type GetTypecodeCb = unsafe extern "C" fn(ua: Option, index: usize) -> u32;
pub type GetReceiverLenCb =
unsafe extern "C" fn(ua: Option, index: usize) -> usize;
pub type GetReceiverDataCb =
@@ -162,43 +162,52 @@ pub extern "C" fn zcash_address_serialize_unified(
None => return ptr::null_mut(),
};
- let receivers: Vec = (0..receivers_len)
- .map(
- |i| match unsafe { (typecode_cb.unwrap())(ua_obj, i) }.into() {
- unified::Typecode::Orchard => {
- // TODO: Replace with Orchard support.
- let data_len = unsafe { (receiver_len_cb.unwrap())(ua_obj, i) };
- let mut data = vec![0; data_len];
- unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data_len) };
- unified::Receiver::Unknown {
- typecode: 0x03,
- data,
+ let receivers: Vec = match (0..receivers_len)
+ .map(|i| {
+ Ok(
+ match unsafe { (typecode_cb.unwrap())(ua_obj, i) }.try_into()? {
+ unified::Typecode::Orchard => {
+ // TODO: Replace with Orchard support.
+ let data_len = unsafe { (receiver_len_cb.unwrap())(ua_obj, i) };
+ let mut data = vec![0; data_len];
+ unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data_len) };
+ unified::Receiver::Unknown {
+ typecode: 0x03,
+ data,
+ }
}
- }
- unified::Typecode::Sapling => {
- let mut data = [0; 43];
- unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data.len()) };
- unified::Receiver::Sapling(data)
- }
- unified::Typecode::P2sh => {
- let mut data = [0; 20];
- unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data.len()) };
- unified::Receiver::P2sh(data)
- }
- unified::Typecode::P2pkh => {
- let mut data = [0; 20];
- unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data.len()) };
- unified::Receiver::P2pkh(data)
- }
- unified::Typecode::Unknown(typecode) => {
- let data_len = unsafe { (receiver_len_cb.unwrap())(ua_obj, i) };
- let mut data = vec![0; data_len];
- unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data_len) };
- unified::Receiver::Unknown { typecode, data }
- }
- },
- )
- .collect();
+ unified::Typecode::Sapling => {
+ let mut data = [0; 43];
+ unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data.len()) };
+ unified::Receiver::Sapling(data)
+ }
+ unified::Typecode::P2sh => {
+ let mut data = [0; 20];
+ unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data.len()) };
+ unified::Receiver::P2sh(data)
+ }
+ unified::Typecode::P2pkh => {
+ let mut data = [0; 20];
+ unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data.len()) };
+ unified::Receiver::P2pkh(data)
+ }
+ unified::Typecode::Unknown(typecode) => {
+ let data_len = unsafe { (receiver_len_cb.unwrap())(ua_obj, i) };
+ let mut data = vec![0; data_len];
+ unsafe { (receiver_cb.unwrap())(ua_obj, i, data.as_mut_ptr(), data_len) };
+ unified::Receiver::Unknown { typecode, data }
+ }
+ },
+ )
+ })
+ .collect::>()
+ {
+ Ok(receivers) => receivers,
+ Err(e) => {
+ tracing::error!("{}", e);
+ return ptr::null_mut();
+ }
+ };
let ua: unified::Address = match receivers.try_into() {
Ok(ua) => ua,
diff --git a/src/rust/src/orchard_ffi/incremental_sinsemilla_tree_ffi.rs b/src/rust/src/orchard_ffi/incremental_sinsemilla_tree_ffi.rs
index 74c5552ed..370ae521c 100644
--- a/src/rust/src/orchard_ffi/incremental_sinsemilla_tree_ffi.rs
+++ b/src/rust/src/orchard_ffi/incremental_sinsemilla_tree_ffi.rs
@@ -5,7 +5,7 @@ use incrementalmerkletree::{
use std::mem::size_of_val;
use std::ptr;
-use orchard::{bundle::Authorized, tree::MerkleCrhOrchardOutput};
+use orchard::{bundle::Authorized, tree::MerkleHashOrchard};
use zcash_primitives::{
merkle_tree::incremental::{read_frontier_v1, read_tree, write_frontier_v1, write_tree},
@@ -23,15 +23,15 @@ pub const MAX_CHECKPOINTS: usize = 100;
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_empty(
-) -> *mut bridgetree::Frontier {
- let empty_tree = bridgetree::Frontier::::empty();
+) -> *mut bridgetree::Frontier {
+ let empty_tree = bridgetree::Frontier::::empty();
Box::into_raw(Box::new(empty_tree))
}
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_clone(
- tree: *const bridgetree::Frontier,
-) -> *mut bridgetree::Frontier {
+ tree: *const bridgetree::Frontier,
+) -> *mut bridgetree::Frontier {
unsafe { tree.as_ref() }
.map(|tree| Box::into_raw(Box::new(tree.clone())))
.unwrap_or(std::ptr::null_mut())
@@ -39,7 +39,7 @@ pub extern "C" fn orchard_merkle_frontier_clone(
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_free(
- tree: *mut bridgetree::Frontier,
+ tree: *mut bridgetree::Frontier,
) {
if !tree.is_null() {
drop(unsafe { Box::from_raw(tree) });
@@ -50,7 +50,7 @@ pub extern "C" fn orchard_merkle_frontier_free(
pub extern "C" fn orchard_merkle_frontier_parse(
stream: Option,
read_cb: Option,
-) -> *mut bridgetree::Frontier {
+) -> *mut bridgetree::Frontier {
let reader = CppStreamReader::from_raw_parts(stream, read_cb.unwrap());
match read_frontier_v1(reader) {
@@ -64,7 +64,7 @@ pub extern "C" fn orchard_merkle_frontier_parse(
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_serialize(
- frontier: *const bridgetree::Frontier,
+ frontier: *const bridgetree::Frontier,
stream: Option,
write_cb: Option,
) -> bool {
@@ -86,7 +86,7 @@ pub extern "C" fn orchard_merkle_frontier_serialize(
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_append_bundle(
- tree: *mut bridgetree::Frontier,
+ tree: *mut bridgetree::Frontier,
bundle: *const orchard::Bundle,
) -> bool {
let tree = unsafe {
@@ -95,7 +95,7 @@ pub extern "C" fn orchard_merkle_frontier_append_bundle(
};
if let Some(bundle) = unsafe { bundle.as_ref() } {
for action in bundle.actions().iter() {
- if !tree.append(&MerkleCrhOrchardOutput::from_cmx(action.cmx())) {
+ if !tree.append(&MerkleHashOrchard::from_cmx(action.cmx())) {
error!("Orchard note commitment tree is full.");
return false;
}
@@ -107,7 +107,7 @@ pub extern "C" fn orchard_merkle_frontier_append_bundle(
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_root(
- tree: *const bridgetree::Frontier,
+ tree: *const bridgetree::Frontier,
root_ret: *mut [u8; 32],
) {
let tree = unsafe {
@@ -126,7 +126,7 @@ pub extern "C" fn orchard_merkle_frontier_root(
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_num_leaves(
- tree: *const bridgetree::Frontier,
+ tree: *const bridgetree::Frontier,
) -> usize {
let tree = unsafe {
tree.as_ref()
@@ -138,7 +138,7 @@ pub extern "C" fn orchard_merkle_frontier_num_leaves(
#[no_mangle]
pub extern "C" fn orchard_merkle_frontier_dynamic_mem_usage(
- tree: *const bridgetree::Frontier,
+ tree: *const bridgetree::Frontier,
) -> usize {
let tree = unsafe {
tree.as_ref()
@@ -155,15 +155,15 @@ pub extern "C" fn orchard_merkle_frontier_dynamic_mem_usage(
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_empty(
-) -> *mut BridgeTree {
- let empty_tree = BridgeTree::::new(MAX_CHECKPOINTS);
+) -> *mut BridgeTree {
+ let empty_tree = BridgeTree::::new(MAX_CHECKPOINTS);
Box::into_raw(Box::new(empty_tree))
}
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_clone(
- tree: *const BridgeTree,
-) -> *mut BridgeTree {
+ tree: *const BridgeTree,
+) -> *mut BridgeTree {
unsafe { tree.as_ref() }
.map(|tree| Box::into_raw(Box::new(tree.clone())))
.unwrap_or(std::ptr::null_mut())
@@ -171,7 +171,7 @@ pub extern "C" fn incremental_sinsemilla_tree_clone(
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_free(
- tree: *mut BridgeTree,
+ tree: *mut BridgeTree,
) {
if !tree.is_null() {
drop(unsafe { Box::from_raw(tree) });
@@ -182,7 +182,7 @@ pub extern "C" fn incremental_sinsemilla_tree_free(
pub extern "C" fn incremental_sinsemilla_tree_parse(
stream: Option,
read_cb: Option,
-) -> *mut BridgeTree {
+) -> *mut BridgeTree {
let reader = CppStreamReader::from_raw_parts(stream, read_cb.unwrap());
match read_tree(reader) {
@@ -196,7 +196,7 @@ pub extern "C" fn incremental_sinsemilla_tree_parse(
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_serialize(
- tree: *const BridgeTree,
+ tree: *const BridgeTree,
stream: Option,
write_cb: Option,
) -> bool {
@@ -217,7 +217,7 @@ pub extern "C" fn incremental_sinsemilla_tree_serialize(
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_append_bundle(
- tree: *mut BridgeTree,
+ tree: *mut BridgeTree,
bundle: *const orchard::Bundle,
) -> bool {
let tree = unsafe {
@@ -226,7 +226,7 @@ pub extern "C" fn incremental_sinsemilla_tree_append_bundle(
};
if let Some(bundle) = unsafe { bundle.as_ref() } {
for action in bundle.actions().iter() {
- if !tree.append(&MerkleCrhOrchardOutput::from_cmx(action.cmx())) {
+ if !tree.append(&MerkleHashOrchard::from_cmx(action.cmx())) {
error!("Orchard note commitment tree is full.");
return false;
}
@@ -238,7 +238,7 @@ pub extern "C" fn incremental_sinsemilla_tree_append_bundle(
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_checkpoint(
- tree: *mut BridgeTree,
+ tree: *mut BridgeTree,
) {
let tree = unsafe {
tree.as_mut()
@@ -250,7 +250,7 @@ pub extern "C" fn incremental_sinsemilla_tree_checkpoint(
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_rewind(
- tree: *mut BridgeTree,
+ tree: *mut BridgeTree,
) -> bool {
let tree = unsafe {
tree.as_mut()
@@ -262,7 +262,7 @@ pub extern "C" fn incremental_sinsemilla_tree_rewind(
#[no_mangle]
pub extern "C" fn incremental_sinsemilla_tree_root(
- tree: *const BridgeTree,
+ tree: *const BridgeTree,
root_ret: *mut [u8; 32],
) {
let tree = unsafe {
@@ -289,7 +289,7 @@ pub extern "C" fn incremental_sinsemilla_tree_empty_root(root_ret: *mut [u8; 32]
let altitude = Altitude::from(MERKLE_DEPTH);
- let digest = MerkleCrhOrchardOutput::empty_root(altitude).to_bytes();
+ let digest = MerkleHashOrchard::empty_root(altitude).to_bytes();
*root_ret = digest;
}
diff --git a/src/test/data/unified_addrs.json b/src/test/data/unified_addrs.json
index dd14807df..899a162a0 100644
--- a/src/test/data/unified_addrs.json
+++ b/src/test/data/unified_addrs.json
@@ -1,15 +1,14 @@
[
["From https://github.com/zcash-hackworks/zcash-test-vectors/blob/master/unified_address.py"],
["p2pkh_bytes, p2sh_bytes, sapling_raw_addr, orchard_raw_addr, unified_addr"],
- [null, "7a8f739a2d9e945b0ce152a8049e294c4d6e66b1", null, "dcb1d2a37762148db4cee3bbf19fb1ec05891894b13801c622ba6a90faf1119f8224ae3985c6abd3b7bbae", "75316532386638787a6e656d676574797872647a6b66676a756773667839646b713274686e657a65396c333474707674706d656a656774643567686b7768676a7268736466646e74336b34736632757939656138637461756d7a7075646c657a356667756c77716b70753566766a77796374747a79646c383664373434613430617175747a687a7674797a6e68"],
- ["b3534201cfb1cd8dbf69b8250c18ef41294ca979", null, "902b6565a1c44e7e7a080571af1dd774697cc126f1fc0435d3cdbf868783e9fb4620df4bf175cbf2c3e36f", "05f61273a7201295332fee4579474534809a0aeb817a2bc0594166ad7a462067712533b6eec0fa2d1be99f", "75313371733278796b66737464343332777076366368367336636b683473346833736372746435686b6179367277366a6e3667656e3734726d76636136357775736771653637716d6b6b667a79686c6b7767383071796a33726363616e68356667377a73393032793234676e3271796636706b636363686730356a7a70337972666e3470753861746538673771397239737465767832383434357235776e3378333570663771713332346e746878747a6377786576796661346c326d326d327873376564766570396674613476747776686b617878"],
- [null, "e8c7203d996af7d477083756d59af80d06a745f4", null, "4ea7d6b3dfa338192af06cbbf47ad405715bc7832bedb1466217dc0d93314de9f3c25eec89f9a21bfe0e93", "75317270776b64357837746534657a636d6c716172676b66336372737066716b686d787766737170713032346a6173733267373465347233367a70353071737333766863743732736163687573306b37303578796768756c726a786364777764617130716a6e6e737366326676616b7a7a386634367077387263613933366665796566366d6c36657137776c6c"],
- [null, null, "02f1536b622c01346742d8f90e9d4ff39137f1bebe6e23ad9971776b3372702494cc08951eef032b35350f", null, "7531396468786d38386776637739747774767a6b7537637a376a753372767075356a766832637138676d38716465766e6c34657365793833667a7239796d666133676a6d6d6b3472786a3279703838677478646b71676e6a366e6e717974667568303875796335667572"],
- [null, "183e31d49f25c9a138f49b1a537edcf04be34a98", "3246b59a5b492dab1855cc176bddfa28418f11f97f7b361cc3e8834b2c30d2a1717df323ef98ea7de71d2e", "ab6d26252c521547049de208283d96278bb221a6874cb5a86af1d3f8b3db3fbee3dbefedcb2c71e3ca1ead", "75313563327972666a7774743636336e713068707173683678746a793238387a7476616375616c37336d666675723338336d7465706339687278743374703465613568373830706733686b35756a326775393770326c756d39716a6836327872613763336879366e6471327877686737657138713736766632386333326437766d6c337a323934767438656374636c773672307032336e64703578647a666578633971773065777572796e6a353235736b78376d306a756b636a7265616b6a3261703332376b6a7172767567656435667930737a79"],
- [null, null, "970dc3450d34554141d356cb548056279c57708fa73bd16ffe9a2e24ea694898a7b8af1b0ff92585d02623", "0414bb62b86149ee731851f27d532ac0361169da46e6d53d19d3dfd07a5bae22969922d8d0af7dc1e13bae", "75317a6467397a376c7732713037357977396e306a376668387279756a73726a727237347a71783939337463736874666d6d3271786b74763372303438653774723471356a38736665703367396e76387770786639767472336a7a6e6d6d35367a3775706a6530356b7a766d75726d706371703034633033377a32646833356364383232357874336b34376e7a6668327974737630376d337438676433337035723276376b66656739343571376a63306768"],
- [null, "098b79535e790fe53e29fef2b3766697ac32b4f4", "a8a8797c1ba69f78672affa65b943975026931ea628431f0991e744872ac9f36946f5dcd6851a0b5af29cf", "678ab0079bea28bf165c1ab976a2a58c18a7811ca2ad0ad649e876273d04325da6ca53cdb83c111e8e4394", "7531796a7733366d7a777a346a643879746e726436676b68376179676d656a3272746c716733766a397965656866646b3233356a657336727170666a6c777167333776346d653575676a6c7a72646e68676c383872726c6567383378386130716d77797a7936393872387675636e346877616772367163657a7373663663683074373466633068766e366d373737687037353761766632636b7a63333239357033323430716c7675707964656c37336c377163746e343063796b357536736573617772367a6d6b746c6a6678687163633765773468"],
- [null, null, "3509c9e069e89fe501d97622c283ac98923da2d7e6eb346b4bafa67865e1e6dae7cf213b1ea3648dc09b48", null, "753171786b796d6b68647a6372727a6c79346672717563646b66736e6a377776776c716575306b3466337472706e657a3476777a75686b64616a6b356537363437346d6a34396b75653978396866776566386d34377363633861703933686e6773657567333864706371"],
- [null, "30d069896cff30eb414f727b89e001afa2fb8dc3", "55bc46aea6f60c1d61915640029b2af6334d7d27e1c47a248ab47c9fbe5d2d7bb5818739f062e37136654c", null, "75316433726b71777a396b37346b7475766c746e32746d746a36676b6c6739336877733937797473337a75363038766b76673363327973686d6d3330713668386b6434727433733076703475616a776668396137356538613837306e39346c6b70657835617337716e77333436346e7261747563356e35793575766e7a7666326d3466656a687a6576686e306d"],
- [null, null, "5c26a8117729334a957ca7941d47b2ce7040e844fa9882c25bfd2fcf51fa8ab21376f5300d0123f5703e9e", null, "75316166617430647574617379666b736161766d34726c336178716e75786c777437363573393476397a716a7430397a793633646c356d6d7970397835636b7672756c6d647134636b6a337272763766396c37756e78666c306438723635383234746773677276673071"]
+ [null, "7a8f739a2d9e945b0ce152a8049e294c4d6e66b1", null, "dcb1d2a37762148db4cee3bbf19fb1ec05891894b13801c622ba6a90faf1119f8224ae3985c6abd3b7bbae", "7531743779336e647634367476636465377834363835616a6d676b353970643039326c68733477616e776c646834666d3775636a723074343468667a356a6375667a75616b65667a7571767a376a30617974736e6677347065796478387538746a7371347738756b7336727973633635356d786b6a367778786870676b6e79733533657978706b383978797363"],
+ ["b3534201cfb1cd8dbf69b8250c18ef41294ca979", null, "902b6565a1c44e7e7a080571af1dd774697cc126f1fc0435d3cdbf868783e9fb4620df4bf175cbf2c3e36f", "05f61273a7201295332fee4579474534809a0aeb817a2bc0594166ad7a462067712533b6eec0fa2d1be99f", "75316665686b656a646d3630613871353567736576716c78676632396a38676c377364393436756e6a73346e6c343473633434307274657435756771373264637839706a7468396c323372706a7566757a63776837357971657a753235617532383970717274616c713637776e343066787177306c6e377a78777a397973787575307a39337772676e6d6671376b33666e36747a63307637727a396733706a67777571746c6b7a786873783839617a39656868336c356a357175757572776e376e33746a786c616e3235726e7134676a7a61387436"],
+ [null, "e8c7203d996af7d477083756d59af80d06a745f4", null, "4ea7d6b3dfa338192af06cbbf47ad405715bc7832bedb1466217dc0d93314de9f3c25eec89f9a21bfe0e93", "7531646a686778773579747a7463356d75323272346d733567796d3864776867383432326667757879766c7465787638787572677338637230756b7264797337667668716d6d6173616667666530677435776e306d756a6e63333467746d637734397565646b68707a79787a34397a7678356339757130686a64356e37747267736e656a686a716d7376723663"],
+ [null, null, "02f1536b622c01346742d8f90e9d4ff39137f1bebe6e23ad9971776b3372702494cc08951eef032b35350f", null, "75313363366d36716e657a72337966753468757630356e687961356372786e35347861786a78376d6b6674393861796e7a336b68636e6176647961306c746a797565717a3577706d306d7a6a357a646c343464323076657a6768753272743861737635636c6133746463"],
+ [null, "183e31d49f25c9a138f49b1a537edcf04be34a98", "3246b59a5b492dab1855cc176bddfa28418f11f97f7b361cc3e8834b2c30d2a1717df323ef98ea7de71d2e", "ab6d26252c521547049de208283d96278bb221a6874cb5a86af1d3f8b3db3fbee3dbefedcb2c71e3ca1ead", "75313565326e323536746b636837396677797a766c66337378666c66727772666d3664336d6539306e763932666b6575776e653477737975657a656e71356a7368716e6730396e776c7930353735717370373668687878776b6a6373736b6365666c38356c307465793338773236746c6c6575787a66676d38703732727435373033637238787579307577376c7263746e6767396b377a75387a75667576397178633674796a7278337833676a76796b646d79616d34797633793471376a666c783070306d39347066737739687a6b376132387079"],
+ [null, null, "970dc3450d34554141d356cb548056279c57708fa73bd16ffe9a2e24ea694898a7b8af1b0ff92585d02623", "0414bb62b86149ee731851f27d532ac0361169da46e6d53d19d3dfd07a5bae22969922d8d0af7dc1e13bae", "75316b616c6b6d3276717267716d386c6c71657568353372777a6c657435676561346d6b647739376a3970613372636574767a76336c6b6b33653075333534337670746774326b3075616638383630386675337563656676776577797a3974717765616a3377756c6c30706437306d746e687977656b306c3576617a6361366577663472646d7778713866327334706d35687175366d6567397a6774677a76393872787a6832777835766576797330346573"],
+ [null, "098b79535e790fe53e29fef2b3766697ac32b4f4", "a8a8797c1ba69f78672affa65b943975026931ea628431f0991e744872ac9f36946f5dcd6851a0b5af29cf", "678ab0079bea28bf165c1ab976a2a58c18a7811ca2ad0ad649e876273d04325da6ca53cdb83c111e8e4394", "75316d30767a6e3738676830796d71356b717a346c7064343039357770756538686e687a7373357a34736c3338737a6e38767736683934787576636a763561686b6e706d6c72613637756563766e6b6d73397966717834733768736e737a7a6d63706776787232306c6834353970733375337766366d727a77653678396b646a3874703061366373656432656d7870367137716e7761746432786d3470736a683472346739706866663534747375786535373638746873787373617678726679747064706d37326b6a7372797061797a7767713978"],
+ [null, null, "3509c9e069e89fe501d97622c283ac98923da2d7e6eb346b4bafa67865e1e6dae7cf213b1ea3648dc09b48", null, "7531357676383834637a356436346e677232717634307835797171677a366a743368657a75396d6b7566323064756a61663871766b736c6e78793738663264707879323470767637797666637a6b6c307761653435613070683664377a37646574336a67347267677866"],
+ [null, "30d069896cff30eb414f727b89e001afa2fb8dc3", "55bc46aea6f60c1d61915640029b2af6334d7d27e1c47a248ab47c9fbe5d2d7bb5818739f062e37136654c", null, "753137766a736b6c7234756a6463386c307a686b646d6b71717778343833673861363432653937366c7466733073346a65643761673376336138726e677275366e653438687a7233336b6b7a70366d61677a336679656a777a6a6734336a6470657274667078656e326661747a356b3830636a6b6c6e39713772396d3033646e366736306332796c3336393474"],
+ [null, null, "5c26a8117729334a957ca7941d47b2ce7040e844fa9882c25bfd2fcf51fa8ab21376f5300d0123f5703e9e", null, "75313976636e33726564706170687834326d6e307379633236793877397766676c657a396175736b61787267686d78383064756e61333663616763337973376d6e336a373639766367387275336b646e61713470683436303438646873766c35646d6473677879653833"]
]
-
diff --git a/src/zcash/Address.cpp b/src/zcash/Address.cpp
index dd9893e69..d827a395a 100644
--- a/src/zcash/Address.cpp
+++ b/src/zcash/Address.cpp
@@ -69,25 +69,25 @@ bool IsValidSpendingKey(const libzcash::SpendingKey& zkey) {
return !std::holds_alternative(zkey);
}
-uint8_t TypecodeForReceiver::operator()(
+uint32_t TypecodeForReceiver::operator()(
const libzcash::SaplingPaymentAddress &zaddr) const
{
return ZCASH_UA_TYPECODE_SAPLING;
}
-uint8_t TypecodeForReceiver::operator()(
+uint32_t TypecodeForReceiver::operator()(
const libzcash::P2SHAddress &p2sh) const
{
return ZCASH_UA_TYPECODE_P2SH;
}
-uint8_t TypecodeForReceiver::operator()(
+uint32_t TypecodeForReceiver::operator()(
const libzcash::P2PKHAddress &p2sh) const
{
return ZCASH_UA_TYPECODE_P2PKH;
}
-uint8_t TypecodeForReceiver::operator()(
+uint32_t TypecodeForReceiver::operator()(
const libzcash::UnknownReceiver &unknown) const
{
return unknown.typecode;
diff --git a/src/zcash/Address.hpp b/src/zcash/Address.hpp
index d47c5ec44..38d416ee2 100644
--- a/src/zcash/Address.hpp
+++ b/src/zcash/Address.hpp
@@ -32,10 +32,10 @@ public:
class UnknownReceiver {
public:
- uint8_t typecode;
+ uint32_t typecode;
std::vector data;
- UnknownReceiver(uint8_t typecode, std::vector data) :
+ UnknownReceiver(uint32_t typecode, std::vector data) :
typecode(typecode), data(data) {}
friend inline bool operator==(const UnknownReceiver& a, const UnknownReceiver& b) {
@@ -176,10 +176,10 @@ class TypecodeForReceiver {
public:
TypecodeForReceiver() {}
- uint8_t operator()(const libzcash::SaplingPaymentAddress &zaddr) const;
- uint8_t operator()(const libzcash::P2SHAddress &p2sh) const;
- uint8_t operator()(const libzcash::P2PKHAddress &p2pkh) const;
- uint8_t operator()(const libzcash::UnknownReceiver &p2pkh) const;
+ uint32_t operator()(const libzcash::SaplingPaymentAddress &zaddr) const;
+ uint32_t operator()(const libzcash::P2SHAddress &p2sh) const;
+ uint32_t operator()(const libzcash::P2PKHAddress &p2pkh) const;
+ uint32_t operator()(const libzcash::UnknownReceiver &p2pkh) const;
};
/**