Commit Graph

1697 Commits

Author SHA1 Message Date
Jack Grigg afa0b29e62 Bump MSRV to 1.51.0
This is the MSRV for the orchard crate, which we will be depending on
soon.
2021-03-27 08:21:45 +13:00
str4d f234f0b496
Merge pull request #364 from str4d/release-0.5
Release 0.5.0
2021-03-26 19:27:00 +13:00
Jack Grigg 4ff0a81a7f zcash_client_sqlite 0.3.0 2021-03-26 19:01:04 +13:00
Jack Grigg acc650cc17 zcash_client_backend 0.5.0 2021-03-26 18:54:42 +13:00
Jack Grigg 813525f0b5 zcash_proofs 0.5.0 2021-03-26 18:53:42 +13:00
Jack Grigg 725699c76b zcash_primitives 0.5.0 2021-03-26 18:51:35 +13:00
str4d 60ffeb759f
Merge pull request #363 from nuttycom/doc/zcash_client_sqlite
Add docstrings for zcash_client_sqlite.
2021-03-26 18:48:12 +13:00
str4d 78f6432be6
zcash_client_sqlite: Minor tweaks to documentation 2021-03-26 18:47:59 +13:00
Kris Nuttycombe 88fbd9f423 Add docstrings for zcash_client_sqlite. 2021-03-25 22:22:45 -06:00
str4d a80fd59484
Merge pull request #362 from nuttycom/cleanup/zip_321_memobytes
Update ZIP 321 parsing to use the MemoBytes type.
2021-03-26 16:39:38 +13:00
Kris Nuttycombe f30502c5a2
Apply suggestions from code review
Co-authored-by: str4d <jack@electriccoin.co>
2021-03-25 21:24:24 -06:00
str4d dd15e5f431
Add missing doc link 2021-03-26 15:10:39 +13:00
Kris Nuttycombe fc3aa233e8 Update ZIP 321 parsing to use the MemoBytes type. 2021-03-26 14:47:15 +13:00
str4d 44e3176d5a
Merge pull request #361 from str4d/release-0.5-prep
Release 0.5 preparations
2021-03-26 14:45:26 +13:00
str4d d73483f5da
Minor fixes to documentation 2021-03-26 14:18:01 +13:00
Jack Grigg c3c7bd1d9c bech32 0.8 2021-03-26 13:31:20 +13:00
Kris Nuttycombe a0c441817a Documentation fixes in zcash_client_backend. 2021-03-25 18:26:57 -06:00
Jack Grigg 0166cb6487 cargo fmt 2021-03-26 13:10:46 +13:00
Jack Grigg cb631a58ba zcash_client_sqlite: Add no-change fixes to changelog 2021-03-26 10:12:10 +13:00
Jack Grigg 675048e52b Fix broken intra-doc links and lints 2021-03-26 10:07:20 +13:00
Jack Grigg 55e73d7910 Fix clippy lints 2021-03-26 10:07:20 +13:00
str4d 5e0e44a388
Merge pull request #354 from nuttycom/changelog/346_sapling_ivk
Add SaplingIvk newtype to changelogs.
2021-03-26 10:07:01 +13:00
str4d 1bea40de88
zcash_client_backend: Add ScanningKey trait to changelog 2021-03-26 10:06:30 +13:00
Kris Nuttycombe c41c71c514
Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2021-03-25 15:00:54 -06:00
Kris Nuttycombe 42f15a575e
Merge pull request #359 from str4d/356-create_spend_to_address-assumption
zcash_client_backend: Use correct output index for t-addr recipients
2021-03-25 07:58:53 -06:00
Kris Nuttycombe 9b1156bf49 Fix rustfmt complaint. 2021-03-25 07:40:02 -06:00
Jack Grigg 678f1b6734 zcash_client_backend: Make transparent output indexing resilient
It's cheap to scan all transparent outputs to find the output matching
a transparent recipient.
2021-03-25 21:53:47 +13:00
Jack Grigg 6f93530554 zcash_client_backend: Remove unnecessary type conversion 2021-03-25 21:45:40 +13:00
str4d 863be19a21
Merge pull request #360 from nuttycom/fix/225_no_change_spends
Retrieve nullifiers for all unconfirmed notes.
2021-03-25 17:31:41 +13:00
Kris Nuttycombe ebdd6cf976 Add SaplingIvk newtype to changelogs. 2021-03-24 18:39:21 -06:00
Kris Nuttycombe 309d83af57 Retrieve nullifiers for all unconfirmed notes.
Previously we were retrieving nullifiers for notes that were not
marked spent, but not checking against whether the spending
transaction had been included in a block.
2021-03-24 16:18:54 -06:00
str4d ebadc8c44c
Merge pull request #177 from str4d/175-memo-enum
Implement ZIP 302 memos
2021-03-25 10:24:43 +13:00
Jack Grigg cb6a993840 zcash_client_backend: Use correct output index for t-addr recipients
`create_spend_to_address` was originally written only for sending to
Sapling addresses. It was later amended to support sending to
transparent addresses, but the assumption about there being a Sapling
output was not removed. This was not an issue for most transactions
because there would be change, but in the case of a z->t transaction
with no change, `create_spend_to_address` would reliably panic.

