-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for transparent-source-only (TEX) addresses #1257
Merged
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
2fae4bb
ZIP 320 implementation.
daira 0f3de63
Apply documentation suggestions from code review.
daira 549fe0b
In `reserve_next_n_ephemeral_addresses`, exclude addresses observed in
daira eb88461
Address review comment: `EphemeralIvk` should not implement `Incoming…
daira c6520cf
Change the protobuf schema to explicitly specify whether a `ChangeValue`
daira 2f521d7
If a change memo is supplied, it should not be used in the second step
daira 0f49dae
`mark_ephemeral_address_as_mined` now prefers setting `mined_in_tx` to
daira 637ae92
Add a migration test for the `ephemeral_addresses` migration.
daira 994f6ff
Change type of `n` in `reserve_next_n_ephemeral_addresses`.
daira 25f07da
Add a constraint on the range of `ephemeral_addresses(address_index)`.
daira e164b59
Move most ephemeral address index handling into helper functions in
daira 914acb5
Move most remaining code for wallet support of ephemeral addresses into
daira 745054b
`find_account_for_transparent_output` now searches unreserved ephemeral
daira 6b465b7
Document the mapping functions on `zcash_client_backend::wallet::Reci…
daira 4f43a01
Refactor transparent address metadata lookups. This is correct as-is but
daira 5a90fff
Factor out the conversion of the `diversifier_index_be` field in the
daira 7fb3557
Implement `WalletRead::get_transparent_address_metadata` for
daira 7d8a96f
Don't cache metadata between steps; it's not an important optimization.
daira bd6c9f3
Apply documentation suggestions from code review.
daira 0735390
Rename `amount` to `transfer_amount` in `send_multi_step_proposed_tra…
daira c926e7c
Filter ephemeral transparent `ChangeValue`s by `is_ephemeral()` as we…
daira ffb2ddf
`zcash_client_backend::fees::ChangeValue` is now an enum, allowing only
daira b778139
Refactor ephemeral output-related parameters to balance calculation.
daira 7a05b44
Make mutable inputs to closures in `create_proposed_transaction` expl…
daira 6471d4c
Don't assume that prior step outputs are ephemeral iff they are
daira ec4a6d0
Documentation improvements.
daira 81a2846
Simpler way to calculate `has_shielded_inputs`.
daira f0e5aab
Improve discrimination of proposal errors.
daira feabe6d
Remove complicated code to calculate the number of dust spends.
daira baccb43
Restore the logic to determine whether we are spending inputs that are
daira 9c082dc
`zcash_primitives::transaction::fees::zip317::FeeRule::non_standard` has
daira 3829663
Change note selection query to select notes > 5000 zats, not >= 5000 …
daira 25006ab
Documentation improvement from code review.
daira 3922d71
Change the type of `n` in `reserve_next_n_ephemeral_addresses` back t…
daira d32b7db
Remove `ChangeValue::new`. Also document `ChangeValue::is_ephemeral` as
daira 286439a
Define a constant `EphemeralParameters::NONE` instead of deriving `De…
daira bc38f2a
Document the `possible_change` parameter to `check_for_uneconomic_inp…
daira 7838c04
Make `ephemeral_parameters` and `EphemeralParameters::NONE` available
daira 14bdcde
We cannot spend prior outputs at all when "transparent-inputs" is not
daira 8636daa
Tiny simplification.
daira 01ff201
Minor changes responding to review comments.
daira b63ff5b
Rename `get_reserved_ephemeral_addresses` to `get_known_ephemeral_add…
daira e97da43
Refactoring to address review comments.
daira a01588b
Ensure that `mark_ephemeral_address_as_mined` correctly handles indices
daira 86428c4
Refactor `find_account_for_transparent_output` (now called
daira b48f627
Minor simplification in a test.
daira 6bc22f4
Documentation fixes and improvements.
daira 27ca6e4
Remove unneeded `impl SealedChangeLevelKey for EphemeralIvk`.
daira bda6451
Change `unwrap`s to `expect`s when constructing `NonHardenedChildIndex`.
daira 22b8cff
The `TxId` argument to `EphemeralAddressReuse` does not need to be op…
daira 9856a70
Simpler handling of a potential overflow.
daira 56aa348
Extend the `send_multi_step_proposed_transfer` test to check the beha…
daira aa43123
Use `EphemeralBalance` instead of `EphemeralParameters`
nuttycom dbb5eeb
Fix a potential crash related to varying behavior between change stra…
nuttycom 24b6d50
Apply suggestions from code review
nuttycom f8bedd8
Make ephemeral_addresses.address unique
nuttycom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Change type of
n
in reserve_next_n_ephemeral_addresses
.
Signed-off-by: Daira-Emma Hopwood <[email protected]>
- Loading branch information
commit 994f6ff3877527d458ab65e6fc33b1ee80f88304
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is 0 a valid value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no reason to exclude it; you're allocating 0 addresses which always succeeds. As it happens the current code relies on this toward the end of
create_proposed_transaction
: it doesn't bother to explicitly test whether there are any ephemeral addresses because the zero case just does the right thing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the calling code enforce that the number of addresses returned is equal to the number of addresses that was requested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nonblocking, but I really don't see why we need to allocate more than one at a time. It adds error cases that need to be handled; if the method only returned a single address, then we could make failure to generate the address an error; it would be able to return
Result<(TransparentAddress, TransparentAddressMetadata), Self::Error>
directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
You may be right, but it works as-is and I don't think it would be much of a simplification.