pub struct Testnet1;
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Testnet1
impl<'de> Deserialize<'de> for Testnet1
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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Network for Testnet1
impl Network for Testnet1
sourcefn program_srs<R: Rng + CryptoRng>(
rng: &mut R
) -> Rc<RefCell<SRS<'_, R, <Self::ProgramSNARK as SNARK>::UniversalSetupParameters>>>
fn program_srs<R: Rng + CryptoRng>(
rng: &mut R
) -> Rc<RefCell<SRS<'_, R, <Self::ProgramSNARK as SNARK>::UniversalSetupParameters>>>
Returns the program SRS for Aleo applications.
const NETWORK_ID: u16
const NETWORK_NAME: &'static str
const NUM_INPUT_RECORDS: usize
const NUM_OUTPUT_RECORDS: usize
const NUM_TRANSITIONS: u8
const NUM_EVENTS: u16
const BLOCK_HASH_PREFIX: u16
const LEDGER_ROOT_PREFIX: u16
const PROGRAM_ID_PREFIX: u16
const TRANSITION_ID_PREFIX: u16
const TRANSACTION_ID_PREFIX: u16
const COMMITMENT_PREFIX: u16
const FUNCTION_INPUTS_HASH_PREFIX: u16
const FUNCTION_ID_PREFIX: u16
const HEADER_NONCE_PREFIX: u16
const HEADER_ROOT_PREFIX: u16
const HEADER_TRANSACTIONS_ROOT_PREFIX: u16
const INNER_CIRCUIT_ID_PREFIX: u16
const RECORD_RANDOMIZER_PREFIX: u16
const RECORD_VIEW_KEY_COMMITMENT_PREFIX: u16
const SERIAL_NUMBER_PREFIX: u16
const HEADER_PROOF_PREFIX: u32
const INNER_PROOF_PREFIX: u32
const OUTER_PROOF_PREFIX: u32
const PROGRAM_PROOF_PREFIX: u32
const RECORD_CIPHERTEXT_PREFIX: u32
const RECORD_VIEW_KEY_PREFIX: u32
const SIGNATURE_PREFIX: u32
const ADDRESS_SIZE_IN_BYTES: usize
const HEADER_SIZE_IN_BYTES: usize
const HEADER_PROOF_SIZE_IN_BYTES: usize
const INNER_PROOF_SIZE_IN_BYTES: usize
const OUTER_PROOF_SIZE_IN_BYTES: usize
const PROGRAM_PROOF_SIZE_IN_BYTES: usize
const RECORD_SIZE_IN_BYTES: usize
const RECORD_CIPHERTEXT_SIZE_IN_BYTES: usize
const RECORD_PAYLOAD_SIZE_IN_BYTES: usize
const RECORD_VIEW_KEY_SIZE_IN_BYTES: usize
const SIGNATURE_SIZE_IN_BYTES: usize
const HEADER_TRANSACTIONS_TREE_DEPTH: usize
const HEADER_TREE_DEPTH: usize
const LEDGER_TREE_DEPTH: usize
const PROGRAM_TREE_DEPTH: usize
const TRANSITION_TREE_DEPTH: usize
const TRANSACTION_TREE_DEPTH: usize
const ALEO_BLOCK_TIME_IN_SECS: i64
const ALEO_STARTING_SUPPLY_IN_CREDITS: i64
sourceconst ALEO_FUTURE_TIME_LIMIT_IN_SECS: i64
const ALEO_FUTURE_TIME_LIMIT_IN_SECS: i64
The maximum future block time.
sourceconst ALEO_MAXIMUM_FORK_DEPTH: u32
const ALEO_MAXIMUM_FORK_DEPTH: u32
The maximum number of blocks that a fork can be.
type InnerCurve = Bls12_377
type InnerCurve = Bls12_377
Inner curve type declarations.
type InnerScalarField = <Self::InnerCurve as PairingEngine>::Fr
type OuterCurve = BW6_761
type OuterCurve = BW6_761
Outer curve type declarations.
type OuterBaseField = <Self::OuterCurve as PairingEngine>::Fq
type OuterScalarField = <Self::OuterCurve as PairingEngine>::Fr
type ProgramAffineCurve = EdwardsBls12Affine
type ProgramAffineCurve = EdwardsBls12Affine
Program curve type declarations.
type ProgramAffineCurveGadget = EdwardsBls12Gadget
type ProgramProjectiveCurve = EdwardsBls12Projective
type ProgramCurveParameters = EdwardsParameters
type ProgramBaseField = <Self::ProgramCurveParameters as ModelParameters>::BaseField
type ProgramScalarField = <Self::ProgramCurveParameters as ModelParameters>::ScalarField
type InnerSNARK = Groth16<Self::InnerCurve, InnerPublicVariables<Testnet1>>
type InnerSNARK = Groth16<Self::InnerCurve, InnerPublicVariables<Testnet1>>
SNARK for inner circuit proof generation.
type InnerSNARKGadget = Groth16VerifierGadget<Self::InnerCurve, PairingGadget>
type InnerProof = AleoObject<<Self::InnerSNARK as SNARK>::Proof, { Self::INNER_PROOF_PREFIX }, { Self::INNER_PROOF_SIZE_IN_BYTES }>
type OuterSNARK = Groth16<Self::OuterCurve, OuterPublicVariables<Testnet1>>
type OuterSNARK = Groth16<Self::OuterCurve, OuterPublicVariables<Testnet1>>
SNARK for proof-verification checks.
type OuterProof = AleoObject<<Self::OuterSNARK as SNARK>::Proof, { Self::OUTER_PROOF_PREFIX }, { Self::OUTER_PROOF_SIZE_IN_BYTES }>
type ProgramSNARK = Groth16<Self::InnerCurve, ProgramPublicVariables<Self>>
type ProgramSNARK = Groth16<Self::InnerCurve, ProgramPublicVariables<Self>>
SNARK for Aleo program functions.
type ProgramSNARKGadget = Groth16VerifierGadget<Self::InnerCurve, PairingGadget>
type ProgramProvingKey = <Self::ProgramSNARK as SNARK>::ProvingKey
type ProgramVerifyingKey = <Self::ProgramSNARK as SNARK>::VerifyingKey
type ProgramProof = AleoObject<<Self::ProgramSNARK as SNARK>::Proof, { Self::PROGRAM_PROOF_PREFIX }, { Self::PROGRAM_PROOF_SIZE_IN_BYTES }>
type PoSWSNARK = MarlinSNARK<Self::InnerScalarField, Self::OuterScalarField, SonicKZG10<Self::InnerCurve>, FiatShamirAlgebraicSpongeRng<Self::InnerScalarField, Self::OuterScalarField, PoseidonSponge<Self::OuterScalarField, 6, 1>>, MarlinPoswMode, Vec<Self::InnerScalarField>>
type PoSWSNARK = MarlinSNARK<Self::InnerScalarField, Self::OuterScalarField, SonicKZG10<Self::InnerCurve>, FiatShamirAlgebraicSpongeRng<Self::InnerScalarField, Self::OuterScalarField, PoseidonSponge<Self::OuterScalarField, 6, 1>>, MarlinPoswMode, Vec<Self::InnerScalarField>>
SNARK for PoSW.
type PoSWProof = AleoObject<<Self::PoSWSNARK as SNARK>::Proof, { Self::HEADER_PROOF_PREFIX }, { Self::HEADER_PROOF_SIZE_IN_BYTES }>
type PoSW = PoSW<Self>
type AccountEncryptionScheme = ECIESPoseidonEncryption<Self::ProgramCurveParameters>
type AccountEncryptionScheme = ECIESPoseidonEncryption<Self::ProgramCurveParameters>
Encryption scheme for accounts. Invoked only over Self::InnerScalarField
.
type AccountEncryptionGadget = ECIESPoseidonEncryptionGadget<Self::ProgramCurveParameters, Self::InnerScalarField>
type AccountSeedPRF = PoseidonPRF<Self::ProgramScalarField, 4, false>
type AccountSeedPRF = PoseidonPRF<Self::ProgramScalarField, 4, false>
PRF for deriving the account private key from a seed.
type AccountSeed = <Self::AccountSeedPRF as PRF>::Seed
type AccountSignatureScheme = AleoSignatureScheme<Self::ProgramCurveParameters>
type AccountSignatureScheme = AleoSignatureScheme<Self::ProgramCurveParameters>
Signature scheme for transaction authorizations. Invoked only over Self::InnerScalarField
.
type AccountSignatureGadget = AleoSignatureSchemeGadget<Self::ProgramCurveParameters, Self::InnerScalarField>
type AccountSignaturePublicKey = <Self::AccountSignatureScheme as SignatureScheme>::PublicKey
type AccountSignature = AleoObject<<Self::AccountSignatureScheme as SignatureScheme>::Signature, { Self::SIGNATURE_PREFIX }, { Self::SIGNATURE_SIZE_IN_BYTES }>
type BlockHashCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
type BlockHashCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
CRH schemes for the block hash. Invoked only over Self::InnerScalarField
.
type BlockHashCRHGadget = BHPCRHGadget<Self::ProgramProjectiveCurve, Self::InnerScalarField, Self::ProgramAffineCurveGadget, 16, 32>
type BlockHash = AleoLocator<<Self::BlockHashCRH as CRH>::Output, { Self::BLOCK_HASH_PREFIX }>
type BlockHeaderRootCRH = PedersenCompressedCRH<Self::ProgramProjectiveCurve, 4, 128>
type BlockHeaderRootCRH = PedersenCompressedCRH<Self::ProgramProjectiveCurve, 4, 128>
Masked Merkle scheme for the block header root on Proof of Succinct Work (PoSW). Invoked only over Self::InnerScalarField
.
type BlockHeaderRootCRHGadget = PedersenCompressedCRHGadget<Self::ProgramProjectiveCurve, Self::InnerScalarField, Self::ProgramAffineCurveGadget, 4, 128>
type BlockHeaderRootParameters = MaskedMerkleTreeParameters<Self::BlockHeaderRootCRH, { Self::HEADER_TREE_DEPTH }>
type BlockHeaderRoot = AleoLocator<<Self::BlockHeaderRootCRH as CRH>::Output, { Self::HEADER_ROOT_PREFIX }>
type CommitmentScheme = BHPCRH<Self::ProgramProjectiveCurve, 41, 63>
type CommitmentScheme = BHPCRH<Self::ProgramProjectiveCurve, 41, 63>
Commitment scheme for records. Invoked only over Self::InnerScalarField
.
type CommitmentGadget = BHPCRHGadget<Self::ProgramProjectiveCurve, Self::InnerScalarField, Self::ProgramAffineCurveGadget, 41, 63>
type Commitment = AleoLocator<<Self::CommitmentScheme as CRH>::Output, { Self::COMMITMENT_PREFIX }>
type FunctionIDCRH = PoseidonCRH<Self::OuterScalarField, 34>
type FunctionIDCRH = PoseidonCRH<Self::OuterScalarField, 34>
CRH for deriving function IDs. Invoked only over Self::OuterScalarField
.
type FunctionIDCRHGadget = PoseidonCRHGadget<Self::OuterScalarField, 34>
type FunctionID = AleoLocator<<Self::FunctionIDCRH as CRH>::Output, { Self::FUNCTION_ID_PREFIX }>
type FunctionInputsCRH = PoseidonCRH<Self::InnerScalarField, 128>
type FunctionInputsCRH = PoseidonCRH<Self::InnerScalarField, 128>
Crypto hash for deriving the function inputs hash. Invoked only over Self::InnerScalarField
.
type FunctionInputsCRHGadget = PoseidonCRHGadget<Self::InnerScalarField, 128>
type FunctionInputsHash = AleoLocator<<Self::FunctionInputsCRH as CRH>::Output, { Self::FUNCTION_INPUTS_HASH_PREFIX }>
type InnerCircuitIDCRH = BHPCRH<EdwardsBW6, 85, 63>
type InnerCircuitIDCRH = BHPCRH<EdwardsBW6, 85, 63>
CRH for hash of the Self::InnerSNARK
verifying keys. Invoked only over Self::OuterScalarField
.
type InnerCircuitIDCRHGadget = BHPCRHGadget<EdwardsBW6, Self::OuterScalarField, EdwardsBW6Gadget, 85, 63>
type InnerCircuitID = AleoLocator<<Self::InnerCircuitIDCRH as CRH>::Output, { Self::INNER_CIRCUIT_ID_PREFIX }>
type LedgerRootCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
type LedgerRootCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
Merkle scheme for computing the ledger root. Invoked only over Self::InnerScalarField
.
type LedgerRootCRHGadget = BHPCRHGadget<Self::ProgramProjectiveCurve, Self::InnerScalarField, Self::ProgramAffineCurveGadget, 16, 32>
type LedgerRootParameters = MerkleTreeParameters<Self::LedgerRootCRH, { Self::LEDGER_TREE_DEPTH }>
type LedgerRoot = AleoLocator<<Self::LedgerRootCRH as CRH>::Output, { Self::LEDGER_ROOT_PREFIX }>
type PoSWMaskPRF = PoseidonPRF<Self::InnerScalarField, 4, false>
type PoSWMaskPRF = PoseidonPRF<Self::InnerScalarField, 4, false>
Schemes for PoSW. Invoked only over Self::InnerScalarField
.
type PoSWMaskPRFGadget = PoseidonPRFGadget<Self::InnerScalarField, 4, false>
type PoSWNonce = AleoLocator<Self::InnerScalarField, { Self::HEADER_NONCE_PREFIX }>
type ProgramIDCRH = BHPCRH<EdwardsBW6, 16, 48>
type ProgramIDCRH = BHPCRH<EdwardsBW6, 16, 48>
CRH for deriving program IDs. Invoked only over Self::OuterScalarField
.
type ProgramIDCRHGadget = BHPCRHGadget<EdwardsBW6, Self::OuterScalarField, EdwardsBW6Gadget, 16, 48>
type ProgramIDParameters = MerkleTreeParameters<Self::ProgramIDCRH, { Self::PROGRAM_TREE_DEPTH }>
type ProgramID = AleoLocator<<Self::ProgramIDCRH as CRH>::Output, { Self::PROGRAM_ID_PREFIX }>
type RecordCiphertext = AleoObject<Ciphertext<Self>, { Self::RECORD_CIPHERTEXT_PREFIX }, { Self::RECORD_CIPHERTEXT_SIZE_IN_BYTES }>
type RecordCiphertext = AleoObject<Ciphertext<Self>, { Self::RECORD_CIPHERTEXT_PREFIX }, { Self::RECORD_CIPHERTEXT_SIZE_IN_BYTES }>
Encryption scheme for records. Invoked only over Self::InnerScalarField
.
type RecordRandomizer = AleoLocator<<Self::AccountEncryptionScheme as EncryptionScheme>::CiphertextRandomizer, { Self::RECORD_RANDOMIZER_PREFIX }>
type RecordViewKey = AleoObject<<Self::AccountEncryptionScheme as EncryptionScheme>::SymmetricKey, { Self::RECORD_VIEW_KEY_PREFIX }, { Self::RECORD_VIEW_KEY_SIZE_IN_BYTES }>
type RecordViewKeyCommitment = AleoLocator<<Self::AccountEncryptionScheme as EncryptionScheme>::SymmetricKeyCommitment, { Self::RECORD_VIEW_KEY_COMMITMENT_PREFIX }>
type SerialNumberPRF = PoseidonPRF<Self::InnerScalarField, 4, false>
type SerialNumberPRF = PoseidonPRF<Self::InnerScalarField, 4, false>
PRF for computing serial numbers. Invoked only over Self::InnerScalarField
.
type SerialNumberPRFGadget = PoseidonPRFGadget<Self::InnerScalarField, 4, false>
type SerialNumber = AleoLocator<<Self::SerialNumberPRF as PRF>::Output, { Self::SERIAL_NUMBER_PREFIX }>
type TransactionsRootCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
type TransactionsRootCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
Merkle scheme for computing the block transactions root. Invoked only over Self::InnerScalarField
.
type TransactionsRootCRHGadget = BHPCRHGadget<Self::ProgramProjectiveCurve, Self::InnerScalarField, Self::ProgramAffineCurveGadget, 16, 32>
type TransactionsRootParameters = MerkleTreeParameters<Self::TransactionsRootCRH, { Self::HEADER_TRANSACTIONS_TREE_DEPTH }>
type TransactionsRoot = AleoLocator<<Self::TransactionsRootCRH as CRH>::Output, { Self::HEADER_TRANSACTIONS_ROOT_PREFIX }>
type TransactionIDCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
type TransactionIDCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
Merkle scheme for computing the transaction ID. Invoked only over Self::InnerScalarField
.
type TransactionIDCRHGadget = BHPCRHGadget<Self::ProgramProjectiveCurve, Self::InnerScalarField, Self::ProgramAffineCurveGadget, 16, 32>
type TransactionIDParameters = MerkleTreeParameters<Self::TransactionIDCRH, { Self::TRANSACTION_TREE_DEPTH }>
type TransactionID = AleoLocator<<Self::TransactionIDCRH as CRH>::Output, { Self::TRANSACTION_ID_PREFIX }>
type TransitionIDCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
type TransitionIDCRH = BHPCRH<Self::ProgramProjectiveCurve, 16, 32>
Merkle scheme for computing the transition ID. Invoked only over Self::InnerScalarField
.
type TransitionIDCRHGadget = BHPCRHGadget<Self::ProgramProjectiveCurve, Self::InnerScalarField, Self::ProgramAffineCurveGadget, 16, 32>
type TransitionIDParameters = MerkleTreeParameters<Self::TransitionIDCRH, { Self::TRANSITION_TREE_DEPTH }>
type TransitionID = AleoLocator<<Self::TransitionIDCRH as CRH>::Output, { Self::TRANSITION_ID_PREFIX }>
fn account_encryption_scheme() -> &'static Self::AccountEncryptionScheme
fn account_signature_scheme() -> &'static Self::AccountSignatureScheme
fn block_hash_crh() -> &'static Self::BlockHashCRH
fn block_header_root_parameters() -> &'static Self::BlockHeaderRootParameters
fn commitment_scheme() -> &'static Self::CommitmentScheme
fn function_id_crh() -> &'static Self::FunctionIDCRH
fn inner_circuit_id_crh() -> &'static Self::InnerCircuitIDCRH
fn ledger_root_parameters() -> &'static Self::LedgerRootParameters
fn program_id_parameters() -> &'static Self::ProgramIDParameters
fn transactions_root_parameters() -> &'static Self::TransactionsRootParameters
fn transaction_id_parameters() -> &'static Self::TransactionIDParameters
fn transition_id_parameters() -> &'static Self::TransitionIDParameters
fn inner_proving_key() -> &'static <Self::InnerSNARK as SNARK>::ProvingKey
fn inner_verifying_key() -> &'static <Self::InnerSNARK as SNARK>::VerifyingKey
fn outer_proving_key() -> &'static <Self::OuterSNARK as SNARK>::ProvingKey
fn outer_verifying_key() -> &'static <Self::OuterSNARK as SNARK>::VerifyingKey
fn noop_circuit_proving_key(
) -> &'static <Self::ProgramSNARK as SNARK>::ProvingKey
fn noop_circuit_verifying_key(
) -> &'static <Self::ProgramSNARK as SNARK>::VerifyingKey
fn posw_proving_key() -> &'static <Self::PoSWSNARK as SNARK>::ProvingKey
fn posw_verifying_key() -> &'static <Self::PoSWSNARK as SNARK>::VerifyingKey
fn inner_circuit_id() -> &'static Self::InnerCircuitID
fn noop_program() -> &'static Program<Self>
fn noop_program_id() -> &'static Self::ProgramID
fn noop_program_path() -> &'static MerklePath<Self::ProgramIDParameters>
fn noop_function_id() -> &'static Self::FunctionID
fn posw() -> &'static Self::PoSW
fn genesis_block() -> &'static Block<Self>
const NUM_TOTAL_RECORDS: usize
sourcefn function_id(
verifying_key: &<Self::ProgramSNARK as SNARK>::VerifyingKey
) -> Result<Self::FunctionID>
fn function_id(
verifying_key: &<Self::ProgramSNARK as SNARK>::VerifyingKey
) -> Result<Self::FunctionID>
Returns the function ID given a program function verifying key.
impl Copy for Testnet1
impl Eq for Testnet1
impl StructuralEq for Testnet1
impl StructuralPartialEq for Testnet1
Auto Trait Implementations
impl RefUnwindSafe for Testnet1
impl Send for Testnet1
impl Sync for Testnet1
impl Unpin for Testnet1
impl UnwindSafe for Testnet1
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more