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 56 associated constants and 78 methods
const ID: u16;
const NAME: &'static str;
const SHORT_NAME: &'static str;
const INCLUSION_FUNCTION_NAME: &'static str;
const GENESIS_TIMESTAMP: i64;
const GENESIS_COINBASE_TARGET: u64;
const GENESIS_PROOF_TARGET: u64;
const _CONSENSUS_VERSION_HEIGHTS: [(ConsensusVersion, u32); 15];
const MAX_CERTIFICATES: [(ConsensusVersion, u16); 5];
const MAX_SOLUTIONS_AS_POWER_OF_TWO: u8 = 2;
const MAX_SOLUTIONS: usize = _;
const STARTING_SUPPLY: u64 = 1_500_000_000_000_000;
const MAX_SUPPLY: u64 = 5_000_000_000_000_000;
const MAX_SUPPLY_LIMIT_HEIGHT: u32 = 263_527_685;
const DEPLOYMENT_FEE_MULTIPLIER: u64 = 1_000;
const CONSTRUCTOR_FEE_MULTIPLIER: u64 = 100;
const EXECUTION_STORAGE_FEE_SCALING_FACTOR: u64 = 5000;
const EXECUTION_STORAGE_PENALTY_THRESHOLD: u64 = 5000;
const SYNTHESIS_FEE_MULTIPLIER: u64 = 25;
const MAX_DEPLOYMENT_VARIABLES: u64 = _;
const MAX_DEPLOYMENT_CONSTRAINTS: u64 = _;
const MAX_BATCH_PROOF_INSTANCES: usize = 128;
const MAX_FEE: u64 = 1_000_000_000_000_000;
const TRANSACTION_SPEND_LIMIT: [(ConsensusVersion, u64); 2] = _;
const ARC_0005_COMPUTE_DISCOUNT: u64 = 25;
const ANCHOR_HEIGHT: u32 = _;
const REWARD_ANCHOR_TIME: u16 = 25;
const ANCHOR_TIMES: [(ConsensusVersion, u16); 2] = _;
const BLOCK_TIME: u16 = 10;
const NUM_BLOCKS_PER_EPOCH: u32 = _;
const MAX_DATA_ENTRIES: usize = 32;
const MAX_DATA_DEPTH: usize = 32;
const MAX_DATA_SIZE_IN_FIELDS: u32 = _;
const MIN_STRUCT_ENTRIES: usize = 1;
const MAX_STRUCT_ENTRIES: usize = Self::MAX_DATA_ENTRIES;
const MIN_ARRAY_ELEMENTS: usize = 1;
const MAX_ARRAY_ELEMENTS: [(ConsensusVersion, usize); 3] = _;
const MIN_RECORD_ENTRIES: usize = 1;
const MAX_RECORD_ENTRIES: usize = _;
const MAX_PROGRAM_SIZE: [(ConsensusVersion, usize); 2] = _;
const MAX_MAPPINGS: usize = 31;
const MAX_FUNCTIONS: usize = 31;
const MAX_STRUCTS: usize = _;
const MAX_RECORDS: usize = _;
const MAX_CLOSURES: usize = _;
const MAX_VIEWS: usize = _;
const MAX_OPERANDS: usize = Self::MAX_INPUTS;
const MAX_INSTRUCTIONS: usize = _;
const MAX_COMMANDS: usize = _;
const MAX_CALLS: usize = 32;
const MAX_WRITES: [(ConsensusVersion, u16); 2] = _;
const MAX_POSITIONS: usize = _;
const MAX_INPUTS: usize = 16;
const MAX_OUTPUTS: usize = 16;
const MAX_IMPORTS: usize = 64;
const MAX_TRANSACTION_SIZE: [(ConsensusVersion, usize); 2] = _;
// Required methods
fn INCLUSION_UPGRADE_HEIGHT() -> Result<u32, Error>;
fn genesis_bytes() -> &'static [u8] ⓘ;
fn restrictions_list_as_str() -> &'static str;
fn get_credits_v0_proving_key(
function_name: String,
) -> Result<&'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>>, Error>;
fn get_credits_v0_verifying_key(
function_name: String,
) -> Result<&'static Arc<CircuitVerifyingKey<Self::PairingCurve>>, Error>;
fn get_credits_proving_key(
function_name: String,
) -> Result<&'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>>, Error>;
fn get_credits_verifying_key(
function_name: String,
) -> Result<&'static Arc<CircuitVerifyingKey<Self::PairingCurve>>, Error>;
fn inclusion_v0_proving_key( ) -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ;
fn inclusion_v0_verifying_key( ) -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ;
fn inclusion_proving_key( ) -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ;
fn inclusion_verifying_key( ) -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ;
fn translation_credits_proving_key( ) -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ;
fn translation_credits_verifying_key( ) -> &'static Arc<CircuitVerifyingKey<Self::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 <PoseidonSponge<<Self::PairingCurve as PairingEngine>::Fq, 2, 1> as AlgebraicSponge<<Self::PairingCurve as PairingEngine>::Fq, 2>>::Parameters;
fn commitment_domain() -> Field<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>, Error>;
fn commit_bhp512(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>;
fn commit_bhp768(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>;
fn commit_bhp1024(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>;
fn commit_ped64(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>;
fn commit_ped128(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>;
fn commit_to_group_bhp256(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>, Error>;
fn commit_to_group_bhp512(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>, Error>;
fn commit_to_group_bhp768(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>, Error>;
fn commit_to_group_bhp1024(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>, Error>;
fn commit_to_group_ped64(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>, Error>;
fn commit_to_group_ped128(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Group<Self>, Error>;
fn hash_bhp256(input: &[bool]) -> Result<Field<Self>, Error>;
fn hash_bhp512(input: &[bool]) -> Result<Field<Self>, Error>;
fn hash_bhp768(input: &[bool]) -> Result<Field<Self>, Error>;
fn hash_bhp1024(input: &[bool]) -> Result<Field<Self>, Error>;
fn hash_keccak256(input: &[bool]) -> Result<Vec<bool>, Error>;
fn hash_keccak384(input: &[bool]) -> Result<Vec<bool>, Error>;
fn hash_keccak512(input: &[bool]) -> Result<Vec<bool>, Error>;
fn hash_ped64(input: &[bool]) -> Result<Field<Self>, Error>;
fn hash_ped128(input: &[bool]) -> Result<Field<Self>, Error>;
fn hash_psd2(input: &[Field<Self>]) -> Result<Field<Self>, Error>;
fn hash_psd4(input: &[Field<Self>]) -> Result<Field<Self>, Error>;
fn hash_psd8(input: &[Field<Self>]) -> Result<Field<Self>, Error>;
fn hash_sha3_256(input: &[bool]) -> Result<Vec<bool>, Error>;
fn hash_sha3_384(input: &[bool]) -> Result<Vec<bool>, Error>;
fn hash_sha3_512(input: &[bool]) -> Result<Vec<bool>, Error>;
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>, Error>;
fn hash_to_group_bhp512(input: &[bool]) -> Result<Group<Self>, Error>;
fn hash_to_group_bhp768(input: &[bool]) -> Result<Group<Self>, Error>;
fn hash_to_group_bhp1024(input: &[bool]) -> Result<Group<Self>, Error>;
fn hash_to_group_ped64(input: &[bool]) -> Result<Group<Self>, Error>;
fn hash_to_group_ped128(input: &[bool]) -> Result<Group<Self>, Error>;
fn hash_to_group_psd2(input: &[Field<Self>]) -> Result<Group<Self>, Error>;
fn hash_to_group_psd4(input: &[Field<Self>]) -> Result<Group<Self>, Error>;
fn hash_to_group_psd8(input: &[Field<Self>]) -> Result<Group<Self>, Error>;
fn hash_to_scalar_psd2(input: &[Field<Self>]) -> Result<Scalar<Self>, Error>;
fn hash_to_scalar_psd4(input: &[Field<Self>]) -> Result<Scalar<Self>, Error>;
fn hash_to_scalar_psd8(input: &[Field<Self>]) -> Result<Scalar<Self>, Error>;
fn merkle_tree_bhp<const DEPTH: u8>(
leaves: &[Vec<bool>],
) -> Result<MerkleTree<Self, BHP<Self, 8, 54>, BHP<Self, 6, 43>, DEPTH>, Error>;
fn merkle_tree_psd<const DEPTH: u8>(
leaves: &[Vec<Field<Self>>],
) -> Result<MerkleTree<Self, Poseidon<Self, 4>, Poseidon<Self, 2>, DEPTH>, Error>;
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;
fn dynamic_record_leaf_hasher() -> &'static Poseidon<Self, 8>;
fn dynamic_record_path_hasher() -> &'static Poseidon<Self, 2>;
// Provided methods
fn CONSENSUS_VERSION_HEIGHTS() -> &'static [(ConsensusVersion, u32); 15] { ... }
fn CONSENSUS_VERSION(seek_height: u32) -> Result<ConsensusVersion, Error> { ... }
fn CONSENSUS_HEIGHT(version: ConsensusVersion) -> Result<u32, Error> { ... }
fn LATEST_MAX_ARRAY_ELEMENTS() -> usize { ... }
fn LATEST_MAX_CERTIFICATES() -> u16 { ... }
fn LATEST_MAX_PROGRAM_SIZE() -> usize { ... }
fn LATEST_MAX_WRITES() -> u16 { ... }
fn LATEST_MAX_TRANSACTION_SIZE() -> usize { ... }
}Required Associated Constants§
Sourceconst SHORT_NAME: &'static str
const SHORT_NAME: &'static str
The short network name (used, for example, in query URLs).
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 GENESIS_COINBASE_TARGET: u64
const GENESIS_COINBASE_TARGET: u64
The genesis block coinbase target.
Sourceconst GENESIS_PROOF_TARGET: u64
const GENESIS_PROOF_TARGET: u64
The genesis block proof target.
Sourceconst _CONSENSUS_VERSION_HEIGHTS: [(ConsensusVersion, u32); 15]
const _CONSENSUS_VERSION_HEIGHTS: [(ConsensusVersion, u32); 15]
A list of (consensus_version, block_height) pairs indicating when each consensus version takes effect.
Documentation for what is changed at each version can be found in N::CONSENSUS_VERSION
Do not read this directly outside of tests, use N::CONSENSUS_VERSION_HEIGHTS() instead.
Sourceconst MAX_CERTIFICATES: [(ConsensusVersion, u16); 5]
const MAX_CERTIFICATES: [(ConsensusVersion, u16); 5]
A list of (consensus_version, size) pairs indicating the maximum number of validators in a committee.
Provided Associated Constants§
Sourceconst MAX_SOLUTIONS_AS_POWER_OF_TWO: u8 = 2
const MAX_SOLUTIONS_AS_POWER_OF_TWO: u8 = 2
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_000
const STARTING_SUPPLY: u64 = 1_500_000_000_000_000
The starting supply of Aleo credits.
Sourceconst MAX_SUPPLY: u64 = 5_000_000_000_000_000
const MAX_SUPPLY: u64 = 5_000_000_000_000_000
The maximum supply of Aleo credits. This value represents the absolute upper bound on all ALEO created over the lifetime of the network.
Sourceconst MAX_SUPPLY_LIMIT_HEIGHT: u32 = 263_527_685
const MAX_SUPPLY_LIMIT_HEIGHT: u32 = 263_527_685
The block height that upper bounds the total supply of Aleo credits to 5 billion.
Sourceconst DEPLOYMENT_FEE_MULTIPLIER: u64 = 1_000
const DEPLOYMENT_FEE_MULTIPLIER: u64 = 1_000
The cost in microcredits per byte for the deployment transaction.
Sourceconst CONSTRUCTOR_FEE_MULTIPLIER: u64 = 100
const CONSTRUCTOR_FEE_MULTIPLIER: u64 = 100
The multiplier in microcredits for each command in the constructor.
Sourceconst EXECUTION_STORAGE_FEE_SCALING_FACTOR: u64 = 5000
const EXECUTION_STORAGE_FEE_SCALING_FACTOR: u64 = 5000
The constant that divides the storage polynomial.
Sourceconst EXECUTION_STORAGE_PENALTY_THRESHOLD: u64 = 5000
const EXECUTION_STORAGE_PENALTY_THRESHOLD: u64 = 5000
The maximum size execution transactions can be before a quadratic storage penalty applies.
Sourceconst SYNTHESIS_FEE_MULTIPLIER: u64 = 25
const SYNTHESIS_FEE_MULTIPLIER: u64 = 25
The cost in microcredits per constraint for the deployment transaction.
Sourceconst MAX_DEPLOYMENT_VARIABLES: u64 = _
const MAX_DEPLOYMENT_VARIABLES: u64 = _
The maximum number of variables in a deployment.
Sourceconst MAX_DEPLOYMENT_CONSTRAINTS: u64 = _
const MAX_DEPLOYMENT_CONSTRAINTS: u64 = _
The maximum number of constraints in a deployment.
Sourceconst MAX_BATCH_PROOF_INSTANCES: usize = 128
const MAX_BATCH_PROOF_INSTANCES: usize = 128
The maximum number of instances to verify in a batch proof.
Sourceconst MAX_FEE: u64 = 1_000_000_000_000_000
const MAX_FEE: u64 = 1_000_000_000_000_000
The maximum number of microcredits that can be spent as a fee.
Sourceconst TRANSACTION_SPEND_LIMIT: [(ConsensusVersion, u64); 2] = _
const TRANSACTION_SPEND_LIMIT: [(ConsensusVersion, u64); 2] = _
A list of consensus versions and their corresponding transaction spend limits in microcredits.
Sourceconst ARC_0005_COMPUTE_DISCOUNT: u64 = 25
const ARC_0005_COMPUTE_DISCOUNT: u64 = 25
The compute discount approved by ARC 0005.
Sourceconst ANCHOR_HEIGHT: u32 = _
const ANCHOR_HEIGHT: u32 = _
The anchor height, defined as the expected number of blocks to reach the coinbase target.
Note: The anchor height used exclusively by coinbase_reward_v1.
Sourceconst REWARD_ANCHOR_TIME: u16 = 25
const REWARD_ANCHOR_TIME: u16 = 25
The anchor time used specifically for calculating the coinbase reward. We ensure that the reward anchor time matches the original ConsensusVersion::V1 anchor time to maintain the original coinbase reward schedule.
Sourceconst ANCHOR_TIMES: [(ConsensusVersion, u16); 2] = _
const ANCHOR_TIMES: [(ConsensusVersion, u16); 2] = _
A list of (consensus_version, anchor_time_in_seconds) pairs (sparse). Each entry takes effect at the specified version and remains active until the next entry. The anchor time, defined as the expected time in seconds to reach the coinbase target.
Sourceconst BLOCK_TIME: u16 = 10
const BLOCK_TIME: u16 = 10
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 = 32
const MAX_DATA_ENTRIES: usize = 32
The maximum number of entries in data.
Sourceconst MAX_DATA_DEPTH: usize = 32
const MAX_DATA_DEPTH: usize = 32
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 = 1
const MIN_STRUCT_ENTRIES: usize = 1
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 = 1
const MIN_ARRAY_ELEMENTS: usize = 1
The minimum number of elements in an array.
Sourceconst MAX_ARRAY_ELEMENTS: [(ConsensusVersion, usize); 3] = _
const MAX_ARRAY_ELEMENTS: [(ConsensusVersion, usize); 3] = _
A list of (consensus_version, size) pairs indicating the maximum number of elements in an array.
Sourceconst MIN_RECORD_ENTRIES: usize = 1
const MIN_RECORD_ENTRIES: usize = 1
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: [(ConsensusVersion, usize); 2] = _
const MAX_PROGRAM_SIZE: [(ConsensusVersion, usize); 2] = _
The maximum program size by number of characters.
Sourceconst MAX_MAPPINGS: usize = 31
const MAX_MAPPINGS: usize = 31
The maximum number of mappings in a program.
Sourceconst MAX_FUNCTIONS: usize = 31
const MAX_FUNCTIONS: usize = 31
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 = _
const MAX_INSTRUCTIONS: usize = _
The maximum number of instructions in a closure or function.
Sourceconst MAX_COMMANDS: usize = _
const MAX_COMMANDS: usize = _
The maximum number of commands in finalize.
Sourceconst MAX_CALLS: usize = 32
const MAX_CALLS: usize = 32
The maximum number of call commands in a finalize body. Matched to
Transaction::MAX_TRANSITIONS so view-call arity in a finalize is bounded analogously
to the static-call bound on transition graphs.
Sourceconst MAX_WRITES: [(ConsensusVersion, u16); 2] = _
const MAX_WRITES: [(ConsensusVersion, u16); 2] = _
The maximum number of write commands in finalize.
Sourceconst MAX_POSITIONS: usize = _
const MAX_POSITIONS: usize = _
The maximum number of position commands in finalize.
Sourceconst MAX_INPUTS: usize = 16
const MAX_INPUTS: usize = 16
The maximum number of inputs per transition.
Sourceconst MAX_OUTPUTS: usize = 16
const MAX_OUTPUTS: usize = 16
The maximum number of outputs per transition.
Sourceconst MAX_IMPORTS: usize = 64
const MAX_IMPORTS: usize = 64
The maximum number of imports.
Sourceconst MAX_TRANSACTION_SIZE: [(ConsensusVersion, usize); 2] = _
const MAX_TRANSACTION_SIZE: [(ConsensusVersion, usize); 2] = _
A list of consensus versions and their corresponding maximum transaction sizes in bytes.
A transaction consists of fixed identifiers, deployment data, and fees. Fixed components include identifiers, ownership, checksums, and fees. Variable components include the program bytecode and verifying-key entries. Verifying-key entries scale with the number of functions and records.
MAX_TRANSACTION_SIZE = C + MAX_PROGRAM_SIZE + (673 + 58) * (MAX_FUNCTIONS + MAX_RECORDS) C = fixed size components (Up to 2367 bytes)
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 INCLUSION_UPGRADE_HEIGHT() -> Result<u32, Error>
fn INCLUSION_UPGRADE_HEIGHT() -> Result<u32, Error>
Returns the block height where the the inclusion proof will be updated.
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_v0_proving_key(
function_name: String,
) -> Result<&'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>>, Error>
fn get_credits_v0_proving_key( function_name: String, ) -> Result<&'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>>, Error>
Returns the proving key for the given function name in the v0 version of credits.aleo.
Sourcefn get_credits_v0_verifying_key(
function_name: String,
) -> Result<&'static Arc<CircuitVerifyingKey<Self::PairingCurve>>, Error>
fn get_credits_v0_verifying_key( function_name: String, ) -> Result<&'static Arc<CircuitVerifyingKey<Self::PairingCurve>>, Error>
Returns the verifying key for the given function name in the v0 version of credits.aleo.
Sourcefn get_credits_proving_key(
function_name: String,
) -> Result<&'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>>, Error>
fn get_credits_proving_key( function_name: String, ) -> Result<&'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>>, Error>
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::PairingCurve>>, Error>
fn get_credits_verifying_key( function_name: String, ) -> Result<&'static Arc<CircuitVerifyingKey<Self::PairingCurve>>, Error>
Returns the verifying key for the given function name in credits.aleo.
Sourcefn inclusion_v0_proving_key() -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ
fn inclusion_v0_proving_key() -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ
Returns the proving key for the inclusion_v0 circuit.
Sourcefn inclusion_v0_verifying_key() -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ
fn inclusion_v0_verifying_key() -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ
Returns the verifying key for the inclusion_v0 circuit.
Sourcefn inclusion_proving_key() -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ
fn inclusion_proving_key() -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ
Returns the proving key for the inclusion circuit.
Sourcefn inclusion_verifying_key() -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ
fn inclusion_verifying_key() -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ
Returns the verifying key for the inclusion circuit.
Sourcefn translation_credits_proving_key() -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ
fn translation_credits_proving_key() -> &'static Arc<CircuitProvingKey<Self::PairingCurve, VarunaHidingMode>> ⓘ
Returns the proving key for the translation circuit.
Sourcefn translation_credits_verifying_key() -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ
fn translation_credits_verifying_key() -> &'static Arc<CircuitVerifyingKey<Self::PairingCurve>> ⓘ
Returns the verifying key for the translation 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 <PoseidonSponge<<Self::PairingCurve as PairingEngine>::Fq, 2, 1> as AlgebraicSponge<<Self::PairingCurve as PairingEngine>::Fq, 2>>::Parameters
fn varuna_fs_parameters() -> &'static <PoseidonSponge<<Self::PairingCurve as PairingEngine>::Fq, 2, 1> as AlgebraicSponge<<Self::PairingCurve as PairingEngine>::Fq, 2>>::Parameters
Returns the sponge parameters for Varuna.
Sourcefn commitment_domain() -> Field<Self>
fn commitment_domain() -> Field<Self>
Returns the commitment domain as a constant field element.
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>, Error>
fn commit_bhp256( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>, Error>
Returns a BHP commitment with an input hasher of 256-bits and randomizer.
Sourcefn commit_bhp512(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>
fn commit_bhp512( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>, Error>
Returns a BHP commitment with an input hasher of 512-bits and randomizer.
Sourcefn commit_bhp768(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>
fn commit_bhp768( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>, Error>
Returns a BHP commitment with an input hasher of 768-bits and randomizer.
Sourcefn commit_bhp1024(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>
fn commit_bhp1024( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>, Error>
Returns a BHP commitment with an input hasher of 1024-bits and randomizer.
Sourcefn commit_ped64(
input: &[bool],
randomizer: &Scalar<Self>,
) -> Result<Field<Self>, Error>
fn commit_ped64( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>, Error>
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>, Error>
fn commit_ped128( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Field<Self>, Error>
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>, Error>
fn commit_to_group_bhp256( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>, Error>
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>, Error>
fn commit_to_group_bhp512( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>, Error>
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>, Error>
fn commit_to_group_bhp768( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>, Error>
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>, Error>
fn commit_to_group_bhp1024( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>, Error>
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>, Error>
fn commit_to_group_ped64( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>, Error>
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>, Error>
fn commit_to_group_ped128( input: &[bool], randomizer: &Scalar<Self>, ) -> Result<Group<Self>, Error>
Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer.
Sourcefn hash_bhp256(input: &[bool]) -> Result<Field<Self>, Error>
fn hash_bhp256(input: &[bool]) -> Result<Field<Self>, Error>
Returns the BHP hash with an input hasher of 256-bits.
Sourcefn hash_bhp512(input: &[bool]) -> Result<Field<Self>, Error>
fn hash_bhp512(input: &[bool]) -> Result<Field<Self>, Error>
Returns the BHP hash with an input hasher of 512-bits.
Sourcefn hash_bhp768(input: &[bool]) -> Result<Field<Self>, Error>
fn hash_bhp768(input: &[bool]) -> Result<Field<Self>, Error>
Returns the BHP hash with an input hasher of 768-bits.
Sourcefn hash_bhp1024(input: &[bool]) -> Result<Field<Self>, Error>
fn hash_bhp1024(input: &[bool]) -> Result<Field<Self>, Error>
Returns the BHP hash with an input hasher of 1024-bits.
Sourcefn hash_keccak256(input: &[bool]) -> Result<Vec<bool>, Error>
fn hash_keccak256(input: &[bool]) -> Result<Vec<bool>, Error>
Returns the Keccak hash with a 256-bit output.
Sourcefn hash_keccak384(input: &[bool]) -> Result<Vec<bool>, Error>
fn hash_keccak384(input: &[bool]) -> Result<Vec<bool>, Error>
Returns the Keccak hash with a 384-bit output.
Sourcefn hash_keccak512(input: &[bool]) -> Result<Vec<bool>, Error>
fn hash_keccak512(input: &[bool]) -> Result<Vec<bool>, Error>
Returns the Keccak hash with a 512-bit output.
Sourcefn hash_ped64(input: &[bool]) -> Result<Field<Self>, Error>
fn hash_ped64(input: &[bool]) -> Result<Field<Self>, Error>
Returns the Pedersen hash for a given (up to) 64-bit input.
Sourcefn hash_ped128(input: &[bool]) -> Result<Field<Self>, Error>
fn hash_ped128(input: &[bool]) -> Result<Field<Self>, Error>
Returns the Pedersen hash for a given (up to) 128-bit input.
Sourcefn hash_psd2(input: &[Field<Self>]) -> Result<Field<Self>, Error>
fn hash_psd2(input: &[Field<Self>]) -> Result<Field<Self>, Error>
Returns the Poseidon hash with an input rate of 2.
Sourcefn hash_psd4(input: &[Field<Self>]) -> Result<Field<Self>, Error>
fn hash_psd4(input: &[Field<Self>]) -> Result<Field<Self>, Error>
Returns the Poseidon hash with an input rate of 4.
Sourcefn hash_psd8(input: &[Field<Self>]) -> Result<Field<Self>, Error>
fn hash_psd8(input: &[Field<Self>]) -> Result<Field<Self>, Error>
Returns the Poseidon hash with an input rate of 8.
Sourcefn hash_sha3_256(input: &[bool]) -> Result<Vec<bool>, Error>
fn hash_sha3_256(input: &[bool]) -> Result<Vec<bool>, Error>
Returns the SHA-3 hash with a 256-bit output.
Sourcefn hash_sha3_384(input: &[bool]) -> Result<Vec<bool>, Error>
fn hash_sha3_384(input: &[bool]) -> Result<Vec<bool>, Error>
Returns the SHA-3 hash with a 384-bit output.
Sourcefn hash_sha3_512(input: &[bool]) -> Result<Vec<bool>, Error>
fn hash_sha3_512(input: &[bool]) -> Result<Vec<bool>, Error>
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>, Error>
fn hash_to_group_bhp256(input: &[bool]) -> Result<Group<Self>, Error>
Returns the BHP hash with an input hasher of 256-bits.
Sourcefn hash_to_group_bhp512(input: &[bool]) -> Result<Group<Self>, Error>
fn hash_to_group_bhp512(input: &[bool]) -> Result<Group<Self>, Error>
Returns the BHP hash with an input hasher of 512-bits.
Sourcefn hash_to_group_bhp768(input: &[bool]) -> Result<Group<Self>, Error>
fn hash_to_group_bhp768(input: &[bool]) -> Result<Group<Self>, Error>
Returns the BHP hash with an input hasher of 768-bits.
Sourcefn hash_to_group_bhp1024(input: &[bool]) -> Result<Group<Self>, Error>
fn hash_to_group_bhp1024(input: &[bool]) -> Result<Group<Self>, Error>
Returns the BHP hash with an input hasher of 1024-bits.
Sourcefn hash_to_group_ped64(input: &[bool]) -> Result<Group<Self>, Error>
fn hash_to_group_ped64(input: &[bool]) -> Result<Group<Self>, Error>
Returns the Pedersen hash for a given (up to) 64-bit input.
Sourcefn hash_to_group_ped128(input: &[bool]) -> Result<Group<Self>, Error>
fn hash_to_group_ped128(input: &[bool]) -> Result<Group<Self>, Error>
Returns the Pedersen hash for a given (up to) 128-bit input.
Sourcefn hash_to_group_psd2(input: &[Field<Self>]) -> Result<Group<Self>, Error>
fn hash_to_group_psd2(input: &[Field<Self>]) -> Result<Group<Self>, Error>
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>, Error>
fn hash_to_group_psd4(input: &[Field<Self>]) -> Result<Group<Self>, Error>
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>, Error>
fn hash_to_group_psd8(input: &[Field<Self>]) -> Result<Group<Self>, Error>
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>, Error>
fn hash_to_scalar_psd2(input: &[Field<Self>]) -> Result<Scalar<Self>, Error>
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>, Error>
fn hash_to_scalar_psd4(input: &[Field<Self>]) -> Result<Scalar<Self>, Error>
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>, Error>
fn hash_to_scalar_psd8(input: &[Field<Self>]) -> Result<Scalar<Self>, Error>
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<MerkleTree<Self, BHP<Self, 8, 54>, BHP<Self, 6, 43>, DEPTH>, Error>
fn merkle_tree_bhp<const DEPTH: u8>( leaves: &[Vec<bool>], ) -> Result<MerkleTree<Self, BHP<Self, 8, 54>, BHP<Self, 6, 43>, DEPTH>, Error>
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<MerkleTree<Self, Poseidon<Self, 4>, Poseidon<Self, 2>, DEPTH>, Error>
fn merkle_tree_psd<const DEPTH: u8>( leaves: &[Vec<Field<Self>>], ) -> Result<MerkleTree<Self, Poseidon<Self, 4>, Poseidon<Self, 2>, DEPTH>, Error>
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.
Sourcefn dynamic_record_leaf_hasher() -> &'static Poseidon<Self, 8>
fn dynamic_record_leaf_hasher() -> &'static Poseidon<Self, 8>
Returns the Poseidon leaf hasher for dynamic records (rate 8).
Sourcefn dynamic_record_path_hasher() -> &'static Poseidon<Self, 2>
fn dynamic_record_path_hasher() -> &'static Poseidon<Self, 2>
Returns the Poseidon path hasher for dynamic records (rate 2).
Provided Methods§
Sourcefn CONSENSUS_VERSION_HEIGHTS() -> &'static [(ConsensusVersion, u32); 15]
fn CONSENSUS_VERSION_HEIGHTS() -> &'static [(ConsensusVersion, u32); 15]
Returns the list of consensus versions.
Sourcefn CONSENSUS_VERSION(seek_height: u32) -> Result<ConsensusVersion, Error>
fn CONSENSUS_VERSION(seek_height: u32) -> Result<ConsensusVersion, Error>
Returns the consensus version which is active at the given height.
Sourcefn CONSENSUS_HEIGHT(version: ConsensusVersion) -> Result<u32, Error>
fn CONSENSUS_HEIGHT(version: ConsensusVersion) -> Result<u32, Error>
Returns the height at which a specified consensus version becomes active.
Sourcefn LATEST_MAX_ARRAY_ELEMENTS() -> usize
fn LATEST_MAX_ARRAY_ELEMENTS() -> usize
Returns the last MAX_ARRAY_ELEMENTS value.
Sourcefn LATEST_MAX_CERTIFICATES() -> u16
fn LATEST_MAX_CERTIFICATES() -> u16
Returns the last MAX_CERTIFICATES value.
Sourcefn LATEST_MAX_PROGRAM_SIZE() -> usize
fn LATEST_MAX_PROGRAM_SIZE() -> usize
Returns the last MAX_PROGRAM_SIZE value.
Sourcefn LATEST_MAX_WRITES() -> u16
fn LATEST_MAX_WRITES() -> u16
Returns the last MAX_WRITES value.
Sourcefn LATEST_MAX_TRANSACTION_SIZE() -> usize
fn LATEST_MAX_TRANSACTION_SIZE() -> usize
Returns the last MAX_TRANSACTION_SIZE value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".