Struct snarkvm_console_network::Testnet3
source · pub struct Testnet3;
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Testnet3
impl<'de> Deserialize<'de> for Testnet3
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl Environment for Testnet3
impl Environment for Testnet3
sourceconst EDWARDS_A: Self::Field = Console::EDWARDS_A
const EDWARDS_A: Self::Field = Console::EDWARDS_A
The coefficient A
of the twisted Edwards curve.
sourceconst EDWARDS_D: Self::Field = Console::EDWARDS_D
const EDWARDS_D: Self::Field = Console::EDWARDS_D
The coefficient D
of the twisted Edwards curve.
sourceconst MONTGOMERY_A: Self::Field = Console::MONTGOMERY_A
const MONTGOMERY_A: Self::Field = Console::MONTGOMERY_A
The coefficient A
of the Montgomery curve.
sourceconst MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B
const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B
The coefficient B
of the Montgomery curve.
type Affine = <Console as Environment>::Affine
type BigInteger = <Console as Environment>::BigInteger
type Field = <Console as Environment>::Field
type PairingCurve = <Console as Environment>::PairingCurve
type Projective = <Console as Environment>::Projective
type Scalar = <Console as Environment>::Scalar
sourceconst MAX_STRING_BYTES: u32 = 255u32
const MAX_STRING_BYTES: u32 = 255u32
sourceimpl Network for Testnet3
impl Network for Testnet3
type TransactionID = AleoID<Field<Testnet3>, { hrp2!("at") }>
type TransactionID = AleoID<Field<Testnet3>, { hrp2!("at") }>
The transaction ID type.
type TransitionID = AleoID<Field<Testnet3>, { hrp2!("as") }>
type TransitionID = AleoID<Field<Testnet3>, { hrp2!("as") }>
The transition ID type.
sourceconst INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::testnet3::TESTNET3_INCLUSION_FUNCTION_NAME
const INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::testnet3::TESTNET3_INCLUSION_FUNCTION_NAME
The function name for the inclusion circuit.
sourcefn genesis_bytes() -> &'static [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn genesis_bytes() -> &'static [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Returns the genesis block bytes.
sourcefn universal_srs_bytes() -> &'static [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn universal_srs_bytes() -> &'static [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Returns the universal SRS bytes.
sourcefn get_credits_key_bytes(
function_name: String
) -> Result<&'static (Vec<u8>, Vec<u8>)>
fn get_credits_key_bytes(
function_name: String
) -> Result<&'static (Vec<u8>, Vec<u8>)>
Returns the (proving key, verifying key)
bytes for the given function name in credits.aleo
.
sourcefn inclusion_proving_key_bytes() -> &'static Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn inclusion_proving_key_bytes() -> &'static Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the proving key
bytes for the inclusion circuit.
sourcefn inclusion_verifying_key_bytes() -> &'static Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn inclusion_verifying_key_bytes() -> &'static Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the verifying key
bytes for the inclusion circuit.
sourcefn g_powers() -> &'static Vec<Group<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn g_powers() -> &'static Vec<Group<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the powers of G
.
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 marlin_fs_parameters() -> &'static FiatShamirParameters<Self>
fn marlin_fs_parameters() -> &'static FiatShamirParameters<Self>
Returns the sponge parameters used for the sponge in the Marlin SNARK.
sourcefn bcm_domain() -> Field<Self>
fn bcm_domain() -> Field<Self>
Returns the balance 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 randomizer_domain() -> Field<Self>
fn randomizer_domain() -> Field<Self>
Returns the randomizer domain as a constant field element.
sourcefn r_bcm_domain() -> Field<Self>
fn r_bcm_domain() -> Field<Self>
Returns the balance commitment randomizer 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.
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.
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.
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.
sourcefn commit_ped64(input: &[bool], randomizer: &Scalar<Self>) -> Result<Group<Self>>
fn commit_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_ped128(
input: &[bool],
randomizer: &Scalar<Self>
) -> Result<Group<Self>>
fn commit_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_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_many_psd2(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn hash_many_psd2(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the extended Poseidon hash with an input rate of 2.
sourcefn hash_many_psd4(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn hash_many_psd4(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the extended Poseidon hash with an input rate of 4.
sourcefn hash_many_psd8(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn hash_many_psd8(input: &[Field<Self>], num_outputs: u16) -> Vec<Field<Self>>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Returns the extended Poseidon hash with an input rate of 8.
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.
sourceconst GENESIS_TIMESTAMP: i64 = 1_663_718_400i64
const GENESIS_TIMESTAMP: i64 = 1_663_718_400i64
sourceconst GENESIS_COINBASE_TARGET: u64 = 1_023u64
const GENESIS_COINBASE_TARGET: u64 = 1_023u64
sourceconst GENESIS_PROOF_TARGET: u64 = 0u64
const GENESIS_PROOF_TARGET: u64 = 0u64
sourceconst STARTING_SUPPLY: u64 = 1_100_000_000_000_000u64
const STARTING_SUPPLY: u64 = 1_100_000_000_000_000u64
sourceconst ANCHOR_TIME: u16 = 20u16
const ANCHOR_TIME: u16 = 20u16
sourceconst COINBASE_PUZZLE_DEGREE: u32 = 8_191u32
const COINBASE_PUZZLE_DEGREE: u32 = 8_191u32
sourceconst MAX_PROVER_SOLUTIONS: usize = 1_048_576usize
const MAX_PROVER_SOLUTIONS: usize = 1_048_576usize
sourceconst NUM_BLOCKS_PER_EPOCH: u32 = 256u32
const NUM_BLOCKS_PER_EPOCH: u32 = 256u32
sourceconst MAX_DATA_DEPTH: usize = 32usize
const MAX_DATA_DEPTH: usize = 32usize
sourceconst MAX_DATA_ENTRIES: usize = 32usize
const MAX_DATA_ENTRIES: usize = 32usize
sourceconst MAX_DATA_SIZE_IN_FIELDS: u32 = _
const MAX_DATA_SIZE_IN_FIELDS: u32 = _
sourceconst MAX_FUNCTIONS: usize = 15usize
const MAX_FUNCTIONS: usize = 15usize
sourceconst MAX_OPERANDS: usize = Self::MAX_INPUTS
const MAX_OPERANDS: usize = Self::MAX_INPUTS
sourceconst MAX_INSTRUCTIONS: usize = 65_535usize
const MAX_INSTRUCTIONS: usize = 65_535usize
sourceconst MAX_COMMANDS: usize = 255usize
const MAX_COMMANDS: usize = 255usize
sourceconst MAX_INPUTS: usize = 8usize
const MAX_INPUTS: usize = 8usize
sourceconst MAX_OUTPUTS: usize = 8usize
const MAX_OUTPUTS: usize = 8usize
impl Copy for Testnet3
impl Eq for Testnet3
impl StructuralEq for Testnet3
impl StructuralPartialEq for Testnet3
Auto Trait Implementations
impl RefUnwindSafe for Testnet3
impl Send for Testnet3
impl Sync for Testnet3
impl Unpin for Testnet3
impl UnwindSafe for Testnet3
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.