-
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
Factor sapling into a module that can be extracted to a separate crate. #351
Conversation
f5efa7c
to
6c8af37
Compare
e8e5158
to
315bcc7
Compare
315bcc7
to
de7b52f
Compare
Codecov Report
@@ Coverage Diff @@
## master #351 +/- ##
==========================================
+ Coverage 64.91% 64.92% +0.01%
==========================================
Files 73 72 -1
Lines 7171 7168 -3
==========================================
- Hits 4655 4654 -1
+ Misses 2516 2514 -2
Continue to review full report at Codecov.
|
2dc1ea3
to
8cbb274
Compare
8cbb274
to
33effb7
Compare
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.
ACK (including my fixup commit). I confirmed this PR is move-only.
@@ -4,7 +4,7 @@ use std::fmt::Debug; | |||
use zcash_primitives::{ | |||
consensus::{self, BranchId, NetworkUpgrade}, | |||
memo::MemoBytes, | |||
prover::TxProver, | |||
sapling::prover::TxProver, |
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.
I don't entirely agree with this refactor; TxProver
was intended to be a generic prover interface that handled whatever proofs were necessary. But currently in the orchard
crate we are inlining proof creation, so let's do this refactor for now and then figure out a common prover interface later.
ce8cf56
to
ab66b2d
Compare
ab66b2d
to
eefc516
Compare
* Update to librustzcash commit 139fc09f1028f0f2d073748dfca8529dbe98807b * Update to librustzcash commit 81c3b54b24cb4a402e70a13c79711edada583a1e * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - prep Cargo.toml * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - remove obsolete generic arguments * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - Remove JubJubEngine * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - Remove Jubjub Params * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - add new jubjub crate * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - change J:Fs to jubjub::Fr * Fix cargo.toml jubjub version * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - change edwards::Point<_, Unknown> to ExtendedPoint * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - change edwards::Point<_, PrimeOrder> to SubgroupPoint * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - change edwards::Point::zero() to ExtendedPoint::identity() * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - Remove fn is_small_order() in favor of ExtendedPoint::is_small_order() * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - FixedGenerators::ValueCommitmentValue -> VALUE_COMMITMENT_VALUE_GENERATOR * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - FixedGenerators::SpendingKeyGenerator -> SPENDING_KEY_GENERATOR * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - FixedGenerators::ProofGenerationKey -> PROOF_GENERATION_KEY_GENERATOR * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - FixedGenerators::ValueCommitmentRandomness -> VALUE_COMMITMENT_RANDOMNESS * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - Remove ToUniform, replace to_uniform with from_bytes_wide * Cargo.toml: Add bls12_381, format * librustzcash commit fdf06032e3d549cd31aae67eecbb8e4a6692d8d9 - pairing::bls12_381 -> bls12_381 * Add temporary phantom data to avoid too much unnecessary refactoring right away - we have plenty of errors to fix, but cargo is adamant this is more important for now * Replace .negate() with - operator * Replace .add() with + * Remove more unneeded generic arguments: PublicKey, PrivateKey, ValueCommitment, pedersen_hash * Replace .mul() with * * .is_small_order() -> is_small_order().into() to properly cast to bool * Add type annotations that the compiler is requesting * .to_xy() changed to .to_affine() * Fix typo to_bytes_wide * Add missing phantom * .write() to copy_from_slice/write_all * More type annotations * .read to from_bytes/read_exact * First pass of removing J from PublicAddress * Begin removing J trait from helper fns * Remove J trait from Sapling * Remove J from IncomingViewKey * Remove J from OutgoingViewKey * Remove J from ViewKeys * Remove J from SaplingKey * Remove J From Note * Finish removing J from PublicAddress * More J removals, mostly from tests * Begin removing J::Fr in favor of Scalar from some key fns * Remove J from MerkleNote * Remove J from MerkleNoteHash * Use Bls12 directly for groth16::Proof * Remove J from ReceiptProof * Remove J from ReceiptParams * Remove J from Witness * Remove J from SpendProof * Remove J from Transaction * Remove J from SpendParams * Remove J from ProposedTransaction * Remove J from test utils * Function renames, cm -> cmu/commitment * Update to now-separate libs * ff update: BitIterator deprecated in favor of .to_le_bits() * Another J removal from util fn * Update cargo.toml with update note * Use librustzcash Nullifier, implemented here: zcash/librustzcash#307 * Log commit in cargo.toml * Remove aes* patches from Cargo since we are now using versions still listed on crates.io * Update imports for zcash_primitives, mostly now under zcash_primitives::sapling: zcash/librustzcash#351 * Update deps; -wasm probably doesnt work atm. librustzcash commit: d50bb12a97da768dc8f3ee39b81f84262103e6eb * Dep updates; minor trait change for librustzcash 2ba80739710f2511b18b67a7f9e082d390427a00 * Minor change, dep upgrades to latest version of librustzcash * Update ironfish-rust-nodejs to latest version of librustzcash/ironfish-rust changes * Update ironfish-rust-nodejs to latest version of librustzcash/ironfish-rust changes * Remove now unneeded Sapling in many places, smattering of other lint fixes * Clippy pass * Downgrade to tagged release version 0.5 for testing * Remove unneeded deps from -wasm cargo * Remove unneeded pairing dep, use intended version of blake2 deps * Cargo cleanup and clippy fix * Update tarpaulin and add --avoid-cfg-tarpaulin to work around bug in pinned bitvec sub-dependency * Use forked bellman for performance * Alphabetize cargo deps * Remove hasher from Witness * Add initialize_sapling fn to explicitly load the sapling parameters * Update tests to use initializeSapling
Builds on #348