This also
* renames `GetUnconfirmedBalance` to `GetUnconfirmedTransparentBalance`,
* reverts the `getunconfirmedbalance` RPC call to not accept `asOfHeight`,
* conditionalizes `getwalletinfo` to only include unconfirmed balances in calls
without `asOfHeight`, and
* removes the unused `Get*WatchOnlyBalance` functions.
on with the Equihash solution trimming:
* (counter) `zcashd.debug.memory.allocated_equihash_solutions` -
the number of Equihash solutions that have ever been allocated;
* (counter) `zcashd.debug.memory.trimmed_equihash_solutions` -
the number of Equihash solutions that were trimmed;
* (counter) `zcashd.debug.blocktree.trimmed_equihash_read_dbindex` -
the number of times a block index entry needed to be reread to
construct a block header because a solution had been trimmed;
* (counter) `zcashd.debug.blocktree.write_batch` -
the number of block tree batch write operations (calls to
`CBlockTreeDB::WriteBatchSync`);
* (counter) `zcashd.debug.blocktree.write_batch_read_dbindex` -
the number of times a block index entry needed to be reread
before being written during a block tree batch write operation.
These metrics are specific to `zcashd`; they are primarily intended
for performance debugging of this feature and should not be considered
stable.
Co-authored-by: Jack Grigg <thestr4d@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This removes the default `std::nullopt`[^1] and threads `asOfHeight` through the
call graph, only using `std::nullopt` where it is unconditionally correct (e.g.,
where we would be creating a tx, and thus need the actual chain tip).
This does not change deprecated or legacy operations.
[^1]: Having a default makes it easy to miss call sites that should be
updated. If a default is deemed useful, it should be added in a separate
commit, so that all call sites can be reviewed in an earlier commit.
(cherry-picked bitcoin/bitcoin@76f74811c4)
At startup, we choose one peer to serve us the headers chain, until
our best header is close to caught up. Disconnect this peer if more
than 15 minutes + 1ms/expected_header passes and our best header
is still more than 1 day away from current time.
birthday does not cause us to try to "rewind" the Orchard wallet to a
height after its current checkpoint.
potentially fixes#5958
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
(cherrypicked bitcoin/bitcoin@e2652002b6)
nMinimumChainWork is an anti-DoS threshold; wait until we have a proposed
tip with more work than that before downloading blocks towards that tip.