Kris Nuttycombe
cf0c3ea90f
Relax RngCore type constraints.
...
The intent of this change is to permit tests to use deterministic
random sources, rather than cryptographically strong ones.
2020-12-14 13:44:05 -07:00
str4d
c289cf9d4b
Merge pull request #304 from nuttycom/zip_tze-cargo-feature-flag
...
Use rust feature flagging to allow conditionally enabling TZE-related code.
2020-12-14 15:23:58 +00:00
Kris Nuttycombe
c24f663e40
Use methods on sigversion to gate ZIP-243 and TZE signature parts.
2020-12-14 14:54:29 +00:00
Kris Nuttycombe
790071953c
Use rust feature flagging to allow conditionally enabling TZE-related code.
...
This also uses the test-dependencies feature flag for conditional
inclusion of proptest-related modules which may be used by
dependent crates for generation of samples in testing.
2020-12-14 14:54:12 +00:00
str4d
debd5e6f5c
Merge pull request #314 from daira/txid-hashing
...
zcash_primitives: hash the transaction as it is read, rather than hashing a re-serialization
2020-12-05 00:19:26 +00:00
Daira Hopwood
62675f4b4f
Use the SHA-256d HashReader and HashWriter for transaction hashing.
...
This hashes the transaction as it is read, rather than hashing a re-serialization.
Co-authored-by: Jack Grigg <str4d@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-03 21:22:58 +00:00
Daira Hopwood
1f18da239f
Add HashReader and HashWriter for SHA-256d.
...
Co-authored-by: Jack Grigg <str4d@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-03 21:22:58 +00:00
Kris Nuttycombe
e96578195a
Not sure how this happened.
2020-12-03 10:10:37 -07:00
Kris Nuttycombe
4e608216c1
Do not create nested transaction in rewind_to_height
...
Fixes #321
2020-12-02 14:36:56 -07:00
Kris Nuttycombe
d77784eba8
Do not update `is_change` in received_notes with null values.
...
Fixes #322
2020-12-02 13:16:02 -07:00
Kris Nuttycombe
7ac08631b9
Fix doctest imports.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
cf2dae8af0
Add hrp_sapling_extended_spending_key to Parameters trait.
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
ee0e059eb3
Add coin_type to consensus parameters.
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
2e2f34b033
Use named_params macro for query_and_then_named (less error-prone)
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
25b5fc965f
Fix broken empty_database_has_no_balance test
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
903ef58ec6
Fix transactionality in rewind_to_height
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
8de05f3429
Move transact.rs to wallet module.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
8967745c22
Push chain & wallet functionality down to child modules.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
22ef05239c
Split init module into chain and wallet-related parts.
2020-12-02 09:46:17 -07:00
Kris Nuttycombe
a181203179
Move related functions into the same modules.
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
str4d
7ced7f3c56
Merge pull request #315 from gmale/zip-313-impl
...
ZIP 313 Implementation
2020-11-24 02:10:17 +00:00
Jack Grigg
936b399599
Fix remaining tests after default fee change
2020-11-24 01:50:47 +00:00