Commit Graph

1113 Commits

Author SHA1 Message Date
Greg Pfeil f6a4f68115
Merge pull request #6122 from nuttycom/wallet/listunspent_as_of
Add `asOfHeight` argument across the RPC API
2022-11-23 21:20:20 -07:00
Greg Pfeil 368d04245d Change asOfHeight to preserve Bitcoin compat 2022-11-22 22:06:51 -07:00
Greg Pfeil 7792228bab Revert change to getbalance minconf
It was the docs that were wrong. In this case, the default `minconf` _should_ be
0 (to match upstream).
2022-11-22 16:47:40 -07:00
Greg Pfeil d444f8b586 Fix small error in code review suggestions 2022-11-22 16:47:40 -07:00
Greg Pfeil f290b9a7b4
Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-11-22 15:59:07 -07:00
Greg Pfeil 4f85307186 Add FIXMEs to repair comments after #6262 is fixed 2022-11-22 10:36:34 -07:00
Kris Nuttycombe 0a87047186
Merge pull request #6245 from sellout/wallet_accounts-formatting
Small formatting change
2022-11-22 07:55:40 -07:00
str4d b9158fe377
Merge pull request #6259 from str4d/debugmetrics
Place zcashd.debug.* metrics behind a -debugmetrics config option
2022-11-22 06:05:47 +00:00
Greg Pfeil b27fdf54fd Add matured_at_height test helper 2022-11-21 22:36:12 -07:00
Greg Pfeil 3b3f8f4cac
Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-11-21 21:15:07 -07:00
Greg Pfeil 71b5f99ede Work around #6262 in wallet_listunspent 2022-11-21 20:44:21 -07:00
Greg Pfeil 952a1ac433 Ignore mempool when asOfHeight is set
This also catches a case where the default minconf was 0 (which disagreed with
the docs), and a case where asOfHeight checked the wrong param entry.
2022-11-21 20:44:21 -07:00
str4d c267c3ee26
Merge pull request #6192 from daira/reduce-equihash-solution-memory
Reduce memory usage of CBlockIndex
2022-11-21 22:25:30 +00:00
Jack Grigg 93de2aae0e Place zcashd.debug.* metrics behind a -debugmetrics config option 2022-11-21 20:50:02 +00:00
Greg Pfeil d796114b2e Add additional asOfHeight tests 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
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
Daira Hopwood 2ee172fe15 Error reporting improvements.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-13 18:46:30 +00:00
Greg Pfeil 4ec2642f94 Small formatting change 2022-11-10 20:50:22 -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
Greg Pfeil 04d314d067 Apply suggestions from code review
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
2022-10-18 13:43:14 -06:00
Greg Pfeil 5c19487991 Add test for `zcashd --help`
Currently failing.
2022-10-18 13:42:02 -06:00
Daira Hopwood 774fa691aa Always use a tuple as right argument of % in new Python code.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-10-18 13:42:02 -06:00
Greg Pfeil 1e480d2b4d Address review feedback and fixed test failures
Some tests were checking error message strings, but the check was still
hardcoded to “bitcoind”.
2022-10-18 13:42:02 -06:00
Greg Pfeil 8cb655c3ff Fix display of binary name in error messages.
Ensures that test failures report the name of the actual binary that was run.
2022-10-18 13:42:02 -06:00
DeckerSU 225c8b8a03
test_framework: fix AttributeError in sapling_spends_compact_digest
Without this fix we will get:
AttributeError: 'SpendDescriptionV5' object has no attribute 'anchor'
On certain V5 transactions rehash / calc_sha256, for example:
ca6abd8ef7d6ef158a4a35ea2c2c0cf122f2f664a88f8fa5b6fd79e48c5bed59
2022-10-04 01:54:34 +02:00
Greg Pfeil 5514542a0a
Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-09-23 18:39:00 -06:00
Greg Pfeil bdde47fb5d Fix finalorchardroot serialization
Previously, `finalorchardroot` and `orchard.anchor` were serialized differently
in the RPC API, which made it difficult to correlate them. This changes the
serialization for `finalorchardroot` to match `orchard.anchor`.
2022-09-22 18:20:42 -06:00
Greg Pfeil 4f4ef5537b Add a finalorchardroot RPC test 2022-09-22 14:13:58 -06:00
Kris Nuttycombe 035a26b674 Replace setup_clean_chain with cache_behavior in rpc test init. 2022-07-18 09:00:34 -06:00
Kris Nuttycombe 6477c6165b Update getblocktemplate test to use persisted sprout chain 2022-07-18 09:00:34 -06:00
Kris Nuttycombe 91f62f4161 Update finalsaplingroot test to use persisted sprout chains. 2022-07-18 09:00:34 -06:00
Kris Nuttycombe 95bbfd09aa Update feature_zip239 test to use persisted sprout chains. 2022-07-15 08:23:57 -06:00
Kris Nuttycombe b2fc56c24a Update sprout_sapling_migration test to use persisted sprout chains. 2022-07-15 08:23:57 -06:00
Kris Nuttycombe afea5c386d Add RPC test initialization using the persisted Sprout chains. 2022-07-15 08:23:57 -06:00
Kris Nuttycombe 532017e74e Remove the temporary test that was used for setup of the cached Sprout fixtures. 2022-07-15 08:23:57 -06:00
Kris Nuttycombe 5d44ce318e Add persistent Sprout test data.
This is in preparation for removing the ability to generate
Sprout outputs from z_shieldcoinbase. Once that is complete,
we will no longer be able to use `z_shieldcoinbase` for test
setup for uses of Sprout funds; instead, the persisted blockchain
state created in this commit will be used for tests that require
the use of Sprout funds.

