Commit Graph

16333 Commits

Author SHA1 Message Date
Daira Hopwood 623f3568a7 contrib/debian/copyright: minor corrections and formatting
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-26 18:45:57 +00:00
Daira Hopwood 4d0c503ee5 contrib/debian/copyright: add license entries for Libtool macros.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-26 18:45:57 +00:00
Kris Nuttycombe 71bfbfa28e
Merge pull request #5727 from rex4539/typos
Fix typos
2022-03-26 08:54:10 -06:00
str4d e87b94d88d
Merge pull request #5737 from steven-ecc/5705-remove-orchard-experimental-flag
Remove the fExperimentalOrchardWallet flag and related logic
2022-03-26 13:08:50 +00:00
Steven Smith e375f4ace2 Remove the fExperimentalOrchardWallet flag and related logic 2022-03-25 21:46:09 -07:00
Kris Nuttycombe c73f4b3fda
Merge branch 'master' into typos 2022-03-25 22:05:26 -06:00
Kris Nuttycombe 79b0490661
Merge pull request #5732 from therealyingtong/test-conflicted-orchard-notes
Fix handling of Orchard notes in `CWallet::GetConflicts`.
2022-03-25 22:02:55 -06:00
Kris Nuttycombe 46190bca23
Merge pull request #5751 from nuttycom/feature/fix_rpc_docs
Add undocumented attributes to getinfo API help text.
2022-03-25 22:01:15 -06:00
Kris Nuttycombe 74f770426b
Apply suggestions from code review 2022-03-25 18:37:31 -06:00
str4d ffda9f1ccf
Merge pull request #5753 from superbaud/enforce-testnet-version
Disallow testnet peers with a protocol version older than 170040
2022-03-25 23:16:49 +00:00
str4d 696a49b30d
Merge pull request #5745 from str4d/orchard-shielded-coinbase-tests
Test Orchard shielded coinbase rules
2022-03-25 23:04:39 +00:00
sasha d10c0553f3
Merge pull request #5750 from nuttycom/defensive/scanwallet_nullptr_check
Assert that pindexStart cannot be null in CWallet::ScanForWalletTransactions
2022-03-25 16:02:05 -07:00
Charlie O'Keefe 72d2f302f2
Merge pull request #5752 from nuttycom/test/orchard_spend_rollback
Add test for rollback of an Orchard spend.
2022-03-25 17:01:21 -06:00
sasha d250b8cd88 Disallow testnet peers with a protocol version older than 170040 2022-03-25 15:02:32 -07:00
Kris Nuttycombe ecc1e5da0c Add missing filter to ensure only fully-transparent transactions end up in mapOrphans. 2022-03-25 15:10:44 -06:00
Kris Nuttycombe 9f4e5ef2cc Add test for rollback of an Orchard spend. 2022-03-25 15:10:42 -06:00
Charlie O'Keefe 212f2bfb41
Merge pull request #5719 from nuttycom/cleanup/rpc_address_naming
Rename fields in RPC results: unifiedaddress->address and type->(pool or address_type)
2022-03-25 14:05:36 -06:00
Kris Nuttycombe dc4afca405 Correctly return p2pkh/p2sh labels for z_listunifiedreceivers 2022-03-25 10:44:18 -06:00
Kris Nuttycombe 8630891c5a Improve consistency of RPC parameter and result attribute naming.
Make consistent use of "pool", "address type" and "receiver type",
in RPC documentaion, and deprecate bare uses of "type" in RPC APIs.

