Commit Graph

35 Commits

Author SHA1 Message Date
Daira-Emma Hopwood 8b436e8f1f Repair the RPC tests.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-10-02 03:53:11 +01:00
Greg Pfeil 7a3656d660 Strengthen AllowRevealedSenders
Previously, `AllowRevealedSenders` would permit linking multiple legacy taddrs. This strengthens the
policy to only allow sending from a single taddr, preventing linking of any addresses. To send from
multiple taddrs (legacy or UA) now requires `AllowLinkingAccountAddresses`.
2023-06-02 18:40:18 -06:00
Daira Emma Hopwood 588a22526a Transactions paying less than the ZIP 317 conventional fee to the extent
that they have more than `-txunpaidactionlimit` unpaid actions, will now
not be accepted to the mempool or relayed. For the default values of
`-txunpaidactionlimit` and `-blockunpaidactionlimit`, these transactions
would never be mined by the ZIP 317 block construction algorithm. (If the
transaction has been prioritised by `prioritisetransaction`, the modified
fee is used to calculate the number of unpaid actions.)

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-05-18 19:13:45 +01:00
Greg Pfeil 3a8b5f3b66
Merge remote-tracking branch 'upstream/master' into hotfix-v5.5.1 2023-05-17 11:22:42 -06:00
Greg Pfeil d53b6b92b9
Correct fee calculation for vin in tx creation
Previously transparent inputs were under-counted because the `CTxIn`s were created without a
signature. This now adds a dummy signatures so sizes are correct.

Fixes #6658.
2023-05-15 16:20:50 -06:00
Daira Emma Hopwood d438b79184 Rename DEFAULT_FEE to LEGACY_DEFAULT_FEE in C++ code and RPC tests.
Also remove DEFAULT_FEE_ZATS in RPC tests which was unused.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-26 02:09:16 +01:00
Greg Pfeil 8c1101b5bf
Add `memo` parameter to `z_shieldcoinbase` 2023-04-24 16:38:34 -06:00
Greg Pfeil e3b1802637
Don’t test “Insufficient funds” for `z_shieldcoinbase`
I don’t think it’s possible for this error condition to be tested for `z_shieldcoinbase` any more

1. to hit this failure, we need a fee higher than the amount available in coinbase UTXOs;
2. if there are no UTXOs to shield, we fail before reaching an “insufficient funds” check;
3. coinbase UTXOs are >1 ZEC, which is the highest we can set `-maxtxfee` to without emitting a
   warning;
4. emitting a warning causes the test to fail.
2023-04-18 19:39:47 -06:00
Greg Pfeil f655f482ab
WalletTxBuilder support for net payments
Previously, `WalletTxBuilder` expected a vector of payments with known amounts.
This meant that operations like `z_shieldcoinbase` and `z_mergetoaddress` needed
to pre-calculate the amount to be sent to the target address.

With ZIP 317 fees, this became harder to do. Now `WalletTxBuilder` accepts
either a vector of payments or a single address (and optional memo) for the net
amount to be paid to.

