Commit Graph

12061 Commits

Author SHA1 Message Date
Eirik Ogilvie-Wigley e0c491c073 Extend Sprout mergetoaddress rpc test to also work for Sapling 2018-11-16 18:14:57 -07:00
Eirik Ogilvie-Wigley fe393e8a2f Add fail method to rpc test utils 2018-11-16 18:00:05 -07:00
Eirik Ogilvie-Wigley 9c6b6a2be5 Fix z_mergetoaddress parameter tests 2018-11-16 18:00:05 -07:00
Homu 8394c30029 Auto merge of #3680 - bitcartel:3671_sapling_default_z_getnewaddress, r=bitcartel
Make Sapling the default address format when calling RPC z_getnewaddress

Closes #3671.
2018-11-16 14:23:50 -08:00
Simon 12a1267a4a Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
Simon 471138a9f3 Update rpc_wallet_tests for new "sapling" default for z_getnewaddress. 2018-11-16 10:16:43 -08:00
Simon 6eec2812a2 Closes #3671 to make "sapling" the default for z_getnewaddress RPC. 2018-11-16 10:16:43 -08:00
Homu ae49175cd4 Auto merge of #3669 - charlieok:init_win_networking_in_test_setup, r=str4d
Add a call to SetupNetworking in BasicTestingSetup

In issue https://github.com/zcash/zcash/issues/3668 , the error code returned by `getaddrinfo_a` (10093) is `WSANOTINITIALISED`:

> Successful WSAStartup not yet performed.  Either the application has not called WSAStartup or WSAStartup  failed. The application may be accessing a socket that the current  active task does not own (that is, trying to share a socket between  tasks), or WSACleanup has been called too many times.

https://docs.microsoft.com/en-us/windows/desktop/winsock/windows-sockets-error-codes-2

`WSAStartup` is called from the `SetupNetworking` function in `util.cpp`, but `SetupNetworking` was not being called during test setup. This pull request adds that call.

Here is a gitlab pipeline running tests in the `test_bitcoin.exe` executable before this change:
https://gitlab.com/charlieok/zcash/pipelines/36483478

...and here is the same set of tests run after this change:
https://gitlab.com/charlieok/zcash/pipelines/36485098
2018-11-15 12:34:11 -08:00
Homu 570e09ea59 Auto merge of #2815 - str4d:2074-relay-pruning, r=bitcartel
Relay blocks when pruning

Cherry-picked from https://github.com/bitcoin/bitcoin/pull/6148

Part of #2074.
2018-11-15 10:28:44 -08:00
Homu 85fefca399 Auto merge of #3663 - garethtdavies:3610-rpc-cleanup, r=bitcartel
Cleaning up RPC output

Closes #3610 and #3661 to clean up RPC help messages.
2018-11-15 08:42:33 -08:00
Homu bc81c12a4f Auto merge of #3585 - str4d:merkle-tree-test-vectors, r=bitcartel
Update IncrementalMerkleTree test vectors to use valid commitments

The original commitments were SHA256 outputs, and some were outside the
scalar field. This didn't affect the Merkle hash, which drops the high
bit from each commitment, but it does affect the creation of the Merkle
path in Rust, which requires path nodes to be valid scalars.

Here, we explicitly drop the high bit of all test vector commitments,
as well as reducing the two that remain outside the field. The test
vectors still pass, and can now also be used in the Rust implementation.
2018-11-14 21:48:35 -08:00
Charlie O'Keefe efc2b22465 Add a call to SetupNetworking in BasicTestingSetup 2018-11-13 14:00:52 -07:00
Homu dfc3e186fc Auto merge of #3613 - bitcartel:3597_transaction_builder_version_check, r=bitcartel
Closes #3597. TransactionBuilder should check tx version before adding Sapling spends and outputs
2018-11-12 13:18:47 -08:00
Gareth Davies 4c646bb45b Cleaning up RPC output
Closes #3610 and #3661
2018-11-10 07:56:39 -08:00
Homu 78c228fc4d Auto merge of #3637 - tpantin:update_copyright_to_2018, r=daira
Update COPYRIGHT_YEAR from 2017 to 2018

This should update the year listed in zcashd and zcash-cli version info from 2017 to 2018.
2018-11-08 09:16:54 -08:00
Homu 44f5d33465 Auto merge of #3631 - arielgabizon:rename-method, r=bitcartel
rename HaveJoinSplitRequirements for Sapling

The method also checks condition for Sapling spends whilst the method name implies otherwise
2018-11-07 23:39:55 -08:00
Simon 7a9b6f8435 Closes #3597. TransactionBuilder checks tx version before adding Sapling spends and outputs. 2018-11-07 20:38:32 -08:00
Homu 34b8b8f1ca Auto merge of #3649 - garethtdavies:3648-correct-param-size, r=daira
Add clarifying text for parameter size