Fixes #5534

Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-25 10:44:18 -06:00
Kris Nuttycombe 0b8a4e1985
Merge pull request #5714 from LarryRuane/2022-03-regtest-doc
Add regtest documentation to book
2022-03-25 09:59:11 -06:00
Kris Nuttycombe 1d73567f42 Add undocumented components to getinfo API. 2022-03-25 09:25:46 -06:00
Kris Nuttycombe 881e0f2ca8 Rename unifiedaddress->address in z_getaddressforaccount results
Fixes #5432
2022-03-25 08:29:56 -06:00
Kris Nuttycombe b9b5d47523 Assert that pindexStart cannot be null in CWallet::ScanForWalletTransactions 2022-03-25 08:23:51 -06:00
Marshall Gaucher 4a9bd59fef
Merge pull request #5743 from daira/no-banlist-on-reindex
Start with an empty banlist if -reindex is set
2022-03-25 06:37:11 -07:00
ying tong 2ef41824ff
orchard_wallet_get_potential_spends: Do not use uint256 type.
We don't want to depend on the C++ uint256 type in the C FFI.

Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-25 12:07:46 +08:00
therealyingtong 637592ebd5 Introduce OrchardWallet::GetPotentialSpendsFromNullifier method. 2022-03-25 10:41:05 +08:00
therealyingtong 7b51afd840 Fix GetConflictedOrchardNotes test. 2022-03-25 10:38:30 +08:00
Taylor Hornby 829d8d804d Only send exceptions to the log, not stderr 2022-03-24 20:32:17 -06:00
Jack Grigg def5a0be38 Test Orchard shielded coinbase rules
Also fixes a bug in `z_sendmany` transaction size estimation (we were
using the wrong size of a `CompactSize`).
2022-03-25 02:12:42 +00:00
Kris Nuttycombe 56f7bce865
Merge pull request #5742 from nuttycom/fix/sapling_ivk_load
Restore legacy default Sapling addresses to the keystore.
2022-03-24 20:00:04 -06:00
Daira Hopwood 50d4be17cf Start with an empty banlist if -reindex is set. fixes #5739
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-25 01:07:44 +00:00
Kris Nuttycombe dd578cb290 Restore legacy default Sapling addresses to the keystore.
Prior to zcash/zcash@90e59c3be0 Sapling
default payment addresses were added to the in-memory keystore whenever
a full viewing key was added, or loaded from disk. After that change,
the Sapling address was no longer being restored to the in-memory
keystore on wallet load; instead, z_getnewaddress and
z_getnewaddressforaccount both persist the address to the keystore
directly. This commit adds handling to `LoadCaches` to correctly persist
the default address to the wallet database, and add it to the in-memory
keystore, when this condition is detected.
2022-03-24 17:02:43 -06:00
Daira Hopwood d17c981013
Merge pull request #5738 from daira/wallet-backup-warning
zcashd-wallet-tool: warn that wallet.dat still needs to be backed up, and add man page
2022-03-24 20:29:25 +00:00
Daira Hopwood 71e48e10f3 zcashd-wallet-tool: adjust man page to correct copyright information.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 18:41:41 +00:00
Jack Grigg 639e97ed4a Merge branch 'master' into nu5-consensus 2022-03-24 18:09:17 +00:00
Daira Hopwood 6b836ce7e5 zcashd-wallet-tool: warn that wallet.dat needs to be backed up. fixes #5704
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 14:24:43 +00:00
Daira Hopwood e8fc2e60b4 zcashd-wallet-tool: add man page generation. fixes #5729
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 14:15:01 +00:00
therealyingtong bd6a34b0ea test_wallet: Test GetConflictedOrchardNotes. 2022-03-24 18:52:30 +08:00
Steven b12eb567cb
Merge pull request #5734 from superbaud/fix-segfault-5712
Prevent a pindex == NULL case in the ScanForWalletTransactions traversal
2022-03-23 16:30:03 -07:00
str4d 96001afc0d
Merge pull request #5731 from str4d/unify-nu5-consensus-changes
Unify NU5 consensus changes with 4.7.0-rc1
2022-03-23 22:39:16 +00:00
Jack Grigg ac7dd3acca qa: Remove pinned action indices from wallet_listreceived
Orchard output ordering is no longer deterministic, as we now shuffle
spends and outputs during bundle building. But we _can_ still check that
the action index of a note being spent is correct.
2022-03-23 20:56:22 +00:00
Jack Grigg 165901c654 qa: Remove hard-coded consensus branch IDs from RPC tests
Also fixes a bug in the `nuparams` helper, which would have caused MSB
zeroes in consensus branch IDs to not be rendered in the `-nuparams`
option. This hadn't been encountered because we haven't yet generated a
consensus branch ID with a zero MSB.
2022-03-23 20:28:31 +00:00
sasha cc05712e7f Prevent a pindex == NULL case in the ScanForWalletTransactions traversal 2022-03-23 12:15:45 -07:00
Jack Grigg e5210d50c9 Set NU5 protocol version for regtest to 170040, bump protocol version
We need to bump the `zcashd` protocol version because the new rules are
not compatible with existing rules followed by 170015 nodes, but we
_also_ need to ensure we can still bump it again once we set the testnet
reactivation height (changing node network behaviour again). This commit
also enables RPC tests to run (because previously the nodes considered
each other to be too old for NU5 to be active, and were disconnecting).
2022-03-23 18:37:56 +00:00
Jack Grigg d9c1b05a83 builder: Use correct `PrecomputedTransactionData` for transparent sigs
Before merging 4.7.0-rc1 into the nu5-consensus branch, we were in a
split state:

