Commit Graph

16997 Commits

Author SHA1 Message Date
Greg Pfeil d796114b2e Add additional asOfHeight tests 2022-11-18 01:20:00 -07:00
Greg Pfeil d01c5e744c Implement `asOfHeight` 2022-11-18 01:20:00 -07:00
Greg Pfeil 659077aff2 Propagate asOfHeight to all relevant RPC calls
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.
2022-11-18 01:20:00 -07:00
Kris Nuttycombe 2c487c9430 Add RPC test for wallet_listunspent changes 2022-11-18 01:20:00 -07:00
Kris Nuttycombe b745992489 Add `unspent_as_of` argument to `listunspent`
This makes it possible for `listunspent` to return utxos unspent as of a
particular depth in the main chain.
2022-11-18 01:20:00 -07:00
Greg Pfeil d6c671c606
Merge pull request #6255 from 0xidm/0xidm-patch-1-clang-aarch64
fix aarch64 dependency native clang download URL
2022-11-17 14:32:48 -07:00
Daira Hopwood 22d262f67d
Merge pull request #6253 from daira/fix-show-help
Fix `show_help` and `receivedby` RPC tests
2022-11-15 20:15:51 +00:00
idm 2257e38efc
fix aarch64 dependency native clang download URL
Added assignment statement `$(package)_download_path_aarch64_linux` to ensure path for aarch clang is used.
2022-11-15 10:26:28 -05:00
Daira Hopwood 3529097153 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.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-15 13:58:26 +00:00
Greg Pfeil c12fb6ad5b Avoid inconsistent Python lookup
When executing a Python script from within Python, rather than looking for
`python3` in /usr/local/bin and falling back to the script’s shebang line,
_always_ use the same Python that is executing the caller.