Addresses #3648.

Parameter size was previously specified to the nearest MB so not sure if 1.7GB/800MB is not specific enough? The true figures on disk are 1647MB and 777MB.
2018-11-07 06:41:28 -08:00
Homu 59758e32f2 Auto merge of #3654 - charlieok:save_and_restore_current_path, r=daira
Save and restore current_path in TestingSetup constructor/destructor

In issue https://github.com/zcash/zcash/issues/3653 , the affected tests change their current working directory to a temporary directory that is created in the TestingSetup constructor and deleted in the destructor. In Windows it seems to cause a problem when a process attempts to delete its current working directory.

This change fixes the issue by saving the path of the current working directory in the constructor, and restoring the working directory to that path in the destructor before deleting the temporary directory.
2018-11-02 12:58:24 -07:00
Charlie O'Keefe 0ade29546f Save and restore current_path in TestingSetup constructor/destructor 2018-10-31 15:21:46 -06:00
Gareth Davies fb6cd66660 Add clarifying text for parameter size 2018-10-30 21:10:31 -07:00
arielgabizon 06affbca05 rename HaveJoinSplitRequirements for Sapling 2018-10-29 20:56:13 +01:00
Homu ab24201507 Auto merge of #3627 - bitcartel:3616_document_debian_error, r=daira
Closes #3616.  Document revoked key error when upgrading on Debian.
2018-10-29 12:49:49 -07:00
Homu 97fccdbac5 Auto merge of #3605 - LarryRuane:3604-memo-zeros, r=daira
3604 fix sapling default memo - 0xF6 plus zeros

Closes #3604. For Sapling outputs, set the default memo to `no_memo` instead of all zeros. (See section 5.5 of the Sapling protocol specification.)
2018-10-28 03:15:07 -07:00
Homu aee5072af0 Auto merge of #3628 - bitcartel:3329_safe_mode_alert_for_pre_sapling_nodes, r=daira
Closes #3329. Send alert to put non-Sapling nodes into safe mode.

The alert targets nodes running protocol version <= 170006.
Sapling compatible nodes run protocol version >= 170007.
2018-10-28 01:21:05 -07:00
tpantin cc2fcb40a1
Updating copyright year from 2017 to 2018 2018-10-27 16:19:40 -04:00
Homu 11fa12773e Auto merge of #3633 - str4d:params-path-encoding, r=bitcartel
Pass parameter paths as native strings to librustzcash

Fixes a user-reported crash when starting on Windows with a Cyrillic non-UTF-8 locale.
2018-10-27 11:22:17 -07:00
Jack Grigg 262cf38712
Build librustzcash package without changing directory
This ensures that the depends system's custom PATH is applied correctly,
and the pre-build Rust binaries are accessible.
2018-10-28 06:41:53 +13:00
Jack Grigg ee3fa7020e
Pass parameter paths as native strings to librustzcash 2018-10-27 19:19:02 +13:00
Jack Grigg eff2938e46
Migrate to current librustzcash
The only upstream change relative to the previous commit is that the
various Zcash-specific dependencies have been pulled into a cargo
workspace. The dependecies in the workspace use the same commits as the
crates we had previously vendored.

The patches are necessary to handle the fact that cargo requires that
dev dependencies are available even if not used, and we would otherwise
need to vendor all the underlying crates.
2018-10-27 17:03:47 +13:00
Simon fa46ab10b8 Closes #3329. Send alert to put non-Sapling nodes into safe mode.
The alert targets nodes running protocol version <= 170006.
Sapling compatible nodes run protocol version >= 170007.
2018-10-25 11:44:31 -07:00
Simon 30fc0d3c06 Closes #3616. Document revoked key error when upgrading on Debian. 2018-10-25 11:30:22 -07:00
Homu 186874bb83 Auto merge of #3622 - Eirik0:rpc-assert-message, r=daira
Fix potentially misleading test failures

This is in response to https://github.com/zcash/zcash/pull/3590#discussion_r224677644

Currently statements such as:

```assert_equal("Embarassment", "Embarrassment", "Misspelling detected")```

Will produce essentially the following error:
```
Assertion failed: Misspelling detected; expected: <Embarassment> but was: <Embarrassment>
  File "/home/eirik/Development/zcash/qa/rpc-tests/test_framework/test_framework.py", line 121, in main
    self.run_test()
  File "/home/eirik/Development/zcash/qa/rpc-tests/test_spelling.py", line 13, in run_test
```
Which is misleading because the item on the left is not what is actually expected.

This PR changes the assertion failure to be displayed as:
```
Assertion failed: (left == right); Misspelling detected
  left: <Embarassment>
 right: <Embarrassment>
  File "/home/eirik/Development/zcash/qa/rpc-tests/test_framework/test_framework.py", line 121, in main
    self.run_test()
  File "/home/eirik/Development/zcash/qa/rpc-tests/test_spelling.py", line 13, in run_test
```
2018-10-24 23:14:19 -07:00
Homu e88a069627 Auto merge of #3620 - Eirik0:fix-sendmany-errmsg, r=bitcartel
Fix error message

This error should never happen, but it may as well reference the method it is thrown from.
2018-10-24 14:12:05 -07:00
Eirik Ogilvie-Wigley 882a4f577f Fix potentially misleading test failures 2018-10-24 13:53:25 -06:00
Eirik Ogilvie-Wigley 81005fb214 Fix error message 2018-10-24 12:05:48 -06:00
Larry Ruane 245db9c8a6 update bug in wallet_listreceived.py, now it highlights the fix 2018-10-24 08:13:56 -06:00
Homu dc3398fa88 Auto merge of #3611 - bitcartel:3467_add_sapling_benchmarks, r=bitcartel
Closes #3467. Add benchmarks for Sapling spends and outputs.

Four new benchmarks are added to RPC zcbenchmark:
- createsaplingspend
- createsaplingoutput
- verifysaplingspend
- verifysaplingoutput
2018-10-23 22:52:22 -07:00
Larry Ruane 19621a7993 sapling z_sendmany default memo 0xf6 + zeros 2018-10-23 15:13:41 -06:00
Homu d2019a4ccd Auto merge of #3581 - Eirik0:3580-unspent-note-cleanup, r=daira
Remove GetUnspentFilteredNotes

Closes #3580

This PR generalized `GetFilteredNotes`, expanding its functionality to also do what we do in `GetUnspentFilteredNotes`. This enables us to remove the latter.
2018-10-22 22:36:05 -07:00
Eirik Ogilvie-Wigley 095eee4f4d Wrap long line and update comments 2018-10-22 10:01:17 -06:00
Homu 32c2c17a91 Auto merge of #3579 - Eirik0:3577-generate-sprout-zkey, r=bitcartel
Make it clear that CWallet::GenerateNewZKey is Sprout specific

Closes https://github.com/zcash/zcash/issues/3577

When adding sapling support we had considered making the method `GenerateNewZKey` generic, but it ended up making more sense to add a second method `GenerateNewSaplingZKey` for sapling support.

This PR changes the name of `GenerateNewZKey` to `GenerateNewSproutZKey` and changes the return type from `libzcash::PaymentAddress` to `libzcash::SproutPaymentAddress` to make it more clear that this is what the method does.
2018-10-18 19:47:46 -07:00
Simon 67d2b79783 Closes #3467. Add benchmarks for Sapling spends and outputs.
Four new benchmarks are added to RPC zcbenchmark:
- createsaplingspend
- createsaplingoutput
- verifysaplingspend
- verifysaplingoutput
2018-10-18 19:10:59 -07:00
Homu d810703431 Auto merge of #3588 - bitcartel:hash_final_sapling_root_verification, r=bitcartel
Add test to verify final sapling root in block header is updated.
2018-10-18 17:52:11 -07:00
Homu e077fb321b Auto merge of #3541 - leto:amount_docs, r=bitcartel
Clarify in sendmany/z_sendmany rpc docs that amounts are not FP

Fixes #3539

I clarified in the docs that only 8 digits of precision are allowed. For example, if you try 9 digits you will get:
```
zcash-cli z_sendmany $TADDR  "[{\"address\":\"$ZADDR\",\"amount\":0.123456789}]"
error code: -3
error message:
Invalid amount
```
2018-10-18 15:36:34 -07:00
Eirik Ogilvie-Wigley e92414f91e Remove GetUnspentFilteredNotes 2018-10-18 15:52:13 -06:00
Eirik Ogilvie-Wigley ef27d7e4b3 Add functionality from GetUnspentFilteredNotes to GetFilteredNotes 2018-10-18 15:52:13 -06:00
Eirik Ogilvie-Wigley 9396b85db8 Remove unspent note entry structs 2018-10-18 15:52:07 -06:00
Homu e8f5e592b8 Auto merge of #3602 - bitcartel:release-v2.0.1, r=ebfull
Release v2.0.1
2018-10-14 13:56:08 -07:00
Simon 472f7fa873 make-release.py: Updated release notes and changelog for 2.0.1. 2018-10-14 13:40:30 -07:00