Skip to content

Make version group constants agree with master.#13

Closed
nuttycom wants to merge 247 commits into
str4d:zip-tzesfrom
nuttycom:zip-tzes
Closed

Make version group constants agree with master.#13
nuttycom wants to merge 247 commits into
str4d:zip-tzesfrom
nuttycom:zip-tzes

Conversation

@nuttycom
Copy link
Copy Markdown

@nuttycom nuttycom commented Jun 5, 2020

No description provided.

str4d and others added 30 commits March 26, 2020 08:55
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.
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).
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.
str4d and others added 10 commits August 23, 2020 16:23
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.
@nuttycom
Copy link
Copy Markdown
Author

nuttycom commented Sep 1, 2020

Superseded by zcash#286

@nuttycom nuttycom closed this Sep 1, 2020
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.

10 participants