Commit Graph

1320 Commits

Author SHA1 Message Date
ying tong 72cc8fc916
Minor refactor of enumeration in tests in note_encryption.rs
Co-authored-by: str4d <thestr4d@gmail.com>
2020-08-07 08:46:15 +08:00
ying tong 13f4d0844e
Avoid using unwrap() when calling derive_esk()
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-08-07 00:12:07 +08:00
therealyingtong d54fd09c5f
Add esk check in parse_note_plaintext_without_memo() and try_sapling_output_recovery() 2020-08-06 18:39:49 +08:00
therealyingtong 5480a376df
Extract derive_esk() into separate function 2020-08-06 18:21:27 +08:00
therealyingtong 7cee29bbcc
Use <P: consensus::Parameters> type for Builder impl 2020-08-06 18:12:15 +08:00
ying tong 0f8f1b3f5d
Fix parsing of rseed in parse_note_plaintext_without_memo() and try_sapling_output_recovery()
Co-authored-by: str4d <thestr4d@gmail.com>
2020-08-06 18:12:15 +08:00
ying tong 40a908e0a8
Refactor leadbyte_array in note_encryption tests
Co-authored-by: str4d <thestr4d@gmail.com>
2020-08-06 18:12:10 +08:00
therealyingtong 8968547981
Document pub enum Rseed<Fs> with link to ZIP 212 2020-08-06 13:13:49 +08:00
therealyingtong 878646855c
Switch on leadbyte instead of tx height when decrypting outputs 2020-08-06 12:57:48 +08: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 b05e257f79
Fix database queries in scan.rs and transact.rs 2020-08-06 12:00:49 +08:00
therealyingtong 44f46e50ce
Add <P: consensus::Parameters> type parameter to Builder struct 2020-08-06 11:43:07 +08:00
therealyingtong 88072d64ec
Remove network cfg from zcash_client_backend and zcash_primitives 2020-08-06 11:35:05 +08:00
therealyingtong d6deaddc0a
Only query last_height when needed in decrypt_and_store_transaction() 2020-08-05 16:09:41 +08:00
therealyingtong c8fcdeb50b
Minor changes in note_encryption.rs 2020-08-05 15:45:18 +08:00
therealyingtong 2ed9b6f881
Refactor contextual random rseed generation into util method in zcash_primitives 2020-08-05 15:21:42 +08:00
therealyingtong a3ae1b273d
Switch plaintext version on height for dummy outputs in Builder 2020-08-05 14:27:36 +08:00
therealyingtong d5f80618ef
Switch plaintext version on height in commit_to_address() in zcash_client_sqlite 2020-08-05 14:26:57 +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 0a47a9dbea
Pass rseed to Prover 2020-08-04 16:40:53 +08:00
therealyingtong b34e8b903c
Add invalid version byte tests for ZIP212 2020-08-03 13:51:45 +08:00
therealyingtong eba542c95f
Add activation heights as consts in consensus::Parameters 2020-08-03 13:40:39 +08:00
therealyingtong b1ddd556af
Check derived esk against claimed epk when decrypting note 2020-07-31 22:40:52 +08:00
therealyingtong 895e251793
Fix tests 2020-07-31 22:40:48 +08:00
therealyingtong 6904c8f933
Implement plaintext_version_is_valid() 2020-07-31 22:28:51 +08:00
therealyingtong eda00ec7ad
Pass esk to SaplingNoteEncryption::new and add generate_or_derive_esk() 2020-07-31 22:28:50 +08:00
therealyingtong 65504d9ca7
Add enum Rseed<E::Fs> to Note struct 2020-07-31 22:28:40 +08:00
therealyingtong b537f0f712
Pass height to methods which encrypt or decrypt Sapling outputs 2020-07-31 12:39:39 +08:00
therealyingtong 71d31abad6
Set activation heights for Canopy 2020-07-30 12:52:02 +08:00
str4d f55f094ef6
Merge pull request #248 from str4d/equihash-crate
Move Equihash verifier into equihash crate
2020-07-10 11:57:11 +12:00
Jack Grigg b5bd52e7a1 equihash 0.1.0 2020-07-10 10:25:52 +12:00
str4d d380a8c8d2
Merge pull request #246 from str4d/zcash_client_sqlite
zcash_client_sqlite crate
2020-07-10 10:22:37 +12:00
Jack Grigg 8c250ca3de zcash_sqlite: Add an unreliability warning to query::get_balance docs 2020-07-10 09:50:43 +12:00
Jack Grigg 8188fae779 zcash_client_sqlite: Implement outgoing viewing key policies
This enables an SQLite light client to specify whether recipient history
can be recovered from the block chain (and by what outgoing viewing key)
with per-transaction granularity.
2020-07-09 23:48:09 +12:00
Jack Grigg 1b059d4ae0 equihash: Remove unnecessary log dependency 2020-07-09 20:53:50 +12:00
Jack Grigg 72fbd2071d equihash: Clarify order of operations in indices_from_minimal 2020-07-09 20:51:52 +12:00
Jack Grigg 7740658084 equihash: Add additional constraints on Params
These are requirements of the general Equihash implementation, that are
satisfied by the Zcash parameters.
2020-07-09 20:50:58 +12:00
Jack Grigg 092ffc7373 equihash: Crate documentation 2020-07-08 17:34:52 +12:00
Jack Grigg bcd687cffb equihash: Remove iterative and recursive APIs
The canonical verification API from Heartwood activation is the
recursive API exposed through is_valid_solution. We retain
is_valid_solution_iterative internally for testing.
2020-07-08 15:22:38 +12:00
Jack Grigg 8759684fad equihash: Add parameter validity checks 2020-07-07 22:09:24 +12:00
Jane Lusby 997657f256
Move `error!` logs into proper error type (#14)
hey kid, want some error handling?
2020-07-07 21:00:53 +12:00
str4d 9768c7141d
Merge pull request #240 from therealyingtong/canopy-nu-parameters
Placeholders for Canopy network upgrade
2020-06-27 01:41:17 +12:00
Jack Grigg bbc3ec54c7 CI: Fetch and cache Sapling parameters for tests 2020-06-27 00:46:05 +12:00
Jack Grigg 9012672164 zcash_proofs: Add API for downloading the Sapling parameters
Includes an example that exposes the API as a binary.
2020-06-27 00:45:12 +12:00
Jack Grigg e910788e8e zcash_proofs: Extract default params folder logic 2020-06-27 00:45:12 +12:00
Jack Grigg 0a61db0317 Upgrade to rusqlite 0.23
Requires bumping the MSRV to 1.40.0 because libsqlite3-sys uses features
introduced in that version. remove_dir_all can similarly be unpinned.
2020-06-27 00:45:12 +12:00
Jack Grigg 5b2c71e112 Move Equihash verification APIs into equihash crate 2020-06-26 13:01:04 +12:00