I don’t know why this script doesn’t just run `bitcoin_util_test.py`
directly (always using the shebang line), but I assume that is
intentional (but that should be documented). Otherwise, I’d prefer that
approach.
2022-11-14 06:37:51 -10:00
Daira Hopwood 2ee172fe15 Error reporting improvements.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-13 18:46:30 +00:00
Greg Pfeil 641faccdd6 Improve z_sendmany documentation
It previously said “send multiple times”, but it only sends a single
transaction.
2022-11-11 12:07:43 -07:00
Miodrag Popović 6ccdf7fa6c Headers sync timeout: Use EstimateNetHeight() for closer approximation of remaining headers to download 2022-11-11 19:53:01 +01:00
Suhas Daftuar 9238e2c3cf Add timeout for headers sync
(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.
2022-11-11 10:49:41 +01:00
Greg Pfeil 4ec2642f94 Small formatting change 2022-11-10 20:50:22 -07:00
Daira Hopwood 14cce06163
Merge pull request #6238 from daira/fix-orchard-wallet-rewind
Don't attempt to rewind the Orchard wallet to a height after its current checkpoint
2022-11-10 19:12:32 +00:00
Daira Hopwood e85dae7f12
Fix a Markdown syntax error
Co-authored-by: Greg Pfeil <greg@technomadic.org>
2022-11-10 03:05:16 +00:00
Daira Hopwood 6da5742edd Add release notes for the fix to #5958.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-09 15:00:24 +00:00
Daira Hopwood 6e232d1ab2 Improve a comment about the wallet birthday scanning optimization.
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-09 15:00:24 +00:00
Daira Hopwood 3cc9da3d2e 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.

potentially fixes #5958

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-09 13:50:13 +00:00
str4d fadbb794f1
Merge pull request #6205 from nuttycom/zcash_inspect/transparent_detail
[zcash-inspect] Add extra detail related to transparent inputs and outputs
2022-11-08 08:42:06 +00:00
Miodrag Popović a84eea73b7 FindNextBlocksToDownload(): Fetch active consensus params to read nMinimumChainWork 2022-11-02 10:27:49 +01:00
Suhas Daftuar 5cfa090446 Delay parallel block download until chain has sufficient work
(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.
2022-11-02 10:25:06 +01:00
Greg Pfeil 8edd987ed1
Merge pull request #6230 from daira/librustzcash-authors2 2022-11-01 10:10:37 -06:00
Daira Hopwood 36a2541f64 Update authors of librustzcash to include Greg Pfeil.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-01 14:40:47 +00:00
Daira Hopwood 1889a466ec Report the prevout for each transparent input as it is being checked
Author: Kris Nuttycombe <kris@nutty.land>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-10-29 18:46:58 +01:00
Kris Nuttycombe fd2cd0f02b Add extra detail related to transparent inputs and outputs. 2022-10-29 18:44:53 +01:00
Kris Nuttycombe e417ba89a6
Merge pull request #6211 from sellout/updatecheck-token-path
Improve token handling in the updatecheck script
2022-10-26 12:15:29 -06:00
Greg Pfeil 1296b646b3
Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-10-26 09:07:58 -06:00
Greg Pfeil f9871c4ca6
Merge pull request #6222 from sellout/remove-pr-template
Remove the PR template
2022-10-24 17:31:16 -06:00
Greg Pfeil 463259be0a Remove the PR template
Parts of it are automated (successful test, code review) and while the other
parts are useful, I haven’t seen this checklist be used as such.
2022-10-24 15:56:53 -06:00
Greg Pfeil 9cb63cf5f7
Merge pull request #6218 from sellout/more-help-fixes
`zcash --help` test improvements
2022-10-24 15:40:36 -06:00
sasha b908beae7d
Merge pull request #6215 from superbaud/fix-version-string
Fix gitian version string issue by reverting the GIT_DIR backport commit
2022-10-24 10:03:07 -07:00
Greg Pfeil 87aa33ecc4 `zcash --help` test improvements
Applying suggestions from @daira’s review of #6204.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-10-21 19:03:13 -06:00
sasha acabec7ae0 Remove `git_check_in_repo` from genbuild.sh to fix gitian version string
This removes the git hash from gitian-build zcash version strings when
built inside gitian (when the state of the working tree is clean and
corresponds to an annotated tag).
2022-10-21 14:39:21 -07:00
sasha 15b7f93177 Fix gitian version string issue by reverting the GIT_DIR backport commit
We partially revert 8dbd2edd98 by removing
all instances of setting `GIT_DIR` in the gitian descriptors. Currently,
gitian builds cause zcash to have version strings which look like
`Zcash Daemon version v5.3.0-35186b009-dirty`, which is inaccurate.

Setting `GIT_DIR` with a current working directory of
`/home/debian/build/zcash/distsrc-x86_64-linux-gnu` makes the git
invocations in `genbuild.sh` see that directory as the top of the
working tree, which causes git to believe that a bunch of tracked files
were deleted (namely, those not included by the `make dist` step).

This causes `genbuild.sh` to believe that it is working with a dirty
tree, and with the help of `src/clientversion.cpp`, zcash gets a version
string that includes a hash ending in `-dirty`.
2022-10-21 10:50:22 -07:00
sasha 34ca70d7a9
Merge pull request #6214 from zcash/update-parallel-gitian-descriptor
Update gitian-linux-parallel.yml
2022-10-21 10:42:43 -07:00
Daira Hopwood e89d94d8b9
Merge pull request #6213 from zcash/version-5.3.0
Merge v5.3.0 release branch back to `master`.
2022-10-21 14:01:42 +01:00
sasha a524061861
Update gitian-linux-parallel.yml
The release commit was built with a `make-release.py` that was before the parallel-gitian commit, causing the parallel gitian descriptor to not be updated.
2022-10-20 18:12:07 -07:00
Kris Nuttycombe 35186b0092
Merge pull request #6210 from sellout/release-v5.3.0
Release v5.3.0
2022-10-20 12:25:20 -06:00
Greg Pfeil 8e333b3f49 updatecheck: support XDG-based token location
Have updatecheck look in $XDG_DATA_HOME/zcash/updatecheck/token for the GH
token. Having one in the repo will still take precedence (for pre-existing
users, as well as if you want to override the token used in a particular
case). The new location is standardized, exists at the user level (as the token
logically does), and means that you don't need to copy files around if you get a
new clone or worktree to do a release.
2022-10-20 12:25:13 -06:00
Greg Pfeil 4c21d6f444 updatecheck: simplify token handling
- make the token optional (just will hit a rate limit after a few runs of the
  script)
- only load the token once, rather than once per request (this is necessary
  after the above change, so you don't get the warning printed repeatedly)
- switch from BasicAuth to an Authorization header (this means we no longer need
  the GitHub username, just the token)
- support a token file that doesn't contain a username (it will still parse old
  versions of the file properly)
2022-10-20 12:13:30 -06:00
Kris Nuttycombe 654180df21
Merge pull request #6104 from superbaud/parallel-gitian-descriptor
Add a new gitian descriptor to enable parallel gitian builds
2022-10-20 11:03:23 -06:00
Greg Pfeil d557b6e5c5 make-release.py: Updated release notes and changelog for 5.3.0. 2022-10-20 10:52:37 -06:00
Greg Pfeil b6681791fc make-release.py: Updated manpages for 5.3.0. 2022-10-20 10:52:37 -06:00
Greg Pfeil 9c4bf36c45 updatecheck: fix GitHub auth
The script was accessing nonexistent vars, so auth wasn't working. Mostly not
noticable until you hit the API's unauthed request rate limit.
2022-10-20 10:48:02 -06:00
Greg Pfeil 5a084253d6 make-release.py: Versioning changes for 5.3.0. 2022-10-20 10:38:42 -06:00
sasha 6c85d52504 Add `-j$(nproc)` to the parallel gitian descriptor 2022-10-20 09:26:59 -07:00
sasha 75397a623e Use linux gitian descriptor as a base for the parallel linux descriptor 2022-10-20 09:25:43 -07:00
sasha e1b716b753 Make make-release.py aware of the parallel build gitian descriptor file 2022-10-20 09:24:36 -07:00