This commit fixes the bug by setting the output index for transparent
recipients to 0. The `output_index` field of `SentTransaction` is also
documented to correctly reflect its dependency on the type of
`recipient_address`.
2021-03-24 19:01:35 +13:00
Jack Grigg 7c8b29e693 zcash_client_sqlite: Add test that exposes the no-change bug 2021-03-24 18:46:55 +13:00
Jack Grigg e122c3d974 Remove reference to ZIP 302 structured memos from changelog
We're removing those from the ZIP draft until they can be agreed upon.
2021-03-23 13:52:22 +13:00
Jack Grigg 46872e2590 Update changelogs with Memo changes 2021-03-18 10:00:27 +13:00
Kris Nuttycombe 334442c505 Address comments from review. 2021-03-17 09:21:10 -06:00
Jack Grigg 8a84203685 Remove Default impl from MemoBytes
Memo fields have two ways to encode an empty memo:

- 0xF6 followed by all-zeroes, encoding "there is no memo".
- All-zeroes, encoding the empty UTF-8 string.

In almost all cases you want the former, but users thinking about byte
slices may expect MemoBytes::default() to result in the latter. To
ensure clarity, we now require calling either MemoBytes::default() or
MemoBytes::from_bytes(&[]) to be explicit.

No such confusion exists for the Memo enum, because the two types are
visibly separated as different enum cases, and Memo::Empty makes sense
as the default.
2021-03-17 21:16:01 +13:00
Jack Grigg c7a3ef0e88 Split memo-handling into MemoBytes struct and Memo enum
The MemoBytes struct is a minimal wrapper around the memo bytes, and only
imposes the existence of null-padding for shorter memos. The only error
case is attempting to construct a memo that is too long. MemoBytes is
guaranteed to be round-trip encodable (modulo null padding).

The Memo enum implements the additional memo rules defined in ZIP 302,
interpreting the contents of a memo (for example, parsing it as text).
2021-03-17 21:05:50 +13:00
Jack Grigg 48f7ef84a4 Move Memo into zcash_primitives::memo 2021-03-17 19:58:40 +13:00
str4d 3a8e72936f
Merge pull request #353 from nuttycom/data_api/transactional_types
Make data access API write calls atomic.
2021-03-17 19:24:32 +13:00
Kris Nuttycombe 2b4951759c Fix welding rig intra-doc links. 2021-03-15 17:59:23 -06:00
Kris Nuttycombe 5a9b29a75a Address comments from code review. 2021-03-11 13:01:22 -07:00
Kris Nuttycombe 0e022f2283 Allow block scanning using either IVKs or FVKs. 2021-03-09 21:00:40 -07:00
Kris Nuttycombe 16289750e8 Remove WalletWrite::transactionally 2021-03-09 20:59:57 -07:00
Kris Nuttycombe a74cc8b231 Remove sqlite-specific data organization from data access api. 2021-03-09 20:59:57 -07:00
Kris Nuttycombe b5bbbb6f5a Factor out nullifier update from database actions in scan_cached_blocks 2021-03-09 20:59:57 -07:00
str4d c724ed1796
Merge pull request #347 from str4d/small-dep-updates
Small dependency updates
2021-03-06 04:47:06 +13:00
Jack Grigg 463e252af4 Fix more intra-doc links 2021-03-04 23:01:42 +00:00
Jack Grigg b5bbd52c68 clippy: Use matches! in place of if let .. else expression 2021-03-04 17:55:50 +00:00