This brings the test framework into line with how Sprout funds
are now used on mainnet and testnet; existing Sprout funds may
be spent, and Sprout change may be created, but no funds may
be transfered into the Sprout pool, since the activation of
ZIP 211.
2022-07-15 08:23:57 -06:00
Kris Nuttycombe e7922af588 Add a clock for testing with an offset from the system clock.
This change improves clock management for zcashd by ensuring
that all clock methods (obtaining seconds, milliseconds, and
microseconds since the epoch) agree under testing conditions
using `-mocktime`, and also adds a feature that allows tests
to specify an offset to the system clock; this is useful to
allow comprehensive testing of the "timejacking attack mitigation"
consensus rules.
2022-07-14 16:33:54 -06:00
therealyingtong da15ada52e Test getrawtransaction in wallet_orchard.py 2022-07-01 08:50:34 -04:00
mdr0id 9a867e2958 Update walletbackup.py 2022-06-28 17:10:53 -07:00
str4d e66f768e5d
Merge pull request #5976 from nuttycom/bug/block_wallet_init_on_reindex
Scan wallet from genesis when reindexing
2022-06-01 18:21:10 +01:00
Jack Grigg c1343d1807 qa: Fix sprout_sapling_migration RPC test to handle wallet RPC change
Co-authored-by: ying tong <yingtong@z.cash>
2022-06-01 13:51:26 +00:00
Kris Nuttycombe f3a9dcc0cf Mark the `dumpwallet` RPC method as disabled.
Fixes #5513
2022-05-26 14:31:26 -06:00
Kris Nuttycombe 9691d86047 Add a CLI flag to preferentially send V4 tx.
Since the wallet ecosystem may not be fully updated to handle
v5 transaction parsing at the point of NU5 activation, some
nodes may prefer to construct V4 transactions when not including
Orchard transaction components.

This change adds a CLI flag that allows node users to specify
that preference.
2022-05-26 07:26:38 -06:00
Kris Nuttycombe 15d1bb6ce9 scripted-diff: Add 2020-2022 copyright headers for files added/modified in 2020
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM 6a08c225674df23f1c7f214bcb94732dba688d39..a960e896dd4c0b6d96db3d5ebbb1caa6c92a9f39 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2020-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:32:39 -06:00
Kris Nuttycombe 940dd0d426 scripted-diff: Add 2019-2022 copyright headers for files added/modified in 2019
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM 8df7a073ce13ec057b94b5a813bb5534cdfa6809..6a08c225674df23f1c7f214bcb94732dba688d39 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2019-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:29:59 -06:00
Kris Nuttycombe 73fcef8035 scripted-diff: Add 2018-2022 copyright headers for files added/modified in 2018
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM b2a114a8c99947b66d1fbdc70278f13e7a415d2a..8df7a073ce13ec057b94b5a813bb5534cdfa6809 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2018-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:28:03 -06:00
Kris Nuttycombe d9aeefc54a scripted-diff: Add 2017-2022 copyright headers for files added/modified in 2017
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM 94f427a211bb337200c29a1e19be0f5ad2f171b0..b2a114a8c99947b66d1fbdc70278f13e7a415d2a -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2017-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:25:51 -06:00
Kris Nuttycombe 28040f9ce4 scripted-diff: Add 2016-2022 copyright headers for files added/modified in 2016
-BEGIN VERIFY SCRIPT-
grep -l "Copyright" $(grep -L "The Zcash developers" $(git diff --name-only --diff-filter=ACM bitcoin-v0.11.2..94f427a211bb337200c29a1e19be0f5ad2f171b0 -- src/ test/ zcutil/ qa/)) | xargs -I {} sed -i"" -e "s#\(\(.*\)Copyright (c) .* The Bitcoin Core developers\)#\1\n\2Copyright (c) 2016-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 17:23:09 -06:00
Kris Nuttycombe 1b8a9af946 Add tests to check auth data commitments committing to Orchard actions.
In the process of adding these tests, I also found and fixed a number
of type errors in Orchard auth data root computation.

Fixes #5223
2022-05-09 21:01:11 -06:00