This also converts `z_shieldcoinbase` to use this approach. `z_mergetoaddress`
conversion is blocked by #6569.
2023-04-18 15:55:21 -06:00
Kris Nuttycombe facb4856ee
Merge pull request #6568 from sellout/wallet_tx_builder-z_shieldcoinbase
Have z_shieldcoinbase use WalletTxBuilder
2023-04-17 15:08:55 -06:00
Daira Emma Hopwood ea9fa3f06e Fix tests that failed due to the minimum relay fee being enforced.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
Greg Pfeil 993dc0c279
Have z_shieldcoinbase use WalletTxBuilder
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-04-17 03:47:11 -06:00
Jack Grigg 09cd65327b Disable previously-deprecated features by default
These features were deprecated at least 3 minor releases ago. I found
one mistake which was that `z_validateaddress` had not been placed
behind the `addrtype` deprecated feature; this has been fixed.
2023-01-05 22:32:19 +00:00
Steven Smith e375f4ace2 Remove the fExperimentalOrchardWallet flag and related logic 2022-03-25 21:46:09 -07:00
Larry Ruane 1e165b8396 allow UA as z_shieldcoinbase destination 2022-02-03 08:31:26 -07:00
Dimitris Apostolou 2006939d27
Fix typos 2022-01-02 23:16:01 +02:00
Daira Hopwood 5e84362702 Reduce the default fee for z_* operations, and the "low fee penalty" threshold for mempool limiting, to 1000 zatoshis.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-18 12:37:03 -07:00
mdr0id 8f859cbf85 fix pyflakes errors 2020-02-09 08:18:00 -08:00
mdr0id c7113bd6f1 Update json to simplejson to remove unicode and str issue from py2 to py3 2020-02-09 08:18:00 -08:00
mdr0id 3eb6512b78 cleanups and fixing odd casting 2020-02-09 08:18:00 -08:00
mdr0id 65a02f0984 Standard py2 to py3 updates 2020-02-09 08:14:21 -08:00
Jack Grigg f7eaf921bc
test: Add sync_all points after block generation to RPC tests
Previously we only required synchronization points where blocks were
sent between nodes; now we need them between action and query operations
on the same node, because wallet notification of mined blocks no longer
occurs in real-time.
2019-12-18 15:06:54 -06:00
Jack Grigg 8669cb692d
test: Update RPC tests to use a minimum of Sapling
The p2p_nu_peer_management and rewind_index RPC tests still start from
Sprout, because they are explicitly (and only) testing network behaviour
across network upgrades.

The mempool_tx_input_limit test is removed because the flag has been
ignored since Sapling activation, and will be removed at some point in
the near future.
2019-08-22 17:26:54 +01:00
Daira Hopwood bc909a7a7f Replace http with https: in links to the MIT license.
Also change MIT/X11 to just MIT, since no distinction was intended.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
Jack Grigg b0f1d643aa
test: Fetch coinbase address from coinbase UTXOs
After upstream PR bitcoin/bitcoin#5994, the first call to getnewaddress after
startup does not return the address being used by the miner.
2019-03-06 09:03:51 +13:00
mdr0id 4ca5def62f Make pythonisms consistent 2018-12-18 12:16:23 -08:00
Jack Grigg 5f91a95641
Add Sapling support to z_shieldcoinbase
Part of #3216.
2018-10-03 12:16:18 +01:00
Per Grön 8993edfb77 Deduplicate test utility method wait_and_assert_operationid_status
Strictly speaking this is not a true deduplication; the test output will be
slightly different (due to inconsistent print statements) but I think this is
close enough.
2017-12-16 19:24:25 +01:00
Simon 337bca8125 Fix an issue where qa test wallet_shieldcoinbase could hang.
The mempool was not synced so a block could be generated and not
clear out the mempool.  This would then cause subsequent code
which expected the mempool of all nodes to be empty to hang.
2017-11-03 00:39:23 -07:00
Simon c5dabd2b66 Closes #2639. Adds optional limit parameter with a default value of 50.
The new parameter is to satisfy the principle of least astonishment
by providing a sensible default for the maximum number of transparent
inputs to shield.  If users do not configure -mempooltxinputlimit
it is possible for them to create transactions with hundreds of
inputs which suffer from mining delay, due to the current state of
the network where some miners have configured -mempooltxinputlimit
as a way to deal with the problem of quadratic hashing.
2017-11-01 10:40:24 -07:00
Simon c2d3bafeaa Closes #2639. z_shieldcoinbase is now supported, no longer experimental.
This reverts commit 5023af7bd5.
2017-10-26 11:29:36 -07:00
Homu e806f9c603 Auto merge of #2638 - bitcartel:2637_experimental_feature_z_shieldcoinbase, r=str4d
Closes #2637. Make z_shieldcoinbase an experimental feature.

Can be enabled with: `zcashd -experimentalfeatures -zshieldcoinbase`
2017-09-27 16:09:54 -07:00
Simon 5023af7bd5 Closes #2637. Make z_shieldcoinbase an experimental feature where it
can be enabled with: zcashd -experimentalfeatures -zshieldcoinbase.
2017-09-27 10:43:54 -07:00
Jack Grigg f897e075c2
Fix pyflakes warnings in RPC tests 2017-09-27 17:24:19 +01:00
Simon 06c19063bb Implement RPC shield_coinbase #2448. 2017-09-21 15:04:12 -07:00