Kris Nuttycombe
d65a3fe84f
Merge pull request #698 from nuttycom/wallet/schemer_update
...
Upgrade to schemer-rusqlite version 0.2.1
2022-11-10 20:25:18 -07:00
Kris Nuttycombe
fa8f5771cc
Upgrade to schemer-rusqlite version 0.2.1
2022-11-10 19:12:38 -07:00
Kris Nuttycombe
d8cedd28cc
Merge pull request #694 from nuttycom/wallet/zip_317
...
Add ZIP 317 fee calculation strategy.
2022-11-10 18:54:57 -07:00
str4d
796b5a4fed
ZIP 317: Improve code comments
2022-11-11 00:58:31 +00: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
str4d
6f4a6aa00c
Merge pull request #695 from nuttycom/fix_clippy_lints
...
Fix clippy complaints about generated protobuf code.
2022-11-05 00:15:47 +00:00
Kris Nuttycombe
6047c1d003
Merge pull request #696 from nuttycom/wallet/sapling_spend_internal_key
...
Spend internal Sapling notes with the internal Sapling spending key.
2022-11-04 14:16:15 -06:00
Kris Nuttycombe
fb8681adbb
Ignore clippy lints in generated protobuf modules.
2022-11-04 14:14:56 -06:00
Kris Nuttycombe
cd29022233
Test spending of change notes.
2022-11-04 13:42:11 -06:00
Kris Nuttycombe
18e61346cc
Spend internal Sapling notes with the internal Sapling spending key.
2022-11-04 13:27:23 -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
981d45e966
Documentation & changelog fixes.
2022-11-03 19:27:17 -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
cdfca848ea
Improve type safety of note commitment tree node construction.
2022-11-03 18:44:48 -06:00
Kris Nuttycombe
1be86b7a54
Derive the correct note when spending from a change address.
2022-11-03 18:44:48 -06:00
Kris Nuttycombe
b68d37a0b1
Use DiversifiableFullViewingKey instead of ExtFVK where possible.
2022-11-03 18:44:45 -06:00
str4d
d4f4f5ad91
Merge pull request #658 from nuttycom/wallet/builder_explicit_change
...
Update the transaction builder to make change outputs explicit
2022-11-04 00:42:31 +00:00
Kris Nuttycombe
28db1e324f
Update changelog.
2022-11-03 18:14:15 -06:00
Kris Nuttycombe
9c894ebf3e
Create per-protocol fees modules.
2022-11-03 15:07:14 -06:00
Kris Nuttycombe
c92d81b15d
Move the `TzeInput` trait to the `tze::components::builder` module
2022-11-03 09:57:36 -06:00
Kris Nuttycombe
37e78e1fe3
Expose less information about Sapling outputs to change calculation.
2022-11-03 09:56:50 -06:00
Kris Nuttycombe
1be97e9cef
Address comments from code review.
2022-11-03 09:56:08 -06:00
Jack Grigg
4d6e2bcf59
Merge pull request #642 from zcash/lightwalletd-grpc-bindings
...
zcash_client_backend: Add gRPC bindings behind feature flag
2022-11-03 05:32:29 +00:00
str4d
cfc8088d5f
Merge pull request #691 from zcash/prost
...
zcash_client_backend: Switch from `protobuf 2` to `prost 0.11`
2022-11-03 05:29:25 +00:00
Jack Grigg
587e1fa60b
Fix clippy lints related to `prost` API usage
2022-11-03 05:02:39 +00:00
Kris Nuttycombe
9496fc6118
Add fee calculator to the transaction builder.
...
This adds a fee calculation strategy abstraction that can be used to
dynamically compute fees so that the total fees required may be taken
taken into account during note selection, and also removes automatic
change creation from the transaction builder.
Change outputs must now be directly created by the caller by the caller.
This is a necessary prerequisite for permitting fees to adjust based
upon the contents of the transaction being constructed.
The initial implementation of the fee strategy simply uses the current
default fee.
2022-11-02 08:28:16 -06:00
Jack Grigg
17a4830c70
zcash_client_backend: Add gRPC bindings behind feature flag
...
The lightwalletd service file is sourced from:
Git: https://github.com/zcash/lightwalletd
Rev: ad5ecda5fbb5e12799f926b8cd785d54fdd250c8
Closes zcash/librustzcash#585 .
2022-11-02 06:22:02 +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
Kris Nuttycombe
df1cbbdd1d
Merge pull request #690 from zcash/dependency-refactor
...
Dependency refactor
2022-11-01 13:40:19 -06: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
0da4d27824
Merge pull request #687 from zcash/686_no-such-column
...
get_transparent_balances fails with `no such column`
2022-10-26 19:46:44 -03: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
4964ca7b92
Merge pull request #685 from nuttycom/wallet/upsert_legacy_addr_utxo
...
Allow insertion of UTXOs associated with the legacy taddr.
2022-10-25 14:26:43 -06: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
Kris Nuttycombe
277d07c79c
Merge pull request #684 from zcash/bump-some-versions
...
Bump versions for f4jumble, zcash_address, zcash_encoding and zcash_history crates
2022-10-19 17:56:46 -06:00
Kris Nuttycombe
373e69907f
Improve reason for yanking of the 0.8.0 version of `zcash_primitives`.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-10-19 17:53:50 -06:00
Sean Bowe
f588d0dbeb
Bump zcash_primitives version to 0.8.1 and yank 0.8.0.
2022-10-19 16:59:53 -06:00
Sean Bowe
bd7f9d7c3c
Bump zcash_encoding and zcash_address crate versions to 0.2.
2022-10-19 16:51:59 -06:00
ebfull
c34cacaae6
Merge pull request #683 from nuttycom/fix/zcash_history_changelog
...
This reverts a previous incorrect change to the changelog.
2022-10-19 16:10:52 -06:00
Kris Nuttycombe
9b8b9ed189
This reverts a previous incorrect change to the changelog.
...
The MSRV bump was actually in `zcash_history` 0.3.0, even though the
addition of that to the Cargo.toml file was post-0.3.0 release.
2022-10-19 16:05:04 -06:00
Kris Nuttycombe
4ed64e4820
Merge pull request #682 from nuttycom/fix/zcash_encoding_changelog
...
Fix changelog for `zcash_encoding`
2022-10-19 15:54:23 -06:00
Kris Nuttycombe
42fd3c1091
Fix changelogs for `zcash_encoding` and `zcash_history`
2022-10-19 15:52:42 -06:00
Kris Nuttycombe
ccb0444b6d
Merge pull request #681 from zcash/update-orchard
...
Update zcash_primitives to orchard 0.3; release zcash_primitives and zcash_proofs 0.8.
2022-10-19 14:50:51 -06:00