Skip to content
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

zcash_client_backend: Move min_confirmations into Proposal #1019

Merged
merged 2 commits into from
Oct 31, 2023

Conversation

nuttycom
Copy link
Contributor

@nuttycom nuttycom commented Oct 12, 2023

Builds upon #1018

This fixes an API issue whereby it was possible to execute a Proposal
with a different value of min_confirmations than that with which the
Proposal was constructed.

@nuttycom nuttycom added the C-tech-debt Category: Technical debt that needs to be paid off label Oct 12, 2023
@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Files Coverage Δ
zcash_client_backend/src/data_api/wallet.rs 84.06% <100.00%> (-1.07%) ⬇️
zcash_client_sqlite/src/wallet/sapling.rs 77.55% <ø> (ø)
...ent_backend/src/data_api/wallet/input_selection.rs 62.22% <80.00%> (+0.50%) ⬆️

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@nuttycom nuttycom force-pushed the wallet/proposals_with_minconf branch 4 times, most recently from 4dbd6e7 to 0fb65a5 Compare October 26, 2023 21:25
@nuttycom nuttycom force-pushed the wallet/proposals_with_minconf branch from 0fb65a5 to c084174 Compare October 26, 2023 22:11
@nuttycom nuttycom requested review from str4d and daira October 27, 2023 04:01
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main changes in the PR LGTM.

@@ -81,12 +81,39 @@ pub struct Proposal<FeeRuleT, NoteRef> {
sapling_inputs: Vec<ReceivedSaplingNote<NoteRef>>,
balance: TransactionBalance,
fee_rule: FeeRuleT,
min_confirmations: NonZeroU32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this propagates the mistake I made in suggesting to use a NonZeroU32 for min_confirmations, when we actually need the ability to set this to zero for shielding transactions. Non-blocking because it just moves around the problem, and #873 is about fixing it.

zcash_client_sqlite/src/testing.rs Outdated Show resolved Hide resolved
zcash_client_sqlite/src/wallet/sapling.rs Outdated Show resolved Hide resolved
zcash_client_sqlite/src/wallet/sapling.rs Outdated Show resolved Hide resolved
@nuttycom nuttycom force-pushed the wallet/proposals_with_minconf branch from c084174 to e1892b7 Compare October 31, 2023 16:16
This fixes an API issue whereby it was possible to execute a `Proposal`
with a different value of `min_confirmations` than that with which the
`Proposal` was constructed.
@nuttycom nuttycom force-pushed the wallet/proposals_with_minconf branch from e1892b7 to 4cd26b7 Compare October 31, 2023 16:38
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@nuttycom nuttycom merged commit 13fb0a4 into zcash:main Oct 31, 2023
13 of 14 checks passed
@nuttycom nuttycom deleted the wallet/proposals_with_minconf branch October 31, 2023 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tech-debt Category: Technical debt that needs to be paid off
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants