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

Generalize Sapling note encryption to allow reuse with Orchard notes. #358

Merged
merged 24 commits into from
Apr 16, 2021

Conversation

nuttycom
Copy link
Contributor

@nuttycom nuttycom commented Mar 22, 2021

This builds upon #348, #351, and #357.

@nuttycom nuttycom requested review from daira and str4d March 22, 2021 21:05
@r3ld3v r3ld3v added this to the Core Sprint 2021-10 milestone Mar 22, 2021
@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch from b39c005 to c03de6c Compare March 23, 2021 18:22
@codecov
Copy link

codecov bot commented Mar 23, 2021

Codecov Report

Merging #358 (28a4502) into master (1b4aab0) will decrease coverage by 0.37%.
The diff coverage is 71.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #358      +/-   ##
==========================================
- Coverage   64.83%   64.46%   -0.38%     
==========================================
  Files          73       73              
  Lines        7161     7232      +71     
==========================================
+ Hits         4643     4662      +19     
- Misses       2518     2570      +52     
Impacted Files Coverage Δ
zcash_client_sqlite/src/wallet/transact.rs 99.13% <ø> (-0.02%) ⬇️
...h_primitives/src/transaction/components/sapling.rs 51.45% <31.25%> (-3.72%) ⬇️
zcash_client_backend/src/proto.rs 50.00% <36.36%> (-14.00%) ⬇️
zcash_primitives/src/transaction/builder.rs 56.60% <42.85%> (+0.11%) ⬆️
zcash_primitives/src/sapling.rs 67.97% <50.00%> (+1.30%) ⬆️
zcash_client_backend/src/welding_rig.rs 91.66% <66.66%> (-0.13%) ⬇️
components/zcash_note_encryption/src/lib.rs 69.31% <69.31%> (+69.31%) ⬆️
zcash_primitives/src/sapling/note_encryption.rs 75.97% <75.97%> (ø)
zcash_client_backend/src/data_api/wallet.rs 86.48% <100.00%> (-0.36%) ⬇️
zcash_client_sqlite/src/lib.rs 54.61% <100.00%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b4aab0...28a4502. Read the comment docs.

@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch 2 times, most recently from e68d57b to 2b1362b Compare March 25, 2021 00:35
@nuttycom nuttycom marked this pull request as ready for review March 25, 2021 00:37
@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch 2 times, most recently from bd378d9 to 3805a6d Compare March 27, 2021 14:43
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.

utACK mod comments.

zcash_primitives/src/sapling/note_encryption.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
rand_core = "0.5.1"

[dev-dependencies]
zcash_primitives = { version = "0.5", path = "../../zcash_primitives" }
Copy link
Contributor

Choose a reason for hiding this comment

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

These not-quite-circular dependencies make publishing a pain. I dealt with it for zcash_client_backend <-> zcash_client_sqlite for the 0.5 release by specifying a version range per rust-lang/cargo#4242 but it would be good to formalize this in the repo. Non-blocking, we can sort this out later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the zcash_client_backend issue, I'm planning to address that by making the tests just run against the in-memory backend once that's complete, and move the sqlite tests back to the sqlite crate. Here, I'm not sure what the best approach is; I guess we could move these tests to zcash_primitives and implement a set of tests here that just relies upon the note-encryption functionality without using Sapling.

components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch from ba9718b to 879eea8 Compare April 8, 2021 14:20
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/Cargo.toml Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
@nuttycom nuttycom requested a review from ebfull April 8, 2021 16:09
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.

Flushing comments.

components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Outdated Show resolved Hide resolved
components/zcash_note_encryption/src/lib.rs Show resolved Hide resolved
@r3ld3v r3ld3v removed this from the Core Sprint 2021-12 milestone Apr 12, 2021
@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch from b74d9d1 to f34e878 Compare April 12, 2021 23:41
@nuttycom nuttycom requested a review from str4d April 13, 2021 01:31
@str4d str4d added this to the Core Sprint 2021-14 milestone Apr 13, 2021
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.

utACK 12cb826

@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch from 0763d2b to 4c8ffd7 Compare April 14, 2021 15:48
@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch from 4c8ffd7 to 00d04de Compare April 14, 2021 21:39
@nuttycom nuttycom force-pushed the refactor/component_modules_2 branch from 2fee78d to b2b3efd Compare April 15, 2021 21:24
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 modulo one remaining comment (now resolved).

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.

utACK dc0f6e7

@str4d str4d merged commit 3b02c8b into zcash:master Apr 16, 2021
@nuttycom nuttycom deleted the refactor/component_modules_2 branch April 16, 2021 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants