Commit Graph
100 Commits
Author SHA1 Message Date
Simon 3501519bc8 Update qa test to check for Sapling related JSON fields. 2018-09-17 10:01:50 -07:00
Simon 9ba7479de1 Add Sapling fields to JSON RPC output using TxToJSON. 2018-09-17 09:44:43 -07:00
Simon 17b6a9d376 Update comment for test ContextualCheckBlockTest.BlockSproutRulesRejectOtherTx 2018-09-11 14:49:47 -07:00
Simon 761f8c8bb8 Add unit test SaplingNoteLocking 2018-09-04 14:56:08 -07:00
Simon b1c693e532 Add methods to store SaplingOutPoint in setLockedSaplingNotes 2018-09-04 14:56:08 -07:00
Simon 0f62cacf0c Refactor: rename ListLockedNotes -> ListLockedSproutNotes 2018-09-04 14:56:08 -07:00
Simon 9ae73247e2 Refactor: rename UnlockAllNotes -> UnlockAllSproutNotes 2018-09-04 14:56:08 -07:00
Simon d358d145ca Refactor: rename setLockedNotes -> setLockedSproutNotes 2018-09-04 14:55:58 -07:00
Simon 2f4735b3af make-release.py: Updated release notes and changelog for 2.0.0. 2018-08-15 17:57:50 -07:00
Simon 84b13aee88 make-release.py: Updated manpages for 2.0.0. 2018-08-15 17:57:50 -07:00
Simon 94f7201424 make-release.py: Versioning changes for 2.0.0. 2018-08-15 17:51:39 -07:00
Simon 303f80fb1e Fix comment in CWallet::SyncMetaData. 2018-08-08 12:03:10 -07:00
Simon 3c3d1f0a38 Clean up wallet unit tests: replace .value() with .get() for clarity.
This is to avoid confusion with note.value().
2018-08-08 12:03:10 -07:00
Simon 58a1224d63 Update wallet unit tests to revert upgraded network parameters. 2018-08-08 12:03:10 -07:00
Simon 52d162319d Add new wallet test: MarkAffectedSaplingTransactionsDirty
Also rename MarkAffectedTransactionsDirty to MarkAffectedSproutTransactionsDirty.
2018-08-08 12:03:10 -07:00
Simon eba096f24e Add new wallet test: GetConflictedSaplingNotes 2018-08-08 12:03:10 -07:00
Simon a5ca7967a4 Add new wallet test: SetSaplingNoteAddrsInCWalletTx. 2018-08-08 12:03:10 -07:00
Simon 3afc6ce219 Update CWallet::GetConflicts for Sapling. 2018-08-08 12:03:10 -07:00
Simon 6d8ea4fa82 Fix typo in parameter name. 2018-08-08 12:03:10 -07:00
Simon 9fe34549b1 Fix inaccurate comments in test. 2018-08-08 12:03:10 -07:00
Simon 668ca2974a Fix typo in variable name in test. 2018-08-08 12:03:10 -07:00
Simon 992a82c649 Rename wallet tests for clarity between Sprout and Sapling. 2018-08-08 12:03:10 -07:00
Simon f13387486e Add new wallet tests: SpentSaplingNoteIsFromMe. 2018-08-08 12:03:10 -07:00
Simon fba4168049 Add new wallet test: UpdatedSaplingNoteData. 2018-08-08 12:03:10 -07:00
Simon e5df6ec5cc Add new wallet test: NavigateFromSaplingNullifierToNote
Checks caching of Sapling nullifier and mapping to its SaplingOutPoint.
2018-08-08 12:03:10 -07:00
Simon 2f6481f835 Add two new wallet tests: FindMySaplingNotes, SaplingNullifierIsSpent. 2018-08-08 12:03:10 -07:00
Simon c343e2db9a Fix code review nits. 2018-08-08 12:03:10 -07:00
Simon 3b6dd486b4 Refactor IsSpent(nullifier) for Sprout and Sapling domain separation.
We need separate functions for checking Sprout and Sapling nullifiers,
because they are in separate domains and aren't guaranteed to be
collision-resistant (otherwise there is a possibility of a nullifier
collision, however remote, between Sprout and Sapling causing the spend
of one to prevent the spend of the other).
2018-08-08 12:03:10 -07:00
Simon ec064abbdf Iterate over mapSaplingFullViewingKeys with ivk->fvk mapping (1:1).
When diversified addresses are supported, iterating over
mapSaplingIncomingViewingKeys will be inefficient as the mapping will
be addresses->ivk (n:1).
2018-08-08 12:03:10 -07:00
Simon 28d3dc8532 Add test for CWalletTx::SetSaplingNoteData() 2018-08-08 12:03:10 -07:00
Simon f12daeb44a Clean up names of unit tests in gtest/test_wallet.cpp. 2018-08-08 12:03:10 -07:00
Simon edfc6a787f Update CWallet::IsSpent() to check Sapling nullifiers. 2018-08-08 12:03:10 -07:00
Simon ad1e90dd34 Add caching and updating of Sapling note nullifier. 2018-08-08 12:03:10 -07:00
Simon f9816408b2 Update CWalletTx::GetAmounts() to return COutputEntry for Sapling valueBalance. 2018-08-08 12:03:10 -07:00
Simon f686388991 Cleanup CWalletTx::GetAmounts() for clarity. No-op. 2018-08-08 12:03:10 -07:00
Simon c47c1e9363 Remove dead code in CWalletTx::GetAmounts() as filed in issue #3434. 2018-08-08 12:03:10 -07:00
Simon d7cf640bbf Create CWallet::IsSaplingNullifierFromMe() 2018-08-08 12:03:10 -07:00
Simon 037cacf2ce Rename IsFromMe(nullifier) to IsSproutNullifierFromMe(nullifier). 2018-08-08 12:03:10 -07:00
Simon 78584ef794 Create CWallet::FindMySaplingNotes() 2018-08-08 12:03:09 -07:00
Simon d4d0ec7e95 Update test to pass in required cm to SaplingNotePlaintext::decrypt(). 2018-08-08 12:03:09 -07:00
Simon 52332fb417 Create CWallet::AddToSaplingSpends() to track Sapling nullifiers. 2018-08-08 12:03:09 -07:00
Simon 3a83e7c9a4 Update CWallet::UpdatedNoteData() for Sapling. 2018-08-08 12:03:09 -07:00
Simon dae1c4204a Update CWallet::MarkAffectedTransactionsDirty() for Sapling. 2018-08-08 12:03:09 -07:00
Simon a132719da5 Add ivk member variable and equality comparators to SaplingNoteData class. 2018-08-08 12:02:27 -07:00
Simon 3438e26cc3 Rename mapTxNullifiers to mapTxSproutNullifiers. 2018-08-08 11:37:38 -07:00
Simon d5e490d9f2 Rename CWallet::AddToSpends methods for clarity. 2018-08-08 11:37:38 -07:00
Simon f41bf503e1 Rename mapNullifiersToNotes to mapSproutNullifiersToNotes. 2018-08-08 11:37:38 -07:00
Simon 618206c7d5 Rename GetNoteNullifier to GetSproutNoteNullifier. 2018-08-08 11:37:38 -07:00
Simon 57faf44e61 Rename FindMyNotes to FindMySproutNotes. 2018-08-08 11:37:38 -07:00
Simon f01c11bd0f Add tests for expiryheight parameter of RPC createrawtransaction. 2018-07-30 10:24:10 -07:00
Simon 87d55e1322 Clean up help messages for RPC createrawtransaction.
Also return error if expiryheight used when Overwinter not active.
2018-07-29 20:57:33 -07:00
Simon 2f0b2a256d Clean up for rebase: rename mapNoteData to mapSproutNoteData. 2018-07-25 20:47:41 -07:00
Simon d9fe33b86f Only check for a valid Sapling anchor after Sapling activation.
Before Sapling activates, hashFinalSaplingRoot is 0x0, which is
not a valid anchor.  After Sapling activates, the empty root value
of 0x3e49... is a valid anchor.
2018-07-25 20:47:41 -07:00
Simon e739ca2ef2 Rename AttemptSaplingEncDecryptionUsingFullViewingKey and use function overloading. 2018-07-23 10:48:26 -07:00
Simon 7b913c3e5e Implement Sapling note decryption using full viewing key. 2018-07-20 16:31:48 -07:00
Simon 687bd96cbd Minor update to address nits in review. 2018-07-17 14:26:38 -07:00
Simon 0b6eeac330 Update and fix per review comments, the test for absurd fee. 2018-07-17 13:00:42 -07:00
Simon 34bf166e5f Add encryption of SaplingNotePlaintext and SaplingOutgoingPlaintext classes.
This is part of #3061 to add Sapling note functionality.
2018-07-11 22:03:04 -07:00
Simon 720b8ac8ad make-release.py: Updated release notes and changelog for 1.1.2. 2018-07-01 20:12:33 -07:00
Simon 7163f00303 make-release.py: Updated manpages for 1.1.2. 2018-07-01 20:12:33 -07:00
Simon 8fc73722e8 make-release.py: Versioning changes for 1.1.2. 2018-07-01 20:07:24 -07:00
Simon 3ef8f7abb3 make-release.py: Updated release notes and changelog for 1.1.2-rc1. 2018-06-22 17:03:41 -07:00
Simon 5121fad00c make-release.py: Updated manpages for 1.1.2-rc1. 2018-06-22 17:03:41 -07:00
Simon 5cbbb7e375 make-release.py: Versioning changes for 1.1.2-rc1. 2018-06-22 16:55:20 -07:00
Simon a4ff089b2a Fix pyflakes error in test zkey_import_export. 2018-06-22 11:34:21 -07:00
Simon e56117f894 Closes #3328. Send alert to put non-Overwinter nodes into safe mode.
The alert targets nodes running protocol version <= 170004.
Overwinter compatible nodes run protocol version >= 170005.
2018-06-22 09:07:12 -07:00
Simon 268e5dfa50 Return optional for Sapling commitments and nullifiers.
Unlike Sprout, they are not always computable in Sapling.
2018-06-12 14:40:17 -07:00
Simon d17f8d1cc7 Refactor and replace factory method random() with constructor. 2018-06-12 14:37:15 -07:00
Simon 36e2e7cc32 Add SaplingNote class and test_sapling_note unit test. 2018-06-12 14:37:05 -07:00
Simon 10a7d55a03 Remove now redundant Rust call to librustzcash_xor. 2018-06-06 23:24:21 -07:00
Simon c290f8f263 Update release height to block 332000. 2018-05-24 23:09:02 -07:00
Simon 47db75426f Closes #3301. Non-void function should not have empty definition. 2018-05-23 21:04:51 -07:00
Simon f9840089db Part of #3277. Add comment about deprecated txdb prefixes. 2018-05-23 20:37:34 -07:00
Simon 5d0172d762 make-release.py: Updated release notes and changelog for 1.1.1-rc2. 2018-05-23 09:28:50 -07:00
Simon 57ef6fba29 make-release.py: Updated manpages for 1.1.1-rc2. 2018-05-23 09:28:49 -07:00
Simon d3ff27c0a6 make-release.py: Versioning changes for 1.1.1-rc2. 2018-05-23 09:27:59 -07:00
Simon 67f3577239 Closes #3250. Memo getter should return by reference, not by value. 2018-05-09 21:52:33 -07:00
Simon 54a872f0fa Fix undefined behaviour, calling memcpy with NULL pointer.
Identified as part of audit: Least Authority, Issue D.
2018-04-30 16:41:02 -07:00
Simon 9bd8f092c6 Closes #3178 by adding verbosity level improvements to getblock RPC.
This is a follow-up commit for d0a1d833520d120bb5a2ac4cf4192047af6afe24
found in PR #3095 in order to fix nits and add a test.
2018-04-30 11:51:59 -07:00
Simon bf911b3038 Tweaks to d0a1d83 to complete backport of Bitcoin PR #8704 2018-04-30 09:55:30 -07:00
Simon debf6af9f8 Move memo member varible from SproutNotePlaintext to BaseNotePlaintext.
Add memo() accessor to BaseNotePlaintext.
2018-04-26 15:05:30 -07:00
Simon d266f40393 Create class hierarchy for SproutNotePlaintext.
BaseNotePlaintext contains member variable for common attribute, value.
2018-04-26 15:05:30 -07:00
Simon 5020a93631 Refactoring: rename NotePlaintext --> SproutNotePlaintext
Also renames:
CNotePlaintextEntry --> CSproutNotePlaintextEntry
CUnspentNotePlaintextEntry --> CUnspentSproutNotePlaintextEntry
2018-04-26 15:05:30 -07:00
Simon 9354f8e568 Remove unused SproutNote variables. 2018-04-26 15:05:30 -07:00
Simon 5f4fa1a954 Add virtual destructor to SproutNote and BaseNote
Also add test to make sure default copy constructors are okay.
2018-04-26 15:05:30 -07:00
Simon 5d99e3e92f Refactoring: SproutNote member variable value moved to BaseNote.
All notes have a value, so the member variable has been moved to the
base class, and direct member access has been replaced with a getter.
2018-04-26 15:05:19 -07:00
Simon b230fe6836 Refactoring: Rename class libzcash::Note to libzcash::SproutNote. 2018-04-25 11:33:24 -07:00
Simon bef33bbc73 Refactoring: libzcash::Note is now a subclass of libzcash::BaseNote. 2018-04-25 11:33:16 -07:00
Simon a0c977ca61 Closes #3134 - Least Authority Issue E
CTxMemPool::check() does nothing when turned on, due to overflow.
2018-04-10 20:45:36 -07:00
Simon 61624ed05d Part of #2966, extending Sprout tests to other epochs.
This continues the work started in PR #3109.
2018-04-09 16:17:30 -07:00
Simon 6901d30830 Fix test to check for sanitized string from alertnotify.
If client version is 1.1.0-rc1, the alertnotify message will have
been sanitized and will show as 1.1.0rc1.
2018-04-04 21:55:20 -07:00
Simon 7cc423522f Bump MIT Licence copyright header. 2018-04-04 10:16:06 -07:00
Simon 2742b20833 Use range based for loop
Instead of iterating over 0 .. 1 and then deciding on an actual desired
value, use a range based for loop for the desired value.

Adapted from d0413c670b4e5dc79d5cc1bc35571fca745c9a24
Authored-by: René Nyffenegger <mail@renenyffenegger.ch>
2018-04-04 09:57:59 -07:00
Simon 09bf7d2d3c Upgrade OpenSSL to 1.1.0h 2018-03-29 23:05:17 -07:00
Simon d72c19a662 Closes #2910. Add z_listunspent RPC call. 2018-03-28 10:38:57 -07:00
Simon 8b15afd315 Closes #3110. Ensure user can see error message about absurdly high fees. 2018-03-27 10:23:24 -07:00
Simon 2b0783792b Update boost package URL to match official download url on boost.org 2018-03-27 09:39:06 -07:00
Simon 68cc953012 Part of #2966, extending Sprout tests to other epochs.
Tests updated:
- test_Get
- test_simple_joinsplit_invalidity
2018-03-26 16:22:37 -07:00
Simon bbcdabc28d Update boost to 1.66.0 2018-03-23 15:07:17 -07:00
Simon b740a99079 Remove local function wait_and_assert_operationid_status which is
now defined in the test framework for shared usage.
2018-03-16 17:16:22 -07:00