Trait snarkvm_console_network::Network
source · pub trait Network:
'static
+ Environment
+ Copy
+ Clone
+ Debug
+ Eq
+ PartialEq
+ Hash
+ Serialize
+ DeserializeOwned
+ for<'a> Deserialize<'a>
+ Send
+ Sync {
type StateRoot: Bech32ID<Field<Self>>;
type BlockHash: Bech32ID<Field<Self>>;
type RatificationID: Bech32ID<Field<Self>>;
type TransactionID: Bech32ID<Field<Self>>;
type TransitionID: Bech32ID<Field<Self>>;
type TransmissionChecksum: IntegerType;
Show 47 associated constants and 60 methods
const ID: u16;
const NAME: &'static str;
const EDITION: u16;
const INCLUSION_FUNCTION_NAME: &'static str;
const GENESIS_TIMESTAMP: i64;
const MAX_CERTIFICATES: u16;
const GENESIS_COINBASE_TARGET: u64 = 536_870_911u64;
const GENESIS_PROOF_TARGET: u64 = 134_217_728u64;
const MAX_SOLUTIONS_AS_POWER_OF_TWO: u8 = 2u8;
const MAX_SOLUTIONS: usize = _;
const STARTING_SUPPLY: u64 = 1_500_000_000_000_000u64;
const DEPLOYMENT_FEE_MULTIPLIER: u64 = 1_000u64;
const EXECUTION_STORAGE_FEE_SCALING_FACTOR: u64 = 5_000u64;
const EXECUTION_STORAGE_PENALTY_THRESHOLD: u64 = 5_000u64;
const SYNTHESIS_FEE_MULTIPLIER: u64 = 25u64;
const MAX_DEPLOYMENT_VARIABLES: u64 = 1_048_576u64;
const MAX_DEPLOYMENT_CONSTRAINTS: u64 = 1_048_576u64;
const MAX_FEE: u64 = 1_000_000_000_000_000u64;
const TRANSACTION_SPEND_LIMIT: u64 = 100_000_000u64;
const ANCHOR_HEIGHT: u32 = _;
const ANCHOR_TIME: u16 = 25u16;
const BLOCK_TIME: u16 = 10u16;
const NUM_BLOCKS_PER_EPOCH: u32 = _;
const MAX_DATA_ENTRIES: usize = 32usize;
const MAX_DATA_DEPTH: usize = 32usize;
const MAX_DATA_SIZE_IN_FIELDS: u32 = _;
const MIN_STRUCT_ENTRIES: usize = 1usize;
const MAX_STRUCT_ENTRIES: usize = Self::MAX_DATA_ENTRIES;
const MIN_ARRAY_ELEMENTS: usize = 1usize;
const MAX_ARRAY_ELEMENTS: usize = Self::MAX_DATA_ENTRIES;
const MIN_RECORD_ENTRIES: usize = 1usize;
const MAX_RECORD_ENTRIES: usize = _;
const MAX_PROGRAM_SIZE: usize = 100_000usize;
const MAX_MAPPINGS: usize = 31usize;
const MAX_FUNCTIONS: usize = 31usize;
const MAX_STRUCTS: usize = _;
const MAX_RECORDS: usize = _;
const MAX_CLOSURES: usize = _;
const MAX_OPERANDS: usize = Self::MAX_INPUTS;
const MAX_INSTRUCTIONS: usize = 65_535usize;
const MAX_COMMANDS: usize = 65_535usize;
const MAX_WRITES: u16 = 16u16;
const MAX_INPUTS: usize = 16usize;
const MAX_OUTPUTS: usize = 16usize;
const MAX_PROGRAM_DEPTH: usize = 64usize;
const MAX_IMPORTS: usize = 64usize;
const MAX_TRANSACTION_SIZE: usize = 128_000usize;
// Required methods
fn genesis_bytes() -> &'static [u8] ⓘ;
fn restrictions_list_as_str() -> &'static str;
fn get_credits_proving_key(
function_name: String,
) -> Result<&'static Arc<CircuitProvingKey<<Self as Environment>::PairingCurve, VarunaHidingMode>>>;
fn get_credits_verifying_key(
function_name: String,
) -> Result<&'static Arc<CircuitVerifyingKey<<Self as Environment>::PairingCurve>>>;
fn inclusion_proving_key( ) -> &'static Arc<CircuitProvingKey<<Self as Environment>::PairingCurve, VarunaHidingMode>>;
fn inclusion_verifying_key( ) -> &'static Arc<CircuitVerifyingKey<<Self as Environment>::PairingCurve>>;
fn g_powers() -> &'static Vec<Group<Self>>;
fn g_scalar_multiply(scalar: &Scalar<Self>) -> Group<Self>;
fn varuna_universal_prover() -> &'static UniversalProver<Self::PairingCurve>;
fn varuna_universal_verifier( ) -> &'static UniversalVerifier<Self::PairingCurve>;
fn varuna_fs_parameters() -> &'static FiatShamirParameters<Self>;
fn encryption_domain() -> Field<Self>;
fn graph_key_domain() -> Field<Self>;
fn serial_number_domain() -> Field<Self>;
fn commit_bhp256(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>;
fn commit_bhp512(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>;
fn commit_bhp768(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>;
fn commit_bhp1024(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>;
fn commit_ped64(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>;
fn commit_ped128(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>;
fn commit_to_group_bhp256(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>;
fn commit_to_group_bhp512(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>;
fn commit_to_group_bhp768(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>;
fn commit_to_group_bhp1024(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>;
fn commit_to_group_ped64(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>;
fn commit_to_group_ped128(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>;
fn hash_bhp256(input: &[bool]) -> Result<Field<Self>>;
fn hash_bhp512(input: &[bool]) -> Result<Field<Self>>;
fn hash_bhp768(input: &[bool]) -> Result<Field<Self>>;
fn hash_bhp1024(input: &[bool]) -> Result<Field<Self>>;
fn hash_keccak256(input: &[bool]) -> Result<Vec<bool>>;
fn hash_keccak384(input: &[bool]) -> Result<Vec<bool>>;
fn hash_keccak512(input: &[bool]) -> Result<Vec<bool>>;
fn hash_ped64(input: &[bool]) -> Result<Field<Self>>;
fn hash_ped128(input: &[bool]) -> Result<Field<Self>>;
fn hash_psd2(input: &[Field<Self>]) -> Result<Field<Self>>;
fn hash_psd4(input: &[Field<Self>]) -> Result<Field<Self>>;
fn hash_psd8(input: &[Field<Self>]) -> Result<Field<Self>>;
fn hash_sha3_256(input: &[bool]) -> Result<Vec<bool>>;
fn hash_sha3_384(input: &[bool]) -> Result<Vec<bool>>;
fn hash_sha3_512(input: &[bool]) -> Result<Vec<bool>>;
fn hash_many_psd2(
input: &[Field<Self>],
num_outputs: u16,
) -> Vec<Field<Self>>;
fn hash_many_psd4(
input: &[Field<Self>],
num_outputs: u16,
) -> Vec<Field<Self>>;
fn hash_many_psd8(
input: &[Field<Self>],
num_outputs: u16,
) -> Vec<Field<Self>>;
fn hash_to_group_bhp256(input: &[bool]) -> Result<Group<Self>>;
fn hash_to_group_bhp512(input: &[bool]) -> Result<Group<Self>>;
fn hash_to_group_bhp768(input: &[bool]) -> Result<Group<Self>>;
fn hash_to_group_bhp1024(input: &[bool]) -> Result<Group<Self>>;
fn hash_to_group_ped64(input: &[bool]) -> Result<Group<Self>>;
fn hash_to_group_ped128(input: &[bool]) -> Result<Group<Self>>;
fn hash_to_group_psd2(input: &[Field<Self>]) -> Result<Group<Self>>;
fn hash_to_group_psd4(input: &[Field<Self>]) -> Result<Group<Self>>;
fn hash_to_group_psd8(input: &[Field<Self>]) -> Result<Group<Self>>;
fn hash_to_scalar_psd2(input: &[Field<Self>]) -> Result<Scalar<Self>>;
fn hash_to_scalar_psd4(input: &[Field<Self>]) -> Result<Scalar<Self>>;
fn hash_to_scalar_psd8(input: &[Field<Self>]) -> Result<Scalar<Self>>;
fn merkle_tree_bhp<const DEPTH: u8>(
leaves: &[Vec<bool>],
) -> Result<BHPMerkleTree<Self, DEPTH>>;
fn merkle_tree_psd<const DEPTH: u8>(
leaves: &[Vec<Field<Self>>],
) -> Result<PoseidonMerkleTree<Self, DEPTH>>;
fn verify_merkle_path_bhp<const DEPTH: u8>(
path: &MerklePath<Self, DEPTH>,
root: &Field<Self>,
leaf: &Vec<bool>,
) -> bool;
fn verify_merkle_path_psd<const DEPTH: u8>(
path: &MerklePath<Self, DEPTH>,
root: &Field<Self>,
leaf: &Vec<Field<Self>>,
) -> bool;
}
Required Associated Constants§
sourceconst INCLUSION_FUNCTION_NAME: &'static str
const INCLUSION_FUNCTION_NAME: &'static str
The function name for the inclusion circuit.
sourceconst GENESIS_TIMESTAMP: i64
const GENESIS_TIMESTAMP: i64
The fixed timestamp of the genesis block.
sourceconst MAX_CERTIFICATES: u16
const MAX_CERTIFICATES: u16
The maximum number of certificates in a batch.
Provided Associated Constants§
sourceconst GENESIS_COINBASE_TARGET: u64 = 536_870_911u64
const GENESIS_COINBASE_TARGET: u64 = 536_870_911u64
The genesis block coinbase target.
sourceconst GENESIS_PROOF_TARGET: u64 = 134_217_728u64
const GENESIS_PROOF_TARGET: u64 = 134_217_728u64
The genesis block proof target.
sourceconst MAX_SOLUTIONS_AS_POWER_OF_TWO: u8 = 2u8
const MAX_SOLUTIONS_AS_POWER_OF_TWO: u8 = 2u8
The maximum number of solutions that can be included per block as a power of 2.
sourceconst MAX_SOLUTIONS: usize = _
const MAX_SOLUTIONS: usize = _
The maximum number of solutions that can be included per block.
sourceconst STARTING_SUPPLY: u64 = 1_500_000_000_000_000u64
const STARTING_SUPPLY: u64 = 1_500_000_000_000_000u64
The starting supply of Aleo credits.
sourceconst DEPLOYMENT_FEE_MULTIPLIER: u64 = 1_000u64
const DEPLOYMENT_FEE_MULTIPLIER: u64 = 1_000u64
The cost in microcredits per byte for the deployment transaction.
sourceconst EXECUTION_STORAGE_FEE_SCALING_FACTOR: u64 = 5_000u64
const EXECUTION_STORAGE_FEE_SCALING_FACTOR: u64 = 5_000u64
The constant that divides the storage polynomial.
sourceconst EXECUTION_STORAGE_PENALTY_THRESHOLD: u64 = 5_000u64
const EXECUTION_STORAGE_PENALTY_THRESHOLD: u64 = 5_000u64
The maximum size execution transactions can be before a quadratic storage penalty applies.
sourceconst SYNTHESIS_FEE_MULTIPLIER: u64 = 25u64
const SYNTHESIS_FEE_MULTIPLIER: u64 = 25u64
The cost in microcredits per constraint for the deployment transaction.
sourceconst MAX_DEPLOYMENT_VARIABLES: u64 = 1_048_576u64
const MAX_DEPLOYMENT_VARIABLES: u64 = 1_048_576u64
The maximum number of variables in a deployment.
sourceconst MAX_DEPLOYMENT_CONSTRAINTS: u64 = 1_048_576u64
const MAX_DEPLOYMENT_CONSTRAINTS: u64 = 1_048_576u64
The maximum number of constraints in a deployment.
sourceconst MAX_FEE: u64 = 1_000_000_000_000_000u64
const MAX_FEE: u64 = 1_000_000_000_000_000u64
The maximum number of microcredits that can be spent as a fee.
sourceconst TRANSACTION_SPEND_LIMIT: u64 = 100_000_000u64
const TRANSACTION_SPEND_LIMIT: u64 = 100_000_000u64
The maximum number of microcredits that can be spent on a finalize block.
sourceconst ANCHOR_HEIGHT: u32 = _
const ANCHOR_HEIGHT: u32 = _
The anchor height, defined as the expected number of blocks to reach the coinbase target.
sourceconst ANCHOR_TIME: u16 = 25u16
const ANCHOR_TIME: u16 = 25u16
The anchor time in seconds.
sourceconst BLOCK_TIME: u16 = 10u16
const BLOCK_TIME: u16 = 10u16
The expected time per block in seconds.
sourceconst NUM_BLOCKS_PER_EPOCH: u32 = _
const NUM_BLOCKS_PER_EPOCH: u32 = _
The number of blocks per epoch.
sourceconst MAX_DATA_ENTRIES: usize = 32usize
const MAX_DATA_ENTRIES: usize = 32usize
The maximum number of entries in data.
sourceconst MAX_DATA_DEPTH: usize = 32usize
const MAX_DATA_DEPTH: usize = 32usize
The maximum recursive depth of an entry. Note: This value must be strictly less than u8::MAX.
sourceconst MAX_DATA_SIZE_IN_FIELDS: u32 = _
const MAX_DATA_SIZE_IN_FIELDS: u32 = _
The maximum number of fields in data (must not exceed u16::MAX).
sourceconst MIN_STRUCT_ENTRIES: usize = 1usize
const MIN_STRUCT_ENTRIES: usize = 1usize
The minimum number of entries in a struct.
sourceconst MAX_STRUCT_ENTRIES: usize = Self::MAX_DATA_ENTRIES
const MAX_STRUCT_ENTRIES: usize = Self::MAX_DATA_ENTRIES
The maximum number of entries in a struct.
sourceconst MIN_ARRAY_ELEMENTS: usize = 1usize
const MIN_ARRAY_ELEMENTS: usize = 1usize
The minimum number of elements in an array.
sourceconst MAX_ARRAY_ELEMENTS: usize = Self::MAX_DATA_ENTRIES
const MAX_ARRAY_ELEMENTS: usize = Self::MAX_DATA_ENTRIES
The maximum number of elements in an array.
sourceconst MIN_RECORD_ENTRIES: usize = 1usize
const MIN_RECORD_ENTRIES: usize = 1usize
The minimum number of entries in a record.
sourceconst MAX_RECORD_ENTRIES: usize = _
const MAX_RECORD_ENTRIES: usize = _
The maximum number of entries in a record.
sourceconst MAX_PROGRAM_SIZE: usize = 100_000usize
const MAX_PROGRAM_SIZE: usize = 100_000usize
The maximum program size by number of characters.
sourceconst MAX_MAPPINGS: usize = 31usize
const MAX_MAPPINGS: usize = 31usize
The maximum number of mappings in a program.
sourceconst MAX_FUNCTIONS: usize = 31usize
const MAX_FUNCTIONS: usize = 31usize
The maximum number of functions in a program.
sourceconst MAX_STRUCTS: usize = _
const MAX_STRUCTS: usize = _
The maximum number of structs in a program.
sourceconst MAX_RECORDS: usize = _
const MAX_RECORDS: usize = _
The maximum number of records in a program.
sourceconst MAX_CLOSURES: usize = _
const MAX_CLOSURES: usize = _
The maximum number of closures in a program.
sourceconst MAX_OPERANDS: usize = Self::MAX_INPUTS
const MAX_OPERANDS: usize = Self::MAX_INPUTS
The maximum number of operands in an instruction.
sourceconst MAX_INSTRUCTIONS: usize = 65_535usize
const MAX_INSTRUCTIONS: usize = 65_535usize
The maximum number of instructions in a closure or function.
sourceconst MAX_COMMANDS: usize = 65_535usize
const MAX_COMMANDS: usize = 65_535usize
The maximum number of commands in finalize.
sourceconst MAX_WRITES: u16 = 16u16
const MAX_WRITES: u16 = 16u16
The maximum number of write commands in finalize.
sourceconst MAX_INPUTS: usize = 16usize
const MAX_INPUTS: usize = 16usize
The maximum number of inputs per transition.
sourceconst MAX_OUTPUTS: usize = 16usize
const MAX_OUTPUTS: usize = 16usize
The maximum number of outputs per transition.
sourceconst MAX_PROGRAM_DEPTH: usize = 64usize
const MAX_PROGRAM_DEPTH: usize = 64usize
The maximum program depth.
sourceconst MAX_IMPORTS: usize = 64usize
const MAX_IMPORTS: usize = 64usize
The maximum number of imports.
sourceconst MAX_TRANSACTION_SIZE: usize = 128_000usize
const MAX_TRANSACTION_SIZE: usize = 128_000usize
The maximum number of bytes in a transaction.
Required Associated Types§
sourcetype RatificationID: Bech32ID<Field<Self>>
type RatificationID: Bech32ID<Field<Self>>
The ratification ID type.
sourcetype TransactionID: Bech32ID<Field<Self>>
type TransactionID: Bech32ID<Field<Self>>
The transaction ID type.
sourcetype TransitionID: Bech32ID<Field<Self>>
type TransitionID: Bech32ID<Field<Self>>
The transition ID type.
sourcetype TransmissionChecksum: IntegerType
type TransmissionChecksum: IntegerType
The transmission checksum type.
Required Methods§
sourcefn genesis_bytes() -> &'static [u8] ⓘ
fn genesis_bytes() -> &'static [u8] ⓘ
Returns the genesis block bytes.
sourcefn restrictions_list_as_str() -> &'static str
fn restrictions_list_as_str() -> &'static str
Returns the restrictions list as a JSON-compatible string.
sourcefn get_credits_proving_key(
function_name: String,
) -> Result<&'static Arc<CircuitProvingKey<<Self as Environment>::PairingCurve, VarunaHidingMode>>>
fn get_credits_proving_key( function_name: String, ) -> Result<&'static Arc<CircuitProvingKey<<Self as Environment>::PairingCurve, VarunaHidingMode>>>
Returns the proving key for the given function name in credits.aleo
.
sourcefn get_credits_verifying_key(
function_name: String,
) -> Result<&'static Arc<CircuitVerifyingKey<<Self as Environment>::PairingCurve>>>
fn get_credits_verifying_key( function_name: String, ) -> Result<&'static Arc<CircuitVerifyingKey<<Self as Environment>::PairingCurve>>>
Returns the verifying key for the given function name in credits.aleo
.
sourcefn inclusion_proving_key() -> &'static Arc<CircuitProvingKey<<Self as Environment>::PairingCurve, VarunaHidingMode>>
fn inclusion_proving_key() -> &'static Arc<CircuitProvingKey<<Self as Environment>::PairingCurve, VarunaHidingMode>>
Returns the proving key
for the inclusion circuit.
sourcefn inclusion_verifying_key() -> &'static Arc<CircuitVerifyingKey<<Self as Environment>::PairingCurve>>
fn inclusion_verifying_key() -> &'static Arc<CircuitVerifyingKey<<Self as Environment>::PairingCurve>>
Returns the verifying key
for the inclusion circuit.
sourcefn g_scalar_multiply(scalar: &Scalar<Self>) -> Group<Self>
fn g_scalar_multiply(scalar: &Scalar<Self>) -> Group<Self>
Returns the scalar multiplication on the generator G
.
sourcefn varuna_universal_prover() -> &'static UniversalProver<Self::PairingCurve>
fn varuna_universal_prover() -> &'static UniversalProver<Self::PairingCurve>
Returns the Varuna universal prover.
sourcefn varuna_universal_verifier() -> &'static UniversalVerifier<Self::PairingCurve>
fn varuna_universal_verifier() -> &'static UniversalVerifier<Self::PairingCurve>
Returns the Varuna universal verifier.
sourcefn varuna_fs_parameters() -> &'static FiatShamirParameters<Self>
fn varuna_fs_parameters() -> &'static FiatShamirParameters<Self>
Returns the sponge parameters for Varuna.
sourcefn encryption_domain() -> Field<Self>
fn encryption_domain() -> Field<Self>
Returns the encryption domain as a constant field element.
sourcefn graph_key_domain() -> Field<Self>
fn graph_key_domain() -> Field<Self>
Returns the graph key domain as a constant field element.
sourcefn serial_number_domain() -> Field<Self>
fn serial_number_domain() -> Field<Self>
Returns the serial number domain as a constant field element.
sourcefn commit_bhp256(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>
fn commit_bhp256( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>>
Returns a BHP commitment with an input hasher of 256-bits and randomizer.
sourcefn commit_bhp512(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>
fn commit_bhp512( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>>
Returns a BHP commitment with an input hasher of 512-bits and randomizer.
sourcefn commit_bhp768(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>
fn commit_bhp768( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>>
Returns a BHP commitment with an input hasher of 768-bits and randomizer.
sourcefn commit_bhp1024(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>
fn commit_bhp1024( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>>
Returns a BHP commitment with an input hasher of 1024-bits and randomizer.
sourcefn commit_ped64(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>
fn commit_ped64( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>>
Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.
sourcefn commit_ped128(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>>
fn commit_ped128( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>>
Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.
sourcefn commit_to_group_bhp256(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>
fn commit_to_group_bhp256( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>>
Returns a BHP commitment with an input hasher of 256-bits and randomizer.
sourcefn commit_to_group_bhp512(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>
fn commit_to_group_bhp512( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>>
Returns a BHP commitment with an input hasher of 512-bits and randomizer.
sourcefn commit_to_group_bhp768(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>
fn commit_to_group_bhp768( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>>
Returns a BHP commitment with an input hasher of 768-bits and randomizer.
sourcefn commit_to_group_bhp1024(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>
fn commit_to_group_bhp1024( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>>
Returns a BHP commitment with an input hasher of 1024-bits and randomizer.
sourcefn commit_to_group_ped64(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>
fn commit_to_group_ped64( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>>
Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer.
sourcefn commit_to_group_ped128(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>>
fn commit_to_group_ped128( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>>
Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.
sourcefn hash_bhp256(input: &[bool]) -> Result<Field<Self>>
fn hash_bhp256(input: &[bool]) -> Result<Field<Self>>
Returns the BHP hash with an input hasher of 256-bits.
sourcefn hash_bhp512(input: &[bool]) -> Result<Field<Self>>
fn hash_bhp512(input: &[bool]) -> Result<Field<Self>>
Returns the BHP hash with an input hasher of 512-bits.
sourcefn hash_bhp768(input: &[bool]) -> Result<Field<Self>>
fn hash_bhp768(input: &[bool]) -> Result<Field<Self>>
Returns the BHP hash with an input hasher of 768-bits.
sourcefn hash_bhp1024(input: &[bool]) -> Result<Field<Self>>
fn hash_bhp1024(input: &[bool]) -> Result<Field<Self>>
Returns the BHP hash with an input hasher of 1024-bits.
sourcefn hash_keccak256(input: &[bool]) -> Result<Vec<bool>>
fn hash_keccak256(input: &[bool]) -> Result<Vec<bool>>
Returns the Keccak hash with a 256-bit output.
sourcefn hash_keccak384(input: &[bool]) -> Result<Vec<bool>>
fn hash_keccak384(input: &[bool]) -> Result<Vec<bool>>
Returns the Keccak hash with a 384-bit output.
sourcefn hash_keccak512(input: &[bool]) -> Result<Vec<bool>>
fn hash_keccak512(input: &[bool]) -> Result<Vec<bool>>
Returns the Keccak hash with a 512-bit output.
sourcefn hash_ped64(input: &[bool]) -> Result<Field<Self>>
fn hash_ped64(input: &[bool]) -> Result<Field<Self>>
Returns the Pedersen hash for a given (up to) 64-bit input.
sourcefn hash_ped128(input: &[bool]) -> Result<Field<Self>>
fn hash_ped128(input: &[bool]) -> Result<Field<Self>>
Returns the Pedersen hash for a given (up to) 128-bit input.
sourcefn hash_psd2(input: &[Field<Self>]) -> Result<Field<Self>>
fn hash_psd2(input: &[Field<Self>]) -> Result<Field<Self>>
Returns the Poseidon hash with an input rate of 2.
sourcefn hash_psd4(input: &[Field<Self>]) -> Result<Field<Self>>
fn hash_psd4(input: &[Field<Self>]) -> Result<Field<Self>>
Returns the Poseidon hash with an input rate of 4.
sourcefn hash_psd8(input: &[Field<Self>]) -> Result<Field<Self>>
fn hash_psd8(input: &[Field<Self>]) -> Result<Field<Self>>
Returns the Poseidon hash with an input rate of 8.
sourcefn hash_sha3_256(input: &[bool]) -> Result<Vec<bool>>
fn hash_sha3_256(input: &[bool]) -> Result<Vec<bool>>
Returns the SHA-3 hash with a 256-bit output.
sourcefn hash_sha3_384(input: &[bool]) -> Result<Vec<bool>>
fn hash_sha3_384(input: &[bool]) -> Result<Vec<bool>>
Returns the SHA-3 hash with a 384-bit output.
sourcefn hash_sha3_512(input: &[bool]) -> Result<Vec<bool>>
fn hash_sha3_512(input: &[bool]) -> Result<Vec<bool>>
Returns the SHA-3 hash with a 512-bit output.
sourcefn hash_many_psd2(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>
fn hash_many_psd2(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>
Returns the extended Poseidon hash with an input rate of 2.
sourcefn hash_many_psd4(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>
fn hash_many_psd4(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>
Returns the extended Poseidon hash with an input rate of 4.
sourcefn hash_many_psd8(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>
fn hash_many_psd8(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>
Returns the extended Poseidon hash with an input rate of 8.
sourcefn hash_to_group_bhp256(input: &[bool]) -> Result<Group<Self>>
fn hash_to_group_bhp256(input: &[bool]) -> Result<Group<Self>>
Returns the BHP hash with an input hasher of 256-bits.
sourcefn hash_to_group_bhp512(input: &[bool]) -> Result<Group<Self>>
fn hash_to_group_bhp512(input: &[bool]) -> Result<Group<Self>>
Returns the BHP hash with an input hasher of 512-bits.
sourcefn hash_to_group_bhp768(input: &[bool]) -> Result<Group<Self>>
fn hash_to_group_bhp768(input: &[bool]) -> Result<Group<Self>>
Returns the BHP hash with an input hasher of 768-bits.
sourcefn hash_to_group_bhp1024(input: &[bool]) -> Result<Group<Self>>
fn hash_to_group_bhp1024(input: &[bool]) -> Result<Group<Self>>
Returns the BHP hash with an input hasher of 1024-bits.
sourcefn hash_to_group_ped64(input: &[bool]) -> Result<Group<Self>>
fn hash_to_group_ped64(input: &[bool]) -> Result<Group<Self>>
Returns the Pedersen hash for a given (up to) 64-bit input.
sourcefn hash_to_group_ped128(input: &[bool]) -> Result<Group<Self>>
fn hash_to_group_ped128(input: &[bool]) -> Result<Group<Self>>
Returns the Pedersen hash for a given (up to) 128-bit input.
sourcefn hash_to_group_psd2(input: &[Field<Self>]) -> Result<Group<Self>>
fn hash_to_group_psd2(input: &[Field<Self>]) -> Result<Group<Self>>
Returns the Poseidon hash with an input rate of 2 on the affine curve.
sourcefn hash_to_group_psd4(input: &[Field<Self>]) -> Result<Group<Self>>
fn hash_to_group_psd4(input: &[Field<Self>]) -> Result<Group<Self>>
Returns the Poseidon hash with an input rate of 4 on the affine curve.
sourcefn hash_to_group_psd8(input: &[Field<Self>]) -> Result<Group<Self>>
fn hash_to_group_psd8(input: &[Field<Self>]) -> Result<Group<Self>>
Returns the Poseidon hash with an input rate of 8 on the affine curve.
sourcefn hash_to_scalar_psd2(input: &[Field<Self>]) -> Result<Scalar<Self>>
fn hash_to_scalar_psd2(input: &[Field<Self>]) -> Result<Scalar<Self>>
Returns the Poseidon hash with an input rate of 2 on the scalar field.
sourcefn hash_to_scalar_psd4(input: &[Field<Self>]) -> Result<Scalar<Self>>
fn hash_to_scalar_psd4(input: &[Field<Self>]) -> Result<Scalar<Self>>
Returns the Poseidon hash with an input rate of 4 on the scalar field.
sourcefn hash_to_scalar_psd8(input: &[Field<Self>]) -> Result<Scalar<Self>>
fn hash_to_scalar_psd8(input: &[Field<Self>]) -> Result<Scalar<Self>>
Returns the Poseidon hash with an input rate of 8 on the scalar field.
sourcefn merkle_tree_bhp<const DEPTH: u8>(
leaves: &[Vec<bool>],
) -> Result<BHPMerkleTree<Self, DEPTH>>
fn merkle_tree_bhp<const DEPTH: u8>( leaves: &[Vec<bool>], ) -> Result<BHPMerkleTree<Self, DEPTH>>
Returns a Merkle tree with a BHP leaf hasher of 1024-bits and a BHP path hasher of 512-bits.
sourcefn merkle_tree_psd<const DEPTH: u8>(
leaves: &[Vec<Field<Self>>],
) -> Result<PoseidonMerkleTree<Self, DEPTH>>
fn merkle_tree_psd<const DEPTH: u8>( leaves: &[Vec<Field<Self>>], ) -> Result<PoseidonMerkleTree<Self, DEPTH>>
Returns a Merkle tree with a Poseidon leaf hasher with input rate of 4 and a Poseidon path hasher with input rate of 2.
sourcefn verify_merkle_path_bhp<const DEPTH: u8>(
path: &MerklePath<Self, DEPTH>,
root: &Field<Self>,
leaf: &Vec<bool>,
) -> bool
fn verify_merkle_path_bhp<const DEPTH: u8>( path: &MerklePath<Self, DEPTH>, root: &Field<Self>, leaf: &Vec<bool>, ) -> bool
Returns true
if the given Merkle path is valid for the given root and leaf.
sourcefn verify_merkle_path_psd<const DEPTH: u8>(
path: &MerklePath<Self, DEPTH>,
root: &Field<Self>,
leaf: &Vec<Field<Self>>,
) -> bool
fn verify_merkle_path_psd<const DEPTH: u8>( path: &MerklePath<Self, DEPTH>, root: &Field<Self>, leaf: &Vec<Field<Self>>, ) -> bool
Returns true
if the given Merkle path is valid for the given root and leaf.