- 4.7.0-rc1 included Orchard support in the transaction builder, which
  required special handling of Orchard bundles when computing sighashes.
  The `PrecomputedTransactionData` structure could be shared, because
  its digests were only relevant to transparent signatures (as shielded
  signatures signed the txid directly even in shielding transactions).

- nu5-consensus included the changes to ZIP 244, which required passing
  around a `PrecomputedTransactionData` that contained the set of all
  transparent inputs being spent, because shielding transactions now also
  need to commit to transparent inputs.

In the merge commit, we incorrectly handled the resolution: we correctly
derived a fresh `PrecomputedTransactionData` when signing the Orchard
bundle, but we reused the `PrecomputedTransactionData` that was
previously derived before checking whether or not we even had an Orchard
bundle, for transparent inputs. This meant that its commitments didn't
commit to the Orchard bundle, and so transparent signatures on
transactions with Orchard bundles would fail to verify.

Incidentally, this is the exact inverse of a bug we encounted while
implementing the ZIP 244 changes on the nu5-consensus branch: we were
correctly computing the transparent sighash, but we were relying on the
initial `TxDigests` derived within `PrecomputedTransactionData` for the
Orchard sighash, even though we were actively rewriting the transaction
to include the Orchard bundle. The fix there was similarly to re-compute
the `TxDigests` before computing the sighash.
2022-03-23 18:27:12 +00:00
Larry Ruane 747745f7a2 Add regtest documentation to book 2022-03-23 08:27:42 -06:00
Jack Grigg 85b5595519 Fix logical merge conflicts after merging 4.7.0-rc1
The merge commit includes changes to address direct merge conflicts.
This commit makes the remaining changes necessary to integrate the
Orchard wallet changes with the NU5 consensus changes.
2022-03-23 03:19:39 +00:00
Jack Grigg 9e9f58b26f Merge branch 'master' into unify-nu5-consensus-changes 2022-03-23 02:57:16 +00:00
str4d bd1feab2db
Merge pull request #5730 from superbaud/missing-wallet-orchard-h
Add missing wallet/orchard.h to src/Makefile.am and gtest/test_transaction_builder.h to Makefile.gtest.include
2022-03-23 02:11:56 +00:00
Jack Grigg 77a971fbc1 Migrate to latest `zcash/librustzcash` revision
This includes:
- `orchard =0.1.0-beta.3` which includes the final circuit changes.
- The new NU5 consensus branch ID.
- Updated ZIP 244 test vectors (which use the NU5 consensus branch ID).
2022-03-23 02:05:06 +00:00