Make version group constants agree with master.#13
Closed
nuttycom wants to merge 247 commits into
Closed
Conversation
Adapted from Scalar::non_adjacent_form in curve25519-dalek.
The trait is implemented by default for u8 and u64, allowing pow_vartime to be used with both the byte encoding and limb representation of field elements.
Add binding signature only if needed
This enables BitIterator to be used with both the byte encoding and limb representation of scalars.
The ff::PrimeField::Repr associated type now has the minimal necessary bounds, which can be satisfied by a newtype around a byte array.
Remove ff::PrimeFieldRepr
The sqrt() function is now part of the Field trait. ff_derive returns an error on fields for which it does not support generating a square root function. Note that Fq6 and Fq12 in pairing::bls12_381 leave the function unimplemented. They will be dropped once the migration to the bls12_381 crate is complete. The equivalent structs in that crate are not exposed.
It is only used internally in the bls12_381 crate, and field extensions aren't exposed anywhere in the Zcash stack.
This enables generic code to reliably operate on the bits of an encoded field element, by converting them to and from a known (little) endianness. The BitAnd and Shr bounds on PrimeField are now removed, as users can perform these operations themselves as needed.
ff_derive still implements Ord and PartialOrd for the fields it implements, because pairing::bls12_381 internally assumes that those are implemented. Once we delete that implementation, we will remove the Ord and PartialOrd implementations from ff_derive.
The only places we don't use constant u64 limbs, we use PrimeField::char instead (except in a single test where we use a field element).
Now that PrimeField::ReprEndianness exists, users can obtain a known-endianness representation from the output of PrimeField::char (which is a PrimeField::Repr, and should return a representation with the same endianness as PrimeField::into_repr).
ff: More trait refactoring
Define the spend_hash, output_hash, sprout_hash circuit hashes as constants in the load_parameters function, so we don't have to take them as function arguments.
Co-authored-by: str4d <thestr4d@gmail.com>
…g-circuit-hashes Hard-code Sapling circuit hashes in zcash_proofs crate
Sized is always part of the prelude, and binding on std causes compilation issues for no-std crates.
The type Curve*::Engine::Fr is equivalent to Curve*::Scalar, making Engine a redundant associated type.
Release 0.3.0
Now that we have finished the large refactor, we can make subsequent refactoring changes within the individual crates, and propagate the changes into the Zcash crates via normal dependency updates.
Remove subtree crates
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
…able. Fix demo test compilation errors.
Author
|
Superseded by zcash#286 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.