From fa5f4250874203af80ebc461b0a3d659b3c32f04 Mon Sep 17 00:00:00 2001 From: Howard Wu <9260812+howardwu@users.noreply.github.com> Date: Sat, 10 Feb 2024 17:49:12 -0800 Subject: [PATCH 1/5] Updates Testnet3 to MainnetV0 --- .github/workflows/benchmarks.yml | 2 +- README.md | 2 +- .../src/polycommit/kzg10/data_structures.rs | 2 +- circuit/environment/src/circuit.rs | 8 +- circuit/network/src/v0.rs | 8 +- .../program/src/data/literal/cast/boolean.rs | 96 +- .../program/src/data/literal/cast/field.rs | 100 +- .../program/src/data/literal/cast/integer.rs | 984 +++++++------- .../program/src/data/literal/cast/scalar.rs | 100 +- .../src/data/literal/cast_lossy/boolean.rs | 111 +- .../src/data/literal/cast_lossy/field.rs | 115 +- .../src/data/literal/cast_lossy/integer.rs | 1194 ++++++++++------- .../src/data/literal/cast_lossy/scalar.rs | 118 +- console/account/benches/account.rs | 4 +- console/account/src/address/try_from.rs | 4 +- console/account/src/compute_key/bytes.rs | 4 +- console/account/src/compute_key/from_bits.rs | 4 +- console/account/src/compute_key/serialize.rs | 4 +- console/account/src/compute_key/to_address.rs | 4 +- console/account/src/compute_key/to_bits.rs | 4 +- console/account/src/compute_key/try_from.rs | 4 +- console/account/src/graph_key/bytes.rs | 4 +- console/account/src/graph_key/serialize.rs | 4 +- console/account/src/graph_key/string.rs | 4 +- console/account/src/graph_key/try_from.rs | 4 +- console/account/src/lib.rs | 4 +- console/account/src/private_key/bytes.rs | 4 +- console/account/src/private_key/serialize.rs | 4 +- console/account/src/private_key/sign.rs | 4 +- console/account/src/private_key/string.rs | 4 +- console/account/src/signature/bytes.rs | 4 +- console/account/src/signature/from_bits.rs | 4 +- console/account/src/signature/mod.rs | 4 +- console/account/src/signature/parse.rs | 4 +- console/account/src/signature/to_bits.rs | 4 +- console/account/src/signature/verify.rs | 4 +- console/account/src/view_key/bytes.rs | 4 +- console/account/src/view_key/mod.rs | 4 +- console/account/src/view_key/serialize.rs | 4 +- console/account/src/view_key/string.rs | 4 +- console/account/src/view_key/to_address.rs | 4 +- console/account/src/view_key/try_from.rs | 4 +- .../collections/benches/kary_merkle_tree.rs | 4 +- console/collections/benches/merkle_tree.rs | 14 +- console/network/src/lib.rs | 4 +- .../src/{testnet3.rs => mainnet_v0.rs} | 50 +- console/program/src/data/access/bytes.rs | 4 +- console/program/src/data/access/parse.rs | 4 +- console/program/src/data/access/serialize.rs | 4 +- console/program/src/data/ciphertext/bytes.rs | 4 +- .../program/src/data/ciphertext/decrypt.rs | 4 +- console/program/src/data/ciphertext/parse.rs | 4 +- .../program/src/data/ciphertext/serialize.rs | 4 +- console/program/src/data/future/bytes.rs | 4 +- console/program/src/data/future/parse.rs | 4 +- console/program/src/data/identifier/bytes.rs | 4 +- .../program/src/data/identifier/from_bits.rs | 4 +- .../program/src/data/identifier/from_field.rs | 4 +- console/program/src/data/identifier/mod.rs | 4 +- console/program/src/data/identifier/parse.rs | 4 +- .../program/src/data/identifier/serialize.rs | 4 +- .../src/data/identifier/size_in_bits.rs | 4 +- .../program/src/data/identifier/to_bits.rs | 4 +- .../program/src/data/identifier/to_field.rs | 4 +- console/program/src/data/literal/bytes.rs | 4 +- console/program/src/data/literal/from_bits.rs | 4 +- console/program/src/data/literal/parse.rs | 4 +- console/program/src/data/literal/serialize.rs | 4 +- console/program/src/data/plaintext/bytes.rs | 4 +- console/program/src/data/plaintext/equal.rs | 4 +- console/program/src/data/plaintext/mod.rs | 4 +- console/program/src/data/plaintext/parse.rs | 4 +- .../program/src/data/plaintext/serialize.rs | 4 +- console/program/src/data/record/bytes.rs | 4 +- console/program/src/data/record/decrypt.rs | 4 +- .../program/src/data/record/entry/parse.rs | 4 +- console/program/src/data/record/equal.rs | 4 +- console/program/src/data/record/is_owner.rs | 4 +- .../src/data/record/parse_plaintext.rs | 4 +- console/program/src/data/record/serialize.rs | 4 +- console/program/src/data/register/mod.rs | 4 +- console/program/src/data/register/parse.rs | 4 +- .../program/src/data/register/serialize.rs | 4 +- console/program/src/data/value/bytes.rs | 4 +- console/program/src/data/value/parse.rs | 4 +- console/program/src/data/value/serialize.rs | 4 +- .../src/data_types/array_type/bytes.rs | 2 +- .../program/src/data_types/array_type/mod.rs | 4 +- .../src/data_types/array_type/serialize.rs | 6 +- .../src/data_types/finalize_type/parse.rs | 4 +- .../src/data_types/finalize_type/serialize.rs | 4 +- .../src/data_types/plaintext_type/parse.rs | 4 +- .../data_types/plaintext_type/serialize.rs | 4 +- .../src/data_types/record_type/bytes.rs | 4 +- .../record_type/entry_type/parse.rs | 4 +- .../record_type/entry_type/serialize.rs | 4 +- .../src/data_types/record_type/parse.rs | 4 +- .../src/data_types/record_type/serialize.rs | 4 +- .../src/data_types/register_type/parse.rs | 4 +- .../src/data_types/register_type/serialize.rs | 4 +- .../src/data_types/struct_type/bytes.rs | 4 +- .../src/data_types/struct_type/parse.rs | 4 +- .../src/data_types/struct_type/serialize.rs | 4 +- .../src/data_types/value_type/parse.rs | 4 +- .../src/data_types/value_type/serialize.rs | 4 +- console/program/src/id/mod.rs | 4 +- console/program/src/id/parse.rs | 4 +- console/program/src/id/serialize.rs | 4 +- console/program/src/id/to_bits.rs | 4 +- console/program/src/locator/parse.rs | 4 +- console/program/src/locator/serialize.rs | 4 +- console/program/src/owner/bytes.rs | 4 +- console/program/src/owner/mod.rs | 4 +- .../program/src/request/input_id/serialize.rs | 4 +- console/program/src/request/mod.rs | 4 +- console/program/src/request/verify.rs | 4 +- console/program/src/state_path/bytes.rs | 4 +- .../src/state_path/configuration/mod.rs | 2 +- .../program/src/state_path/header_leaf/mod.rs | 4 +- console/program/src/state_path/parse.rs | 4 +- console/program/src/state_path/serialize.rs | 4 +- .../src/state_path/transaction_leaf/mod.rs | 4 +- .../src/state_path/transition_leaf/mod.rs | 4 +- console/program/src/state_path/verify.rs | 4 +- console/types/benches/group.rs | 4 +- ledger/authority/src/lib.rs | 2 +- ledger/benches/block.rs | 4 +- ledger/benches/transaction.rs | 26 +- ledger/block/src/bytes.rs | 4 +- ledger/block/src/genesis.rs | 4 +- ledger/block/src/header/bytes.rs | 4 +- ledger/block/src/header/genesis.rs | 4 +- ledger/block/src/header/merkle.rs | 4 +- ledger/block/src/header/metadata/bytes.rs | 4 +- ledger/block/src/header/metadata/genesis.rs | 4 +- ledger/block/src/header/metadata/mod.rs | 2 +- ledger/block/src/header/mod.rs | 2 +- ledger/block/src/helpers/target.rs | 4 +- ledger/block/src/lib.rs | 2 +- ledger/block/src/ratifications/merkle.rs | 4 +- ledger/block/src/ratifications/mod.rs | 2 +- ledger/block/src/ratifications/serialize.rs | 4 +- ledger/block/src/ratify/mod.rs | 4 +- ledger/block/src/serialize.rs | 4 +- ledger/block/src/solutions/serialize.rs | 2 +- .../block/src/transaction/deployment/mod.rs | 4 +- ledger/block/src/transaction/execution/mod.rs | 2 +- ledger/block/src/transaction/fee/mod.rs | 2 +- ledger/block/src/transaction/mod.rs | 4 +- .../block/src/transactions/confirmed/mod.rs | 6 +- ledger/block/src/transactions/merkle.rs | 4 +- ledger/block/src/transactions/mod.rs | 4 +- ledger/block/src/transactions/rejected/mod.rs | 4 +- ledger/block/src/transactions/serialize.rs | 4 +- ledger/block/src/transition/input/mod.rs | 4 +- ledger/block/src/transition/merkle.rs | 4 +- ledger/block/src/transition/mod.rs | 2 +- ledger/block/src/transition/output/mod.rs | 4 +- ledger/coinbase/benches/coinbase_puzzle.rs | 18 +- .../helpers/coinbase_solution/serialize.rs | 2 +- .../src/helpers/epoch_challenge/bytes.rs | 4 +- .../src/helpers/partial_solution/bytes.rs | 4 +- .../src/helpers/partial_solution/serialize.rs | 4 +- .../src/helpers/partial_solution/string.rs | 4 +- .../src/helpers/prover_solution/bytes.rs | 4 +- .../src/helpers/prover_solution/serialize.rs | 4 +- .../src/helpers/prover_solution/string.rs | 4 +- .../src/helpers/puzzle_commitment/bytes.rs | 4 +- .../helpers/puzzle_commitment/serialize.rs | 4 +- .../src/helpers/puzzle_commitment/string.rs | 4 +- ledger/coinbase/src/tests.rs | 26 +- ledger/committee/src/lib.rs | 4 +- ledger/committee/src/prop_tests.rs | 2 +- ledger/narwhal/batch-certificate/src/lib.rs | 6 +- ledger/narwhal/batch-header/src/lib.rs | 4 +- ledger/narwhal/subdag/src/lib.rs | 6 +- ledger/narwhal/transmission-id/src/lib.rs | 4 +- ledger/narwhal/transmission-id/src/string.rs | 4 +- ledger/narwhal/transmission/src/lib.rs | 4 +- ledger/src/get.rs | 4 +- ledger/src/lib.rs | 4 +- ledger/store/src/block/mod.rs | 2 +- .../store/src/helpers/memory/internal/map.rs | 4 +- .../src/helpers/memory/internal/nested_map.rs | 4 +- .../store/src/helpers/rocksdb/internal/map.rs | 4 +- .../helpers/rocksdb/internal/nested_map.rs | 4 +- .../src/helpers/rocksdb/internal/tests.rs | 4 +- ledger/store/src/program/committee.rs | 2 +- ledger/store/src/program/finalize.rs | 4 +- ledger/store/src/transaction/execution.rs | 2 +- ledger/test-helpers/src/lib.rs | 2 +- parameters/examples/inclusion.rs | 6 +- parameters/examples/setup.rs | 6 +- .../scripts/{testnet3 => mainnet}/credits.sh | 4 +- parameters/scripts/mainnet/inclusion.sh | 9 + parameters/scripts/testnet3/inclusion.sh | 9 - parameters/src/lib.rs | 2 +- .../src/{testnet3 => mainnet}/genesis.rs | 0 parameters/src/{testnet3 => mainnet}/mod.rs | 26 +- .../src/{testnet3 => mainnet}/powers.rs | 0 .../resources/beta-h.metadata | 0 .../resources/beta-h.usrs | Bin .../resources/block.genesis | Bin .../resources/bond_public.metadata | 0 .../resources/bond_public.verifier | Bin .../resources/claim_unbond_public.metadata | 0 .../resources/claim_unbond_public.verifier | Bin .../resources/fee_private.metadata | 0 .../resources/fee_private.verifier | Bin .../resources/fee_public.metadata | 0 .../resources/fee_public.verifier | Bin .../resources/genesis.metadata | 0 .../resources/inclusion.metadata | 0 .../resources/inclusion.verifier | Bin .../resources/join.metadata | 0 .../resources/join.verifier | Bin .../resources/mint.metadata | 0 .../resources/neg-powers-of-beta.metadata | 0 .../resources/neg-powers-of-beta.usrs | Bin .../resources/powers-of-beta-15.metadata | 0 .../resources/powers-of-beta-15.usrs | Bin .../resources/powers-of-beta-16.metadata | 0 .../resources/powers-of-beta-16.usrs | Bin .../resources/powers-of-beta-17.metadata | 0 .../resources/powers-of-beta-18.metadata | 0 .../resources/powers-of-beta-19.metadata | 0 .../resources/powers-of-beta-20.metadata | 0 .../resources/powers-of-beta-21.metadata | 0 .../resources/powers-of-beta-22.metadata | 0 .../resources/powers-of-beta-23.metadata | 0 .../resources/powers-of-beta-24.metadata | 0 .../resources/powers-of-beta-25.metadata | 0 .../resources/powers-of-beta-26.metadata | 0 .../resources/powers-of-beta-27.metadata | 0 .../resources/powers-of-beta-28.metadata | 0 .../resources/powers-of-beta-gamma.metadata | 0 .../resources/powers-of-beta-gamma.usrs | Bin .../resources/set_validator_state.metadata | 0 .../resources/set_validator_state.verifier | Bin .../shifted-powers-of-beta-15.metadata | 0 .../resources/shifted-powers-of-beta-15.usrs | Bin .../shifted-powers-of-beta-16.metadata | 0 .../resources/shifted-powers-of-beta-16.usrs | Bin .../shifted-powers-of-beta-17.metadata | 0 .../shifted-powers-of-beta-18.metadata | 0 .../shifted-powers-of-beta-19.metadata | 0 .../shifted-powers-of-beta-20.metadata | 0 .../shifted-powers-of-beta-21.metadata | 0 .../shifted-powers-of-beta-22.metadata | 0 .../shifted-powers-of-beta-23.metadata | 0 .../shifted-powers-of-beta-24.metadata | 0 .../shifted-powers-of-beta-25.metadata | 0 .../shifted-powers-of-beta-26.metadata | 0 .../shifted-powers-of-beta-27.metadata | 0 .../shifted-powers-of-beta-28.metadata | 0 .../resources/split.metadata | 0 .../resources/split.verifier | Bin .../resources/transfer_private.metadata | 0 .../resources/transfer_private.verifier | Bin .../transfer_private_to_public.metadata | 0 .../transfer_private_to_public.verifier | Bin .../resources/transfer_public.metadata | 0 .../resources/transfer_public.verifier | Bin .../transfer_public_to_private.metadata | 0 .../transfer_public_to_private.verifier | Bin .../unbond_delegator_as_validator.metadata | 0 .../unbond_delegator_as_validator.verifier | Bin .../resources/unbond_public.metadata | 0 .../resources/unbond_public.verifier | Bin synthesizer/benches/kary_merkle_tree.rs | 6 +- synthesizer/process/src/execute.rs | 2 +- synthesizer/process/src/finalize.rs | 2 +- synthesizer/process/src/lib.rs | 4 +- .../process/src/stack/authorization/mod.rs | 2 +- synthesizer/process/src/tests/test_credits.rs | 4 +- synthesizer/process/src/tests/test_execute.rs | 26 +- synthesizer/program/benches/instruction.rs | 342 ++--- synthesizer/program/src/bytes.rs | 4 +- synthesizer/program/src/closure/bytes.rs | 4 +- synthesizer/program/src/closure/input/mod.rs | 4 +- .../program/src/closure/input/parse.rs | 4 +- synthesizer/program/src/closure/mod.rs | 2 +- synthesizer/program/src/closure/output/mod.rs | 4 +- .../program/src/closure/output/parse.rs | 4 +- synthesizer/program/src/closure/parse.rs | 4 +- synthesizer/program/src/finalize/bytes.rs | 4 +- synthesizer/program/src/finalize/input/mod.rs | 4 +- .../program/src/finalize/input/parse.rs | 4 +- synthesizer/program/src/finalize/mod.rs | 2 +- synthesizer/program/src/finalize/parse.rs | 4 +- synthesizer/program/src/function/bytes.rs | 4 +- synthesizer/program/src/function/input/mod.rs | 4 +- .../program/src/function/input/parse.rs | 4 +- synthesizer/program/src/function/mod.rs | 2 +- .../program/src/function/output/mod.rs | 4 +- .../program/src/function/output/parse.rs | 4 +- synthesizer/program/src/function/parse.rs | 4 +- synthesizer/program/src/import/mod.rs | 4 +- synthesizer/program/src/import/parse.rs | 4 +- synthesizer/program/src/lib.rs | 4 +- .../program/src/logic/command/await_.rs | 4 +- .../program/src/logic/command/branch.rs | 4 +- .../program/src/logic/command/contains.rs | 4 +- synthesizer/program/src/logic/command/get.rs | 4 +- .../program/src/logic/command/get_or_use.rs | 4 +- synthesizer/program/src/logic/command/mod.rs | 4 +- .../program/src/logic/command/position.rs | 4 +- .../program/src/logic/command/rand_chacha.rs | 4 +- .../program/src/logic/command/remove.rs | 4 +- synthesizer/program/src/logic/command/set.rs | 4 +- .../src/logic/finalize_operation/mod.rs | 4 +- .../program/src/logic/instruction/bytes.rs | 4 +- .../program/src/logic/instruction/mod.rs | 4 +- .../src/logic/instruction/operand/mod.rs | 4 +- .../src/logic/instruction/operand/parse.rs | 4 +- .../src/logic/instruction/operation/assert.rs | 4 +- .../src/logic/instruction/operation/async_.rs | 4 +- .../src/logic/instruction/operation/call.rs | 4 +- .../src/logic/instruction/operation/cast.rs | 4 +- .../src/logic/instruction/operation/commit.rs | 4 +- .../src/logic/instruction/operation/hash.rs | 4 +- .../src/logic/instruction/operation/is.rs | 4 +- .../src/logic/instruction/operation/macros.rs | 4 +- .../instruction/operation/sign_verify.rs | 4 +- .../program/src/logic/instruction/parse.rs | 4 +- synthesizer/program/src/mapping/bytes.rs | 4 +- synthesizer/program/src/mapping/key/mod.rs | 4 +- synthesizer/program/src/mapping/key/parse.rs | 4 +- synthesizer/program/src/mapping/parse.rs | 4 +- synthesizer/program/src/mapping/value/mod.rs | 4 +- .../program/src/mapping/value/parse.rs | 4 +- synthesizer/program/src/parse.rs | 4 +- synthesizer/program/src/serialize.rs | 4 +- synthesizer/program/tests/helpers/sample.rs | 4 +- .../program/tests/instruction/assert.rs | 4 +- .../program/tests/instruction/commit.rs | 4 +- synthesizer/program/tests/instruction/hash.rs | 4 +- synthesizer/program/tests/instruction/is.rs | 4 +- synthesizer/snark/src/certificate/parse.rs | 4 +- synthesizer/snark/src/lib.rs | 8 +- synthesizer/snark/src/proof/parse.rs | 4 +- synthesizer/src/vm/execute.rs | 4 +- synthesizer/src/vm/helpers/macros.rs | 16 +- synthesizer/src/vm/helpers/rewards.rs | 2 +- synthesizer/src/vm/mod.rs | 30 +- synthesizer/tests/utilities/mod.rs | 2 +- vm/cli/commands/mod.rs | 2 +- vm/cli/helpers/env.rs | 2 +- vm/file/aleo.rs | 2 +- vm/file/avm.rs | 2 +- vm/file/prover.rs | 2 +- vm/file/verifier.rs | 2 +- vm/package/clean.rs | 2 +- vm/package/deploy.rs | 2 +- vm/package/is_build_required.rs | 8 +- vm/package/mod.rs | 10 +- wasm/src/tests.rs | 6 +- 357 files changed, 2379 insertions(+), 2059 deletions(-) rename console/network/src/{testnet3.rs => mainnet_v0.rs} (89%) rename parameters/scripts/{testnet3 => mainnet}/credits.sh (62%) create mode 100755 parameters/scripts/mainnet/inclusion.sh delete mode 100755 parameters/scripts/testnet3/inclusion.sh rename parameters/src/{testnet3 => mainnet}/genesis.rs (100%) rename parameters/src/{testnet3 => mainnet}/mod.rs (90%) rename parameters/src/{testnet3 => mainnet}/powers.rs (100%) rename parameters/src/{testnet3 => mainnet}/resources/beta-h.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/beta-h.usrs (100%) rename parameters/src/{testnet3 => mainnet}/resources/block.genesis (100%) rename parameters/src/{testnet3 => mainnet}/resources/bond_public.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/bond_public.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/claim_unbond_public.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/claim_unbond_public.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/fee_private.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/fee_private.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/fee_public.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/fee_public.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/genesis.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/inclusion.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/inclusion.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/join.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/join.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/mint.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/neg-powers-of-beta.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/neg-powers-of-beta.usrs (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-15.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-15.usrs (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-16.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-16.usrs (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-17.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-18.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-19.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-20.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-21.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-22.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-23.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-24.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-25.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-26.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-27.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-28.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-gamma.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/powers-of-beta-gamma.usrs (100%) rename parameters/src/{testnet3 => mainnet}/resources/set_validator_state.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/set_validator_state.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-15.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-15.usrs (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-16.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-16.usrs (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-17.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-18.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-19.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-20.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-21.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-22.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-23.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-24.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-25.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-26.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-27.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/shifted-powers-of-beta-28.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/split.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/split.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_private.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_private.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_private_to_public.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_private_to_public.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_public.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_public.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_public_to_private.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/transfer_public_to_private.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/unbond_delegator_as_validator.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/unbond_delegator_as_validator.verifier (100%) rename parameters/src/{testnet3 => mainnet}/resources/unbond_public.metadata (100%) rename parameters/src/{testnet3 => mainnet}/resources/unbond_public.verifier (100%) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 32054890db..c2e1481726 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -3,7 +3,7 @@ name: Run snarkVM Benchmarks on: push: branches: - - 'testnet3' + - 'mainnet' jobs: # Run benchmarks and stores the output to a file diff --git a/README.md b/README.md index 81bf265b44..142fa532db 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

- + diff --git a/algorithms/src/polycommit/kzg10/data_structures.rs b/algorithms/src/polycommit/kzg10/data_structures.rs index 495e817788..0ceae0b654 100644 --- a/algorithms/src/polycommit/kzg10/data_structures.rs +++ b/algorithms/src/polycommit/kzg10/data_structures.rs @@ -18,7 +18,7 @@ use crate::{ }; use snarkvm_curves::{AffineCurve, PairingCurve, PairingEngine, ProjectiveCurve}; use snarkvm_fields::{ConstraintFieldError, ToConstraintField, Zero}; -use snarkvm_parameters::testnet3::PowersOfG; +use snarkvm_parameters::mainnet::PowersOfG; use snarkvm_utilities::{ borrow::Cow, error, diff --git a/circuit/environment/src/circuit.rs b/circuit/environment/src/circuit.rs index 1fde647271..56ff721b0c 100644 --- a/circuit/environment/src/circuit.rs +++ b/circuit/environment/src/circuit.rs @@ -19,7 +19,7 @@ use core::{ fmt, }; -type Field = ::Field; +type Field = ::Field; thread_local! { pub(super) static CONSTRAINT_LIMIT: Cell> = Cell::new(None); @@ -33,10 +33,10 @@ thread_local! { pub struct Circuit; impl Environment for Circuit { - type Affine = ::Affine; + type Affine = ::Affine; type BaseField = Field; - type Network = console::Testnet3; - type ScalarField = ::Scalar; + type Network = console::MainnetV0; + type ScalarField = ::Scalar; /// Returns the `zero` constant. fn zero() -> LinearCombination { diff --git a/circuit/network/src/v0.rs b/circuit/network/src/v0.rs index 936e1e581c..26bda8513c 100644 --- a/circuit/network/src/v0.rs +++ b/circuit/network/src/v0.rs @@ -52,14 +52,14 @@ type E = Circuit; thread_local! { /// The group bases for the Aleo signature and encryption schemes. - static GENERATOR_G: Vec> = Vec::constant(::g_powers().to_vec()); + static GENERATOR_G: Vec> = Vec::constant(::g_powers().to_vec()); /// The encryption domain as a constant field element. - static ENCRYPTION_DOMAIN: Field = Field::constant(::encryption_domain()); + static ENCRYPTION_DOMAIN: Field = Field::constant(::encryption_domain()); /// The graph key domain as a constant field element. - static GRAPH_KEY_DOMAIN: Field = Field::constant(::graph_key_domain()); + static GRAPH_KEY_DOMAIN: Field = Field::constant(::graph_key_domain()); /// The serial number domain as a constant field element. - static SERIAL_NUMBER_DOMAIN: Field = Field::constant(::serial_number_domain()); + static SERIAL_NUMBER_DOMAIN: Field = Field::constant(::serial_number_domain()); /// The BHP hash function, which can take an input of up to 256 bits. static BHP_256: BHP256 = BHP256::::constant(console::BHP_256.clone()); diff --git a/circuit/program/src/data/literal/cast/boolean.rs b/circuit/program/src/data/literal/cast/boolean.rs index 955df86b40..6753261ca3 100644 --- a/circuit/program/src/data/literal/cast/boolean.rs +++ b/circuit/program/src/data/literal/cast/boolean.rs @@ -66,7 +66,7 @@ impl Cast> for Boolean { mod tests { use super::*; use console::Cast as _; - use console_root::{network::Testnet3, prelude::TestRng}; + use console_root::{network::MainnetV0, prelude::TestRng}; use snarkvm_circuit_types::environment::{count_is, Circuit, Eject, Inject, Mode, UpdatableCount}; use std::fmt::Debug; @@ -77,114 +77,114 @@ mod tests { i: usize, mode: Mode, _: &mut TestRng, - ) -> (console_root::types::Boolean, Boolean) { + ) -> (console_root::types::Boolean, Boolean) { (console_root::types::Boolean::new(i % 2 == 0), Boolean::new(mode, i % 2 == 0)) } - impl_check_cast!(cast, Boolean, console_root::types::Boolean::); + impl_check_cast!(cast, Boolean, console_root::types::Boolean::); #[test] fn test_boolean_to_address() { - check_cast::, console_root::types::Address>(Mode::Constant, count_is!(10, 0, 0, 0)); - check_cast::, console_root::types::Address>(Mode::Public, count_is!(10, 0, 0, 0)); - check_cast::, console_root::types::Address>(Mode::Private, count_is!(10, 0, 0, 0)); + check_cast::, console_root::types::Address>(Mode::Constant, count_is!(10, 0, 0, 0)); + check_cast::, console_root::types::Address>(Mode::Public, count_is!(10, 0, 0, 0)); + check_cast::, console_root::types::Address>(Mode::Private, count_is!(10, 0, 0, 0)); } #[test] fn test_boolean_to_boolean() { - check_cast::, console_root::types::Boolean>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Boolean>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Boolean>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Boolean>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Boolean>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Boolean>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_boolean_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_boolean_to_group() { - check_cast::, console_root::types::Group>(Mode::Constant, count_is!(10, 0, 0, 0)); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(10, 0, 0, 0)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(10, 0, 0, 0)); + check_cast::, console_root::types::Group>(Mode::Constant, count_is!(10, 0, 0, 0)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(10, 0, 0, 0)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(10, 0, 0, 0)); } #[test] fn test_boolean_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(16, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(16, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(16, 0, 0, 0)); } #[test] fn test_boolean_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(32, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(32, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(32, 0, 0, 0)); } #[test] fn test_boolean_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(64, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(64, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(64, 0, 0, 0)); } #[test] fn test_boolean_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(128, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(128, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(128, 0, 0, 0)); } #[test] fn test_boolean_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(256, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(256, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(256, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(256, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(256, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(256, 0, 0, 0)); } #[test] fn test_boolean_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(2, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(2, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(2, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(2, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(2, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(2, 0, 0, 0)); } #[test] fn test_boolean_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(16, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(16, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(16, 0, 0, 0)); } #[test] fn test_boolean_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(32, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(32, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(32, 0, 0, 0)); } #[test] fn test_boolean_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(64, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(64, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(64, 0, 0, 0)); } #[test] fn test_boolean_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(128, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(128, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(128, 0, 0, 0)); } #[test] fn test_boolean_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(256, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(256, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(256, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(256, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(256, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(256, 0, 0, 0)); } } diff --git a/circuit/program/src/data/literal/cast/field.rs b/circuit/program/src/data/literal/cast/field.rs index 9c515ab930..9331231a68 100644 --- a/circuit/program/src/data/literal/cast/field.rs +++ b/circuit/program/src/data/literal/cast/field.rs @@ -85,7 +85,7 @@ mod tests { use super::*; use console::Cast as _; use console_root::{ - network::Testnet3, + network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; @@ -98,126 +98,126 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::Field, Field) { + ) -> (console_root::types::Field, Field) { let console_value = match i { - 0 => console_root::types::Field::::zero(), - 1 => console_root::types::Field::::one(), + 0 => console_root::types::Field::::zero(), + 1 => console_root::types::Field::::one(), _ => Uniform::rand(rng), }; let circuit_value = Field::::new(mode, console_value); (console_value, circuit_value) } - impl_check_cast!(cast, Field, console_root::types::Field::); + impl_check_cast!(cast, Field, console_root::types::Field::); #[test] fn test_field_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Address>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Address>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Address>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_field_to_boolean() { - check_cast::, console_root::types::Boolean>(Mode::Constant, count_is!(2, 0, 0, 0)); - check_cast::, console_root::types::Boolean>(Mode::Public, count_is!(0, 0, 5, 6)); - check_cast::, console_root::types::Boolean>(Mode::Private, count_is!(0, 0, 5, 6)); + check_cast::, console_root::types::Boolean>(Mode::Constant, count_is!(2, 0, 0, 0)); + check_cast::, console_root::types::Boolean>(Mode::Public, count_is!(0, 0, 5, 6)); + check_cast::, console_root::types::Boolean>(Mode::Private, count_is!(0, 0, 5, 6)); } #[test] fn test_field_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_field_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_field_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(8, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 8, 9)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 8, 9)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(8, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 8, 9)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 8, 9)); } #[test] fn test_field_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(16, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 16, 17)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 16, 17)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 16, 17)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 16, 17)); } #[test] fn test_field_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(32, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 32, 33)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 32, 33)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 32, 33)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 32, 33)); } #[test] fn test_field_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(64, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 64, 65)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 64, 65)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 64, 65)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 64, 65)); } #[test] fn test_field_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(128, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 128, 129)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 128, 129)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 128, 129)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 128, 129)); } #[test] fn test_field_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 755, 759)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 755, 759)); + check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 755, 759)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 755, 759)); } #[test] fn test_field_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(8, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 8, 9)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 8, 9)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(8, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 8, 9)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 8, 9)); } #[test] fn test_field_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(16, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 16, 17)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 16, 17)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(16, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 16, 17)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 16, 17)); } #[test] fn test_field_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(32, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 32, 33)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 32, 33)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(32, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 32, 33)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 32, 33)); } #[test] fn test_field_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(64, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 64, 65)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 64, 65)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(64, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 64, 65)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 64, 65)); } #[test] fn test_field_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(128, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 128, 129)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 128, 129)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(128, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 128, 129)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 128, 129)); } } diff --git a/circuit/program/src/data/literal/cast/integer.rs b/circuit/program/src/data/literal/cast/integer.rs index 78655df65d..c25eab04a5 100644 --- a/circuit/program/src/data/literal/cast/integer.rs +++ b/circuit/program/src/data/literal/cast/integer.rs @@ -143,7 +143,7 @@ mod tests { use super::*; use console::Cast as _; use console_root::{ - network::Testnet3, + network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; @@ -156,13 +156,13 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::integers::Integer, Integer) { + ) -> (console_root::types::integers::Integer, Integer) { let console_value = match i { - 0 => console_root::types::integers::Integer::::zero(), - 1 => console_root::types::integers::Integer::::one(), - 2 => console_root::types::integers::Integer::::new(I::MAX), - 3 => console_root::types::integers::Integer::::new(I::MIN), - 4 if I::is_signed() => -console_root::types::integers::Integer::::one(), + 0 => console_root::types::integers::Integer::::zero(), + 1 => console_root::types::integers::Integer::::one(), + 2 => console_root::types::integers::Integer::::new(I::MAX), + 3 => console_root::types::integers::Integer::::new(I::MIN), + 4 if I::is_signed() => -console_root::types::integers::Integer::::one(), _ => Uniform::rand(rng), }; let circuit_value = Integer::::new(mode, console_value); @@ -172,23 +172,23 @@ mod tests { mod i8 { use super::*; - fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::I8, I8) { + fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::I8, I8) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, I8, console_root::types::I8); + impl_check_cast!(cast, I8, console_root::types::I8); #[test] fn test_i8_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -196,15 +196,15 @@ mod tests { #[test] fn test_i8_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(16, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(16, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(16, 0, 5, 6), ); @@ -212,96 +212,99 @@ mod tests { #[test] fn test_i8_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_i8_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i8_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i8_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i8_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i8_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); } } @@ -312,23 +315,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I16, I16) { + ) -> (console_root::types::I16, I16) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, I16, console_root::types::I16); + impl_check_cast!(cast, I16, console_root::types::I16); #[test] fn test_i16_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -336,15 +339,15 @@ mod tests { #[test] fn test_i16_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(32, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(32, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(32, 0, 5, 6), ); @@ -352,96 +355,99 @@ mod tests { #[test] fn test_i16_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_i16_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 8)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 8)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 8)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 8)); } #[test] fn test_i16_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i16_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i16_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i16_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i16_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); } } @@ -452,23 +458,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I32, I32) { + ) -> (console_root::types::I32, I32) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, I32, console_root::types::I32); + impl_check_cast!(cast, I32, console_root::types::I32); #[test] fn test_i32_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -476,15 +482,15 @@ mod tests { #[test] fn test_i32_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(64, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(64, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(64, 0, 5, 6), ); @@ -492,96 +498,99 @@ mod tests { #[test] fn test_i32_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_i32_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 24)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 24)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 24)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 24)); } #[test] fn test_i32_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 16)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 16)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 16)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 16)); } #[test] fn test_i32_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i32_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i32_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i32_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i32_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); } } @@ -592,23 +601,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I64, I64) { + ) -> (console_root::types::I64, I64) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, I64, console_root::types::I64); + impl_check_cast!(cast, I64, console_root::types::I64); #[test] fn test_i64_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -616,15 +625,15 @@ mod tests { #[test] fn test_i64_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(128, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(128, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(128, 0, 5, 6), ); @@ -632,96 +641,99 @@ mod tests { #[test] fn test_i64_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_i64_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 56)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 56)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 56)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 56)); } #[test] fn test_i64_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 48)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 48)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 48)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 48)); } #[test] fn test_i64_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 32)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 32)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 32)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 32)); } #[test] fn test_i64_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i64_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i64_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i64_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i64_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); } } @@ -732,23 +744,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I128, I128) { + ) -> (console_root::types::I128, I128) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, I128, console_root::types::I128); + impl_check_cast!(cast, I128, console_root::types::I128); #[test] fn test_i128_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -756,15 +768,15 @@ mod tests { #[test] fn test_i128_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(256, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(256, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(256, 0, 5, 6), ); @@ -772,119 +784,122 @@ mod tests { #[test] fn test_i128_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_i128_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 120)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 120)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 120)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 120)); } #[test] fn test_i128_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 112)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 112)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 112)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 112)); } #[test] fn test_i128_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 96)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 96)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 96)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 96)); } #[test] fn test_i128_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 64)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 64)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 64)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 64)); } #[test] fn test_i128_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i128_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i128_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i128_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_i128_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 1)); } } mod u8 { use super::*; - fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::U8, U8) { + fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::U8, U8) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, U8, console_root::types::U8); + impl_check_cast!(cast, U8, console_root::types::U8); #[test] fn test_u8_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -892,15 +907,15 @@ mod tests { #[test] fn test_u8_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(16, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(16, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(16, 0, 5, 6), ); @@ -908,96 +923,99 @@ mod tests { #[test] fn test_u8_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_u8_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u8_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); } } @@ -1008,23 +1026,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U16, U16) { + ) -> (console_root::types::U16, U16) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, U16, console_root::types::U16); + impl_check_cast!(cast, U16, console_root::types::U16); #[test] fn test_u16_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -1032,15 +1050,15 @@ mod tests { #[test] fn test_u16_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(32, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(32, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(32, 0, 5, 6), ); @@ -1048,96 +1066,99 @@ mod tests { #[test] fn test_u16_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_u16_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u16_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u16_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u16_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); } } @@ -1148,23 +1169,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U32, U32) { + ) -> (console_root::types::U32, U32) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, U32, console_root::types::U32); + impl_check_cast!(cast, U32, console_root::types::U32); #[test] fn test_u32_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -1172,15 +1193,15 @@ mod tests { #[test] fn test_u32_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(64, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(64, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(64, 0, 5, 6), ); @@ -1188,96 +1209,99 @@ mod tests { #[test] fn test_u32_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_u32_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u32_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u32_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u32_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u32_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u32_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); } } @@ -1288,23 +1312,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U64, U64) { + ) -> (console_root::types::U64, U64) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, U64, console_root::types::U64); + impl_check_cast!(cast, U64, console_root::types::U64); #[test] fn test_u64_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -1312,15 +1336,15 @@ mod tests { #[test] fn test_u64_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(128, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(128, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(128, 0, 5, 6), ); @@ -1328,96 +1352,99 @@ mod tests { #[test] fn test_u64_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_u64_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u64_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u64_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u64_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u64_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u64_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u64_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u64_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); } } @@ -1428,23 +1455,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U128, U128) { + ) -> (console_root::types::U128, U128) { super::sample_values(i, mode, rng) } - impl_check_cast!(cast, U128, console_root::types::U128); + impl_check_cast!(cast, U128, console_root::types::U128); #[test] fn test_u128_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Public, count_is!(4, 0, 13, 13), ); - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Private, count_is!(4, 0, 13, 13), ); @@ -1452,15 +1479,15 @@ mod tests { #[test] fn test_u128_to_boolean() { - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Constant, count_is!(256, 0, 0, 0), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Public, count_is!(256, 0, 5, 6), ); - check_cast::, console_root::types::Boolean>( + check_cast::, console_root::types::Boolean>( Mode::Private, count_is!(256, 0, 5, 6), ); @@ -1468,96 +1495,99 @@ mod tests { #[test] fn test_u128_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_u128_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 1)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 1)); } #[test] fn test_u128_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 0, 0)); } } } diff --git a/circuit/program/src/data/literal/cast/scalar.rs b/circuit/program/src/data/literal/cast/scalar.rs index 39e3b440b9..e9b0e53819 100644 --- a/circuit/program/src/data/literal/cast/scalar.rs +++ b/circuit/program/src/data/literal/cast/scalar.rs @@ -87,7 +87,7 @@ mod tests { use super::*; use console::Cast as _; use console_root::{ - network::Testnet3, + network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; @@ -100,126 +100,126 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::Scalar, Scalar) { + ) -> (console_root::types::Scalar, Scalar) { let console_value = match i { - 0 => console_root::types::Scalar::::zero(), - 1 => console_root::types::Scalar::::one(), + 0 => console_root::types::Scalar::::zero(), + 1 => console_root::types::Scalar::::one(), _ => Uniform::rand(rng), }; let circuit_value = Scalar::::new(mode, console_value); (console_value, circuit_value) } - impl_check_cast!(cast, Scalar, console_root::types::Scalar::); + impl_check_cast!(cast, Scalar, console_root::types::Scalar::); #[test] fn test_scalar_to_address() { - check_cast::, console_root::types::Address>( + check_cast::, console_root::types::Address>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Address>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Address>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Address>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Address>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_scalar_to_boolean() { - check_cast::, console_root::types::Boolean>(Mode::Constant, count_is!(4, 0, 0, 0)); - check_cast::, console_root::types::Boolean>(Mode::Public, count_is!(2, 0, 5, 6)); - check_cast::, console_root::types::Boolean>(Mode::Private, count_is!(2, 0, 5, 6)); + check_cast::, console_root::types::Boolean>(Mode::Constant, count_is!(4, 0, 0, 0)); + check_cast::, console_root::types::Boolean>(Mode::Public, count_is!(2, 0, 5, 6)); + check_cast::, console_root::types::Boolean>(Mode::Private, count_is!(2, 0, 5, 6)); } #[test] fn test_scalar_to_field() { - check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_scalar_to_group() { - check_cast::, console_root::types::Group>( + check_cast::, console_root::types::Group>( Mode::Constant, count_less_than!(11, 0, 0, 0), ); - check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); - check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Public, count_is!(4, 0, 13, 13)); + check_cast::, console_root::types::Group>(Mode::Private, count_is!(4, 0, 13, 13)); } #[test] fn test_scalar_to_i8() { - check_cast::, console_root::types::I8>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I8>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_i16() { - check_cast::, console_root::types::I16>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I16>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_i32() { - check_cast::, console_root::types::I32>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I32>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_i64() { - check_cast::, console_root::types::I64>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I64>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_i128() { - check_cast::, console_root::types::I128>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I128>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::I128>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_scalar() { - check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast::, console_root::types::Scalar>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_scalar_to_u8() { - check_cast::, console_root::types::U8>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U8>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_u16() { - check_cast::, console_root::types::U16>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U16>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_u32() { - check_cast::, console_root::types::U32>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U32>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_u64() { - check_cast::, console_root::types::U64>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U64>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 501, 504)); } #[test] fn test_scalar_to_u128() { - check_cast::, console_root::types::U128>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 501, 504)); - check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U128>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 501, 504)); + check_cast::, console_root::types::U128>(Mode::Private, count_is!(0, 0, 501, 504)); } } diff --git a/circuit/program/src/data/literal/cast_lossy/boolean.rs b/circuit/program/src/data/literal/cast_lossy/boolean.rs index f2017d9857..64ac477894 100644 --- a/circuit/program/src/data/literal/cast_lossy/boolean.rs +++ b/circuit/program/src/data/literal/cast_lossy/boolean.rs @@ -77,7 +77,7 @@ impl CastLossy> for Boolean { mod tests { use super::*; use console::CastLossy as _; - use console_root::{network::Testnet3, prelude::TestRng}; + use console_root::{network::MainnetV0, prelude::TestRng}; use snarkvm_circuit_types::environment::{count_is, Circuit, Eject, Inject, Mode, UpdatableCount}; use std::fmt::Debug; @@ -88,23 +88,23 @@ mod tests { i: usize, mode: Mode, _: &mut TestRng, - ) -> (console_root::types::Boolean, Boolean) { + ) -> (console_root::types::Boolean, Boolean) { (console_root::types::Boolean::new(i % 2 == 0), Boolean::new(mode, i % 2 == 0)) } - check_cast_lossy!(cast_lossy, Boolean, console_root::types::Boolean::); + check_cast_lossy!(cast_lossy, Boolean, console_root::types::Boolean::); #[test] fn test_boolean_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_is!(10, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(10, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(10, 0, 0, 0), ); @@ -112,15 +112,15 @@ mod tests { #[test] fn test_boolean_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -128,64 +128,76 @@ mod tests { #[test] fn test_boolean_to_field() { - check_cast_lossy::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::Field>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_boolean_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_is!(10, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>(Mode::Public, count_is!(10, 0, 0, 0)); - check_cast_lossy::, console_root::types::Group>(Mode::Private, count_is!(10, 0, 0, 0)); + check_cast_lossy::, console_root::types::Group>(Mode::Public, count_is!(10, 0, 0, 0)); + check_cast_lossy::, console_root::types::Group>( + Mode::Private, + count_is!(10, 0, 0, 0), + ); } #[test] fn test_boolean_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(16, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(16, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(16, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(16, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(16, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(16, 0, 0, 0)); } #[test] fn test_boolean_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(32, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(32, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(32, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(32, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(32, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(32, 0, 0, 0)); } #[test] fn test_boolean_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(64, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(64, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(64, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(64, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(64, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(64, 0, 0, 0)); } #[test] fn test_boolean_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(128, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(128, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(128, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(128, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(128, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(128, 0, 0, 0)); } #[test] fn test_boolean_to_i128() { - check_cast_lossy::, console_root::types::I128>(Mode::Constant, count_is!(256, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(256, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>(Mode::Private, count_is!(256, 0, 0, 0)); + check_cast_lossy::, console_root::types::I128>( + Mode::Constant, + count_is!(256, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(256, 0, 0, 0)); + check_cast_lossy::, console_root::types::I128>(Mode::Private, count_is!(256, 0, 0, 0)); } #[test] fn test_boolean_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(2, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>(Mode::Public, count_is!(2, 0, 0, 0)); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( + Mode::Public, + count_is!(2, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(2, 0, 0, 0), ); @@ -193,36 +205,39 @@ mod tests { #[test] fn test_boolean_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(16, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(16, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(16, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(16, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(16, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(16, 0, 0, 0)); } #[test] fn test_boolean_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(32, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(32, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(32, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(32, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(32, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(32, 0, 0, 0)); } #[test] fn test_boolean_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(64, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(64, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(64, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(64, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(64, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(64, 0, 0, 0)); } #[test] fn test_boolean_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(128, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(128, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(128, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(128, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(128, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(128, 0, 0, 0)); } #[test] fn test_boolean_to_u128() { - check_cast_lossy::, console_root::types::U128>(Mode::Constant, count_is!(256, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(256, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>(Mode::Private, count_is!(256, 0, 0, 0)); + check_cast_lossy::, console_root::types::U128>( + Mode::Constant, + count_is!(256, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(256, 0, 0, 0)); + check_cast_lossy::, console_root::types::U128>(Mode::Private, count_is!(256, 0, 0, 0)); } } diff --git a/circuit/program/src/data/literal/cast_lossy/field.rs b/circuit/program/src/data/literal/cast_lossy/field.rs index 310ec630cc..705443d022 100644 --- a/circuit/program/src/data/literal/cast_lossy/field.rs +++ b/circuit/program/src/data/literal/cast_lossy/field.rs @@ -116,7 +116,7 @@ mod tests { use super::*; use console::CastLossy as _; use console_root::{ - network::Testnet3, + network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; @@ -129,29 +129,29 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::Field, Field) { + ) -> (console_root::types::Field, Field) { let console_value = match i { - 0 => console_root::types::Field::::zero(), - 1 => console_root::types::Field::::one(), + 0 => console_root::types::Field::::zero(), + 1 => console_root::types::Field::::one(), _ => Uniform::rand(rng), }; let circuit_value = Field::::new(mode, console_value); (console_value, circuit_value) } - check_cast_lossy!(cast_lossy, Field, console_root::types::Field::); + check_cast_lossy!(cast_lossy, Field, console_root::types::Field::); #[test] fn test_field_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -159,15 +159,15 @@ mod tests { #[test] fn test_field_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(253, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 505, 507), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 505, 507), ); @@ -175,22 +175,25 @@ mod tests { #[test] fn test_field_to_field() { - check_cast_lossy::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::Field>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_field_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -198,37 +201,43 @@ mod tests { #[test] fn test_field_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_i128() { - check_cast_lossy::, console_root::types::I128>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Constant, + count_is!(253, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 505, 507), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 505, 507), ); @@ -236,15 +245,15 @@ mod tests { #[test] fn test_field_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(253, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 505, 507), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 505, 507), ); @@ -252,37 +261,43 @@ mod tests { #[test] fn test_field_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(253, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 505, 507)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 505, 507)); } #[test] fn test_field_to_u128() { - check_cast_lossy::, console_root::types::U128>(Mode::Constant, count_is!(253, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 505, 507)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Constant, + count_is!(253, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 505, 507), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 505, 507), ); diff --git a/circuit/program/src/data/literal/cast_lossy/integer.rs b/circuit/program/src/data/literal/cast_lossy/integer.rs index 7d2244c7ff..1a50e3e8ca 100644 --- a/circuit/program/src/data/literal/cast_lossy/integer.rs +++ b/circuit/program/src/data/literal/cast_lossy/integer.rs @@ -91,7 +91,7 @@ mod tests { use super::*; use console::CastLossy as _; use console_root::{ - network::Testnet3, + network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; @@ -104,13 +104,13 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::integers::Integer, Integer) { + ) -> (console_root::types::integers::Integer, Integer) { let console_value = match i { - 0 => console_root::types::integers::Integer::::zero(), - 1 => console_root::types::integers::Integer::::one(), - 2 => console_root::types::integers::Integer::::new(I::MAX), - 3 => console_root::types::integers::Integer::::new(I::MIN), - 4 if I::is_signed() => -console_root::types::integers::Integer::::one(), + 0 => console_root::types::integers::Integer::::zero(), + 1 => console_root::types::integers::Integer::::one(), + 2 => console_root::types::integers::Integer::::new(I::MAX), + 3 => console_root::types::integers::Integer::::new(I::MIN), + 4 if I::is_signed() => -console_root::types::integers::Integer::::one(), _ => Uniform::rand(rng), }; let circuit_value = Integer::::new(mode, console_value); @@ -120,23 +120,23 @@ mod tests { mod i8 { use super::*; - fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::I8, I8) { + fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::I8, I8) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, I8, console_root::types::I8); + check_cast_lossy!(cast_lossy, I8, console_root::types::I8); #[test] fn test_i8_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -144,15 +144,15 @@ mod tests { #[test] fn test_i8_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -160,15 +160,15 @@ mod tests { #[test] fn test_i8_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -176,15 +176,15 @@ mod tests { #[test] fn test_i8_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -192,40 +192,52 @@ mod tests { #[test] fn test_i8_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -233,15 +245,15 @@ mod tests { #[test] fn test_i8_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -249,40 +261,52 @@ mod tests { #[test] fn test_i8_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i8_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -296,23 +320,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I16, I16) { + ) -> (console_root::types::I16, I16) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, I16, console_root::types::I16); + check_cast_lossy!(cast_lossy, I16, console_root::types::I16); #[test] fn test_i16_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -320,15 +344,15 @@ mod tests { #[test] fn test_i16_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -336,15 +360,15 @@ mod tests { #[test] fn test_i16_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -352,15 +376,15 @@ mod tests { #[test] fn test_i16_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -368,40 +392,52 @@ mod tests { #[test] fn test_i16_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -409,15 +445,15 @@ mod tests { #[test] fn test_i16_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -425,40 +461,52 @@ mod tests { #[test] fn test_i16_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i16_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -472,23 +520,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I32, I32) { + ) -> (console_root::types::I32, I32) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, I32, console_root::types::I32); + check_cast_lossy!(cast_lossy, I32, console_root::types::I32); #[test] fn test_i32_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -496,15 +544,15 @@ mod tests { #[test] fn test_i32_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -512,15 +560,15 @@ mod tests { #[test] fn test_i32_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -528,15 +576,15 @@ mod tests { #[test] fn test_i32_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -544,40 +592,52 @@ mod tests { #[test] fn test_i32_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -585,15 +645,15 @@ mod tests { #[test] fn test_i32_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -601,40 +661,52 @@ mod tests { #[test] fn test_i32_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i32_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -648,23 +720,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I64, I64) { + ) -> (console_root::types::I64, I64) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, I64, console_root::types::I64); + check_cast_lossy!(cast_lossy, I64, console_root::types::I64); #[test] fn test_i64_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -672,15 +744,15 @@ mod tests { #[test] fn test_i64_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -688,15 +760,15 @@ mod tests { #[test] fn test_i64_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -704,15 +776,15 @@ mod tests { #[test] fn test_i64_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -720,40 +792,52 @@ mod tests { #[test] fn test_i64_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -761,15 +845,15 @@ mod tests { #[test] fn test_i64_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -777,40 +861,52 @@ mod tests { #[test] fn test_i64_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i64_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -824,23 +920,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::I128, I128) { + ) -> (console_root::types::I128, I128) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, I128, console_root::types::I128); + check_cast_lossy!(cast_lossy, I128, console_root::types::I128); #[test] fn test_i128_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -848,15 +944,15 @@ mod tests { #[test] fn test_i128_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -864,15 +960,15 @@ mod tests { #[test] fn test_i128_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -880,15 +976,15 @@ mod tests { #[test] fn test_i128_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -896,40 +992,52 @@ mod tests { #[test] fn test_i128_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -937,15 +1045,15 @@ mod tests { #[test] fn test_i128_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -953,40 +1061,52 @@ mod tests { #[test] fn test_i128_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_i128_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -996,23 +1116,23 @@ mod tests { mod u8 { use super::*; - fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::U8, U8) { + fn sample_values(i: usize, mode: Mode, rng: &mut TestRng) -> (console_root::types::U8, U8) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, U8, console_root::types::U8); + check_cast_lossy!(cast_lossy, U8, console_root::types::U8); #[test] fn test_u8_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1020,15 +1140,15 @@ mod tests { #[test] fn test_u8_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1036,15 +1156,15 @@ mod tests { #[test] fn test_u8_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1052,15 +1172,15 @@ mod tests { #[test] fn test_u8_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1068,40 +1188,52 @@ mod tests { #[test] fn test_u8_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1109,15 +1241,15 @@ mod tests { #[test] fn test_u8_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1125,40 +1257,52 @@ mod tests { #[test] fn test_u8_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u8_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1172,23 +1316,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U16, U16) { + ) -> (console_root::types::U16, U16) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, U16, console_root::types::U16); + check_cast_lossy!(cast_lossy, U16, console_root::types::U16); #[test] fn test_u16_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1196,15 +1340,15 @@ mod tests { #[test] fn test_u16_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1212,15 +1356,15 @@ mod tests { #[test] fn test_u16_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1228,15 +1372,15 @@ mod tests { #[test] fn test_u16_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1244,40 +1388,52 @@ mod tests { #[test] fn test_u16_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1285,15 +1441,15 @@ mod tests { #[test] fn test_u16_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1301,40 +1457,52 @@ mod tests { #[test] fn test_u16_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u16_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1348,23 +1516,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U32, U32) { + ) -> (console_root::types::U32, U32) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, U32, console_root::types::U32); + check_cast_lossy!(cast_lossy, U32, console_root::types::U32); #[test] fn test_u32_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1372,15 +1540,15 @@ mod tests { #[test] fn test_u32_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1388,15 +1556,15 @@ mod tests { #[test] fn test_u32_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1404,15 +1572,15 @@ mod tests { #[test] fn test_u32_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1420,40 +1588,52 @@ mod tests { #[test] fn test_u32_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1461,15 +1641,15 @@ mod tests { #[test] fn test_u32_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1477,40 +1657,52 @@ mod tests { #[test] fn test_u32_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u32_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1524,23 +1716,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U64, U64) { + ) -> (console_root::types::U64, U64) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, U64, console_root::types::U64); + check_cast_lossy!(cast_lossy, U64, console_root::types::U64); #[test] fn test_u64_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1548,15 +1740,15 @@ mod tests { #[test] fn test_u64_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1564,15 +1756,15 @@ mod tests { #[test] fn test_u64_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1580,15 +1772,15 @@ mod tests { #[test] fn test_u64_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1596,40 +1788,52 @@ mod tests { #[test] fn test_u64_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1637,15 +1841,15 @@ mod tests { #[test] fn test_u64_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1653,40 +1857,52 @@ mod tests { #[test] fn test_u64_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u64_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1700,23 +1916,23 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::U128, U128) { + ) -> (console_root::types::U128, U128) { super::sample_values(i, mode, rng) } - check_cast_lossy!(cast_lossy, U128, console_root::types::U128); + check_cast_lossy!(cast_lossy, U128, console_root::types::U128); #[test] fn test_u128_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1724,15 +1940,15 @@ mod tests { #[test] fn test_u128_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1740,15 +1956,15 @@ mod tests { #[test] fn test_u128_to_field() { - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Field>( + check_cast_lossy::, console_root::types::Field>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1756,15 +1972,15 @@ mod tests { #[test] fn test_u128_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -1772,40 +1988,52 @@ mod tests { #[test] fn test_u128_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_i128() { - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1813,15 +2041,15 @@ mod tests { #[test] fn test_u128_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Public, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -1829,40 +2057,52 @@ mod tests { #[test] fn test_u128_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_u128_to_u128() { - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 0, 0), ); diff --git a/circuit/program/src/data/literal/cast_lossy/scalar.rs b/circuit/program/src/data/literal/cast_lossy/scalar.rs index 1b3d77475c..2913265440 100644 --- a/circuit/program/src/data/literal/cast_lossy/scalar.rs +++ b/circuit/program/src/data/literal/cast_lossy/scalar.rs @@ -89,7 +89,7 @@ mod tests { use super::*; use console::CastLossy as _; use console_root::{ - network::Testnet3, + network::MainnetV0, prelude::{One, TestRng, Uniform, Zero}, }; use snarkvm_circuit_types::environment::{count_is, count_less_than, Circuit, Eject, Inject, Mode, UpdatableCount}; @@ -102,29 +102,29 @@ mod tests { i: usize, mode: Mode, rng: &mut TestRng, - ) -> (console_root::types::Scalar, Scalar) { + ) -> (console_root::types::Scalar, Scalar) { let console_value = match i { - 0 => console_root::types::Scalar::::zero(), - 1 => console_root::types::Scalar::::one(), + 0 => console_root::types::Scalar::::zero(), + 1 => console_root::types::Scalar::::one(), _ => Uniform::rand(rng), }; let circuit_value = Scalar::::new(mode, console_value); (console_value, circuit_value) } - check_cast_lossy!(cast_lossy, Scalar, console_root::types::Scalar::); + check_cast_lossy!(cast_lossy, Scalar, console_root::types::Scalar::); #[test] fn test_scalar_to_address() { - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Address>( + check_cast_lossy::, console_root::types::Address>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -132,15 +132,15 @@ mod tests { #[test] fn test_scalar_to_boolean() { - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Constant, count_is!(251, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Public, count_is!(0, 0, 501, 503), ); - check_cast_lossy::, console_root::types::Boolean>( + check_cast_lossy::, console_root::types::Boolean>( Mode::Private, count_is!(0, 0, 501, 503), ); @@ -148,22 +148,25 @@ mod tests { #[test] fn test_scalar_to_field() { - check_cast_lossy::, console_root::types::Field>(Mode::Constant, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::Field>( + Mode::Constant, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::Field>(Mode::Public, count_is!(0, 0, 0, 0)); + check_cast_lossy::, console_root::types::Field>(Mode::Private, count_is!(0, 0, 0, 0)); } #[test] fn test_scalar_to_group() { - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Constant, count_less_than!(4303, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Public, count_is!(2029, 0, 6745, 6750), ); - check_cast_lossy::, console_root::types::Group>( + check_cast_lossy::, console_root::types::Group>( Mode::Private, count_is!(2029, 0, 6745, 6750), ); @@ -171,37 +174,43 @@ mod tests { #[test] fn test_scalar_to_i8() { - check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I8>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::I8>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I8>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_i16() { - check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I16>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::I16>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I16>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_i32() { - check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I32>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::I32>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I32>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_i64() { - check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I64>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::I64>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::I64>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_i128() { - check_cast_lossy::, console_root::types::I128>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::I128>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::I128>( + check_cast_lossy::, console_root::types::I128>( + Mode::Constant, + count_is!(251, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::I128>( + Mode::Public, + count_is!(0, 0, 501, 503), + ); + check_cast_lossy::, console_root::types::I128>( Mode::Private, count_is!(0, 0, 501, 503), ); @@ -209,12 +218,15 @@ mod tests { #[test] fn test_scalar_to_scalar() { - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( Mode::Constant, count_is!(0, 0, 0, 0), ); - check_cast_lossy::, console_root::types::Scalar>(Mode::Public, count_is!(0, 0, 0, 0)); - check_cast_lossy::, console_root::types::Scalar>( + check_cast_lossy::, console_root::types::Scalar>( + Mode::Public, + count_is!(0, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::Scalar>( Mode::Private, count_is!(0, 0, 0, 0), ); @@ -222,37 +234,43 @@ mod tests { #[test] fn test_scalar_to_u8() { - check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U8>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::U8>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U8>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_u16() { - check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U16>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::U16>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U16>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_u32() { - check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U32>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::U32>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U32>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_u64() { - check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U64>(Mode::Constant, count_is!(251, 0, 0, 0)); + check_cast_lossy::, console_root::types::U64>(Mode::Public, count_is!(0, 0, 501, 503)); + check_cast_lossy::, console_root::types::U64>(Mode::Private, count_is!(0, 0, 501, 503)); } #[test] fn test_scalar_to_u128() { - check_cast_lossy::, console_root::types::U128>(Mode::Constant, count_is!(251, 0, 0, 0)); - check_cast_lossy::, console_root::types::U128>(Mode::Public, count_is!(0, 0, 501, 503)); - check_cast_lossy::, console_root::types::U128>( + check_cast_lossy::, console_root::types::U128>( + Mode::Constant, + count_is!(251, 0, 0, 0), + ); + check_cast_lossy::, console_root::types::U128>( + Mode::Public, + count_is!(0, 0, 501, 503), + ); + check_cast_lossy::, console_root::types::U128>( Mode::Private, count_is!(0, 0, 501, 503), ); diff --git a/console/account/benches/account.rs b/console/account/benches/account.rs index 5f3df699c1..ce8b6d7500 100644 --- a/console/account/benches/account.rs +++ b/console/account/benches/account.rs @@ -16,11 +16,11 @@ extern crate criterion; use snarkvm_console_account::{Address, PrivateKey, ViewKey}; -use snarkvm_console_network::{environment::prelude::*, Testnet3}; +use snarkvm_console_network::{environment::prelude::*, MainnetV0}; use criterion::Criterion; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; fn account_private_key(c: &mut Criterion) { let rng = &mut TestRng::default(); diff --git a/console/account/src/address/try_from.rs b/console/account/src/address/try_from.rs index 299e09b72e..6080a5009e 100644 --- a/console/account/src/address/try_from.rs +++ b/console/account/src/address/try_from.rs @@ -77,9 +77,9 @@ impl TryFrom<&ViewKey> for Address { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/console/account/src/compute_key/bytes.rs b/console/account/src/compute_key/bytes.rs index 1e064c8951..cd0e64edec 100644 --- a/console/account/src/compute_key/bytes.rs +++ b/console/account/src/compute_key/bytes.rs @@ -37,9 +37,9 @@ impl ToBytes for ComputeKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/compute_key/from_bits.rs b/console/account/src/compute_key/from_bits.rs index fa1f73e576..923689ddc3 100644 --- a/console/account/src/compute_key/from_bits.rs +++ b/console/account/src/compute_key/from_bits.rs @@ -53,9 +53,9 @@ impl FromBits for ComputeKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/account/src/compute_key/serialize.rs b/console/account/src/compute_key/serialize.rs index 78f809bdb0..9089c77a9d 100644 --- a/console/account/src/compute_key/serialize.rs +++ b/console/account/src/compute_key/serialize.rs @@ -35,9 +35,9 @@ impl<'de, N: Network> Deserialize<'de> for ComputeKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/compute_key/to_address.rs b/console/account/src/compute_key/to_address.rs index 3dc6eae1af..fc18b59910 100644 --- a/console/account/src/compute_key/to_address.rs +++ b/console/account/src/compute_key/to_address.rs @@ -27,9 +27,9 @@ impl ComputeKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/compute_key/to_bits.rs b/console/account/src/compute_key/to_bits.rs index 2a742b1c9e..78536394d4 100644 --- a/console/account/src/compute_key/to_bits.rs +++ b/console/account/src/compute_key/to_bits.rs @@ -35,9 +35,9 @@ impl ToBits for ComputeKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/console/account/src/compute_key/try_from.rs b/console/account/src/compute_key/try_from.rs index e652ca8323..591452f87e 100644 --- a/console/account/src/compute_key/try_from.rs +++ b/console/account/src/compute_key/try_from.rs @@ -63,9 +63,9 @@ impl TryFrom<&(Group, Group)> for ComputeKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/graph_key/bytes.rs b/console/account/src/graph_key/bytes.rs index a6b3efb71c..8637453dea 100644 --- a/console/account/src/graph_key/bytes.rs +++ b/console/account/src/graph_key/bytes.rs @@ -34,9 +34,9 @@ impl ToBytes for GraphKey { mod tests { use super::*; use crate::PrivateKey; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/graph_key/serialize.rs b/console/account/src/graph_key/serialize.rs index 74739f8dbb..9592af6f03 100644 --- a/console/account/src/graph_key/serialize.rs +++ b/console/account/src/graph_key/serialize.rs @@ -32,9 +32,9 @@ impl<'de, N: Network> Deserialize<'de> for GraphKey { mod tests { use super::*; use crate::PrivateKey; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/graph_key/string.rs b/console/account/src/graph_key/string.rs index 5378a28d13..57198c01e6 100644 --- a/console/account/src/graph_key/string.rs +++ b/console/account/src/graph_key/string.rs @@ -49,9 +49,9 @@ impl fmt::Display for GraphKey { mod tests { use super::*; use crate::PrivateKey; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 10_000; diff --git a/console/account/src/graph_key/try_from.rs b/console/account/src/graph_key/try_from.rs index 61a124f5c9..13d95c65be 100644 --- a/console/account/src/graph_key/try_from.rs +++ b/console/account/src/graph_key/try_from.rs @@ -60,9 +60,9 @@ impl TryFrom<&Field> for GraphKey { mod tests { use super::*; use crate::PrivateKey; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/lib.rs b/console/account/src/lib.rs index 77e5874bbf..c06cea96e5 100644 --- a/console/account/src/lib.rs +++ b/console/account/src/lib.rs @@ -49,9 +49,9 @@ pub use view_key::*; #[cfg(test)] mod tests { use crate::{Address, ComputeKey, PrivateKey, Signature, ViewKey}; - use snarkvm_console_network::{prelude::*, Testnet3}; + use snarkvm_console_network::{prelude::*, MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ALEO_PRIVATE_KEY: &str = "APrivateKey1zkp8cC4jgHEBnbtu3xxs1Ndja2EMizcvTRDq5Nikdkukg1p"; const ALEO_VIEW_KEY: &str = "AViewKey1n1n3ZbnVEtXVe3La2xWkUvY3EY7XaCG6RZJJ3tbvrrrD"; diff --git a/console/account/src/private_key/bytes.rs b/console/account/src/private_key/bytes.rs index 291720c277..14fe867ef9 100644 --- a/console/account/src/private_key/bytes.rs +++ b/console/account/src/private_key/bytes.rs @@ -31,9 +31,9 @@ impl ToBytes for PrivateKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/private_key/serialize.rs b/console/account/src/private_key/serialize.rs index 3aeda9f436..44fdf3611f 100644 --- a/console/account/src/private_key/serialize.rs +++ b/console/account/src/private_key/serialize.rs @@ -41,9 +41,9 @@ impl<'de, N: Network> Deserialize<'de> for PrivateKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/private_key/sign.rs b/console/account/src/private_key/sign.rs index c330e50b23..3ced01a359 100644 --- a/console/account/src/private_key/sign.rs +++ b/console/account/src/private_key/sign.rs @@ -36,9 +36,9 @@ impl PrivateKey { mod tests { use super::*; use crate::Address; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 100; diff --git a/console/account/src/private_key/string.rs b/console/account/src/private_key/string.rs index 766178a079..f9a9705152 100644 --- a/console/account/src/private_key/string.rs +++ b/console/account/src/private_key/string.rs @@ -48,9 +48,9 @@ impl fmt::Display for PrivateKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/signature/bytes.rs b/console/account/src/signature/bytes.rs index bb7da60881..9f3714a7d6 100644 --- a/console/account/src/signature/bytes.rs +++ b/console/account/src/signature/bytes.rs @@ -38,9 +38,9 @@ impl ToBytes for Signature { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 100; diff --git a/console/account/src/signature/from_bits.rs b/console/account/src/signature/from_bits.rs index 5892bbfc7c..83eebac6ae 100644 --- a/console/account/src/signature/from_bits.rs +++ b/console/account/src/signature/from_bits.rs @@ -71,9 +71,9 @@ impl FromBits for Signature { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/account/src/signature/mod.rs b/console/account/src/signature/mod.rs index 1225af3b38..efa92938a6 100644 --- a/console/account/src/signature/mod.rs +++ b/console/account/src/signature/mod.rs @@ -114,9 +114,9 @@ impl Signature { #[cfg(test)] mod test_helpers { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Samples a random signature. pub(super) fn sample_signature(num_fields: u64, rng: &mut TestRng) -> Signature { diff --git a/console/account/src/signature/parse.rs b/console/account/src/signature/parse.rs index 78b69e7771..161054709c 100644 --- a/console/account/src/signature/parse.rs +++ b/console/account/src/signature/parse.rs @@ -74,9 +74,9 @@ impl Display for Signature { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/console/account/src/signature/to_bits.rs b/console/account/src/signature/to_bits.rs index 0c4512c516..d7da5ab2ca 100644 --- a/console/account/src/signature/to_bits.rs +++ b/console/account/src/signature/to_bits.rs @@ -39,9 +39,9 @@ impl ToBits for Signature { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/console/account/src/signature/verify.rs b/console/account/src/signature/verify.rs index c0b97bb2e4..65247213ab 100644 --- a/console/account/src/signature/verify.rs +++ b/console/account/src/signature/verify.rs @@ -80,9 +80,9 @@ impl Signature { #[cfg(feature = "private_key")] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 100; diff --git a/console/account/src/view_key/bytes.rs b/console/account/src/view_key/bytes.rs index 9592de8231..61631562d6 100644 --- a/console/account/src/view_key/bytes.rs +++ b/console/account/src/view_key/bytes.rs @@ -31,9 +31,9 @@ impl ToBytes for ViewKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/view_key/mod.rs b/console/account/src/view_key/mod.rs index ed7421d101..28a02c5d1a 100644 --- a/console/account/src/view_key/mod.rs +++ b/console/account/src/view_key/mod.rs @@ -51,9 +51,9 @@ impl Deref for ViewKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/view_key/serialize.rs b/console/account/src/view_key/serialize.rs index 03a6f28078..a49ebf3fea 100644 --- a/console/account/src/view_key/serialize.rs +++ b/console/account/src/view_key/serialize.rs @@ -41,9 +41,9 @@ impl<'de, N: Network> Deserialize<'de> for ViewKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/view_key/string.rs b/console/account/src/view_key/string.rs index cf7c93a56a..a341c0067d 100644 --- a/console/account/src/view_key/string.rs +++ b/console/account/src/view_key/string.rs @@ -48,9 +48,9 @@ impl fmt::Display for ViewKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/view_key/to_address.rs b/console/account/src/view_key/to_address.rs index 892064946c..055a040c84 100644 --- a/console/account/src/view_key/to_address.rs +++ b/console/account/src/view_key/to_address.rs @@ -24,9 +24,9 @@ impl ViewKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/account/src/view_key/try_from.rs b/console/account/src/view_key/try_from.rs index 6f11378a93..df148f0c66 100644 --- a/console/account/src/view_key/try_from.rs +++ b/console/account/src/view_key/try_from.rs @@ -51,9 +51,9 @@ impl TryFrom<(&PrivateKey, &ComputeKey)> for ViewKey { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/collections/benches/kary_merkle_tree.rs b/console/collections/benches/kary_merkle_tree.rs index f3610a0681..0ce72772c8 100644 --- a/console/collections/benches/kary_merkle_tree.rs +++ b/console/collections/benches/kary_merkle_tree.rs @@ -19,7 +19,7 @@ use snarkvm_console_algorithms::Sha3_256; use snarkvm_console_collections::kary_merkle_tree::KaryMerkleTree; use snarkvm_console_network::{ prelude::{TestRng, ToBits, Uniform}, - Testnet3, + MainnetV0, }; use snarkvm_console_types::Field; @@ -30,7 +30,7 @@ const ARITY: u8 = 8; /// Generates the specified number of random Merkle tree leaves. macro_rules! generate_leaves { - ($num_leaves:expr, $rng:expr) => {{ (0..$num_leaves).map(|_| Field::::rand($rng).to_bits_le()).collect::>() }}; + ($num_leaves:expr, $rng:expr) => {{ (0..$num_leaves).map(|_| Field::::rand($rng).to_bits_le()).collect::>() }}; } fn new(c: &mut Criterion) { diff --git a/console/collections/benches/merkle_tree.rs b/console/collections/benches/merkle_tree.rs index 01baa7fdbc..ec15aee461 100644 --- a/console/collections/benches/merkle_tree.rs +++ b/console/collections/benches/merkle_tree.rs @@ -17,8 +17,8 @@ extern crate criterion; use snarkvm_console_network::{ prelude::{TestRng, ToBits, Uniform}, + MainnetV0, Network, - Testnet3, }; use snarkvm_console_types::Field; @@ -34,7 +34,7 @@ const UPDATE_SIZES: &[usize] = &[1, 10, 100, 1_000, 10_000]; /// Generates the specified number of random Merkle tree leaves. macro_rules! generate_leaves { - ($num_leaves:expr, $rng:expr) => {{ (0..$num_leaves).map(|_| Field::::rand($rng).to_bits_le()).collect::>() }}; + ($num_leaves:expr, $rng:expr) => {{ (0..$num_leaves).map(|_| Field::::rand($rng).to_bits_le()).collect::>() }}; } fn new(c: &mut Criterion) { @@ -45,7 +45,7 @@ fn new(c: &mut Criterion) { // Benchmark the creation of a Merkle tree with the specified number of leaves. c.bench_function(&format!("MerkleTree/new/{num_leaves}"), |b| { b.iter(|| { - let _tree = Testnet3::merkle_tree_bhp::(&leaves[0..*num_leaves]).unwrap(); + let _tree = MainnetV0::merkle_tree_bhp::(&leaves[0..*num_leaves]).unwrap(); }) }); } @@ -61,7 +61,7 @@ fn append(c: &mut Criterion) { for num_leaves in NUM_LEAVES { for num_new_leaves in APPEND_SIZES { // Construct a Merkle tree with the specified number of leaves. - let merkle_tree = Testnet3::merkle_tree_bhp::(&leaves[..*num_leaves]).unwrap(); + let merkle_tree = MainnetV0::merkle_tree_bhp::(&leaves[..*num_leaves]).unwrap(); c.bench_function(&format!("MerkleTree/append/{num_leaves}/{num_new_leaves}"), |b| { b.iter_batched( || merkle_tree.clone(), @@ -93,7 +93,7 @@ fn update(c: &mut Criterion) { for num_new_leaves in UPDATE_SIZES { // Construct a Merkle tree with the specified number of leaves. - let merkle_tree = Testnet3::merkle_tree_bhp::(&leaves[..*num_leaves]).unwrap(); + let merkle_tree = MainnetV0::merkle_tree_bhp::(&leaves[..*num_leaves]).unwrap(); c.bench_function(&format!("MerkleTree/update/{num_leaves}/{num_new_leaves}"), |b| { b.iter_batched( @@ -131,7 +131,7 @@ fn update_many(c: &mut Criterion) { for num_new_leaves in UPDATE_SIZES { // Construct a Merkle tree with the specified number of leaves. - let merkle_tree = Testnet3::merkle_tree_bhp::(&leaves[..*num_leaves]).unwrap(); + let merkle_tree = MainnetV0::merkle_tree_bhp::(&leaves[..*num_leaves]).unwrap(); let num_new_leaves = std::cmp::min(*num_new_leaves, updates.len()); let updates = BTreeMap::from_iter(updates[..num_new_leaves].iter().cloned()); c.bench_function(&format!("MerkleTree/update_many/{num_leaves}/{num_new_leaves}",), |b| { @@ -157,7 +157,7 @@ fn update_vs_update_many(c: &mut Criterion) { // Compute the number of leaves at this depth. let num_leaves = 2usize.saturating_pow(depth as u32); // Construct a Merkle tree with the specified number of leaves. - let tree = Testnet3::merkle_tree_bhp::(&leaves[..num_leaves]).unwrap(); + let tree = MainnetV0::merkle_tree_bhp::(&leaves[..num_leaves]).unwrap(); // Generate a new leaf and select a random index to update. let index: usize = Uniform::rand(&mut rng); let index = index % num_leaves; diff --git a/console/network/src/lib.rs b/console/network/src/lib.rs index 4995a5f577..aa03a7cdfd 100644 --- a/console/network/src/lib.rs +++ b/console/network/src/lib.rs @@ -25,8 +25,8 @@ pub use snarkvm_console_network_environment::*; mod helpers; pub use helpers::*; -mod testnet3; -pub use testnet3::*; +mod mainnet_v0; +pub use mainnet_v0::*; pub mod prelude { pub use crate::{environment::prelude::*, Network}; diff --git a/console/network/src/testnet3.rs b/console/network/src/mainnet_v0.rs similarity index 89% rename from console/network/src/testnet3.rs rename to console/network/src/mainnet_v0.rs index e4f47594ca..21ad90a8e6 100644 --- a/console/network/src/testnet3.rs +++ b/console/network/src/mainnet_v0.rs @@ -34,38 +34,38 @@ use snarkvm_console_algorithms::{ lazy_static! { /// The group bases for the Aleo signature and encryption schemes. - pub static ref GENERATOR_G: Vec> = Testnet3::new_bases("AleoAccountEncryptionAndSignatureScheme0"); + pub static ref GENERATOR_G: Vec> = MainnetV0::new_bases("AleoAccountEncryptionAndSignatureScheme0"); /// The Varuna sponge parameters. - pub static ref VARUNA_FS_PARAMETERS: FiatShamirParameters = FiatShamir::::sample_parameters(); + pub static ref VARUNA_FS_PARAMETERS: FiatShamirParameters = FiatShamir::::sample_parameters(); /// The encryption domain as a constant field element. - pub static ref ENCRYPTION_DOMAIN: Field = Field::::new_domain_separator("AleoSymmetricEncryption0"); + pub static ref ENCRYPTION_DOMAIN: Field = Field::::new_domain_separator("AleoSymmetricEncryption0"); /// The graph key domain as a constant field element. - pub static ref GRAPH_KEY_DOMAIN: Field = Field::::new_domain_separator("AleoGraphKey0"); + pub static ref GRAPH_KEY_DOMAIN: Field = Field::::new_domain_separator("AleoGraphKey0"); /// The serial number domain as a constant field element. - pub static ref SERIAL_NUMBER_DOMAIN: Field = Field::::new_domain_separator("AleoSerialNumber0"); + pub static ref SERIAL_NUMBER_DOMAIN: Field = Field::::new_domain_separator("AleoSerialNumber0"); /// The BHP hash function, which can take an input of up to 256 bits. - pub static ref BHP_256: BHP256 = BHP256::::setup("AleoBHP256").expect("Failed to setup BHP256"); + pub static ref BHP_256: BHP256 = BHP256::::setup("AleoBHP256").expect("Failed to setup BHP256"); /// The BHP hash function, which can take an input of up to 512 bits. - pub static ref BHP_512: BHP512 = BHP512::::setup("AleoBHP512").expect("Failed to setup BHP512"); + pub static ref BHP_512: BHP512 = BHP512::::setup("AleoBHP512").expect("Failed to setup BHP512"); /// The BHP hash function, which can take an input of up to 768 bits. - pub static ref BHP_768: BHP768 = BHP768::::setup("AleoBHP768").expect("Failed to setup BHP768"); + pub static ref BHP_768: BHP768 = BHP768::::setup("AleoBHP768").expect("Failed to setup BHP768"); /// The BHP hash function, which can take an input of up to 1024 bits. - pub static ref BHP_1024: BHP1024 = BHP1024::::setup("AleoBHP1024").expect("Failed to setup BHP1024"); + pub static ref BHP_1024: BHP1024 = BHP1024::::setup("AleoBHP1024").expect("Failed to setup BHP1024"); /// The Pedersen hash function, which can take an input of up to 64 bits. - pub static ref PEDERSEN_64: Pedersen64 = Pedersen64::::setup("AleoPedersen64"); + pub static ref PEDERSEN_64: Pedersen64 = Pedersen64::::setup("AleoPedersen64"); /// The Pedersen hash function, which can take an input of up to 128 bits. - pub static ref PEDERSEN_128: Pedersen128 = Pedersen128::::setup("AleoPedersen128"); + pub static ref PEDERSEN_128: Pedersen128 = Pedersen128::::setup("AleoPedersen128"); /// The Poseidon hash function, using a rate of 2. - pub static ref POSEIDON_2: Poseidon2 = Poseidon2::::setup("AleoPoseidon2").expect("Failed to setup Poseidon2"); + pub static ref POSEIDON_2: Poseidon2 = Poseidon2::::setup("AleoPoseidon2").expect("Failed to setup Poseidon2"); /// The Poseidon hash function, using a rate of 4. - pub static ref POSEIDON_4: Poseidon4 = Poseidon4::::setup("AleoPoseidon4").expect("Failed to setup Poseidon4"); + pub static ref POSEIDON_4: Poseidon4 = Poseidon4::::setup("AleoPoseidon4").expect("Failed to setup Poseidon4"); /// The Poseidon hash function, using a rate of 8. - pub static ref POSEIDON_8: Poseidon8 = Poseidon8::::setup("AleoPoseidon8").expect("Failed to setup Poseidon8"); + pub static ref POSEIDON_8: Poseidon8 = Poseidon8::::setup("AleoPoseidon8").expect("Failed to setup Poseidon8"); pub static ref CREDITS_PROVING_KEYS: IndexMap>> = { let mut map = IndexMap::new(); @@ -82,9 +82,9 @@ lazy_static! { pub const TRANSACTION_PREFIX: &str = "at"; #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] -pub struct Testnet3; +pub struct MainnetV0; -impl Testnet3 { +impl MainnetV0 { /// Initializes a new instance of group bases from a given input domain message. fn new_bases(message: &str) -> Vec> { // Hash the given message to a point on the curve, to initialize the starting base. @@ -101,7 +101,7 @@ impl Testnet3 { } } -impl Environment for Testnet3 { +impl Environment for MainnetV0 { type Affine = ::Affine; type BigInteger = ::BigInteger; type Field = ::Field; @@ -119,7 +119,7 @@ impl Environment for Testnet3 { const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B; } -impl Network for Testnet3 { +impl Network for MainnetV0 { /// The block hash type. type BlockHash = AleoID, { hrp2!("ab") }>; /// The ratification ID type. @@ -134,15 +134,15 @@ impl Network for Testnet3 { /// The network edition. const EDITION: u16 = 0; /// The network ID. - const ID: u16 = 3; + const ID: u16 = 0; /// The function name for the inclusion circuit. - const INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::testnet3::TESTNET3_INCLUSION_FUNCTION_NAME; + const INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::mainnet::TESTNET3_INCLUSION_FUNCTION_NAME; /// The network name. - const NAME: &'static str = "Aleo Testnet 3"; + const NAME: &'static str = "Aleo Mainnet (v0)"; /// Returns the genesis block bytes. fn genesis_bytes() -> &'static [u8] { - snarkvm_parameters::testnet3::GenesisBytes::load_bytes() + snarkvm_parameters::mainnet::GenesisBytes::load_bytes() } /// Returns the proving key for the given function name in `credits.aleo`. @@ -165,7 +165,7 @@ impl Network for Testnet3 { INSTANCE.get_or_init(|| { // Skipping the first byte, which is the encoded version. Arc::new( - CircuitProvingKey::from_bytes_le(&snarkvm_parameters::testnet3::INCLUSION_PROVING_KEY[1..]) + CircuitProvingKey::from_bytes_le(&snarkvm_parameters::mainnet::INCLUSION_PROVING_KEY[1..]) .expect("Failed to load inclusion proving key."), ) }) @@ -177,7 +177,7 @@ impl Network for Testnet3 { INSTANCE.get_or_init(|| { // Skipping the first byte, which is the encoded version. Arc::new( - CircuitVerifyingKey::from_bytes_le(&snarkvm_parameters::testnet3::INCLUSION_VERIFYING_KEY[1..]) + CircuitVerifyingKey::from_bytes_le(&snarkvm_parameters::mainnet::INCLUSION_VERIFYING_KEY[1..]) .expect("Failed to load inclusion verifying key."), ) }) @@ -485,7 +485,7 @@ impl Network for Testnet3 { mod tests { use super::*; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_g_scalar_multiply() { diff --git a/console/program/src/data/access/bytes.rs b/console/program/src/data/access/bytes.rs index f2a560b148..561c4c04e1 100644 --- a/console/program/src/data/access/bytes.rs +++ b/console/program/src/data/access/bytes.rs @@ -46,9 +46,9 @@ impl ToBytes for Access { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 1000; diff --git a/console/program/src/data/access/parse.rs b/console/program/src/data/access/parse.rs index 4d5801e336..8c5ff6c3a3 100644 --- a/console/program/src/data/access/parse.rs +++ b/console/program/src/data/access/parse.rs @@ -63,9 +63,9 @@ impl Display for Access { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data/access/serialize.rs b/console/program/src/data/access/serialize.rs index 461f8c6d0c..8a48e236ea 100644 --- a/console/program/src/data/access/serialize.rs +++ b/console/program/src/data/access/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for Access { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; fn check_serde_json< T: Serialize + for<'a> Deserialize<'a> + Debug + Display + PartialEq + Eq + FromStr + ToBytes + FromBytes, diff --git a/console/program/src/data/ciphertext/bytes.rs b/console/program/src/data/ciphertext/bytes.rs index d983d9bb71..80b0c2d6d8 100644 --- a/console/program/src/data/ciphertext/bytes.rs +++ b/console/program/src/data/ciphertext/bytes.rs @@ -49,9 +49,9 @@ impl ToBytes for Ciphertext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 1000; diff --git a/console/program/src/data/ciphertext/decrypt.rs b/console/program/src/data/ciphertext/decrypt.rs index 1de811c4dc..5b10d4a9be 100644 --- a/console/program/src/data/ciphertext/decrypt.rs +++ b/console/program/src/data/ciphertext/decrypt.rs @@ -51,9 +51,9 @@ mod tests { use super::*; use crate::Literal; use snarkvm_console_account::{Address, PrivateKey}; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 100; diff --git a/console/program/src/data/ciphertext/parse.rs b/console/program/src/data/ciphertext/parse.rs index c3ca3f9b0a..185a8b2c29 100644 --- a/console/program/src/data/ciphertext/parse.rs +++ b/console/program/src/data/ciphertext/parse.rs @@ -74,9 +74,9 @@ impl Display for Ciphertext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/console/program/src/data/ciphertext/serialize.rs b/console/program/src/data/ciphertext/serialize.rs index 30070ead75..318fe2998b 100644 --- a/console/program/src/data/ciphertext/serialize.rs +++ b/console/program/src/data/ciphertext/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for Ciphertext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/program/src/data/future/bytes.rs b/console/program/src/data/future/bytes.rs index aa6122b4a4..b60b2ede0c 100644 --- a/console/program/src/data/future/bytes.rs +++ b/console/program/src/data/future/bytes.rs @@ -72,9 +72,9 @@ impl ToBytes for Future { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/console/program/src/data/future/parse.rs b/console/program/src/data/future/parse.rs index c54356afed..6fd88bf6c2 100644 --- a/console/program/src/data/future/parse.rs +++ b/console/program/src/data/future/parse.rs @@ -213,9 +213,9 @@ impl Future { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse_future() -> Result<()> { diff --git a/console/program/src/data/identifier/bytes.rs b/console/program/src/data/identifier/bytes.rs index 757f27ba40..967feee7cc 100644 --- a/console/program/src/data/identifier/bytes.rs +++ b/console/program/src/data/identifier/bytes.rs @@ -56,9 +56,9 @@ impl ToBytes for Identifier { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/program/src/data/identifier/from_bits.rs b/console/program/src/data/identifier/from_bits.rs index e4a81c7811..c0c7e1d098 100644 --- a/console/program/src/data/identifier/from_bits.rs +++ b/console/program/src/data/identifier/from_bits.rs @@ -46,9 +46,9 @@ impl FromBits for Identifier { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/data/identifier/from_field.rs b/console/program/src/data/identifier/from_field.rs index f5b597b37f..e5ea3bede8 100644 --- a/console/program/src/data/identifier/from_field.rs +++ b/console/program/src/data/identifier/from_field.rs @@ -28,9 +28,9 @@ impl FromField for Identifier { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/data/identifier/mod.rs b/console/program/src/data/identifier/mod.rs index 22a1bec117..0dde199981 100644 --- a/console/program/src/data/identifier/mod.rs +++ b/console/program/src/data/identifier/mod.rs @@ -74,9 +74,9 @@ impl TryFrom<&str> for Identifier { #[cfg(test)] pub(crate) mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/data/identifier/parse.rs b/console/program/src/data/identifier/parse.rs index 4d2673dd1f..daf02185fb 100644 --- a/console/program/src/data/identifier/parse.rs +++ b/console/program/src/data/identifier/parse.rs @@ -99,9 +99,9 @@ impl Display for Identifier { mod tests { use super::*; use crate::data::identifier::tests::{sample_identifier, sample_identifier_as_string}; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/data/identifier/serialize.rs b/console/program/src/data/identifier/serialize.rs index eadddc2a9d..0d2e4ee766 100644 --- a/console/program/src/data/identifier/serialize.rs +++ b/console/program/src/data/identifier/serialize.rs @@ -38,9 +38,9 @@ impl<'de, N: Network> Deserialize<'de> for Identifier { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/program/src/data/identifier/size_in_bits.rs b/console/program/src/data/identifier/size_in_bits.rs index 506b253ae4..ec3c113b47 100644 --- a/console/program/src/data/identifier/size_in_bits.rs +++ b/console/program/src/data/identifier/size_in_bits.rs @@ -28,9 +28,9 @@ impl Identifier { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier_as_string; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/data/identifier/to_bits.rs b/console/program/src/data/identifier/to_bits.rs index 2a22dc3234..efe0520ca7 100644 --- a/console/program/src/data/identifier/to_bits.rs +++ b/console/program/src/data/identifier/to_bits.rs @@ -46,9 +46,9 @@ impl ToBits for &Identifier { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier_as_string; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/data/identifier/to_field.rs b/console/program/src/data/identifier/to_field.rs index 5eb11072b2..815e79d7b2 100644 --- a/console/program/src/data/identifier/to_field.rs +++ b/console/program/src/data/identifier/to_field.rs @@ -36,9 +36,9 @@ impl ToField for &Identifier { mod tests { use super::*; use crate::data::identifier::tests::sample_identifier_as_string; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/data/literal/bytes.rs b/console/program/src/data/literal/bytes.rs index 1f77bf3430..d5386a2aa2 100644 --- a/console/program/src/data/literal/bytes.rs +++ b/console/program/src/data/literal/bytes.rs @@ -122,9 +122,9 @@ impl ToBytes for Literal { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 1000; diff --git a/console/program/src/data/literal/from_bits.rs b/console/program/src/data/literal/from_bits.rs index e7b26f5f95..57bdbe1111 100644 --- a/console/program/src/data/literal/from_bits.rs +++ b/console/program/src/data/literal/from_bits.rs @@ -95,9 +95,9 @@ impl Literal { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 1000; diff --git a/console/program/src/data/literal/parse.rs b/console/program/src/data/literal/parse.rs index 0a02b7200d..bada3c011b 100644 --- a/console/program/src/data/literal/parse.rs +++ b/console/program/src/data/literal/parse.rs @@ -93,9 +93,9 @@ impl Display for Literal { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse_program_id() -> Result<()> { diff --git a/console/program/src/data/literal/serialize.rs b/console/program/src/data/literal/serialize.rs index 2bf01a9154..5bad54669a 100644 --- a/console/program/src/data/literal/serialize.rs +++ b/console/program/src/data/literal/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for Literal { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/program/src/data/plaintext/bytes.rs b/console/program/src/data/plaintext/bytes.rs index 8fa2f1dba1..73a4e7670e 100644 --- a/console/program/src/data/plaintext/bytes.rs +++ b/console/program/src/data/plaintext/bytes.rs @@ -123,9 +123,9 @@ impl ToBytes for Plaintext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 1000; diff --git a/console/program/src/data/plaintext/equal.rs b/console/program/src/data/plaintext/equal.rs index 3432735d10..323feb8d84 100644 --- a/console/program/src/data/plaintext/equal.rs +++ b/console/program/src/data/plaintext/equal.rs @@ -84,9 +84,9 @@ impl Equal for Plaintext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; fn sample_plaintext() -> Plaintext { Plaintext::::from_str( diff --git a/console/program/src/data/plaintext/mod.rs b/console/program/src/data/plaintext/mod.rs index aea42f16b9..8080557e4a 100644 --- a/console/program/src/data/plaintext/mod.rs +++ b/console/program/src/data/plaintext/mod.rs @@ -59,12 +59,12 @@ impl From<&Literal> for Plaintext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; use snarkvm_console_types::Field; use core::str::FromStr; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_plaintext() -> Result<()> { diff --git a/console/program/src/data/plaintext/parse.rs b/console/program/src/data/plaintext/parse.rs index 7a395f4291..594e38ce68 100644 --- a/console/program/src/data/plaintext/parse.rs +++ b/console/program/src/data/plaintext/parse.rs @@ -205,9 +205,9 @@ impl Plaintext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse_literal() -> Result<()> { diff --git a/console/program/src/data/plaintext/serialize.rs b/console/program/src/data/plaintext/serialize.rs index 0ad4131272..82e7ac0b1c 100644 --- a/console/program/src/data/plaintext/serialize.rs +++ b/console/program/src/data/plaintext/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for Plaintext { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 2; diff --git a/console/program/src/data/record/bytes.rs b/console/program/src/data/record/bytes.rs index 6b4bcc0687..4e06c3abbf 100644 --- a/console/program/src/data/record/bytes.rs +++ b/console/program/src/data/record/bytes.rs @@ -82,9 +82,9 @@ impl ToBytes for Record { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/console/program/src/data/record/decrypt.rs b/console/program/src/data/record/decrypt.rs index 31fb963db2..d5d0f37b7f 100644 --- a/console/program/src/data/record/decrypt.rs +++ b/console/program/src/data/record/decrypt.rs @@ -96,10 +96,10 @@ mod tests { use super::*; use crate::Literal; use snarkvm_console_account::PrivateKey; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; use snarkvm_console_types::Field; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/program/src/data/record/entry/parse.rs b/console/program/src/data/record/entry/parse.rs index ec7a125da3..8ab61f6fa5 100644 --- a/console/program/src/data/record/entry/parse.rs +++ b/console/program/src/data/record/entry/parse.rs @@ -288,9 +288,9 @@ impl Entry> { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data/record/equal.rs b/console/program/src/data/record/equal.rs index 61bf58b714..c830b42b50 100644 --- a/console/program/src/data/record/equal.rs +++ b/console/program/src/data/record/equal.rs @@ -60,9 +60,9 @@ impl>> Equal for Reco #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; fn sample_record() -> Record> { Record::>::from_str( diff --git a/console/program/src/data/record/is_owner.rs b/console/program/src/data/record/is_owner.rs index 54df9c6958..06381ff9aa 100644 --- a/console/program/src/data/record/is_owner.rs +++ b/console/program/src/data/record/is_owner.rs @@ -62,10 +62,10 @@ mod tests { use super::*; use crate::Literal; use snarkvm_console_account::PrivateKey; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; use snarkvm_console_types::Field; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/console/program/src/data/record/parse_plaintext.rs b/console/program/src/data/record/parse_plaintext.rs index 0dfcdc4aa1..6179ac24a7 100644 --- a/console/program/src/data/record/parse_plaintext.rs +++ b/console/program/src/data/record/parse_plaintext.rs @@ -178,9 +178,9 @@ impl Record> { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse_without_data_entries() -> Result<()> { diff --git a/console/program/src/data/record/serialize.rs b/console/program/src/data/record/serialize.rs index 00f4331007..c5da3d5670 100644 --- a/console/program/src/data/record/serialize.rs +++ b/console/program/src/data/record/serialize.rs @@ -57,9 +57,9 @@ impl<'de, N: Network> Deserialize<'de> for Record> { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1; diff --git a/console/program/src/data/register/mod.rs b/console/program/src/data/register/mod.rs index 7b17c38b90..d0839dffef 100644 --- a/console/program/src/data/register/mod.rs +++ b/console/program/src/data/register/mod.rs @@ -57,9 +57,9 @@ impl PartialOrd for Register { mod tests { use super::*; use crate::{Identifier, U32}; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_register_partial_ord() -> Result<()> { diff --git a/console/program/src/data/register/parse.rs b/console/program/src/data/register/parse.rs index 714bf0a700..d40a26a396 100644 --- a/console/program/src/data/register/parse.rs +++ b/console/program/src/data/register/parse.rs @@ -88,9 +88,9 @@ impl Display for Register { mod tests { use super::*; use crate::{Identifier, U32}; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_register_display() -> Result<()> { // Register::Locator diff --git a/console/program/src/data/register/serialize.rs b/console/program/src/data/register/serialize.rs index a2835884ff..f5efb62e6f 100644 --- a/console/program/src/data/register/serialize.rs +++ b/console/program/src/data/register/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for Register { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; fn check_serde_json< T: Serialize + for<'a> Deserialize<'a> + Debug + Display + PartialEq + Eq + FromStr + ToBytes + FromBytes, diff --git a/console/program/src/data/value/bytes.rs b/console/program/src/data/value/bytes.rs index 50e8567f05..c4f673d89c 100644 --- a/console/program/src/data/value/bytes.rs +++ b/console/program/src/data/value/bytes.rs @@ -53,9 +53,9 @@ impl ToBytes for Value { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_value_plaintext_bytes() -> Result<()> { diff --git a/console/program/src/data/value/parse.rs b/console/program/src/data/value/parse.rs index 9186c5bae4..9c5dddf1f8 100644 --- a/console/program/src/data/value/parse.rs +++ b/console/program/src/data/value/parse.rs @@ -66,9 +66,9 @@ impl Display for Value { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_value_plaintext_parse() { diff --git a/console/program/src/data/value/serialize.rs b/console/program/src/data/value/serialize.rs index ed8d175b2c..61b94f0cba 100644 --- a/console/program/src/data/value/serialize.rs +++ b/console/program/src/data/value/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for Value { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_serde_json() -> Result<()> { diff --git a/console/program/src/data_types/array_type/bytes.rs b/console/program/src/data_types/array_type/bytes.rs index b01482ad4d..3030b11635 100644 --- a/console/program/src/data_types/array_type/bytes.rs +++ b/console/program/src/data_types/array_type/bytes.rs @@ -103,7 +103,7 @@ impl ToBytes for ArrayType { mod tests { use super::*; - type CurrentNetwork = snarkvm_console_network::Testnet3; + type CurrentNetwork = snarkvm_console_network::MainnetV0; #[test] fn test_array_maximum_depth() { diff --git a/console/program/src/data_types/array_type/mod.rs b/console/program/src/data_types/array_type/mod.rs index 9680c28517..b3c781b744 100644 --- a/console/program/src/data_types/array_type/mod.rs +++ b/console/program/src/data_types/array_type/mod.rs @@ -91,11 +91,11 @@ impl ArrayType { mod tests { use super::*; use crate::{Identifier, LiteralType}; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; use core::str::FromStr; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_array_type() -> Result<()> { diff --git a/console/program/src/data_types/array_type/serialize.rs b/console/program/src/data_types/array_type/serialize.rs index 425b243f58..72869ae263 100644 --- a/console/program/src/data_types/array_type/serialize.rs +++ b/console/program/src/data_types/array_type/serialize.rs @@ -37,7 +37,7 @@ impl<'de, N: Network> Deserialize<'de> for ArrayType { #[cfg(test)] pub(crate) mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; /// Add test cases here to be checked for serialization. pub(crate) const TEST_CASES: &[&str] = &[ @@ -100,14 +100,14 @@ pub(crate) mod tests { #[test] fn test_serde_json() { for case in TEST_CASES.iter() { - check_serde_json(ArrayType::::from_str(case).unwrap()); + check_serde_json(ArrayType::::from_str(case).unwrap()); } } #[test] fn test_bincode() { for case in TEST_CASES.iter() { - check_bincode(ArrayType::::from_str(case).unwrap()); + check_bincode(ArrayType::::from_str(case).unwrap()); } } } diff --git a/console/program/src/data_types/finalize_type/parse.rs b/console/program/src/data_types/finalize_type/parse.rs index 7ab5ef9421..a60a7a3462 100644 --- a/console/program/src/data_types/finalize_type/parse.rs +++ b/console/program/src/data_types/finalize_type/parse.rs @@ -65,9 +65,9 @@ impl Display for FinalizeType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data_types/finalize_type/serialize.rs b/console/program/src/data_types/finalize_type/serialize.rs index db0e58dfd1..ef4794f47a 100644 --- a/console/program/src/data_types/finalize_type/serialize.rs +++ b/console/program/src/data_types/finalize_type/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for FinalizeType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &[ diff --git a/console/program/src/data_types/plaintext_type/parse.rs b/console/program/src/data_types/plaintext_type/parse.rs index d1a0634019..4e55c6498b 100644 --- a/console/program/src/data_types/plaintext_type/parse.rs +++ b/console/program/src/data_types/plaintext_type/parse.rs @@ -68,9 +68,9 @@ impl Display for PlaintextType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data_types/plaintext_type/serialize.rs b/console/program/src/data_types/plaintext_type/serialize.rs index c9d602016c..f80a3862a8 100644 --- a/console/program/src/data_types/plaintext_type/serialize.rs +++ b/console/program/src/data_types/plaintext_type/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for PlaintextType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &[ diff --git a/console/program/src/data_types/record_type/bytes.rs b/console/program/src/data_types/record_type/bytes.rs index 0848fd93ef..172c41c631 100644 --- a/console/program/src/data_types/record_type/bytes.rs +++ b/console/program/src/data_types/record_type/bytes.rs @@ -88,9 +88,9 @@ impl ToBytes for RecordType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/console/program/src/data_types/record_type/entry_type/parse.rs b/console/program/src/data_types/record_type/entry_type/parse.rs index 587517b1f0..36b153bdbc 100644 --- a/console/program/src/data_types/record_type/entry_type/parse.rs +++ b/console/program/src/data_types/record_type/entry_type/parse.rs @@ -65,9 +65,9 @@ impl Display for EntryType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data_types/record_type/entry_type/serialize.rs b/console/program/src/data_types/record_type/entry_type/serialize.rs index a042781a7f..00884ef302 100644 --- a/console/program/src/data_types/record_type/entry_type/serialize.rs +++ b/console/program/src/data_types/record_type/entry_type/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for EntryType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &[ diff --git a/console/program/src/data_types/record_type/parse.rs b/console/program/src/data_types/record_type/parse.rs index fae51218c2..d995622e7c 100644 --- a/console/program/src/data_types/record_type/parse.rs +++ b/console/program/src/data_types/record_type/parse.rs @@ -134,9 +134,9 @@ impl Display for RecordType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data_types/record_type/serialize.rs b/console/program/src/data_types/record_type/serialize.rs index ea56b08bee..40c94d2149 100644 --- a/console/program/src/data_types/record_type/serialize.rs +++ b/console/program/src/data_types/record_type/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for RecordType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = diff --git a/console/program/src/data_types/register_type/parse.rs b/console/program/src/data_types/register_type/parse.rs index 9b70a48ecf..6cd6f5b4fc 100644 --- a/console/program/src/data_types/register_type/parse.rs +++ b/console/program/src/data_types/register_type/parse.rs @@ -71,9 +71,9 @@ impl Display for RegisterType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data_types/register_type/serialize.rs b/console/program/src/data_types/register_type/serialize.rs index b4b526ef36..919e750256 100644 --- a/console/program/src/data_types/register_type/serialize.rs +++ b/console/program/src/data_types/register_type/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for RegisterType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &[ diff --git a/console/program/src/data_types/struct_type/bytes.rs b/console/program/src/data_types/struct_type/bytes.rs index e7b9c31856..cdee12b982 100644 --- a/console/program/src/data_types/struct_type/bytes.rs +++ b/console/program/src/data_types/struct_type/bytes.rs @@ -73,9 +73,9 @@ impl ToBytes for StructType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/console/program/src/data_types/struct_type/parse.rs b/console/program/src/data_types/struct_type/parse.rs index 1b606a749f..42ad3b7ca0 100644 --- a/console/program/src/data_types/struct_type/parse.rs +++ b/console/program/src/data_types/struct_type/parse.rs @@ -114,9 +114,9 @@ impl Display for StructType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data_types/struct_type/serialize.rs b/console/program/src/data_types/struct_type/serialize.rs index 4d813a02f7..b5e0c2065c 100644 --- a/console/program/src/data_types/struct_type/serialize.rs +++ b/console/program/src/data_types/struct_type/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for StructType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &["struct message: owner as address; is_new as boolean; total_supply as u64;"]; diff --git a/console/program/src/data_types/value_type/parse.rs b/console/program/src/data_types/value_type/parse.rs index 6b98fd2b49..e7ce5402a8 100644 --- a/console/program/src/data_types/value_type/parse.rs +++ b/console/program/src/data_types/value_type/parse.rs @@ -72,9 +72,9 @@ impl Display for ValueType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/data_types/value_type/serialize.rs b/console/program/src/data_types/value_type/serialize.rs index d57c7c170f..fc6f779555 100644 --- a/console/program/src/data_types/value_type/serialize.rs +++ b/console/program/src/data_types/value_type/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for ValueType { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &[ diff --git a/console/program/src/id/mod.rs b/console/program/src/id/mod.rs index 4bab9a0886..da40170dda 100644 --- a/console/program/src/id/mod.rs +++ b/console/program/src/id/mod.rs @@ -151,9 +151,9 @@ impl Equal for ProgramID { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_partial_ord() -> Result<()> { diff --git a/console/program/src/id/parse.rs b/console/program/src/id/parse.rs index 86e3498fc0..8fa8a7f613 100644 --- a/console/program/src/id/parse.rs +++ b/console/program/src/id/parse.rs @@ -61,9 +61,9 @@ impl Display for ProgramID { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/console/program/src/id/serialize.rs b/console/program/src/id/serialize.rs index 76180a25a7..7857a201e1 100644 --- a/console/program/src/id/serialize.rs +++ b/console/program/src/id/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for ProgramID { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &["testing.aleo", "hello.aleo", "abc_def.aleo", "a1234.aleo"]; diff --git a/console/program/src/id/to_bits.rs b/console/program/src/id/to_bits.rs index a34dcd689d..3817a537f1 100644 --- a/console/program/src/id/to_bits.rs +++ b/console/program/src/id/to_bits.rs @@ -44,9 +44,9 @@ impl ToBits for &ProgramID { mod tests { use super::*; use crate::data::identifier::tests::sample_lowercase_identifier_as_string; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/locator/parse.rs b/console/program/src/locator/parse.rs index 129bd89e0f..9f787423d1 100644 --- a/console/program/src/locator/parse.rs +++ b/console/program/src/locator/parse.rs @@ -62,9 +62,9 @@ impl Display for Locator { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_import_parse() -> Result<()> { diff --git a/console/program/src/locator/serialize.rs b/console/program/src/locator/serialize.rs index ab25677216..82dd9acb66 100644 --- a/console/program/src/locator/serialize.rs +++ b/console/program/src/locator/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for Locator { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &["testing.aleo/abc", "hello.aleo/u1r02r", "hello_world.aleo/foo", "foo123.aleo/run"]; diff --git a/console/program/src/owner/bytes.rs b/console/program/src/owner/bytes.rs index edffec5844..c827ccfb64 100644 --- a/console/program/src/owner/bytes.rs +++ b/console/program/src/owner/bytes.rs @@ -49,9 +49,9 @@ impl ToBytes for ProgramOwner { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/console/program/src/owner/mod.rs b/console/program/src/owner/mod.rs index 96a532cd4c..4e7899b44d 100644 --- a/console/program/src/owner/mod.rs +++ b/console/program/src/owner/mod.rs @@ -63,11 +63,11 @@ impl ProgramOwner { #[cfg(test)] pub(crate) mod test_helpers { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; use once_cell::sync::OnceCell; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; pub(crate) fn sample_program_owner() -> ProgramOwner { static INSTANCE: OnceCell> = OnceCell::new(); diff --git a/console/program/src/request/input_id/serialize.rs b/console/program/src/request/input_id/serialize.rs index 0a74b0874e..c4961f18a4 100644 --- a/console/program/src/request/input_id/serialize.rs +++ b/console/program/src/request/input_id/serialize.rs @@ -93,9 +93,9 @@ impl<'de, N: Network> Deserialize<'de> for InputID { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Add test cases here to be checked for serialization. const TEST_CASES: &[&str] = &[ diff --git a/console/program/src/request/mod.rs b/console/program/src/request/mod.rs index 41b2e8097a..a04784b76b 100644 --- a/console/program/src/request/mod.rs +++ b/console/program/src/request/mod.rs @@ -164,9 +164,9 @@ impl Request { #[cfg(test)] mod test_helpers { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1000; diff --git a/console/program/src/request/verify.rs b/console/program/src/request/verify.rs index 9b0d25f647..d2f1f6739a 100644 --- a/console/program/src/request/verify.rs +++ b/console/program/src/request/verify.rs @@ -211,9 +211,9 @@ impl Request { mod tests { use super::*; use snarkvm_console_account::PrivateKey; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; pub(crate) const ITERATIONS: usize = 1000; diff --git a/console/program/src/state_path/bytes.rs b/console/program/src/state_path/bytes.rs index 13a42f96ff..4b4334fadd 100644 --- a/console/program/src/state_path/bytes.rs +++ b/console/program/src/state_path/bytes.rs @@ -94,9 +94,9 @@ impl ToBytes for StatePath { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/state_path/configuration/mod.rs b/console/program/src/state_path/configuration/mod.rs index fac6225f8f..80b920510f 100644 --- a/console/program/src/state_path/configuration/mod.rs +++ b/console/program/src/state_path/configuration/mod.rs @@ -71,7 +71,7 @@ mod tests { use super::*; use snarkvm_console_network::Network; - type CurrentNetwork = snarkvm_console_network::Testnet3; + type CurrentNetwork = snarkvm_console_network::MainnetV0; #[test] fn test_transaction_depth_is_correct() { diff --git a/console/program/src/state_path/header_leaf/mod.rs b/console/program/src/state_path/header_leaf/mod.rs index 1768af8046..ecfc8fc53f 100644 --- a/console/program/src/state_path/header_leaf/mod.rs +++ b/console/program/src/state_path/header_leaf/mod.rs @@ -49,9 +49,9 @@ impl HeaderLeaf { #[cfg(test)] mod test_helpers { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; pub(super) fn sample_leaf(rng: &mut TestRng) -> HeaderLeaf { // Construct a new leaf. diff --git a/console/program/src/state_path/parse.rs b/console/program/src/state_path/parse.rs index de701da6b7..cff85c3bdd 100644 --- a/console/program/src/state_path/parse.rs +++ b/console/program/src/state_path/parse.rs @@ -74,9 +74,9 @@ impl Display for StatePath { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/state_path/serialize.rs b/console/program/src/state_path/serialize.rs index 119104105a..6ec1821db4 100644 --- a/console/program/src/state_path/serialize.rs +++ b/console/program/src/state_path/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for StatePath { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/program/src/state_path/transaction_leaf/mod.rs b/console/program/src/state_path/transaction_leaf/mod.rs index 1f3da92793..ef824af4d2 100644 --- a/console/program/src/state_path/transaction_leaf/mod.rs +++ b/console/program/src/state_path/transaction_leaf/mod.rs @@ -71,9 +71,9 @@ impl TransactionLeaf { #[cfg(test)] mod test_helpers { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; pub(super) fn sample_leaf(rng: &mut TestRng) -> TransactionLeaf { // Construct a new leaf. diff --git a/console/program/src/state_path/transition_leaf/mod.rs b/console/program/src/state_path/transition_leaf/mod.rs index 53e84eac0b..edd79d5e61 100644 --- a/console/program/src/state_path/transition_leaf/mod.rs +++ b/console/program/src/state_path/transition_leaf/mod.rs @@ -71,9 +71,9 @@ impl TransitionLeaf { #[cfg(test)] mod test_helpers { use super::*; - use snarkvm_console_network::Testnet3; + use snarkvm_console_network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; pub(super) fn sample_leaf(rng: &mut TestRng) -> TransitionLeaf { // Construct a new leaf. diff --git a/console/program/src/state_path/verify.rs b/console/program/src/state_path/verify.rs index fe44638b89..8b93397e2d 100644 --- a/console/program/src/state_path/verify.rs +++ b/console/program/src/state_path/verify.rs @@ -133,9 +133,9 @@ impl StatePath { #[cfg(test)] mod tests { use super::*; - use snarkvm_console_network::{prelude::TestRng, Testnet3}; + use snarkvm_console_network::{prelude::TestRng, MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/console/types/benches/group.rs b/console/types/benches/group.rs index 97782f3881..4bd36e6b31 100644 --- a/console/types/benches/group.rs +++ b/console/types/benches/group.rs @@ -16,10 +16,10 @@ extern crate criterion; use criterion::Criterion; -use snarkvm_console_network::{environment::prelude::*, Testnet3}; +use snarkvm_console_network::{environment::prelude::*, MainnetV0}; use snarkvm_console_types::{Field, Group}; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; fn group_from_field(c: &mut Criterion) { let rng = &mut TestRng::default(); diff --git a/ledger/authority/src/lib.rs b/ledger/authority/src/lib.rs index a3fcf38adf..5d6c8e5736 100644 --- a/ledger/authority/src/lib.rs +++ b/ledger/authority/src/lib.rs @@ -119,7 +119,7 @@ pub mod test_helpers { use super::*; use console::prelude::{TestRng, Uniform}; - pub type CurrentNetwork = console::network::Testnet3; + pub type CurrentNetwork = console::network::MainnetV0; /// Returns a sample beacon authority. pub fn sample_beacon_authority(rng: &mut TestRng) -> Authority { diff --git a/ledger/benches/block.rs b/ledger/benches/block.rs index 1ddacaf8ad..710c96661f 100644 --- a/ledger/benches/block.rs +++ b/ledger/benches/block.rs @@ -15,12 +15,12 @@ #[macro_use] extern crate criterion; -use console::{network::Testnet3, prelude::*}; +use console::{network::MainnetV0, prelude::*}; use ledger_block::Block; use criterion::Criterion; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; /// Loads the genesis block. fn load_genesis_block() -> Block { diff --git a/ledger/benches/transaction.rs b/ledger/benches/transaction.rs index 233e15aa37..17f241f99c 100644 --- a/ledger/benches/transaction.rs +++ b/ledger/benches/transaction.rs @@ -19,7 +19,7 @@ extern crate criterion; use console::{ account::*, - network::Testnet3, + network::MainnetV0, program::{Plaintext, Record, Value}, }; use ledger_block::Transition; @@ -30,9 +30,9 @@ use criterion::Criterion; use indexmap::IndexMap; fn initialize_vm( - private_key: &PrivateKey, + private_key: &PrivateKey, rng: &mut R, -) -> (VM>, Vec>>) { +) -> (VM>, Vec>>) { let vm = VM::from(ConsensusStore::open(None).unwrap()).unwrap(); // Initialize the genesis block. @@ -55,13 +55,13 @@ fn deploy(c: &mut Criterion) { let rng = &mut TestRng::default(); // Sample a new private key and address. - let private_key = PrivateKey::::new(rng).unwrap(); + let private_key = PrivateKey::::new(rng).unwrap(); // Initialize the VM. let (vm, records) = initialize_vm(&private_key, rng); // Create a sample program. - let program = Program::::from_str( + let program = Program::::from_str( r" program helloworld.aleo; @@ -88,7 +88,7 @@ fn execute(c: &mut Criterion) { let rng = &mut TestRng::default(); // Sample a new private key and address. - let private_key = PrivateKey::::new(rng).unwrap(); + let private_key = PrivateKey::::new(rng).unwrap(); let address = Address::try_from(&private_key).unwrap(); // Initialize the VM. @@ -96,9 +96,11 @@ fn execute(c: &mut Criterion) { { // Prepare the inputs. - let inputs = - [Value::::from_str(&address.to_string()).unwrap(), Value::::from_str("1u64").unwrap()] - .into_iter(); + let inputs = [ + Value::::from_str(&address.to_string()).unwrap(), + Value::::from_str("1u64").unwrap(), + ] + .into_iter(); // Authorize the execution. let execute_authorization = vm.authorize(&private_key, "credits.aleo", "transfer_public", inputs, rng).unwrap(); @@ -131,9 +133,9 @@ fn execute(c: &mut Criterion) { { // Prepare the inputs. let inputs = [ - Value::::Record(records[0].clone()), - Value::::from_str(&address.to_string()).unwrap(), - Value::::from_str("1u64").unwrap(), + Value::::Record(records[0].clone()), + Value::::from_str(&address.to_string()).unwrap(), + Value::::from_str("1u64").unwrap(), ] .into_iter(); diff --git a/ledger/block/src/bytes.rs b/ledger/block/src/bytes.rs index 6a2ced7743..9a33f1f2d2 100644 --- a/ledger/block/src/bytes.rs +++ b/ledger/block/src/bytes.rs @@ -128,9 +128,9 @@ impl ToBytes for Block { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/ledger/block/src/genesis.rs b/ledger/block/src/genesis.rs index b14156fd43..1370598a08 100644 --- a/ledger/block/src/genesis.rs +++ b/ledger/block/src/genesis.rs @@ -44,9 +44,9 @@ impl Block { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_genesis() { diff --git a/ledger/block/src/header/bytes.rs b/ledger/block/src/header/bytes.rs index 3ea781cfc2..a906e6a4ab 100644 --- a/ledger/block/src/header/bytes.rs +++ b/ledger/block/src/header/bytes.rs @@ -69,9 +69,9 @@ impl ToBytes for Header { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/ledger/block/src/header/genesis.rs b/ledger/block/src/header/genesis.rs index 52c19e6ed8..5d653b4671 100644 --- a/ledger/block/src/header/genesis.rs +++ b/ledger/block/src/header/genesis.rs @@ -69,9 +69,9 @@ impl Header { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Returns the expected block header size by summing its subcomponent sizes. /// Update this method if the contents of a block header have changed. diff --git a/ledger/block/src/header/merkle.rs b/ledger/block/src/header/merkle.rs index bef088944f..0c8f1c1ac1 100644 --- a/ledger/block/src/header/merkle.rs +++ b/ledger/block/src/header/merkle.rs @@ -89,9 +89,9 @@ impl Header { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/ledger/block/src/header/metadata/bytes.rs b/ledger/block/src/header/metadata/bytes.rs index f89a9046e3..f458935906 100644 --- a/ledger/block/src/header/metadata/bytes.rs +++ b/ledger/block/src/header/metadata/bytes.rs @@ -78,9 +78,9 @@ impl ToBytes for Metadata { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/ledger/block/src/header/metadata/genesis.rs b/ledger/block/src/header/metadata/genesis.rs index a3a107b228..dc34250c0c 100644 --- a/ledger/block/src/header/metadata/genesis.rs +++ b/ledger/block/src/header/metadata/genesis.rs @@ -72,9 +72,9 @@ impl Metadata { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Returns the expected metadata size by summing its subcomponent sizes. /// Update this method if the contents of the metadata have changed. diff --git a/ledger/block/src/header/metadata/mod.rs b/ledger/block/src/header/metadata/mod.rs index 842ecdccf7..9bb7e2dcab 100644 --- a/ledger/block/src/header/metadata/mod.rs +++ b/ledger/block/src/header/metadata/mod.rs @@ -172,7 +172,7 @@ impl Metadata { pub mod test_helpers { use super::*; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Samples a block metadata. pub(crate) fn sample_block_metadata(rng: &mut TestRng) -> Metadata { diff --git a/ledger/block/src/header/mod.rs b/ledger/block/src/header/mod.rs index 0d29c81721..2f963090d3 100644 --- a/ledger/block/src/header/mod.rs +++ b/ledger/block/src/header/mod.rs @@ -186,7 +186,7 @@ impl Header { pub mod test_helpers { use super::*; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Samples a block header. pub(crate) fn sample_block_header(rng: &mut TestRng) -> Header { diff --git a/ledger/block/src/helpers/target.rs b/ledger/block/src/helpers/target.rs index ffb6265bd2..40b2c9f461 100644 --- a/ledger/block/src/helpers/target.rs +++ b/ledger/block/src/helpers/target.rs @@ -226,9 +226,9 @@ fn retarget( #[cfg(test)] mod tests { use super::*; - use console::network::{prelude::*, Testnet3}; + use console::network::{prelude::*, MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 1000; diff --git a/ledger/block/src/lib.rs b/ledger/block/src/lib.rs index d7e9bfd1ce..f3ca6b3323 100644 --- a/ledger/block/src/lib.rs +++ b/ledger/block/src/lib.rs @@ -611,7 +611,7 @@ pub mod test_helpers { use once_cell::sync::OnceCell; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::network::AleoV0; /// Samples a random genesis block. diff --git a/ledger/block/src/ratifications/merkle.rs b/ledger/block/src/ratifications/merkle.rs index 806e4eb7ad..6d229abed2 100644 --- a/ledger/block/src/ratifications/merkle.rs +++ b/ledger/block/src/ratifications/merkle.rs @@ -54,9 +54,9 @@ impl Ratifications { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_ratifications_depth() { diff --git a/ledger/block/src/ratifications/mod.rs b/ledger/block/src/ratifications/mod.rs index bb11fe0951..4e6778e26e 100644 --- a/ledger/block/src/ratifications/mod.rs +++ b/ledger/block/src/ratifications/mod.rs @@ -137,7 +137,7 @@ impl Ratifications { pub mod test_helpers { use super::*; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Samples a block ratifications. pub(crate) fn sample_block_ratifications(rng: &mut TestRng) -> Ratifications { diff --git a/ledger/block/src/ratifications/serialize.rs b/ledger/block/src/ratifications/serialize.rs index df252a8bbd..7322772076 100644 --- a/ledger/block/src/ratifications/serialize.rs +++ b/ledger/block/src/ratifications/serialize.rs @@ -66,9 +66,9 @@ impl<'de, N: Network> Deserialize<'de> for Ratifications { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 100; diff --git a/ledger/block/src/ratify/mod.rs b/ledger/block/src/ratify/mod.rs index c9a468c229..0cc1c6f377 100644 --- a/ledger/block/src/ratify/mod.rs +++ b/ledger/block/src/ratify/mod.rs @@ -45,9 +45,9 @@ impl Ratify { #[cfg(test)] pub(crate) mod test_helpers { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; pub(crate) fn sample_ratifications(rng: &mut TestRng) -> Vec> { let committee = ledger_committee::test_helpers::sample_committee(rng); diff --git a/ledger/block/src/serialize.rs b/ledger/block/src/serialize.rs index 595a218a78..d440b450b6 100644 --- a/ledger/block/src/serialize.rs +++ b/ledger/block/src/serialize.rs @@ -71,9 +71,9 @@ impl<'de, N: Network> Deserialize<'de> for Block { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_serde_json() -> Result<()> { diff --git a/ledger/block/src/solutions/serialize.rs b/ledger/block/src/solutions/serialize.rs index a682e1f99d..712d624e91 100644 --- a/ledger/block/src/solutions/serialize.rs +++ b/ledger/block/src/solutions/serialize.rs @@ -65,7 +65,7 @@ pub(super) mod tests { use console::account::{Address, PrivateKey}; use ledger_coinbase::{PartialSolution, ProverSolution, PuzzleCommitment, PuzzleProof}; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; pub(crate) fn sample_solutions(rng: &mut TestRng) -> Solutions { // Sample a new solutions. diff --git a/ledger/block/src/transaction/deployment/mod.rs b/ledger/block/src/transaction/deployment/mod.rs index fbea825444..bf898b41ba 100644 --- a/ledger/block/src/transaction/deployment/mod.rs +++ b/ledger/block/src/transaction/deployment/mod.rs @@ -150,12 +150,12 @@ impl Deployment { #[cfg(test)] pub mod test_helpers { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; use synthesizer_process::Process; use once_cell::sync::OnceCell; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; type CurrentAleo = circuit::network::AleoV0; pub(crate) fn sample_deployment(rng: &mut TestRng) -> Deployment { diff --git a/ledger/block/src/transaction/execution/mod.rs b/ledger/block/src/transaction/execution/mod.rs index cfcbb26c51..7bd7d34ef2 100644 --- a/ledger/block/src/transaction/execution/mod.rs +++ b/ledger/block/src/transaction/execution/mod.rs @@ -147,7 +147,7 @@ impl Execution { pub mod test_helpers { use super::*; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Samples a random execution. pub(crate) fn sample_execution(rng: &mut TestRng) -> Execution { diff --git a/ledger/block/src/transaction/fee/mod.rs b/ledger/block/src/transaction/fee/mod.rs index 233704fca4..5bd90737ee 100644 --- a/ledger/block/src/transaction/fee/mod.rs +++ b/ledger/block/src/transaction/fee/mod.rs @@ -207,7 +207,7 @@ pub mod test_helpers { use once_cell::sync::OnceCell; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::network::AleoV0; /// Samples a random hardcoded private fee. diff --git a/ledger/block/src/transaction/mod.rs b/ledger/block/src/transaction/mod.rs index fe1ace4c76..3115d7a866 100644 --- a/ledger/block/src/transaction/mod.rs +++ b/ledger/block/src/transaction/mod.rs @@ -407,9 +407,9 @@ impl Transaction { #[cfg(test)] pub mod test_helpers { use super::*; - use console::{account::PrivateKey, network::Testnet3, program::ProgramOwner}; + use console::{account::PrivateKey, network::MainnetV0, program::ProgramOwner}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Samples a random deployment transaction with a private or public fee. pub fn sample_deployment_transaction(is_fee_private: bool, rng: &mut TestRng) -> Transaction { diff --git a/ledger/block/src/transactions/confirmed/mod.rs b/ledger/block/src/transactions/confirmed/mod.rs index c617c1b3f4..b1d4164d9a 100644 --- a/ledger/block/src/transactions/confirmed/mod.rs +++ b/ledger/block/src/transactions/confirmed/mod.rs @@ -338,9 +338,9 @@ impl Deref for ConfirmedTransaction { #[cfg(test)] pub mod test_helpers { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Samples an accepted deploy transaction at the given index. pub(crate) fn sample_accepted_deploy( @@ -449,7 +449,7 @@ mod test { use super::*; use crate::transactions::confirmed::test_helpers; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_accepted_execute() { diff --git a/ledger/block/src/transactions/merkle.rs b/ledger/block/src/transactions/merkle.rs index 7f666f4ff5..74c4fd9006 100644 --- a/ledger/block/src/transactions/merkle.rs +++ b/ledger/block/src/transactions/merkle.rs @@ -77,9 +77,9 @@ impl Transactions { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_transactions_depth() { diff --git a/ledger/block/src/transactions/mod.rs b/ledger/block/src/transactions/mod.rs index ef2f3a60f5..90bd1ec721 100644 --- a/ledger/block/src/transactions/mod.rs +++ b/ledger/block/src/transactions/mod.rs @@ -339,7 +339,7 @@ impl Transactions { pub mod test_helpers { use super::*; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Samples a block transactions. pub(crate) fn sample_block_transactions(rng: &mut TestRng) -> Transactions { @@ -352,7 +352,7 @@ mod tests { use super::*; use ledger_narwhal_batch_header::BatchHeader; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_max_transmissions() { diff --git a/ledger/block/src/transactions/rejected/mod.rs b/ledger/block/src/transactions/rejected/mod.rs index c730935c4d..6ce9886201 100644 --- a/ledger/block/src/transactions/rejected/mod.rs +++ b/ledger/block/src/transactions/rejected/mod.rs @@ -94,9 +94,9 @@ impl Rejected { #[cfg(test)] pub mod test_helpers { use super::*; - use console::{account::PrivateKey, network::Testnet3}; + use console::{account::PrivateKey, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Samples a rejected deployment. pub(crate) fn sample_rejected_deployment(is_fee_private: bool, rng: &mut TestRng) -> Rejected { diff --git a/ledger/block/src/transactions/serialize.rs b/ledger/block/src/transactions/serialize.rs index f1a264e611..a1e5d3b92e 100644 --- a/ledger/block/src/transactions/serialize.rs +++ b/ledger/block/src/transactions/serialize.rs @@ -65,9 +65,9 @@ impl<'de, N: Network> Deserialize<'de> for Transactions { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u32 = 6; diff --git a/ledger/block/src/transition/input/mod.rs b/ledger/block/src/transition/input/mod.rs index 284af88f76..c49beb2c11 100644 --- a/ledger/block/src/transition/input/mod.rs +++ b/ledger/block/src/transition/input/mod.rs @@ -180,9 +180,9 @@ impl Input { #[cfg(test)] pub(crate) mod test_helpers { use super::*; - use console::{network::Testnet3, program::Literal}; + use console::{network::MainnetV0, program::Literal}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Sample the transition inputs. pub(crate) fn sample_inputs() -> Vec<(::TransitionID, Input)> { diff --git a/ledger/block/src/transition/merkle.rs b/ledger/block/src/transition/merkle.rs index e2f05de05b..4874a675e0 100644 --- a/ledger/block/src/transition/merkle.rs +++ b/ledger/block/src/transition/merkle.rs @@ -97,9 +97,9 @@ impl Transition { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_transition_depth() { diff --git a/ledger/block/src/transition/mod.rs b/ledger/block/src/transition/mod.rs index 9e93fc16a7..0856e20cf4 100644 --- a/ledger/block/src/transition/mod.rs +++ b/ledger/block/src/transition/mod.rs @@ -481,7 +481,7 @@ pub mod test_helpers { use super::*; use crate::Transaction; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Samples a random transition. pub(crate) fn sample_transition(rng: &mut TestRng) -> Transition { diff --git a/ledger/block/src/transition/output/mod.rs b/ledger/block/src/transition/output/mod.rs index 3f0f5ff7a4..84a7b5c594 100644 --- a/ledger/block/src/transition/output/mod.rs +++ b/ledger/block/src/transition/output/mod.rs @@ -257,9 +257,9 @@ impl Output { #[cfg(test)] pub(crate) mod test_helpers { use super::*; - use console::{network::Testnet3, program::Literal}; + use console::{network::MainnetV0, program::Literal}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Sample the transition outputs. pub(crate) fn sample_outputs() -> Vec<(::TransitionID, Output)> { diff --git a/ledger/coinbase/benches/coinbase_puzzle.rs b/ledger/coinbase/benches/coinbase_puzzle.rs index fe8c86c4ca..d48757930a 100644 --- a/ledger/coinbase/benches/coinbase_puzzle.rs +++ b/ledger/coinbase/benches/coinbase_puzzle.rs @@ -19,29 +19,29 @@ extern crate criterion; use console::{ account::*, - network::{Network, Testnet3}, + network::{MainnetV0, Network}, }; use snarkvm_ledger_coinbase::{CoinbasePuzzle, CoinbaseSolution, EpochChallenge, PuzzleConfig}; use criterion::Criterion; use rand::{self, thread_rng, CryptoRng, RngCore}; -type CoinbasePuzzleInst = CoinbasePuzzle; +type CoinbasePuzzleInst = CoinbasePuzzle; fn sample_inputs( degree: u32, rng: &mut (impl CryptoRng + RngCore), -) -> (EpochChallenge, Address, u64) { +) -> (EpochChallenge, Address, u64) { let epoch_challenge = sample_epoch_challenge(degree, rng); let (address, nonce) = sample_address_and_nonce(rng); (epoch_challenge, address, nonce) } -fn sample_epoch_challenge(degree: u32, rng: &mut (impl CryptoRng + RngCore)) -> EpochChallenge { +fn sample_epoch_challenge(degree: u32, rng: &mut (impl CryptoRng + RngCore)) -> EpochChallenge { EpochChallenge::new(rng.next_u32(), Default::default(), degree).unwrap() } -fn sample_address_and_nonce(rng: &mut (impl CryptoRng + RngCore)) -> (Address, u64) { +fn sample_address_and_nonce(rng: &mut (impl CryptoRng + RngCore)) -> (Address, u64) { let private_key = PrivateKey::new(rng).unwrap(); let address = Address::try_from(private_key).unwrap(); let nonce = rng.next_u64(); @@ -52,7 +52,7 @@ fn sample_address_and_nonce(rng: &mut (impl CryptoRng + RngCore)) -> (Address::setup(max_config).unwrap(); + let universal_srs = CoinbasePuzzle::::setup(max_config).unwrap(); for degree in [(1 << 13) - 1] { let config = PuzzleConfig { degree }; @@ -69,7 +69,7 @@ fn coinbase_puzzle_prove(c: &mut Criterion) { let max_degree = 1 << 15; let max_config = PuzzleConfig { degree: max_degree }; - let universal_srs = CoinbasePuzzle::::setup(max_config).unwrap(); + let universal_srs = CoinbasePuzzle::::setup(max_config).unwrap(); for degree in [(1 << 13) - 1] { let config = PuzzleConfig { degree }; @@ -88,14 +88,14 @@ fn coinbase_puzzle_verify(c: &mut Criterion) { let max_degree = 1 << 15; let max_config = PuzzleConfig { degree: max_degree }; - let universal_srs = CoinbasePuzzle::::setup(max_config).unwrap(); + let universal_srs = CoinbasePuzzle::::setup(max_config).unwrap(); for degree in [(1 << 13) - 1] { let config = PuzzleConfig { degree }; let puzzle = CoinbasePuzzleInst::trim(&universal_srs, config).unwrap(); let epoch_challenge = sample_epoch_challenge(degree, rng); - for batch_size in [10, 100, ::MAX_SOLUTIONS] { + for batch_size in [10, 100, ::MAX_SOLUTIONS] { let solutions = (0..batch_size) .map(|_| { let (address, nonce) = sample_address_and_nonce(rng); diff --git a/ledger/coinbase/src/helpers/coinbase_solution/serialize.rs b/ledger/coinbase/src/helpers/coinbase_solution/serialize.rs index ac973aee78..ab461e7023 100644 --- a/ledger/coinbase/src/helpers/coinbase_solution/serialize.rs +++ b/ledger/coinbase/src/helpers/coinbase_solution/serialize.rs @@ -48,7 +48,7 @@ pub(super) mod tests { use super::*; use console::account::PrivateKey; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; pub(crate) fn sample_solutions(rng: &mut TestRng) -> CoinbaseSolution { // Sample a new solutions. diff --git a/ledger/coinbase/src/helpers/epoch_challenge/bytes.rs b/ledger/coinbase/src/helpers/epoch_challenge/bytes.rs index e9e250ca9f..45398c0956 100644 --- a/ledger/coinbase/src/helpers/epoch_challenge/bytes.rs +++ b/ledger/coinbase/src/helpers/epoch_challenge/bytes.rs @@ -43,11 +43,11 @@ impl ToBytes for EpochChallenge { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; use rand::RngCore; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: usize = 100; diff --git a/ledger/coinbase/src/helpers/partial_solution/bytes.rs b/ledger/coinbase/src/helpers/partial_solution/bytes.rs index 7b919d93d5..57ef315034 100644 --- a/ledger/coinbase/src/helpers/partial_solution/bytes.rs +++ b/ledger/coinbase/src/helpers/partial_solution/bytes.rs @@ -37,9 +37,9 @@ impl ToBytes for PartialSolution { #[cfg(test)] mod tests { use super::*; - use console::{account::PrivateKey, network::Testnet3}; + use console::{account::PrivateKey, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/partial_solution/serialize.rs b/ledger/coinbase/src/helpers/partial_solution/serialize.rs index 322b0b155a..c71cfdb89e 100644 --- a/ledger/coinbase/src/helpers/partial_solution/serialize.rs +++ b/ledger/coinbase/src/helpers/partial_solution/serialize.rs @@ -52,9 +52,9 @@ impl<'de, N: Network> Deserialize<'de> for PartialSolution { #[cfg(test)] mod tests { use super::*; - use console::{account::PrivateKey, network::Testnet3}; + use console::{account::PrivateKey, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_serde_json() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/partial_solution/string.rs b/ledger/coinbase/src/helpers/partial_solution/string.rs index 4b21975538..d194cc2121 100644 --- a/ledger/coinbase/src/helpers/partial_solution/string.rs +++ b/ledger/coinbase/src/helpers/partial_solution/string.rs @@ -40,9 +40,9 @@ impl Display for PartialSolution { #[cfg(test)] mod tests { use super::*; - use console::{account::PrivateKey, network::Testnet3}; + use console::{account::PrivateKey, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_string() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/prover_solution/bytes.rs b/ledger/coinbase/src/helpers/prover_solution/bytes.rs index f5c5bdacf8..20e846b5f5 100644 --- a/ledger/coinbase/src/helpers/prover_solution/bytes.rs +++ b/ledger/coinbase/src/helpers/prover_solution/bytes.rs @@ -35,9 +35,9 @@ impl ToBytes for ProverSolution { #[cfg(test)] mod tests { use super::*; - use console::{account::PrivateKey, network::Testnet3}; + use console::{account::PrivateKey, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/prover_solution/serialize.rs b/ledger/coinbase/src/helpers/prover_solution/serialize.rs index 564cba8bed..0b737310b0 100644 --- a/ledger/coinbase/src/helpers/prover_solution/serialize.rs +++ b/ledger/coinbase/src/helpers/prover_solution/serialize.rs @@ -60,9 +60,9 @@ impl<'de, N: Network> Deserialize<'de> for ProverSolution { #[cfg(test)] mod tests { use super::*; - use console::{account::PrivateKey, network::Testnet3}; + use console::{account::PrivateKey, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_serde_json() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/prover_solution/string.rs b/ledger/coinbase/src/helpers/prover_solution/string.rs index 66f6a79275..1c96dcb4ed 100644 --- a/ledger/coinbase/src/helpers/prover_solution/string.rs +++ b/ledger/coinbase/src/helpers/prover_solution/string.rs @@ -40,9 +40,9 @@ impl Display for ProverSolution { #[cfg(test)] mod tests { use super::*; - use console::{account::PrivateKey, network::Testnet3}; + use console::{account::PrivateKey, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_string() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/puzzle_commitment/bytes.rs b/ledger/coinbase/src/helpers/puzzle_commitment/bytes.rs index 1f83beb97d..f76cca0553 100644 --- a/ledger/coinbase/src/helpers/puzzle_commitment/bytes.rs +++ b/ledger/coinbase/src/helpers/puzzle_commitment/bytes.rs @@ -33,9 +33,9 @@ impl ToBytes for PuzzleCommitment { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/puzzle_commitment/serialize.rs b/ledger/coinbase/src/helpers/puzzle_commitment/serialize.rs index 3f753fc143..61283b5551 100644 --- a/ledger/coinbase/src/helpers/puzzle_commitment/serialize.rs +++ b/ledger/coinbase/src/helpers/puzzle_commitment/serialize.rs @@ -37,9 +37,9 @@ impl<'de, N: Network> Deserialize<'de> for PuzzleCommitment { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_serde_json() -> Result<()> { diff --git a/ledger/coinbase/src/helpers/puzzle_commitment/string.rs b/ledger/coinbase/src/helpers/puzzle_commitment/string.rs index d01cac5802..3560889e60 100644 --- a/ledger/coinbase/src/helpers/puzzle_commitment/string.rs +++ b/ledger/coinbase/src/helpers/puzzle_commitment/string.rs @@ -57,9 +57,9 @@ impl Display for PuzzleCommitment { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const ITERATIONS: u64 = 1_000; diff --git a/ledger/coinbase/src/tests.rs b/ledger/coinbase/src/tests.rs index 15a39fc6a3..54311253e4 100644 --- a/ledger/coinbase/src/tests.rs +++ b/ledger/coinbase/src/tests.rs @@ -13,7 +13,7 @@ // limitations under the License. use super::*; -use console::{account::*, network::Testnet3}; +use console::{account::*, network::MainnetV0}; use snarkvm_utilities::Uniform; use rand::RngCore; @@ -26,18 +26,18 @@ fn test_coinbase_puzzle() { let max_degree = 1 << 15; let max_config = PuzzleConfig { degree: max_degree }; - let srs = CoinbasePuzzle::::setup(max_config).unwrap(); + let srs = CoinbasePuzzle::::setup(max_config).unwrap(); for log_degree in 5..10 { let degree = (1 << log_degree) - 1; let config = PuzzleConfig { degree }; - let puzzle = CoinbasePuzzle::::trim(&srs, config).unwrap(); + let puzzle = CoinbasePuzzle::::trim(&srs, config).unwrap(); let epoch_challenge = EpochChallenge::new(rng.next_u32(), Default::default(), degree).unwrap(); for batch_size in 1..10 { let solutions = (0..batch_size) .map(|_| { - let private_key = PrivateKey::::new(&mut rng).unwrap(); + let private_key = PrivateKey::::new(&mut rng).unwrap(); let address = Address::try_from(private_key).unwrap(); let nonce = u64::rand(&mut rng); puzzle.prove(&epoch_challenge, address, nonce, None).unwrap() @@ -58,16 +58,16 @@ fn test_prover_solution_minimum_target() { let max_degree = 1 << 15; let max_config = PuzzleConfig { degree: max_degree }; - let srs = CoinbasePuzzle::::setup(max_config).unwrap(); + let srs = CoinbasePuzzle::::setup(max_config).unwrap(); for log_degree in 5..10 { let degree = (1 << log_degree) - 1; let config = PuzzleConfig { degree }; - let puzzle = CoinbasePuzzle::::trim(&srs, config).unwrap(); + let puzzle = CoinbasePuzzle::::trim(&srs, config).unwrap(); let epoch_challenge = EpochChallenge::new(rng.next_u32(), Default::default(), degree).unwrap(); for _ in 0..ITERATIONS { - let private_key = PrivateKey::::new(&mut rng).unwrap(); + let private_key = PrivateKey::::new(&mut rng).unwrap(); let address = Address::try_from(private_key).unwrap(); let nonce = u64::rand(&mut rng); @@ -90,14 +90,14 @@ fn test_edge_case_for_degree() { // Generate srs. let max_degree = 1 << 15; let max_config = PuzzleConfig { degree: max_degree }; - let srs = CoinbasePuzzle::::setup(max_config).unwrap(); + let srs = CoinbasePuzzle::::setup(max_config).unwrap(); // Generate PK and VK. let degree = (1 << 13) - 1; - let puzzle = CoinbasePuzzle::::trim(&srs, PuzzleConfig { degree }).unwrap(); + let puzzle = CoinbasePuzzle::::trim(&srs, PuzzleConfig { degree }).unwrap(); // Generate proof inputs - let private_key = PrivateKey::::new(&mut rng).unwrap(); + let private_key = PrivateKey::::new(&mut rng).unwrap(); let address = Address::try_from(private_key).unwrap(); let epoch_challenge = EpochChallenge::new(rng.gen(), Default::default(), degree).unwrap(); @@ -111,7 +111,7 @@ fn test_edge_case_for_degree() { #[ignore] #[test] fn test_profiler() -> Result<()> { - fn sample_address_and_nonce(rng: &mut (impl CryptoRng + RngCore)) -> (Address, u64) { + fn sample_address_and_nonce(rng: &mut (impl CryptoRng + RngCore)) -> (Address, u64) { let private_key = PrivateKey::new(rng).unwrap(); let address = Address::try_from(private_key).unwrap(); let nonce = rng.next_u64(); @@ -123,7 +123,7 @@ fn test_profiler() -> Result<()> { // Generate srs. let max_degree = 1 << 15; let max_config = PuzzleConfig { degree: max_degree }; - let universal_srs = CoinbasePuzzle::::setup(max_config).unwrap(); + let universal_srs = CoinbasePuzzle::::setup(max_config).unwrap(); // Generate PK and VK. let degree = (1 << 13) - 1; @@ -133,7 +133,7 @@ fn test_profiler() -> Result<()> { // Generate proof inputs let epoch_challenge = EpochChallenge::new(rng.next_u32(), Default::default(), degree).unwrap(); - for batch_size in [10, 100, ::MAX_SOLUTIONS] { + for batch_size in [10, 100, ::MAX_SOLUTIONS] { // Generate the solutions. let solutions = (0..batch_size) .map(|_| { diff --git a/ledger/committee/src/lib.rs b/ledger/committee/src/lib.rs index 9940c01e0e..b360cf3e29 100644 --- a/ledger/committee/src/lib.rs +++ b/ledger/committee/src/lib.rs @@ -237,7 +237,7 @@ pub mod test_helpers { use indexmap::IndexMap; use rand_distr::{Distribution, Exp}; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Samples a list of random committees. pub fn sample_committees(rng: &mut TestRng) -> Vec> { @@ -344,7 +344,7 @@ mod tests { use rayon::prelude::*; use std::sync::Arc; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; /// Checks the leader distribution. fn check_leader_distribution(committee: Committee, num_rounds: u64, tolerance_percent: f64) { diff --git a/ledger/committee/src/prop_tests.rs b/ledger/committee/src/prop_tests.rs index f0aa2e7bb2..992be5e216 100644 --- a/ledger/committee/src/prop_tests.rs +++ b/ledger/committee/src/prop_tests.rs @@ -29,7 +29,7 @@ use std::{ }; use test_strategy::proptest; -type CurrentNetwork = console::network::Testnet3; +type CurrentNetwork = console::network::MainnetV0; #[derive(Debug, Clone)] pub struct Validator { diff --git a/ledger/narwhal/batch-certificate/src/lib.rs b/ledger/narwhal/batch-certificate/src/lib.rs index c4c9c7194e..f3d8d42dca 100644 --- a/ledger/narwhal/batch-certificate/src/lib.rs +++ b/ledger/narwhal/batch-certificate/src/lib.rs @@ -226,11 +226,11 @@ impl BatchCertificate { #[cfg(any(test, feature = "test-helpers"))] pub mod test_helpers { use super::*; - use console::{account::PrivateKey, network::Testnet3, prelude::TestRng, types::Field}; + use console::{account::PrivateKey, network::MainnetV0, prelude::TestRng, types::Field}; use indexmap::IndexSet; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Returns a sample batch certificate, sampled at random. pub fn sample_batch_certificate(rng: &mut TestRng) -> BatchCertificate { @@ -317,7 +317,7 @@ pub mod test_helpers { mod tests { use super::*; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_maximum_signatures() { diff --git a/ledger/narwhal/batch-header/src/lib.rs b/ledger/narwhal/batch-header/src/lib.rs index 4389f696dc..d50ea0f7f3 100644 --- a/ledger/narwhal/batch-header/src/lib.rs +++ b/ledger/narwhal/batch-header/src/lib.rs @@ -201,11 +201,11 @@ impl BatchHeader { #[cfg(any(test, feature = "test-helpers"))] pub mod test_helpers { use super::*; - use console::{account::PrivateKey, network::Testnet3, prelude::TestRng}; + use console::{account::PrivateKey, network::MainnetV0, prelude::TestRng}; use time::OffsetDateTime; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Returns a sample batch header, sampled at random. pub fn sample_batch_header(rng: &mut TestRng) -> BatchHeader { diff --git a/ledger/narwhal/subdag/src/lib.rs b/ledger/narwhal/subdag/src/lib.rs index d699d07ecf..5bb62b203f 100644 --- a/ledger/narwhal/subdag/src/lib.rs +++ b/ledger/narwhal/subdag/src/lib.rs @@ -233,11 +233,11 @@ impl Deref for Subdag { #[cfg(any(test, feature = "test-helpers"))] pub mod test_helpers { use super::*; - use console::{network::Testnet3, prelude::TestRng}; + use console::{network::MainnetV0, prelude::TestRng}; use indexmap::{indexset, IndexSet}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Returns a sample subdag, sampled at random. pub fn sample_subdag(rng: &mut TestRng) -> Subdag { @@ -307,7 +307,7 @@ mod tests { use super::*; use narwhal_batch_header::BatchHeader; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; const ITERATIONS: u64 = 100; diff --git a/ledger/narwhal/transmission-id/src/lib.rs b/ledger/narwhal/transmission-id/src/lib.rs index 43ffea0191..285b58ff53 100644 --- a/ledger/narwhal/transmission-id/src/lib.rs +++ b/ledger/narwhal/transmission-id/src/lib.rs @@ -68,12 +68,12 @@ impl TransmissionID { pub mod test_helpers { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, prelude::{Rng, TestRng, Uniform}, types::Field, }; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Returns a list of sample transmission IDs, sampled at random. pub fn sample_transmission_ids(rng: &mut TestRng) -> Vec> { diff --git a/ledger/narwhal/transmission-id/src/string.rs b/ledger/narwhal/transmission-id/src/string.rs index 167ad781ef..e2e0b8ce86 100644 --- a/ledger/narwhal/transmission-id/src/string.rs +++ b/ledger/narwhal/transmission-id/src/string.rs @@ -52,9 +52,9 @@ impl Display for TransmissionID { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_string() { diff --git a/ledger/narwhal/transmission/src/lib.rs b/ledger/narwhal/transmission/src/lib.rs index a18d096241..a7e7950c21 100644 --- a/ledger/narwhal/transmission/src/lib.rs +++ b/ledger/narwhal/transmission/src/lib.rs @@ -68,13 +68,13 @@ impl From>> for Transmission { pub mod test_helpers { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, prelude::{Rng, TestRng}, }; use ::bytes::Bytes; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Returns a list of sample transmissions, sampled at random. pub fn sample_transmissions(rng: &mut TestRng) -> Vec> { diff --git a/ledger/src/get.rs b/ledger/src/get.rs index fcd03e604c..06263a4841 100644 --- a/ledger/src/get.rs +++ b/ledger/src/get.rs @@ -247,9 +247,9 @@ impl> Ledger { mod tests { use super::*; use crate::test_helpers::CurrentLedger; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_get_block() { diff --git a/ledger/src/lib.rs b/ledger/src/lib.rs index c56fc67c69..d7928b9581 100644 --- a/ledger/src/lib.rs +++ b/ledger/src/lib.rs @@ -389,14 +389,14 @@ pub(crate) mod test_helpers { use aleo_std::StorageMode; use console::{ account::{Address, PrivateKey, ViewKey}, - network::Testnet3, + network::MainnetV0, prelude::*, }; use ledger_block::Block; use ledger_store::ConsensusStore; use synthesizer::vm::VM; - pub(crate) type CurrentNetwork = Testnet3; + pub(crate) type CurrentNetwork = MainnetV0; #[cfg(not(feature = "rocks"))] pub(crate) type CurrentLedger = diff --git a/ledger/store/src/block/mod.rs b/ledger/store/src/block/mod.rs index 8e79fadaaa..38d67af76d 100644 --- a/ledger/store/src/block/mod.rs +++ b/ledger/store/src/block/mod.rs @@ -1401,7 +1401,7 @@ mod tests { use super::*; use crate::helpers::memory::BlockMemory; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_insert_get_remove() { diff --git a/ledger/store/src/helpers/memory/internal/map.rs b/ledger/store/src/helpers/memory/internal/map.rs index 211d7e11a1..892555f27d 100644 --- a/ledger/store/src/helpers/memory/internal/map.rs +++ b/ledger/store/src/helpers/memory/internal/map.rs @@ -365,9 +365,9 @@ impl< mod tests { use super::*; use crate::{atomic_batch_scope, atomic_finalize, FinalizeMode}; - use console::{account::Address, network::Testnet3}; + use console::{account::Address, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_contains_key_sanity_check() { diff --git a/ledger/store/src/helpers/memory/internal/nested_map.rs b/ledger/store/src/helpers/memory/internal/nested_map.rs index 2ad1ccdaf2..11d265ce21 100644 --- a/ledger/store/src/helpers/memory/internal/nested_map.rs +++ b/ledger/store/src/helpers/memory/internal/nested_map.rs @@ -591,9 +591,9 @@ fn to_map_key(m: &[u8], k: &[u8]) -> Vec { mod tests { use super::*; use crate::{atomic_batch_scope, atomic_finalize, FinalizeMode}; - use console::{account::Address, network::Testnet3}; + use console::{account::Address, network::MainnetV0}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_contains_key_sanity_check() { diff --git a/ledger/store/src/helpers/rocksdb/internal/map.rs b/ledger/store/src/helpers/rocksdb/internal/map.rs index 105d220121..558559f97d 100644 --- a/ledger/store/src/helpers/rocksdb/internal/map.rs +++ b/ledger/store/src/helpers/rocksdb/internal/map.rs @@ -538,14 +538,14 @@ mod tests { }; use console::{ account::{Address, FromStr}, - network::Testnet3, + network::MainnetV0, }; use anyhow::anyhow; use serial_test::serial; use tracing_test::traced_test; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; // Below are a few objects that mimic the way our DataMaps are organized, // in order to provide a more accurate test setup for some scenarios. diff --git a/ledger/store/src/helpers/rocksdb/internal/nested_map.rs b/ledger/store/src/helpers/rocksdb/internal/nested_map.rs index a86e64d97e..057a6acab7 100644 --- a/ledger/store/src/helpers/rocksdb/internal/nested_map.rs +++ b/ledger/store/src/helpers/rocksdb/internal/nested_map.rs @@ -763,14 +763,14 @@ mod tests { }; use console::{ account::{Address, FromStr}, - network::Testnet3, + network::MainnetV0, }; use anyhow::anyhow; use serial_test::serial; use tracing_test::traced_test; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; // Below are a few objects that mimic the way our NestedDataMaps are organized, // in order to provide a more accurate test setup for some scenarios. diff --git a/ledger/store/src/helpers/rocksdb/internal/tests.rs b/ledger/store/src/helpers/rocksdb/internal/tests.rs index d45466a256..2b59a232fc 100644 --- a/ledger/store/src/helpers/rocksdb/internal/tests.rs +++ b/ledger/store/src/helpers/rocksdb/internal/tests.rs @@ -18,7 +18,7 @@ use crate::helpers::{ MapRead, }; use console::{ - network::{Network, Testnet3}, + network::{MainnetV0, Network}, prelude::{TestRng, Uniform}, types::Scalar, }; @@ -154,7 +154,7 @@ fn test_insert_and_values() { #[test] #[serial] fn test_scalar_mul() { - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; let rng = &mut TestRng::default(); diff --git a/ledger/store/src/program/committee.rs b/ledger/store/src/program/committee.rs index aad82c6c34..3e7d70dc78 100644 --- a/ledger/store/src/program/committee.rs +++ b/ledger/store/src/program/committee.rs @@ -413,7 +413,7 @@ mod tests { use super::*; use crate::helpers::memory::CommitteeMemory; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_insert_get_remove() { diff --git a/ledger/store/src/program/finalize.rs b/ledger/store/src/program/finalize.rs index ac99850f57..a9608ea420 100644 --- a/ledger/store/src/program/finalize.rs +++ b/ledger/store/src/program/finalize.rs @@ -769,9 +769,9 @@ impl> FinalizeStore { mod tests { use super::*; use crate::helpers::memory::FinalizeMemory; - use console::{network::Testnet3, program::Literal, types::U64}; + use console::{network::MainnetV0, program::Literal, types::U64}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Checks `initialize_mapping`, `insert_key_value`, `remove_key_value`, and `remove_mapping`. fn check_initialize_insert_remove( diff --git a/ledger/store/src/transaction/execution.rs b/ledger/store/src/transaction/execution.rs index 39c11f4c79..1ebfaa9d95 100644 --- a/ledger/store/src/transaction/execution.rs +++ b/ledger/store/src/transaction/execution.rs @@ -394,7 +394,7 @@ mod tests { use super::*; use crate::{helpers::memory::ExecutionMemory, TransitionStore}; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; fn insert_get_remove(transaction: Transaction) -> Result<()> { let transaction_id = transaction.id(); diff --git a/ledger/test-helpers/src/lib.rs b/ledger/test-helpers/src/lib.rs index a9da8df767..7bcf84440a 100644 --- a/ledger/test-helpers/src/lib.rs +++ b/ledger/test-helpers/src/lib.rs @@ -39,7 +39,7 @@ use synthesizer_program::Program; use once_cell::sync::OnceCell; -type CurrentNetwork = console::network::Testnet3; +type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::network::AleoV0; /****************************************** Transition ********************************************/ diff --git a/parameters/examples/inclusion.rs b/parameters/examples/inclusion.rs index e7d0812197..40845d8739 100644 --- a/parameters/examples/inclusion.rs +++ b/parameters/examples/inclusion.rs @@ -16,7 +16,7 @@ use snarkvm_algorithms::crypto_hash::sha256::sha256; use snarkvm_circuit::{Aleo, Assignment}; use snarkvm_console::{ account::PrivateKey, - network::{Network, Testnet3}, + network::{MainnetV0, Network}, prelude::{One, ToBytes, Zero}, program::{Plaintext, Record, StatePath}, types::Field, @@ -170,8 +170,8 @@ pub fn main() -> Result<()> { } match args[1].as_str() { - "testnet3" => { - inclusion::()?; + "mainnet" => { + inclusion::()?; } _ => panic!("Invalid network"), }; diff --git a/parameters/examples/setup.rs b/parameters/examples/setup.rs index b7c5765652..86849715fb 100644 --- a/parameters/examples/setup.rs +++ b/parameters/examples/setup.rs @@ -14,7 +14,7 @@ use snarkvm_algorithms::crypto_hash::sha256::sha256; use snarkvm_circuit::Aleo; -use snarkvm_console::network::{prelude::ToBytes, Network, Testnet3}; +use snarkvm_console::network::{prelude::ToBytes, MainnetV0, Network}; use snarkvm_synthesizer::{Process, Program}; use anyhow::Result; @@ -60,7 +60,7 @@ fn write_metadata(filename: &str, metadata: &Value) -> Result<()> { /// (Do not use) Writes the metadata files. (cargo run --release --example setup usrs) pub fn usrs() -> Result<()> { - let paths = fs::read_dir("../src/testnet3/resources/").unwrap(); + let paths = fs::read_dir("../src/mainnet/resources/").unwrap(); for path in paths { let path = path?.path(); if let Some("usrs") = path.extension().and_then(|s| s.to_str()) { @@ -149,7 +149,7 @@ pub fn main() -> Result<()> { match args[1].as_str() { "usrs" => usrs()?, - "credits" => credits_program::()?, + "credits" => credits_program::()?, _ => panic!("Invalid parameter"), }; diff --git a/parameters/scripts/testnet3/credits.sh b/parameters/scripts/mainnet/credits.sh similarity index 62% rename from parameters/scripts/testnet3/credits.sh rename to parameters/scripts/mainnet/credits.sh index df8a1a68d0..9a9526350b 100755 --- a/parameters/scripts/testnet3/credits.sh +++ b/parameters/scripts/mainnet/credits.sh @@ -4,6 +4,6 @@ cargo run --release --example setup credits -- --nocapture || exit -mv *.metadata ../../src/testnet3/resources || exit +mv *.metadata ../../src/mainnet/resources || exit mv *.prover.* ~/.aleo/resources || exit -mv *.verifier ../../src/testnet3/resources || exit +mv *.verifier ../../src/mainnet/resources || exit diff --git a/parameters/scripts/mainnet/inclusion.sh b/parameters/scripts/mainnet/inclusion.sh new file mode 100755 index 0000000000..f9f6d7797e --- /dev/null +++ b/parameters/scripts/mainnet/inclusion.sh @@ -0,0 +1,9 @@ +# Generates the inclusion proving and verifying key. + +# Inputs: network + +cargo run --release --example inclusion mainnet -- --nocapture || exit + +mv inclusion.metadata ../../src/mainnet/resources || exit +mv inclusion.prover.* ~/.aleo/resources || exit +mv inclusion.verifier ../../src/mainnet/resources || exit diff --git a/parameters/scripts/testnet3/inclusion.sh b/parameters/scripts/testnet3/inclusion.sh deleted file mode 100755 index 3472647ec5..0000000000 --- a/parameters/scripts/testnet3/inclusion.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Generates the inclusion proving and verifying key. - -# Inputs: network - -cargo run --release --example inclusion testnet3 -- --nocapture || exit - -mv inclusion.metadata ../../src/testnet3/resources || exit -mv inclusion.prover.* ~/.aleo/resources || exit -mv inclusion.verifier ../../src/testnet3/resources || exit diff --git a/parameters/src/lib.rs b/parameters/src/lib.rs index 7dcf27c5f0..7959ca1b5a 100644 --- a/parameters/src/lib.rs +++ b/parameters/src/lib.rs @@ -30,7 +30,7 @@ pub mod macros; pub mod errors; pub use errors::*; -pub mod testnet3; +pub mod mainnet; pub mod prelude { pub use crate::errors::*; diff --git a/parameters/src/testnet3/genesis.rs b/parameters/src/mainnet/genesis.rs similarity index 100% rename from parameters/src/testnet3/genesis.rs rename to parameters/src/mainnet/genesis.rs diff --git a/parameters/src/testnet3/mod.rs b/parameters/src/mainnet/mod.rs similarity index 90% rename from parameters/src/testnet3/mod.rs rename to parameters/src/mainnet/mod.rs index 5233242d83..5112f329c6 100644 --- a/parameters/src/testnet3/mod.rs +++ b/parameters/src/mainnet/mod.rs @@ -115,19 +115,19 @@ macro_rules! insert_credit_keys { ($map:ident, $type:ident<$network:ident>, $variant:ident) => {{ paste::paste! { let string = stringify!([<$variant:lower>]); - $crate::insert_key!($map, string, $type<$network>, ("bond_public", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("unbond_public", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("unbond_delegator_as_validator", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("claim_unbond_public", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("set_validator_state", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("transfer_private", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("transfer_public", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("transfer_private_to_public", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("transfer_public_to_private", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("join", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("split", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("fee_private", $crate::testnet3::[]::load_bytes())); - $crate::insert_key!($map, string, $type<$network>, ("fee_public", $crate::testnet3::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("bond_public", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("unbond_public", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("unbond_delegator_as_validator", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("claim_unbond_public", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("set_validator_state", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("transfer_private", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("transfer_public", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("transfer_private_to_public", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("transfer_public_to_private", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("join", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("split", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("fee_private", $crate::mainnet::[]::load_bytes())); + $crate::insert_key!($map, string, $type<$network>, ("fee_public", $crate::mainnet::[]::load_bytes())); } }}; } diff --git a/parameters/src/testnet3/powers.rs b/parameters/src/mainnet/powers.rs similarity index 100% rename from parameters/src/testnet3/powers.rs rename to parameters/src/mainnet/powers.rs diff --git a/parameters/src/testnet3/resources/beta-h.metadata b/parameters/src/mainnet/resources/beta-h.metadata similarity index 100% rename from parameters/src/testnet3/resources/beta-h.metadata rename to parameters/src/mainnet/resources/beta-h.metadata diff --git a/parameters/src/testnet3/resources/beta-h.usrs b/parameters/src/mainnet/resources/beta-h.usrs similarity index 100% rename from parameters/src/testnet3/resources/beta-h.usrs rename to parameters/src/mainnet/resources/beta-h.usrs diff --git a/parameters/src/testnet3/resources/block.genesis b/parameters/src/mainnet/resources/block.genesis similarity index 100% rename from parameters/src/testnet3/resources/block.genesis rename to parameters/src/mainnet/resources/block.genesis diff --git a/parameters/src/testnet3/resources/bond_public.metadata b/parameters/src/mainnet/resources/bond_public.metadata similarity index 100% rename from parameters/src/testnet3/resources/bond_public.metadata rename to parameters/src/mainnet/resources/bond_public.metadata diff --git a/parameters/src/testnet3/resources/bond_public.verifier b/parameters/src/mainnet/resources/bond_public.verifier similarity index 100% rename from parameters/src/testnet3/resources/bond_public.verifier rename to parameters/src/mainnet/resources/bond_public.verifier diff --git a/parameters/src/testnet3/resources/claim_unbond_public.metadata b/parameters/src/mainnet/resources/claim_unbond_public.metadata similarity index 100% rename from parameters/src/testnet3/resources/claim_unbond_public.metadata rename to parameters/src/mainnet/resources/claim_unbond_public.metadata diff --git a/parameters/src/testnet3/resources/claim_unbond_public.verifier b/parameters/src/mainnet/resources/claim_unbond_public.verifier similarity index 100% rename from parameters/src/testnet3/resources/claim_unbond_public.verifier rename to parameters/src/mainnet/resources/claim_unbond_public.verifier diff --git a/parameters/src/testnet3/resources/fee_private.metadata b/parameters/src/mainnet/resources/fee_private.metadata similarity index 100% rename from parameters/src/testnet3/resources/fee_private.metadata rename to parameters/src/mainnet/resources/fee_private.metadata diff --git a/parameters/src/testnet3/resources/fee_private.verifier b/parameters/src/mainnet/resources/fee_private.verifier similarity index 100% rename from parameters/src/testnet3/resources/fee_private.verifier rename to parameters/src/mainnet/resources/fee_private.verifier diff --git a/parameters/src/testnet3/resources/fee_public.metadata b/parameters/src/mainnet/resources/fee_public.metadata similarity index 100% rename from parameters/src/testnet3/resources/fee_public.metadata rename to parameters/src/mainnet/resources/fee_public.metadata diff --git a/parameters/src/testnet3/resources/fee_public.verifier b/parameters/src/mainnet/resources/fee_public.verifier similarity index 100% rename from parameters/src/testnet3/resources/fee_public.verifier rename to parameters/src/mainnet/resources/fee_public.verifier diff --git a/parameters/src/testnet3/resources/genesis.metadata b/parameters/src/mainnet/resources/genesis.metadata similarity index 100% rename from parameters/src/testnet3/resources/genesis.metadata rename to parameters/src/mainnet/resources/genesis.metadata diff --git a/parameters/src/testnet3/resources/inclusion.metadata b/parameters/src/mainnet/resources/inclusion.metadata similarity index 100% rename from parameters/src/testnet3/resources/inclusion.metadata rename to parameters/src/mainnet/resources/inclusion.metadata diff --git a/parameters/src/testnet3/resources/inclusion.verifier b/parameters/src/mainnet/resources/inclusion.verifier similarity index 100% rename from parameters/src/testnet3/resources/inclusion.verifier rename to parameters/src/mainnet/resources/inclusion.verifier diff --git a/parameters/src/testnet3/resources/join.metadata b/parameters/src/mainnet/resources/join.metadata similarity index 100% rename from parameters/src/testnet3/resources/join.metadata rename to parameters/src/mainnet/resources/join.metadata diff --git a/parameters/src/testnet3/resources/join.verifier b/parameters/src/mainnet/resources/join.verifier similarity index 100% rename from parameters/src/testnet3/resources/join.verifier rename to parameters/src/mainnet/resources/join.verifier diff --git a/parameters/src/testnet3/resources/mint.metadata b/parameters/src/mainnet/resources/mint.metadata similarity index 100% rename from parameters/src/testnet3/resources/mint.metadata rename to parameters/src/mainnet/resources/mint.metadata diff --git a/parameters/src/testnet3/resources/neg-powers-of-beta.metadata b/parameters/src/mainnet/resources/neg-powers-of-beta.metadata similarity index 100% rename from parameters/src/testnet3/resources/neg-powers-of-beta.metadata rename to parameters/src/mainnet/resources/neg-powers-of-beta.metadata diff --git a/parameters/src/testnet3/resources/neg-powers-of-beta.usrs b/parameters/src/mainnet/resources/neg-powers-of-beta.usrs similarity index 100% rename from parameters/src/testnet3/resources/neg-powers-of-beta.usrs rename to parameters/src/mainnet/resources/neg-powers-of-beta.usrs diff --git a/parameters/src/testnet3/resources/powers-of-beta-15.metadata b/parameters/src/mainnet/resources/powers-of-beta-15.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-15.metadata rename to parameters/src/mainnet/resources/powers-of-beta-15.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-15.usrs b/parameters/src/mainnet/resources/powers-of-beta-15.usrs similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-15.usrs rename to parameters/src/mainnet/resources/powers-of-beta-15.usrs diff --git a/parameters/src/testnet3/resources/powers-of-beta-16.metadata b/parameters/src/mainnet/resources/powers-of-beta-16.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-16.metadata rename to parameters/src/mainnet/resources/powers-of-beta-16.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-16.usrs b/parameters/src/mainnet/resources/powers-of-beta-16.usrs similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-16.usrs rename to parameters/src/mainnet/resources/powers-of-beta-16.usrs diff --git a/parameters/src/testnet3/resources/powers-of-beta-17.metadata b/parameters/src/mainnet/resources/powers-of-beta-17.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-17.metadata rename to parameters/src/mainnet/resources/powers-of-beta-17.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-18.metadata b/parameters/src/mainnet/resources/powers-of-beta-18.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-18.metadata rename to parameters/src/mainnet/resources/powers-of-beta-18.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-19.metadata b/parameters/src/mainnet/resources/powers-of-beta-19.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-19.metadata rename to parameters/src/mainnet/resources/powers-of-beta-19.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-20.metadata b/parameters/src/mainnet/resources/powers-of-beta-20.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-20.metadata rename to parameters/src/mainnet/resources/powers-of-beta-20.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-21.metadata b/parameters/src/mainnet/resources/powers-of-beta-21.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-21.metadata rename to parameters/src/mainnet/resources/powers-of-beta-21.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-22.metadata b/parameters/src/mainnet/resources/powers-of-beta-22.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-22.metadata rename to parameters/src/mainnet/resources/powers-of-beta-22.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-23.metadata b/parameters/src/mainnet/resources/powers-of-beta-23.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-23.metadata rename to parameters/src/mainnet/resources/powers-of-beta-23.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-24.metadata b/parameters/src/mainnet/resources/powers-of-beta-24.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-24.metadata rename to parameters/src/mainnet/resources/powers-of-beta-24.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-25.metadata b/parameters/src/mainnet/resources/powers-of-beta-25.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-25.metadata rename to parameters/src/mainnet/resources/powers-of-beta-25.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-26.metadata b/parameters/src/mainnet/resources/powers-of-beta-26.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-26.metadata rename to parameters/src/mainnet/resources/powers-of-beta-26.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-27.metadata b/parameters/src/mainnet/resources/powers-of-beta-27.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-27.metadata rename to parameters/src/mainnet/resources/powers-of-beta-27.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-28.metadata b/parameters/src/mainnet/resources/powers-of-beta-28.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-28.metadata rename to parameters/src/mainnet/resources/powers-of-beta-28.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-gamma.metadata b/parameters/src/mainnet/resources/powers-of-beta-gamma.metadata similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-gamma.metadata rename to parameters/src/mainnet/resources/powers-of-beta-gamma.metadata diff --git a/parameters/src/testnet3/resources/powers-of-beta-gamma.usrs b/parameters/src/mainnet/resources/powers-of-beta-gamma.usrs similarity index 100% rename from parameters/src/testnet3/resources/powers-of-beta-gamma.usrs rename to parameters/src/mainnet/resources/powers-of-beta-gamma.usrs diff --git a/parameters/src/testnet3/resources/set_validator_state.metadata b/parameters/src/mainnet/resources/set_validator_state.metadata similarity index 100% rename from parameters/src/testnet3/resources/set_validator_state.metadata rename to parameters/src/mainnet/resources/set_validator_state.metadata diff --git a/parameters/src/testnet3/resources/set_validator_state.verifier b/parameters/src/mainnet/resources/set_validator_state.verifier similarity index 100% rename from parameters/src/testnet3/resources/set_validator_state.verifier rename to parameters/src/mainnet/resources/set_validator_state.verifier diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-15.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-15.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-15.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-15.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-15.usrs b/parameters/src/mainnet/resources/shifted-powers-of-beta-15.usrs similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-15.usrs rename to parameters/src/mainnet/resources/shifted-powers-of-beta-15.usrs diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-16.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-16.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-16.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-16.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-16.usrs b/parameters/src/mainnet/resources/shifted-powers-of-beta-16.usrs similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-16.usrs rename to parameters/src/mainnet/resources/shifted-powers-of-beta-16.usrs diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-17.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-17.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-17.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-17.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-18.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-18.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-18.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-18.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-19.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-19.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-19.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-19.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-20.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-20.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-20.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-20.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-21.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-21.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-21.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-21.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-22.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-22.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-22.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-22.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-23.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-23.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-23.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-23.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-24.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-24.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-24.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-24.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-25.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-25.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-25.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-25.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-26.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-26.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-26.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-26.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-27.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-27.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-27.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-27.metadata diff --git a/parameters/src/testnet3/resources/shifted-powers-of-beta-28.metadata b/parameters/src/mainnet/resources/shifted-powers-of-beta-28.metadata similarity index 100% rename from parameters/src/testnet3/resources/shifted-powers-of-beta-28.metadata rename to parameters/src/mainnet/resources/shifted-powers-of-beta-28.metadata diff --git a/parameters/src/testnet3/resources/split.metadata b/parameters/src/mainnet/resources/split.metadata similarity index 100% rename from parameters/src/testnet3/resources/split.metadata rename to parameters/src/mainnet/resources/split.metadata diff --git a/parameters/src/testnet3/resources/split.verifier b/parameters/src/mainnet/resources/split.verifier similarity index 100% rename from parameters/src/testnet3/resources/split.verifier rename to parameters/src/mainnet/resources/split.verifier diff --git a/parameters/src/testnet3/resources/transfer_private.metadata b/parameters/src/mainnet/resources/transfer_private.metadata similarity index 100% rename from parameters/src/testnet3/resources/transfer_private.metadata rename to parameters/src/mainnet/resources/transfer_private.metadata diff --git a/parameters/src/testnet3/resources/transfer_private.verifier b/parameters/src/mainnet/resources/transfer_private.verifier similarity index 100% rename from parameters/src/testnet3/resources/transfer_private.verifier rename to parameters/src/mainnet/resources/transfer_private.verifier diff --git a/parameters/src/testnet3/resources/transfer_private_to_public.metadata b/parameters/src/mainnet/resources/transfer_private_to_public.metadata similarity index 100% rename from parameters/src/testnet3/resources/transfer_private_to_public.metadata rename to parameters/src/mainnet/resources/transfer_private_to_public.metadata diff --git a/parameters/src/testnet3/resources/transfer_private_to_public.verifier b/parameters/src/mainnet/resources/transfer_private_to_public.verifier similarity index 100% rename from parameters/src/testnet3/resources/transfer_private_to_public.verifier rename to parameters/src/mainnet/resources/transfer_private_to_public.verifier diff --git a/parameters/src/testnet3/resources/transfer_public.metadata b/parameters/src/mainnet/resources/transfer_public.metadata similarity index 100% rename from parameters/src/testnet3/resources/transfer_public.metadata rename to parameters/src/mainnet/resources/transfer_public.metadata diff --git a/parameters/src/testnet3/resources/transfer_public.verifier b/parameters/src/mainnet/resources/transfer_public.verifier similarity index 100% rename from parameters/src/testnet3/resources/transfer_public.verifier rename to parameters/src/mainnet/resources/transfer_public.verifier diff --git a/parameters/src/testnet3/resources/transfer_public_to_private.metadata b/parameters/src/mainnet/resources/transfer_public_to_private.metadata similarity index 100% rename from parameters/src/testnet3/resources/transfer_public_to_private.metadata rename to parameters/src/mainnet/resources/transfer_public_to_private.metadata diff --git a/parameters/src/testnet3/resources/transfer_public_to_private.verifier b/parameters/src/mainnet/resources/transfer_public_to_private.verifier similarity index 100% rename from parameters/src/testnet3/resources/transfer_public_to_private.verifier rename to parameters/src/mainnet/resources/transfer_public_to_private.verifier diff --git a/parameters/src/testnet3/resources/unbond_delegator_as_validator.metadata b/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata similarity index 100% rename from parameters/src/testnet3/resources/unbond_delegator_as_validator.metadata rename to parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata diff --git a/parameters/src/testnet3/resources/unbond_delegator_as_validator.verifier b/parameters/src/mainnet/resources/unbond_delegator_as_validator.verifier similarity index 100% rename from parameters/src/testnet3/resources/unbond_delegator_as_validator.verifier rename to parameters/src/mainnet/resources/unbond_delegator_as_validator.verifier diff --git a/parameters/src/testnet3/resources/unbond_public.metadata b/parameters/src/mainnet/resources/unbond_public.metadata similarity index 100% rename from parameters/src/testnet3/resources/unbond_public.metadata rename to parameters/src/mainnet/resources/unbond_public.metadata diff --git a/parameters/src/testnet3/resources/unbond_public.verifier b/parameters/src/mainnet/resources/unbond_public.verifier similarity index 100% rename from parameters/src/testnet3/resources/unbond_public.verifier rename to parameters/src/mainnet/resources/unbond_public.verifier diff --git a/synthesizer/benches/kary_merkle_tree.rs b/synthesizer/benches/kary_merkle_tree.rs index 8a79e27201..3b41f8a460 100644 --- a/synthesizer/benches/kary_merkle_tree.rs +++ b/synthesizer/benches/kary_merkle_tree.rs @@ -21,7 +21,7 @@ use console::{ collections::kary_merkle_tree::KaryMerkleTree, network::{ prelude::{TestRng, ToBits, Uniform}, - Testnet3, + MainnetV0, }, types::Field, }; @@ -29,7 +29,7 @@ use synthesizer_snark::{ProvingKey, UniversalSRS}; use criterion::Criterion; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; type NativePathHasher = Sha3_256; @@ -42,7 +42,7 @@ const ARITY: u8 = 8; /// Generates the specified number of random Merkle tree leaves. macro_rules! generate_leaves { - ($num_leaves:expr, $rng:expr) => {{ (0..$num_leaves).map(|_| Field::::rand($rng).to_bits_le()).collect::>() }}; + ($num_leaves:expr, $rng:expr) => {{ (0..$num_leaves).map(|_| Field::::rand($rng).to_bits_le()).collect::>() }}; } fn batch_prove(c: &mut Criterion) { diff --git a/synthesizer/process/src/execute.rs b/synthesizer/process/src/execute.rs index 46b3db0363..5340eb402c 100644 --- a/synthesizer/process/src/execute.rs +++ b/synthesizer/process/src/execute.rs @@ -63,7 +63,7 @@ mod tests { use super::*; use console::types::Address; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::AleoV0; #[test] diff --git a/synthesizer/process/src/finalize.rs b/synthesizer/process/src/finalize.rs index 974ed1e158..ee1c28906f 100644 --- a/synthesizer/process/src/finalize.rs +++ b/synthesizer/process/src/finalize.rs @@ -448,7 +448,7 @@ mod tests { BlockStore, }; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::network::AleoV0; #[test] diff --git a/synthesizer/process/src/lib.rs b/synthesizer/process/src/lib.rs index 866130a523..53953ecad6 100644 --- a/synthesizer/process/src/lib.rs +++ b/synthesizer/process/src/lib.rs @@ -283,7 +283,7 @@ impl Process { #[cfg(any(test, feature = "test"))] pub mod test_helpers { use super::*; - use console::{account::PrivateKey, network::Testnet3, program::Identifier}; + use console::{account::PrivateKey, network::MainnetV0, program::Identifier}; use ledger_block::Transition; use ledger_query::Query; use ledger_store::{helpers::memory::BlockMemory, BlockStore}; @@ -291,7 +291,7 @@ pub mod test_helpers { use once_cell::sync::OnceCell; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; type CurrentAleo = circuit::network::AleoV0; pub fn sample_key() -> (Identifier, ProvingKey, VerifyingKey) { diff --git a/synthesizer/process/src/stack/authorization/mod.rs b/synthesizer/process/src/stack/authorization/mod.rs index 6a510f3814..89637fb8d8 100644 --- a/synthesizer/process/src/stack/authorization/mod.rs +++ b/synthesizer/process/src/stack/authorization/mod.rs @@ -254,7 +254,7 @@ pub(crate) mod test_helpers { use crate::Process; use console::account::PrivateKey; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::AleoV0; /// Returns a sample authorization. diff --git a/synthesizer/process/src/tests/test_credits.rs b/synthesizer/process/src/tests/test_credits.rs index d18259e6cb..201a9a7313 100644 --- a/synthesizer/process/src/tests/test_credits.rs +++ b/synthesizer/process/src/tests/test_credits.rs @@ -16,7 +16,7 @@ use crate::Process; use circuit::network::AleoV0; use console::{ account::{Address, PrivateKey}, - network::{prelude::*, Testnet3}, + network::{prelude::*, MainnetV0}, program::{Identifier, Literal, Plaintext, ProgramID, Value}, types::U64, }; @@ -34,7 +34,7 @@ use synthesizer_program::{FinalizeGlobalState, FinalizeStoreTrait, Program}; use indexmap::IndexMap; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; const NUM_BLOCKS_TO_UNLOCK: u32 = 360; diff --git a/synthesizer/process/src/tests/test_execute.rs b/synthesizer/process/src/tests/test_execute.rs index 1d182315e3..61b80a33ff 100644 --- a/synthesizer/process/src/tests/test_execute.rs +++ b/synthesizer/process/src/tests/test_execute.rs @@ -21,7 +21,7 @@ use crate::{ use circuit::{network::AleoV0, Aleo}; use console::{ account::{Address, PrivateKey, ViewKey}, - network::{prelude::*, Testnet3}, + network::{prelude::*, MainnetV0}, program::{Identifier, Literal, Plaintext, ProgramID, Record, Value}, types::{Field, U64}, }; @@ -41,7 +41,7 @@ use indexmap::IndexMap; use parking_lot::RwLock; use std::sync::Arc; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; /// Samples a new finalize state. @@ -1926,7 +1926,7 @@ function a: // Construct the expected transition order. let expected_order = [ - (program0.id(), Identifier::::from_str("c").unwrap()), + (program0.id(), Identifier::::from_str("c").unwrap()), (program1.id(), Identifier::from_str("b").unwrap()), (program2.id(), Identifier::from_str("a").unwrap()), ]; @@ -2108,16 +2108,16 @@ fn test_complex_execution_order() { // Construct the expected execution order. let expected_order = [ - (program0.id(), Identifier::::from_str("c").unwrap()), - (program1.id(), Identifier::::from_str("d").unwrap()), - (program2.id(), Identifier::::from_str("b").unwrap()), - (program0.id(), Identifier::::from_str("c").unwrap()), - (program1.id(), Identifier::::from_str("d").unwrap()), - (program2.id(), Identifier::::from_str("b").unwrap()), - (program1.id(), Identifier::::from_str("d").unwrap()), - (program0.id(), Identifier::::from_str("c").unwrap()), - (program3.id(), Identifier::::from_str("e").unwrap()), - (program4.id(), Identifier::::from_str("a").unwrap()), + (program0.id(), Identifier::::from_str("c").unwrap()), + (program1.id(), Identifier::::from_str("d").unwrap()), + (program2.id(), Identifier::::from_str("b").unwrap()), + (program0.id(), Identifier::::from_str("c").unwrap()), + (program1.id(), Identifier::::from_str("d").unwrap()), + (program2.id(), Identifier::::from_str("b").unwrap()), + (program1.id(), Identifier::::from_str("d").unwrap()), + (program0.id(), Identifier::::from_str("c").unwrap()), + (program3.id(), Identifier::::from_str("e").unwrap()), + (program4.id(), Identifier::::from_str("a").unwrap()), ]; for (transition, (expected_program_id, expected_function_name)) in trace.transitions().iter().zip_eq(expected_order.iter()) diff --git a/synthesizer/program/benches/instruction.rs b/synthesizer/program/benches/instruction.rs index 7940c49261..fcf76c4e44 100644 --- a/synthesizer/program/benches/instruction.rs +++ b/synthesizer/program/benches/instruction.rs @@ -18,7 +18,7 @@ // extern crate criterion; // // use console::{ -// network::{Testnet3, Network}, +// network::{MainnetV0, Network}, // prelude::{TestRng, Uniform, Zero}, // program::{ // Identifier, @@ -62,10 +62,10 @@ // // /// A helper function to construct a set of `FinalizeRegisters` with the given arguments. // fn setup_finalize_registers( -// stack: &Stack, +// stack: &Stack, // finalize_body: impl Display, -// args: &[Value], -// ) -> FinalizeRegisters { +// args: &[Value], +// ) -> FinalizeRegisters { // // Initialize a `Finalize` block with the benchmark arguments as inputs. // let mut finalize_string = "finalize foo:".to_string(); // for (i, arg) in args.iter().enumerate() { @@ -75,11 +75,11 @@ // })); // } // finalize_string.push_str(&finalize_body.to_string()); -// let finalize = Finalize::::from_str(&finalize_string).unwrap(); +// let finalize = Finalize::::from_str(&finalize_string).unwrap(); // // Construct the finalize state. -// let state = FinalizeGlobalState::new::(0, 0, 0, 0, ::BlockHash::default()).unwrap(); +// let state = FinalizeGlobalState::new::(0, 0, 0, 0, ::BlockHash::default()).unwrap(); // // Initialize a fresh set of finalize registers. -// let mut registers = FinalizeRegisters::new(state, ::TransitionID::default(), Identifier::from_str("test").unwrap(), FinalizeTypes::from_finalize(stack, &finalize).unwrap()); +// let mut registers = FinalizeRegisters::new(state, ::TransitionID::default(), Identifier::from_str("test").unwrap(), FinalizeTypes::from_finalize(stack, &finalize).unwrap()); // // Add the arguments into the registers. // for (i, arg) in args.iter().enumerate() { // registers.store(stack, &Register::Locator(i as u64), arg.clone()).unwrap(); @@ -92,7 +92,7 @@ // // Initialize an RNG. // let rng = &mut TestRng::default(); // // Initialize a process. -// let process = Process::::load().unwrap(); +// let process = Process::::load().unwrap(); // // Get the stack for the credits program. // // Note that this is not used for anything other than to satisfy the function signature for `finalize`. // // This is because `Stack`s are only used in finalize contexts to check that structs are well-formed. @@ -104,7 +104,7 @@ // { // use snarkvm_synthesizer_program::$instruction; // let name = concat!(stringify!($instruction), "/", stringify!($input)); -// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 into r1", $instruction::::opcode().to_string())).unwrap()); +// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 into r1", $instruction::::opcode().to_string())).unwrap()); // c.bench_function(&format!("{name}/instruction"), |b| { // b.iter_batched( // || { @@ -122,7 +122,7 @@ // { // use snarkvm_synthesizer_program::$instruction; // let name = concat!(stringify!($instruction), "/", stringify!($input)); -// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 into r1 as {}", $instruction::::opcode().to_string(), $as_type)).unwrap()); +// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 into r1 as {}", $instruction::::opcode().to_string(), $as_type)).unwrap()); // c.bench_function(&format!("{name}/instruction"), |b| { // b.iter_batched( // || { @@ -140,7 +140,7 @@ // { // use snarkvm_synthesizer_program::$instruction; // let name = concat!(stringify!($instruction), "/", stringify!($input_a), "_", stringify!($input_b)); -// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 r1 into r2", $instruction::::opcode().to_string())).unwrap()); +// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 r1 into r2", $instruction::::opcode().to_string())).unwrap()); // c.bench_function(&format!("{name}/instruction"), |b| { // b.iter_batched( // || { @@ -158,7 +158,7 @@ // { // use snarkvm_synthesizer_program::$instruction; // let name = concat!(stringify!($instruction), "/", stringify!($input_a), "_", stringify!($input_b), "_", stringify!($input_c)); -// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 r1 r2 into r3", $instruction::::opcode().to_string())).unwrap()); +// let instruction = Instruction::::$instruction($instruction::from_str(&format!("{} r0 r1 r2 into r3", $instruction::::opcode().to_string())).unwrap()); // c.bench_function(&format!("{name}/instruction"), |b| { // b.iter_batched( // || { @@ -179,7 +179,7 @@ // $({ // // Define the default sampling method. // let mut samples = iter::repeat_with(|| { -// let mut arg: $input:: = Uniform::rand(rng); +// let mut arg: $input:: = Uniform::rand(rng); // while (std::panic::catch_unwind(|| arg.$operation())).is_err() { // arg = Uniform::rand(rng); // } @@ -203,7 +203,7 @@ // $({ // // Define the default sampling method. // let mut samples = iter::repeat_with(|| { -// let mut arg: $input:: = Uniform::rand(rng); +// let mut arg: $input:: = Uniform::rand(rng); // while (std::panic::catch_unwind(|| arg.$operation().unwrap())).is_err() { // arg = Uniform::rand(rng); // } @@ -227,8 +227,8 @@ // $({ // // Define the default sampling method. // let mut samples = iter::repeat_with(|| { -// let mut first: $input_a:: = Uniform::rand(rng); -// let mut second: $input_b:: = Uniform::rand(rng); +// let mut first: $input_a:: = Uniform::rand(rng); +// let mut second: $input_b:: = Uniform::rand(rng); // while (std::panic::catch_unwind(|| first.$operation(&second))).is_err() { // first = Uniform::rand(rng); // second = Uniform::rand(rng); @@ -252,9 +252,9 @@ // ($operation:tt, $instruction:ident { $( ($input_a:ident, $input_b:ident, $input_c:ident), )+ }) => { // $({ // let mut samples = iter::repeat_with(|| { -// let mut first: $input_a:: = Uniform::rand(rng); -// let mut second: $input_b:: = Uniform::rand(rng); -// let mut third: $input_c:: = Uniform::rand(rng); +// let mut first: $input_a:: = Uniform::rand(rng); +// let mut second: $input_b:: = Uniform::rand(rng); +// let mut third: $input_c:: = Uniform::rand(rng); // while (std::panic::catch_unwind(|| $input_b::ternary(&first, &second, &third))).is_err() { // first = Uniform::rand(rng); // second = Uniform::rand(rng); @@ -314,13 +314,13 @@ // macro_rules! bench_assert { // ($typ:tt) => { // let mut samples = iter::repeat_with(|| { -// let result = $typ::::rand(rng); +// let result = $typ::::rand(rng); // (result.clone(), result) // }); // { // use snarkvm_synthesizer_program::AssertEq; // let name = concat!("AssertEq/", stringify!($typ), "_", stringify!($typ)); -// let instruction = Instruction::::AssertEq(AssertEq::from_str(&format!("{} r0 r1", AssertEq::::opcode().to_string())).unwrap()); +// let instruction = Instruction::::AssertEq(AssertEq::from_str(&format!("{} r0 r1", AssertEq::::opcode().to_string())).unwrap()); // c.bench_function(&format!("{name}/instruction"), |b| { // b.iter_batched( // || { @@ -333,17 +333,17 @@ // }); // }; // let mut samples = iter::repeat_with(|| { -// let first = $typ::::rand(rng); -// let mut second = $typ::::rand(rng); +// let first = $typ::::rand(rng); +// let mut second = $typ::::rand(rng); // while first == second { -// second = $typ::::rand(rng); +// second = $typ::::rand(rng); // } // (first, second) // }); // { // use snarkvm_synthesizer_program::AssertNeq; // let name = concat!("AssertNeq/", stringify!($typ), "_", stringify!($typ)); -// let instruction = Instruction::::AssertNeq(AssertNeq::from_str(&format!("{} r0 r1", AssertNeq::::opcode().to_string())).unwrap()); +// let instruction = Instruction::::AssertNeq(AssertNeq::from_str(&format!("{} r0 r1", AssertNeq::::opcode().to_string())).unwrap()); // c.bench_function(&format!("{name}/instruction"), |b| { // b.iter_batched( // || { @@ -390,19 +390,19 @@ // // macro_rules! bench_ped64_commit_instruction { // ($instruction:tt) => { -// let mut samples = iter::repeat_with(|| { (Boolean::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Boolean::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (Boolean, Scalar), }); -// let mut samples = iter::repeat_with(|| { (I8::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I8::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (I8, Scalar), }); -// let mut samples = iter::repeat_with(|| { (I16::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I16::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (I16, Scalar), }); -// let mut samples = iter::repeat_with(|| { (I32::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I32::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (I32, Scalar), }); -// let mut samples = iter::repeat_with(|| { (U8::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U8::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (U8, Scalar), }); -// let mut samples = iter::repeat_with(|| { (U16::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U16::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (U16, Scalar), }); -// let mut samples = iter::repeat_with(|| { (U32::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U32::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (U32, Scalar), }); // } // } @@ -410,19 +410,19 @@ // macro_rules! bench_commit_instruction { // ($instruction:tt) => { // bench_ped64_commit_instruction!($instruction); -// let mut samples = iter::repeat_with(|| { (Field::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Field::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (Field, Scalar), }); -// let mut samples = iter::repeat_with(|| { (Group::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Group::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (Group, Scalar), }); -// let mut samples = iter::repeat_with(|| { (I64::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I64::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (I64, Scalar), }); -// let mut samples = iter::repeat_with(|| { (I128::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I128::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (I128, Scalar), }); -// let mut samples = iter::repeat_with(|| { (U64::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U64::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (U64, Scalar), }); -// let mut samples = iter::repeat_with(|| { (U128::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U128::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (U128, Scalar), }); -// let mut samples = iter::repeat_with(|| { (Scalar::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Scalar::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, $instruction { (Scalar, Scalar), }); // } // } @@ -435,9 +435,9 @@ // bench_ped64_commit_instruction!(CommitPED64); // // bench_ped64_commit_instruction!(CommitPED128); -// let mut samples = iter::repeat_with(|| { (I64::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I64::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, CommitPED128 { (I64, Scalar), }); -// let mut samples = iter::repeat_with(|| { (U64::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U64::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, CommitPED128 { (U64, Scalar), }); // // use console::prelude::Div; @@ -505,19 +505,19 @@ // // macro_rules! bench_ped64_hash_instruction { // ($instruction:tt) => { -// let mut samples = iter::repeat_with(|| { Boolean::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { Boolean::::rand(rng) }); // bench_instruction!(samples, $instruction { Boolean, }, "group"); -// let mut samples = iter::repeat_with(|| { I8::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { I8::::rand(rng) }); // bench_instruction!(samples, $instruction { I8, }, "group"); -// let mut samples = iter::repeat_with(|| { I16::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { I16::::rand(rng) }); // bench_instruction!(samples, $instruction { I16, }, "group"); -// let mut samples = iter::repeat_with(|| { I32::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { I32::::rand(rng) }); // bench_instruction!(samples, $instruction { I32, }, "group"); -// let mut samples = iter::repeat_with(|| { U8::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { U8::::rand(rng) }); // bench_instruction!(samples, $instruction { U8, }, "group"); -// let mut samples = iter::repeat_with(|| { U16::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { U16::::rand(rng) }); // bench_instruction!(samples, $instruction { U16, }, "group"); -// let mut samples = iter::repeat_with(|| { U32::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { U32::::rand(rng) }); // bench_instruction!(samples, $instruction { U32, }, "group"); // } // } @@ -525,19 +525,19 @@ // macro_rules! bench_hash_instruction { // ($instruction:tt) => { // bench_ped64_hash_instruction!($instruction); -// let mut samples = iter::repeat_with(|| { Field::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { Field::::rand(rng) }); // bench_instruction!(samples, $instruction { Field, }, "group"); -// let mut samples = iter::repeat_with(|| { Group::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { Group::::rand(rng) }); // bench_instruction!(samples, $instruction { Group, }, "group"); -// let mut samples = iter::repeat_with(|| { I64::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { I64::::rand(rng) }); // bench_instruction!(samples, $instruction { I64, }, "group"); -// let mut samples = iter::repeat_with(|| { I128::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { I128::::rand(rng) }); // bench_instruction!(samples, $instruction { I128, }, "group"); -// let mut samples = iter::repeat_with(|| { U64::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { U64::::rand(rng) }); // bench_instruction!(samples, $instruction { U64, }, "group"); -// let mut samples = iter::repeat_with(|| { U128::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { U128::::rand(rng) }); // bench_instruction!(samples, $instruction { U128, }, "group"); -// let mut samples = iter::repeat_with(|| { Scalar::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { Scalar::::rand(rng) }); // bench_instruction!(samples, $instruction { Scalar, }, "group"); // } // } @@ -550,9 +550,9 @@ // bench_ped64_hash_instruction!(HashPED64); // // bench_ped64_hash_instruction!(HashPED128); -// let mut samples = iter::repeat_with(|| { I64::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { I64::::rand(rng) }); // bench_instruction!(samples, HashPED128 { I64, }, "group"); -// let mut samples = iter::repeat_with(|| { U64::::rand(rng) }); +// let mut samples = iter::repeat_with(|| { U64::::rand(rng) }); // bench_instruction!(samples, HashPED128 { U64, }, "group"); // // bench_hash_instruction!(HashPSD2); @@ -562,46 +562,46 @@ // use console::prelude::Inverse; // bench_instruction_with_default!(inverse?, Inv { Field, }); // -// let mut samples = iter::repeat_with(|| { (Boolean::::rand(rng), Boolean::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Boolean::::rand(rng), Boolean::::rand(rng)) }); // bench_instruction!(samples, IsEq { (Boolean, Boolean), }); // bench_instruction!(samples, IsNeq { (Boolean, Boolean), }); -// let mut samples = iter::repeat_with(|| { (Field::::rand(rng), Field::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Field::::rand(rng), Field::::rand(rng)) }); // bench_instruction!(samples, IsEq { (Field, Field), }); // bench_instruction!(samples, IsNeq { (Field, Field), }); -// let mut samples = iter::repeat_with(|| { (Group::::rand(rng), Group::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Group::::rand(rng), Group::::rand(rng)) }); // bench_instruction!(samples, IsEq { (Group, Group), }); // bench_instruction!(samples, IsNeq { (Group, Group), }); -// let mut samples = iter::repeat_with(|| { (I8::::rand(rng), I8::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I8::::rand(rng), I8::::rand(rng)) }); // bench_instruction!(samples, IsEq { (I8, I8), }); // bench_instruction!(samples, IsNeq { (I8, I8), }); -// let mut samples = iter::repeat_with(|| { (I16::::rand(rng), I16::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I16::::rand(rng), I16::::rand(rng)) }); // bench_instruction!(samples, IsEq { (I16, I16), }); // bench_instruction!(samples, IsNeq { (I16, I16), }); -// let mut samples = iter::repeat_with(|| { (I32::::rand(rng), I32::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I32::::rand(rng), I32::::rand(rng)) }); // bench_instruction!(samples, IsEq { (I32, I32), }); // bench_instruction!(samples, IsNeq { (I32, I32), }); -// let mut samples = iter::repeat_with(|| { (I64::::rand(rng), I64::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I64::::rand(rng), I64::::rand(rng)) }); // bench_instruction!(samples, IsEq { (I64, I64), }); // bench_instruction!(samples, IsNeq { (I64, I64), }); -// let mut samples = iter::repeat_with(|| { (I128::::rand(rng), I128::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (I128::::rand(rng), I128::::rand(rng)) }); // bench_instruction!(samples, IsEq { (I128, I128), }); // bench_instruction!(samples, IsNeq { (I128, I128), }); -// let mut samples = iter::repeat_with(|| { (Scalar::::rand(rng), Scalar::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (Scalar::::rand(rng), Scalar::::rand(rng)) }); // bench_instruction!(samples, IsEq { (Scalar, Scalar), }); // bench_instruction!(samples, IsNeq { (Scalar, Scalar), }); -// let mut samples = iter::repeat_with(|| { (U8::::rand(rng), U8::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U8::::rand(rng), U8::::rand(rng)) }); // bench_instruction!(samples, IsEq { (U8, U8), }); // bench_instruction!(samples, IsNeq { (U8, U8), }); -// let mut samples = iter::repeat_with(|| { (U16::::rand(rng), U16::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U16::::rand(rng), U16::::rand(rng)) }); // bench_instruction!(samples, IsEq { (U16, U16), }); // bench_instruction!(samples, IsNeq { (U16, U16), }); -// let mut samples = iter::repeat_with(|| { (U32::::rand(rng), U32::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U32::::rand(rng), U32::::rand(rng)) }); // bench_instruction!(samples, IsEq { (U32, U32), }); // bench_instruction!(samples, IsNeq { (U32, U32), }); -// let mut samples = iter::repeat_with(|| { (U64::::rand(rng), U64::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U64::::rand(rng), U64::::rand(rng)) }); // bench_instruction!(samples, IsEq { (U64, U64), }); // bench_instruction!(samples, IsNeq { (U64, U64), }); -// let mut samples = iter::repeat_with(|| { (U128::::rand(rng), U128::::rand(rng)) }); +// let mut samples = iter::repeat_with(|| { (U128::::rand(rng), U128::::rand(rng)) }); // bench_instruction!(samples, IsEq { (U128, U128), }); // bench_instruction!(samples, IsNeq { (U128, U128), }); // @@ -651,25 +651,25 @@ // (Scalar, Group), // }); // // Use a custom sampling method for integer multiplication, since there is a high chance of overflow. -// let mut samples = iter::repeat((I8::::zero(), I8::::zero())); +// let mut samples = iter::repeat((I8::::zero(), I8::::zero())); // bench_instruction!(samples, Mul { (I8, I8), }); -// let mut samples = iter::repeat((I16::::zero(), I16::::zero())); +// let mut samples = iter::repeat((I16::::zero(), I16::::zero())); // bench_instruction!(samples, Mul { (I16, I16), }); -// let mut samples = iter::repeat((I32::::zero(), I32::::zero())); +// let mut samples = iter::repeat((I32::::zero(), I32::::zero())); // bench_instruction!(samples, Mul { (I32, I32), }); -// let mut samples = iter::repeat((I64::::zero(), I64::::zero())); +// let mut samples = iter::repeat((I64::::zero(), I64::::zero())); // bench_instruction!(samples, Mul { (I64, I64), }); -// let mut samples = iter::repeat((I128::::zero(), I128::::zero())); +// let mut samples = iter::repeat((I128::::zero(), I128::::zero())); // bench_instruction!(samples, Mul { (I128, I128), }); -// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); // bench_instruction!(samples, Mul { (U8, U8), }); -// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); // bench_instruction!(samples, Mul { (U16, U16), }); -// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); // bench_instruction!(samples, Mul { (U32, U32), }); -// let mut samples = iter::repeat((U64::::zero(), U64::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U64::::zero())); // bench_instruction!(samples, Mul { (U64, U64), }); -// let mut samples = iter::repeat((U128::::zero(), U128::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U128::::zero())); // bench_instruction!(samples, Mul { (U128, U128), }); // // use console::prelude::MulWrapped; @@ -721,65 +721,65 @@ // (Field, Field), // }); // // Use a custom sampling method for integer exponentiation, since there is a high chance of overflow. -// let mut samples = iter::repeat((I8::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (I8, U8), }); -// let mut samples = iter::repeat((I8::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (I8, U16), }); -// let mut samples = iter::repeat((I8::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (I8, U32), }); -// let mut samples = iter::repeat((I16::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (I16, U8), }); -// let mut samples = iter::repeat((I16::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (I16, U16), }); -// let mut samples = iter::repeat((I16::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (I16, U32), }); -// let mut samples = iter::repeat((I32::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (I32, U8), }); -// let mut samples = iter::repeat((I32::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (I32, U16), }); -// let mut samples = iter::repeat((I32::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (I32, U32), }); -// let mut samples = iter::repeat((I64::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (I64, U8), }); -// let mut samples = iter::repeat((I64::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (I64, U16), }); -// let mut samples = iter::repeat((I64::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (I64, U32), }); -// let mut samples = iter::repeat((I128::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (I128, U8), }); -// let mut samples = iter::repeat((I128::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (I128, U16), }); -// let mut samples = iter::repeat((I128::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (I128, U32), }); -// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (U8, U8), }); -// let mut samples = iter::repeat((U8::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (U8, U16), }); -// let mut samples = iter::repeat((U8::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (U8, U32), }); -// let mut samples = iter::repeat((U16::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (U16, U8), }); -// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (U16, U16), }); -// let mut samples = iter::repeat((U16::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (U16, U32), }); -// let mut samples = iter::repeat((U32::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (U32, U8), }); -// let mut samples = iter::repeat((U32::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (U32, U16), }); -// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (U32, U32), }); -// let mut samples = iter::repeat((U64::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (U64, U8), }); -// let mut samples = iter::repeat((U64::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (U64, U16), }); -// let mut samples = iter::repeat((U64::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (U64, U32), }); -// let mut samples = iter::repeat((U128::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U8::::zero())); // bench_instruction!(samples, Pow { (U128, U8), }); -// let mut samples = iter::repeat((U128::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U16::::zero())); // bench_instruction!(samples, Pow { (U128, U16), }); -// let mut samples = iter::repeat((U128::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U32::::zero())); // bench_instruction!(samples, Pow { (U128, U32), }); // // use console::prelude::PowWrapped; @@ -845,65 +845,65 @@ // }); // // // Use a custom sampling method for left-shift, since there is a high chance of overflow. -// let mut samples = iter::repeat((I8::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (I8, U8), }); -// let mut samples = iter::repeat((I8::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (I8, U16), }); -// let mut samples = iter::repeat((I8::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (I8, U32), }); -// let mut samples = iter::repeat((I16::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (I16, U8), }); -// let mut samples = iter::repeat((I16::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (I16, U16), }); -// let mut samples = iter::repeat((I16::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (I16, U32), }); -// let mut samples = iter::repeat((I32::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (I32, U8), }); -// let mut samples = iter::repeat((I32::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (I32, U16), }); -// let mut samples = iter::repeat((I32::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (I32, U32), }); -// let mut samples = iter::repeat((I64::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (I64, U8), }); -// let mut samples = iter::repeat((I64::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (I64, U16), }); -// let mut samples = iter::repeat((I64::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (I64, U32), }); -// let mut samples = iter::repeat((I128::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (I128, U8), }); -// let mut samples = iter::repeat((I128::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (I128, U16), }); -// let mut samples = iter::repeat((I128::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (I128, U32), }); -// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (U8, U8), }); -// let mut samples = iter::repeat((U8::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (U8, U16), }); -// let mut samples = iter::repeat((U8::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (U8, U32), }); -// let mut samples = iter::repeat((U16::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (U16, U8), }); -// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (U16, U16), }); -// let mut samples = iter::repeat((U16::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (U16, U32), }); -// let mut samples = iter::repeat((U32::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (U32, U8), }); -// let mut samples = iter::repeat((U32::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (U32, U16), }); -// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (U32, U32), }); -// let mut samples = iter::repeat((U64::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (U64, U8), }); -// let mut samples = iter::repeat((U64::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (U64, U16), }); -// let mut samples = iter::repeat((U64::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (U64, U32), }); -// let mut samples = iter::repeat((U128::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U8::::zero())); // bench_instruction!(samples, Shl { (U128, U8), }); -// let mut samples = iter::repeat((U128::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U16::::zero())); // bench_instruction!(samples, Shl { (U128, U16), }); -// let mut samples = iter::repeat((U128::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U32::::zero())); // bench_instruction!(samples, Shl { (U128, U32), }); // // use console::prelude::ShlWrapped; @@ -941,65 +941,65 @@ // }); // // // Use a custom sampling method for left-shift, since there is a high chance of overflow. -// let mut samples = iter::repeat((I8::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (I8, U8), }); -// let mut samples = iter::repeat((I8::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (I8, U16), }); -// let mut samples = iter::repeat((I8::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I8::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (I8, U32), }); -// let mut samples = iter::repeat((I16::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (I16, U8), }); -// let mut samples = iter::repeat((I16::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (I16, U16), }); -// let mut samples = iter::repeat((I16::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I16::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (I16, U32), }); -// let mut samples = iter::repeat((I32::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (I32, U8), }); -// let mut samples = iter::repeat((I32::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (I32, U16), }); -// let mut samples = iter::repeat((I32::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I32::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (I32, U32), }); -// let mut samples = iter::repeat((I64::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (I64, U8), }); -// let mut samples = iter::repeat((I64::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (I64, U16), }); -// let mut samples = iter::repeat((I64::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I64::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (I64, U32), }); -// let mut samples = iter::repeat((I128::::zero(), U8::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (I128, U8), }); -// let mut samples = iter::repeat((I128::::zero(), U16::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (I128, U16), }); -// let mut samples = iter::repeat((I128::::zero(), U32::::zero())); +// let mut samples = iter::repeat((I128::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (I128, U32), }); -// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (U8, U8), }); -// let mut samples = iter::repeat((U8::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (U8, U16), }); -// let mut samples = iter::repeat((U8::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U8::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (U8, U32), }); -// let mut samples = iter::repeat((U16::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (U16, U8), }); -// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (U16, U16), }); -// let mut samples = iter::repeat((U16::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U16::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (U16, U32), }); -// let mut samples = iter::repeat((U32::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (U32, U8), }); -// let mut samples = iter::repeat((U32::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (U32, U16), }); -// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U32::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (U32, U32), }); -// let mut samples = iter::repeat((U64::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (U64, U8), }); -// let mut samples = iter::repeat((U64::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (U64, U16), }); -// let mut samples = iter::repeat((U64::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U64::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (U64, U32), }); -// let mut samples = iter::repeat((U128::::zero(), U8::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U8::::zero())); // bench_instruction!(samples, Shr { (U128, U8), }); -// let mut samples = iter::repeat((U128::::zero(), U16::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U16::::zero())); // bench_instruction!(samples, Shr { (U128, U16), }); -// let mut samples = iter::repeat((U128::::zero(), U32::::zero())); +// let mut samples = iter::repeat((U128::::zero(), U32::::zero())); // bench_instruction!(samples, Shr { (U128, U32), }); // // use console::prelude::ShrWrapped; diff --git a/synthesizer/program/src/bytes.rs b/synthesizer/program/src/bytes.rs index a8f9b0e544..555df50c64 100644 --- a/synthesizer/program/src/bytes.rs +++ b/synthesizer/program/src/bytes.rs @@ -142,9 +142,9 @@ impl, Command: CommandTrait> ToB mod tests { use super::*; use crate::Program; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/synthesizer/program/src/closure/bytes.rs b/synthesizer/program/src/closure/bytes.rs index 60d717bf30..da3b8d7264 100644 --- a/synthesizer/program/src/closure/bytes.rs +++ b/synthesizer/program/src/closure/bytes.rs @@ -118,9 +118,9 @@ impl> ToBytes for ClosureCore Result<()> { diff --git a/synthesizer/program/src/closure/input/mod.rs b/synthesizer/program/src/closure/input/mod.rs index bbf9d4d0e4..927a089ed2 100644 --- a/synthesizer/program/src/closure/input/mod.rs +++ b/synthesizer/program/src/closure/input/mod.rs @@ -69,9 +69,9 @@ impl PartialOrd for Input { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_input_type_name() -> Result<()> { diff --git a/synthesizer/program/src/closure/input/parse.rs b/synthesizer/program/src/closure/input/parse.rs index 5a0f7c2481..c233d74d8c 100644 --- a/synthesizer/program/src/closure/input/parse.rs +++ b/synthesizer/program/src/closure/input/parse.rs @@ -94,9 +94,9 @@ impl Display for Input { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_input_parse() -> Result<()> { diff --git a/synthesizer/program/src/closure/mod.rs b/synthesizer/program/src/closure/mod.rs index 0cd26c267f..be54fddb4a 100644 --- a/synthesizer/program/src/closure/mod.rs +++ b/synthesizer/program/src/closure/mod.rs @@ -154,7 +154,7 @@ mod tests { use crate::{Closure, Instruction}; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_add_input() { diff --git a/synthesizer/program/src/closure/output/mod.rs b/synthesizer/program/src/closure/output/mod.rs index c886fab747..2a07177a1b 100644 --- a/synthesizer/program/src/closure/output/mod.rs +++ b/synthesizer/program/src/closure/output/mod.rs @@ -54,9 +54,9 @@ impl TypeName for Output { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_output_type_name() { diff --git a/synthesizer/program/src/closure/output/parse.rs b/synthesizer/program/src/closure/output/parse.rs index b9e7fd444a..bf2f4290cd 100644 --- a/synthesizer/program/src/closure/output/parse.rs +++ b/synthesizer/program/src/closure/output/parse.rs @@ -86,11 +86,11 @@ impl Display for Output { mod tests { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, program::{Literal, Register, U8}, }; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_output_parse() -> Result<()> { diff --git a/synthesizer/program/src/closure/parse.rs b/synthesizer/program/src/closure/parse.rs index 4d9894b0d7..9560dfc924 100644 --- a/synthesizer/program/src/closure/parse.rs +++ b/synthesizer/program/src/closure/parse.rs @@ -88,9 +88,9 @@ impl> Display for ClosureCore> ToBytes for FinalizeCore mod tests { use super::*; use crate::Finalize; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_finalize_bytes() -> Result<()> { diff --git a/synthesizer/program/src/finalize/input/mod.rs b/synthesizer/program/src/finalize/input/mod.rs index 88848caedc..1081768a45 100644 --- a/synthesizer/program/src/finalize/input/mod.rs +++ b/synthesizer/program/src/finalize/input/mod.rs @@ -69,9 +69,9 @@ impl PartialOrd for Input { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_input_type_name() -> Result<()> { diff --git a/synthesizer/program/src/finalize/input/parse.rs b/synthesizer/program/src/finalize/input/parse.rs index e2601c9a26..7cbe05e80d 100644 --- a/synthesizer/program/src/finalize/input/parse.rs +++ b/synthesizer/program/src/finalize/input/parse.rs @@ -88,9 +88,9 @@ impl Display for Input { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_input_parse() -> Result<()> { diff --git a/synthesizer/program/src/finalize/mod.rs b/synthesizer/program/src/finalize/mod.rs index 4404c34b05..d376e4554a 100644 --- a/synthesizer/program/src/finalize/mod.rs +++ b/synthesizer/program/src/finalize/mod.rs @@ -168,7 +168,7 @@ mod tests { use crate::{Command, Finalize}; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_add_input() { diff --git a/synthesizer/program/src/finalize/parse.rs b/synthesizer/program/src/finalize/parse.rs index ba60af4d33..79ca7ac9c5 100644 --- a/synthesizer/program/src/finalize/parse.rs +++ b/synthesizer/program/src/finalize/parse.rs @@ -90,9 +90,9 @@ impl> Display for FinalizeCore mod tests { use super::*; use crate::Finalize; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_finalize_parse() { diff --git a/synthesizer/program/src/function/bytes.rs b/synthesizer/program/src/function/bytes.rs index 64ddf4938c..50dbe7fb18 100644 --- a/synthesizer/program/src/function/bytes.rs +++ b/synthesizer/program/src/function/bytes.rs @@ -135,9 +135,9 @@ impl, Command: CommandTrait> ToB mod tests { use super::*; use crate::Function; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_function_bytes() -> Result<()> { diff --git a/synthesizer/program/src/function/input/mod.rs b/synthesizer/program/src/function/input/mod.rs index 193ae71141..8e6887826e 100644 --- a/synthesizer/program/src/function/input/mod.rs +++ b/synthesizer/program/src/function/input/mod.rs @@ -69,9 +69,9 @@ impl PartialOrd for Input { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_input_type_name() -> Result<()> { diff --git a/synthesizer/program/src/function/input/parse.rs b/synthesizer/program/src/function/input/parse.rs index 991e6efbc8..31a8cb50e4 100644 --- a/synthesizer/program/src/function/input/parse.rs +++ b/synthesizer/program/src/function/input/parse.rs @@ -94,9 +94,9 @@ impl Display for Input { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_input_parse() -> Result<()> { diff --git a/synthesizer/program/src/function/mod.rs b/synthesizer/program/src/function/mod.rs index 28e5aa9cd2..24674e9777 100644 --- a/synthesizer/program/src/function/mod.rs +++ b/synthesizer/program/src/function/mod.rs @@ -208,7 +208,7 @@ mod tests { use crate::{Function, Instruction}; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; #[test] fn test_add_input() { diff --git a/synthesizer/program/src/function/output/mod.rs b/synthesizer/program/src/function/output/mod.rs index 864affe4cf..1b5fb50581 100644 --- a/synthesizer/program/src/function/output/mod.rs +++ b/synthesizer/program/src/function/output/mod.rs @@ -54,9 +54,9 @@ impl TypeName for Output { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_output_type_name() { diff --git a/synthesizer/program/src/function/output/parse.rs b/synthesizer/program/src/function/output/parse.rs index 9f9328581f..b157beb175 100644 --- a/synthesizer/program/src/function/output/parse.rs +++ b/synthesizer/program/src/function/output/parse.rs @@ -86,11 +86,11 @@ impl Display for Output { mod tests { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, program::{Literal, Register, U8}, }; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_output_parse() -> Result<()> { diff --git a/synthesizer/program/src/function/parse.rs b/synthesizer/program/src/function/parse.rs index 7f65dc6fb2..48258a3e0b 100644 --- a/synthesizer/program/src/function/parse.rs +++ b/synthesizer/program/src/function/parse.rs @@ -123,9 +123,9 @@ impl, Command: CommandTrait> Dis mod tests { use super::*; use crate::Function; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_function_parse() { diff --git a/synthesizer/program/src/import/mod.rs b/synthesizer/program/src/import/mod.rs index f7baec62d5..46082a0e4d 100644 --- a/synthesizer/program/src/import/mod.rs +++ b/synthesizer/program/src/import/mod.rs @@ -73,9 +73,9 @@ impl PartialOrd for Import { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_import_type_name() -> Result<()> { diff --git a/synthesizer/program/src/import/parse.rs b/synthesizer/program/src/import/parse.rs index 0f4e749e98..ad53f31e7c 100644 --- a/synthesizer/program/src/import/parse.rs +++ b/synthesizer/program/src/import/parse.rs @@ -71,9 +71,9 @@ impl Display for Import { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_import_parse() -> Result<()> { diff --git a/synthesizer/program/src/lib.rs b/synthesizer/program/src/lib.rs index 556d9ed922..39daab2ceb 100644 --- a/synthesizer/program/src/lib.rs +++ b/synthesizer/program/src/lib.rs @@ -661,11 +661,11 @@ impl, Command: CommandTrait> Typ mod tests { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, program::{Locator, ValueType}, }; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_program_mapping() -> Result<()> { diff --git a/synthesizer/program/src/logic/command/await_.rs b/synthesizer/program/src/logic/command/await_.rs index f7c43803ef..5fc745c11e 100644 --- a/synthesizer/program/src/logic/command/await_.rs +++ b/synthesizer/program/src/logic/command/await_.rs @@ -114,9 +114,9 @@ impl ToBytes for Await { #[cfg(test)] mod tests { use super::*; - use console::{network::Testnet3, program::Register}; + use console::{network::MainnetV0, program::Register}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/command/branch.rs b/synthesizer/program/src/logic/command/branch.rs index a6ac651627..7efc86c665 100644 --- a/synthesizer/program/src/logic/command/branch.rs +++ b/synthesizer/program/src/logic/command/branch.rs @@ -167,11 +167,11 @@ impl ToBytes for Branch { mod tests { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, program::{Identifier, Register}, }; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/command/contains.rs b/synthesizer/program/src/logic/command/contains.rs index 14e1618d89..a3b0479c2e 100644 --- a/synthesizer/program/src/logic/command/contains.rs +++ b/synthesizer/program/src/logic/command/contains.rs @@ -202,9 +202,9 @@ impl ToBytes for Contains { #[cfg(test)] mod tests { use super::*; - use console::{network::Testnet3, program::Register}; + use console::{network::MainnetV0, program::Register}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/command/get.rs b/synthesizer/program/src/logic/command/get.rs index ac56eb92c0..84b355e945 100644 --- a/synthesizer/program/src/logic/command/get.rs +++ b/synthesizer/program/src/logic/command/get.rs @@ -352,9 +352,9 @@ impl ToBytes for Get { #[cfg(test)] mod tests { use super::*; - use console::{network::Testnet3, program::Register}; + use console::{network::MainnetV0, program::Register}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; struct OldGet { mapping: Identifier, diff --git a/synthesizer/program/src/logic/command/get_or_use.rs b/synthesizer/program/src/logic/command/get_or_use.rs index 7c2ef6d7d7..a4ef7cc080 100644 --- a/synthesizer/program/src/logic/command/get_or_use.rs +++ b/synthesizer/program/src/logic/command/get_or_use.rs @@ -275,9 +275,9 @@ impl ToBytes for GetOrUse { #[cfg(test)] mod tests { use super::*; - use console::{network::Testnet3, program::Register}; + use console::{network::MainnetV0, program::Register}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; pub struct OldGetOrUse { pub mapping: Identifier, diff --git a/synthesizer/program/src/logic/command/mod.rs b/synthesizer/program/src/logic/command/mod.rs index 5e5aa7c750..187683c640 100644 --- a/synthesizer/program/src/logic/command/mod.rs +++ b/synthesizer/program/src/logic/command/mod.rs @@ -357,9 +357,9 @@ impl Display for Command { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_command_bytes() { diff --git a/synthesizer/program/src/logic/command/position.rs b/synthesizer/program/src/logic/command/position.rs index d0fb251a43..a8b738954c 100644 --- a/synthesizer/program/src/logic/command/position.rs +++ b/synthesizer/program/src/logic/command/position.rs @@ -125,9 +125,9 @@ impl ToBytes for Position { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/command/rand_chacha.rs b/synthesizer/program/src/logic/command/rand_chacha.rs index 829bab7373..caf7ce6eab 100644 --- a/synthesizer/program/src/logic/command/rand_chacha.rs +++ b/synthesizer/program/src/logic/command/rand_chacha.rs @@ -288,9 +288,9 @@ impl ToBytes for RandChaCha { #[cfg(test)] mod tests { use super::*; - use console::{network::Testnet3, program::Register}; + use console::{network::MainnetV0, program::Register}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; fn valid_destination_types() -> &'static [LiteralType] { &[ diff --git a/synthesizer/program/src/logic/command/remove.rs b/synthesizer/program/src/logic/command/remove.rs index 52ce26629f..134a278c81 100644 --- a/synthesizer/program/src/logic/command/remove.rs +++ b/synthesizer/program/src/logic/command/remove.rs @@ -167,9 +167,9 @@ impl ToBytes for Remove { #[cfg(test)] mod tests { use super::*; - use console::{network::Testnet3, program::Register}; + use console::{network::MainnetV0, program::Register}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/command/set.rs b/synthesizer/program/src/logic/command/set.rs index 83d187dde7..9b687f5e90 100644 --- a/synthesizer/program/src/logic/command/set.rs +++ b/synthesizer/program/src/logic/command/set.rs @@ -199,9 +199,9 @@ impl ToBytes for Set { #[cfg(test)] mod tests { use super::*; - use console::{network::Testnet3, program::Register}; + use console::{network::MainnetV0, program::Register}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/finalize_operation/mod.rs b/synthesizer/program/src/logic/finalize_operation/mod.rs index 15de98767d..03f25cb2e5 100644 --- a/synthesizer/program/src/logic/finalize_operation/mod.rs +++ b/synthesizer/program/src/logic/finalize_operation/mod.rs @@ -42,9 +42,9 @@ pub enum FinalizeOperation { #[cfg(test)] pub(crate) mod test_helpers { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Samples a random `InitializeMapping`. pub(crate) fn sample_initialize_mapping(rng: &mut TestRng) -> FinalizeOperation { diff --git a/synthesizer/program/src/logic/instruction/bytes.rs b/synthesizer/program/src/logic/instruction/bytes.rs index 0c0c35954a..61fede6a78 100644 --- a/synthesizer/program/src/logic/instruction/bytes.rs +++ b/synthesizer/program/src/logic/instruction/bytes.rs @@ -79,9 +79,9 @@ impl ToBytes for Instruction { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_bytes() -> Result<()> { diff --git a/synthesizer/program/src/logic/instruction/mod.rs b/synthesizer/program/src/logic/instruction/mod.rs index 930920ca5e..91c09fae9e 100644 --- a/synthesizer/program/src/logic/instruction/mod.rs +++ b/synthesizer/program/src/logic/instruction/mod.rs @@ -461,9 +461,9 @@ impl Display for Instruction { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_opcodes() { diff --git a/synthesizer/program/src/logic/instruction/operand/mod.rs b/synthesizer/program/src/logic/instruction/operand/mod.rs index c7f180d4c9..e0b503e4fc 100644 --- a/synthesizer/program/src/logic/instruction/operand/mod.rs +++ b/synthesizer/program/src/logic/instruction/operand/mod.rs @@ -77,9 +77,9 @@ impl From<&Register> for Operand { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_operand_from_literal() -> Result<()> { diff --git a/synthesizer/program/src/logic/instruction/operand/parse.rs b/synthesizer/program/src/logic/instruction/operand/parse.rs index ccc699ee60..7c54e2cd6b 100644 --- a/synthesizer/program/src/logic/instruction/operand/parse.rs +++ b/synthesizer/program/src/logic/instruction/operand/parse.rs @@ -83,9 +83,9 @@ impl Display for Operand { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_operand_parse() -> Result<()> { diff --git a/synthesizer/program/src/logic/instruction/operation/assert.rs b/synthesizer/program/src/logic/instruction/operation/assert.rs index ee9a36b7ba..769eaa789e 100644 --- a/synthesizer/program/src/logic/instruction/operation/assert.rs +++ b/synthesizer/program/src/logic/instruction/operation/assert.rs @@ -263,9 +263,9 @@ impl ToBytes for AssertInstruction { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/instruction/operation/async_.rs b/synthesizer/program/src/logic/instruction/operation/async_.rs index 194fa8a5f9..35fa6b07ec 100644 --- a/synthesizer/program/src/logic/instruction/operation/async_.rs +++ b/synthesizer/program/src/logic/instruction/operation/async_.rs @@ -348,9 +348,9 @@ impl ToBytes for Async { mod tests { use super::*; // use circuit::AleoV0; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; // type CurrentAleo = AleoV0; // // /// Samples the stack. Note: Do not replicate this for real program use, it is insecure. diff --git a/synthesizer/program/src/logic/instruction/operation/call.rs b/synthesizer/program/src/logic/instruction/operation/call.rs index 12cc42168d..627e0b32ac 100644 --- a/synthesizer/program/src/logic/instruction/operation/call.rs +++ b/synthesizer/program/src/logic/instruction/operation/call.rs @@ -444,11 +444,11 @@ impl ToBytes for Call { mod tests { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, program::{Access, Address, Identifier, Literal, U64}, }; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; const TEST_CASES: &[&str] = &[ "call foo", diff --git a/synthesizer/program/src/logic/instruction/operation/cast.rs b/synthesizer/program/src/logic/instruction/operation/cast.rs index 2cf60e79a8..87c45a3a80 100644 --- a/synthesizer/program/src/logic/instruction/operation/cast.rs +++ b/synthesizer/program/src/logic/instruction/operation/cast.rs @@ -1125,11 +1125,11 @@ impl ToBytes for CastOperation { mod tests { use super::*; use console::{ - network::Testnet3, + network::MainnetV0, program::{Access, Identifier}, }; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/instruction/operation/commit.rs b/synthesizer/program/src/logic/instruction/operation/commit.rs index ffc3320cd0..35904c2a94 100644 --- a/synthesizer/program/src/logic/instruction/operation/commit.rs +++ b/synthesizer/program/src/logic/instruction/operation/commit.rs @@ -349,9 +349,9 @@ impl ToBytes for CommitInstruction { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// **Attention**: When changing this, also update in `tests/instruction/commit.rs`. fn valid_destination_types() -> &'static [LiteralType] { diff --git a/synthesizer/program/src/logic/instruction/operation/hash.rs b/synthesizer/program/src/logic/instruction/operation/hash.rs index cd7954e887..21acdd04ab 100644 --- a/synthesizer/program/src/logic/instruction/operation/hash.rs +++ b/synthesizer/program/src/logic/instruction/operation/hash.rs @@ -497,9 +497,9 @@ impl ToBytes for HashInstruction { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// **Attention**: When changing this, also update in `tests/instruction/hash.rs`. fn valid_destination_types() -> &'static [PlaintextType] { diff --git a/synthesizer/program/src/logic/instruction/operation/is.rs b/synthesizer/program/src/logic/instruction/operation/is.rs index aa56e93757..21ee23905a 100644 --- a/synthesizer/program/src/logic/instruction/operation/is.rs +++ b/synthesizer/program/src/logic/instruction/operation/is.rs @@ -275,9 +275,9 @@ impl ToBytes for IsInstruction { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/instruction/operation/macros.rs b/synthesizer/program/src/logic/instruction/operation/macros.rs index e283e0945b..46ced3ebbe 100644 --- a/synthesizer/program/src/logic/instruction/operation/macros.rs +++ b/synthesizer/program/src/logic/instruction/operation/macros.rs @@ -95,7 +95,7 @@ macro_rules! operation { use console::types::*; // Prepare the environment. - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::network::AleoV0; // Prepare the operator. @@ -150,7 +150,7 @@ macro_rules! operation { use console::types::*; // Prepare the environment. - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; type CurrentAleo = circuit::network::AleoV0; // Prepare the operator. diff --git a/synthesizer/program/src/logic/instruction/operation/sign_verify.rs b/synthesizer/program/src/logic/instruction/operation/sign_verify.rs index 22a9fb480a..34b1e3feec 100644 --- a/synthesizer/program/src/logic/instruction/operation/sign_verify.rs +++ b/synthesizer/program/src/logic/instruction/operation/sign_verify.rs @@ -274,9 +274,9 @@ impl ToBytes for SignVerify { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() { diff --git a/synthesizer/program/src/logic/instruction/parse.rs b/synthesizer/program/src/logic/instruction/parse.rs index 7eba572702..0212d13166 100644 --- a/synthesizer/program/src/logic/instruction/parse.rs +++ b/synthesizer/program/src/logic/instruction/parse.rs @@ -85,9 +85,9 @@ impl FromStr for Instruction { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/synthesizer/program/src/mapping/bytes.rs b/synthesizer/program/src/mapping/bytes.rs index 323fdbc64f..9f38c621b4 100644 --- a/synthesizer/program/src/mapping/bytes.rs +++ b/synthesizer/program/src/mapping/bytes.rs @@ -45,9 +45,9 @@ impl ToBytes for Mapping { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_mapping_bytes() -> Result<()> { diff --git a/synthesizer/program/src/mapping/key/mod.rs b/synthesizer/program/src/mapping/key/mod.rs index 3132c8a251..ed1f4005fd 100644 --- a/synthesizer/program/src/mapping/key/mod.rs +++ b/synthesizer/program/src/mapping/key/mod.rs @@ -43,9 +43,9 @@ impl TypeName for MapKey { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_key_type_name() -> Result<()> { diff --git a/synthesizer/program/src/mapping/key/parse.rs b/synthesizer/program/src/mapping/key/parse.rs index 607a8f6c70..5438873b93 100644 --- a/synthesizer/program/src/mapping/key/parse.rs +++ b/synthesizer/program/src/mapping/key/parse.rs @@ -79,9 +79,9 @@ impl Display for MapKey { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_key_parse() -> Result<()> { diff --git a/synthesizer/program/src/mapping/parse.rs b/synthesizer/program/src/mapping/parse.rs index e2dd389f8f..4f25ed546c 100644 --- a/synthesizer/program/src/mapping/parse.rs +++ b/synthesizer/program/src/mapping/parse.rs @@ -78,9 +78,9 @@ impl Display for Mapping { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_mapping_parse() { diff --git a/synthesizer/program/src/mapping/value/mod.rs b/synthesizer/program/src/mapping/value/mod.rs index c32207fdf6..b62104c6b8 100644 --- a/synthesizer/program/src/mapping/value/mod.rs +++ b/synthesizer/program/src/mapping/value/mod.rs @@ -43,9 +43,9 @@ impl TypeName for MapValue { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_value_type_name() { diff --git a/synthesizer/program/src/mapping/value/parse.rs b/synthesizer/program/src/mapping/value/parse.rs index 280bf71788..787aed922b 100644 --- a/synthesizer/program/src/mapping/value/parse.rs +++ b/synthesizer/program/src/mapping/value/parse.rs @@ -79,9 +79,9 @@ impl Display for MapValue { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_value_parse() -> Result<()> { diff --git a/synthesizer/program/src/parse.rs b/synthesizer/program/src/parse.rs index 22d6cfa5bb..aeb6822dd1 100644 --- a/synthesizer/program/src/parse.rs +++ b/synthesizer/program/src/parse.rs @@ -184,9 +184,9 @@ impl, Command: CommandTrait> Dis mod tests { use super::*; use crate::Program; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_program_parse() -> Result<()> { diff --git a/synthesizer/program/src/serialize.rs b/synthesizer/program/src/serialize.rs index 4e23a291a4..764c74965c 100644 --- a/synthesizer/program/src/serialize.rs +++ b/synthesizer/program/src/serialize.rs @@ -42,9 +42,9 @@ impl<'de, N: Network, Instruction: InstructionTrait, Command: CommandTrait mod tests { use super::*; use crate::Program; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_serde_json() -> Result<()> { diff --git a/synthesizer/program/tests/helpers/sample.rs b/synthesizer/program/tests/helpers/sample.rs index c7587d03ea..066e6c8b60 100644 --- a/synthesizer/program/tests/helpers/sample.rs +++ b/synthesizer/program/tests/helpers/sample.rs @@ -14,7 +14,7 @@ use circuit::AleoV0; use console::{ - network::Testnet3, + network::MainnetV0, prelude::*, program::{Identifier, Literal, Plaintext, Register, Value}, }; @@ -24,7 +24,7 @@ use snarkvm_synthesizer_program::{ }; use synthesizer_process::{Authorization, CallStack, FinalizeRegisters, Registers, Stack, StackProgramTypes}; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; /// Samples the registers. Note: Do not replicate this for real program use, it is insecure. diff --git a/synthesizer/program/tests/instruction/assert.rs b/synthesizer/program/tests/instruction/assert.rs index bd3216a7c7..61811eaef4 100644 --- a/synthesizer/program/tests/instruction/assert.rs +++ b/synthesizer/program/tests/instruction/assert.rs @@ -18,14 +18,14 @@ use crate::helpers::sample::{sample_finalize_registers, sample_registers}; use circuit::AleoV0; use console::{ - network::Testnet3, + network::MainnetV0, prelude::*, program::{Identifier, Literal, LiteralType, Register}, }; use snarkvm_synthesizer_program::{AssertEq, AssertInstruction, AssertNeq, Opcode, Operand, Program}; use synthesizer_process::{Process, Stack}; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; const ITERATIONS: usize = 100; diff --git a/synthesizer/program/tests/instruction/commit.rs b/synthesizer/program/tests/instruction/commit.rs index 22bd82fdae..abdc6f6cb3 100644 --- a/synthesizer/program/tests/instruction/commit.rs +++ b/synthesizer/program/tests/instruction/commit.rs @@ -18,7 +18,7 @@ use crate::helpers::sample::{sample_finalize_registers, sample_registers}; use circuit::{AleoV0, Eject}; use console::{ - network::Testnet3, + network::MainnetV0, prelude::*, program::{Identifier, Literal, LiteralType, Plaintext, Register, Value}, }; @@ -38,7 +38,7 @@ use snarkvm_synthesizer_program::{ }; use synthesizer_process::{Process, Stack}; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; const ITERATIONS: usize = 50; diff --git a/synthesizer/program/tests/instruction/hash.rs b/synthesizer/program/tests/instruction/hash.rs index bef9a9d312..46f0caf732 100644 --- a/synthesizer/program/tests/instruction/hash.rs +++ b/synthesizer/program/tests/instruction/hash.rs @@ -18,7 +18,7 @@ use crate::helpers::sample::{sample_finalize_registers, sample_registers}; use circuit::{AleoV0, Eject}; use console::{ - network::Testnet3, + network::MainnetV0, prelude::*, program::{Identifier, Literal, LiteralType, Plaintext, PlaintextType, Register, Value}, }; @@ -47,7 +47,7 @@ use snarkvm_synthesizer_program::{ }; use synthesizer_process::{Process, Stack}; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; const ITERATIONS: usize = 50; diff --git a/synthesizer/program/tests/instruction/is.rs b/synthesizer/program/tests/instruction/is.rs index ba22a6e01c..a60121da9b 100644 --- a/synthesizer/program/tests/instruction/is.rs +++ b/synthesizer/program/tests/instruction/is.rs @@ -18,7 +18,7 @@ use crate::helpers::sample::{sample_finalize_registers, sample_registers}; use circuit::AleoV0; use console::{ - network::Testnet3, + network::MainnetV0, prelude::*, program::{Identifier, Literal, LiteralType, Register}, }; @@ -34,7 +34,7 @@ use snarkvm_synthesizer_program::{ }; use synthesizer_process::{Process, Stack}; -type CurrentNetwork = Testnet3; +type CurrentNetwork = MainnetV0; type CurrentAleo = AleoV0; const ITERATIONS: usize = 100; diff --git a/synthesizer/snark/src/certificate/parse.rs b/synthesizer/snark/src/certificate/parse.rs index 40aa1414d2..cc22051156 100644 --- a/synthesizer/snark/src/certificate/parse.rs +++ b/synthesizer/snark/src/certificate/parse.rs @@ -74,9 +74,9 @@ impl Display for Certificate { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/synthesizer/snark/src/lib.rs b/synthesizer/snark/src/lib.rs index c5063edf4f..10aea5eb5b 100644 --- a/synthesizer/snark/src/lib.rs +++ b/synthesizer/snark/src/lib.rs @@ -50,11 +50,11 @@ pub(crate) mod test_helpers { environment::{Assignment, Circuit, Eject, Environment, Inject, Mode, One}, types::Field, }; - use console::{network::Testnet3, prelude::One as _}; + use console::{network::MainnetV0, prelude::One as _}; use once_cell::sync::OnceCell; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; /// Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. fn create_example_circuit() -> Field { @@ -138,9 +138,9 @@ pub(crate) mod test_helpers { mod test { use super::*; use circuit::environment::{Circuit, Environment}; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_varuna() { diff --git a/synthesizer/snark/src/proof/parse.rs b/synthesizer/snark/src/proof/parse.rs index 9ce603dfc0..9fc9fdd3a0 100644 --- a/synthesizer/snark/src/proof/parse.rs +++ b/synthesizer/snark/src/proof/parse.rs @@ -72,9 +72,9 @@ impl Display for Proof { #[cfg(test)] mod tests { use super::*; - use console::network::Testnet3; + use console::network::MainnetV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_parse() -> Result<()> { diff --git a/synthesizer/src/vm/execute.rs b/synthesizer/src/vm/execute.rs index 7d9231ade8..b27626504d 100644 --- a/synthesizer/src/vm/execute.rs +++ b/synthesizer/src/vm/execute.rs @@ -208,7 +208,7 @@ mod tests { use super::*; use console::{ account::{Address, ViewKey}, - network::Testnet3, + network::MainnetV0, program::{Ciphertext, Value}, types::Field, }; @@ -217,7 +217,7 @@ mod tests { use indexmap::IndexMap; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; fn prepare_vm( rng: &mut TestRng, diff --git a/synthesizer/src/vm/helpers/macros.rs b/synthesizer/src/vm/helpers/macros.rs index 16911566e3..e0c67c08c4 100644 --- a/synthesizer/src/vm/helpers/macros.rs +++ b/synthesizer/src/vm/helpers/macros.rs @@ -15,19 +15,19 @@ /// A helper macro to downcast a `$variable` to `$object<$network>`. #[macro_export] macro_rules! cast_ref { - // Example: cast_ref!((foo.bar()) as Bar) + // Example: cast_ref!((foo.bar()) as Bar) (($variable:expr) as $object:ident<$($traits:path),+>) => {{ (&$variable as &dyn std::any::Any) .downcast_ref::<$object<$($traits),+>>() .ok_or_else(|| anyhow!("Failed to downcast {}", stringify!($variable)))? }}; - // Example: cast_ref!(bar as Bar) + // Example: cast_ref!(bar as Bar) ($variable:ident as $object:ident<$($traits:path),+>) => {{ (&$variable as &dyn std::any::Any) .downcast_ref::<$object<$($traits),+>>() .ok_or_else(|| anyhow!("Failed to downcast {}", stringify!($variable)))? }}; - // Example: cast_ref!(&bar as Bar) + // Example: cast_ref!(&bar as Bar) (&$variable:ident as $object:ident<$($traits:path),+>) => {{ ($variable as &dyn std::any::Any) .downcast_ref::<$object<$($traits),+>>() @@ -38,13 +38,13 @@ macro_rules! cast_ref { /// A helper macro to downcast a `$variable` to `&mut $object<$network>`. #[macro_export] macro_rules! cast_mut_ref { - // Example: cast_mut_ref!((foo.bar()) as Bar) + // Example: cast_mut_ref!((foo.bar()) as Bar) (($variable:expr) as $object:ident<$($traits:path),+>) => {{ (&mut $variable as &mut dyn std::any::Any) .downcast_mut::<$object<$($traits),+>>() .ok_or_else(|| anyhow!("Failed to downcast mut {}", stringify!($variable)))? }}; - // Example: cast_mut_ref!(bar as Bar) + // Example: cast_mut_ref!(bar as Bar) ($variable:ident as $object:ident<$($traits:path),+>) => {{ (&mut $variable as &mut dyn std::any::Any) .downcast_mut::<$object<$($traits),+>>() @@ -58,13 +58,13 @@ macro_rules! process { // Example: process!(self, logic) ($self:ident, $logic:ident) => {{ match N::ID { - console::network::Testnet3::ID => { + console::network::MainnetV0::ID => { // Cast the process. let process = (&$self.process as &dyn std::any::Any) - .downcast_ref::>>>() + .downcast_ref::>>>() .ok_or_else(|| anyhow!("Failed to downcast {}", stringify!($self.process)))?; // Process the logic. - $logic!(process.read(), console::network::Testnet3, circuit::AleoV0) + $logic!(process.read(), console::network::MainnetV0, circuit::AleoV0) } _ => bail!("Unsupported VM configuration for network: {}", N::ID), } diff --git a/synthesizer/src/vm/helpers/rewards.rs b/synthesizer/src/vm/helpers/rewards.rs index ae5f9d4fba..8395643012 100644 --- a/synthesizer/src/vm/helpers/rewards.rs +++ b/synthesizer/src/vm/helpers/rewards.rs @@ -131,7 +131,7 @@ mod tests { use indexmap::indexmap; - type CurrentNetwork = console::network::Testnet3; + type CurrentNetwork = console::network::MainnetV0; const ITERATIONS: usize = 1000; diff --git a/synthesizer/src/vm/mod.rs b/synthesizer/src/vm/mod.rs index a24d2c89c0..998092b7ff 100644 --- a/synthesizer/src/vm/mod.rs +++ b/synthesizer/src/vm/mod.rs @@ -363,7 +363,7 @@ pub(crate) mod test_helpers { use super::*; use console::{ account::{Address, ViewKey}, - network::Testnet3, + network::MainnetV0, program::Value, types::Field, }; @@ -376,7 +376,7 @@ pub(crate) mod test_helpers { use std::borrow::Borrow; use synthesizer_snark::VerifyingKey; - pub(crate) type CurrentNetwork = Testnet3; + pub(crate) type CurrentNetwork = MainnetV0; /// Samples a new finalize state. pub(crate) fn sample_finalize_state(block_height: u32) -> FinalizeGlobalState { @@ -641,11 +641,11 @@ function compute: } pub fn sample_next_block( - vm: &VM>, - private_key: &PrivateKey, - transactions: &[Transaction], + vm: &VM>, + private_key: &PrivateKey, + transactions: &[Transaction], rng: &mut R, - ) -> Result> { + ) -> Result> { // Get the most recent block. let block_hash = vm.block_store().get_block_hash(*vm.block_store().heights().max().unwrap().borrow()).unwrap().unwrap(); @@ -658,16 +658,16 @@ function compute: // Construct the metadata associated with the block. let metadata = Metadata::new( - Testnet3::ID, + MainnetV0::ID, previous_block.round() + 1, previous_block.height() + 1, 0, 0, - Testnet3::GENESIS_COINBASE_TARGET, - Testnet3::GENESIS_PROOF_TARGET, + MainnetV0::GENESIS_COINBASE_TARGET, + MainnetV0::GENESIS_PROOF_TARGET, previous_block.last_coinbase_target(), previous_block.last_coinbase_timestamp(), - Testnet3::GENESIS_TIMESTAMP + 1, + MainnetV0::GENESIS_TIMESTAMP + 1, )?; let header = Header::from( @@ -820,7 +820,7 @@ finalize getter: .execute( &caller_private_key, ("test_program_1.aleo", "init"), - Vec::>::new().iter(), + Vec::>::new().iter(), Some(third_record), 1, None, @@ -831,7 +831,7 @@ finalize getter: .execute( &caller_private_key, ("test_program_2.aleo", "init"), - Vec::>::new().iter(), + Vec::>::new().iter(), Some(fourth_record), 1, None, @@ -1009,9 +1009,9 @@ function multitransfer: // Execute the programs. let inputs = [ - Value::::Record(record_1), - Value::::from_str(&address.to_string()).unwrap(), - Value::::from_str("10u64").unwrap(), + Value::::Record(record_1), + Value::::from_str(&address.to_string()).unwrap(), + Value::::from_str("10u64").unwrap(), ]; let execution = vm .execute( diff --git a/synthesizer/tests/utilities/mod.rs b/synthesizer/tests/utilities/mod.rs index 36bbebaadc..665327b579 100644 --- a/synthesizer/tests/utilities/mod.rs +++ b/synthesizer/tests/utilities/mod.rs @@ -25,7 +25,7 @@ #![allow(unused)] pub type CurrentAleo = circuit::network::AleoV0; -pub type CurrentNetwork = console::network::Testnet3; +pub type CurrentNetwork = console::network::MainnetV0; pub mod expectation; pub use expectation::*; diff --git a/vm/cli/commands/mod.rs b/vm/cli/commands/mod.rs index 68f71186e3..93475a3e48 100644 --- a/vm/cli/commands/mod.rs +++ b/vm/cli/commands/mod.rs @@ -44,5 +44,5 @@ use std::collections::HashMap; pub const LOCALE: &num_format::Locale = &num_format::Locale::en; -pub(crate) type CurrentNetwork = crate::prelude::Testnet3; +pub(crate) type CurrentNetwork = crate::prelude::MainnetV0; pub(crate) type Aleo = crate::circuit::AleoV0; diff --git a/vm/cli/helpers/env.rs b/vm/cli/helpers/env.rs index ed41cafc72..8e8c725ac0 100644 --- a/vm/cli/helpers/env.rs +++ b/vm/cli/helpers/env.rs @@ -18,7 +18,7 @@ use anyhow::{anyhow, Result}; fn env_template() -> String { r#" -NETWORK=testnet3 +NETWORK=mainnet PRIVATE_KEY={{PASTE_YOUR_PRIVATE_KEY_HERE}} "# .to_string() diff --git a/vm/file/aleo.rs b/vm/file/aleo.rs index bae28c6b2c..4d22626117 100644 --- a/vm/file/aleo.rs +++ b/vm/file/aleo.rs @@ -241,7 +241,7 @@ mod tests { use super::*; use crate::prelude::Parser; - type CurrentNetwork = snarkvm_console::network::Testnet3; + type CurrentNetwork = snarkvm_console::network::MainnetV0; fn temp_dir() -> std::path::PathBuf { tempfile::tempdir().expect("Failed to open temporary directory").into_path() diff --git a/vm/file/avm.rs b/vm/file/avm.rs index ac252d87ed..2fbdd1af40 100644 --- a/vm/file/avm.rs +++ b/vm/file/avm.rs @@ -181,7 +181,7 @@ mod tests { use super::*; use crate::prelude::Parser; - type CurrentNetwork = snarkvm_console::network::Testnet3; + type CurrentNetwork = snarkvm_console::network::MainnetV0; fn temp_dir() -> std::path::PathBuf { tempfile::tempdir().expect("Failed to open temporary directory").into_path() diff --git a/vm/file/prover.rs b/vm/file/prover.rs index 69d4ad8369..740971849d 100644 --- a/vm/file/prover.rs +++ b/vm/file/prover.rs @@ -198,7 +198,7 @@ mod tests { synthesizer::Process, }; - type CurrentNetwork = snarkvm_console::network::Testnet3; + type CurrentNetwork = snarkvm_console::network::MainnetV0; type CurrentAleo = snarkvm_circuit::AleoV0; fn temp_dir() -> std::path::PathBuf { diff --git a/vm/file/verifier.rs b/vm/file/verifier.rs index aaa664bd43..2def859ed1 100644 --- a/vm/file/verifier.rs +++ b/vm/file/verifier.rs @@ -198,7 +198,7 @@ mod tests { synthesizer::Process, }; - type CurrentNetwork = snarkvm_console::network::Testnet3; + type CurrentNetwork = snarkvm_console::network::MainnetV0; type CurrentAleo = snarkvm_circuit::AleoV0; fn temp_dir() -> std::path::PathBuf { diff --git a/vm/package/clean.rs b/vm/package/clean.rs index 561041c6d1..0d1859a78c 100644 --- a/vm/package/clean.rs +++ b/vm/package/clean.rs @@ -49,7 +49,7 @@ impl Package { mod tests { use super::*; - type CurrentNetwork = snarkvm_console::network::Testnet3; + type CurrentNetwork = snarkvm_console::network::MainnetV0; type CurrentAleo = snarkvm_circuit::network::AleoV0; #[test] diff --git a/vm/package/deploy.rs b/vm/package/deploy.rs index cc3ec45644..ebc04a447e 100644 --- a/vm/package/deploy.rs +++ b/vm/package/deploy.rs @@ -168,7 +168,7 @@ impl Package { mod tests { use super::*; - type CurrentNetwork = snarkvm_console::network::Testnet3; + type CurrentNetwork = snarkvm_console::network::MainnetV0; type CurrentAleo = snarkvm_circuit::network::AleoV0; #[test] diff --git a/vm/package/is_build_required.rs b/vm/package/is_build_required.rs index 0ce4a9253f..a7cec05183 100644 --- a/vm/package/is_build_required.rs +++ b/vm/package/is_build_required.rs @@ -65,17 +65,17 @@ impl Package { #[cfg(test)] mod tests { use super::*; - use snarkvm_console::network::Testnet3; + use snarkvm_console::network::MainnetV0; use std::{fs::File, io::Write}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; type Aleo = crate::circuit::AleoV0; fn temp_dir() -> PathBuf { tempfile::tempdir().expect("Failed to open temporary directory").into_path() } - fn initialize_unbuilt_package(valid: bool) -> Result> { + fn initialize_unbuilt_package(valid: bool) -> Result> { // Initialize a temporary directory. let directory = temp_dir(); @@ -99,7 +99,7 @@ mod tests { std::fs::create_dir_all(build_directory).unwrap(); // Open the package at the temporary directory. - Package::::open(&directory) + Package::::open(&directory) } fn program_with_id(id: &str) -> String { diff --git a/vm/package/mod.rs b/vm/package/mod.rs index 87f383df83..7568a01e5a 100644 --- a/vm/package/mod.rs +++ b/vm/package/mod.rs @@ -180,11 +180,11 @@ impl Package { #[cfg(test)] pub(crate) mod test_helpers { use super::*; - use snarkvm_console::{account::Address, network::Testnet3, prelude::TestRng}; + use snarkvm_console::{account::Address, network::MainnetV0, prelude::TestRng}; use std::{fs::File, io::Write}; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; fn temp_dir() -> PathBuf { tempfile::tempdir().expect("Failed to open temporary directory").into_path() @@ -389,7 +389,7 @@ function main: let _manifest_file = Manifest::create(&directory, main_program_id).unwrap(); // Open the package at the temporary directory. - let package = Package::::open(&directory).unwrap(); + let package = Package::::open(&directory).unwrap(); assert_eq!(package.program_id(), main_program_id); // Return the temporary directory and the package. @@ -465,11 +465,11 @@ function main: #[cfg(test)] mod tests { use super::*; - use crate::prelude::Testnet3; + use crate::prelude::MainnetV0; use snarkvm_utilities::TestRng; type CurrentAleo = snarkvm_circuit::network::AleoV0; - type CurrentNetwork = Testnet3; + type CurrentNetwork = MainnetV0; #[test] fn test_imports_directory() { diff --git a/wasm/src/tests.rs b/wasm/src/tests.rs index 8cdc5e17f8..5610df5b39 100644 --- a/wasm/src/tests.rs +++ b/wasm/src/tests.rs @@ -14,7 +14,7 @@ use snarkvm_console::{ account::{Address, PrivateKey, ViewKey}, - network::Testnet3, + network::MainnetV0, }; use snarkvm_utilities::TestRng; @@ -29,7 +29,7 @@ fn test_account() { const ALEO_VIEW_KEY: &str = "AViewKey1n1n3ZbnVEtXVe3La2xWkUvY3EY7XaCG6RZJJ3tbvrrrD"; const ALEO_ADDRESS: &str = "aleo1wvgwnqvy46qq0zemj0k6sfp3zv0mp77rw97khvwuhac05yuwscxqmfyhwf"; - let private_key = PrivateKey::::from_str(ALEO_PRIVATE_KEY).unwrap(); + let private_key = PrivateKey::::from_str(ALEO_PRIVATE_KEY).unwrap(); assert_eq!(ALEO_PRIVATE_KEY, private_key.to_string()); let view_key = ViewKey::try_from(&private_key).unwrap(); @@ -45,7 +45,7 @@ fn test_account_sign() { for _ in 0..ITERATIONS { // Sample a new private key and address. - let private_key = PrivateKey::::new(&mut rng).unwrap(); + let private_key = PrivateKey::::new(&mut rng).unwrap(); let address = Address::try_from(&private_key).unwrap(); // Sign a message with the account private key. From 62bce0440360e2a58838795bfd1d6afa17a6acdf Mon Sep 17 00:00:00 2001 From: Howard Wu <9260812+howardwu@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:06:14 -0800 Subject: [PATCH 2/5] Update block --- .../src/mainnet/resources/block.genesis | Bin 13989 -> 13989 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/parameters/src/mainnet/resources/block.genesis b/parameters/src/mainnet/resources/block.genesis index c0b70008f2a92015b92e27c553c3f262cd95c718..8bf59e26b4130ec3950e2e8c0aa97e077fd04a07 100644 GIT binary patch delta 11312 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 Cc*zC; delta 11314 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 Cx9_|F From 5ed8c5362a79e9373a1f1dca58eb50245c097b0c Mon Sep 17 00:00:00 2001 From: Howard Wu <9260812+howardwu@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:12:38 -0800 Subject: [PATCH 3/5] Update URL pathways --- console/network/src/mainnet_v0.rs | 2 +- ledger/query/src/query.rs | 12 ++++++------ parameters/src/mainnet/mod.rs | 2 +- vm/cli/commands/build.rs | 2 +- vm/package/execute.rs | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/console/network/src/mainnet_v0.rs b/console/network/src/mainnet_v0.rs index 21ad90a8e6..edada2f3a0 100644 --- a/console/network/src/mainnet_v0.rs +++ b/console/network/src/mainnet_v0.rs @@ -136,7 +136,7 @@ impl Network for MainnetV0 { /// The network ID. const ID: u16 = 0; /// The function name for the inclusion circuit. - const INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::mainnet::TESTNET3_INCLUSION_FUNCTION_NAME; + const INCLUSION_FUNCTION_NAME: &'static str = snarkvm_parameters::mainnet::NETWORK_INCLUSION_FUNCTION_NAME; /// The network name. const NAME: &'static str = "Aleo Mainnet (v0)"; diff --git a/ledger/query/src/query.rs b/ledger/query/src/query.rs index e4fbfd29e3..f925c51b39 100644 --- a/ledger/query/src/query.rs +++ b/ledger/query/src/query.rs @@ -66,7 +66,7 @@ impl> QueryTrait for Query { match self { Self::VM(block_store) => Ok(block_store.current_state_root()), Self::REST(url) => match N::ID { - 3 => Ok(Self::get_request(&format!("{url}/testnet3/latest/stateRoot"))?.into_json()?), + 3 => Ok(Self::get_request(&format!("{url}/mainnet/latest/stateRoot"))?.into_json()?), _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -78,7 +78,7 @@ impl> QueryTrait for Query { match self { Self::VM(block_store) => Ok(block_store.current_state_root()), Self::REST(url) => match N::ID { - 3 => Ok(Self::get_request_async(&format!("{url}/testnet3/latest/stateRoot")).await?.json().await?), + 3 => Ok(Self::get_request_async(&format!("{url}/mainnet/latest/stateRoot")).await?.json().await?), _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -89,7 +89,7 @@ impl> QueryTrait for Query { match self { Self::VM(block_store) => block_store.get_state_path_for_commitment(commitment), Self::REST(url) => match N::ID { - 3 => Ok(Self::get_request(&format!("{url}/testnet3/statePath/{commitment}"))?.into_json()?), + 3 => Ok(Self::get_request(&format!("{url}/mainnet/statePath/{commitment}"))?.into_json()?), _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -102,7 +102,7 @@ impl> QueryTrait for Query { Self::VM(block_store) => block_store.get_state_path_for_commitment(commitment), Self::REST(url) => match N::ID { 3 => { - Ok(Self::get_request_async(&format!("{url}/testnet3/statePath/{commitment}")).await?.json().await?) + Ok(Self::get_request_async(&format!("{url}/mainnet/statePath/{commitment}")).await?.json().await?) } _ => bail!("Unsupported network ID in inclusion query"), }, @@ -118,7 +118,7 @@ impl> Query { block_store.get_program(program_id)?.ok_or_else(|| anyhow!("Program {program_id} not found in storage")) } Self::REST(url) => match N::ID { - 3 => Ok(Self::get_request(&format!("{url}/testnet3/program/{program_id}"))?.into_json()?), + 3 => Ok(Self::get_request(&format!("{url}/mainnet/program/{program_id}"))?.into_json()?), _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -132,7 +132,7 @@ impl> Query { block_store.get_program(program_id)?.ok_or_else(|| anyhow!("Program {program_id} not found in storage")) } Self::REST(url) => match N::ID { - 3 => Ok(Self::get_request_async(&format!("{url}/testnet3/program/{program_id}")).await?.json().await?), + 3 => Ok(Self::get_request_async(&format!("{url}/mainnet/program/{program_id}")).await?.json().await?), _ => bail!("Unsupported network ID in inclusion query"), }, } diff --git a/parameters/src/mainnet/mod.rs b/parameters/src/mainnet/mod.rs index 5112f329c6..dfb2db50d6 100644 --- a/parameters/src/mainnet/mod.rs +++ b/parameters/src/mainnet/mod.rs @@ -149,7 +149,7 @@ impl_remote!(InclusionProver, REMOTE_URL, "resources/", "inclusion", "prover"); impl_local!(InclusionVerifier, "resources/", "inclusion", "verifier"); /// The function name for the inclusion circuit. -pub const TESTNET3_INCLUSION_FUNCTION_NAME: &str = "inclusion"; +pub const NETWORK_INCLUSION_FUNCTION_NAME: &str = "inclusion"; lazy_static! { pub static ref INCLUSION_PROVING_KEY: Vec = diff --git a/vm/cli/commands/build.rs b/vm/cli/commands/build.rs index 671ca61554..ac72b101f8 100644 --- a/vm/cli/commands/build.rs +++ b/vm/cli/commands/build.rs @@ -41,7 +41,7 @@ impl Build { // package.build::(match self.offline { // true => None, - // false => Some(endpoint.unwrap_or("https://vm.aleo.org/testnet3/build".to_string())), + // false => Some(endpoint.unwrap_or("https://api.explorer.aleo.org/v0/mainnet/build".to_string())), // })?; // Prepare the path string. diff --git a/vm/package/execute.rs b/vm/package/execute.rs index e075e8de86..190ef66199 100644 --- a/vm/package/execute.rs +++ b/vm/package/execute.rs @@ -117,7 +117,7 @@ mod tests { type CurrentAleo = snarkvm_circuit::network::AleoV0; - // TODO: Re-enable this test after `staging` is merged into `testnet3` for the October 18, 2023 calibration reset. + // TODO: Re-enable this test after `mainnet`. #[test] #[ignore] fn test_execute() { From b08c6fcb6dc672b0e808562c5eb2325339fd5033 Mon Sep 17 00:00:00 2001 From: Howard Wu <9260812+howardwu@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:55:50 -0800 Subject: [PATCH 4/5] Update parameters --- SECURITY.md | 10 ++-------- parameters/scripts/README.md | 2 +- parameters/src/mainnet/mod.rs | 2 +- .../src/mainnet/resources/block.genesis | Bin 13989 -> 13989 bytes .../mainnet/resources/bond_public.metadata | 4 ++-- .../mainnet/resources/bond_public.verifier | Bin 665 -> 665 bytes .../resources/claim_unbond_public.metadata | 4 ++-- .../resources/claim_unbond_public.verifier | Bin 665 -> 665 bytes .../mainnet/resources/fee_private.metadata | 4 ++-- .../mainnet/resources/fee_private.verifier | Bin 665 -> 665 bytes .../src/mainnet/resources/fee_public.metadata | 4 ++-- .../src/mainnet/resources/fee_public.verifier | Bin 665 -> 665 bytes .../src/mainnet/resources/join.metadata | 4 ++-- .../src/mainnet/resources/join.verifier | Bin 665 -> 665 bytes .../resources/set_validator_state.metadata | 4 ++-- .../resources/set_validator_state.verifier | Bin 665 -> 665 bytes .../src/mainnet/resources/split.metadata | 4 ++-- .../src/mainnet/resources/split.verifier | Bin 665 -> 665 bytes .../resources/transfer_private.metadata | 4 ++-- .../resources/transfer_private.verifier | Bin 665 -> 665 bytes .../transfer_private_to_public.metadata | 4 ++-- .../transfer_private_to_public.verifier | Bin 665 -> 665 bytes .../resources/transfer_public.metadata | 4 ++-- .../resources/transfer_public.verifier | Bin 665 -> 665 bytes .../transfer_public_to_private.metadata | 4 ++-- .../transfer_public_to_private.verifier | Bin 665 -> 665 bytes .../unbond_delegator_as_validator.metadata | 4 ++-- .../unbond_delegator_as_validator.verifier | Bin 665 -> 665 bytes .../mainnet/resources/unbond_public.metadata | 4 ++-- .../mainnet/resources/unbond_public.verifier | Bin 665 -> 665 bytes synthesizer/process/src/verify_fee.rs | 8 ++++---- 31 files changed, 34 insertions(+), 40 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 57be86957f..9111a21e49 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,16 +2,10 @@ The following describes our procedure for addressing major and minor security concerns in snarkVM. -## Testnet - -As Aleo is currently in the prototype stage and does not operate a platform intended for production use, -our security procedures are designed to promote public disclosure and quick security resolution. - -In preparation for the production stage, we will release new security guidelines and -issue new procedures for addressing the disclosure of sensitive security vulnerabilities. +Our security procedures are designed to promote public disclosure and quick security resolution. ### Reporting a Bug -During Testnet, all software bugs should be reported by filing a Github issue. +All software bugs should be reported by filing a Github issue. If you are unsure and would like to reach out to us directly, please email security \_at\_ aleo.org to elaborate on the issue. diff --git a/parameters/scripts/README.md b/parameters/scripts/README.md index 12185721de..02dd421eb7 100644 --- a/parameters/scripts/README.md +++ b/parameters/scripts/README.md @@ -1,6 +1,6 @@ # Parameter Scripts These scripts will run the parameter setup programs in the `examples` folder and move the resulting `.params` -and `.checksum` files to `testnet*` folder under the `src` directory. +and `.checksum` files to `mainnet*` folder under the `src` directory. If the parameter size has changed, you will need to manually update these in each corresponding struct. diff --git a/parameters/src/mainnet/mod.rs b/parameters/src/mainnet/mod.rs index dfb2db50d6..23fdd63c72 100644 --- a/parameters/src/mainnet/mod.rs +++ b/parameters/src/mainnet/mod.rs @@ -18,7 +18,7 @@ pub use genesis::*; pub mod powers; pub use powers::*; -const REMOTE_URL: &str = "https://s3-us-west-1.amazonaws.com/testnet3.parameters"; +const REMOTE_URL: &str = "https://s3-us-west-1.amazonaws.com/mainnet.parameters"; // Degrees #[cfg(not(feature = "wasm"))] diff --git a/parameters/src/mainnet/resources/block.genesis b/parameters/src/mainnet/resources/block.genesis index 8bf59e26b4130ec3950e2e8c0aa97e077fd04a07..a18eb8c0527cd572d0b6a6eaec2b75c78f6095b0 100644 GIT binary patch delta 11270 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 O4ooB`RZJx0i~c`6@wL_f diff --git a/parameters/src/mainnet/resources/bond_public.metadata b/parameters/src/mainnet/resources/bond_public.metadata index 66d68b2599..d6e3d20801 100644 --- a/parameters/src/mainnet/resources/bond_public.metadata +++ b/parameters/src/mainnet/resources/bond_public.metadata @@ -1,6 +1,6 @@ { - "prover_checksum": "65098917d1ab18982d0dd2eb1cc84d90e9a454d9e19a2b0997221303996b8e95", + "prover_checksum": "81d3f2b91a7c9c1e788edefedef4ac136be4f1d65bb05c9675e59e6d6da843c2", "prover_size": 28928250, - "verifier_checksum": "7b2d0c51c6405e485335315f1290817b9d65a847b9262f303f8cb277328761c3", + "verifier_checksum": "26790f191f07b5814f5f324e417603e79cae78cd986a8bb98c248ac5816b48cc", "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/bond_public.verifier b/parameters/src/mainnet/resources/bond_public.verifier index 38ec524663b803e82707d6d768a412f4178ded07..0adbec27db9a021af6184fa6cfa6005b9b643417 100644 GIT binary patch delta 141 zcmV;80CNAC1(^k~=>cG9jczsj@4gUtHZZhLfuAi2RhN4Vy}<{ zqMdte;7VKq5Uh vP_$B!U||81Ndhn+#-e=IbV6y>0^*Fz9d{*GLU8p0^i(KArzQ^mZx$Ejez8Em delta 141 zcmV;80CNAC1(^k~=>cH6NXWKJ0sEpwqp3zZhDHe386TDAZZ|n4dRf_eHF{fM_yQ*s z`++bUbJ~LG5e)#kOsSVnR^|0{xfi24^WEcG9w8<_`Rme$I2eyKVI7A-1MD))uG?g3gJe!8_9Mg>20W=w_ zp$JCRtxoMyIEDc(K~zefFJjV0Dcf^X%{V&)?8%(jg%>!kE2;k_N@EUN*!dE(q#$T5 vY`}@^n}mRqNdhn+Z94RcF#WOPP-+gOKSffE6K6dr=u{C9FW3yN_)g(U1G*a)?0c diff --git a/parameters/src/mainnet/resources/fee_private.metadata b/parameters/src/mainnet/resources/fee_private.metadata index a89e55dc6c..ae797e9eae 100644 --- a/parameters/src/mainnet/resources/fee_private.metadata +++ b/parameters/src/mainnet/resources/fee_private.metadata @@ -1,6 +1,6 @@ { - "prover_checksum": "5c772cfef2162bab617896279a8501da1783c99707c727e5ed56c8d18f5d6402", + "prover_checksum": "27b72ed5e8086127f8cfcfc94b8c63543e5901a368a3f782aedcb51f9ace738e", "prover_size": 66297972, - "verifier_checksum": "1075880f54492556fe8fc728dba26029a2888dd7672d15630c463a0bdc7e95c4", + "verifier_checksum": "099648c5dcbb0eb8c7f1031195273f5e1375831cda977711f487fbed7e33bb20", "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/fee_private.verifier b/parameters/src/mainnet/resources/fee_private.verifier index 7ba5fbe39a8fdf138dae5aae40cde2eed97bf91e..7756de8de887b0ac450d17c79644aca9008647b5 100644 GIT binary patch delta 141 zcmV;80CNAC1(^k~=>cGmTf{6tL8Y36GSz+r0(c_1OU?0O6hH=TM0u&W(t1VpmYZY$p! v*8*60g;@ZTNdhn+-IL|cNLNwK8E{BJ*&;+1A03^vb3r#n1U)f(W~gMZZFoM@ delta 141 zcmV;80CNAC1(^k~=>cHMpZwJA^4xOhpNn*DcH3Wve+zv7S>%s9PU<=U1I7(AX`Vx>+P)eY88d+;LwVV5IeB zw^&p6*h9?R=3h>dbP vRFrUItqg#ZNdhn+Kb=E~Dqw`6$k~&scFcis+!DUXteO*q4y|W$-*K;0Yw%8}X7snjTwUQbLS6JL`7! zo#P52i|Ff`QAU7U*B$tsp9P?o<`+R8ICbL-PDf^hYXLgqP$~T*UWd&rU}yb?fGN%# vYQR;lfcOBDNdhn+(cC$ri{Wm2`o`svOkcHX9hR@ud~E`$G-#T;X3~c#Vxz^B7<(j1N?@5fYaPcHuY$`j|q)Q5{@oR^=JOdl|(FstpZqm*Rac4A6FX=krND{Ae zpl-_pkcHi-*6c$z=){`wqKMl%8Qz)Jx|^z%DC$*u{fGO-o*`oBXD delta 141 zcmV;80CNAC1(^k~=>cF(3K1DRz9088yZ6XxeEnSyCvZGsxd#a+1UKyPNLu$BDk+5^ z-V{*i8Bv|bs{;YvR)>6U$`Q|1H@Rp;>hOTcFrhcM1ql{LWu*qZIR)6mxhXP9$yBYhP+!UtT_z~phpZ$|+s zVIu!{!+;kCh%EpKZe>{Zn#&vN^pU1sWay0_B#%E;dr?RD0?QMsH)tOPg(^BoUx<%$ vg{Y|7h){u(Ndhn+69vSuXG?xl>O#|PXx6nD+*~DFa#|a+38f`t@f&^Mnu0!u delta 141 zcmV;80CNAC1(^k~=>cG2VpRJS@o`5k7)E#_s*qDQ=OTpZ<3r5CJwUGOT=nr>8*EJI zSq&f@YSs4HsB;16_y>JHR5>AU=9cF5N!%&K!#;_u&m)UEog6K#wUH5Eq4o4 vKY7wgx`lz0Ndhn+NuM3O{0sQ;2sG!0ecGY@|}fcCvo`9ji$ngNr_G0d~?sPguBd-PZ?2sxyh;FUc)hN z{ROs3`&Uym_*a0}f&IakBUExgS(m-%mxNgF@5)&@iWX50OaT{z_1D}Ee;-iUw8P~) v0u0P#1ZDw~Ndhn+D;2(OIDeETE-K33rIKHV1w?Xviku3(MdC?ua_9kw)PqBV diff --git a/parameters/src/mainnet/resources/transfer_private_to_public.metadata b/parameters/src/mainnet/resources/transfer_private_to_public.metadata index 5b45c362e5..ed72b09d1b 100644 --- a/parameters/src/mainnet/resources/transfer_private_to_public.metadata +++ b/parameters/src/mainnet/resources/transfer_private_to_public.metadata @@ -1,6 +1,6 @@ { - "prover_checksum": "a7b14687479d6b7bd46de7787f622b94c3e8cf581750384ed88ec1afdf1be7f1", + "prover_checksum": "4c0561cf4342c601ccd49eee4c039711c2e2cf92a01b0b3a58b7f1242e902ceb", "prover_size": 66299476, - "verifier_checksum": "17570750a8b64b839b77b07ed95a963f0d57b7a322945833e0b45b6593f2942a", + "verifier_checksum": "be9a2abeeb2c9c5dcea11582f1869e0b1447b45ebfad5582604903ce338da405", "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_private_to_public.verifier b/parameters/src/mainnet/resources/transfer_private_to_public.verifier index 607ec3cc1e9fe90ed1d1ac5249848338046b42af..77b4ab602b3ebc9aa3dbb6a0386372d5aacbd59c 100644 GIT binary patch delta 141 zcmV;80CNAC1(^k~=>cG{#EP1zX<~x7^~b&61&Hzt>|d_MqY@d?D3>e{&ryCHw`Qjh z`OzS(|Lcn`RE{6G@hq_}DAn;2RUHQ1Q?*>QULQcTPBtzezBNmCDT vvH3xM!f%0-Ndhn+R|Gpuv@LELz|@25;{5ajWvhk_Ux`7JMNxw>@Cqg)84yL} delta 141 zcmV;80CNAC1(^k~=>cG+KDP}|mus8R31!Eek;iIdYO@}@ElbUR;Q~1*yg?~iCa2gU z<=hfsmZRmI@^%2MXFO_VBKAr1>fMO)hB#j`y`@?jAjgTBM4q|7bx?0`a$e=+%5JbY vN`CJzJct34Ndhn+mDV0=>~e@2rU!m3iwlWW3utuI*ywUyOy%BdSt=-8g@i&U diff --git a/parameters/src/mainnet/resources/transfer_public.metadata b/parameters/src/mainnet/resources/transfer_public.metadata index 3aa747f944..876e221125 100644 --- a/parameters/src/mainnet/resources/transfer_public.metadata +++ b/parameters/src/mainnet/resources/transfer_public.metadata @@ -1,6 +1,6 @@ { - "prover_checksum": "f71fbfb10baa00a009b88bea8ca75106672dbf701ed65bf180dc538f832ae9a7", + "prover_checksum": "f8e5f6437b945174b62313ece8a1c9dcbeac5dfff5b0fef2e968c9b92f86da06", "prover_size": 28913482, - "verifier_checksum": "0ac9e58c93e3f2cdf2fc652a412ca963a78c08f3d1e4abc1abbfd758e1a62940", + "verifier_checksum": "5facdc35d2205f3a90a7a2eb89fa1418beabc6f6393e18d6498c60f02a3185e3", "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_public.verifier b/parameters/src/mainnet/resources/transfer_public.verifier index 774b18f54814bcd3672c7dcbb833a696dfe8c3d0..1089392f46578aa6e08374dde5f9b841c8a1c609 100644 GIT binary patch delta 141 zcmV;80CNAC1(^k~=>cG^RI+LI8Tj%b`ypCnu%a4AXc*4K!;-CAQ?Sx`Me59Zr3@Z5 z3=tG(0amofM2i3oS&ZEI!81a$9uu|?Muq4tH(8i3)sjSt#Kw!AjAmbUsgMj40@5ko v=3m?_!JmMWNdhn+g>)>8Q_x`tUt0|dh3PE$tI+1Tu_`ltrVSU5+c3sI_FzCT delta 141 zcmV;80CNAC1(^k~=>cGk7Ji}?!H{2gHs3ei^GpTz{MG`xBRi$cb&BJ{`6OE`+^2SC zJ`NbW-)DU?MHhjRAA@3=I{J;&sEg5d^Hn@wO{A)^F1s<}TyGFJ(K>vCHcNdhn+7-odlOtowH$m$puTC%oK(&R<%jJ#cF>Z$qV39>eS|>YiSVYImhZan!?NsWzUd`~$}E71$8GYKi>` z$_?wNRg5G6erEu2&q38j&w&93D$A{VH=gF0t=0eN@E(T=*;?#=$1VOvs%dkpNiDp% v#gTvZ8H)jvNdhn+f+=oeUsO=a0tI7=$jW9~2-+~>hbK!i8bx9$uE}_d5YIxz delta 141 zcmV;80CNAC1(^k~=>cH-IN`Ker8<1dpOKJ4RMD-wUrzFs9M4?S@_u6hM^QwV1O@oM zcL#$BZ7R~|GgtwH;dn_)?_<|b_s1H%P+w(;D=)#$4{Rrb?PQ>?b~o+m+-%vHG7}eA vZWk@!UOoVmNdhn+9qfaMb`)8Qlf3?|vI0FYt3Gz+wL#j~HW6d|SUNKJt3yIT diff --git a/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata b/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata index 54e91fdd4f..d1e5ca6e66 100644 --- a/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata +++ b/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata @@ -1,6 +1,6 @@ { - "prover_checksum": "17aeeb53b8d1eb53ce30662a83ae9889a86fbbc8af09015f0f0af972c9041720", + "prover_checksum": "785f2318f0c12b883b99ff1649cf401d2f1d024fe2dd30916a276cd8c199f757", "prover_size": 27062250, - "verifier_checksum": "cdea9c3350d6f9059769782e3c3d41ca651633a9a0cd874195a298f4d20fa684", + "verifier_checksum": "34f8fb353c7c1a4e590b52000d78bf28100328f6250eb6c9ef11c9dc0a2bb066", "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/unbond_delegator_as_validator.verifier b/parameters/src/mainnet/resources/unbond_delegator_as_validator.verifier index 4be3dc30102d8e35f5c204934cbdccab71b269ec..2f245c62d33e7ea025e799d959287c973565bb7b 100644 GIT binary patch delta 141 zcmV;80CNAC1(^k~=>cHJFab^XnC;QtYKc-&=`YG4y3KjSwgTt2$JNWu4ut?6I`FtG zRfcNqss;E*W&(idnd`etr5YNgwJn^+cH%_~k8_RTbgw)`QcJ$wy6jmPI{@0(S2HLi;gFN`FWm@4j{8 z2oI(EJd!3F$AAFQ&C*s%i1BKE4+(pSvxNYli<_9BA=Khr2RPHZrk6L95x*NJsZ}A) vVes4;f_{LLNdhn+4{?Cr5=|ww`}+SCR4(j#A$Y;_uw>A$eD>CuNWKsYPcE{!xTFcc#oa$Pz+3n$YiP%n9=WR#c0!R%<^wvv-n`$5ys8? zj19BW94L0h$8G>UqHgE6pE8bb;}zhewsaqh#~n#;GQ)csx_8kgiR%;cCMu60g=UK= v9au6AC=r2^Ndhn+8i?A|-Zm>HEcAnLPhJU=0U+ZE!~y#)hOYNWjE9hfpiMy1 delta 141 zcmV;80CNAC1(^k~=>cHXA2NM3d}0QKS;*^-wv3J_SDoM@|1O|80wJa4vVFap78xM9 z3(ZR$D7rXxq~!olg8rEX^qa4elgA1{9!^|3oW~z7+zV>#x9J`2ry@&v#SpMSJ@{0W vtmtaIm4gA3Ndhn+!%pTaPJ{J6^=viL9ivKOm;mY^Gr4U};9=cS0p_2g%x*zl diff --git a/synthesizer/process/src/verify_fee.rs b/synthesizer/process/src/verify_fee.rs index dc3a18bf74..71b92dafc5 100644 --- a/synthesizer/process/src/verify_fee.rs +++ b/synthesizer/process/src/verify_fee.rs @@ -239,17 +239,17 @@ mod tests { // Compute the deployment ID. let deployment_id = deployment.to_deployment_id().unwrap(); // Verify the fee. - assert!(process.verify_fee(&fee, deployment_id).is_ok()); + process.verify_fee(&fee, deployment_id).unwrap(); } Transaction::Execute(_, execution, fee) => { // Compute the execution ID. let execution_id = execution.to_execution_id().unwrap(); // Verify the fee. - assert!(process.verify_fee(&fee.unwrap(), execution_id).is_ok()); + process.verify_fee(&fee.unwrap(), execution_id).unwrap(); } Transaction::Fee(_, fee) => match fee.is_fee_private() { - true => assert!(process.verify_fee_private(&&fee).is_ok()), - false => assert!(process.verify_fee_public(&&fee).is_ok()), + true => process.verify_fee_private(&&fee).unwrap(), + false => process.verify_fee_public(&&fee).unwrap(), }, } } From e6734324bb3363f8cf0f4a7f8985cd9c747e2204 Mon Sep 17 00:00:00 2001 From: Howard Wu <9260812+howardwu@users.noreply.github.com> Date: Sat, 10 Feb 2024 20:09:41 -0800 Subject: [PATCH 5/5] Update serialization and expectations --- synthesizer/src/vm/mod.rs | 2 +- .../arrays_in_finalize.out | 12 +- .../execute_and_finalize/child_and_parent.out | 20 +- .../complex_finalization.out | 12 +- .../vm/execute_and_finalize/count_usages.out | 14 +- .../vm/execute_and_finalize/hello.out | 20 +- .../many_input_and_output.out | 172 +++++++++--------- .../mapping_operations.out | 16 +- .../execute_and_finalize/mint_and_split.out | 2 +- .../execute_and_finalize/program_callable.out | 14 +- .../vm/execute_and_finalize/public_wallet.out | 6 +- .../read_external_mapping.out | 24 +-- .../vm/execute_and_finalize/test_branch.out | 12 +- .../vm/execute_and_finalize/test_rand.out | 20 +- .../vm/execute_and_finalize/timelock.out | 8 +- .../execute_and_finalize/unused_position.out | 4 +- .../vm/execute_and_finalize/user_callable.out | 6 +- 17 files changed, 182 insertions(+), 182 deletions(-) diff --git a/synthesizer/src/vm/mod.rs b/synthesizer/src/vm/mod.rs index 998092b7ff..1d7a2280cb 100644 --- a/synthesizer/src/vm/mod.rs +++ b/synthesizer/src/vm/mod.rs @@ -951,7 +951,7 @@ function a: // Note: `deployment_transaction_ids` is sorted lexicographically by transaction ID, so the order may change if we update internal methods. assert_eq!( deployment_transaction_ids, - vec![deployment_2.id(), deployment_1.id(), deployment_4.id(), deployment_3.id()], + vec![deployment_1.id(), deployment_2.id(), deployment_3.id(), deployment_4.id()], "Update me if serialization has changed" ); } diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/arrays_in_finalize.out b/synthesizer/tests/expectations/vm/execute_and_finalize/arrays_in_finalize.out index c824f27366..8217a54a60 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/arrays_in_finalize.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/arrays_in_finalize.out @@ -4,15 +4,15 @@ outputs: execute: arrays_in_finalize.aleo/test_arrays: outputs: - - '{"type":"public","id":"7051868022199538281983484726334868585120214850709506400685648463568311074059field","value":"[\n [\n true,\n false,\n true,\n false\n ]\n]"}' - - '{"type":"public","id":"2698854010946894280403857018674102550683827066821274282398230616068613628761field","value":"[\n [\n false,\n true,\n false,\n true\n ]\n]"}' - - '{"type":"public","id":"6734503747161420974974766078278270196733130665586322841403208897932027830291field","value":"[\n [\n false,\n false,\n false,\n false\n ]\n]"}' - - '{"type":"private","id":"5168391188395506111029592681206431247443904847166129464977071139926165416103field","value":"ciphertext1qvqrg9enxaw2x8xm8ce0c8xz80envgf2p4hyfr9p2rx0mqfjm303spra4893t20aekwz55slyz7y9j3pln2ul2qx5qmtsxhut9vg0yf2q59xuu5fr3x6pczq932km4n476v2arehnst66ppuxkghhwtdsz8qqpdkmdl"}' - - '{"type":"future","id":"4517957061576175622472518204577133206661336185041169936924799458890521883925field","value":"{\n program_id: arrays_in_finalize.aleo,\n function_name: test_arrays,\n arguments: [\n [\n [\n true,\n false,\n true,\n false\n ]\n],\n [\n [\n false,\n true,\n false,\n true\n ]\n]\n ]\n}"}' + - '{"type":"public","id":"4191132437526469726810078556702976385142790887134762205329564706486407091452field","value":"[\n [\n true,\n false,\n true,\n false\n ]\n]"}' + - '{"type":"public","id":"7732313354599796556273728553000823036918857772412470351533433477903799198179field","value":"[\n [\n false,\n true,\n false,\n true\n ]\n]"}' + - '{"type":"public","id":"5608636510680839107900624676979657593964288488498543523280649635497192868408field","value":"[\n [\n false,\n false,\n false,\n false\n ]\n]"}' + - '{"type":"private","id":"17838117880873163791217811658586530829235665776709065547754152530705294791field","value":"ciphertext1qvqgms88ec4yhlndrj62c2eupwvd4u3efn4u2dtgl6gd29ll52y87z7ncynzwv9ntktucne95h0mvgdstwsqejzhv5klrg9cn2se2g7xqhlr94w0j6h7m0nt2l0deyg2c7hfud0s8r8euldthva35k4k7u0sc44p593"}' + - '{"type":"future","id":"1297781464149960028797060285986265412679573504857528613822702946616595852889field","value":"{\n program_id: arrays_in_finalize.aleo,\n function_name: test_arrays,\n arguments: [\n [\n [\n true,\n false,\n true,\n false\n ]\n],\n [\n [\n false,\n true,\n false,\n true\n ]\n]\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4377505400197346320325166594762058980060035444514726670451291598609377642278field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1y9t0y4lvhm43qdzlfjmfzh8985vfnx9ms368p07x5lsemet5ey8qt0ssjn,\n 7030u64\n ]\n}"}' + - '{"type":"future","id":"2715104495799396615741890969708845641129834494989002430629962063572161077357field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1y9t0y4lvhm43qdzlfjmfzh8985vfnx9ms368p07x5lsemet5ey8qt0ssjn,\n 7030u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/child_and_parent.out b/synthesizer/tests/expectations/vm/execute_and_finalize/child_and_parent.out index 476d6d637d..5e175be82e 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/child_and_parent.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/child_and_parent.out @@ -4,30 +4,30 @@ outputs: execute: child.aleo/foo: outputs: - - '{"type":"public","id":"8257993261519343122023101166480151323931323787055034156941189634399210202459field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' - - '{"type":"public","id":"188190518969019844021095872841035661635298121101628545721182533596213107162field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"5080102022926418909778330219071921101316828719441748927127931330249058015974field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"5521854961454308608590219862110836142563484399396636760251296039833599837132field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: parent.aleo/foo: outputs: - - '{"type":"public","id":"5659858974486313466575226260845503816979591587276786620624467407599116914038field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' - - '{"type":"public","id":"2284865988687012438785552090811369628576124923682194722522318003600012047529field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' - - '{"type":"public","id":"8179726172313399939265670838540366852175382310921990612683156165949485580171field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' - - '{"type":"public","id":"6136647598927890396739645454509256562231663381292425428013956117563111804111field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"2180349836718516623986527660803091459313965700848712055858720506742956053113field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' + - '{"type":"public","id":"2306297960481221498781231131707036686317070776613275725765479488798926222971field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"629884147589344887679757377742438552594075704621211994352632325954728373873field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"7179043812459822888643137487185719660290943898185113409588571501637751887110field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4193852777105201569735062214533514773129433748132976330865503683138607715780field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 1276u64\n ]\n}"}' + - '{"type":"future","id":"3347872470791009142460537022787342626917524637524821339588032366241763021507field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 1276u64\n ]\n}"}' - child_outputs: child.aleo/foo: outputs: - - '{"type":"public","id":"8198940315425398645135948347803651217596158581421876066209083610850686200351field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' - - '{"type":"public","id":"3917485763512771512439229660054620197118945473924338831496641922296791545909field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"2143480774914597553325855510339405850073067321902916033740995314914236889071field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' + - '{"type":"public","id":"1500133418795634855889959966479039744505030118146228739798986109415104921004field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4709277201101508382627424837739523940171678083116221637642206810066192947343field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 2187u64\n ]\n}"}' + - '{"type":"future","id":"7038990688216256894209117299702421152482248481717682799780559802515876924307field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 2187u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/complex_finalization.out b/synthesizer/tests/expectations/vm/execute_and_finalize/complex_finalization.out index 0a3673e69a..9c615c77fa 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/complex_finalization.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/complex_finalization.out @@ -4,23 +4,23 @@ outputs: execute: four_program.aleo/a: outputs: - - '{"type":"future","id":"6998380252357500798386967612861409092158524423455257610860233087309437860154field","value":"{\n program_id: four_program.aleo,\n function_name: a,\n arguments: [\n {\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: three_program.aleo,\n function_name: e,\n arguments: [\n {\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' + - '{"type":"future","id":"8073961850697502005201723808473879821579356096451187824496987505478189255390field","value":"{\n program_id: four_program.aleo,\n function_name: a,\n arguments: [\n {\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: three_program.aleo,\n function_name: e,\n arguments: [\n {\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: zero_program.aleo/c: outputs: - - '{"type":"future","id":"6474810957906539673522536973574444941819182578686500986059184970228567776990field","value":"{\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' + - '{"type":"future","id":"2137985455651054628126680275240269432054325301779207101612589772241739981165field","value":"{\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' one_program.aleo/d: outputs: - - '{"type":"future","id":"2284370192295255845302224777470466828981075133309722155924689750590667987972field","value":"{\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' + - '{"type":"future","id":"5357241693223765542321433170179413948506257034844568471556820282679708829796field","value":"{\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' two_program.aleo/b: outputs: - - '{"type":"future","id":"7683124799914168846002043533287386527848546597477854511743024652449265994214field","value":"{\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' + - '{"type":"future","id":"237175359371682654344610765795273369747408298587655173055205899746835808177field","value":"{\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' three_program.aleo/e: outputs: - - '{"type":"future","id":"1924141467746445803895332427121150983883397442046587101238781615037989484141field","value":"{\n program_id: three_program.aleo,\n function_name: e,\n arguments: [\n {\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' + - '{"type":"future","id":"3616852843624887241027320225932142757072575594346925293061443696405638714355field","value":"{\n program_id: three_program.aleo,\n function_name: e,\n arguments: [\n {\n program_id: two_program.aleo,\n function_name: b,\n arguments: [\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: one_program.aleo,\n function_name: d,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n {\n program_id: zero_program.aleo,\n function_name: c,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n },\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8\n ]\n}"}' credits.aleo/fee_public: outputs: - - '{"type":"future","id":"7684699263458955489500469434952154401333918354263231036610964274134089849729field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8,\n 264403u64\n ]\n}"}' + - '{"type":"future","id":"3688989155399268747449856447722119301454464433397170543411114503201565062667field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8,\n 264403u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/count_usages.out b/synthesizer/tests/expectations/vm/execute_and_finalize/count_usages.out index b24c3cd022..15b34329e9 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/count_usages.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/count_usages.out @@ -4,20 +4,20 @@ outputs: execute: count_usages.aleo/add_and_subtract: outputs: - - '{"type":"private","id":"5995165900489236048724189329217011788885182262230664342189030052523170979761field","value":"ciphertext1qyq9fpp2wkapda6cfaprteayg2gjzn66n5nxtfje93r83crs2zmv2qcsx08xs"}' - - '{"type":"future","id":"6684150603764937916097990120387351299053371864904660697581502582495528413682field","value":"{\n program_id: count_usages.aleo,\n function_name: add_and_subtract,\n arguments: [\n {\n program_id: basic_math.aleo,\n function_name: add_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n },\n {\n program_id: basic_math.aleo,\n function_name: sub_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n }\n \n ]\n}"}' + - '{"type":"private","id":"2417893162182175688334393632212980126051692937961342515862782307223843642037field","value":"ciphertext1qyqrdme34cnf0dd08er9nelae88tnvs8g4f3pgpp43pf6j0t75kjvqslqv9d7"}' + - '{"type":"future","id":"705166902367251294198915856269600161357499171183853434375951230037519647203field","value":"{\n program_id: count_usages.aleo,\n function_name: add_and_subtract,\n arguments: [\n {\n program_id: basic_math.aleo,\n function_name: add_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n },\n {\n program_id: basic_math.aleo,\n function_name: sub_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n }\n \n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: basic_math.aleo/add_and_count: outputs: - - '{"type":"private","id":"2931416906152139217500676601684895559278058810555470402379383863215944694889field","value":"ciphertext1qyqvksr0mn8etdpt5ud8esh45ux7kwpkt3xe4c6wslz2egz38kdcvyg8lsc2w"}' - - '{"type":"future","id":"5218930982418005953215765906617041537918799720819403880991199101629363614321field","value":"{\n program_id: basic_math.aleo,\n function_name: add_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n}"}' + - '{"type":"private","id":"399020463587132384720173345030999750182171151859286922026595618170323893845field","value":"ciphertext1qyq0ec250xje9hyr36a6256sajhjgypznc0ckq9rckcx9hvqqe6expcfm3th0"}' + - '{"type":"future","id":"7862022176391501831567513125389433398315612742902989311778410598142695342538field","value":"{\n program_id: basic_math.aleo,\n function_name: add_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n}"}' basic_math.aleo/sub_and_count: outputs: - - '{"type":"private","id":"3488605564553623263445079384158588906615626998185976594325667750922281211548field","value":"ciphertext1qyqdgjwlgtweqah8dzgelyhzpk0jsxckr28n2tdtwfzmnzjj7d2zwzqms26nn"}' - - '{"type":"future","id":"8376420147018709384724335862198143063714524641135069419096866845262064600524field","value":"{\n program_id: basic_math.aleo,\n function_name: sub_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n}"}' + - '{"type":"private","id":"2166485610255156621966882910457223948921992536665120764477666903342640510503field","value":"ciphertext1qyqy23z6n3fnm773zq9y4c5syrppp0c28fs2a0wh7t49wljydkjr5ygdylh70"}' + - '{"type":"future","id":"6356013747296129460342419348497415908695385595173072937771394894236053328119field","value":"{\n program_id: basic_math.aleo,\n function_name: sub_and_count,\n arguments: [\n aleo1mrughg5ssadd9fc2uwve7l6u24xn76kyz24zsjtzta03vgkq4vpqggl6fg\n ]\n}"}' credits.aleo/fee_public: outputs: - - '{"type":"future","id":"1938790837765091012488580924817661279880431670012907855909045111976774319119field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8,\n 54628u64\n ]\n}"}' + - '{"type":"future","id":"1585223826336342113009963588330628410761295667183024829434599712242938930728field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1kw4knandael9qcpxs6g36rr6h7dwvjz6q25ueah6zz9v57zjlvxsx5llq8,\n 54628u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/hello.out b/synthesizer/tests/expectations/vm/execute_and_finalize/hello.out index ece9240964..6d1c9d0566 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/hello.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/hello.out @@ -4,46 +4,46 @@ outputs: execute: hello.aleo/hello: outputs: - - '{"type":"private","id":"5614495356603750498135893718149497613043561511832919802810225365170046755923field","value":"ciphertext1qyq88y70cav8grzelac7neap9xpazde4c2l32nqc3k4lvghxtpvegzgzg4k77"}' + - '{"type":"private","id":"3176121404187786053742476608354607969269791944150504812747549421863574954935field","value":"ciphertext1qyqwch85jv880t8dxlr9xs9crgjgp4ksn8kkeln2kz9qph7ahyyngpcda2dye"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: hello.aleo/hello: outputs: - - '{"type":"private","id":"5846203644134005241685407588279763961599502145912037616385648077427742296434field","value":"ciphertext1qyqthzxggdnrwyymmgkv8slllxrq8tmtltunsrf4dcrhgcdwt4dnqqqysj50a"}' + - '{"type":"private","id":"1150202079184853991998868214382005296145686294524629420497502839491280451550field","value":"ciphertext1qyqqh50g4ajk2j5ql8kgfkmqslyvddqrr3e54q7me8l8s2nm04zh6pcpyyud3"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: hello.aleo/goodbye: outputs: - - '{"type":"public","id":"2642075470205745915437917544815624260503750815963975814259588973697216004583field","value":"1u32"}' - - '{"type":"future","id":"361930204229325680459927289502858977396610521545960746195272244038942015328field","value":"{\n program_id: hello.aleo,\n function_name: goodbye,\n arguments: [\n 1u32,\n 1u32\n ]\n}"}' + - '{"type":"public","id":"3480118852870382894144865857822175070946589099724278834594029902836667201534field","value":"1u32"}' + - '{"type":"future","id":"5509833946703133090359961819746633556337352648574994721286932795133496169216field","value":"{\n program_id: hello.aleo,\n function_name: goodbye,\n arguments: [\n 1u32,\n 1u32\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: hello.aleo/goodbye: outputs: - - '{"type":"public","id":"550576093903942253365649001372853409216678285833302653743507502904817079079field","value":"1u32"}' - - '{"type":"future","id":"1100347856065732999293020778220654433001118051401564613677868274591240788877field","value":"{\n program_id: hello.aleo,\n function_name: goodbye,\n arguments: [\n 0u32,\n 1u32\n ]\n}"}' + - '{"type":"public","id":"6056606855582681195495740332496796887918173012819660623567958555764517366236field","value":"1u32"}' + - '{"type":"future","id":"1191890728151228917136236794360467496329820983929439085349301662870546796031field","value":"{\n program_id: hello.aleo,\n function_name: goodbye,\n arguments: [\n 0u32,\n 1u32\n ]\n}"}' speculate: the execution was rejected add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"723398708416943965679286433509907489867610392336969928855182538567932233441field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 1317u64\n ]\n}"}' + - '{"type":"future","id":"4794226115128098661953863457300334535735190584732192888559305107927143173518field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 1317u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"7500061893088709501926458874103429937756473156907366818228322418371799987083field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 1317u64\n ]\n}"}' + - '{"type":"future","id":"1739624830440070888681272394177400670284937130272704360430655837962148942436field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 1317u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"693105314299332215857089088059023707332082928469565896605175974356642396813field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2366u64\n ]\n}"}' + - '{"type":"future","id":"5590731974465655998543157332935394974986899946419756918684085895219128822776field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2366u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"1441674302389531937522747153756222779025502860728835603548501000282337153942field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2366u64\n ]\n}"}' + - '{"type":"future","id":"432042030880064849076909676849286813284474825415060505835239570887258317130field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2366u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/many_input_and_output.out b/synthesizer/tests/expectations/vm/execute_and_finalize/many_input_and_output.out index 19abe30428..21cdc80309 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/many_input_and_output.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/many_input_and_output.out @@ -10,66 +10,66 @@ outputs: execute: gas_dos.aleo/make_trash: outputs: - - '{"type":"public","id":"7328454421185929158618031230606034593549261051339602553507241025154825176299field","value":"0u8"}' - - '{"type":"public","id":"5145134703139278195441792859006011532400644423433046212536736013174180642636field","value":"1u8"}' - - '{"type":"public","id":"4479131570657126987170312036920068454738210783609610183168698498586355634960field","value":"2u8"}' - - '{"type":"public","id":"6926788178616354544370363073675930466260780102185705396446528307557204966254field","value":"3u8"}' - - '{"type":"public","id":"507213451235696529330091255380102539497181688387097808723590767226256138002field","value":"4u8"}' - - '{"type":"public","id":"6710585889229359056970878174557972819881050693904886470290761564643350681439field","value":"5u8"}' - - '{"type":"public","id":"2198039663990554661027013328856492399590215636668825518497257481407294029866field","value":"6u8"}' - - '{"type":"public","id":"288798117536072394573543619144317389906590429832415617777655870783774307012field","value":"7u8"}' - - '{"type":"public","id":"1155702003412000992412931135598868113644122882557716381602003061253381471571field","value":"8u8"}' - - '{"type":"public","id":"3026344388965712201801712548965204124836140425527882670365396322199812932565field","value":"9u8"}' - - '{"type":"public","id":"5492615319027225479113405102986959595495416506208321009285333238882415298049field","value":"10u8"}' - - '{"type":"public","id":"6171840640899438157036020226640325134210483852414199464033845647392969714320field","value":"11u8"}' - - '{"type":"public","id":"6575356095090949853056361212638757233924047161146463958636818761079464552340field","value":"12u8"}' - - '{"type":"public","id":"2262771770811842021838463874286351493506275646051705307544569163192903096597field","value":"13u8"}' - - '{"type":"public","id":"174469374038614532963809815011040883121008467567144862148413520935353623648field","value":"14u8"}' - - '{"type":"public","id":"8090171018295599961208092852988350550956162709304897310609315247476998706602field","value":"15u8"}' + - '{"type":"public","id":"6747157736748603480590286328272166026792595420044415085985565949658486836640field","value":"0u8"}' + - '{"type":"public","id":"649973566147243409550290245203382623458718713926298287005827875227629101586field","value":"1u8"}' + - '{"type":"public","id":"4715184471484114421621316918068835569036773074904095137588387911996155207218field","value":"2u8"}' + - '{"type":"public","id":"6010118718732002261351810375013950678580303457924654867349009010796624699379field","value":"3u8"}' + - '{"type":"public","id":"6333722332192433030784808291116138880151228199115059689497917707786299191732field","value":"4u8"}' + - '{"type":"public","id":"5888245555064288391430977044838182586435070649131417859369280771113057190243field","value":"5u8"}' + - '{"type":"public","id":"2705380664623532047544469249146152090862016550891767685765285532434095990009field","value":"6u8"}' + - '{"type":"public","id":"5519628389319624879328309620830309237982407537738349566389273882401739294201field","value":"7u8"}' + - '{"type":"public","id":"7997534825149575584899781068011514298311850117701142304696407678330173846824field","value":"8u8"}' + - '{"type":"public","id":"8351421848133987949134108689305992851517388701279810208886613680610063838811field","value":"9u8"}' + - '{"type":"public","id":"1040364973741132984216208872045302650189239516982574815007069482884664919083field","value":"10u8"}' + - '{"type":"public","id":"653656632487021611433829850348345841758372491630426780843163907813480449226field","value":"11u8"}' + - '{"type":"public","id":"1593623190274459185231022493182745978048719576581716602188209609143075467430field","value":"12u8"}' + - '{"type":"public","id":"7294419130461631769356218452308251405322881405358069999008200992226082717233field","value":"13u8"}' + - '{"type":"public","id":"1924392335704798525876601513574376180904631637832561294379847655890585101681field","value":"14u8"}' + - '{"type":"public","id":"5010979078364274103068904287124840185727981251110897531184800275512425378069field","value":"15u8"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: gas_dos.aleo/make_trash_private: outputs: - - '{"type":"private","id":"2680622265102100041993406647937919090940301114770765059104962140226246981264field","value":"ciphertext1qyqtjrpzy7zwvfmsv0xesjl8rv3lh86pwsuvrm4ynyra7x20nzy0crs3t4uvz"}' - - '{"type":"private","id":"5202743622607685269012784963172580544281870231936627246866565403414033171808field","value":"ciphertext1qyqvl9yhzzu8trer3fwdkgu5ftej28swpajmfle2lmqrpdsrcqd4wpq8nq56z"}' - - '{"type":"private","id":"2174891821791598891325907948165991966270654154109515635412257676350776525858field","value":"ciphertext1qyqg7tcq3lk4lm357j85e04ntlx7tlq88g25s094m08ce3pvk9wzypgxc25tn"}' - - '{"type":"private","id":"3482962903872689804786042821343967741876935213235592724563470495245964507635field","value":"ciphertext1qyqd33cyvv2007td963cng7ex5qpeqa9g8aztsyf9l4cs59zl9ph2rs29hdd8"}' - - '{"type":"private","id":"4440477798685620135379247884803156497847423337761130118347611024035653635140field","value":"ciphertext1qyq0959tkr8jfunfgl5wy0wwm9zrzvzc2ktuny7j4f4ekqpecphryqqgnwplj"}' - - '{"type":"private","id":"3522752929186128924758141077706371690810713792036167644523972417246682200901field","value":"ciphertext1qyqzllfkgvvz303zgsduenn79ru5nx0ynjw2vk3zxgz8sp0096smuzcf6e7vu"}' - - '{"type":"private","id":"3625214038066625726053665609852864682693494709445484792903274142479081890567field","value":"ciphertext1qyq9nnzfv5w4ct5k9xny0uquyrulaclng6mv7puml3x3pnam3ttespg8gq9dl"}' - - '{"type":"private","id":"1637083100938265104763821696269236866552161155548506891159616654219004830174field","value":"ciphertext1qyqtp60mtkjkysf7z5uyaluq4z35m3hehqj39en0rpggy249vfnvszgkjpy7c"}' - - '{"type":"private","id":"1090493810202308287957198910474311328876918772204234621365178737170948657938field","value":"ciphertext1qyqvjyy8d40h9sqwppf8n3z4ejechz823crx9j723u0gtapzy69vqzc7p2pfj"}' - - '{"type":"private","id":"7261330284282876129032008102561419014693564205492131523999072056356722523811field","value":"ciphertext1qyqfd3fz5ugh5rt8vk5w2ugp7sn9777qq82v6yg5p059dgf57knakqqay57mf"}' - - '{"type":"private","id":"709959112982644896253271486987191411441663870818104439243630623545390950272field","value":"ciphertext1qyqpwt8sqmqfxs0sw0l8jghvqfjt3hddemmy30e6s0ms9fgrn50kjqcfs69st"}' - - '{"type":"private","id":"6872976021810691710027178488223982683034356995539047639261319076027494254123field","value":"ciphertext1qyqwg30pz7gzh4zuyhy0vgumfxfm2xlpyxucg4tvewdz6gpr60skyrgauuulp"}' - - '{"type":"private","id":"8359829191814664268280684613954596526781157368700496608365669690643643037289field","value":"ciphertext1qyqvedxm8alapcwlph5kkmffkvafuhld92n4y7588704ujk9l3mhspq4k2kct"}' - - '{"type":"private","id":"1001150914100589972693891478671980342979312932580439705453658330535336008271field","value":"ciphertext1qyqy369l9urha2a99j2krk6tjh5dtdwt9z0puu0vtgvznk53khs9kzsrppr29"}' - - '{"type":"private","id":"8131111517226123155050404356134943165771021461049467536204430056357254727422field","value":"ciphertext1qyq2hn2xnu4fadsmaf65edm4ftyvg6ns7t40g0urv5h47z93ywvcjzqvtcq8r"}' - - '{"type":"private","id":"2328882362753533354211206400408346026883181405850191907839548608694887338104field","value":"ciphertext1qyqfhe6jhjc5te9zcsyvhgvruj9w9vyppj30pvhy66lmznv76ar65ygk8yr0m"}' + - '{"type":"private","id":"3178675254300275843383623280462721192133283660421872326577156508145365668480field","value":"ciphertext1qyqr72l9jxzmxy9grsl272ud24lq4de7pa36zww2c8n6sdt8ft3n2rsktrhcl"}' + - '{"type":"private","id":"3592370700431980549398591027926102431719057246222545849949554376480536512418field","value":"ciphertext1qyqp9mhjastjmtqppl0us4h0s9hwm2udk6sl7z8kmwxx0rjak0xl6rgrhdfp9"}' + - '{"type":"private","id":"5015190936906056906946595445486950479313140539015689642403600858320056079439field","value":"ciphertext1qyq2g4a6rkuzfs8x70r6zwyudgpn6rng0kv7l008nz52tzjjuyxscysn9k37c"}' + - '{"type":"private","id":"6455178200979974567545886653888837738198208830988894675846651316126562112600field","value":"ciphertext1qyqwk37q9hh34pyu5pqf4dqpkx62ct93u8eg503d3xdumxvgz24kzzs8xh5xf"}' + - '{"type":"private","id":"441578724655724425378862348205143575014108836933091743264908377416536569902field","value":"ciphertext1qyqx373jlfqlp8wk0z8d03w92aj5q6arcw5fa7crsln6je7ckufy2rs440p2r"}' + - '{"type":"private","id":"6727562409363713712272278253770938277290531703671883963721201766296710559416field","value":"ciphertext1qyqdrq9fmpxuvu637fzzevfj8k9p9twwt3skkakks43gjg3wxlmtvrcc2p8tg"}' + - '{"type":"private","id":"5900765846499883782656717755603787007957422075389964372791436651348006857224field","value":"ciphertext1qyqv8d0puv5lruc00xprqgfs3hql2jc7g0ku3usuxsqy4usz0l96ypgy9ur3s"}' + - '{"type":"private","id":"8295226756217200209959596718098054063884309676582306399212247817727537167993field","value":"ciphertext1qyqq2du67uasu2glt9kdhec7j7vct2rtdcnll3t8mpcrx02s0u0sxqsge3tlk"}' + - '{"type":"private","id":"8181394151926143042727606222080968091219514666973681831838802634723910704807field","value":"ciphertext1qyqxra6lnwkx3y8klf2vaud8keuk7jj4vd0k0kqgz8n26f3p97mrwrq0cq04s"}' + - '{"type":"private","id":"6734729083449209300118471016891853097724739272233592697735883274736165821640field","value":"ciphertext1qyqth22n052v2gungdh5nyngegq4sh874nruytkew5zq7kf2nnycjqgz37js7"}' + - '{"type":"private","id":"7500972475236275747881588151814005362695655417811301105586042430933060611422field","value":"ciphertext1qyq9nzmelc5zpuvchxr5m77enr4guj7ruv86xsdk2vx4ku3kwpxx2zsmw4usj"}' + - '{"type":"private","id":"8130977734223629619959263278616285929176363729398376780604587589091569071181field","value":"ciphertext1qyqgh960exm7dn5p3vvtvvnpscyd3g62efr78a3syxzcnu3lzvyv2ygq2e3nn"}' + - '{"type":"private","id":"1342233169177097654860453461670823088901477819542643899134838957080640297291field","value":"ciphertext1qyq2u4kvkuqkw9s0wegyczzul8s59mayjgaz0fzhtaemku6da6y5kpgxfu7sq"}' + - '{"type":"private","id":"7391399596647972354386735773625796963369050508605780615676837486755007451180field","value":"ciphertext1qyqr7uqs6wayrttlxd333lat5xxhhqcphkkylpknkg5dy4gunyx6jygdeqlfm"}' + - '{"type":"private","id":"154135336790998671754023870224163576051523380853463012393717687730220473648field","value":"ciphertext1qyqdehj5yytts6ldaa8ntgj8s695e73zhzg8gnv23kyr8zhzf3ftgqgsdeal0"}' + - '{"type":"private","id":"920095085577843523152461784092653536941316929806000265061076826661821648007field","value":"ciphertext1qyqysgfylsuh23tvrszlzzdswkant3vkjgx3v8ljhnfqqsuyk23pgqguzd940"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: gas_dos.aleo/make_trash_u64: outputs: - - '{"type":"public","id":"233314312605276539760746524164528913386489041588301421249429696985329848667field","value":"0u64"}' - - '{"type":"public","id":"7253165205278696561637248715563783454858866842754893348214451169160975075162field","value":"1u64"}' - - '{"type":"public","id":"666939097876094162575352087643400561412645022883205904471672662199353196861field","value":"2u64"}' - - '{"type":"public","id":"2959578059337764023181618398408038082893247480135464562472793876696915418953field","value":"3u64"}' - - '{"type":"public","id":"5286500885730658616234188227770288757865520078231878645131318044650940638194field","value":"4u64"}' - - '{"type":"public","id":"401309491997177592892630556474302634099704960274828674430960726287457846708field","value":"5u64"}' - - '{"type":"public","id":"7229261133705147296171654244855097638797071371920816627026569900935444723448field","value":"6u64"}' - - '{"type":"public","id":"7027737111877338341363202916015365226405006640018027773526971193651872286885field","value":"7u64"}' - - '{"type":"public","id":"4666981060089167647321091227592661962035883124507120144471806069733189753569field","value":"8u64"}' - - '{"type":"public","id":"2583284904746797664182562260080251003054566015963712113670613392689300760365field","value":"9u64"}' - - '{"type":"public","id":"4173633873661312951955239283483355234732949685908187166831651838082162090913field","value":"10u64"}' - - '{"type":"public","id":"122754949824671565357841063528425764444260908941146272537546151624065033563field","value":"11u64"}' - - '{"type":"public","id":"2130918280550853922824431786128137523245004386377672896846147107787168219683field","value":"12u64"}' - - '{"type":"public","id":"4694456538004825214415037291190735375240715731300118040019913761431560071687field","value":"13u64"}' - - '{"type":"public","id":"470751660319309894868159463333651824468663657160136189167945482341411113760field","value":"14u64"}' - - '{"type":"public","id":"4249914125363520277067410046691598837483324524993280920898528402016941453480field","value":"15u64"}' + - '{"type":"public","id":"730906278716886736214549186867912071216789907293619372995407182276178840902field","value":"0u64"}' + - '{"type":"public","id":"1575109245045429171368494780502083018941818963548716389294319521981302512311field","value":"1u64"}' + - '{"type":"public","id":"6542553720898513549147617785580217609728476848281216612038612053165479658830field","value":"2u64"}' + - '{"type":"public","id":"2050986609566910687002825879266223498079680553920166082503745042337551889897field","value":"3u64"}' + - '{"type":"public","id":"5975522125347992543144304600529534160726915753978735389103069215924086929065field","value":"4u64"}' + - '{"type":"public","id":"865214254461360763975319846771214299246126238769524047937335685873932972656field","value":"5u64"}' + - '{"type":"public","id":"7413677619876125297107923298740333237653602847707462889560217756108381577856field","value":"6u64"}' + - '{"type":"public","id":"3818658792814943441144259826962247349479763887533450194755382563551975295868field","value":"7u64"}' + - '{"type":"public","id":"5817474403061562864597825794761190001190072641318722371536768830410804482446field","value":"8u64"}' + - '{"type":"public","id":"7395071954794891679353516576003699033961561851951923345976907792327399116690field","value":"9u64"}' + - '{"type":"public","id":"3874311404551080002723926693546895057089037571699882905239093422478187649242field","value":"10u64"}' + - '{"type":"public","id":"2652544184779857036613378232899309079255075769671475608097048618116099520983field","value":"11u64"}' + - '{"type":"public","id":"6123105630472453276102467379726848248248111229924666892960235071928063826451field","value":"12u64"}' + - '{"type":"public","id":"7303341187590343154113254059959784526630864495886820459905858622304002827944field","value":"13u64"}' + - '{"type":"public","id":"2387756980249753394206100863037748629623359320692766913121732736054762620163field","value":"14u64"}' + - '{"type":"public","id":"3697673160058841840452855423974362417429421748522565469691462360008980535628field","value":"15u64"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true @@ -88,60 +88,60 @@ additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4460439047516495718073735439405487111536405512365343120714073673093841980496field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 1153u64\n ]\n}"}' + - '{"type":"future","id":"1233502016375300540052185048988005014879973125955662939200057677097020855469field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 1153u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"8415028977876091761752724883671758688572237811988248476376341949695578218786field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2363u64\n ]\n}"}' + - '{"type":"future","id":"7949043185167856339065705832481459070786322851203345196375864651473234929294field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2363u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"6955783271913968318412731377247340380831652777579800064049064878317952307153field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 3331u64\n ]\n}"}' + - '{"type":"future","id":"7618522776601875506220555979247223944774138673406542519145196068858902991539field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 3331u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"6497372388862928104904790174065298189831176271028157197406452385672043799872field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2591u64\n ]\n}"}' + - '{"type":"future","id":"4128578215055107219586693676580863389042669274675087117576661936356041869384field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 2591u64\n ]\n}"}' - child_outputs: child.aleo/inner_trash: outputs: - - '{"type":"public","id":"4289453696142715249689402741912245561443469314811952643858392482783244522724field","value":"0u8"}' - - '{"type":"public","id":"5996339838455228384518335132774934196611594954755346395054038050343103354395field","value":"1u8"}' - - '{"type":"public","id":"3358647378048771912605830105370148199260356999287873395305434987100537947367field","value":"2u8"}' - - '{"type":"public","id":"3561185473825389412729325762100699648338422087874903701388058185885064674548field","value":"3u8"}' - - '{"type":"public","id":"3989107665595226930217005016659525438354095241690887025362623017829393909086field","value":"4u8"}' - - '{"type":"public","id":"1015958412091382053251797862910077594839566070151006847448912156512885168244field","value":"5u8"}' - - '{"type":"public","id":"2567889317557457967764422538212118733579546499228855090594253956813932972072field","value":"6u8"}' - - '{"type":"public","id":"5738966943078846331986975383478175535362176248367077523225131270678347419252field","value":"7u8"}' - - '{"type":"public","id":"5051374977750131995628573872876580336294676313900512549961840473043598462489field","value":"8u8"}' - - '{"type":"public","id":"6246052362829258748286392424282967814827467657158490339715346793563788475395field","value":"9u8"}' - - '{"type":"public","id":"3137956905390822430675060441214691829333807921428930041891214885081618350759field","value":"10u8"}' - - '{"type":"public","id":"3954165324357671689980777474755501745352061261539083140319447666173245113194field","value":"11u8"}' - - '{"type":"public","id":"824411961835421718086912148073611074555830482874933344066928839715818180866field","value":"12u8"}' - - '{"type":"public","id":"3956987026475417071721267209248312177299219007429340821858712542495766818823field","value":"13u8"}' - - '{"type":"public","id":"2709313053745536114661259705416457664187223268321348433098736978752378149531field","value":"14u8"}' - - '{"type":"public","id":"6195248787047047065906932549716645015613025005664328197873983801878539808717field","value":"15u8"}' + - '{"type":"public","id":"5904883560300066031961888185189024338105163106003115127107355735397565233528field","value":"0u8"}' + - '{"type":"public","id":"3346629042065382701229893557344247189765599789097218570622975043609670798803field","value":"1u8"}' + - '{"type":"public","id":"4114234764478642651067432258613060895246418822635359350223568880016900828568field","value":"2u8"}' + - '{"type":"public","id":"791622446349226962179035220266689816431702156005686036773793811267759407217field","value":"3u8"}' + - '{"type":"public","id":"5861572462574962129911421840478714197449959818033666853831901127764956991974field","value":"4u8"}' + - '{"type":"public","id":"8295750733030242931291044435301453040050673845774859044070421871333808089231field","value":"5u8"}' + - '{"type":"public","id":"7955491755960271872467489555522237713927603213194488061987008083541383124742field","value":"6u8"}' + - '{"type":"public","id":"3352141292834455276753576005850851253061340486572425616164757702636471923178field","value":"7u8"}' + - '{"type":"public","id":"1454778745521830463882613773299218996297033423719881562973503668404270532584field","value":"8u8"}' + - '{"type":"public","id":"7214833348890557492438630005734195060401225319633334274543131178468025949410field","value":"9u8"}' + - '{"type":"public","id":"8070255258837127839579827105984137383669983211953015519516297263152741166622field","value":"10u8"}' + - '{"type":"public","id":"6658033481790040965433203990044877190888249483767740626424900263358580479885field","value":"11u8"}' + - '{"type":"public","id":"4634805450592919107424233434549539397856300586736332530027446614793085861610field","value":"12u8"}' + - '{"type":"public","id":"6465237487036414684746876776225050063026228756956149581569485610341137167883field","value":"13u8"}' + - '{"type":"public","id":"539780083557878421637523477938110313145014901324462713310417688577608340204field","value":"14u8"}' + - '{"type":"public","id":"3032526681684647445570962976764436225697368058525256456212480567401674887679field","value":"15u8"}' credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4993318844385279622659406372029663957024103433727459966940237716301579651158field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 7558u64\n ]\n}"}' + - '{"type":"future","id":"4334081886835801940971123206469013415987775305601578551344205766751953038292field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 7558u64\n ]\n}"}' - child_outputs: child.aleo/inner_trash_private: outputs: - - '{"type":"private","id":"1690417811643581808096073580895773872435783139189560207201450077859617190194field","value":"ciphertext1qyqqq6ssunw42mxe8rvpgu5ep0vagrn8dklju850us04wnghvh0njqsqvr2yw"}' - - '{"type":"private","id":"1886046153841688110779792443332379168760253439921378427387264032458090200722field","value":"ciphertext1qyqttnazmxdpq7jptzzzrur7gnydv4266yrrkg8hnd7qmvph3jgk5rsnqcuh8"}' - - '{"type":"private","id":"6945085598979721763398156380753241304545404123616624832451856372265095265471field","value":"ciphertext1qyq9l5ru4w25cegepncrwp200d40gug4sx204nhff5l2874zhplmzrqrhz2p4"}' - - '{"type":"private","id":"4142368517252176157373208821260613486695598769131006201465716808814519857801field","value":"ciphertext1qyqt2nvvunh6eyr3uyzfpx0nlcc724snpv0yenhr0epg6nxn9uf9yrqe483na"}' - - '{"type":"private","id":"1120928326819667499163846513166443389126716487911614317777817493947758499240field","value":"ciphertext1qyqvez6t833qwtrekh95qd0p9ur5ze7zfcj586gj45e5tgrcdck3crc7tx99u"}' - - '{"type":"private","id":"6520628852176590483742399620632204000766376375298286587002994790769934792244field","value":"ciphertext1qyqycec6g3lvzaudt02704zgfg989h0nlk29t30vm3ccs49l3qs2yzcvrgffu"}' - - '{"type":"private","id":"1653566059245057918600614758625811774818934631158115642909983653207058134332field","value":"ciphertext1qyqgxpqwlme4h4x5nlljrjc43ffdrrjks6tukqutnfrh5e5mgqjvwqgk4lzej"}' - - '{"type":"private","id":"3125530302804834593185552768712989898348727954206124549854468299555811589311field","value":"ciphertext1qyqwyv767yj0qtlpj3e8afcg2fq7dqq2rph0agla0x3a0k7x75g6czqjxkmnc"}' - - '{"type":"private","id":"6653724285397119534364272198358009303219371121472302648376197869755877142457field","value":"ciphertext1qyqx79grpqzmaa6n8m2r6s0stg9ljhrrqwtvaesn3vdmazermzn8jzg3rphqk"}' - - '{"type":"private","id":"4306156319852057171767064704924666509745421179658746592641215257474382652393field","value":"ciphertext1qyqqp655v4g4dv32lflxcpw2075vkm6jlmeewkvl0r8as9kpjg2xsqgjh94yw"}' - - '{"type":"private","id":"862763398396949844010720017565280792516718591614353786919911043964654671911field","value":"ciphertext1qyq0nu20c928tylcadunqkhf8n2wsggp42qad55n52vzzn3ax9at6rg0y2z7d"}' - - '{"type":"private","id":"6115537416632677547733070126318384273659824508082312339839289007774031750910field","value":"ciphertext1qyqd4wdfkm5mk3gqrcpp6cy8v43qqn70n68xnhtajeegnwt03xf07zqst7s60"}' - - '{"type":"private","id":"1288760742755161344468854268135477208800345648264783432462324547157974963800field","value":"ciphertext1qyqd87aklz0vgfyzn5wg8zwwf3xevyhkxsfaj0hugz5u94we55fycysqmnghx"}' - - '{"type":"private","id":"4094529815608050570605871705117213797215439814194985582364462185707725973687field","value":"ciphertext1qyq8d80slfgjf4l76k40a6cgtpvg0dy2qzl7d0r5cy59dvglv8tewrgeh7ts4"}' - - '{"type":"private","id":"2813602845252947372312080494391108546455078881365658135103980463173542847486field","value":"ciphertext1qyq9t35rxns4t03u9uts467dc450vefn2r37p4g02kww88p5lqr2zpqy9m8l7"}' - - '{"type":"private","id":"4797712783560200923986301701874758524183619526850656800063565109797126046631field","value":"ciphertext1qyqr3c39tq9t3mh54z39vhuqc832peuvatlvk28ygjsnl04u3njksrc8w2arw"}' + - '{"type":"private","id":"8032697161240434925553233719907517361847178466961641830077911060008789447796field","value":"ciphertext1qyq8v9hksgs9z5n96m4rruzc5f8m25vshdtkh3ckwvtm6gzzpe827qs08fqhe"}' + - '{"type":"private","id":"4738943134012647945226268068877749848128824814436419950647824307962508386185field","value":"ciphertext1qyqx9zgse0u8pmlawdjw4yhsvc4ncluft34zm4h84wa49qjjdhx9upq9sasx4"}' + - '{"type":"private","id":"2635959015923564697286885588132564920865099194175958790989055258375639564872field","value":"ciphertext1qyq009lapuqdrxltqk24dh7lxqgscqecraejsk5fsdem5c9cpn99jrqachjfa"}' + - '{"type":"private","id":"3529010997203471228727679630176343425830488200535857454220765551756642894632field","value":"ciphertext1qyqxxrkc6ky6qr2gahmh3fdx86sx3zd340kq93ypljef9lcyvj2qcrcj2675k"}' + - '{"type":"private","id":"6665382644452199312390682569471698177901671090003591136674026014712215787440field","value":"ciphertext1qyqppt0twxta22kpkxltpmrjjrcc9awhw3d7hygwmmhplc9ctw067pqyg7995"}' + - '{"type":"private","id":"2748689820460604776985274040581262596018845354312291444007836420267464829488field","value":"ciphertext1qyqdhvdkfjcpmgm8fk4uxdxwquf09a723pqp3pvpm8g6y0ljjkk5uqgq9kc0k"}' + - '{"type":"private","id":"1447383371184268978767488566872720862633397185953221781947866349229014585162field","value":"ciphertext1qyqpw5fvuhvxav9maerk5apz4vy7kwww7fasgx5gaemtuagukqh2yzgv8dg5w"}' + - '{"type":"private","id":"6382890757397621046591645619235381972287595253748882780507077881390244013680field","value":"ciphertext1qyqdu79dm6p7p2g9xysnlsgphtk9tar73c7vpfwd8udque73vpz3krqj97u8z"}' + - '{"type":"private","id":"4316066373532442556231595467086777858030760464465764712503159356773410694734field","value":"ciphertext1qyqpuhrw5jdds2pdfve74272zyzp8dmhts57cydw6gzn75d226r2kpc9fuckz"}' + - '{"type":"private","id":"3681815417015076292682872513235796496265803403295723825838200685480906340815field","value":"ciphertext1qyqwxufrfqkp9utdtrwu0nqrvtgnxqppnwga9fp5nv50hrrsqylpyyg546fam"}' + - '{"type":"private","id":"7239731187052707524355678559194102714131401220844799996252791084924098866449field","value":"ciphertext1qyqdha7v553khg0dlca7zqrav2y32qgxzpwexu3pk4lh00uah8dcuqq9l3svw"}' + - '{"type":"private","id":"6915938306677382285025362060620239528744510612859529413977898404015795221508field","value":"ciphertext1qyqfkm26ec8hs6vdpfcppkktwy76msdlwfg8euat9enwew4rcqtlkqqxnzg6r"}' + - '{"type":"private","id":"4660065728032854412381748795889622379272314801373174547945776152533312518220field","value":"ciphertext1qyqqg7rt8p74zyweshpsa7rwfadvz5wrx50heqxjucxs9nynuv58gpgvpeeka"}' + - '{"type":"private","id":"6730070339834180050058900303293497953058084638877897827327393536891839946788field","value":"ciphertext1qyqzsy5xlnj9av5jdy379lm89za69ecjzgtcn3hcc3z42r3h2rkdjqczey6p4"}' + - '{"type":"private","id":"3905598913166472693352955825211180882338391772928515609728936680972478660573field","value":"ciphertext1qyqfpea03nqftwz4rlr9tym4azz26985stv0z8xuu9gzwclyee7ygqqgjcp3k"}' + - '{"type":"private","id":"7215693369984008673223118085891715586218466956518910943400085339158665270425field","value":"ciphertext1qyqqmqcfmqrals8ajt564w6s3lau2dmxn09lgjdx8s3a2ugdnuqh6rgkw6ywd"}' credits.aleo/fee_public: outputs: - - '{"type":"future","id":"3920528155218069690017755593796450711436583446509070220539016754499888750597field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 11438u64\n ]\n}"}' + - '{"type":"future","id":"5813903071441008439034377261900917439453188395995082500140988193573411054956field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo10knkelvnd55fsaarm25wch7p9suf2tqlgwy5k4nxwms6d262xyfqm2tccr,\n 11438u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/mapping_operations.out b/synthesizer/tests/expectations/vm/execute_and_finalize/mapping_operations.out index cf0ee56ebb..0cec3ce62d 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/mapping_operations.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/mapping_operations.out @@ -4,44 +4,44 @@ outputs: execute: mapping_operations.aleo/empty_remove: outputs: - - '{"type":"future","id":"513976670430165590671975854207176640474722360754218511139582421307363127239field","value":"{\n program_id: mapping_operations.aleo,\n function_name: empty_remove,\n arguments: [\n 10u8\n ]\n}"}' + - '{"type":"future","id":"528917916050546693969666750679371761292623528001587956260557894521828605078field","value":"{\n program_id: mapping_operations.aleo,\n function_name: empty_remove,\n arguments: [\n 10u8\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: mapping_operations.aleo/insert_contains_remove: outputs: - - '{"type":"future","id":"4694759841672908832036638375867859148189802436433991047332612043424830909025field","value":"{\n program_id: mapping_operations.aleo,\n function_name: insert_contains_remove,\n arguments: [\n 0u8,\n 0u8\n ]\n}"}' + - '{"type":"future","id":"1878591124600593274844632247963154904652598107721964702057358386743661676785field","value":"{\n program_id: mapping_operations.aleo,\n function_name: insert_contains_remove,\n arguments: [\n 0u8,\n 0u8\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: mapping_operations.aleo/insert_contains_remove: outputs: - - '{"type":"future","id":"853544788270499381306658592151445821754762116076336414387883404121303374960field","value":"{\n program_id: mapping_operations.aleo,\n function_name: insert_contains_remove,\n arguments: [\n 0u8,\n 0u8\n ]\n}"}' + - '{"type":"future","id":"4691407840608871888428340061515213816979609712949925756564814279452199679886field","value":"{\n program_id: mapping_operations.aleo,\n function_name: insert_contains_remove,\n arguments: [\n 0u8,\n 0u8\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: mapping_operations.aleo/insert_contains_remove: outputs: - - '{"type":"future","id":"2512373776423473614600491202863965271515634672166785663979141185347250398174field","value":"{\n program_id: mapping_operations.aleo,\n function_name: insert_contains_remove,\n arguments: [\n 0u8,\n 1u8\n ]\n}"}' + - '{"type":"future","id":"1376837211363430068653312021356042012328839054002272482440237208239311509555field","value":"{\n program_id: mapping_operations.aleo,\n function_name: insert_contains_remove,\n arguments: [\n 0u8,\n 1u8\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4231981562230118887771148803779105717607845231959193592368421734187691782226field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 11277u64\n ]\n}"}' + - '{"type":"future","id":"765274853018791932597982874333036008771579256261317466733767488861755463898field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 11277u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"3819478822099171120366229999148101503444113586997605769708785149006145735527field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 53072u64\n ]\n}"}' + - '{"type":"future","id":"3702624994201751869571637613043506547844907566047297879155547309912750338743field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 53072u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4954497220272524572712674911495917535980779254032408121375814942204186632211field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 53072u64\n ]\n}"}' + - '{"type":"future","id":"2880164867086873472928666458045989541371543910520545574666913914061154311961field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 53072u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4374767356370294298106071783882769062590961601732098604265421591312847844881field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 53072u64\n ]\n}"}' + - '{"type":"future","id":"731712670790521506884462270784414260536578431010638989688535042138119508642field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1eakarna6a70pg9r0l9qal20faejwctgur5xt7lnc2a42wj2yssfqc89rk8,\n 53072u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/mint_and_split.out b/synthesizer/tests/expectations/vm/execute_and_finalize/mint_and_split.out index f791a869ad..00b684d244 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/mint_and_split.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/mint_and_split.out @@ -13,6 +13,6 @@ additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"2158022471677595094455860012302752744522806829113696165327761361044312438720field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo19e6k5ferx3k8a9k79xtj4uuaztt2jl4eza7k43pygsu977yazypqqwdmw6,\n 1446u64\n ]\n}"}' + - '{"type":"future","id":"8141932365338593422680862019466751805702849444320820698860516208562395953506field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo19e6k5ferx3k8a9k79xtj4uuaztt2jl4eza7k43pygsu977yazypqqwdmw6,\n 1446u64\n ]\n}"}' - {} - {} diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/program_callable.out b/synthesizer/tests/expectations/vm/execute_and_finalize/program_callable.out index 2281c70427..2d1c6b81e8 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/program_callable.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/program_callable.out @@ -5,10 +5,10 @@ outputs: execute: parent.aleo/foo: outputs: - - '{"type":"public","id":"2829372819390311696617873264162840896896355516010956180339946389772514775851field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' - - '{"type":"public","id":"1736075082696400606624473443797902938087287553141844508580140047297945071102field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' - - '{"type":"public","id":"7619233453435555778275297717545549202007972760925283159360438287135601699719field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' - - '{"type":"public","id":"2597622858524047689013532072932839576642557752380297062291865581619628741782field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"3132791686827287921440743324738703114146701102235145323661431442511856217971field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' + - '{"type":"public","id":"1169777204608013233991632187841309149325186451415097502721101984905963139305field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"1665319193117753448377121751627813108743655828484762770917631655878172393186field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"7758205965922928181208860399725493314521642846958858098822310042398374724396field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' speculate: the execution was accepted add_next_block: succeeded. additional: @@ -16,8 +16,8 @@ additional: - child_outputs: child.aleo/foo: outputs: - - '{"type":"public","id":"1555680711885329781325907130562266430447024930714573248890624102518741752917field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' - - '{"type":"public","id":"1098600096063596467886239395047240422541419832572815880494064602469155799505field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"2993170113733308844367597166852726630975295024179214931455119604247188877620field","value":"aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy"}' + - '{"type":"public","id":"1950496274064567059462280897914917860554722224455576030212114387721626639734field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' credits.aleo/fee_public: outputs: - - '{"type":"future","id":"501793283007282228322391938555677583342117982886938779668675863727551099142field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 2187u64\n ]\n}"}' + - '{"type":"future","id":"2599746364993747569854355360180642623041829224356671742496735219392179674498field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 2187u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/public_wallet.out b/synthesizer/tests/expectations/vm/execute_and_finalize/public_wallet.out index 97dfd95336..5a64cda820 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/public_wallet.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/public_wallet.out @@ -4,14 +4,14 @@ outputs: execute: public_wallet.aleo/init: outputs: - - '{"type":"future","id":"4464942226841699051231230836770437274733784749720398875079497729457972358531field","value":"{\n program_id: public_wallet.aleo,\n function_name: init,\n arguments: [\n {\n program_id: token.aleo,\n function_name: mint_public,\n arguments: [\n aleo1sry3pke49ykrf0aeshf889tr98r4c86p5f4ms766795ssdwfdyqq9jdg0j,\n 10u64\n ]\n }\n \n ]\n}"}' + - '{"type":"future","id":"3857172901441947534526418517380975227797871553595911987239461419522452545082field","value":"{\n program_id: public_wallet.aleo,\n function_name: init,\n arguments: [\n {\n program_id: token.aleo,\n function_name: mint_public,\n arguments: [\n aleo1sry3pke49ykrf0aeshf889tr98r4c86p5f4ms766795ssdwfdyqq9jdg0j,\n 10u64\n ]\n }\n \n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: token.aleo/mint_public: outputs: - - '{"type":"future","id":"6870476253411913047431672168259118946802015453568356666196082705096404310887field","value":"{\n program_id: token.aleo,\n function_name: mint_public,\n arguments: [\n aleo1sry3pke49ykrf0aeshf889tr98r4c86p5f4ms766795ssdwfdyqq9jdg0j,\n 10u64\n ]\n}"}' + - '{"type":"future","id":"1631423278608052853768107395089521617081238671575890493962924098384161856776field","value":"{\n program_id: token.aleo,\n function_name: mint_public,\n arguments: [\n aleo1sry3pke49ykrf0aeshf889tr98r4c86p5f4ms766795ssdwfdyqq9jdg0j,\n 10u64\n ]\n}"}' credits.aleo/fee_public: outputs: - - '{"type":"future","id":"8242741303045788366029769877408013430285170870359415275077024518285491239453field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1d3e2je2m2hsxwdsvntvf4jnnlj459ywfry6ch2qwrpy6l6r6yvpq8e88h5,\n 27585u64\n ]\n}"}' + - '{"type":"future","id":"7334131816336578548207468749349798727140016102586366303966330861449690845886field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1d3e2je2m2hsxwdsvntvf4jnnlj459ywfry6ch2qwrpy6l6r6yvpq8e88h5,\n 27585u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/read_external_mapping.out b/synthesizer/tests/expectations/vm/execute_and_finalize/read_external_mapping.out index 51f9402e04..0844e497c6 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/read_external_mapping.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/read_external_mapping.out @@ -5,7 +5,7 @@ outputs: relay.aleo/send: outputs: - '{"type":"record","id":"5505341694097720023583674648027312667621444458172921945164834002648638744768field","checksum":"4170712463954366904268628656227022271867279479485549214633981747772705648157field","value":"record1qyqsp358e054av498aavwel28wr36tg0ay27k4fc539ffmwz2nddl8gqqyzxgct5vy3sqqspqpfgwnp3rnwprhd2q3h8gmxcnldlczrvszade4vzxlu7dmfeg6j3rd8mwuzysqtgl6603ey2zzry8hjwmn3pt3twclpkkvssc4l4jzsvd6lxar"}' - - '{"type":"future","id":"5442196731199501033516997315536802286771381654648404072656864347298151743003field","value":"{\n program_id: relay.aleo,\n function_name: send,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' + - '{"type":"future","id":"5717025369252791268307518245044265589645500853607154349985983366013693165029field","value":"{\n program_id: relay.aleo,\n function_name: send,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' speculate: the execution was rejected add_next_block: succeeded. - verified: true @@ -13,14 +13,14 @@ outputs: relay.aleo/send_without_check: outputs: - '{"type":"record","id":"4755207731349921544198839760105069860415948248486655350742993041864954064196field","checksum":"7848435433502532569425287419063381736913355859517668180377091558079541996646field","value":"record1qyqsp83ncqrtrev57v03h3j8qcysfgef256zh7pmh7zgj83h6g7tfkq0qyzxgct5vy3sqqspqzx4ww05zz3grf6hxgr46csu2vmzr2lgq0f48kxp4j383l68ufqsq45f8wqk6jxfnkm6v92cq48xea0tfrg0fwwr249m95t4eka6jkgv0c5y7k"}' - - '{"type":"future","id":"7096105927658574358527187665040993539615241837502198163087038919436093048144field","value":"{\n program_id: relay.aleo,\n function_name: send_without_check,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' + - '{"type":"future","id":"7550940621112069147305499283447693470949248949646948758584545929055098614021field","value":"{\n program_id: relay.aleo,\n function_name: send_without_check,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: registry.aleo/register: outputs: - - '{"type":"future","id":"5446972737672342654865490167952496634158426704624044659644067337703357547983field","value":"{\n program_id: registry.aleo,\n function_name: register,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' + - '{"type":"future","id":"420928543522275050479077069598359906893359132913160778313607215088435256404field","value":"{\n program_id: registry.aleo,\n function_name: register,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true @@ -28,14 +28,14 @@ outputs: relay.aleo/send: outputs: - '{"type":"record","id":"2277384653342632398532359071690090462344215994043547853708800775056671259572field","checksum":"3071210942562837171924171313096615835242397071199450951002063969440885822680field","value":"record1qyqspfwaru0f2lj0s2k6p9jfmmkzyvkzl5qpagt00edyuf9qn3gnu5g9qyzxgct5vy3sqqspqrncgctd3wfmz2ggx0v7l5cggxxad49wcmtlyrjnk8fqulmkg3h3rleuqh8nmwn5d9z8cpf6z75sy880xenua6hu9wk6ptzwh9vnzps3l7743a"}' - - '{"type":"future","id":"4556110991549826207824540984103632227024449543743135915491677376919472371272field","value":"{\n program_id: relay.aleo,\n function_name: send,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' + - '{"type":"future","id":"7335072283454266955486193272021538348385359506102454702232503952941871822416field","value":"{\n program_id: relay.aleo,\n function_name: send,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: registry.aleo/unregister: outputs: - - '{"type":"future","id":"3937468794217695767514352020825733704009053357618910412289449201022528183129field","value":"{\n program_id: registry.aleo,\n function_name: unregister,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' + - '{"type":"future","id":"679464137653274742839187887301618622489786113106422850487639713737535385053field","value":"{\n program_id: registry.aleo,\n function_name: unregister,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true @@ -43,31 +43,31 @@ outputs: relay.aleo/send: outputs: - '{"type":"record","id":"6497977440830787207175874226764101265608813002804421333613230199582364410758field","checksum":"319323911748946858530605909565888788506340329996151513367076865761846915611field","value":"record1qyqsqnajqear5neee3l8fykp4vcq35sgwreyz7hz3png3cn2yyljdscfqyzxgct5vy3sqqspqzu6lezptk9xjpx35xdrv5tztz0v9qs9xx803pyqury2j47x2d5seymhf3xa2wefz7mkas7r7m3uf4kte7fdwm00ral53q2mhclx95qte8mpvc"}' - - '{"type":"future","id":"3229366919318219679638161067381792227991045093986357075456487847991962063680field","value":"{\n program_id: relay.aleo,\n function_name: send,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' + - '{"type":"future","id":"884722454089253418562221490807303959161101695210458740892906535295075161672field","value":"{\n program_id: relay.aleo,\n function_name: send,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm\n ]\n}"}' speculate: the execution was rejected add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"2460846645005462366786666390638662805054402091600049454074156831399214194828field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12331u64\n ]\n}"}' + - '{"type":"future","id":"7648175304675096026780640150249050430126313932796261601585627346676503665056field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12331u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"6275256556950672117831015896650227423786495892079094886222239210235424203607field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12359u64\n ]\n}"}' + - '{"type":"future","id":"2705483676500556524709771070827454100315478149315997882559815259752103335543field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12359u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"8372199321635126203021619457748641319234355407813689190122379673577134950885field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm,\n 14542u64\n ]\n}"}' + - '{"type":"future","id":"1411848222023701190996666942616875099282931632258684196395264413190693640893field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm,\n 14542u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"610670209921538255900619170127761975836076634836989613464070279109494487943field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12331u64\n ]\n}"}' + - '{"type":"future","id":"1868190452431317368813291334581792128122726398918592355342406544035130142983field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12331u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"7567328850021607310717103237149585492311011209064307935458393135932696315699field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm,\n 14546u64\n ]\n}"}' + - '{"type":"future","id":"4477898748688807061769744441075637584405202918505613760790829764406622025408field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1f6eg623knp66cwx0926w3plgdgzcmfpgyrzgnjz90mucgs3z7s9qls4upm,\n 14546u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"1006453709257039404896819728350834886286831571018854714236513706501168842517field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12331u64\n ]\n}"}' + - '{"type":"future","id":"1737368985169748291589889371295386187060392770099481900284782778606372269731field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1xe2fps8f9xpdas2q0fqy22uraenk84tvvzetrsyxgnwy6445h59s6wv78x,\n 12331u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/test_branch.out b/synthesizer/tests/expectations/vm/execute_and_finalize/test_branch.out index a92ddf6b41..31eb448b63 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/test_branch.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/test_branch.out @@ -4,33 +4,33 @@ outputs: execute: test_branch.aleo/run_test: outputs: - - '{"type":"future","id":"3591346548818546005072841126926165574136175856345199266519780799284817280600field","value":"{\n program_id: test_branch.aleo,\n function_name: run_test,\n arguments: [\n 1u8,\n 1u8\n ]\n}"}' + - '{"type":"future","id":"1689952277818654979661096150540017106084479583953159794693528941821121629614field","value":"{\n program_id: test_branch.aleo,\n function_name: run_test,\n arguments: [\n 1u8,\n 1u8\n ]\n}"}' speculate: the execution was rejected add_next_block: succeeded. - verified: true execute: test_branch.aleo/run_test: outputs: - - '{"type":"future","id":"7814101611196855827915898756837844994575969450427591648084996663195531996561field","value":"{\n program_id: test_branch.aleo,\n function_name: run_test,\n arguments: [\n 0u8,\n 1u8\n ]\n}"}' + - '{"type":"future","id":"114586048401498509272352737885171154770908861875852471025917693936087877358field","value":"{\n program_id: test_branch.aleo,\n function_name: run_test,\n arguments: [\n 0u8,\n 1u8\n ]\n}"}' speculate: the execution was rejected add_next_block: succeeded. - verified: true execute: test_branch.aleo/run_test: outputs: - - '{"type":"future","id":"2097297249273458526117790667287124784692256429234303674845630058419196175092field","value":"{\n program_id: test_branch.aleo,\n function_name: run_test,\n arguments: [\n 0u8,\n 0u8\n ]\n}"}' + - '{"type":"future","id":"7964420694372645950494297905013826833581925240887409965219568939973404172743field","value":"{\n program_id: test_branch.aleo,\n function_name: run_test,\n arguments: [\n 0u8,\n 0u8\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"7173480694908809256108540320075206508452674100243861581665566642817871381991field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1x3r205zqql5ywy0cqqt74k0r0htuusn0d037ycxe8ftt9ep8hyzsmqz4dh,\n 3500u64\n ]\n}"}' + - '{"type":"future","id":"3742811441854740995256946025007048836334179975183225882601152681493528561258field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1x3r205zqql5ywy0cqqt74k0r0htuusn0d037ycxe8ftt9ep8hyzsmqz4dh,\n 3500u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"8282914561152876827019335440647738942468939906336223802339463037044326143146field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1x3r205zqql5ywy0cqqt74k0r0htuusn0d037ycxe8ftt9ep8hyzsmqz4dh,\n 3500u64\n ]\n}"}' + - '{"type":"future","id":"1647838761417122485573508821828299068832334922165753903144172080083427769077field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1x3r205zqql5ywy0cqqt74k0r0htuusn0d037ycxe8ftt9ep8hyzsmqz4dh,\n 3500u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"5334579863811891704545979925237596250682151556306514860044024145517585546947field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1x3r205zqql5ywy0cqqt74k0r0htuusn0d037ycxe8ftt9ep8hyzsmqz4dh,\n 3500u64\n ]\n}"}' + - '{"type":"future","id":"4675644920916319507815616171226090209472553004231457948189653255466652728990field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1x3r205zqql5ywy0cqqt74k0r0htuusn0d037ycxe8ftt9ep8hyzsmqz4dh,\n 3500u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/test_rand.out b/synthesizer/tests/expectations/vm/execute_and_finalize/test_rand.out index 511c0af4b1..eb372e7191 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/test_rand.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/test_rand.out @@ -4,44 +4,44 @@ outputs: execute: test_rand.aleo/rand_chacha_with_literals: outputs: - - '{"type":"future","id":"1765454680055977470133663998792825807893959339496402455206491781821113014267field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_with_literals,\n arguments: [\n 0scalar,\n 0group,\n 0u8,\n 2i16,\n 4u32,\n 7i64,\n 8u128,\n 10field\n ]\n}"}' + - '{"type":"future","id":"5851936379967939919363011317470385211925863001600978824282354802243328225531field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_with_literals,\n arguments: [\n 0scalar,\n 0group,\n 0u8,\n 2i16,\n 4u32,\n 7i64,\n 8u128,\n 10field\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: test_rand.aleo/rand_chacha_with_struct: outputs: - - '{"type":"future","id":"1342337531921565545247998733341343470047235865406486394533997372459329935477field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_with_struct,\n arguments: [\n {\n first: 0field,\n second: 0field,\n third: 0field,\n fourth: 0field,\n fifth: 0field\n}\n ]\n}"}' + - '{"type":"future","id":"3255218993644156872910307787306139629497029688077777497819797270383136364567field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_with_struct,\n arguments: [\n {\n first: 0field,\n second: 0field,\n third: 0field,\n fourth: 0field,\n fifth: 0field\n}\n ]\n}"}' speculate: the execution was accepted add_next_block: succeeded. - verified: true execute: test_rand.aleo/rand_chacha_check: outputs: - - '{"type":"future","id":"488590592441422127997725386233571306457829570948543232762424611162021835080field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_check,\n arguments: [\n 0field,\n false\n ]\n}"}' - speculate: the execution was accepted + - '{"type":"future","id":"5655280628674362392666464396476127281186411758739892961608160465159658100070field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_check,\n arguments: [\n 0field,\n false\n ]\n}"}' + speculate: the execution was rejected add_next_block: succeeded. - verified: true execute: test_rand.aleo/rand_chacha_check: outputs: - - '{"type":"future","id":"884323248557348741020456011434839803868309861690594536593949575748229817915field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_check,\n arguments: [\n 1field,\n true\n ]\n}"}' - speculate: the execution was rejected + - '{"type":"future","id":"4722955375376605065432422068493514420613444220803270858286854080465504837613field","value":"{\n program_id: test_rand.aleo,\n function_name: rand_chacha_check,\n arguments: [\n 1field,\n true\n ]\n}"}' + speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"688232565550074479957237991079250189610291259825289272252652272917330731838field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 601838u64\n ]\n}"}' + - '{"type":"future","id":"1076527458106564529544533915951069356470950455466294891378581697395577060805field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 601838u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4312563321279759209886042118500602385599041356791262942076841476719411110110field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 26711u64\n ]\n}"}' + - '{"type":"future","id":"934509585235432931388992469492403334986771615715266644075656706577708720438field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 26711u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"1282129350700700594940680024596897867110148414308708700842921386046440366011field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 26876u64\n ]\n}"}' + - '{"type":"future","id":"767895526948156364168904176257724171019709225591085577083318751394796758059field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 26876u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"2838401481340464124610411329302176081664394080829994051209644145406827373864field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 26876u64\n ]\n}"}' + - '{"type":"future","id":"1572717739089618491430428262128578066213813186803348335138976241594053199721field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1uchf7kruskpp8thlnfeya9qeklcjss27j6rtu74zz7ch559neqystgslsp,\n 26876u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/timelock.out b/synthesizer/tests/expectations/vm/execute_and_finalize/timelock.out index bddb3741aa..6d3296cf33 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/timelock.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/timelock.out @@ -4,22 +4,22 @@ outputs: execute: timelock.aleo/lock: outputs: - - '{"type":"future","id":"7519916640716130495448528557347618353867911739810990318131281151848970103498field","value":"{\n program_id: timelock.aleo,\n function_name: lock,\n arguments: []\n}"}' + - '{"type":"future","id":"5672658027601092821150632972624132536122029882218363630138745076773379462255field","value":"{\n program_id: timelock.aleo,\n function_name: lock,\n arguments: []\n}"}' speculate: the execution was rejected add_next_block: succeeded. - verified: true execute: timelock.aleo/lock: outputs: - - '{"type":"future","id":"1692329568288717165704659211644970574488153730247332824408199047029733666363field","value":"{\n program_id: timelock.aleo,\n function_name: lock,\n arguments: []\n}"}' + - '{"type":"future","id":"1309583359781052742370984261699469991508636898906015087862071776472698441892field","value":"{\n program_id: timelock.aleo,\n function_name: lock,\n arguments: []\n}"}' speculate: the execution was rejected add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"945360682200179475934660913543316288826823363735980525242738043528572749037field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo12tksdptp7hvxly8tkm3um08fvf53qpehsgdgqfvy9pe3sewcq5ysjg5myy,\n 2196u64\n ]\n}"}' + - '{"type":"future","id":"651337484339032269160121054560086838303223967284342562550571699484082802926field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo12tksdptp7hvxly8tkm3um08fvf53qpehsgdgqfvy9pe3sewcq5ysjg5myy,\n 2196u64\n ]\n}"}' - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4407865525570721713881622682558869732652022922248324986891224724282763545029field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo12tksdptp7hvxly8tkm3um08fvf53qpehsgdgqfvy9pe3sewcq5ysjg5myy,\n 2196u64\n ]\n}"}' + - '{"type":"future","id":"7443982931975690101989710049485828676544650952612755258270206826459548145627field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo12tksdptp7hvxly8tkm3um08fvf53qpehsgdgqfvy9pe3sewcq5ysjg5myy,\n 2196u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/unused_position.out b/synthesizer/tests/expectations/vm/execute_and_finalize/unused_position.out index 3c78b6e8a7..7acc9e1b28 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/unused_position.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/unused_position.out @@ -4,11 +4,11 @@ outputs: execute: unused_position.aleo/foo: outputs: - - '{"type":"future","id":"5049235690692170805152663732952500738215296477247651613244805919801146018013field","value":"{\n program_id: unused_position.aleo,\n function_name: foo,\n arguments: []\n}"}' + - '{"type":"future","id":"5408452314004637538444583211608650550215632668705730253710414606897907094286field","value":"{\n program_id: unused_position.aleo,\n function_name: foo,\n arguments: []\n}"}' speculate: the execution was accepted add_next_block: succeeded. additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4500648057971642536326023581723419344508470174070904810378001320229962188845field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo12tksdptp7hvxly8tkm3um08fvf53qpehsgdgqfvy9pe3sewcq5ysjg5myy,\n 1308u64\n ]\n}"}' + - '{"type":"future","id":"1846547935819125611375261116748293171392625542993437934741572770467926190067field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo12tksdptp7hvxly8tkm3um08fvf53qpehsgdgqfvy9pe3sewcq5ysjg5myy,\n 1308u64\n ]\n}"}' diff --git a/synthesizer/tests/expectations/vm/execute_and_finalize/user_callable.out b/synthesizer/tests/expectations/vm/execute_and_finalize/user_callable.out index 6bbde6d251..72c6cdb93e 100644 --- a/synthesizer/tests/expectations/vm/execute_and_finalize/user_callable.out +++ b/synthesizer/tests/expectations/vm/execute_and_finalize/user_callable.out @@ -4,8 +4,8 @@ outputs: execute: child.aleo/foo: outputs: - - '{"type":"public","id":"8257993261519343122023101166480151323931323787055034156941189634399210202459field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' - - '{"type":"public","id":"188190518969019844021095872841035661635298121101628545721182533596213107162field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"5080102022926418909778330219071921101316828719441748927127931330249058015974field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' + - '{"type":"public","id":"5521854961454308608590219862110836142563484399396636760251296039833599837132field","value":"aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx"}' speculate: the execution was accepted add_next_block: succeeded. - execute: 'Failed to evaluate instruction (call child.aleo/foo into r0 r1;): Failed to evaluate instruction (assert.eq self.caller self.signer ;): ''assert.eq'' failed: ''aleo16w8t56s7v6ud7vu33fr388ph0dq0c7yhp597cyjt88rr3nultcyqcyk9yy'' is not equal to ''aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx'' (should be equal)' @@ -13,5 +13,5 @@ additional: - child_outputs: credits.aleo/fee_public: outputs: - - '{"type":"future","id":"4193852777105201569735062214533514773129433748132976330865503683138607715780field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 1276u64\n ]\n}"}' + - '{"type":"future","id":"3347872470791009142460537022787342626917524637524821339588032366241763021507field","value":"{\n program_id: credits.aleo,\n function_name: fee_public,\n arguments: [\n aleo1qr2ha4pfs5l28aze88yn6fhleeythklkczrule2v838uwj65n5gqxt9djx,\n 1276u64\n ]\n}"}' - {}