snarkvm_circuit_network::canary_v0

Struct AleoCanaryV0

Source
pub struct AleoCanaryV0;

Trait Implementations§

Source§

impl Aleo for AleoCanaryV0

Source§

fn initialize_global_constants()

Initializes the global constants for the Aleo environment.

Source§

fn encryption_domain() -> Field<Self>

Returns the encryption domain as a constant field element.

Source§

fn graph_key_domain() -> Field<Self>

Returns the graph key domain as a constant field element.

Source§

fn serial_number_domain() -> Field<Self>

Returns the serial number domain as a constant field element.

Source§

fn g_scalar_multiply(scalar: &Scalar<Self>) -> Group<Self>

Returns the scalar multiplication on the generator G.

Source§

fn commit_bhp256( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Field<Self>

Returns a BHP commitment with an input hasher of 256-bits.

Source§

fn commit_bhp512( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Field<Self>

Returns a BHP commitment with an input hasher of 512-bits.

Source§

fn commit_bhp768( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Field<Self>

Returns a BHP commitment with an input hasher of 768-bits.

Source§

fn commit_bhp1024( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Field<Self>

Returns a BHP commitment with an input hasher of 1024-bits.

Source§

fn commit_ped64( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Field<Self>

Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.

Source§

fn commit_ped128( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Field<Self>

Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.

Source§

fn commit_to_group_bhp256( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Group<Self>

Returns a BHP commitment with an input hasher of 256-bits.

Source§

fn commit_to_group_bhp512( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Group<Self>

Returns a BHP commitment with an input hasher of 512-bits.

Source§

fn commit_to_group_bhp768( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Group<Self>

Returns a BHP commitment with an input hasher of 768-bits.

Source§

fn commit_to_group_bhp1024( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Group<Self>

Returns a BHP commitment with an input hasher of 1024-bits.

Source§

fn commit_to_group_ped64( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Group<Self>

Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.

Source§

fn commit_to_group_ped128( input: &[Boolean<Self>], randomizer: &Scalar<Self>, ) -> Group<Self>

Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.

Source§

fn hash_bhp256(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 256-bits.

Source§

fn hash_bhp512(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 512-bits.

Source§

fn hash_bhp768(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 768-bits.

Source§

fn hash_bhp1024(input: &[Boolean<Self>]) -> Field<Self>

Returns the BHP hash with an input hasher of 1024-bits.

Source§

fn hash_keccak256(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>

Returns the Keccak hash with a 256-bit output.

Source§

fn hash_keccak384(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>

Returns the Keccak hash with a 384-bit output.

Source§

fn hash_keccak512(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>

Returns the Keccak hash with a 512-bit output.

Source§

fn hash_ped64(input: &[Boolean<Self>]) -> Field<Self>

Returns the Pedersen hash for a given (up to) 64-bit input.

Source§

fn hash_ped128(input: &[Boolean<Self>]) -> Field<Self>

Returns the Pedersen hash for a given (up to) 128-bit input.

Source§

fn hash_psd2(input: &[Field<Self>]) -> Field<Self>

Returns the Poseidon hash with an input rate of 2.

Source§

fn hash_psd4(input: &[Field<Self>]) -> Field<Self>

Returns the Poseidon hash with an input rate of 4.

Source§

fn hash_psd8(input: &[Field<Self>]) -> Field<Self>

Returns the Poseidon hash with an input rate of 8.

Source§

fn hash_sha3_256(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>

Returns the SHA-3 hash with a 256-bit output.

Source§

fn hash_sha3_384(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>

Returns the SHA-3 hash with a 384-bit output.

Source§

fn hash_sha3_512(input: &[Boolean<Self>]) -> Vec<Boolean<Self>>

Returns the SHA-3 hash with a 512-bit output.

Source§

fn hash_many_psd2(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>

Returns the extended Poseidon hash with an input rate of 2.

Source§

fn hash_many_psd4(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>

Returns the extended Poseidon hash with an input rate of 4.

Source§

fn hash_many_psd8(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>

Returns the extended Poseidon hash with an input rate of 8.

Source§

fn hash_to_group_bhp256(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 256-bits.

Source§

fn hash_to_group_bhp512(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 512-bits.

Source§

fn hash_to_group_bhp768(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 768-bits.

Source§

fn hash_to_group_bhp1024(input: &[Boolean<Self>]) -> Group<Self>

Returns the BHP hash with an input hasher of 1024-bits.

Source§

fn hash_to_group_ped64(input: &[Boolean<Self>]) -> Group<Self>

Returns the Pedersen hash for a given (up to) 64-bit input.

Source§

fn hash_to_group_ped128(input: &[Boolean<Self>]) -> Group<Self>

Returns the Pedersen hash for a given (up to) 128-bit input.

Source§

fn hash_to_group_psd2(input: &[Field<Self>]) -> Group<Self>

Returns the Poseidon hash with an input rate of 2 on the affine curve.

Source§

fn hash_to_group_psd4(input: &[Field<Self>]) -> Group<Self>

Returns the Poseidon hash with an input rate of 4 on the affine curve.

Source§

fn hash_to_group_psd8(input: &[Field<Self>]) -> Group<Self>

Returns the Poseidon hash with an input rate of 8 on the affine curve.

Source§

fn hash_to_scalar_psd2(input: &[Field<Self>]) -> Scalar<Self>

Returns the Poseidon hash with an input rate of 2 on the scalar field.

Source§

fn hash_to_scalar_psd4(input: &[Field<Self>]) -> Scalar<Self>

Returns the Poseidon hash with an input rate of 4 on the scalar field.

Source§

fn hash_to_scalar_psd8(input: &[Field<Self>]) -> Scalar<Self>

Returns the Poseidon hash with an input rate of 8 on the scalar field.

Source§

fn verify_merkle_path_bhp<const DEPTH: u8>( path: &MerklePath<Self, DEPTH>, root: &Field<Self>, leaf: &Vec<Boolean<Self>>, ) -> Boolean<Self>

Returns true if the given Merkle path is valid for the given root and leaf.

Source§

fn verify_merkle_path_psd<const DEPTH: u8>( path: &MerklePath<Self, DEPTH>, root: &Field<Self>, leaf: &Vec<Field<Self>>, ) -> Boolean<Self>

Returns true if the given Merkle path is valid for the given root and leaf.

Source§

const MAX_DATA_SIZE_IN_FIELDS: u32 = <Self::Network as console::Network>::MAX_DATA_SIZE_IN_FIELDS

The maximum number of field elements in data (must not exceed u16::MAX).
Source§

impl Clone for AleoCanaryV0

Source§

fn clone(&self) -> AleoCanaryV0

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AleoCanaryV0

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AleoCanaryV0

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Environment for AleoCanaryV0

Source§

fn zero() -> LinearCombination<Self::BaseField>

Returns the zero constant.

Source§

fn one() -> LinearCombination<Self::BaseField>

Returns the one constant.

Source§

fn new_variable(mode: Mode, value: Self::BaseField) -> Variable<Self::BaseField>

Returns a new variable of the given mode and value.

Source§

fn new_witness<Fn: FnOnce() -> Output::Primitive, Output: Inject>( mode: Mode, logic: Fn, ) -> Output

Returns a new witness of the given mode and value.

Source§

fn scope<S: Into<String>, Fn, Output>(name: S, logic: Fn) -> Output
where Fn: FnOnce() -> Output,

Enters a new scope for the environment.

Source§

fn enforce<Fn, A, B, C>(constraint: Fn)

Adds one constraint enforcing that (A * B) == C.

Source§

fn is_satisfied() -> bool

Returns true if all constraints in the environment are satisfied.

Source§

fn is_satisfied_in_scope() -> bool

Returns true if all constraints in the current scope are satisfied.

Source§

fn num_constants() -> u64

Returns the number of constants in the entire circuit.

Source§

fn num_public() -> u64

Returns the number of public variables in the entire circuit.

Source§

fn num_private() -> u64

Returns the number of private variables in the entire circuit.

Source§

fn num_variables() -> u64

Returns the number of constant, public, and private variables in the entire circuit.

Source§

fn num_constraints() -> u64

Returns the number of constraints in the entire circuit.

Source§

fn num_nonzeros() -> (u64, u64, u64)

Returns the number of nonzeros in the entire circuit.

Source§

fn num_constants_in_scope() -> u64

Returns the number of constants for the current scope.

Source§

fn num_public_in_scope() -> u64

Returns the number of public variables for the current scope.

Source§

fn num_private_in_scope() -> u64

Returns the number of private variables for the current scope.

Source§

fn num_constraints_in_scope() -> u64

Returns the number of constraints for the current scope.

Source§

fn num_nonzeros_in_scope() -> (u64, u64, u64)

Returns the number of nonzeros for the current scope.

Source§

fn get_variable_limit() -> Option<u64>

Returns the variable limit for the circuit, if one exists.

Source§

fn set_variable_limit(limit: Option<u64>)

Sets the variable limit for the circuit.

Source§

fn get_constraint_limit() -> Option<u64>

Returns the constraint limit for the circuit, if one exists.

Source§

fn set_constraint_limit(limit: Option<u64>)

Sets the constraint limit for the circuit.

Source§

fn halt<S: Into<String>, T>(message: S) -> T

Halts the program from further synthesis, evaluation, and execution in the current environment.

Source§

fn inject_r1cs(r1cs: R1CS<Self::BaseField>)

Returns the R1CS circuit, resetting the circuit.

Source§

fn eject_r1cs_and_reset() -> R1CS<Self::BaseField>

Returns the R1CS circuit, resetting the circuit.

Source§

fn eject_assignment_and_reset() -> Assignment<<Self::Network as Environment>::Field>

Returns the R1CS assignment of the circuit, resetting the circuit.

Source§

fn reset()

Clears the circuit and initializes an empty environment.

Source§

type Affine = <CanaryCircuit as Environment>::Affine

Source§

type BaseField = <CanaryCircuit as Environment>::BaseField

Source§

type Network = <CanaryCircuit as Environment>::Network

Source§

type ScalarField = <CanaryCircuit as Environment>::ScalarField

Source§

const EDWARDS_A: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_A

The coefficient A of the twisted Edwards curve.
Source§

const EDWARDS_D: Self::BaseField = <Self::Network as console::Environment>::EDWARDS_D

The coefficient D of the twisted Edwards curve.
Source§

const MONTGOMERY_A: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_A

The coefficient A of the Montgomery curve.
Source§

const MONTGOMERY_B: Self::BaseField = <Self::Network as console::Environment>::MONTGOMERY_B

The coefficient B of the Montgomery curve.
Source§

const MAX_STRING_BYTES: u32 = <Self::Network as console::Environment>::MAX_STRING_BYTES

The maximum number of bytes allowed in a string.
Source§

fn assert<Boolean>(boolean: Boolean)
where Boolean: Into<LinearCombination<Self::BaseField>>,

Adds one constraint enforcing that the given boolean is true.
Source§

fn assert_eq<A, B>(a: A, b: B)

Adds one constraint enforcing that the A == B.
Source§

fn assert_neq<A, B>(a: A, b: B)

Adds one constraint enforcing that the A != B.
Source§

fn count() -> (u64, u64, u64, u64, (u64, u64, u64))

Returns a tuple containing the number of constants, public variables, private variables, constraints, and nonzeros in the entire environment.
Source§

fn count_in_scope() -> (u64, u64, u64, u64, (u64, u64, u64))

Returns a tuple containing the number of constants, public variables, private variables, constraints, and nonzeros for the current scope.
Source§

impl Hash for AleoCanaryV0

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for AleoCanaryV0

Source§

fn eq(&self, other: &AleoCanaryV0) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for AleoCanaryV0

Source§

impl Eq for AleoCanaryV0

Source§

impl StructuralPartialEq for AleoCanaryV0

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V