Kris Nuttycombe
88d58aac0a
Move relevant utils into sapling module.
2021-03-27 16:18:21 +13:00
Kris Nuttycombe
16948d9d78
Move zcash_primitives::prover to sapling module
2021-03-27 16:18:21 +13:00
Jack Grigg
38f7a0330c
Fix various clippy lints
...
The remainder will be fixed after the refactor PRs are merged.
2021-03-27 08:50:40 +13:00
Jack Grigg
9d9c0579f8
Use new name for broken_intra_doc_links lint
...
We also add the lint to crates in the workspace that didn't have it.
Closes zcash/librustzcash#279 .
2021-03-27 08:27:17 +13:00
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
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
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
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
675048e52b
Fix broken intra-doc links and 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
Kris Nuttycombe
ebdd6cf976
Add SaplingIvk newtype to changelogs.
2021-03-24 18:39:21 -06: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
46872e2590
Update changelogs with Memo changes
2021-03-18 10:00:27 +13: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
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
Jack Grigg
463e252af4
Fix more intra-doc links
2021-03-04 23:01:42 +00:00
Jack Grigg
464b533937
Bump MSRV to 1.47.0
...
We'll be needing it shortly for ff et al.
2021-03-04 17:32:57 +00:00
Jack Grigg
5431e1ef6b
nom 6.1
2021-03-04 17:03:41 +00:00
Jack Grigg
5242718b8f
bs58 0.4
2021-03-04 17:03:14 +00:00
Jack Grigg
d510eb50fd
base64 0.13
2021-03-04 17:02:34 +00:00
str4d
36e4b0d51a
Merge pull request #329 from nuttycom/ivk_payment_addresses
...
Introduce SaplingIvk newtype & use IVKs where possible.
2021-03-04 07:04:05 +13:00
Jack Grigg
1f6f45bbe7
Add details of unreleased changes to changelogs
2021-02-22 16:59:07 +00:00
str4d
9f14c757e6
Merge pull request #340 from str4d/changelogs
...
Add changelogs to the crates
2021-02-14 02:34:20 +13:00
Kris Nuttycombe
f0f4f58b2b
Fix generation of zip321 URIs for proptest to avoid generating invalid ones.
2021-02-04 08:32:00 -07:00
Jack Grigg
bd3e18984c
Changelogs: s/project/library
2021-02-04 15:16:32 +00:00
Jack Grigg
b5c7d7f1e7
Add changelogs to the crates
...
The changelogs are accurate for the 0.4.0 release tag, but don't yet
include changes before or after that tag.
2021-02-04 15:13:22 +00:00
Kris Nuttycombe
1cc7949518
Rename CommitmentTree::new -> CommitmentTree::empty
2021-02-04 07:49:48 -07:00
Kris Nuttycombe
98530184c0
Fix clippy complaints.
2021-02-03 14:27:31 -07:00
Kris Nuttycombe
7a57aee530
Introduce SaplingIvk newtype & use IVKs where possible.
...
This includes making it possible to obtain a payment address from just the IVK + diversifier.
2021-02-02 15:27:13 -07:00
Kris Nuttycombe
5cb48fa962
Fix documentation of get_received_note
2021-02-02 13:16:16 -07:00
Kris Nuttycombe
df09877b11
Use an enum to distinguish between sent and received notes in sqlite backend.
2021-01-20 10:51:27 -07:00
Kris Nuttycombe
7f43b05e21
Update protobuf dependency version.
2021-01-19 13:01:51 -07:00
Kris Nuttycombe
779a5670e0
Improve data access api method documentation.
2021-01-19 12:45:55 -07:00
Kris Nuttycombe
f8ce44ff0b
Add convenience method for CompactSpend -> Nullifier.
2021-01-19 10:09:36 -07:00
Kris Nuttycombe
8fe6f0fdfd
Remove default get_balance method.
...
Recommended by @str4d
2021-01-19 08:25:10 -07:00
Kris Nuttycombe
8e8ed2bb4f
Rename get_verified_balance -> get_balance_at
2021-01-15 12:00:14 -07:00
Kris Nuttycombe
c70a9ed81f
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: str4d <thestr4d@gmail.com>
2021-01-15 11:57:58 -07:00
Kris Nuttycombe
f59124ce19
Pass account ID with IVK.
2021-01-15 10:18:43 -07:00
Kris Nuttycombe
120ee25e1d
Fix argument to decrypt_and_store_transaction
2021-01-15 10:02:24 -07:00
Kris Nuttycombe
da8b7bdb8f
Work around doctest sqlite IO errors.
2021-01-13 16:14:26 -07:00
Kris Nuttycombe
a3f9fa788d
Update data_api doctests for error handling changes.
2021-01-13 15:43:39 -07:00
Kris Nuttycombe
5a21580f13
Correct the hierarchy of errors.
2021-01-13 15:20:11 -07:00
Kris Nuttycombe
aa72e070ce
Fix MockWalletDB
2021-01-12 21:51:08 -07:00
Kris Nuttycombe
6c6b05fa9b
Trivial rename.
2021-01-12 21:32:46 -07:00
Kris Nuttycombe
1a0301d122
Update zcash_client_backend/src/data_api/chain.rs
...
Co-authored-by: str4d <thestr4d@gmail.com>
2021-01-12 21:14:40 -07:00
Kris Nuttycombe
37b82e1c3b
Update zcash_client_backend/src/data_api.rs
2021-01-12 21:12:28 -07:00
Kris Nuttycombe
ce06db197a
Rustfmt.
2021-01-12 21:10:34 -07:00
Kris Nuttycombe
db9eb29eba
Merge remote-tracking branch 'upstream/master' into data_access_api
2021-01-12 21:09:40 -07:00
Kris Nuttycombe
fd3468b4f5
Remove unnecessary map_err's
2021-01-12 20:53:09 -07:00
Kris Nuttycombe
011eda364f
Add get_spendable_notes method to WalletRead
2021-01-12 20:42:04 -07:00
Kris Nuttycombe
48f226f8b5
Move decoding errors to sqlite crate.
...
Also move dependency on params out of wallet read/write methods.
The result is cleaner because these parameters are only required
for backend-specific encoding and decoding operations.
2021-01-12 20:07:02 -07:00
Kris Nuttycombe
5927e32059
Document error types.
2021-01-12 14:59:42 -07:00
Kris Nuttycombe
ca4567b275
More data api documentation.
2021-01-12 13:55:22 -07:00
Kris Nuttycombe
34bc655f64
Add MockBlockSource and MockWalletDB
...
These can readily be made into an in-memory wallet implementation.
2021-01-12 12:55:24 -07:00
Jack Grigg
10f5dddb79
zcash_client_backend: Fix testnet bug in diversify-address example
...
I misunderstood the meanings of Err(_) vs Ok(None), which indicates that
we need to refactor this API! In the meantime, this enables the example
to work with testnet Sapling viewing keys.
2021-01-12 12:59:04 +00:00
Kris Nuttycombe
7d92150965
Fix test compilation with WalletWrite changes.
2021-01-11 18:13:40 -07:00
Kris Nuttycombe
aad2e174c1
Consistently use nullifier and AccountId newtypes.
2021-01-08 21:49:38 -07:00
Kris Nuttycombe
27d7b6c569
A few doc updates.
2021-01-08 18:08:02 -07:00
Kris Nuttycombe
56adbbb545
Make `WalletWrite` depend upon `WalletRead`.
2021-01-08 12:49:10 -07:00
Jack Grigg
258e3d31ad
zcash_client_backend: Add example to generate diversified addresses
2021-01-08 16:08:03 +00:00
Kris Nuttycombe
7ac08631b9
Fix doctest imports.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
1fd74d0a71
Improve naming for wallet/block database connections.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
897a70dd9e
Simplify block source & clean up chain validation.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
8a215d67fe
Improve wallet "database" trait names.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
b2cc240454
Do not require wallet database for chain scan.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
e6de7c07f0
Use <module_name>.rs instead of <module_name>/mod.rs
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
f742895118
Fix test/doctest errors.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
c60b9d3ece
Remove database initialization calls from common API.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
4c2cda48e6
Clean up transactional API.
...
This API is still somewhat unsafe in that it doesn't inhibit nested
transactions, but it's better than it was.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
cd2729bbd0
Move 'create_spend_to_address' to wallet backend.
...
This required changing a bit about the relationship between
database errors and wallet errors, and opens up the possibility
of now simplifying the error situation a bit.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
e144015558
Reuse sent note insertion for wallet/transact.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
68737dd1dd
Remove duplicate method.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
eab2951c99
Move decrypt_and_store_transaction to zcash_client_backend
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
0165ae7003
Minor renamings.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
746c4c9a00
Move scan_cached_blocks out of sqlite crate.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
d16c124ffe
Abstract over data access in scan_cached_blocks.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
06c1772692
Move traversal of cached blocks to CacheOps
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
604294dd9f
Factor out nullifier retrieval into data api.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
ffd503134d
Factor out witness retrieval from scan.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
499dcd2e6c
Add the remainder of sqlite/query.rs functions to the data API.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
56e6091876
Factor out `get_commitment_tree` from scan.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
d16c74725e
Extract get_extended_full_viewing_keys function.
...
This required a bit of generalization of the data_api error types.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
3eec6f8faa
Add get_balance, get_verified_balance to data api.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
70de11dd32
Add address retrieval.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
b72251ee28
Add accounts table initialization.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
724fbac33a
Add database initialization implementation.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
f3f3512068
Move get_target_and_anchor_heights to data_api.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
9874abfd6c
Implement chain validation & fix doctests.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
a437df191e
Initial skeleton of low-level database access API.
2020-12-02 09:46:17 -07:00
Jack Grigg
0bbcd8c408
Remove unnecessary imports
2020-10-30 13:22:46 +00:00
Kris Nuttycombe
b1c3f9d3f0
ZIP 321 Reference Implementation ( #294 )
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2020-10-15 14:03:40 +01:00
Kris Nuttycombe
a0a36eddfd
Merge remote-tracking branch 'upstream/master' into zip-tzes
...
Fix benchmark build issues.
2020-09-21 16:43:33 -06:00
Kris Nuttycombe
ab2d5bf603
Merge remote-tracking branch 'upstream/master' into zip-tzes
2020-09-21 10:08:05 -06:00
str4d
e0587e752b
Merge pull request #290 from str4d/273-remove-decryption-epk-subgroup-check
...
Take epk as a jubjub::ExtendedPoint for note decryption
2020-09-22 03:05:35 +12:00
Kris Nuttycombe
c7c39964ec
Use block.height() method instead of .into()
2020-09-18 10:55:29 -06:00
Kris Nuttycombe
90d8980162
Apply suggestions from code review
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-09-18 10:39:37 -06:00
Kris Nuttycombe
1ad9294933
Remove static determination of network state.
...
In the interest of making the library usable for both
testnet and mainnet without recompilation, static resolution
of network parameters has been replaced with a parameter passed
to the relevant functions. This also moves addres prefix constants
into the network parameters.
2020-09-17 10:34:42 -06:00
Kris Nuttycombe
efaba87681
Add newtype for block height.
2020-09-17 10:26:41 -06:00
Kris Nuttycombe
4bf6309c54
Update to non-yanked version of subtle crate.
2020-09-10 14:52:47 -06:00
Jack Grigg
192db29a25
Take epk as a jubjub::ExtendedPoint for note decryption
...
We don't need to check if epk is in the prime-order subgroup before we
trial-decrypt, which saves a third of the cost of trial-decrypting
outputs that are not ours.
2020-09-10 00:39:21 +01:00
Sean Bowe
d4cba74402
Version bump 0.4.0 for crates
...
Bumps zcash_proofs, zcash_primitives, zcash_client_backend to 0.4.0
Also bumps zcash_client_sqlite to 0.2.0
2020-09-09 14:41:19 -06:00
ebfull
c7e9523dce
Merge pull request #284 from str4d/259-ovk-none
...
zcash_primitives: Support ovk = ⊥ in note encryption
2020-09-09 14:32:57 -06:00
Jack Grigg
59e26a0c0f
bls12_381 0.3.1 and jubjub 0.5.1
2020-09-09 16:51:53 +01:00
Jack Grigg
46f17bd624
Bump protobuf dependencies
...
MSRV is now 1.44.1.
2020-09-09 00:32:16 +01:00
Jack Grigg
96bd59b942
Migrate to ff 0.8 and bellman 0.8
...
bellman 0.8 includes fixes for several performance regressions.
MSRV is now 1.44.0, matching the ff crate.
2020-09-09 00:27:51 +01:00
Jack Grigg
40e135783c
zcash_primitives: Support ovk = ⊥ in note encryption
...
Closes zcash/librustzcash#259 .
2020-08-28 21:17:16 +01:00
Jack Grigg
3f06d92eec
Depend on published versions of subtree crates
2020-08-27 23:25:20 +01:00
Jack Grigg
0a3752c088
zcash_client_backend 0.3.0
2020-08-23 16:23:53 +01:00
Jack Grigg
e25a7dacdf
zcash_primitives 0.3.0
2020-08-23 16:23:53 +01:00
Jack Grigg
d112add8a3
jubjub 0.4.0
2020-08-23 16:23:53 +01:00
Jack Grigg
5f99c52143
bls12_381 0.2.0
2020-08-23 16:23:53 +01:00
Jack Grigg
bdb42bcbc8
pairing 0.17.0
2020-08-23 15:31:09 +01:00
Jack Grigg
ee3e8fbfbb
group 0.7.0
2020-08-23 15:31:09 +01:00
Jack Grigg
55fa366730
ff 0.7.0
2020-08-23 15:31:09 +01:00
Jack Grigg
d15acf8acc
zcash_primitives: Rename Note::cm to Note::cmu
2020-08-21 18:35:04 +01:00
Jack Grigg
fdf06032e3
s/{pairing::bls12_381, zcash_primitives::jubjub}/{bls12_381, jubjub}
...
FINALLY.
2020-08-19 23:08:19 +01:00
Jack Grigg
bc8a839c61
Migrate to hex 0.4
2020-08-14 17:44:17 +01:00
therealyingtong
c3d89644e2
Revert SaplingNoteEncryption::new() API to take rng instead of esk
2020-08-06 12:47:35 +08:00
therealyingtong
4f22077cf6
Remove const activation heights from consensus.rs
2020-08-06 12:30:48 +08:00
therealyingtong
9970a8aefd
Hard-code NetworkUpgrade::Canopy in generate_random_rseed
2020-08-06 12:27:20 +08:00
therealyingtong
88072d64ec
Remove network cfg from zcash_client_backend and zcash_primitives
2020-08-06 11:35:05 +08:00
therealyingtong
2ed9b6f881
Refactor contextual random rseed generation into util method in zcash_primitives
2020-08-05 15:21:42 +08:00
therealyingtong
a25348dfba
Revert passing Parameters to methods
2020-08-05 12:47:29 +08:00
therealyingtong
74b2f0a79e
Pass height to decrypt_transaction()
2020-08-04 21:05:29 +08:00
therealyingtong
895e251793
Fix tests
2020-07-31 22:40:48 +08:00
therealyingtong
b537f0f712
Pass height to methods which encrypt or decrypt Sapling outputs
2020-07-31 12:39:39 +08:00
Jack Grigg
b1a2e8172d
zcash_client_backend: Add account to DecryptedOutput
2020-06-25 18:54:41 +12:00
Jack Grigg
5ff81049b4
Pin protobuf 2.14 until our MSRV passes 1.44.1
2020-06-24 19:45:27 +12:00
str4d
121231199c
Merge pull request #205 from str4d/taddr-encoding
...
Implement TransparentAddress encoding and decoding
2020-05-23 12:22:01 +12:00
Jack Grigg
2892cf94c1
Migrate to protobuf-codegen-pure 2.14
2020-05-22 18:55:46 +12:00
Jack Grigg
c597db59a6
ff: Rename PrimeField::into_repr -> PrimeField::to_repr
2020-05-02 18:55:13 +12:00
Jack Grigg
49f119fb03
ff: Remove PrimeFieldRepr trait
...
The ff::PrimeField::Repr associated type now has the minimal necessary
bounds, which can be satisfied by a newtype around a byte array.
2020-04-23 18:15:14 +12:00
Jack Grigg
932f1c9737
Implement TransparentAddress encoding and decoding
2020-03-26 08:55:54 +13:00
Sean Bowe
100878cd14
Version bump of all crates (except librustzcash)
2020-03-12 15:59:19 -06:00
François Garillot
865275e2a2
Correcting some trivial Rust option/iterator warts
2020-01-29 13:53:05 -08:00
Jack Grigg
d5ed684701
zcash_client_backend::decrypt_transaction
2019-11-27 15:45:13 +00:00
str4d
88e02329eb
Merge pull request #129 from adityapk00/regtest_constants
...
Add regtest constants
2019-11-13 13:54:55 +00:00
Jack Grigg
7fda177da8
Doc link fixes
2019-11-07 17:33:22 +00:00
Jack Grigg
bc35a62e10
Remove rand_os dependency
2019-10-31 18:57:52 +00:00
Jack Grigg
ac4acfa26e
Fix rand_os warning in tests
2019-10-31 16:36:54 +00:00
Aditya Kulkarni
4d290e7a32
Add regtest constants
2019-10-14 22:20:58 -07:00
Jack Grigg
e9f94119bc
Store witness inside WalletShieldedOutput
2019-10-09 14:12:30 +13:00
Jack Grigg
b44653e686
Move cmu and epk parsing onto CompactOutput struct
2019-10-09 14:12:30 +13:00
Jack Grigg
1e2bc7f65c
Test nullifiers in constant time
...
Checking for spent notes in a block is still not completely constant
time, due to filtering out negative results of the constant-time
comparison.
Part of #84 .
2019-10-09 14:12:27 +13:00
Jack Grigg
2bbd25b36b
Add prevHash field to CompactBlock
...
This enables basic verification of chain validity when CompactBlocks are
received without the full header.
2019-10-09 14:11:14 +13:00
Jack Grigg
b66ac11775
Update new witnesses with subsequent transactions in the same block
2019-10-09 14:11:14 +13:00
Jack Grigg
e746f7b6f9
Add tx index within block to WalletTx struct
2019-10-09 14:11:14 +13:00
Jack Grigg
3b9dfc1e0b
Detect change notes while scanning blocks
2019-10-09 14:11:14 +13:00
Jack Grigg
fb9e9bb12f
Check for spent notes while scanning blocks
2019-10-09 14:11:14 +13:00
Jack Grigg
2b71121681
Return the entire note and recipient address when scanning an output
2019-10-09 14:11:14 +13:00
Jack Grigg
f899ecfce5
Increment the commitment tree and witnesses while scanning blocks
2019-10-09 14:11:14 +13:00
Jack Grigg
591b1fc28f
Parse compact blocks to find wallet transactions
2019-10-09 14:11:12 +13:00
Jack Grigg
af7e263bcc
Build protobufs for compact formats
2019-10-09 14:09:41 +13:00
Jack Grigg
b0ba7fe4d2
zcash_client_backend 0.1.0
2019-10-08 17:43:33 +13:00
str4d
39971891d5
Merge pull request #131 from str4d/119-key-encoding-tests
...
Unit tests for key encodings
2019-10-08 13:48:05 +13:00
Jack Grigg
e7b5329e95
Unit tests for key encodings
...
Closes #119 .
2019-09-24 17:47:10 +01:00
Jack Grigg
4ad3988e43
Crate docs
2019-09-24 14:23:59 +01:00
Jack Grigg
7f3036d2c8
Update READMEs
2019-09-24 14:23:55 +01:00
Jack Grigg
1fbf38280e
Fix intra-doc links
2019-09-24 10:42:49 +01:00
Jack Grigg
d9a0b9c83f
CI: Check intra-doc links
...
Credit: https://twitter.com/tomaka17/status/1176017851410526208
2019-09-24 10:35:12 +01:00
Jack Grigg
1d02363752
Add READMEs to Cargo.toml files
...
This will cause crates.io to render each crate's README as its
information page.
2019-09-23 14:42:38 +01:00
Jack Grigg
450087e280
Add test for spending_key panic on short seed
2019-09-17 23:58:14 +01:00
Jack Grigg
9377b78b35
Panic if spending_key is given a seed shorter than 32 bytes
...
This enforces the MUST requirement in ZIP 32. A panic is used instead of
an error because this should be considered an implementation error.
Ideally the type system would prevent this from occurring at all.
Closes #125 .
2019-09-17 21:28:23 +01:00
Jack Grigg
abbd43ff57
Make pk_d validity an invariant of PaymentAddress
...
Introduces a PaymentAddress::from_parts constructor, and getters for
the diversifier and pk_d fields (which are now private).
2019-09-04 19:48:35 -04:00
Jack Grigg
86142d044c
PaymentAddress::to_bytes
2019-09-04 19:46:46 -04:00
Jack Grigg
73ee19239c
Replace manual address decoding with PaymentAddress::from_bytes
2019-09-04 19:46:46 -04:00
Eirik Ogilvie-Wigley
a7c5993597
cargo fmt
2019-08-15 10:41:48 -06:00
Jack Grigg
5fb9b86ba0
Move Jubjub, Pedersen hash and primitives into zcash_primitives
2019-08-14 10:47:22 +01:00
Jack Grigg
ec321382e1
Upgrade to bech32 0.7
2019-08-14 01:12:25 +01:00
Jack Grigg
6f9083b5ab
Migrate to rand 0.7
2019-07-19 00:47:40 +02:00
Jack Grigg
b0913afdd7
Migrate remaining crates to rand_core 0.4
2019-07-19 00:46:37 +02:00
Jack Grigg
ccf75c39c1
Migrate remaining crates to rand 0.5
2019-07-19 00:35:06 +02:00
Jack Grigg
a3a9ee2682
Validate PaymentAddress diversifier when decoding
2019-07-02 00:07:48 +01:00
Jack Grigg
dd9c9ffa3f
Add encodings for ExtendedSpendingKey and ExtendedFullViewingKey
2019-06-27 16:21:32 +01:00
Jack Grigg
17f60a0354
Implement PaymentAddress encoding and decoding
2019-06-27 16:21:00 +01:00
Jack Grigg
81b2b1b554
Wallet spending key derivation path
2019-06-27 16:19:33 +01:00
Jack Grigg
fae919ec1c
Rename zcash_wallet to zcash_client_backend, set to 2018 edition
2019-06-27 16:02:12 +01:00