Kris Nuttycombe
5d62b68d70
Merge pull request #756 from zcash/blockmeta_rewind_to_height
...
[#751 ] add support for rewind_to_height to FsBlockDb
2023-01-24 20:19:22 -07:00
Jack Grigg
7f970bb82f
Use `EphemeralSecretKey, EphemeralPublicKey, SharedSecret` types in APIs
2023-01-24 15:02:49 +00:00
Jack Grigg
87d0bd7db1
Refactor `sapling::Note`
...
Its internals are now private, and it stores a `PaymentAddress` (and by
extension the diversifier) instead of `g_d`.
2023-01-24 15:02:27 +00:00
Jack Grigg
42c332a7a8
Use `sapling::note::ExtractedNoteCommitment` type in APIs
2023-01-24 14:37:11 +00:00
Francisco Gindre
22351f46ee
Merge branch 'main' into blockmeta_rewind_to_height
2023-01-23 06:23:24 -03:00
Jack Grigg
49b1cb3e69
Bump MSRV for `zcash_primitives` and dependents to 1.60
...
The MSRVs of the component crates are left as-is, partly because our
dependencies don't require us to bump them, and partly because those
crates have no pending changes and are relatively stable. We also plan
to split the component crates out into a separate repository, where it
will be easier to have a separate MSRV.
Closes zcash/librustzcash#759 .
2023-01-19 23:48:24 +00:00
Francisco Gindre
7306b9d2a9
[ #751 ] add support for rewind_to_height to FsBlockDb
...
Closes #751
Ran `cargo fmt`
return the result as an error rather than unwrap
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-01-17 14:43:33 -03:00
Kris Nuttycombe
95cbc7abaf
Merge pull request #734 from zcash/sapling-type-safety
...
Improve Sapling type safety
2023-01-05 13:12:45 -07:00
str4d
268754d635
Merge pull request #747 from zcash/FsBlockDbError_display
...
Implement fmt::Display descriptions for FsBlockDbError
2023-01-04 08:15:39 +00:00
Francisco Gindre
015a585cfb
Implements fmt::Display descriptions for FsBlockDbError
...
Closes #742
Fix clippy errors
PR Suggestions. Make Displayed error messaged more readable to users
Revert clippy fixes in favor of rustfmt rules
Commit suggestion on `InvalidBlockstoreRoot`
Co-authored-by: str4d <jack@electriccoin.co>
PR Suggestion `MissingBlockPath`
Co-authored-by: str4d <jack@electriccoin.co>
PR Suggestion `InvalidBlockPath`
Co-authored-by: str4d <jack@electriccoin.co>
Run cargo fmt and fix issues
2023-01-03 14:59:52 -03:00
Dimitris Apostolou
500c8f657d
Fix typo
2022-12-31 13:03:24 +02:00
Kris Nuttycombe
125d2bc3d5
Merge pull request #727 from nuttycom/test/shield_transparent_funds
...
Add `shielding_threshold` argument to `shield_transparent_funds`.
2022-12-15 13:11:55 -07:00
Kris Nuttycombe
95e8a67a5f
Merge pull request #731 from zcash/fsblockdb-errors
...
Improve `FsBlockDb` errors
2022-12-13 12:43:28 -07:00
Jack Grigg
a3e612e9de
zcash_client_sqlite 0.4.2
2022-12-13 05:31:40 +00:00
Jack Grigg
fee0b6a18d
Make Sapling transaction structs non-transparent
...
We instead provide getters for the struct fields.
2022-12-13 04:03:06 +00:00
Jack Grigg
6c984429fb
zcash_client_sqlite: Add error for missing FsBlockDB block files
2022-12-09 09:48:01 +00:00
Jack Grigg
3504d7031c
zcash_client_sqlite: Remove `*Error` suffixes from `FsBlockDbError` cases
2022-12-09 09:48:01 +00:00
Kris Nuttycombe
0f56f095c2
Add `shielding_threshold` argument to `shield_transparent_funds`.
...
Previously, the shielding threshold was fixed to 100000 zatoshis.
Fixes #726
2022-12-08 17:15:48 -07:00
Kris Nuttycombe
fff6983512
Replace a number of uses of `assert!(matches!(...))` with `assert_matches!(...)`
...
The remaining uses of `assert!(matches!(...))` are all in cases where
for some reason the `assert_matches` macro interferes with correct
type inference.
2022-12-08 12:17:14 -07:00
Kris Nuttycombe
be4c19d82e
Fix transparent balance error when the wallet is empty.
...
Fixes #724
2022-12-08 12:00:35 -07:00
Jack Grigg
9d50c0726e
zcash_client_sqlite 0.4.1
2022-12-06 08:19:14 +00:00
Jack Grigg
7e71cc5353
Add `tracing` spans to light client chain scanning
...
This enables downstream users to profile how much time is spent in each
of the main subcomponents of the current chain scanner.
2022-12-06 08:17:49 +00:00
Jack Grigg
86cef4158b
zcash_client_sqlite 0.4.0
2022-11-11 20:47:21 +00:00
Jack Grigg
98dd130f3a
zcash_client_backend 0.6.0
2022-11-11 20:47:21 +00:00
Jack Grigg
c03ef4926a
zcash_proofs 0.9.0
2022-11-11 20:39:36 +00:00
Jack Grigg
c3b6e5a72a
zcash_primitives 0.9.0
2022-11-11 20:37:55 +00:00
Jack Grigg
318d1b7522
Clean up changelogs
2022-11-11 20:29:26 +00:00
Kris Nuttycombe
fa8f5771cc
Upgrade to schemer-rusqlite version 0.2.1
2022-11-10 19:12:38 -07:00
Kris Nuttycombe
73ab884073
Implement ZIP 317 fee estimation, calculation, & change selection
2022-11-10 15:30:13 -07:00
Kris Nuttycombe
847ba49761
Add dust note detection to change selection.
...
The change selection algorithm has the most useful information for
determining whether or not a note is dust, so this adds a new error case
to `ChangeError` that allows the change selection to report the presence
of input notes without economic value back to its caller.
2022-11-10 12:18:30 -07:00
Kris Nuttycombe
9a7dc0db84
Add traits for fee estimation and input selection
...
This adds a set of abstractions that allow wallets to provide
independent strategies for fee estimation and note selection, and
implementations of these strategies that perform these operations in the
same fashion as the existing `spend` and `shield_transparent_funds`
functions.
This required a somewhat hefty rework of the error handling in
zcash_client_backend. It fixes an issue with the error types whereby
callees needed to have a bit too much information about the error
types produced by their callers.
Reflect the updated note selection and error handling in zcash_client_sqlite.
2022-11-10 12:17:59 -07:00
Kris Nuttycombe
cd29022233
Test spending of change notes.
2022-11-04 13:42:11 -06:00
str4d
c5d8484f19
Merge pull request #688 from nuttycom/wallet/spend_internal_notes
...
Correctly construct outputs when spending internal notes.
2022-11-04 01:34:56 +00:00
Kris Nuttycombe
c0abaa4727
Merge pull request #693 from nuttycom/wallet/skip_unmined_tx_in_migrations
...
Fix a bug in migrations when transaction block height is unknown.
2022-11-03 19:29:03 -06:00
Kris Nuttycombe
77efc18dd9
Fix a bug in migrations when transaction block height is unknown.
...
Un-mined transactions cannot currently be migrated to retroactively
store fee information, because the encoding used to persist them is unknown.
2022-11-03 18:54:53 -06:00
Kris Nuttycombe
b68d37a0b1
Use DiversifiableFullViewingKey instead of ExtFVK where possible.
2022-11-03 18:44:45 -06:00
Jack Grigg
587e1fa60b
Fix clippy lints related to `prost` API usage
2022-11-03 05:02:39 +00:00
Jack Grigg
379b703e6b
zcash_client_backend: Switch from `protobuf 2` to `prost 0.11`
...
The latter is maintained by the Tokio developers, and has easy
integration with the `tonic` gRPC library which is actively maintained.
2022-11-02 06:21:38 +00:00
Jack Grigg
3720b45feb
Categorise dependencies in `Cargo.toml` files
...
This should make it easier to upgrade dependencies in future.
2022-11-01 09:02:54 +00:00
Jack Grigg
a0016588ac
Remove unused dependencies
...
Some were only used by tests, others weren't used at all.
2022-11-01 09:02:27 +00:00
Francisco Gindre
60c153930d
get_transparent_balances fails with `no such column`
...
Error message:
"Error while fetching transparent balances for AccountId(0): no such column: u.received_by_accountt"
Closes #686
2022-10-26 19:09:36 -03:00
Kris Nuttycombe
334383f363
Allow shielding from multiple taddrs within a single transaction.
2022-10-25 13:17:21 -06:00
Kris Nuttycombe
efa95fcb39
Add `get_transparent_balances` to data api.
2022-10-25 12:53:54 -06:00
Kris Nuttycombe
8cb16d878e
Require a source transparent address to shield transparent funds.
...
Previously, `shield_transparent_funds` was only shielding funds
associated with the legacy default transparent address. This meant
that transparent funds sent to unified addresses could not reliably
be shielded, as a unified address will frequently be constructed
using a diversifier index greater than zero.
This modifies the `get_transparent_receivers` method to return address
metadata containing the account ID and diversifier index used to derive
each address along with the receiver.
2022-10-25 12:53:54 -06:00
Kris Nuttycombe
e13459bd31
Allow insertion of UTXOs associated with the legacy taddr.
...
The legacy transparent address is never added to the `addresses` table,
but we still need to be able to receive UTXOs sent to that address. So,
we add a special case for when a UTXO matches that legacy address, and
set the account ID to 0 manually.
2022-10-24 17:32:30 -06:00
Sean Bowe
bd7f9d7c3c
Bump zcash_encoding and zcash_address crate versions to 0.2.
2022-10-19 16:51:59 -06:00
Kris Nuttycombe
5bf36989e2
Fix beta clippy complaints.
2022-10-19 13:35:51 -06:00
Sean Bowe
176e21b015
Update zcash_primitives to orchard 0.3; release zcash_primitives and zcash_proofs 0.8.
2022-10-19 13:32:51 -06:00
Kris Nuttycombe
c773ea3b3e
Make the internals of `WalletTransparentOutput` private.
2022-10-14 12:38:55 -06:00
Kris Nuttycombe
69791af92c
Mark our utxos spent when we detect them as inputs to a transaction.
...
This modifies `decrypt_and_store_transaction` to check for inputs
to a transaction being decrypted that correspond to utxos known
to our wallet. For each such UTXO found, it is marked spent.
2022-10-14 10:40:43 -06:00