From 5b30ccd0e48dd51216a738653ea3424b5ffe398d Mon Sep 17 00:00:00 2001 From: ljedrz Date: Thu, 9 May 2024 12:09:37 +0200 Subject: [PATCH 01/32] feat: introduce cfg_sorted_by Signed-off-by: ljedrz --- utilities/src/parallel.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/utilities/src/parallel.rs b/utilities/src/parallel.rs index be2520f7ef..1a73bfce03 100644 --- a/utilities/src/parallel.rs +++ b/utilities/src/parallel.rs @@ -292,3 +292,19 @@ macro_rules! cfg_sort_by_cached_key { $self.par_sort_by_cached_key($closure); }}; } + +/// Returns a sorted, by-value iterator for the given IndexMap/IndexSet +#[macro_export] +macro_rules! cfg_sorted_by { + ($self: expr, $closure: expr) => {{ + #[cfg(feature = "serial")] + { + $self.sorted_by($closure) + } + + #[cfg(not(feature = "serial"))] + { + $self.par_sorted_by($closure) + } + }}; +} From 05c02733e71377d8881168ea2eec1c62363ec066 Mon Sep 17 00:00:00 2001 From: Victor Sint Nicolaas Date: Mon, 13 May 2024 13:06:00 +0200 Subject: [PATCH 02/32] Do not abort executions early in prepare_for_speculate Executions require full verification to avoid malleability attack. See: https://github.com/AleoHQ/snarkVM/issues/2451 --- synthesizer/src/vm/finalize.rs | 47 +++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/synthesizer/src/vm/finalize.rs b/synthesizer/src/vm/finalize.rs index a16dbc4af8..2d0da55543 100644 --- a/synthesizer/src/vm/finalize.rs +++ b/synthesizer/src/vm/finalize.rs @@ -835,9 +835,11 @@ impl> VM { transactions: &[&'a Transaction], rng: &mut R, ) -> Result<(Vec<&'a Transaction>, Vec<(&'a Transaction, String)>)> { - // Construct the list of transactions that need to verified. - let mut transactions_to_verify = Vec::with_capacity(transactions.len()); - // Construct the list of valid and invalid transactions. + // Construct the list of executions that need to verified. + let mut executions = Vec::with_capacity(transactions.len()); + // Construct the list of deployments that need to verified. + let mut deployments = Vec::with_capacity(transactions.len()); + // Construct the list of valid and aborted transactions. let mut valid_transactions = Vec::with_capacity(transactions.len()); let mut aborted_transactions = Vec::with_capacity(transactions.len()); @@ -852,10 +854,24 @@ impl> VM { // Initialize the list of deployment payers. let mut deployment_payers: IndexSet> = Default::default(); - // Abort the transactions that are have duplicates or are invalid. This will prevent the VM from performing - // verification on transactions that would have been aborted in `VM::atomic_speculate`. + // Abort fee transactions and invalid deployments. This will prevent the + // VM from performing expensive verification on invalid fees or + // deployments that would have been aborted in `VM::atomic_speculate`. for transaction in transactions.iter() { - // Determine if the transaction should be aborted. + // If the transaction is an Execution, we will fully verify it. + // Executions require full verification to avoid malleability attacks. + if transaction.is_execute() { + executions.push(*transaction); + continue; + } + + // Abort the transaction if it is a fee transaction. + if transaction.is_fee() { + aborted_transactions.push((*transaction, "Fee transactions are not allowed in speculate".to_string())); + continue; + } + + // If the transaction is a deployment, determine if it should be aborted. match self.should_abort_transaction( transaction, &transition_ids, @@ -881,15 +897,12 @@ impl> VM { fee.payer().map(|payer| deployment_payers.insert(payer)); } - // Add the transaction to the list of transactions to verify. - transactions_to_verify.push(transaction); + // Add the transaction to the list of deployments to verify. + deployments.push(*transaction); } }; } - // Separate the transactions into deploys and executions. - let (deployments, executions): (Vec<&Transaction>, Vec<&Transaction>) = - transactions_to_verify.into_iter().partition(|tx| tx.is_deploy()); // Chunk the deploys and executions into groups for parallel verification. let deployments_for_verification = deployments.chunks(Self::MAX_PARALLEL_DEPLOY_VERIFICATIONS); let executions_for_verification = executions.chunks(Self::MAX_PARALLEL_EXECUTE_VERIFICATIONS); @@ -898,16 +911,8 @@ impl> VM { for transactions in deployments_for_verification.chain(executions_for_verification) { let rngs = (0..transactions.len()).map(|_| StdRng::from_seed(rng.gen())).collect::>(); // Verify the transactions and collect the error message if there is one. - let (valid, invalid): (Vec<_>, Vec<_>) = + let (valid, aborted): (Vec<_>, Vec<_>) = cfg_into_iter!(transactions).zip(rngs).partition_map(|(transaction, mut rng)| { - // Abort the transaction if it is a fee transaction. - if transaction.is_fee() { - return Either::Right(( - *transaction, - "Fee transactions are not allowed in speculate".to_string(), - )); - } - // Verify the transaction. match self.check_transaction(transaction, None, &mut rng) { // If the transaction is valid, add it to the list of valid transactions. @@ -919,7 +924,7 @@ impl> VM { // Collect the valid and aborted transactions. valid_transactions.extend(valid); - aborted_transactions.extend(invalid); + aborted_transactions.extend(aborted); } // Sort the valid and aborted transactions based on their position in the original list. From 4ff52bad762572854fac6aae9ab11dea02997dd0 Mon Sep 17 00:00:00 2001 From: Victor Sint Nicolaas Date: Mon, 13 May 2024 22:54:02 +0200 Subject: [PATCH 03/32] Fix unit tests which test for duplicate tx contents --- ledger/src/tests.rs | 269 ++++++++++++++++++++++++++++++++------------ 1 file changed, 199 insertions(+), 70 deletions(-) diff --git a/ledger/src/tests.rs b/ledger/src/tests.rs index 1dd5e6eadd..288cde76ad 100644 --- a/ledger/src/tests.rs +++ b/ledger/src/tests.rs @@ -749,56 +749,67 @@ fn test_execute_duplicate_input_ids() { // Fetch the unspent records. let records = find_records(); - let record_1 = records[0].clone(); + let record_execution = records[0].clone(); + let record_deployment = records[1].clone(); - // Prepare a transfer that spends the record. + // Prepare a transfer that spends a record. let inputs = [ - Value::Record(record_1.clone()), + Value::Record(record_execution.clone()), Value::from_str(&format!("{address}")).unwrap(), Value::from_str("100u64").unwrap(), ]; - let transfer_1 = ledger - .vm - .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.into_iter(), None, 0, None, rng) - .unwrap(); - let transfer_1_id = transfer_1.id(); - // Prepare a transfer that attempts to spend the same record. - let inputs = [ - Value::Record(record_1.clone()), - Value::from_str(&format!("{address}")).unwrap(), - Value::from_str("1000u64").unwrap(), - ]; - let transfer_2 = ledger - .vm - .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.into_iter(), None, 0, None, rng) + let num_duplicate_deployments = 3; + let mut executions = Vec::with_capacity(num_duplicate_deployments + 1); + let mut execution_ids = Vec::with_capacity(num_duplicate_deployments + 1); + let mut deployments = Vec::with_capacity(num_duplicate_deployments); + let mut deployment_ids = Vec::with_capacity(num_duplicate_deployments); + + // Create Executions and Deployments, spending the same record. + for i in 0..num_duplicate_deployments { + // Execute. + let execution = ledger + .vm + .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.clone().iter(), None, 0, None, rng) + .unwrap(); + execution_ids.push(execution.id()); + executions.push(execution); + // Deploy. + let program_id = ProgramID::::from_str(&format!("dummy_program_{i}.aleo")).unwrap(); + let program = Program::::from_str(&format!( + " +program {program_id}; +function foo: + input r0 as u8.private; + async foo r0 into r1; + output r1 as {program_id}/foo.future; +finalize foo: + input r0 as u8.public; + add r0 r0 into r1;", + )) .unwrap(); - let transfer_2_id = transfer_2.id(); + let deployment = + ledger.vm.deploy(&private_key, &program, Some(record_deployment.clone()), 0, None, rng).unwrap(); + deployment_ids.push(deployment.id()); + deployments.push(deployment); + } - // Prepare a transfer that attempts to spend the same record in the fee. + // Adjust one more execution which spends the record as a fee. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("100u64").unwrap()]; - let transfer_3 = ledger + let execution = ledger .vm .execute( &private_key, ("credits.aleo", "transfer_public"), - inputs.into_iter(), - Some(record_1.clone()), + inputs.clone().iter(), + Some(record_execution), 0, None, rng, ) .unwrap(); - let transfer_3_id = transfer_3.id(); - - // Prepare a transfer that attempts to spend the same record for the subsequent block. - let inputs = - [Value::Record(record_1), Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; - let transfer_4 = ledger - .vm - .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.into_iter(), None, 0, None, rng) - .unwrap(); - let transfer_4_id = transfer_4.id(); + execution_ids.push(execution.id()); + executions.push(execution); // Create a block. let block = ledger @@ -806,7 +817,13 @@ fn test_execute_duplicate_input_ids() { &private_key, vec![], vec![], - vec![transfer_1, transfer_2, transfer_3], + vec![ + executions.pop().unwrap(), + executions.pop().unwrap(), + executions.pop().unwrap(), + deployments.pop().unwrap(), + deployments.pop().unwrap(), + ], rng, ) .unwrap(); @@ -818,27 +835,35 @@ fn test_execute_duplicate_input_ids() { ledger.advance_to_next_block(&block).unwrap(); // Enforce that the block transactions were correct. - assert_eq!(block.transactions().num_accepted(), 1); - assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_1_id]); - assert_eq!(block.aborted_transaction_ids(), &vec![transfer_2_id, transfer_3_id]); + assert_eq!(block.transactions().num_accepted(), 2); + assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&execution_ids[3], &deployment_ids[2]]); + assert_eq!(block.aborted_transaction_ids(), &vec![execution_ids[2], execution_ids[1], deployment_ids[1]]); - // Ensure that verification was not run on aborted transactions. + // Ensure that verification was not run on aborted deployments. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); - assert!(partially_verified_transaction.contains(&transfer_1_id)); - assert!(!partially_verified_transaction.contains(&transfer_2_id)); - assert!(!partially_verified_transaction.contains(&transfer_3_id)); + assert!(partially_verified_transaction.contains(&execution_ids[3])); + assert!(partially_verified_transaction.contains(&execution_ids[2])); + assert!(partially_verified_transaction.contains(&execution_ids[1])); + assert!(partially_verified_transaction.contains(&deployment_ids[2])); + assert!(!partially_verified_transaction.contains(&deployment_ids[1])); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; - let transfer_5 = ledger + let transfer = ledger .vm .execute(&private_key, ("credits.aleo", "transfer_public"), inputs.into_iter(), None, 0, None, rng) .unwrap(); - let transfer_5_id = transfer_5.id(); + let transfer_id = transfer.id(); // Create a block. let block = ledger - .prepare_advance_to_next_beacon_block(&private_key, vec![], vec![], vec![transfer_4, transfer_5], rng) + .prepare_advance_to_next_beacon_block( + &private_key, + vec![], + vec![], + vec![executions.pop().unwrap(), deployments.pop().unwrap(), transfer], + rng, + ) .unwrap(); // Check that the next block is valid. @@ -849,13 +874,14 @@ fn test_execute_duplicate_input_ids() { // Enforce that the block transactions were correct. assert_eq!(block.transactions().num_accepted(), 1); - assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_5_id]); - assert_eq!(block.aborted_transaction_ids(), &vec![transfer_4_id]); + assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_id]); + assert_eq!(block.aborted_transaction_ids(), &vec![execution_ids[0], deployment_ids[0]]); - // Ensure that verification was not run on aborted transactions. + // Ensure that verification was not run on transactions aborted in a previous block. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); - assert!(partially_verified_transaction.contains(&transfer_5_id)); - assert!(!partially_verified_transaction.contains(&transfer_4_id)); + assert!(partially_verified_transaction.contains(&transfer_id)); + assert!(!partially_verified_transaction.contains(&execution_ids[0])); + assert!(!partially_verified_transaction.contains(&deployment_ids[0])); } #[test] @@ -863,7 +889,8 @@ fn test_execute_duplicate_output_ids() { let rng = &mut TestRng::default(); // Initialize the test environment. - let crate::test_helpers::TestEnv { ledger, private_key, address, .. } = crate::test_helpers::sample_test_env(rng); + let crate::test_helpers::TestEnv { ledger, private_key, view_key, address, .. } = + crate::test_helpers::sample_test_env(rng); // Deploy a test program to the ledger. let program = Program::::from_str( @@ -896,8 +923,25 @@ function create_duplicate_record: // Add the block to the ledger. ledger.advance_to_next_block(&block).unwrap(); - // Create a transaction with different transition ids, but with a fixed output record (output ID). - let mut create_transaction_with_duplicate_output_id = |x: u64| -> Transaction { + // A helper function to find records. + let find_records = || { + let microcredits = Identifier::from_str("microcredits").unwrap(); + ledger + .find_records(&view_key, RecordsFilter::SlowUnspent(private_key)) + .unwrap() + .filter(|(_, record)| match record.data().get(µcredits) { + Some(Entry::Private(Plaintext::Literal(Literal::U64(amount), _))) => !amount.is_zero(), + _ => false, + }) + .collect::>() + }; + + // Fetch the unspent records. + let records = find_records(); + let record_1 = records[0].clone(); + + // Create an execution with different transition ids, but with a fixed output record (output ID). + let mut create_execution_with_duplicate_output_id = |x: u64| -> Transaction { // Use a fixed seed RNG. let fixed_rng = &mut TestRng::from_seed(1); @@ -934,16 +978,61 @@ function create_duplicate_record: Transaction::from_execution(execution, Some(fee)).unwrap() }; + // Create an deployment with different transition ids, but with a fixed output record (output ID). + let create_deployment_with_duplicate_output_id = |x: u64| -> Transaction { + // Use a fixed seed RNG. + let fixed_rng = &mut TestRng::from_seed(1); + + // Deploy a test program to the ledger. + let program = Program::::from_str(&format!( + " +program dummy_program_{x}.aleo; + +record dummy_program: + owner as address.private; + rand_var as u64.private; + +function create_duplicate_record: + input r0 as u64.private; + cast self.caller 1u64 into r1 as dummy_program.record; + output r1 as dummy_program.record;" + )) + .unwrap(); + + // Create a transaction with a fixed rng. + let transaction = ledger.vm.deploy(&private_key, &program, None, 0, None, fixed_rng).unwrap(); + + // Extract the deployment and owner. + let deployment = transaction.deployment().unwrap().clone(); + let owner = *transaction.owner().unwrap(); + + // Create a new fee for the execution. + let fee_authorization = ledger + .vm + .authorize_fee_private( + &private_key, + record_1.clone(), + *transaction.fee_amount().unwrap(), + 0, + deployment.to_deployment_id().unwrap(), + fixed_rng, + ) + .unwrap(); + let fee = ledger.vm.execute_fee_authorization(fee_authorization, None, fixed_rng).unwrap(); + + Transaction::from_deployment(owner, deployment, fee).unwrap() + }; + // Create the first transfer. - let transfer_1 = create_transaction_with_duplicate_output_id(1); + let transfer_1 = create_execution_with_duplicate_output_id(1); let transfer_1_id = transfer_1.id(); // Create a second transfer with the same output id. - let transfer_2 = create_transaction_with_duplicate_output_id(2); + let transfer_2 = create_execution_with_duplicate_output_id(2); let transfer_2_id = transfer_2.id(); // Create a third transfer with the same output id. - let transfer_3 = create_transaction_with_duplicate_output_id(3); + let transfer_3 = create_execution_with_duplicate_output_id(3); let transfer_3_id = transfer_3.id(); // Ensure that each transaction has a duplicate output id. @@ -953,9 +1042,34 @@ function create_duplicate_record: assert_eq!(tx_1_output_id, tx_2_output_id); assert_eq!(tx_1_output_id, tx_3_output_id); + // Create the first deployment. + let deployment_1 = create_deployment_with_duplicate_output_id(1); + let deployment_1_id = deployment_1.id(); + + // Create a second deployment with the same output id. + let deployment_2 = create_deployment_with_duplicate_output_id(2); + let deployment_2_id = deployment_2.id(); + + // Create a third deployment with the same output id. + let deployment_3 = create_deployment_with_duplicate_output_id(3); + let deployment_3_id = deployment_3.id(); + + // Ensure that each transaction has a duplicate output id. + let deployment_1_output_id = deployment_1.output_ids().next().unwrap(); + let deployment_2_output_id = deployment_2.output_ids().next().unwrap(); + let deployment_3_output_id = deployment_3.output_ids().next().unwrap(); + assert_eq!(deployment_1_output_id, deployment_2_output_id); + assert_eq!(deployment_1_output_id, deployment_3_output_id); + // Create a block. let block = ledger - .prepare_advance_to_next_beacon_block(&private_key, vec![], vec![], vec![transfer_1, transfer_2], rng) + .prepare_advance_to_next_beacon_block( + &private_key, + vec![], + vec![], + vec![transfer_1, transfer_2, deployment_1, deployment_2], + rng, + ) .unwrap(); // Check that the next block is valid. @@ -965,14 +1079,16 @@ function create_duplicate_record: ledger.advance_to_next_block(&block).unwrap(); // Enforce that the block transactions were correct. - assert_eq!(block.transactions().num_accepted(), 1); - assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_1_id]); - assert_eq!(block.aborted_transaction_ids(), &vec![transfer_2_id]); + assert_eq!(block.transactions().num_accepted(), 2); + assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_1_id, &deployment_1_id]); + assert_eq!(block.aborted_transaction_ids(), &vec![transfer_2_id, deployment_2_id]); - // Ensure that verification was not run on aborted transactions. + // Ensure that verification was not run on aborted deployments. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_1_id)); - assert!(!partially_verified_transaction.contains(&transfer_2_id)); + assert!(partially_verified_transaction.contains(&transfer_2_id)); + assert!(partially_verified_transaction.contains(&deployment_1_id)); + assert!(!partially_verified_transaction.contains(&deployment_2_id)); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; @@ -984,7 +1100,13 @@ function create_duplicate_record: // Create a block. let block = ledger - .prepare_advance_to_next_beacon_block(&private_key, vec![], vec![], vec![transfer_3, transfer_4], rng) + .prepare_advance_to_next_beacon_block( + &private_key, + vec![], + vec![], + vec![transfer_3, transfer_4, deployment_3], + rng, + ) .unwrap(); // Check that the next block is valid. @@ -996,12 +1118,13 @@ function create_duplicate_record: // Enforce that the block transactions were correct. assert_eq!(block.transactions().num_accepted(), 1); assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_4_id]); - assert_eq!(block.aborted_transaction_ids(), &vec![transfer_3_id]); + assert_eq!(block.aborted_transaction_ids(), &vec![transfer_3_id, deployment_3_id]); - // Ensure that verification was not run on aborted transactions. + // Ensure that verification was not run on transactions aborted in a previous block. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_4_id)); assert!(!partially_verified_transaction.contains(&transfer_3_id)); + assert!(!partially_verified_transaction.contains(&deployment_3_id)); } #[test] @@ -1037,6 +1160,9 @@ function empty_function: ledger.advance_to_next_block(&block).unwrap(); // Create a transaction with different transaction IDs, but with a fixed transition ID. + // NOTE: there's no use creating deployments with duplicate (fee) transition ids, + // as this is only possible if they have duplicate programs, duplicate transaction_ids, + // which will not abort but fail on check_next_block. let mut create_transaction_with_duplicate_transition_id = || -> Transaction { // Use a fixed seed RNG. let fixed_rng = &mut TestRng::from_seed(1); @@ -1109,10 +1235,10 @@ function empty_function: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transaction_1_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_2_id]); - // Ensure that verification was not run on aborted transactions. + // Confirm verification runs on aborted executions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transaction_1_id)); - assert!(!partially_verified_transaction.contains(&transaction_2_id)); + assert!(partially_verified_transaction.contains(&transaction_2_id)); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; @@ -1144,7 +1270,7 @@ function empty_function: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_transaction_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_3_id]); - // Ensure that verification was not run on aborted transactions. + // Ensure that verification was not run on transactions aborted in a previous block. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_transaction_id)); assert!(!partially_verified_transaction.contains(&transaction_3_id)); @@ -1185,7 +1311,10 @@ function simple_output: // Add the block to the ledger. ledger.advance_to_next_block(&block).unwrap(); - // Create a transaction with different transaction ids, but with a TPK. + // Create a transaction with different transaction ids, but with a duplicate TPK. + // NOTE: there's no use creating deployments with duplicate (fee) TPKs, + // as this is only possible if they have duplicate programs, duplicate transaction_ids, + // which will not abort but fail on check_next_block. let mut create_transaction_with_duplicate_tpk = |function: &str| -> Transaction { // Use a fixed seed RNG. let fixed_rng = &mut TestRng::from_seed(1); @@ -1256,10 +1385,10 @@ function simple_output: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transaction_1_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_2_id]); - // Ensure that verification was not run on aborted transactions. + // Ensure that verification was run on aborted executions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transaction_1_id)); - assert!(!partially_verified_transaction.contains(&transaction_2_id)); + assert!(partially_verified_transaction.contains(&transaction_2_id)); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; @@ -1291,7 +1420,7 @@ function simple_output: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_transaction_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_3_id]); - // Ensure that verification was not run on aborted transactions. + // Ensure that verification was not run on transactions aborted in a previous block. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_transaction_id)); assert!(!partially_verified_transaction.contains(&transaction_3_id)); From 8949c47d06d8c89ae19758d0f797d1294dcdd396 Mon Sep 17 00:00:00 2001 From: Victor Sint Nicolaas Date: Tue, 14 May 2024 22:09:46 +0200 Subject: [PATCH 04/32] Add test to confirm behavior of a malicious validator re-using execution content --- ledger/Cargo.toml | 4 ++++ ledger/src/tests.rs | 48 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index e75f892a86..709a32abe0 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -149,6 +149,10 @@ package = "snarkvm-ledger-block" path = "./block" features = [ "test" ] +[dev-dependencies.ledger-test-helpers] +package = "snarkvm-ledger-test-helpers" +path = "./test-helpers" + [dev-dependencies.serde_json] version = "1.0" features = [ "preserve_order" ] diff --git a/ledger/src/tests.rs b/ledger/src/tests.rs index 288cde76ad..e86a983b41 100644 --- a/ledger/src/tests.rs +++ b/ledger/src/tests.rs @@ -25,7 +25,7 @@ use console::{ program::{Entry, Identifier, Literal, Plaintext, ProgramID, Value}, types::U16, }; -use ledger_block::{ConfirmedTransaction, Ratify, Rejected, Transaction}; +use ledger_block::{ConfirmedTransaction, Execution, Ratify, Rejected, Transaction}; use ledger_committee::{Committee, MIN_VALIDATOR_STAKE}; use ledger_store::{helpers::memory::ConsensusMemory, ConsensusStore}; use synthesizer::{program::Program, vm::VM, Stack}; @@ -794,7 +794,7 @@ finalize foo: deployments.push(deployment); } - // Adjust one more execution which spends the record as a fee. + // Create one more execution which spends the record as a fee. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("100u64").unwrap()]; let execution = ledger .vm @@ -802,7 +802,7 @@ finalize foo: &private_key, ("credits.aleo", "transfer_public"), inputs.clone().iter(), - Some(record_execution), + Some(record_execution.clone()), 0, None, rng, @@ -811,6 +811,37 @@ finalize foo: execution_ids.push(execution.id()); executions.push(execution); + // Create one more execution which adds one transition, resulting in a different transaction id. + // This simulates a malicious validator re-using execution content. + let execution_to_mutate = executions.last().unwrap().execution().unwrap(); + // Sample a transition. + let sample = ledger_test_helpers::sample_transition(rng); + // Extend the transitions. + let mutated_transitions = std::iter::once(sample).chain(execution_to_mutate.transitions().cloned()); + // Create a mutated execution. + let mutated_execution = Execution::from( + mutated_transitions, + execution_to_mutate.global_state_root(), + execution_to_mutate.proof().cloned(), + ) + .unwrap(); + // Create a new fee for the execution. + let fee_authorization = ledger + .vm + .authorize_fee_public( + &private_key, + *executions.last().unwrap().fee_amount().unwrap(), + 0, + mutated_execution.to_execution_id().unwrap(), + rng, + ) + .unwrap(); + let fee = ledger.vm.execute_fee_authorization(fee_authorization, None, rng).unwrap(); + // Create a mutated transaction. + let mutated_transaction = Transaction::from_execution(mutated_execution, Some(fee)).unwrap(); + execution_ids.push(mutated_transaction.id()); + executions.push(mutated_transaction); + // Create a block. let block = ledger .prepare_advance_to_next_beacon_block( @@ -821,6 +852,7 @@ finalize foo: executions.pop().unwrap(), executions.pop().unwrap(), executions.pop().unwrap(), + executions.pop().unwrap(), deployments.pop().unwrap(), deployments.pop().unwrap(), ], @@ -837,7 +869,12 @@ finalize foo: // Enforce that the block transactions were correct. assert_eq!(block.transactions().num_accepted(), 2); assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&execution_ids[3], &deployment_ids[2]]); - assert_eq!(block.aborted_transaction_ids(), &vec![execution_ids[2], execution_ids[1], deployment_ids[1]]); + assert_eq!(block.aborted_transaction_ids(), &vec![ + execution_ids[4], + execution_ids[2], + execution_ids[1], + deployment_ids[1] + ]); // Ensure that verification was not run on aborted deployments. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); @@ -846,6 +883,7 @@ finalize foo: assert!(partially_verified_transaction.contains(&execution_ids[1])); assert!(partially_verified_transaction.contains(&deployment_ids[2])); assert!(!partially_verified_transaction.contains(&deployment_ids[1])); + assert!(!partially_verified_transaction.contains(&execution_ids[4])); // Verification was run, but the execution was invalid. // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; @@ -1235,7 +1273,7 @@ function empty_function: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transaction_1_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_2_id]); - // Confirm verification runs on aborted executions. + // Ensure verification runs on aborted executions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transaction_1_id)); assert!(partially_verified_transaction.contains(&transaction_2_id)); From ba56517e0d2d5dcf80b9b661bb3597dfab72c1f1 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Wed, 15 May 2024 17:30:33 +0200 Subject: [PATCH 05/32] perf: speed up the LiteralType check for the Identifier Signed-off-by: ljedrz --- console/program/Cargo.toml | 3 +++ console/program/src/data/identifier/parse.rs | 2 +- console/program/src/data_types/literal_type/mod.rs | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/console/program/Cargo.toml b/console/program/Cargo.toml index 23df63249a..8f20c2f8ee 100644 --- a/console/program/Cargo.toml +++ b/console/program/Cargo.toml @@ -40,6 +40,9 @@ version = "0.2" [dependencies.enum_index_derive] version = "0.2" +[dependencies.enum-iterator] +version = "2.1" + [dependencies.indexmap] version = "2.0" diff --git a/console/program/src/data/identifier/parse.rs b/console/program/src/data/identifier/parse.rs index daf02185fb..1ab087141b 100644 --- a/console/program/src/data/identifier/parse.rs +++ b/console/program/src/data/identifier/parse.rs @@ -54,7 +54,7 @@ impl FromStr for Identifier { // Ensure that the identifier is not a literal. ensure!( - crate::LiteralType::from_str(identifier).is_err(), + !enum_iterator::all::().any(|lt| lt.type_name() == identifier), "Identifier '{identifier}' is a reserved literal type" ); diff --git a/console/program/src/data_types/literal_type/mod.rs b/console/program/src/data_types/literal_type/mod.rs index d6ddf2f5a0..0f0dea6e75 100644 --- a/console/program/src/data_types/literal_type/mod.rs +++ b/console/program/src/data_types/literal_type/mod.rs @@ -23,10 +23,11 @@ use snarkvm_console_network::prelude::*; use snarkvm_console_types::{prelude::*, Boolean}; use core::fmt::{self, Debug, Display}; +use enum_iterator::Sequence; use num_derive::FromPrimitive; use num_traits::FromPrimitive; -#[derive(Copy, Clone, PartialEq, Eq, Hash, FromPrimitive)] +#[derive(Copy, Clone, PartialEq, Eq, Hash, FromPrimitive, Sequence)] pub enum LiteralType { /// The Aleo address type. Address, From 2a275ed7cfe7abf7e7ec2ad53213dba882f8d5b6 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Wed, 15 May 2024 17:30:42 +0200 Subject: [PATCH 06/32] chore: adjust the lockfile Signed-off-by: ljedrz --- Cargo.lock | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 3697583dfc..ceff8f73c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -857,6 +857,26 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "enum-iterator" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +dependencies = [ + "proc-macro2", + "quote 1.0.35", + "syn 2.0.48", +] + [[package]] name = "enum_index" version = "0.2.0" @@ -2912,6 +2932,7 @@ name = "snarkvm-console-program" version = "0.16.19" dependencies = [ "bincode", + "enum-iterator", "enum_index", "enum_index_derive", "indexmap 2.1.0", From fd514463b61723e50bddce55e8bd4203433c7ebb Mon Sep 17 00:00:00 2001 From: Victor Sint Nicolaas Date: Fri, 17 May 2024 08:46:03 +0200 Subject: [PATCH 07/32] Revert "Do not abort executions early in prepare_for_speculate" This reverts commit 05c02733e71377d8881168ea2eec1c62363ec066. --- synthesizer/src/vm/finalize.rs | 47 +++++++++++++++------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/synthesizer/src/vm/finalize.rs b/synthesizer/src/vm/finalize.rs index 2d0da55543..a16dbc4af8 100644 --- a/synthesizer/src/vm/finalize.rs +++ b/synthesizer/src/vm/finalize.rs @@ -835,11 +835,9 @@ impl> VM { transactions: &[&'a Transaction], rng: &mut R, ) -> Result<(Vec<&'a Transaction>, Vec<(&'a Transaction, String)>)> { - // Construct the list of executions that need to verified. - let mut executions = Vec::with_capacity(transactions.len()); - // Construct the list of deployments that need to verified. - let mut deployments = Vec::with_capacity(transactions.len()); - // Construct the list of valid and aborted transactions. + // Construct the list of transactions that need to verified. + let mut transactions_to_verify = Vec::with_capacity(transactions.len()); + // Construct the list of valid and invalid transactions. let mut valid_transactions = Vec::with_capacity(transactions.len()); let mut aborted_transactions = Vec::with_capacity(transactions.len()); @@ -854,24 +852,10 @@ impl> VM { // Initialize the list of deployment payers. let mut deployment_payers: IndexSet> = Default::default(); - // Abort fee transactions and invalid deployments. This will prevent the - // VM from performing expensive verification on invalid fees or - // deployments that would have been aborted in `VM::atomic_speculate`. + // Abort the transactions that are have duplicates or are invalid. This will prevent the VM from performing + // verification on transactions that would have been aborted in `VM::atomic_speculate`. for transaction in transactions.iter() { - // If the transaction is an Execution, we will fully verify it. - // Executions require full verification to avoid malleability attacks. - if transaction.is_execute() { - executions.push(*transaction); - continue; - } - - // Abort the transaction if it is a fee transaction. - if transaction.is_fee() { - aborted_transactions.push((*transaction, "Fee transactions are not allowed in speculate".to_string())); - continue; - } - - // If the transaction is a deployment, determine if it should be aborted. + // Determine if the transaction should be aborted. match self.should_abort_transaction( transaction, &transition_ids, @@ -897,12 +881,15 @@ impl> VM { fee.payer().map(|payer| deployment_payers.insert(payer)); } - // Add the transaction to the list of deployments to verify. - deployments.push(*transaction); + // Add the transaction to the list of transactions to verify. + transactions_to_verify.push(transaction); } }; } + // Separate the transactions into deploys and executions. + let (deployments, executions): (Vec<&Transaction>, Vec<&Transaction>) = + transactions_to_verify.into_iter().partition(|tx| tx.is_deploy()); // Chunk the deploys and executions into groups for parallel verification. let deployments_for_verification = deployments.chunks(Self::MAX_PARALLEL_DEPLOY_VERIFICATIONS); let executions_for_verification = executions.chunks(Self::MAX_PARALLEL_EXECUTE_VERIFICATIONS); @@ -911,8 +898,16 @@ impl> VM { for transactions in deployments_for_verification.chain(executions_for_verification) { let rngs = (0..transactions.len()).map(|_| StdRng::from_seed(rng.gen())).collect::>(); // Verify the transactions and collect the error message if there is one. - let (valid, aborted): (Vec<_>, Vec<_>) = + let (valid, invalid): (Vec<_>, Vec<_>) = cfg_into_iter!(transactions).zip(rngs).partition_map(|(transaction, mut rng)| { + // Abort the transaction if it is a fee transaction. + if transaction.is_fee() { + return Either::Right(( + *transaction, + "Fee transactions are not allowed in speculate".to_string(), + )); + } + // Verify the transaction. match self.check_transaction(transaction, None, &mut rng) { // If the transaction is valid, add it to the list of valid transactions. @@ -924,7 +919,7 @@ impl> VM { // Collect the valid and aborted transactions. valid_transactions.extend(valid); - aborted_transactions.extend(aborted); + aborted_transactions.extend(invalid); } // Sort the valid and aborted transactions based on their position in the original list. From ea6bf5a2fab001bd7d24a3bea8b75836e0bebca3 Mon Sep 17 00:00:00 2001 From: Victor Sint Nicolaas Date: Fri, 17 May 2024 10:31:39 +0200 Subject: [PATCH 08/32] Abort fee transactions before speculation early --- synthesizer/src/vm/finalize.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/synthesizer/src/vm/finalize.rs b/synthesizer/src/vm/finalize.rs index a16dbc4af8..bc67e22a8b 100644 --- a/synthesizer/src/vm/finalize.rs +++ b/synthesizer/src/vm/finalize.rs @@ -855,6 +855,12 @@ impl> VM { // Abort the transactions that are have duplicates or are invalid. This will prevent the VM from performing // verification on transactions that would have been aborted in `VM::atomic_speculate`. for transaction in transactions.iter() { + // Abort the transaction early if it is a fee transaction. + if transaction.is_fee() { + aborted_transactions.push((*transaction, "Fee transactions are not allowed in speculate".to_string())); + continue; + } + // Determine if the transaction should be aborted. match self.should_abort_transaction( transaction, @@ -900,14 +906,6 @@ impl> VM { // Verify the transactions and collect the error message if there is one. let (valid, invalid): (Vec<_>, Vec<_>) = cfg_into_iter!(transactions).zip(rngs).partition_map(|(transaction, mut rng)| { - // Abort the transaction if it is a fee transaction. - if transaction.is_fee() { - return Either::Right(( - *transaction, - "Fee transactions are not allowed in speculate".to_string(), - )); - } - // Verify the transaction. match self.check_transaction(transaction, None, &mut rng) { // If the transaction is valid, add it to the list of valid transactions. From 6e6476ea70e848fe452d703b91f92696cb69ca9e Mon Sep 17 00:00:00 2001 From: Victor Sint Nicolaas Date: Fri, 17 May 2024 10:31:50 +0200 Subject: [PATCH 09/32] Fix tests --- ledger/src/tests.rs | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/ledger/src/tests.rs b/ledger/src/tests.rs index e86a983b41..ef31b48a05 100644 --- a/ledger/src/tests.rs +++ b/ledger/src/tests.rs @@ -811,9 +811,12 @@ finalize foo: execution_ids.push(execution.id()); executions.push(execution); - // Create one more execution which adds one transition, resulting in a different transaction id. + // Select a transaction to mutate by a malicious validator. + let transaction_to_mutate = executions.last().unwrap().clone(); + + // Create a mutated execution which adds one transition, resulting in a different transaction id. // This simulates a malicious validator re-using execution content. - let execution_to_mutate = executions.last().unwrap().execution().unwrap(); + let execution_to_mutate = transaction_to_mutate.execution().unwrap(); // Sample a transition. let sample = ledger_test_helpers::sample_transition(rng); // Extend the transitions. @@ -842,6 +845,12 @@ finalize foo: execution_ids.push(mutated_transaction.id()); executions.push(mutated_transaction); + // Create a mutated execution which just takes the fee transition, resulting in a different transaction id. + // This simulates a malicious validator transforming a transaction to a fee transaction. + let mutated_transaction = Transaction::from_fee(transaction_to_mutate.fee_transition().unwrap()).unwrap(); + execution_ids.push(mutated_transaction.id()); + executions.push(mutated_transaction); + // Create a block. let block = ledger .prepare_advance_to_next_beacon_block( @@ -853,6 +862,7 @@ finalize foo: executions.pop().unwrap(), executions.pop().unwrap(), executions.pop().unwrap(), + executions.pop().unwrap(), deployments.pop().unwrap(), deployments.pop().unwrap(), ], @@ -868,22 +878,26 @@ finalize foo: // Enforce that the block transactions were correct. assert_eq!(block.transactions().num_accepted(), 2); - assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&execution_ids[3], &deployment_ids[2]]); + println!("execution_ids: {:?}", execution_ids); + assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&execution_ids[2], &deployment_ids[2]]); assert_eq!(block.aborted_transaction_ids(), &vec![ + execution_ids[5], execution_ids[4], - execution_ids[2], + execution_ids[3], execution_ids[1], deployment_ids[1] ]); // Ensure that verification was not run on aborted deployments. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); - assert!(partially_verified_transaction.contains(&execution_ids[3])); + assert!(partially_verified_transaction.contains(&execution_ids[2])); - assert!(partially_verified_transaction.contains(&execution_ids[1])); assert!(partially_verified_transaction.contains(&deployment_ids[2])); + assert!(!partially_verified_transaction.contains(&execution_ids[1])); assert!(!partially_verified_transaction.contains(&deployment_ids[1])); + assert!(!partially_verified_transaction.contains(&execution_ids[3])); assert!(!partially_verified_transaction.contains(&execution_ids[4])); // Verification was run, but the execution was invalid. + assert!(!partially_verified_transaction.contains(&execution_ids[5])); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; @@ -1124,8 +1138,8 @@ function create_duplicate_record: // Ensure that verification was not run on aborted deployments. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_1_id)); - assert!(partially_verified_transaction.contains(&transfer_2_id)); assert!(partially_verified_transaction.contains(&deployment_1_id)); + assert!(!partially_verified_transaction.contains(&transfer_2_id)); assert!(!partially_verified_transaction.contains(&deployment_2_id)); // Prepare a transfer that will succeed for the subsequent block. @@ -1273,10 +1287,10 @@ function empty_function: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transaction_1_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_2_id]); - // Ensure verification runs on aborted executions. + // Ensure that verification was not run on aborted transactions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transaction_1_id)); - assert!(partially_verified_transaction.contains(&transaction_2_id)); + assert!(!partially_verified_transaction.contains(&transaction_2_id)); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; @@ -1423,10 +1437,10 @@ function simple_output: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transaction_1_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_2_id]); - // Ensure that verification was run on aborted executions. + // Ensure that verification was not run on aborted transactions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transaction_1_id)); - assert!(partially_verified_transaction.contains(&transaction_2_id)); + assert!(!partially_verified_transaction.contains(&transaction_2_id)); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; From 5835a8692aced15ccb7868863f92f212d3069ae0 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Mon, 20 May 2024 19:46:07 +0200 Subject: [PATCH 10/32] perf: reduce allocations in ToBits for Plaintext Signed-off-by: ljedrz --- circuit/program/src/data/plaintext/to_bits.rs | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/circuit/program/src/data/plaintext/to_bits.rs b/circuit/program/src/data/plaintext/to_bits.rs index c2bea90341..aafec36c10 100644 --- a/circuit/program/src/data/plaintext/to_bits.rs +++ b/circuit/program/src/data/plaintext/to_bits.rs @@ -23,10 +23,12 @@ impl ToBits for Plaintext { Self::Literal(literal, bits_le) => { // Compute the bits of the literal. let bits = bits_le.get_or_init(|| { - let mut bits_le = vec![Boolean::constant(false), Boolean::constant(false)]; // Variant bit. + let mut bits_le = Vec::new(); + bits_le.extend([Boolean::constant(false), Boolean::constant(false)]); // Variant bit. literal.variant().write_bits_le(&mut bits_le); literal.size_in_bits().write_bits_le(&mut bits_le); literal.write_bits_le(&mut bits_le); + bits_le.shrink_to_fit(); bits_le }); // Extend the vector with the bits of the literal. @@ -35,15 +37,17 @@ impl ToBits for Plaintext { Self::Struct(members, bits_le) => { // Compute the bits of the struct. let bits = bits_le.get_or_init(|| { - let mut bits_le = vec![Boolean::constant(false), Boolean::constant(true)]; // Variant bit. + let mut bits_le = Vec::new(); + bits_le.extend([Boolean::constant(false), Boolean::constant(true)]); // Variant bit. U8::constant(console::U8::new(members.len() as u8)).write_bits_le(&mut bits_le); for (identifier, value) in members { let value_bits = value.to_bits_le(); identifier.size_in_bits().write_bits_le(&mut bits_le); identifier.write_bits_le(&mut bits_le); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_le(&mut bits_le); - bits_le.extend_from_slice(&value_bits); + bits_le.extend(value_bits); } + bits_le.shrink_to_fit(); bits_le }); // Extend the vector with the bits of the struct. @@ -52,13 +56,15 @@ impl ToBits for Plaintext { Self::Array(elements, bits_le) => { // Compute the bits of the array. let bits = bits_le.get_or_init(|| { - let mut bits_le = vec![Boolean::constant(true), Boolean::constant(false)]; // Variant bit. + let mut bits_le = Vec::new(); + bits_le.extend([Boolean::constant(true), Boolean::constant(false)]); // Variant bit. U32::constant(console::U32::new(elements.len() as u32)).write_bits_le(&mut bits_le); for value in elements { let value_bits = value.to_bits_le(); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_le(&mut bits_le); bits_le.extend(value_bits); } + bits_le.shrink_to_fit(); bits_le }); // Extend the vector with the bits of the array. @@ -73,10 +79,12 @@ impl ToBits for Plaintext { Self::Literal(literal, bits_be) => { // Compute the bits of the literal. let bits = bits_be.get_or_init(|| { - let mut bits_be = vec![Boolean::constant(false), Boolean::constant(false)]; // Variant bit. + let mut bits_be = Vec::new(); + bits_be.extend([Boolean::constant(false), Boolean::constant(false)]); // Variant bit. literal.variant().write_bits_be(&mut bits_be); literal.size_in_bits().write_bits_be(&mut bits_be); literal.write_bits_be(&mut bits_be); + bits_be.shrink_to_fit(); bits_be }); // Extend the vector with the bits of the literal. @@ -85,15 +93,17 @@ impl ToBits for Plaintext { Self::Struct(members, bits_be) => { // Compute the bits of the struct. let bits = bits_be.get_or_init(|| { - let mut bits_be = vec![Boolean::constant(false), Boolean::constant(true)]; // Variant bit. + let mut bits_be = Vec::new(); + bits_be.extend([Boolean::constant(false), Boolean::constant(true)]); // Variant bit. U8::constant(console::U8::new(members.len() as u8)).write_bits_be(&mut bits_be); for (identifier, value) in members { let value_bits = value.to_bits_be(); identifier.size_in_bits().write_bits_be(&mut bits_be); identifier.write_bits_be(&mut bits_be); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_be(&mut bits_be); - bits_be.extend_from_slice(&value_bits); + bits_be.extend(value_bits); } + bits_be.shrink_to_fit(); bits_be }); // Extend the vector with the bits of the struct. @@ -102,13 +112,15 @@ impl ToBits for Plaintext { Self::Array(elements, bits_be) => { // Compute the bits of the array. let bits = bits_be.get_or_init(|| { - let mut bits_be = vec![Boolean::constant(true), Boolean::constant(false)]; // Variant bit. + let mut bits_be = Vec::new(); + bits_be.extend([Boolean::constant(true), Boolean::constant(false)]); // Variant bit. U32::constant(console::U32::new(elements.len() as u32)).write_bits_be(&mut bits_be); for value in elements { let value_bits = value.to_bits_be(); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_be(&mut bits_be); bits_be.extend(value_bits); } + bits_be.shrink_to_fit(); bits_be }); // Extend the vector with the bits of the array. From c79242711fa7188944b4feab1c90d27eb6dbbad8 Mon Sep 17 00:00:00 2001 From: ljedrz Date: Tue, 21 May 2024 11:45:10 +0200 Subject: [PATCH 11/32] refactor: use type_name instead of literals for LiteralType::parse Signed-off-by: ljedrz --- .../src/data_types/literal_type/mod.rs | 2 +- .../src/data_types/literal_type/parse.rs | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/console/program/src/data_types/literal_type/mod.rs b/console/program/src/data_types/literal_type/mod.rs index d6ddf2f5a0..d7b5551814 100644 --- a/console/program/src/data_types/literal_type/mod.rs +++ b/console/program/src/data_types/literal_type/mod.rs @@ -66,7 +66,7 @@ pub enum LiteralType { impl LiteralType { /// Returns the literal type name. - pub fn type_name(&self) -> &str { + pub const fn type_name(&self) -> &str { match self { Self::Address => "address", Self::Boolean => "boolean", diff --git a/console/program/src/data_types/literal_type/parse.rs b/console/program/src/data_types/literal_type/parse.rs index 806eee0dc2..a414e2c3ac 100644 --- a/console/program/src/data_types/literal_type/parse.rs +++ b/console/program/src/data_types/literal_type/parse.rs @@ -20,23 +20,23 @@ impl Parser for LiteralType { fn parse(string: &str) -> ParserResult { // Parse the type from the string. alt(( - map(tag("address"), |_| Self::Address), - map(tag("boolean"), |_| Self::Boolean), - map(tag("field"), |_| Self::Field), - map(tag("group"), |_| Self::Group), - map(tag("i8"), |_| Self::I8), - map(tag("i16"), |_| Self::I16), - map(tag("i32"), |_| Self::I32), - map(tag("i64"), |_| Self::I64), - map(tag("i128"), |_| Self::I128), - map(tag("u8"), |_| Self::U8), - map(tag("u16"), |_| Self::U16), - map(tag("u32"), |_| Self::U32), - map(tag("u64"), |_| Self::U64), - map(tag("u128"), |_| Self::U128), - map(tag("scalar"), |_| Self::Scalar), - map(tag("signature"), |_| Self::Signature), - map(tag("string"), |_| Self::String), + map(tag(Self::Address.type_name()), |_| Self::Address), + map(tag(Self::Boolean.type_name()), |_| Self::Boolean), + map(tag(Self::Field.type_name()), |_| Self::Field), + map(tag(Self::Group.type_name()), |_| Self::Group), + map(tag(Self::I8.type_name()), |_| Self::I8), + map(tag(Self::I16.type_name()), |_| Self::I16), + map(tag(Self::I32.type_name()), |_| Self::I32), + map(tag(Self::I64.type_name()), |_| Self::I64), + map(tag(Self::I128.type_name()), |_| Self::I128), + map(tag(Self::U8.type_name()), |_| Self::U8), + map(tag(Self::U16.type_name()), |_| Self::U16), + map(tag(Self::U32.type_name()), |_| Self::U32), + map(tag(Self::U64.type_name()), |_| Self::U64), + map(tag(Self::U128.type_name()), |_| Self::U128), + map(tag(Self::Scalar.type_name()), |_| Self::Scalar), + map(tag(Self::Signature.type_name()), |_| Self::Signature), + map(tag(Self::String.type_name()), |_| Self::String), ))(string) } } From a6256ebbe7402150b952197792af7b81d7ca8041 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 12:07:00 -0700 Subject: [PATCH 12/32] Add num_variables to testnet verifier byte serialization --- .../src/testnet/resources/bond_public.metadata | 4 ++-- .../src/testnet/resources/bond_public.verifier | Bin 665 -> 673 bytes .../resources/claim_unbond_public.metadata | 4 ++-- .../resources/claim_unbond_public.verifier | Bin 665 -> 673 bytes .../src/testnet/resources/fee_private.metadata | 4 ++-- .../src/testnet/resources/fee_private.verifier | Bin 665 -> 673 bytes .../src/testnet/resources/fee_public.metadata | 4 ++-- .../src/testnet/resources/fee_public.verifier | Bin 665 -> 673 bytes .../src/testnet/resources/inclusion.metadata | 4 ++-- .../src/testnet/resources/inclusion.verifier | Bin 665 -> 673 bytes parameters/src/testnet/resources/join.metadata | 4 ++-- parameters/src/testnet/resources/join.verifier | Bin 665 -> 673 bytes .../resources/set_validator_state.metadata | 4 ++-- .../resources/set_validator_state.verifier | Bin 665 -> 673 bytes parameters/src/testnet/resources/split.metadata | 4 ++-- parameters/src/testnet/resources/split.verifier | Bin 665 -> 673 bytes .../testnet/resources/transfer_private.metadata | 4 ++-- .../testnet/resources/transfer_private.verifier | Bin 665 -> 673 bytes .../transfer_private_to_public.metadata | 4 ++-- .../transfer_private_to_public.verifier | Bin 665 -> 673 bytes .../testnet/resources/transfer_public.metadata | 4 ++-- .../testnet/resources/transfer_public.verifier | Bin 665 -> 673 bytes .../transfer_public_as_signer.metadata | 4 ++-- .../transfer_public_as_signer.verifier | Bin 665 -> 673 bytes .../transfer_public_to_private.metadata | 4 ++-- .../transfer_public_to_private.verifier | Bin 665 -> 673 bytes .../unbond_delegator_as_validator.metadata | 4 ++-- .../unbond_delegator_as_validator.verifier | Bin 665 -> 673 bytes .../testnet/resources/unbond_public.metadata | 4 ++-- .../testnet/resources/unbond_public.verifier | Bin 665 -> 673 bytes 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/parameters/src/testnet/resources/bond_public.metadata b/parameters/src/testnet/resources/bond_public.metadata index e68c508153..0dd03895cb 100644 --- a/parameters/src/testnet/resources/bond_public.metadata +++ b/parameters/src/testnet/resources/bond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "bd3bf4fbe066a1a749d9fbcabb0a324db4f9cc2d4cb9c42b5c4babd1a482d464", "prover_size": 29353850, - "verifier_checksum": "198a9aa7d4ed09343dc54df66dcfc089f5548d9c3201849d1b7cece1ed5b2b47", - "verifier_size": 665 + "verifier_checksum": "2d1ef6103cf10b45100249d0c7be96dc2b68021b42c08724c44528805974f862", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/bond_public.verifier b/parameters/src/testnet/resources/bond_public.verifier index 8ecc28c511c7eb3d9540c90f3a8bc622d67293ae..1eca8bb3bda0881c40cdce92099e348112c315e9 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(*ZVX@m04Uo7cK`qY delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/claim_unbond_public.metadata b/parameters/src/testnet/resources/claim_unbond_public.metadata index 817fb2a66f..74f937ec3e 100644 --- a/parameters/src/testnet/resources/claim_unbond_public.metadata +++ b/parameters/src/testnet/resources/claim_unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8d79db969bde4f56410db9b327da622a2d38a1e5e1228d591aea6ad2a4f67c86", "prover_size": 16861332, - "verifier_checksum": "e20ae8d0b9afa3b1f9bd9e808183e43095dfc4e3782c3b6668beaf696820e808", - "verifier_size": 665 + "verifier_checksum": "ac4abdfe456a2f60495031d405b55e19ae765bf4387b768db6e4154c96b3a4fc", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/claim_unbond_public.verifier b/parameters/src/testnet/resources/claim_unbond_public.verifier index 51fce1b1f5ee3467e033ca17cbd51b090733e038..a152c7c4d625caadc6e39387c19f57e9578c351c 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&aRt#VO04d)CmH+?% delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/fee_private.metadata b/parameters/src/testnet/resources/fee_private.metadata index 5308501fac..59428d3b8e 100644 --- a/parameters/src/testnet/resources/fee_private.metadata +++ b/parameters/src/testnet/resources/fee_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "e00171b5ce1b7f6629dda2ad571c2b8acf28042997801114fcfd3659e7bd130b", "prover_size": 66297972, - "verifier_checksum": "ca38afe2a01f5eb564afd6c45a412ebec5ffecf1084c548329a360b0db8a177e", - "verifier_size": 665 + "verifier_checksum": "f210de1bf1dbfd9cd291b2a2569157124700a92800c9cbe428bfc9cf26c57a54", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/fee_private.verifier b/parameters/src/testnet/resources/fee_private.verifier index a21859970947b2809a4fa86fdd1ce3cfc38414c3..290209615c61662e51dd6513582cce48c177e8e2 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(NhZ(>C04^>BF#rGn delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/fee_public.metadata b/parameters/src/testnet/resources/fee_public.metadata index 55424125d7..c907fd9416 100644 --- a/parameters/src/testnet/resources/fee_public.metadata +++ b/parameters/src/testnet/resources/fee_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "f72b6ff291415fb17a3653f447dbf95a5fe48480f7bbd6cf1dfb33963ff6ad58", "prover_size": 29174402, - "verifier_checksum": "8bc7651f85713f62b3a71fa001240e8fcf4ad322589cf2603c964c9426ede96a", - "verifier_size": 665 + "verifier_checksum": "6fb9bb7a84f117d93af2e6bf63450252bd2b73ab5b8eee3b9fa509bada23aa79", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/fee_public.verifier b/parameters/src/testnet/resources/fee_public.verifier index f804a18f577aee34064ff910402957fd73c61a76..c0c6ced42c8afadd166a5e7a9a2a6fdce40eba77 100644 GIT binary patch delta 16 UcmbQqx{!6lOePLX7X~l@042=>6#xJL delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/inclusion.metadata b/parameters/src/testnet/resources/inclusion.metadata index 76f795f99c..8df45d6edb 100644 --- a/parameters/src/testnet/resources/inclusion.metadata +++ b/parameters/src/testnet/resources/inclusion.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8faa4d3aaaa5e786d20b61f825e50901f9dcf470455d1d2994e091eefcc66a4e", "prover_size": 233812212, - "verifier_checksum": "2b6fdf5a869db365620a44fc3991e3f807a4e670bb976277ad327f3179866553", - "verifier_size": 665 + "verifier_checksum": "57bf79c7a493ee79f8ebed2c8e6e7e8a0a6d11b2f6edcba6e943768cb6a250cc", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/inclusion.verifier b/parameters/src/testnet/resources/inclusion.verifier index f317f07efae1ca78a888a6fd73f19072aa283716..d037956880aff4737c087407dddcc3f464187d17 100644 GIT binary patch delta 16 VcmbQqx{!6lOeT)LHYNrT001ga1Fir7 delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/join.metadata b/parameters/src/testnet/resources/join.metadata index 716c8c29db..e342e900fc 100644 --- a/parameters/src/testnet/resources/join.metadata +++ b/parameters/src/testnet/resources/join.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "267f60cc100c6c9fc024be16c5d48a383e0122b8b06ebd3612de298b8baafe1b", "prover_size": 74722164, - "verifier_checksum": "5a29b215f24c13d91850cba1dda64b2b2e54247d780db6bf6a6d8bd88af35ead", - "verifier_size": 665 + "verifier_checksum": "be5c34ac7365ce7489fdfe202b5d62a96d11ccad4943927682145c54086fbac7", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/join.verifier b/parameters/src/testnet/resources/join.verifier index 7220d66154ddeea54e49def7abc6c8ae75f1d845..f9a5047baa3988345df2b62f24f9704cac9033e8 100644 GIT binary patch delta 16 VcmbQqx{!6lOeT(aW<~}O001RC0{Z{} delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/set_validator_state.metadata b/parameters/src/testnet/resources/set_validator_state.metadata index 8b7a23eb75..6767abb421 100644 --- a/parameters/src/testnet/resources/set_validator_state.metadata +++ b/parameters/src/testnet/resources/set_validator_state.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "34421c854adfff6a5b3c5671f9d1a169835b63328d570d64f1302444af0ea75d", "prover_size": 17390188, - "verifier_checksum": "caa6cb2dd3f5cabf1ba15f7548f1e5eb3a9d0e6daca94393489966ddbdb4ba2f", - "verifier_size": 665 + "verifier_checksum": "65c8aa0d579e1c71992febd049ad71bbb8ba34f72d47296e7ad1cd208875ff66", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/set_validator_state.verifier b/parameters/src/testnet/resources/set_validator_state.verifier index 1ed138194b36594f40df6232b6de01065a694301..2c3819675314502db7de72ad61bee16996248daa 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(Nb_`$u04j?EtN;K2 delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/split.metadata b/parameters/src/testnet/resources/split.metadata index 360fe59e13..f41c254397 100644 --- a/parameters/src/testnet/resources/split.metadata +++ b/parameters/src/testnet/resources/split.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "9af46afb8a0b340b8649d19b5039450699bed5617b661c9bd1176f4547cae258", "prover_size": 75161428, - "verifier_checksum": "53eab92841839522ee7eac56ea33d6b337de02c75ac6c34e2a6caed4aa1a1700", - "verifier_size": 665 + "verifier_checksum": "cec38390ab075e70977a48aac81fea95dac6f7be1a5115ff36aa966feb1562f4", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/split.verifier b/parameters/src/testnet/resources/split.verifier index 96bfb7d4376cf853a7d030aa657634509a3b7978..5dd471f11e4bc30e43e4643a6c81b4a8e52e2b3a 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(mUkqRX04x6k@&Et; delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/transfer_private.metadata b/parameters/src/testnet/resources/transfer_private.metadata index 8ab0c6d230..5f6e330ad9 100644 --- a/parameters/src/testnet/resources/transfer_private.metadata +++ b/parameters/src/testnet/resources/transfer_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "6733de36be3291a1a6f95ed7b986ccb29fc69707788582fa672395abe3446e80", "prover_size": 75949172, - "verifier_checksum": "1291734485f70e932337080b7724a3ad49a965c5e2120ed3e47521c75cbf8c83", - "verifier_size": 665 + "verifier_checksum": "86e2667e415b0e6266e0e9f3edb99746837debca70e9e82fd7d55f732ff7d995", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_private.verifier b/parameters/src/testnet/resources/transfer_private.verifier index a73f24264a685743d5b56508ec0c6a106ce6c48e..087378ad3eff4854d3a9934fd06fda164f02fc50 100644 GIT binary patch delta 16 VcmbQqx{!6lOeT(ACPoGj001VX11JCh delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/transfer_private_to_public.metadata b/parameters/src/testnet/resources/transfer_private_to_public.metadata index bd363e8d6d..08c9973ad9 100644 --- a/parameters/src/testnet/resources/transfer_private_to_public.metadata +++ b/parameters/src/testnet/resources/transfer_private_to_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "d066d733d57185272acb449769163a9fe9409f5bacf02ba584751233d1e91810", "prover_size": 66299476, - "verifier_checksum": "c7a95f998d30fd36d0696d1bf19379a6d34092110da995b5b719c5538ec700d7", - "verifier_size": 665 + "verifier_checksum": "a656a128c7037878e2228e5e72f0a081152f9abe78d7fe1a6bb86b87f3462924", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_private_to_public.verifier b/parameters/src/testnet/resources/transfer_private_to_public.verifier index 053eb556b059dac40ea08a8b55e1321027de3b12..cc50ebc585ea386f1b9a11ab5802335a865b675a 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT)I#~8o>04{q3I{*Lx delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/transfer_public.metadata b/parameters/src/testnet/resources/transfer_public.metadata index 6559dacef5..0f56a39c3a 100644 --- a/parameters/src/testnet/resources/transfer_public.metadata +++ b/parameters/src/testnet/resources/transfer_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "846f86cabf9fa50e5abe347e559a8e9f3018459b5af9fdf52f1c44892b05f7e5", "prover_size": 28913482, - "verifier_checksum": "48e7e65bbc371bc417766ebdd937aee0307f47c6bebef47ba97f580c56777869", - "verifier_size": 665 + "verifier_checksum": "1b5109468e7992c39bbbc299dd1f94f18e49928e253e60ed68c7d9f02e73fe8d", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_public.verifier b/parameters/src/testnet/resources/transfer_public.verifier index 6a8df78f911221e7ad9c6faac7c2de4ac48a1986..ba3722e193033848b88e50d7c4ebf8dbe7b15f6b 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&JCk8M804J9NP5=M^ delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/transfer_public_as_signer.metadata b/parameters/src/testnet/resources/transfer_public_as_signer.metadata index 7244e0a786..391566edec 100644 --- a/parameters/src/testnet/resources/transfer_public_as_signer.metadata +++ b/parameters/src/testnet/resources/transfer_public_as_signer.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "12b5a7b02df59352833512c1dbebc9ce3849a81b0d3e9f1a1e447bb9e1e07277", "prover_size": 28915282, - "verifier_checksum": "3576013fded7b170dce276997beee3c564e0585fcaa11ec332f30fbb6e28e933", - "verifier_size": 665 + "verifier_checksum": "54d28a9f8d562ce2654d91463a2a879e21d5943b939044b1d92fc556b694b138", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_public_as_signer.verifier b/parameters/src/testnet/resources/transfer_public_as_signer.verifier index 43b8c9e6b45a51408e7541a9ce2f4802ce9fbb22..47c6a95c54f2b0c02a3ec447887bcfd8657e5105 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(47X~l@04D7NIRF3v delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/transfer_public_to_private.metadata b/parameters/src/testnet/resources/transfer_public_to_private.metadata index 8ac5941cfa..4e8b2d6f4a 100644 --- a/parameters/src/testnet/resources/transfer_public_to_private.metadata +++ b/parameters/src/testnet/resources/transfer_public_to_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8b120ab11dadbf8e051963fba135a099667ab857eaaeb602d8d268c1b2babb8d", "prover_size": 38413316, - "verifier_checksum": "4c2d2288a21e533a3ad5108086f57831b8c6759a152021599bca015b5b0c2586", - "verifier_size": 665 + "verifier_checksum": "481aa28c8a948fd0651acee10178d02bb3a1840c0f22f223b5433b9df60431e2", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_public_to_private.verifier b/parameters/src/testnet/resources/transfer_public_to_private.verifier index f1327fcc43cc19d12e567411e7091a77fe2d46dd..b5f7ecefb3ae0553b8522d960997a917b7976af3 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&ijSOG_04z`g?EnA( delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata b/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata index 6457c08e5b..77fdc76a85 100644 --- a/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata +++ b/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "cd98e97c4c79add134e9ba42d1f5114189da518d162c0d3ccb7383d2a8e38933", "prover_size": 27062250, - "verifier_checksum": "bb883d677bc912d6cc83eaf08bac4cc6882fe3cb08e77259af8ea1985b2df3be", - "verifier_size": 665 + "verifier_checksum": "c0b02e8abe7fc250734ee74e8ee9602680bb6fdbb067ac97ce4d2086171c6c52", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/unbond_delegator_as_validator.verifier b/parameters/src/testnet/resources/unbond_delegator_as_validator.verifier index 149c622ccc24beb7e9999beb17ce03db7c290380..818ebc697c74638c00ee2b9427bea2da6cc847c5 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&)P7GiG04fIqoB#j- delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/testnet/resources/unbond_public.metadata b/parameters/src/testnet/resources/unbond_public.metadata index 9396c5a30e..738a20f707 100644 --- a/parameters/src/testnet/resources/unbond_public.metadata +++ b/parameters/src/testnet/resources/unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "3904c2e1a9ed82251e5196a76a171f0d518d7271cd31cd9bef7c25414a2103d5", "prover_size": 17414380, - "verifier_checksum": "31e48623ea0e9e59eca4b9fc05ab4bb13f7593d60e7c418398f71a396307c042", - "verifier_size": 665 + "verifier_checksum": "6f9c617aee96251af2a47d2aaa0d7abf042d09b097d9c72fd69b2b70c5616282", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/unbond_public.verifier b/parameters/src/testnet/resources/unbond_public.verifier index 6fb4ddcae8bb829a1fe864bc3a804de1a2419ece..befd9876fd865bcaca8b63116b7611e008fd8829 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&uwhUkZ04p>D!2kdN delta 7 OcmZ3;I+Jz7OeO#d;R28V From 644c5eebe6f3e92f80fc6d177f4ae6ab91a5084a Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 12:09:37 -0700 Subject: [PATCH 13/32] Add num_variables to mainnet verifier byte serialization --- .../src/mainnet/resources/bond_public.metadata | 4 ++-- .../src/mainnet/resources/bond_public.verifier | Bin 665 -> 673 bytes .../resources/claim_unbond_public.metadata | 4 ++-- .../resources/claim_unbond_public.verifier | Bin 665 -> 673 bytes .../src/mainnet/resources/fee_private.metadata | 4 ++-- .../src/mainnet/resources/fee_private.verifier | Bin 665 -> 673 bytes .../src/mainnet/resources/fee_public.metadata | 4 ++-- .../src/mainnet/resources/fee_public.verifier | Bin 665 -> 673 bytes .../src/mainnet/resources/inclusion.metadata | 4 ++-- .../src/mainnet/resources/inclusion.verifier | Bin 665 -> 673 bytes parameters/src/mainnet/resources/join.metadata | 4 ++-- parameters/src/mainnet/resources/join.verifier | Bin 665 -> 673 bytes .../resources/set_validator_state.metadata | 4 ++-- .../resources/set_validator_state.verifier | Bin 665 -> 673 bytes parameters/src/mainnet/resources/split.metadata | 4 ++-- parameters/src/mainnet/resources/split.verifier | Bin 665 -> 673 bytes .../mainnet/resources/transfer_private.metadata | 4 ++-- .../mainnet/resources/transfer_private.verifier | Bin 665 -> 673 bytes .../transfer_private_to_public.metadata | 4 ++-- .../transfer_private_to_public.verifier | Bin 665 -> 673 bytes .../mainnet/resources/transfer_public.metadata | 4 ++-- .../mainnet/resources/transfer_public.verifier | Bin 665 -> 673 bytes .../transfer_public_as_signer.metadata | 4 ++-- .../transfer_public_as_signer.verifier | Bin 665 -> 673 bytes .../transfer_public_to_private.metadata | 4 ++-- .../transfer_public_to_private.verifier | Bin 665 -> 673 bytes .../unbond_delegator_as_validator.metadata | 4 ++-- .../unbond_delegator_as_validator.verifier | Bin 665 -> 673 bytes .../mainnet/resources/unbond_public.metadata | 4 ++-- .../mainnet/resources/unbond_public.verifier | Bin 665 -> 673 bytes 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/parameters/src/mainnet/resources/bond_public.metadata b/parameters/src/mainnet/resources/bond_public.metadata index 9fbc5179a8..4651d2ff51 100644 --- a/parameters/src/mainnet/resources/bond_public.metadata +++ b/parameters/src/mainnet/resources/bond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "2f0d0703e3ce260286c40830015b1376c644f73dac5ca57cd7c67074e35ef32a", "prover_size": 29353850, - "verifier_checksum": "f4d689b5252ef4243abd7ee8acea3e6e9d0fb137d85908b6a04661d58490d469", - "verifier_size": 665 + "verifier_checksum": "8ff394ca5509efeab7c71a26f4784ef9befba73528b11169975f057cf7353b77", + "verifier_size": 673 } \ 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 694480daecf08f0f3741ef415ed164174a21ef11..6944704b9351b157efc6fe98cae4d480a54f2d84 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(*ZVX@m04Uo7cK`qY delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/claim_unbond_public.metadata b/parameters/src/mainnet/resources/claim_unbond_public.metadata index 7e651302bc..64b2073039 100644 --- a/parameters/src/mainnet/resources/claim_unbond_public.metadata +++ b/parameters/src/mainnet/resources/claim_unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "5b99b8dc31f44ee56a0b1d07370191174e72414969df2fd35f1cc7c061791815", "prover_size": 16861332, - "verifier_checksum": "e53699624b4677f8b1826dcc54f6980aa6400170032244a9082e5bee6c89d39d", - "verifier_size": 665 + "verifier_checksum": "1e35a27ec069a4871a65374dedd41fa187e19b0d9cb6b20cc4adf3966ab257c5", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/claim_unbond_public.verifier b/parameters/src/mainnet/resources/claim_unbond_public.verifier index 2cbb331c383181c2224488b37b0147df62fe5344..3dfce60306dc725f147b30c78b73628dae389f37 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&aRt#VO04d)CmH+?% delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/fee_private.metadata b/parameters/src/mainnet/resources/fee_private.metadata index ae797e9eae..6793d31901 100644 --- a/parameters/src/mainnet/resources/fee_private.metadata +++ b/parameters/src/mainnet/resources/fee_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "27b72ed5e8086127f8cfcfc94b8c63543e5901a368a3f782aedcb51f9ace738e", "prover_size": 66297972, - "verifier_checksum": "099648c5dcbb0eb8c7f1031195273f5e1375831cda977711f487fbed7e33bb20", - "verifier_size": 665 + "verifier_checksum": "a9951e76ba3738840f472d38b7c0d496c6d26f6bc58a9035ef7f7f68c353a89b", + "verifier_size": 673 } \ 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 7756de8de887b0ac450d17c79644aca9008647b5..11be848dd3464c95813987399d204a3b36551ce1 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(NhZ(>C04^>BF#rGn delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/fee_public.metadata b/parameters/src/mainnet/resources/fee_public.metadata index a4d5aa14c0..76dacefc4c 100644 --- a/parameters/src/mainnet/resources/fee_public.metadata +++ b/parameters/src/mainnet/resources/fee_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "d967fc683af43a0a01817283af05181f9f8277c49351ca664a642b0eb9ec9363", "prover_size": 29174402, - "verifier_checksum": "1e8cc6ab1de9ec21d1559434c516698af40895df3e3d6afb0615495d0201955b", - "verifier_size": 665 + "verifier_checksum": "ccf30fa4ce688f93ef3a985057684fe9e32585fb8e93f2c472169e506da6cdb0", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/fee_public.verifier b/parameters/src/mainnet/resources/fee_public.verifier index 1ae17cb8d279befbb9e6b9277cc8c001adef6333..8939a796b7163be251c1362d961aa74b8e73e3f1 100644 GIT binary patch delta 16 UcmbQqx{!6lOePLX7X~l@042=>6#xJL delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/inclusion.metadata b/parameters/src/mainnet/resources/inclusion.metadata index 76f795f99c..8df45d6edb 100644 --- a/parameters/src/mainnet/resources/inclusion.metadata +++ b/parameters/src/mainnet/resources/inclusion.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8faa4d3aaaa5e786d20b61f825e50901f9dcf470455d1d2994e091eefcc66a4e", "prover_size": 233812212, - "verifier_checksum": "2b6fdf5a869db365620a44fc3991e3f807a4e670bb976277ad327f3179866553", - "verifier_size": 665 + "verifier_checksum": "57bf79c7a493ee79f8ebed2c8e6e7e8a0a6d11b2f6edcba6e943768cb6a250cc", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/inclusion.verifier b/parameters/src/mainnet/resources/inclusion.verifier index f317f07efae1ca78a888a6fd73f19072aa283716..d037956880aff4737c087407dddcc3f464187d17 100644 GIT binary patch delta 16 VcmbQqx{!6lOeT)LHYNrT001ga1Fir7 delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/join.metadata b/parameters/src/mainnet/resources/join.metadata index b6ff59da8e..f7e256ba13 100644 --- a/parameters/src/mainnet/resources/join.metadata +++ b/parameters/src/mainnet/resources/join.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "b609cd8cd51eb0870e87b31db05b45768a77daed7a2b0b3c8f5a570e12044112", "prover_size": 74722164, - "verifier_checksum": "70691d33b4028fd2813edcb9468fa702239b93adab56fc8d3e9ea0636668a844", - "verifier_size": 665 + "verifier_checksum": "3a441d336ddd9cdc80dce07d161eb435d0cd21afd2463b0de9fc6fdf867f4f6a", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/join.verifier b/parameters/src/mainnet/resources/join.verifier index 035670470f7244c275bb547c1a595c180df050d7..a7afbb3672725806a1f0f5b6af58bfdca084b530 100644 GIT binary patch delta 16 VcmbQqx{!6lOeT(aW<~}O001RC0{Z{} delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/set_validator_state.metadata b/parameters/src/mainnet/resources/set_validator_state.metadata index 13434d577f..f21df09817 100644 --- a/parameters/src/mainnet/resources/set_validator_state.metadata +++ b/parameters/src/mainnet/resources/set_validator_state.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "f782f04cf9f46464f307b4ae6418f2b8bec375e341e5a02a51c9d6b8b38e4f7f", "prover_size": 17390188, - "verifier_checksum": "a224e3690b8c789b026fa5c93d2aada9148f4d45c756c492fb59accb128be724", - "verifier_size": 665 + "verifier_checksum": "294517ffa497c173e0097090c09e33f2c0888c97126c3b74a17731ce3d2f6dd9", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/set_validator_state.verifier b/parameters/src/mainnet/resources/set_validator_state.verifier index 73ac6b6bc3a752afc019a821752e1217c36fd4b3..c1cde948e933b205cc157fd0d6d3e27b7f63f8f0 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(Nb_`$u04j?EtN;K2 delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/split.metadata b/parameters/src/mainnet/resources/split.metadata index c5712cd3ae..dc16dfa777 100644 --- a/parameters/src/mainnet/resources/split.metadata +++ b/parameters/src/mainnet/resources/split.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "9a6198f6bf0f9b0516feab70779eaaf91082b8b081ca79d7ddadbca44b58e85a", "prover_size": 75161428, - "verifier_checksum": "1e576c6838e48ae946724a64e0831bc6bb0c6adc125b469e52da098008c69f06", - "verifier_size": 665 + "verifier_checksum": "1d6bfd787cc09dd6fac674f566dd5fb22acf4c47efca7763bd18bb75d3afce34", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/split.verifier b/parameters/src/mainnet/resources/split.verifier index 992b7d62f60fc23020f9e0347cc1657b444d4dd3..37335cd1764a8959e6609e29866d4554bb79427a 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(mUkqRX04x6k@&Et; delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/transfer_private.metadata b/parameters/src/mainnet/resources/transfer_private.metadata index 16f11c11cb..cdf533c246 100644 --- a/parameters/src/mainnet/resources/transfer_private.metadata +++ b/parameters/src/mainnet/resources/transfer_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "d6c6d61a87f38905468c7e479e30a9899535635450cadf3de69eae4b490621db", "prover_size": 75949172, - "verifier_checksum": "118d42c3a97e01506e233aaadec6956b8de1a187b46ee59e6a266c1e85f14d6f", - "verifier_size": 665 + "verifier_checksum": "d17b5954edcea8c9f97ebbe267f569a5faca6168e51832fa62e77a0017c25700", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_private.verifier b/parameters/src/mainnet/resources/transfer_private.verifier index 360b2774aa5ced3bbbda3dc884f7c8f21c59365c..5fb4efc72e6390b440d901a295fbc8a76483393d 100644 GIT binary patch delta 16 VcmbQqx{!6lOeT(ACPoGj001VX11JCh delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/transfer_private_to_public.metadata b/parameters/src/mainnet/resources/transfer_private_to_public.metadata index ed72b09d1b..56d62693ee 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": "4c0561cf4342c601ccd49eee4c039711c2e2cf92a01b0b3a58b7f1242e902ceb", "prover_size": 66299476, - "verifier_checksum": "be9a2abeeb2c9c5dcea11582f1869e0b1447b45ebfad5582604903ce338da405", - "verifier_size": 665 + "verifier_checksum": "ffdad62683ba31580632cdadb2bc5e5d7bb4c293774579c9571eb6c0e349a50f", + "verifier_size": 673 } \ 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 77b4ab602b3ebc9aa3dbb6a0386372d5aacbd59c..de62d2a1d8f7ca912a9480af4dbb3c3f05d654d3 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT)I#~8o>04{q3I{*Lx delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/transfer_public.metadata b/parameters/src/mainnet/resources/transfer_public.metadata index 876e221125..e43c4a3925 100644 --- a/parameters/src/mainnet/resources/transfer_public.metadata +++ b/parameters/src/mainnet/resources/transfer_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "f8e5f6437b945174b62313ece8a1c9dcbeac5dfff5b0fef2e968c9b92f86da06", "prover_size": 28913482, - "verifier_checksum": "5facdc35d2205f3a90a7a2eb89fa1418beabc6f6393e18d6498c60f02a3185e3", - "verifier_size": 665 + "verifier_checksum": "ea77f42a35b3f891e7753c7333df365f356883550c4602df11f270237bef340d", + "verifier_size": 673 } \ 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 1089392f46578aa6e08374dde5f9b841c8a1c609..0b59130e9a88ad18574f691b1ee51f20ebd6d71a 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&JCk8M804J9NP5=M^ delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/transfer_public_as_signer.metadata b/parameters/src/mainnet/resources/transfer_public_as_signer.metadata index 273338aa05..bb2a05d311 100644 --- a/parameters/src/mainnet/resources/transfer_public_as_signer.metadata +++ b/parameters/src/mainnet/resources/transfer_public_as_signer.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "7cfc669dd92593e052a8a37d6b3a7c40d09f191c754b41230f69e19e9d0f9c76", "prover_size": 28915282, - "verifier_checksum": "18e99de56f2098b27318dc9b92eee1743792837c27a4a7001ef19a42c7dbb798", - "verifier_size": 665 + "verifier_checksum": "7d869b875c2beaecba4f7c78e2fdc3a2adc01d5eca53ac72d81d2f8f90b7b606", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_public_as_signer.verifier b/parameters/src/mainnet/resources/transfer_public_as_signer.verifier index 738d069595f64f5d89678676b013d63389a05abe..4c2f0444e98f3a09d8bf7d8587f49515c10b5336 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT(47X~l@04D7NIRF3v delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/transfer_public_to_private.metadata b/parameters/src/mainnet/resources/transfer_public_to_private.metadata index 9c9f075355..5cedf109a0 100644 --- a/parameters/src/mainnet/resources/transfer_public_to_private.metadata +++ b/parameters/src/mainnet/resources/transfer_public_to_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "cf0916dc5debc8b894a856540e1525254214367af3d58b53d1472d5d95af5a95", "prover_size": 38413316, - "verifier_checksum": "472004f0fd523239675d32b5e1ebea61cd6855b5f41126e70e05b83ec6a2a1a4", - "verifier_size": 665 + "verifier_checksum": "fd11e1bb7e49c405e30a78ac1659ab338a3345c7982079f05a6a189bf86c0d48", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_public_to_private.verifier b/parameters/src/mainnet/resources/transfer_public_to_private.verifier index 65e2d54f536eacd06774884b9d3384ffd520bb0c..e6d12bbae98a1d5384d02181be42bc8441c00038 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&ijSOG_04z`g?EnA( delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata b/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata index d1e5ca6e66..5ebd333e69 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": "785f2318f0c12b883b99ff1649cf401d2f1d024fe2dd30916a276cd8c199f757", "prover_size": 27062250, - "verifier_checksum": "34f8fb353c7c1a4e590b52000d78bf28100328f6250eb6c9ef11c9dc0a2bb066", - "verifier_size": 665 + "verifier_checksum": "880e79301ac40282e0e99ec146c9600015a81150ee58f21f1d840b75058c6093", + "verifier_size": 673 } \ 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 2f245c62d33e7ea025e799d959287c973565bb7b..e5f1737880abbb4300dd375330efaf922a047299 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&)P7GiG04fIqoB#j- delta 7 OcmZ3;I+Jz7OeO#d;R28V diff --git a/parameters/src/mainnet/resources/unbond_public.metadata b/parameters/src/mainnet/resources/unbond_public.metadata index 3dffb3f508..22f7c68c81 100644 --- a/parameters/src/mainnet/resources/unbond_public.metadata +++ b/parameters/src/mainnet/resources/unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "fc15a9ae0f3eca24e6a622e8a8ce24682e73ec39d64f22b0876db28794763ea4", "prover_size": 17414380, - "verifier_checksum": "a6106dcfefffd65e46488c7dc6228f9c379c35497c62779f2e186f2d9908eff9", - "verifier_size": 665 + "verifier_checksum": "5d8e0ad3505f52d232fd429a8aa6625bb19fb0d66214a085a20ba831ec96eed5", + "verifier_size": 673 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/unbond_public.verifier b/parameters/src/mainnet/resources/unbond_public.verifier index 19485b625f2a12b7741373ded5b323ba898edd1a..8d3547736481f64f06786fd87b8c9385148f9b3f 100644 GIT binary patch delta 16 UcmbQqx{!6lOeT&uwhUkZ04p>D!2kdN delta 7 OcmZ3;I+Jz7OeO#d;R28V From cab1c0da622898cf67cd708808068a5eae73a316 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 14:30:27 -0700 Subject: [PATCH 14/32] Introduce TestnetV1 network --- console/network/src/lib.rs | 3 + console/network/src/testnet_v1.rs | 492 ++++++++++++++++++++++++++++++ 2 files changed, 495 insertions(+) create mode 100644 console/network/src/testnet_v1.rs diff --git a/console/network/src/lib.rs b/console/network/src/lib.rs index 306a77b6fe..c0d42ed9e9 100644 --- a/console/network/src/lib.rs +++ b/console/network/src/lib.rs @@ -31,6 +31,9 @@ pub use mainnet_v0::*; mod testnet_v0; pub use testnet_v0::*; +mod testnet_v1; +pub use testnet_v1::*; + pub mod prelude { pub use crate::{environment::prelude::*, Network}; } diff --git a/console/network/src/testnet_v1.rs b/console/network/src/testnet_v1.rs new file mode 100644 index 0000000000..e7b18a3b1b --- /dev/null +++ b/console/network/src/testnet_v1.rs @@ -0,0 +1,492 @@ +// Copyright (C) 2019-2023 Aleo Systems Inc. +// This file is part of the snarkVM library. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use super::*; +use crate::TRANSACTION_PREFIX; +use snarkvm_console_algorithms::{ + Blake2Xs, + Keccak256, + Keccak384, + Keccak512, + Pedersen128, + Pedersen64, + Poseidon2, + Poseidon4, + Poseidon8, + Sha3_256, + Sha3_384, + Sha3_512, + BHP1024, + BHP256, + BHP512, + BHP768, +}; + +lazy_static! { + /// The group bases for the Aleo signature and encryption schemes. + static ref GENERATOR_G: Vec> = TestnetV1::new_bases("AleoAccountEncryptionAndSignatureScheme0"); + + /// The Varuna sponge parameters. + static ref VARUNA_FS_PARAMETERS: FiatShamirParameters = FiatShamir::::sample_parameters(); + + /// The encryption domain as a constant field element. + static ref ENCRYPTION_DOMAIN: Field = Field::::new_domain_separator("AleoSymmetricEncryption0"); + /// The graph key domain as a constant field element. + static ref GRAPH_KEY_DOMAIN: Field = Field::::new_domain_separator("AleoGraphKey0"); + /// The serial number domain as a constant field element. + 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 TESTNET_V1_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 TESTNET_V1_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 TESTNET_V1_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 TESTNET_V1_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 TESTNET_V1_PEDERSEN_64: Pedersen64 = Pedersen64::::setup("AleoPedersen64"); + /// The Pedersen hash function, which can take an input of up to 128 bits. + pub static ref TESTNET_V1_PEDERSEN_128: Pedersen128 = Pedersen128::::setup("AleoPedersen128"); + + /// The Poseidon hash function, using a rate of 2. + pub static ref TESTNET_V1_POSEIDON_2: Poseidon2 = Poseidon2::::setup("AleoPoseidon2").expect("Failed to setup Poseidon2"); + /// The Poseidon hash function, using a rate of 4. + pub static ref TESTNET_V1_POSEIDON_4: Poseidon4 = Poseidon4::::setup("AleoPoseidon4").expect("Failed to setup Poseidon4"); + /// The Poseidon hash function, using a rate of 8. + pub static ref TESTNET_V1_POSEIDON_8: Poseidon8 = Poseidon8::::setup("AleoPoseidon8").expect("Failed to setup Poseidon8"); + + pub static ref TESTNET_V1_CREDITS_PROVING_KEYS: IndexMap>> = { + let mut map = IndexMap::new(); + snarkvm_parameters::insert_testnet_v1_credit_keys!(map, VarunaProvingKey, Prover); + map + }; + pub static ref TESTNET_V1_CREDITS_VERIFYING_KEYS: IndexMap>> = { + let mut map = IndexMap::new(); + snarkvm_parameters::insert_testnet_v1_credit_keys!(map, VarunaVerifyingKey, Verifier); + map + }; +} + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] +pub struct TestnetV1; + +impl TestnetV1 { + /// 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. + let (base, _, _) = Blake2Xs::hash_to_curve::<::Affine>(message); + + // Compute the bases up to the size of the scalar field (in bits). + let mut g = Group::::new(base); + let mut g_bases = Vec::with_capacity(Scalar::::size_in_bits()); + for _ in 0..Scalar::::size_in_bits() { + g_bases.push(g); + g = g.double(); + } + g_bases + } +} + +impl Environment for TestnetV1 { + type Affine = ::Affine; + type BigInteger = ::BigInteger; + type Field = ::Field; + type PairingCurve = ::PairingCurve; + type Projective = ::Projective; + type Scalar = ::Scalar; + + /// The coefficient `A` of the twisted Edwards curve. + const EDWARDS_A: Self::Field = Console::EDWARDS_A; + /// The coefficient `D` of the twisted Edwards curve. + const EDWARDS_D: Self::Field = Console::EDWARDS_D; + /// The coefficient `A` of the Montgomery curve. + const MONTGOMERY_A: Self::Field = Console::MONTGOMERY_A; + /// The coefficient `B` of the Montgomery curve. + const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B; +} + +impl Network for TestnetV1 { + /// The block hash type. + type BlockHash = AleoID, { hrp2!("ab") }>; + /// The ratification ID type. + type RatificationID = AleoID, { hrp2!("ar") }>; + /// The state root type. + type StateRoot = AleoID, { hrp2!("sr") }>; + /// The transaction ID type. + type TransactionID = AleoID, { hrp2!(TRANSACTION_PREFIX) }>; + /// The transition ID type. + type TransitionID = AleoID, { hrp2!("au") }>; + + /// The network edition. + const EDITION: u16 = 0; + /// The genesis block coinbase target. + const GENESIS_COINBASE_TARGET: u64 = (1u64 << 5).saturating_sub(1); + /// The genesis block proof target. + const GENESIS_PROOF_TARGET: u64 = 1u64 << 3; + /// The fixed timestamp of the genesis block. + const GENESIS_TIMESTAMP: i64 = 1715776496 /* 2024-05-15 12:34:56 UTC */; + /// The network ID. + const ID: u16 = 2; + /// The function name for the inclusion circuit. + const INCLUSION_FUNCTION_NAME: &'static str = MainnetV0::INCLUSION_FUNCTION_NAME; + /// The maximum number of certificates in a batch. + const MAX_CERTIFICATES: u16 = 100; + /// The network name. + const NAME: &'static str = "Aleo Testnet (v1)"; + + /// Returns the genesis block bytes. + fn genesis_bytes() -> &'static [u8] { + snarkvm_parameters::testnet::GenesisBytes::load_bytes() + } + + /// Returns the proving key for the given function name in `credits.aleo`. + fn get_credits_proving_key(function_name: String) -> Result<&'static Arc>> { + TESTNET_V1_CREDITS_PROVING_KEYS + .get(&function_name) + .ok_or_else(|| anyhow!("Proving key for credits.aleo/{function_name}' not found")) + } + + /// Returns the verifying key for the given function name in `credits.aleo`. + fn get_credits_verifying_key(function_name: String) -> Result<&'static Arc>> { + TESTNET_V1_CREDITS_VERIFYING_KEYS + .get(&function_name) + .ok_or_else(|| anyhow!("Verifying key for credits.aleo/{function_name}' not found")) + } + + /// Returns the `proving key` for the inclusion circuit. + fn inclusion_proving_key() -> &'static Arc> { + static INSTANCE: OnceCell>> = OnceCell::new(); + INSTANCE.get_or_init(|| { + // Skipping the first byte, which is the encoded version. + Arc::new( + CircuitProvingKey::from_bytes_le(&snarkvm_parameters::testnet::INCLUSION_PROVING_KEY[1..]) + .expect("Failed to load inclusion proving key."), + ) + }) + } + + /// Returns the `verifying key` for the inclusion circuit. + fn inclusion_verifying_key() -> &'static Arc> { + static INSTANCE: OnceCell>> = OnceCell::new(); + INSTANCE.get_or_init(|| { + // Skipping the first byte, which is the encoded version. + Arc::new( + CircuitVerifyingKey::from_bytes_le(&snarkvm_parameters::testnet::INCLUSION_VERIFYING_KEY[1..]) + .expect("Failed to load inclusion verifying key."), + ) + }) + } + + /// Returns the powers of `G`. + fn g_powers() -> &'static Vec> { + &GENERATOR_G + } + + /// Returns the scalar multiplication on the generator `G`. + fn g_scalar_multiply(scalar: &Scalar) -> Group { + GENERATOR_G + .iter() + .zip_eq(&scalar.to_bits_le()) + .filter_map(|(base, bit)| match bit { + true => Some(base), + false => None, + }) + .sum() + } + + /// Returns the Varuna universal prover. + fn varuna_universal_prover() -> &'static UniversalProver { + MainnetV0::varuna_universal_prover() + } + + /// Returns the Varuna universal verifier. + fn varuna_universal_verifier() -> &'static UniversalVerifier { + MainnetV0::varuna_universal_verifier() + } + + /// Returns the sponge parameters used for the sponge in the Varuna SNARK. + fn varuna_fs_parameters() -> &'static FiatShamirParameters { + &VARUNA_FS_PARAMETERS + } + + /// Returns the encryption domain as a constant field element. + fn encryption_domain() -> Field { + *ENCRYPTION_DOMAIN + } + + /// Returns the graph key domain as a constant field element. + fn graph_key_domain() -> Field { + *GRAPH_KEY_DOMAIN + } + + /// Returns the serial number domain as a constant field element. + fn serial_number_domain() -> Field { + *SERIAL_NUMBER_DOMAIN + } + + /// Returns a BHP commitment with an input hasher of 256-bits and randomizer. + fn commit_bhp256(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_256.commit(input, randomizer) + } + + /// Returns a BHP commitment with an input hasher of 512-bits and randomizer. + fn commit_bhp512(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_512.commit(input, randomizer) + } + + /// Returns a BHP commitment with an input hasher of 768-bits and randomizer. + fn commit_bhp768(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_768.commit(input, randomizer) + } + + /// Returns a BHP commitment with an input hasher of 1024-bits and randomizer. + fn commit_bhp1024(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_1024.commit(input, randomizer) + } + + /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. + fn commit_ped64(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_PEDERSEN_64.commit(input, randomizer) + } + + /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. + fn commit_ped128(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_PEDERSEN_128.commit(input, randomizer) + } + + /// Returns a BHP commitment with an input hasher of 256-bits and randomizer. + fn commit_to_group_bhp256(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_256.commit_uncompressed(input, randomizer) + } + + /// Returns a BHP commitment with an input hasher of 512-bits and randomizer. + fn commit_to_group_bhp512(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_512.commit_uncompressed(input, randomizer) + } + + /// Returns a BHP commitment with an input hasher of 768-bits and randomizer. + fn commit_to_group_bhp768(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_768.commit_uncompressed(input, randomizer) + } + + /// Returns a BHP commitment with an input hasher of 1024-bits and randomizer. + fn commit_to_group_bhp1024(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_BHP_1024.commit_uncompressed(input, randomizer) + } + + /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. + fn commit_to_group_ped64(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_PEDERSEN_64.commit_uncompressed(input, randomizer) + } + + /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. + fn commit_to_group_ped128(input: &[bool], randomizer: &Scalar) -> Result> { + TESTNET_V1_PEDERSEN_128.commit_uncompressed(input, randomizer) + } + + /// Returns the BHP hash with an input hasher of 256-bits. + fn hash_bhp256(input: &[bool]) -> Result> { + TESTNET_V1_BHP_256.hash(input) + } + + /// Returns the BHP hash with an input hasher of 512-bits. + fn hash_bhp512(input: &[bool]) -> Result> { + TESTNET_V1_BHP_512.hash(input) + } + + /// Returns the BHP hash with an input hasher of 768-bits. + fn hash_bhp768(input: &[bool]) -> Result> { + TESTNET_V1_BHP_768.hash(input) + } + + /// Returns the BHP hash with an input hasher of 1024-bits. + fn hash_bhp1024(input: &[bool]) -> Result> { + TESTNET_V1_BHP_1024.hash(input) + } + + /// Returns the Keccak hash with a 256-bit output. + fn hash_keccak256(input: &[bool]) -> Result> { + Keccak256::default().hash(input) + } + + /// Returns the Keccak hash with a 384-bit output. + fn hash_keccak384(input: &[bool]) -> Result> { + Keccak384::default().hash(input) + } + + /// Returns the Keccak hash with a 512-bit output. + fn hash_keccak512(input: &[bool]) -> Result> { + Keccak512::default().hash(input) + } + + /// Returns the Pedersen hash for a given (up to) 64-bit input. + fn hash_ped64(input: &[bool]) -> Result> { + TESTNET_V1_PEDERSEN_64.hash(input) + } + + /// Returns the Pedersen hash for a given (up to) 128-bit input. + fn hash_ped128(input: &[bool]) -> Result> { + TESTNET_V1_PEDERSEN_128.hash(input) + } + + /// Returns the Poseidon hash with an input rate of 2. + fn hash_psd2(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_2.hash(input) + } + + /// Returns the Poseidon hash with an input rate of 4. + fn hash_psd4(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_4.hash(input) + } + + /// Returns the Poseidon hash with an input rate of 8. + fn hash_psd8(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_8.hash(input) + } + + /// Returns the SHA-3 hash with a 256-bit output. + fn hash_sha3_256(input: &[bool]) -> Result> { + Sha3_256::default().hash(input) + } + + /// Returns the SHA-3 hash with a 384-bit output. + fn hash_sha3_384(input: &[bool]) -> Result> { + Sha3_384::default().hash(input) + } + + /// Returns the SHA-3 hash with a 512-bit output. + fn hash_sha3_512(input: &[bool]) -> Result> { + Sha3_512::default().hash(input) + } + + /// Returns the extended Poseidon hash with an input rate of 2. + fn hash_many_psd2(input: &[Field], num_outputs: u16) -> Vec> { + TESTNET_V1_POSEIDON_2.hash_many(input, num_outputs) + } + + /// Returns the extended Poseidon hash with an input rate of 4. + fn hash_many_psd4(input: &[Field], num_outputs: u16) -> Vec> { + TESTNET_V1_POSEIDON_4.hash_many(input, num_outputs) + } + + /// Returns the extended Poseidon hash with an input rate of 8. + fn hash_many_psd8(input: &[Field], num_outputs: u16) -> Vec> { + TESTNET_V1_POSEIDON_8.hash_many(input, num_outputs) + } + + /// Returns the BHP hash with an input hasher of 256-bits. + fn hash_to_group_bhp256(input: &[bool]) -> Result> { + TESTNET_V1_BHP_256.hash_uncompressed(input) + } + + /// Returns the BHP hash with an input hasher of 512-bits. + fn hash_to_group_bhp512(input: &[bool]) -> Result> { + TESTNET_V1_BHP_512.hash_uncompressed(input) + } + + /// Returns the BHP hash with an input hasher of 768-bits. + fn hash_to_group_bhp768(input: &[bool]) -> Result> { + TESTNET_V1_BHP_768.hash_uncompressed(input) + } + + /// Returns the BHP hash with an input hasher of 1024-bits. + fn hash_to_group_bhp1024(input: &[bool]) -> Result> { + TESTNET_V1_BHP_1024.hash_uncompressed(input) + } + + /// Returns the Pedersen hash for a given (up to) 64-bit input. + fn hash_to_group_ped64(input: &[bool]) -> Result> { + TESTNET_V1_PEDERSEN_64.hash_uncompressed(input) + } + + /// Returns the Pedersen hash for a given (up to) 128-bit input. + fn hash_to_group_ped128(input: &[bool]) -> Result> { + TESTNET_V1_PEDERSEN_128.hash_uncompressed(input) + } + + /// Returns the Poseidon hash with an input rate of 2 on the affine curve. + fn hash_to_group_psd2(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_2.hash_to_group(input) + } + + /// Returns the Poseidon hash with an input rate of 4 on the affine curve. + fn hash_to_group_psd4(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_4.hash_to_group(input) + } + + /// Returns the Poseidon hash with an input rate of 8 on the affine curve. + fn hash_to_group_psd8(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_8.hash_to_group(input) + } + + /// Returns the Poseidon hash with an input rate of 2 on the scalar field. + fn hash_to_scalar_psd2(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_2.hash_to_scalar(input) + } + + /// Returns the Poseidon hash with an input rate of 4 on the scalar field. + fn hash_to_scalar_psd4(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_4.hash_to_scalar(input) + } + + /// Returns the Poseidon hash with an input rate of 8 on the scalar field. + fn hash_to_scalar_psd8(input: &[Field]) -> Result> { + TESTNET_V1_POSEIDON_8.hash_to_scalar(input) + } + + /// Returns a Merkle tree with a BHP leaf hasher of 1024-bits and a BHP path hasher of 512-bits. + fn merkle_tree_bhp(leaves: &[Vec]) -> Result> { + MerkleTree::new(&*TESTNET_V1_BHP_1024, &*TESTNET_V1_BHP_512, leaves) + } + + /// Returns a Merkle tree with a Poseidon leaf hasher with input rate of 4 and a Poseidon path hasher with input rate of 2. + fn merkle_tree_psd(leaves: &[Vec>]) -> Result> { + MerkleTree::new(&*TESTNET_V1_POSEIDON_4, &*TESTNET_V1_POSEIDON_2, leaves) + } + + /// Returns `true` if the given Merkle path is valid for the given root and leaf. + fn verify_merkle_path_bhp( + path: &MerklePath, + root: &Field, + leaf: &Vec, + ) -> bool { + path.verify(&*TESTNET_V1_BHP_1024, &*TESTNET_V1_BHP_512, root, leaf) + } + + /// Returns `true` if the given Merkle path is valid for the given root and leaf. + fn verify_merkle_path_psd( + path: &MerklePath, + root: &Field, + leaf: &Vec>, + ) -> bool { + path.verify(&*TESTNET_V1_POSEIDON_4, &*TESTNET_V1_POSEIDON_2, root, leaf) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + type CurrentNetwork = TestnetV1; + + #[test] + fn test_g_scalar_multiply() { + // Compute G^r. + let scalar = Scalar::rand(&mut TestRng::default()); + let group = CurrentNetwork::g_scalar_multiply(&scalar); + assert_eq!(group, CurrentNetwork::g_powers()[0] * scalar); + } +} From dfd00e6be562cbdbf7d12a0ff74f0706a5ae6c86 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 14:31:13 -0700 Subject: [PATCH 15/32] Introduce TestnetV1Circuit and AleoTestnetV1 --- circuit/environment/src/helpers/converter.rs | 12 +- circuit/environment/src/lib.rs | 3 + circuit/environment/src/testnet_v1_circuit.rs | 409 ++++++++++++ circuit/network/src/lib.rs | 3 + circuit/network/src/testnet_v1.rs | 598 ++++++++++++++++++ circuit/src/lib.rs | 11 +- 6 files changed, 1034 insertions(+), 2 deletions(-) create mode 100644 circuit/environment/src/testnet_v1_circuit.rs create mode 100644 circuit/network/src/testnet_v1.rs diff --git a/circuit/environment/src/helpers/converter.rs b/circuit/environment/src/helpers/converter.rs index 625b468f24..f846f23759 100644 --- a/circuit/environment/src/helpers/converter.rs +++ b/circuit/environment/src/helpers/converter.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{Circuit, LinearCombination, TestnetCircuit, Variable, R1CS}; +use crate::{Circuit, LinearCombination, TestnetCircuit, TestnetV1Circuit, Variable, R1CS}; use snarkvm_curves::edwards_bls12::Fq; use snarkvm_fields::PrimeField; @@ -44,6 +44,16 @@ impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for TestnetCircuit { } } +impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for TestnetV1Circuit { + /// Synthesizes the constraints from the environment into a `snarkvm_algorithms::r1cs`-compliant constraint system. + fn generate_constraints>( + &self, + cs: &mut CS, + ) -> Result<(), snarkvm_algorithms::r1cs::SynthesisError> { + crate::testnet_v1_circuit::TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().generate_constraints(cs)) + } +} + impl R1CS { /// Synthesizes the constraints from the environment into a `snarkvm_algorithms::r1cs`-compliant constraint system. fn generate_constraints>( diff --git a/circuit/environment/src/lib.rs b/circuit/environment/src/lib.rs index b47140bb94..07d2758d40 100644 --- a/circuit/environment/src/lib.rs +++ b/circuit/environment/src/lib.rs @@ -35,6 +35,9 @@ pub use macros::*; pub mod testnet_circuit; pub use testnet_circuit::*; +pub mod testnet_v1_circuit; +pub use testnet_v1_circuit::*; + pub mod traits; pub use traits::*; diff --git a/circuit/environment/src/testnet_v1_circuit.rs b/circuit/environment/src/testnet_v1_circuit.rs new file mode 100644 index 0000000000..72c8a6abf3 --- /dev/null +++ b/circuit/environment/src/testnet_v1_circuit.rs @@ -0,0 +1,409 @@ +// Copyright (C) 2019-2023 Aleo Systems Inc. +// This file is part of the snarkVM library. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::{helpers::Constraint, Mode, *}; + +use core::{ + cell::{Cell, RefCell}, + fmt, +}; + +type Field = ::Field; + +thread_local! { + static VARIABLE_LIMIT: Cell> = Cell::new(None); + static CONSTRAINT_LIMIT: Cell> = Cell::new(None); + pub(super) static TESTNET_V1_CIRCUIT: RefCell> = RefCell::new(R1CS::new()); + static IN_WITNESS: Cell = Cell::new(false); + static ZERO: LinearCombination = LinearCombination::zero(); + static ONE: LinearCombination = LinearCombination::one(); +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] +pub struct TestnetV1Circuit; + +impl Environment for TestnetV1Circuit { + type Affine = ::Affine; + type BaseField = Field; + type Network = console::TestnetV1; + type ScalarField = ::Scalar; + + /// Returns the `zero` constant. + fn zero() -> LinearCombination { + ZERO.with(|zero| zero.clone()) + } + + /// Returns the `one` constant. + fn one() -> LinearCombination { + ONE.with(|one| one.clone()) + } + + /// Returns a new variable of the given mode and value. + fn new_variable(mode: Mode, value: Self::BaseField) -> Variable { + IN_WITNESS.with(|in_witness| { + // Ensure we are not in witness mode. + if !in_witness.get() { + // Ensure that we do not surpass the variable limit for the circuit. + VARIABLE_LIMIT.with(|variable_limit| { + if let Some(limit) = variable_limit.get() { + if Self::num_variables() > limit { + Self::halt(format!("Surpassed the variable limit ({limit})")) + } + } + }); + TESTNET_V1_CIRCUIT.with(|circuit| match mode { + Mode::Constant => circuit.borrow_mut().new_constant(value), + Mode::Public => circuit.borrow_mut().new_public(value), + Mode::Private => circuit.borrow_mut().new_private(value), + }) + } else { + Self::halt("Tried to initialize a new variable in witness mode") + } + }) + } + + /// Returns a new witness of the given mode and value. + fn new_witness Output::Primitive, Output: Inject>(mode: Mode, logic: Fn) -> Output { + IN_WITNESS.with(|in_witness| { + // Set the entire environment to witness mode. + in_witness.replace(true); + + // Run the logic. + let output = logic(); + + // Return the entire environment from witness mode. + in_witness.replace(false); + + Inject::new(mode, output) + }) + } + + /// Enters a new scope for the environment. + fn scope, Fn, Output>(name: S, logic: Fn) -> Output + where + Fn: FnOnce() -> Output, + { + IN_WITNESS.with(|in_witness| { + // Ensure we are not in witness mode. + if !in_witness.get() { + TESTNET_V1_CIRCUIT.with(|circuit| { + // Set the entire environment to the new scope. + let name = name.into(); + if let Err(error) = circuit.borrow_mut().push_scope(&name) { + Self::halt(error) + } + + // Run the logic. + let output = logic(); + + // Return the entire environment to the previous scope. + if let Err(error) = circuit.borrow_mut().pop_scope(name) { + Self::halt(error) + } + + output + }) + } else { + Self::halt("Tried to initialize a new scope in witness mode") + } + }) + } + + /// Adds one constraint enforcing that `(A * B) == C`. + fn enforce(constraint: Fn) + where + Fn: FnOnce() -> (A, B, C), + A: Into>, + B: Into>, + C: Into>, + { + IN_WITNESS.with(|in_witness| { + // Ensure we are not in witness mode. + if !in_witness.get() { + TESTNET_V1_CIRCUIT.with(|circuit| { + // Ensure that we do not surpass the constraint limit for the circuit. + CONSTRAINT_LIMIT.with(|constraint_limit| { + if let Some(limit) = constraint_limit.get() { + if circuit.borrow().num_constraints() > limit { + Self::halt(format!("Surpassed the constraint limit ({limit})")) + } + } + }); + + let (a, b, c) = constraint(); + let (a, b, c) = (a.into(), b.into(), c.into()); + + // Ensure the constraint is not comprised of constants. + match a.is_constant() && b.is_constant() && c.is_constant() { + true => { + // Evaluate the constant constraint. + assert_eq!( + a.value() * b.value(), + c.value(), + "Constant constraint failed: ({a} * {b}) =?= {c}" + ); + + // match self.counter.scope().is_empty() { + // true => println!("Enforced constraint with constant terms: ({} * {}) =?= {}", a, b, c), + // false => println!( + // "Enforced constraint with constant terms ({}): ({} * {}) =?= {}", + // self.counter.scope(), a, b, c + // ), + // } + } + false => { + // Construct the constraint object. + let constraint = Constraint(circuit.borrow().scope(), a, b, c); + // Append the constraint. + circuit.borrow_mut().enforce(constraint) + } + } + }); + } else { + Self::halt("Tried to add a new constraint in witness mode") + } + }) + } + + /// Returns `true` if all constraints in the environment are satisfied. + fn is_satisfied() -> bool { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied()) + } + + /// Returns `true` if all constraints in the current scope are satisfied. + fn is_satisfied_in_scope() -> bool { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied_in_scope()) + } + + /// Returns the number of constants in the entire circuit. + fn num_constants() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constants()) + } + + /// Returns the number of public variables in the entire circuit. + fn num_public() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_public()) + } + + /// Returns the number of private variables in the entire circuit. + fn num_private() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_private()) + } + + /// Returns the number of constant, public, and private variables in the entire circuit. + fn num_variables() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_variables()) + } + + /// Returns the number of constraints in the entire circuit. + fn num_constraints() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constraints()) + } + + /// Returns the number of nonzeros in the entire circuit. + fn num_nonzeros() -> (u64, u64, u64) { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros()) + } + + /// Returns the number of constants for the current scope. + fn num_constants_in_scope() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constants_in_scope()) + } + + /// Returns the number of public variables for the current scope. + fn num_public_in_scope() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_public_in_scope()) + } + + /// Returns the number of private variables for the current scope. + fn num_private_in_scope() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_private_in_scope()) + } + + /// Returns the number of constraints for the current scope. + fn num_constraints_in_scope() -> u64 { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constraints_in_scope()) + } + + /// Returns the number of nonzeros for the current scope. + fn num_nonzeros_in_scope() -> (u64, u64, u64) { + TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros_in_scope()) + } + + /// Returns the variable limit for the circuit, if one exists. + fn get_variable_limit() -> Option { + VARIABLE_LIMIT.with(|current_limit| current_limit.get()) + } + + /// Sets the variable limit for the circuit. + fn set_variable_limit(limit: Option) { + VARIABLE_LIMIT.with(|current_limit| current_limit.replace(limit)); + } + + /// Returns the constraint limit for the circuit, if one exists. + fn get_constraint_limit() -> Option { + CONSTRAINT_LIMIT.with(|current_limit| current_limit.get()) + } + + /// Sets the constraint limit for the circuit. + fn set_constraint_limit(limit: Option) { + CONSTRAINT_LIMIT.with(|current_limit| current_limit.replace(limit)); + } + + /// Halts the program from further synthesis, evaluation, and execution in the current environment. + fn halt, T>(message: S) -> T { + let error = message.into(); + // eprintln!("{}", &error); + panic!("{}", &error) + } + + /// Returns the R1CS circuit, resetting the circuit. + fn inject_r1cs(r1cs: R1CS) { + TESTNET_V1_CIRCUIT.with(|circuit| { + // Ensure the circuit is empty before injecting. + assert_eq!(0, circuit.borrow().num_constants()); + assert_eq!(1, circuit.borrow().num_public()); + assert_eq!(0, circuit.borrow().num_private()); + assert_eq!(1, circuit.borrow().num_variables()); + assert_eq!(0, circuit.borrow().num_constraints()); + // Inject the R1CS instance. + let r1cs = circuit.replace(r1cs); + // Ensure the circuit that was replaced is empty. + assert_eq!(0, r1cs.num_constants()); + assert_eq!(1, r1cs.num_public()); + assert_eq!(0, r1cs.num_private()); + assert_eq!(1, r1cs.num_variables()); + assert_eq!(0, r1cs.num_constraints()); + }) + } + + /// Returns the R1CS circuit, resetting the circuit. + fn eject_r1cs_and_reset() -> R1CS { + TESTNET_V1_CIRCUIT.with(|circuit| { + // Reset the witness mode. + IN_WITNESS.with(|in_witness| in_witness.replace(false)); + // Reset the variable limit. + Self::set_variable_limit(None); + // Reset the constraint limit. + Self::set_constraint_limit(None); + // Eject the R1CS instance. + let r1cs = circuit.replace(R1CS::<::BaseField>::new()); + // Ensure the circuit is now empty. + assert_eq!(0, circuit.borrow().num_constants()); + assert_eq!(1, circuit.borrow().num_public()); + assert_eq!(0, circuit.borrow().num_private()); + assert_eq!(1, circuit.borrow().num_variables()); + assert_eq!(0, circuit.borrow().num_constraints()); + // Return the R1CS instance. + r1cs + }) + } + + /// Returns the R1CS assignment of the circuit, resetting the circuit. + fn eject_assignment_and_reset() -> Assignment<::Field> { + TESTNET_V1_CIRCUIT.with(|circuit| { + // Reset the witness mode. + IN_WITNESS.with(|in_witness| in_witness.replace(false)); + // Reset the variable limit. + Self::set_variable_limit(None); + // Reset the constraint limit. + Self::set_constraint_limit(None); + // Eject the R1CS instance. + let r1cs = circuit.replace(R1CS::<::BaseField>::new()); + assert_eq!(0, circuit.borrow().num_constants()); + assert_eq!(1, circuit.borrow().num_public()); + assert_eq!(0, circuit.borrow().num_private()); + assert_eq!(1, circuit.borrow().num_variables()); + assert_eq!(0, circuit.borrow().num_constraints()); + // Convert the R1CS instance to an assignment. + Assignment::from(r1cs) + }) + } + + /// Clears the circuit and initializes an empty environment. + fn reset() { + TESTNET_V1_CIRCUIT.with(|circuit| { + // Reset the witness mode. + IN_WITNESS.with(|in_witness| in_witness.replace(false)); + // Reset the variable limit. + Self::set_variable_limit(None); + // Reset the constraint limit. + Self::set_constraint_limit(None); + // Reset the circuit. + *circuit.borrow_mut() = R1CS::<::BaseField>::new(); + assert_eq!(0, circuit.borrow().num_constants()); + assert_eq!(1, circuit.borrow().num_public()); + assert_eq!(0, circuit.borrow().num_private()); + assert_eq!(1, circuit.borrow().num_variables()); + assert_eq!(0, circuit.borrow().num_constraints()); + }); + } +} + +impl fmt::Display for TestnetV1Circuit { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + TESTNET_V1_CIRCUIT.with(|circuit| write!(f, "{}", circuit.borrow())) + } +} + +#[cfg(test)] +mod tests { + use snarkvm_circuit::prelude::*; + + /// Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. + fn create_example_circuit() -> Field { + let one = snarkvm_console_types::Field::::one(); + let two = one + one; + + const EXPONENT: u64 = 64; + + // Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. + let mut candidate = Field::::new(Mode::Public, one); + let mut accumulator = Field::new(Mode::Private, two); + for _ in 0..EXPONENT { + candidate += &accumulator; + accumulator *= Field::new(Mode::Private, two); + } + + assert_eq!((accumulator - Field::one()).eject_value(), candidate.eject_value()); + assert_eq!(2, E::num_public()); + assert_eq!(2 * EXPONENT + 1, E::num_private()); + assert_eq!(EXPONENT, E::num_constraints()); + assert!(E::is_satisfied()); + + candidate + } + + #[test] + fn test_print_circuit() { + let _candidate = create_example_circuit::(); + let output = format!("{TestnetV1Circuit}"); + println!("{output}"); + } + + #[test] + fn test_circuit_scope() { + TestnetV1Circuit::scope("test_circuit_scope", || { + assert_eq!(0, TestnetV1Circuit::num_constants()); + assert_eq!(1, TestnetV1Circuit::num_public()); + assert_eq!(0, TestnetV1Circuit::num_private()); + assert_eq!(0, TestnetV1Circuit::num_constraints()); + + assert_eq!(0, TestnetV1Circuit::num_constants_in_scope()); + assert_eq!(0, TestnetV1Circuit::num_public_in_scope()); + assert_eq!(0, TestnetV1Circuit::num_private_in_scope()); + assert_eq!(0, TestnetV1Circuit::num_constraints_in_scope()); + }) + } +} diff --git a/circuit/network/src/lib.rs b/circuit/network/src/lib.rs index 36c131a70d..58e7b09306 100644 --- a/circuit/network/src/lib.rs +++ b/circuit/network/src/lib.rs @@ -18,6 +18,9 @@ pub mod testnet_v0; pub use testnet_v0::*; +pub mod testnet_v1; +pub use testnet_v1::*; + pub mod v0; pub use v0::*; diff --git a/circuit/network/src/testnet_v1.rs b/circuit/network/src/testnet_v1.rs new file mode 100644 index 0000000000..15d0135a61 --- /dev/null +++ b/circuit/network/src/testnet_v1.rs @@ -0,0 +1,598 @@ +// Copyright (C) 2019-2023 Aleo Systems Inc. +// This file is part of the snarkVM library. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::Aleo; +use snarkvm_circuit_algorithms::{ + Commit, + CommitUncompressed, + Hash, + HashMany, + HashToGroup, + HashToScalar, + HashUncompressed, + Keccak256, + Keccak384, + Keccak512, + Pedersen128, + Pedersen64, + Poseidon2, + Poseidon4, + Poseidon8, + Sha3_256, + Sha3_384, + Sha3_512, + BHP1024, + BHP256, + BHP512, + BHP768, +}; +use snarkvm_circuit_collections::merkle_tree::MerklePath; +use snarkvm_circuit_types::{ + environment::{prelude::*, Assignment, TestnetV1Circuit, R1CS}, + Boolean, + Field, + Group, + Scalar, +}; + +use core::fmt; + +type E = TestnetV1Circuit; + +thread_local! { + /// The group bases for the Aleo signature and encryption schemes. + 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()); + /// The graph key domain as a constant field element. + 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()); + + /// The BHP hash function, which can take an input of up to 256 bits. + static BHP_256: BHP256 = BHP256::::constant(console::TESTNET_V1_BHP_256.clone()); + /// The BHP hash function, which can take an input of up to 512 bits. + static BHP_512: BHP512 = BHP512::::constant(console::TESTNET_V1_BHP_512.clone()); + /// The BHP hash function, which can take an input of up to 768 bits. + static BHP_768: BHP768 = BHP768::::constant(console::TESTNET_V1_BHP_768.clone()); + /// The BHP hash function, which can take an input of up to 1024 bits. + static BHP_1024: BHP1024 = BHP1024::::constant(console::TESTNET_V1_BHP_1024.clone()); + + /// The Keccak hash function, which outputs 256 bits. + static KECCAK_256: Keccak256 = Keccak256::::new(); + /// The Keccak hash function, which outputs 384 bits. + static KECCAK_384: Keccak384 = Keccak384::::new(); + /// The Keccak hash function, which outputs 512 bits. + static KECCAK_512: Keccak512 = Keccak512::::new(); + + /// The Pedersen hash function, which can take an input of up to 64 bits. + static PEDERSEN_64: Pedersen64 = Pedersen64::::constant(console::TESTNET_V1_PEDERSEN_64.clone()); + /// The Pedersen hash function, which can take an input of up to 128 bits. + static PEDERSEN_128: Pedersen128 = Pedersen128::::constant(console::TESTNET_V1_PEDERSEN_128.clone()); + + /// The Poseidon hash function, using a rate of 2. + static POSEIDON_2: Poseidon2 = Poseidon2::::constant(console::TESTNET_V1_POSEIDON_2.clone()); + /// The Poseidon hash function, using a rate of 4. + static POSEIDON_4: Poseidon4 = Poseidon4::::constant(console::TESTNET_V1_POSEIDON_4.clone()); + /// The Poseidon hash function, using a rate of 8. + static POSEIDON_8: Poseidon8 = Poseidon8::::constant(console::TESTNET_V1_POSEIDON_8.clone()); + + /// The SHA-3 hash function, which outputs 256 bits. + static SHA3_256: Sha3_256 = Sha3_256::::new(); + /// The SHA-3 hash function, which outputs 384 bits. + static SHA3_384: Sha3_384 = Sha3_384::::new(); + /// The SHA-3 hash function, which outputs 512 bits. + static SHA3_512: Sha3_512 = Sha3_512::::new(); +} + +#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] +pub struct AleoTestnetV1; + +impl Aleo for AleoTestnetV1 { + /// Initializes the global constants for the Aleo environment. + fn initialize_global_constants() { + GENERATOR_G.with(|_| ()); + ENCRYPTION_DOMAIN.with(|_| ()); + GRAPH_KEY_DOMAIN.with(|_| ()); + SERIAL_NUMBER_DOMAIN.with(|_| ()); + BHP_256.with(|_| ()); + BHP_512.with(|_| ()); + BHP_768.with(|_| ()); + BHP_1024.with(|_| ()); + KECCAK_256.with(|_| ()); + KECCAK_384.with(|_| ()); + KECCAK_512.with(|_| ()); + PEDERSEN_64.with(|_| ()); + PEDERSEN_128.with(|_| ()); + POSEIDON_2.with(|_| ()); + POSEIDON_4.with(|_| ()); + POSEIDON_8.with(|_| ()); + SHA3_256.with(|_| ()); + SHA3_384.with(|_| ()); + SHA3_512.with(|_| ()); + } + + /// Returns the encryption domain as a constant field element. + fn encryption_domain() -> Field { + ENCRYPTION_DOMAIN.with(|domain| domain.clone()) + } + + /// Returns the graph key domain as a constant field element. + fn graph_key_domain() -> Field { + GRAPH_KEY_DOMAIN.with(|domain| domain.clone()) + } + + /// Returns the serial number domain as a constant field element. + fn serial_number_domain() -> Field { + SERIAL_NUMBER_DOMAIN.with(|domain| domain.clone()) + } + + /// Returns the scalar multiplication on the generator `G`. + #[inline] + fn g_scalar_multiply(scalar: &Scalar) -> Group { + GENERATOR_G.with(|bases| { + bases + .iter() + .zip_eq(&scalar.to_bits_le()) + .fold(Group::zero(), |output, (base, bit)| Group::ternary(bit, &(&output + base), &output)) + }) + } + + /// Returns a BHP commitment with an input hasher of 256-bits. + fn commit_bhp256(input: &[Boolean], randomizer: &Scalar) -> Field { + BHP_256.with(|bhp| bhp.commit(input, randomizer)) + } + + /// Returns a BHP commitment with an input hasher of 512-bits. + fn commit_bhp512(input: &[Boolean], randomizer: &Scalar) -> Field { + BHP_512.with(|bhp| bhp.commit(input, randomizer)) + } + + /// Returns a BHP commitment with an input hasher of 768-bits. + fn commit_bhp768(input: &[Boolean], randomizer: &Scalar) -> Field { + BHP_768.with(|bhp| bhp.commit(input, randomizer)) + } + + /// Returns a BHP commitment with an input hasher of 1024-bits. + fn commit_bhp1024(input: &[Boolean], randomizer: &Scalar) -> Field { + BHP_1024.with(|bhp| bhp.commit(input, randomizer)) + } + + /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. + fn commit_ped64(input: &[Boolean], randomizer: &Scalar) -> Field { + PEDERSEN_64.with(|pedersen| pedersen.commit(input, randomizer)) + } + + /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. + fn commit_ped128(input: &[Boolean], randomizer: &Scalar) -> Field { + PEDERSEN_128.with(|pedersen| pedersen.commit(input, randomizer)) + } + + /// Returns a BHP commitment with an input hasher of 256-bits. + fn commit_to_group_bhp256(input: &[Boolean], randomizer: &Scalar) -> Group { + BHP_256.with(|bhp| bhp.commit_uncompressed(input, randomizer)) + } + + /// Returns a BHP commitment with an input hasher of 512-bits. + fn commit_to_group_bhp512(input: &[Boolean], randomizer: &Scalar) -> Group { + BHP_512.with(|bhp| bhp.commit_uncompressed(input, randomizer)) + } + + /// Returns a BHP commitment with an input hasher of 768-bits. + fn commit_to_group_bhp768(input: &[Boolean], randomizer: &Scalar) -> Group { + BHP_768.with(|bhp| bhp.commit_uncompressed(input, randomizer)) + } + + /// Returns a BHP commitment with an input hasher of 1024-bits. + fn commit_to_group_bhp1024(input: &[Boolean], randomizer: &Scalar) -> Group { + BHP_1024.with(|bhp| bhp.commit_uncompressed(input, randomizer)) + } + + /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. + fn commit_to_group_ped64(input: &[Boolean], randomizer: &Scalar) -> Group { + PEDERSEN_64.with(|pedersen| pedersen.commit_uncompressed(input, randomizer)) + } + + /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. + fn commit_to_group_ped128(input: &[Boolean], randomizer: &Scalar) -> Group { + PEDERSEN_128.with(|pedersen| pedersen.commit_uncompressed(input, randomizer)) + } + + /// Returns the BHP hash with an input hasher of 256-bits. + fn hash_bhp256(input: &[Boolean]) -> Field { + BHP_256.with(|bhp| bhp.hash(input)) + } + + /// Returns the BHP hash with an input hasher of 512-bits. + fn hash_bhp512(input: &[Boolean]) -> Field { + BHP_512.with(|bhp| bhp.hash(input)) + } + + /// Returns the BHP hash with an input hasher of 768-bits. + fn hash_bhp768(input: &[Boolean]) -> Field { + BHP_768.with(|bhp| bhp.hash(input)) + } + + /// Returns the BHP hash with an input hasher of 1024-bits. + fn hash_bhp1024(input: &[Boolean]) -> Field { + BHP_1024.with(|bhp| bhp.hash(input)) + } + + /// Returns the Keccak hash with a 256-bit output. + fn hash_keccak256(input: &[Boolean]) -> Vec> { + KECCAK_256.with(|keccak| keccak.hash(input)) + } + + /// Returns the Keccak hash with a 384-bit output. + fn hash_keccak384(input: &[Boolean]) -> Vec> { + KECCAK_384.with(|keccak| keccak.hash(input)) + } + + /// Returns the Keccak hash with a 512-bit output. + fn hash_keccak512(input: &[Boolean]) -> Vec> { + KECCAK_512.with(|keccak| keccak.hash(input)) + } + + /// Returns the Pedersen hash for a given (up to) 64-bit input. + fn hash_ped64(input: &[Boolean]) -> Field { + PEDERSEN_64.with(|pedersen| pedersen.hash(input)) + } + + /// Returns the Pedersen hash for a given (up to) 128-bit input. + fn hash_ped128(input: &[Boolean]) -> Field { + PEDERSEN_128.with(|pedersen| pedersen.hash(input)) + } + + /// Returns the Poseidon hash with an input rate of 2. + fn hash_psd2(input: &[Field]) -> Field { + POSEIDON_2.with(|poseidon| poseidon.hash(input)) + } + + /// Returns the Poseidon hash with an input rate of 4. + fn hash_psd4(input: &[Field]) -> Field { + POSEIDON_4.with(|poseidon| poseidon.hash(input)) + } + + /// Returns the Poseidon hash with an input rate of 8. + fn hash_psd8(input: &[Field]) -> Field { + POSEIDON_8.with(|poseidon| poseidon.hash(input)) + } + + /// Returns the SHA-3 hash with a 256-bit output. + fn hash_sha3_256(input: &[Boolean]) -> Vec> { + SHA3_256.with(|sha3| sha3.hash(input)) + } + + /// Returns the SHA-3 hash with a 384-bit output. + fn hash_sha3_384(input: &[Boolean]) -> Vec> { + SHA3_384.with(|sha3| sha3.hash(input)) + } + + /// Returns the SHA-3 hash with a 512-bit output. + fn hash_sha3_512(input: &[Boolean]) -> Vec> { + SHA3_512.with(|sha3| sha3.hash(input)) + } + + /// Returns the extended Poseidon hash with an input rate of 2. + fn hash_many_psd2(input: &[Field], num_outputs: u16) -> Vec> { + POSEIDON_2.with(|poseidon| poseidon.hash_many(input, num_outputs)) + } + + /// Returns the extended Poseidon hash with an input rate of 4. + fn hash_many_psd4(input: &[Field], num_outputs: u16) -> Vec> { + POSEIDON_4.with(|poseidon| poseidon.hash_many(input, num_outputs)) + } + + /// Returns the extended Poseidon hash with an input rate of 8. + fn hash_many_psd8(input: &[Field], num_outputs: u16) -> Vec> { + POSEIDON_8.with(|poseidon| poseidon.hash_many(input, num_outputs)) + } + + /// Returns the BHP hash with an input hasher of 256-bits. + fn hash_to_group_bhp256(input: &[Boolean]) -> Group { + BHP_256.with(|bhp| bhp.hash_uncompressed(input)) + } + + /// Returns the BHP hash with an input hasher of 512-bits. + fn hash_to_group_bhp512(input: &[Boolean]) -> Group { + BHP_512.with(|bhp| bhp.hash_uncompressed(input)) + } + + /// Returns the BHP hash with an input hasher of 768-bits. + fn hash_to_group_bhp768(input: &[Boolean]) -> Group { + BHP_768.with(|bhp| bhp.hash_uncompressed(input)) + } + + /// Returns the BHP hash with an input hasher of 1024-bits. + fn hash_to_group_bhp1024(input: &[Boolean]) -> Group { + BHP_1024.with(|bhp| bhp.hash_uncompressed(input)) + } + + /// Returns the Pedersen hash for a given (up to) 64-bit input. + fn hash_to_group_ped64(input: &[Boolean]) -> Group { + PEDERSEN_64.with(|pedersen| pedersen.hash_uncompressed(input)) + } + + /// Returns the Pedersen hash for a given (up to) 128-bit input. + fn hash_to_group_ped128(input: &[Boolean]) -> Group { + PEDERSEN_128.with(|pedersen| pedersen.hash_uncompressed(input)) + } + + /// Returns the Poseidon hash with an input rate of 2 on the affine curve. + fn hash_to_group_psd2(input: &[Field]) -> Group { + POSEIDON_2.with(|poseidon| poseidon.hash_to_group(input)) + } + + /// Returns the Poseidon hash with an input rate of 4 on the affine curve. + fn hash_to_group_psd4(input: &[Field]) -> Group { + POSEIDON_4.with(|poseidon| poseidon.hash_to_group(input)) + } + + /// Returns the Poseidon hash with an input rate of 8 on the affine curve. + fn hash_to_group_psd8(input: &[Field]) -> Group { + POSEIDON_8.with(|poseidon| poseidon.hash_to_group(input)) + } + + /// Returns the Poseidon hash with an input rate of 2 on the scalar field. + fn hash_to_scalar_psd2(input: &[Field]) -> Scalar { + POSEIDON_2.with(|poseidon| poseidon.hash_to_scalar(input)) + } + + /// Returns the Poseidon hash with an input rate of 4 on the scalar field. + fn hash_to_scalar_psd4(input: &[Field]) -> Scalar { + POSEIDON_4.with(|poseidon| poseidon.hash_to_scalar(input)) + } + + /// Returns the Poseidon hash with an input rate of 8 on the scalar field. + fn hash_to_scalar_psd8(input: &[Field]) -> Scalar { + POSEIDON_8.with(|poseidon| poseidon.hash_to_scalar(input)) + } + + /// Returns `true` if the given Merkle path is valid for the given root and leaf. + fn verify_merkle_path_bhp( + path: &MerklePath, + root: &Field, + leaf: &Vec>, + ) -> Boolean { + BHP_1024.with(|bhp1024| BHP_512.with(|bhp512| path.verify(bhp1024, bhp512, root, leaf))) + } + + /// Returns `true` if the given Merkle path is valid for the given root and leaf. + fn verify_merkle_path_psd( + path: &MerklePath, + root: &Field, + leaf: &Vec>, + ) -> Boolean { + POSEIDON_4.with(|psd4| POSEIDON_2.with(|psd2| path.verify(psd4, psd2, root, leaf))) + } +} + +impl Environment for AleoTestnetV1 { + type Affine = ::Affine; + type BaseField = ::BaseField; + type Network = ::Network; + type ScalarField = ::ScalarField; + + /// Returns the `zero` constant. + fn zero() -> LinearCombination { + E::zero() + } + + /// Returns the `one` constant. + fn one() -> LinearCombination { + E::one() + } + + /// Returns a new variable of the given mode and value. + fn new_variable(mode: Mode, value: Self::BaseField) -> Variable { + E::new_variable(mode, value) + } + + /// Returns a new witness of the given mode and value. + fn new_witness Output::Primitive, Output: Inject>(mode: Mode, logic: Fn) -> Output { + E::new_witness(mode, logic) + } + + /// Enters a new scope for the environment. + fn scope, Fn, Output>(name: S, logic: Fn) -> Output + where + Fn: FnOnce() -> Output, + { + E::scope(name, logic) + } + + /// Adds one constraint enforcing that `(A * B) == C`. + fn enforce(constraint: Fn) + where + Fn: FnOnce() -> (A, B, C), + A: Into>, + B: Into>, + C: Into>, + { + E::enforce(constraint) + } + + /// Returns `true` if all constraints in the environment are satisfied. + fn is_satisfied() -> bool { + E::is_satisfied() + } + + /// Returns `true` if all constraints in the current scope are satisfied. + fn is_satisfied_in_scope() -> bool { + E::is_satisfied_in_scope() + } + + /// Returns the number of constants in the entire circuit. + fn num_constants() -> u64 { + E::num_constants() + } + + /// Returns the number of public variables in the entire circuit. + fn num_public() -> u64 { + E::num_public() + } + + /// Returns the number of private variables in the entire circuit. + fn num_private() -> u64 { + E::num_private() + } + + /// Returns the number of constant, public, and private variables in the entire circuit. + fn num_variables() -> u64 { + E::num_variables() + } + + /// Returns the number of constraints in the entire circuit. + fn num_constraints() -> u64 { + E::num_constraints() + } + + /// Returns the number of nonzeros in the entire circuit. + fn num_nonzeros() -> (u64, u64, u64) { + E::num_nonzeros() + } + + /// Returns the number of constants for the current scope. + fn num_constants_in_scope() -> u64 { + E::num_constants_in_scope() + } + + /// Returns the number of public variables for the current scope. + fn num_public_in_scope() -> u64 { + E::num_public_in_scope() + } + + /// Returns the number of private variables for the current scope. + fn num_private_in_scope() -> u64 { + E::num_private_in_scope() + } + + /// Returns the number of constraints for the current scope. + fn num_constraints_in_scope() -> u64 { + E::num_constraints_in_scope() + } + + /// Returns the number of nonzeros for the current scope. + fn num_nonzeros_in_scope() -> (u64, u64, u64) { + E::num_nonzeros_in_scope() + } + + /// Returns the variable limit for the circuit, if one exists. + fn get_variable_limit() -> Option { + E::get_variable_limit() + } + + /// Sets the variable limit for the circuit. + fn set_variable_limit(limit: Option) { + E::set_variable_limit(limit) + } + + /// Returns the constraint limit for the circuit, if one exists. + fn get_constraint_limit() -> Option { + E::get_constraint_limit() + } + + /// Sets the constraint limit for the circuit. + fn set_constraint_limit(limit: Option) { + E::set_constraint_limit(limit) + } + + /// Halts the program from further synthesis, evaluation, and execution in the current environment. + fn halt, T>(message: S) -> T { + E::halt(message) + } + + /// Returns the R1CS circuit, resetting the circuit. + fn inject_r1cs(r1cs: R1CS) { + E::inject_r1cs(r1cs) + } + + /// Returns the R1CS circuit, resetting the circuit. + fn eject_r1cs_and_reset() -> R1CS { + E::eject_r1cs_and_reset() + } + + /// Returns the R1CS assignment of the circuit, resetting the circuit. + fn eject_assignment_and_reset() -> Assignment<::Field> { + E::eject_assignment_and_reset() + } + + /// Clears the circuit and initializes an empty environment. + fn reset() { + E::reset() + } +} + +impl Display for AleoTestnetV1 { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { + // TODO (howardwu): Find a better way to print the circuit. + fmt::Display::fmt(&TestnetV1Circuit, f) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use snarkvm_circuit_types::Field; + + type CurrentAleo = AleoTestnetV1; + + /// Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. + fn create_example_circuit() -> Field { + let one = snarkvm_console_types::Field::<::Network>::one(); + let two = one + one; + + const EXPONENT: u64 = 64; + + // Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. + let mut candidate = Field::::new(Mode::Public, one); + let mut accumulator = Field::new(Mode::Private, two); + for _ in 0..EXPONENT { + candidate += &accumulator; + accumulator *= Field::new(Mode::Private, two); + } + + assert_eq!((accumulator - Field::one()).eject_value(), candidate.eject_value()); + assert_eq!(2, E::num_public()); + assert_eq!(2 * EXPONENT + 1, E::num_private()); + assert_eq!(EXPONENT, E::num_constraints()); + assert!(E::is_satisfied()); + + candidate + } + + #[test] + fn test_print_circuit() { + let circuit = CurrentAleo {}; + let _candidate = create_example_circuit::(); + let output = format!("{circuit}"); + println!("{output}"); + } + + #[test] + fn test_circuit_scope() { + CurrentAleo::scope("test_circuit_scope", || { + assert_eq!(0, CurrentAleo::num_constants()); + assert_eq!(1, CurrentAleo::num_public()); + assert_eq!(0, CurrentAleo::num_private()); + assert_eq!(0, CurrentAleo::num_constraints()); + + assert_eq!(0, CurrentAleo::num_constants_in_scope()); + assert_eq!(0, CurrentAleo::num_public_in_scope()); + assert_eq!(0, CurrentAleo::num_private_in_scope()); + assert_eq!(0, CurrentAleo::num_constraints_in_scope()); + }) + } +} diff --git a/circuit/src/lib.rs b/circuit/src/lib.rs index 78af7cfe6c..f8342b02f5 100644 --- a/circuit/src/lib.rs +++ b/circuit/src/lib.rs @@ -27,7 +27,16 @@ pub mod modules { pub use snarkvm_circuit_collections::*; pub use snarkvm_circuit_environment as environment; - pub use snarkvm_circuit_environment::{Assignment, Circuit, Eject, Environment, Inject, Mode, TestnetCircuit}; + pub use snarkvm_circuit_environment::{ + Assignment, + Circuit, + Eject, + Environment, + Inject, + Mode, + TestnetCircuit, + TestnetV1Circuit, + }; pub use snarkvm_circuit_network as network; pub use snarkvm_circuit_network::*; From 6120c6774b24bc3ee59cc1108e3b9bf30fa3468b Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 14:31:57 -0700 Subject: [PATCH 16/32] Add parameter synthesis for TestnetV1 --- parameters/examples/inclusion.rs | 5 ++++- parameters/examples/setup.rs | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/parameters/examples/inclusion.rs b/parameters/examples/inclusion.rs index 4b69ffaa2c..e1acc884cd 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::{MainnetV0, Network, TestnetV0}, + network::{MainnetV0, Network, TestnetV0, TestnetV1}, prelude::{One, ToBytes, Zero}, program::{Plaintext, Record, StatePath}, types::Field, @@ -176,6 +176,9 @@ pub fn main() -> Result<()> { "testnet" => { inclusion::()?; } + "testnet_v1" => { + inclusion::()?; + } _ => panic!("Invalid network"), }; diff --git a/parameters/examples/setup.rs b/parameters/examples/setup.rs index 557879d374..b9f5678545 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, MainnetV0, Network, TestnetV0}; +use snarkvm_console::network::{prelude::ToBytes, MainnetV0, Network, TestnetV0, TestnetV1}; use snarkvm_synthesizer::{Process, Program}; use anyhow::Result; @@ -152,6 +152,7 @@ pub fn main() -> Result<()> { "credits" => match args[2].as_str() { "mainnet" => credits_program::(), "testnet" => credits_program::(), + "testnet_v1" => credits_program::(), _ => panic!("Invalid network"), }?, _ => panic!("Invalid parameter"), From a8b0c8271b0fa3680395be34542ea1c93d5e7e60 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 14:49:33 -0700 Subject: [PATCH 17/32] Add parameters for TestnetV1 --- parameters/scripts/testnet_v1/credits.sh | 9 ++ parameters/scripts/testnet_v1/inclusion.sh | 9 ++ parameters/src/lib.rs | 2 + parameters/src/testnet_v1/genesis.rs | 32 ++++ parameters/src/testnet_v1/mod.rs | 138 ++++++++++++++++++ .../src/testnet_v1/resources/block.genesis | Bin 0 -> 14943 bytes .../testnet_v1/resources/bond_public.metadata | 6 + .../testnet_v1/resources/bond_public.verifier | Bin 0 -> 673 bytes .../resources/claim_unbond_public.metadata | 6 + .../resources/claim_unbond_public.verifier | Bin 0 -> 673 bytes .../testnet_v1/resources/fee_private.metadata | 6 + .../testnet_v1/resources/fee_private.verifier | Bin 0 -> 673 bytes .../testnet_v1/resources/fee_public.metadata | 6 + .../testnet_v1/resources/fee_public.verifier | Bin 0 -> 673 bytes .../testnet_v1/resources/inclusion.metadata | 6 + .../testnet_v1/resources/inclusion.verifier | Bin 0 -> 673 bytes .../src/testnet_v1/resources/join.metadata | 6 + .../src/testnet_v1/resources/join.verifier | Bin 0 -> 673 bytes .../resources/set_validator_state.metadata | 6 + .../resources/set_validator_state.verifier | Bin 0 -> 673 bytes .../src/testnet_v1/resources/split.metadata | 6 + .../src/testnet_v1/resources/split.verifier | Bin 0 -> 673 bytes .../resources/transfer_private.metadata | 6 + .../resources/transfer_private.verifier | Bin 0 -> 673 bytes .../transfer_private_to_public.metadata | 6 + .../transfer_private_to_public.verifier | Bin 0 -> 673 bytes .../resources/transfer_public.metadata | 6 + .../resources/transfer_public.verifier | Bin 0 -> 673 bytes .../transfer_public_as_signer.metadata | 6 + .../transfer_public_as_signer.verifier | Bin 0 -> 673 bytes .../transfer_public_to_private.metadata | 6 + .../transfer_public_to_private.verifier | Bin 0 -> 673 bytes .../unbond_delegator_as_validator.metadata | 6 + .../unbond_delegator_as_validator.verifier | Bin 0 -> 673 bytes .../resources/unbond_public.metadata | 6 + .../resources/unbond_public.verifier | Bin 0 -> 673 bytes 36 files changed, 280 insertions(+) create mode 100755 parameters/scripts/testnet_v1/credits.sh create mode 100755 parameters/scripts/testnet_v1/inclusion.sh create mode 100644 parameters/src/testnet_v1/genesis.rs create mode 100644 parameters/src/testnet_v1/mod.rs create mode 100644 parameters/src/testnet_v1/resources/block.genesis create mode 100644 parameters/src/testnet_v1/resources/bond_public.metadata create mode 100644 parameters/src/testnet_v1/resources/bond_public.verifier create mode 100644 parameters/src/testnet_v1/resources/claim_unbond_public.metadata create mode 100644 parameters/src/testnet_v1/resources/claim_unbond_public.verifier create mode 100644 parameters/src/testnet_v1/resources/fee_private.metadata create mode 100644 parameters/src/testnet_v1/resources/fee_private.verifier create mode 100644 parameters/src/testnet_v1/resources/fee_public.metadata create mode 100644 parameters/src/testnet_v1/resources/fee_public.verifier create mode 100644 parameters/src/testnet_v1/resources/inclusion.metadata create mode 100644 parameters/src/testnet_v1/resources/inclusion.verifier create mode 100644 parameters/src/testnet_v1/resources/join.metadata create mode 100644 parameters/src/testnet_v1/resources/join.verifier create mode 100644 parameters/src/testnet_v1/resources/set_validator_state.metadata create mode 100644 parameters/src/testnet_v1/resources/set_validator_state.verifier create mode 100644 parameters/src/testnet_v1/resources/split.metadata create mode 100644 parameters/src/testnet_v1/resources/split.verifier create mode 100644 parameters/src/testnet_v1/resources/transfer_private.metadata create mode 100644 parameters/src/testnet_v1/resources/transfer_private.verifier create mode 100644 parameters/src/testnet_v1/resources/transfer_private_to_public.metadata create mode 100644 parameters/src/testnet_v1/resources/transfer_private_to_public.verifier create mode 100644 parameters/src/testnet_v1/resources/transfer_public.metadata create mode 100644 parameters/src/testnet_v1/resources/transfer_public.verifier create mode 100644 parameters/src/testnet_v1/resources/transfer_public_as_signer.metadata create mode 100644 parameters/src/testnet_v1/resources/transfer_public_as_signer.verifier create mode 100644 parameters/src/testnet_v1/resources/transfer_public_to_private.metadata create mode 100644 parameters/src/testnet_v1/resources/transfer_public_to_private.verifier create mode 100644 parameters/src/testnet_v1/resources/unbond_delegator_as_validator.metadata create mode 100644 parameters/src/testnet_v1/resources/unbond_delegator_as_validator.verifier create mode 100644 parameters/src/testnet_v1/resources/unbond_public.metadata create mode 100644 parameters/src/testnet_v1/resources/unbond_public.verifier diff --git a/parameters/scripts/testnet_v1/credits.sh b/parameters/scripts/testnet_v1/credits.sh new file mode 100755 index 0000000000..6ae887f9aa --- /dev/null +++ b/parameters/scripts/testnet_v1/credits.sh @@ -0,0 +1,9 @@ +# Generate proving and verifying keys. + +# Inputs: program name + +cargo run --release --example setup credits testnet_v1 -- --nocapture || exit + +mv *.metadata ../../src/testnet_v1/resources || exit +mv *.prover.* ~/.aleo/resources || exit +mv *.verifier ../../src/testnet_v1/resources || exit diff --git a/parameters/scripts/testnet_v1/inclusion.sh b/parameters/scripts/testnet_v1/inclusion.sh new file mode 100755 index 0000000000..e138086670 --- /dev/null +++ b/parameters/scripts/testnet_v1/inclusion.sh @@ -0,0 +1,9 @@ +# Generates the inclusion proving and verifying key. + +# Inputs: network + +cargo run --release --example inclusion testnet_v1 -- --nocapture || exit + +mv inclusion.metadata ../../src/testnet_v1/resources || exit +mv inclusion.prover.* ~/.aleo/resources || exit +mv inclusion.verifier ../../src/testnet_v1/resources || exit diff --git a/parameters/src/lib.rs b/parameters/src/lib.rs index 221b9c2754..1616a62186 100644 --- a/parameters/src/lib.rs +++ b/parameters/src/lib.rs @@ -34,6 +34,8 @@ pub mod mainnet; pub mod testnet; +pub mod testnet_v1; + pub mod prelude { pub use crate::errors::*; } diff --git a/parameters/src/testnet_v1/genesis.rs b/parameters/src/testnet_v1/genesis.rs new file mode 100644 index 0000000000..d3a8b49351 --- /dev/null +++ b/parameters/src/testnet_v1/genesis.rs @@ -0,0 +1,32 @@ +// Copyright (C) 2019-2023 Aleo Systems Inc. +// This file is part of the snarkVM library. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub struct GenesisBytes; + +impl GenesisBytes { + pub const fn load_bytes() -> &'static [u8] { + include_bytes!("./resources/block.genesis") + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_genesis_block() { + let bytes = GenesisBytes::load_bytes(); + assert_eq!(14943, bytes.len() as u64, "Update me if serialization has changed"); + } +} diff --git a/parameters/src/testnet_v1/mod.rs b/parameters/src/testnet_v1/mod.rs new file mode 100644 index 0000000000..a62fcf9558 --- /dev/null +++ b/parameters/src/testnet_v1/mod.rs @@ -0,0 +1,138 @@ +// Copyright (C) 2019-2023 Aleo Systems Inc. +// This file is part of the snarkVM library. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at: +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +pub mod genesis; +pub use genesis::*; + +const REMOTE_URL: &str = "https://s3-us-west-1.amazonaws.com/testnet-v1.parameters"; + +// BondPublic +impl_remote!(BondPublicProver, REMOTE_URL, "resources/", "bond_public", "prover"); +impl_local!(BondPublicVerifier, "resources/", "bond_public", "verifier"); +// UnbondPublic +impl_remote!(UnbondPublicProver, REMOTE_URL, "resources/", "unbond_public", "prover"); +impl_local!(UnbondPublicVerifier, "resources/", "unbond_public", "verifier"); +// UnbondDelegatorAsValidator +impl_remote!(UnbondDelegatorAsValidatorProver, REMOTE_URL, "resources/", "unbond_delegator_as_validator", "prover"); +impl_local!(UnbondDelegatorAsValidatorVerifier, "resources/", "unbond_delegator_as_validator", "verifier"); +// ClaimUnbondPublic +impl_remote!(ClaimUnbondPublicProver, REMOTE_URL, "resources/", "claim_unbond_public", "prover"); +impl_local!(ClaimUnbondPublicVerifier, "resources/", "claim_unbond_public", "verifier"); +// SetValidatorState +impl_remote!(SetValidatorStateProver, REMOTE_URL, "resources/", "set_validator_state", "prover"); +impl_local!(SetValidatorStateVerifier, "resources/", "set_validator_state", "verifier"); +// TransferPrivate +impl_remote!(TransferPrivateProver, REMOTE_URL, "resources/", "transfer_private", "prover"); +impl_local!(TransferPrivateVerifier, "resources/", "transfer_private", "verifier"); +// TransferPublic +impl_remote!(TransferPublicProver, REMOTE_URL, "resources/", "transfer_public", "prover"); +impl_local!(TransferPublicVerifier, "resources/", "transfer_public", "verifier"); +// TransferPublicAsSigner +impl_remote!(TransferPublicAsSignerProver, REMOTE_URL, "resources/", "transfer_public_as_signer", "prover"); +impl_local!(TransferPublicAsSignerVerifier, "resources/", "transfer_public_as_signer", "verifier"); +// TransferPrivateToPublic +impl_remote!(TransferPrivateToPublicProver, REMOTE_URL, "resources/", "transfer_private_to_public", "prover"); +impl_local!(TransferPrivateToPublicVerifier, "resources/", "transfer_private_to_public", "verifier"); +// TransferPublicToPrivate +impl_remote!(TransferPublicToPrivateProver, REMOTE_URL, "resources/", "transfer_public_to_private", "prover"); +impl_local!(TransferPublicToPrivateVerifier, "resources/", "transfer_public_to_private", "verifier"); +// Join +impl_remote!(JoinProver, REMOTE_URL, "resources/", "join", "prover"); +impl_local!(JoinVerifier, "resources/", "join", "verifier"); +// Split +impl_remote!(SplitProver, REMOTE_URL, "resources/", "split", "prover"); +impl_local!(SplitVerifier, "resources/", "split", "verifier"); +// FeePrivate +impl_remote!(FeePrivateProver, REMOTE_URL, "resources/", "fee_private", "prover"); +impl_local!(FeePrivateVerifier, "resources/", "fee_private", "verifier"); +// FeePublic +impl_remote!(FeePublicProver, REMOTE_URL, "resources/", "fee_public", "prover"); +impl_local!(FeePublicVerifier, "resources/", "fee_public", "verifier"); + +#[macro_export] +macro_rules! insert_testnet_v1_credit_keys { + ($map:ident, $type:ident<$network:ident>, $variant:ident) => {{ + paste::paste! { + let string = stringify!([<$variant:lower>]); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("bond_public", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("unbond_public", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("unbond_delegator_as_validator", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("claim_unbond_public", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("set_validator_state", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_private", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_public", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_public_as_signer", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_private_to_public", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_public_to_private", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("join", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("split", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("fee_private", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("fee_public", $crate::testnet_v1::[]::load_bytes())); + } + }}; +} + +#[macro_export] +macro_rules! insert_testnet_v1_key { + ($map:ident, $string:tt, $type:ident<$network:ident>, ($name:tt, $circuit_key:expr)) => {{ + // Load the circuit key bytes. + let key_bytes: Vec = $circuit_key.expect(&format!("Failed to load {} bytes", $string)); + // Recover the circuit key. + let key = $type::<$network>::from_bytes_le(&key_bytes[1..]).expect(&format!("Failed to recover {}", $string)); + // Insert the circuit key. + $map.insert($name.to_string(), std::sync::Arc::new(key)); + }}; +} + +// Inclusion +impl_remote!(InclusionProver, REMOTE_URL, "resources/", "inclusion", "prover"); +impl_local!(InclusionVerifier, "resources/", "inclusion", "verifier"); + +/// The function name for the inclusion circuit. +pub const NETWORK_INCLUSION_FUNCTION_NAME: &str = "inclusion"; + +lazy_static! { + pub static ref INCLUSION_PROVING_KEY: Vec = + InclusionProver::load_bytes().expect("Failed to load inclusion proving key"); + pub static ref INCLUSION_VERIFYING_KEY: Vec = + InclusionVerifier::load_bytes().expect("Failed to load inclusion verifying key"); +} + +#[cfg(test)] +mod tests { + use super::*; + use wasm_bindgen_test::*; + wasm_bindgen_test_configure!(run_in_browser); + + #[wasm_bindgen_test] + fn test_load_bytes() { + BondPublicVerifier::load_bytes().expect("Failed to load bond_public verifier"); + UnbondPublicVerifier::load_bytes().expect("Failed to load unbond_public verifier"); + UnbondDelegatorAsValidatorVerifier::load_bytes() + .expect("Failed to load unbond_delegator_as_validator verifier"); + ClaimUnbondPublicVerifier::load_bytes().expect("Failed to load claim_unbond_public verifier"); + SetValidatorStateVerifier::load_bytes().expect("Failed to load set_validator_state verifier"); + TransferPrivateVerifier::load_bytes().expect("Failed to load transfer_private verifier"); + TransferPublicVerifier::load_bytes().expect("Failed to load transfer_public verifier"); + TransferPublicAsSignerVerifier::load_bytes().expect("Failed to load transfer_public_as_signer verifier"); + TransferPrivateToPublicVerifier::load_bytes().expect("Failed to load transfer_private_to_public verifier"); + TransferPublicToPrivateVerifier::load_bytes().expect("Failed to load transfer_public_to_private verifier"); + FeePrivateProver::load_bytes().expect("Failed to load fee_private prover"); + FeePrivateVerifier::load_bytes().expect("Failed to load fee_private verifier"); + FeePublicProver::load_bytes().expect("Failed to load fee_public prover"); + FeePublicVerifier::load_bytes().expect("Failed to load fee_public verifier"); + InclusionProver::load_bytes().expect("Failed to load inclusion prover"); + InclusionVerifier::load_bytes().expect("Failed to load inclusion verifier"); + } +} diff --git a/parameters/src/testnet_v1/resources/block.genesis b/parameters/src/testnet_v1/resources/block.genesis new file mode 100644 index 0000000000000000000000000000000000000000..b2f67da9a2e878adc39627a295c1baa99a56fcd1 GIT binary patch literal 14943 zcmb`OWmFv7wzj)z+%32Shu}_dg1b8ecemisc<>P1-QC^Y-Ggh8KyZS6+54WHvG+Ib zIJxKEQ-7+f*Q}ns=Bk?SeAcQ0zU#yS(qp(dr}UI6mzrD91B{XOVDGCwg4T)eUQ)Xu z0KeIQzi9_Zck!-^xhn{CEUt`(SUVf z?eQdx{@d&Ri$_&WMrtV)Q%5$0$UrGHADeCj>>GU+uJDY$bHoGy5ap=KN`;yi~;WkFS310eZ-Bq#xv!l0`*p+3^XlAHSC4eDM2D zC=jYtuYrwd^S(7S1dKR5(2-nfBds);gRO6Rz^JB?UNcw=(EE<~?&fRR4+wHA0 zBkG_10s?^VaC+tKzZi}JF#J0Sr}v6Tc3kC#+4EP&81klUQ=`ct@nD?b{%QE5mH4KM zT0|Xdm&l6;Q@f#L3q=Z}tNbl7?qXf~TsHvl*l9!fhikwWY)w;g000T_+f%a6L51x= zz{%`=$fP=C@mf{#LwYGqBYz^IA~a^{nMh3b2^3)ie3w-cbIZUVcDJL1Vu{b`>4DA# z&a4?HKT?dlv(G+c<@JUKw)mp~?8_Us69GT%E``4+!j+9Tlj0QIi{shW{E#{R(Au#> zBgMZw6$AqSU%lS1|I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9lf zi}0tl%^y@AzE)FTAK?4#;43)9-S^A@Gp)D>=-ZM)&(+^xIngsgdwy%f^8BKhvj zvW#T0@2|hCbPc(ao>2=@(WYP z%|z#zxmQyv<2M`#T;Z3)#h9Ebz|H#q!JUlIm>CaW%PRf8aqW!rBE!Go)mag(9{1RW+_4-HzlGVCHleoRKS8@K%S)_?pAY5cNm$!{ih z{y4k(XphfwhS_0%Qy80;f3vW5wDz0H=X6L=>*SQ(9zL&L+3KqtDwfk)biC*3Ui;?{ zA}t zf7#_LbNf(MgUaLNvs}!z+)Jfh7;Z3q42?gwY3hk9vA#J&~}D+eDbz zW?RKYoRpsv_x`5oMvbTLUm9FO&wldjcFxJWlKnlaVtc~QuCOh)W}W$5*=i*A_+`;X z8wY1r@85GC2mM`Wp7Yj~u~_UV<0g$$nXQ`Hl7e$D{qR4}m(I0LD1syZ?(bzM4Vt+m zA5GNIHrK4S{pdUQeJ7*m=im!9HYXhV{LiG^xbShJV3I>n!`@5MMc*&1-T&+NnT)IN zC8dO#n96QS>-FuQ!63N8we>IKU$@EAG<;?KPKT-ftqXqqPF8NxnSKw}5|i@_uC1QW zevv~%B+mPb?rc8BXB+O!c>CUG=Q01TgB8XvGGyg{#wUFdsc2}`d?uy5J6|_Lec$6o z9kx>`Uw_qqUB<}$aK-26Ohw^)4^%l+X-(bIxp&7R%U=)g?m1gAQ8_o}_7N*cLIVJa C_B8eY literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/fee_private.metadata b/parameters/src/testnet_v1/resources/fee_private.metadata new file mode 100644 index 0000000000..d09bee560b --- /dev/null +++ b/parameters/src/testnet_v1/resources/fee_private.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "b3640d77dd92a0a03aa3cb9e7e5d7241e10165d61066cc2cf8e3dd2aeb9bc0b2", + "prover_size": 66297972, + "verifier_checksum": "c1242f35a0943dbe9d3d68ae29c5e69871e2ed62a876792324f2583320a6b07a", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/fee_private.verifier b/parameters/src/testnet_v1/resources/fee_private.verifier new file mode 100644 index 0000000000000000000000000000000000000000..a261e295ab69f59477a6223e432af397f4b33def GIT binary patch literal 673 zcmZP+V1R&cQy?_QR0w@UmJ!S-afHwg_aNdt5Q<^ibMKb@y=!d*FAHwoI3s2Erdbme zj-C2`x^Kp9uDT3gQ-SUBnIWYvGJ;WFnvQJk4COoQAMQISc5=Zhn|n`wz7R^^9=ytS z=GI=V=$jjE%{M)|{PyNAyJuH=d^z2(^GfV8cH6oyi+8ytNpYA^Qq9a396G3<*I4~MIX^Rbtl zk1`#0-(1Dye^F~^)TGeF}1GW`qtg5=V|P`Pk)nw*L$vc9<;LCTPH2= zTtyhY(sOGNLzxc2^Q#C*q^US;t!=^I=pLhXOWv>X zuT~$^{-`;*%r7`gKgULOZ-dh1vIFfUXZ`Z$vgK_NauS=-`}WalORlXmG(<94d!lFk zU!WXV^yl{4sH1#kTRxgJ_D@)H`OHGW3OC7_H>&JTzS(n3BjxnUl($)zrd{b`bv-M> zE$3N$kC)@jw{O0EpG_LYmOVXsab01r+y8q1fVbI^CF*?}vQqes4{Dx&!60oT8^Av6 z#<$zf$rau^cl#|ZZqS}1#3H(K4}Ve!-;~Q1>V|vVMfb-|mSfNTRPQuPG)LpwVMsy) E0Ih8=RR910 literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/fee_public.metadata b/parameters/src/testnet_v1/resources/fee_public.metadata new file mode 100644 index 0000000000..1476ce96c7 --- /dev/null +++ b/parameters/src/testnet_v1/resources/fee_public.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "1667bf508398fb94cb97dc7c99b647195492e0e8a9bf57fdb73fa3c294a3ceaf", + "prover_size": 29174402, + "verifier_checksum": "63936b8503ef8daf476e48d54106872fe813041a0b81e0f44c9714999866ebc4", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/fee_public.verifier b/parameters/src/testnet_v1/resources/fee_public.verifier new file mode 100644 index 0000000000000000000000000000000000000000..3fbae8a94100115e44da896cee06d70dab47b9e4 GIT binary patch literal 673 zcmZP+V1R&bBM99LrEAI|e9wgt+Rhn5^FSzuQ-9NnCzo=y+;s^F$3E@E}vPk*}$P8%#oR))zC^LrBCjq`Kk#vYV~S|r}>%MKe1Yol_%3&BOocH zn6TIIz*O0&H}kyq`E5=-#NZ&(<($;3v1h0GuOgw~$o}mA`C$ohQ#RM#*wm`KbnXOJ z-%D?O3T}KAlQOS7z&?xN%U>>o_txF(7vR%h78a=FP=@>p6GW74~oGN1Dmcoy!FSNZWqDQBA2;pa}31)T~^ zZKn;=m-EkBcROFd@r^R;ZpS$t?v?S&s=mF>R(K}2C(p*$Ht0Untb=Z?-$LKp8E#*Z z;TV|{IN55pk8)#QQ`yH4k1xwcG;Hg*Uvt9L<^0vk19~BOMOUQR9{jm!H>t<}`>RT; zj}c|ozjrS@)S%uy`P(A}r*xl$Gjr!J-_U;4&ABgM`Jh7?m!m<#EX`$>E|7!<09j}& AzyJUM literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/inclusion.metadata b/parameters/src/testnet_v1/resources/inclusion.metadata new file mode 100644 index 0000000000..8df45d6edb --- /dev/null +++ b/parameters/src/testnet_v1/resources/inclusion.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "8faa4d3aaaa5e786d20b61f825e50901f9dcf470455d1d2994e091eefcc66a4e", + "prover_size": 233812212, + "verifier_checksum": "57bf79c7a493ee79f8ebed2c8e6e7e8a0a6d11b2f6edcba6e943768cb6a250cc", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/inclusion.verifier b/parameters/src/testnet_v1/resources/inclusion.verifier new file mode 100644 index 0000000000000000000000000000000000000000..d037956880aff4737c087407dddcc3f464187d17 GIT binary patch literal 673 zcmZQ%VSs=oyi8z5J|Bd3&V|T4SO(#5S<4KT=Ygs});E#&%j-#}gG`k@Yvzc@i`&iS z7i51krEd50gKB%%CjH|Tdeo%I&GXuK;u@<>O^iiXk~9LggsfVw@amLYiXG>ymtAJr zGR&{}*)uFIUVZPz&%tD}Zj(yxuJ{!TdsUMfs`q@IXW5Ya=^bC=B^OCvQLD;s3+>>a z_BkIWzbu}p`91#l>zy}VWJcC1WxHHnXTxyK@#SGQ-)kR3cXTr>=1>+{{mj2)b&rf9I7m)KxhRn%3Rs()H4v1!g-hPAiDpUZH0f4>-!E$tZQHq-Rj`tA4MD@>i# z;}q-KqJ78e%m$a!$J3b?ZoL0R;(Ip3i$D2YWxp4%Y&J-5m|}AH%Z)o#yw5A_{~T#t z@V=x|z4`DX=JI>*EMO=$bqrDA8^DE+Zz&+QLaW|zEwWU=#CJ!^?Xif7*Sj=O3M4{xdc z^*g+F)j#E}Wh-_*JN_eQ?WK1N!O!(m@2PD*AU>6a$J^D*EL+M_o#*-*1KYFzCM$oj zohvqf)vaDbm&-Fg$!=J1j=Ry2OY+(R&#t|5|GO%Ey4L1UBRlP_@jQRCn4>M~GbdLp zXlF7qein2=d4}VrZS&$180wF6&Ty4t(!Wx}m3+?bzkAyxuC}G`3#TQ>z0^D2cyh<( z@b|%nZf%EO_mx@lTrg{hp6lv*cFwV<=dS6@3rRT`Brs#{gJbnK*9fGX`+j^|)s7lz z6Q2(+{+BBxlyXiq5@XC#4)L^6=~uN6os{Q4!zBWj@ F0{|IOF?av~ literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/join.metadata b/parameters/src/testnet_v1/resources/join.metadata new file mode 100644 index 0000000000..42ed8eb33c --- /dev/null +++ b/parameters/src/testnet_v1/resources/join.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "11c8e1702e4644ac8b31e2ad67c97ebf7d2f84e7f82298bbc52d25fe69b26150", + "prover_size": 74722164, + "verifier_checksum": "ec6395b9c03b49c941fcba788c16f73ff4896c4ee1cbb0dd19c9d13d43f51479", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/join.verifier b/parameters/src/testnet_v1/resources/join.verifier new file mode 100644 index 0000000000000000000000000000000000000000..8a5b2fbde76b83dec98860cd0ca36375ef88ad00 GIT binary patch literal 673 zcmZP+V1R(wBM`a*N-v9G1PeqJKxhvQ2+adke4V8zteY$&g>&?7mKX=ishUaU-1M(OdUW*(S;ke}`+r#mBv3RiM@4D2iiDhe& z-!9w}Tlj(LguZ$GLx-cPhqYH9z8yHjvT^s5S%*`8@lRcIebEem@sJyfWiAR&oO)*6 zT!-e_vfpnyH$C&)TVyGER&-5f<OWYj&dz3>QvdF8*0rRZ%Mr%}uAY^Reaxb0U@aeOFYI?W zIr{%g-$1$Ar_S0D;!8!(-*@m-XY6{cR;kt4_V-8Xf9@EiS7mF|OtMz)(qoYL{c^(1 z|1bS29(h+sL^pnZpfArHay^sLV)AjH{X2iJJ1Z2tO{(aUqmOcD5!(ayFY9_9B+Bi3 zVqg2l+q7t#)x)5Ve4k5SR5Q$2!p$bRF(xn2&F{CSO8q;||MgKE%f8k+-Q&niV@{oZ z<=?B%NydBD22NQpZ)wBX1{HUqhf54NQY(4N!b97I!(Oew{c&$w%*^?$d0J&FcWis` zLjJ(+6U;xOK6CH=I-R}I@NS-+TI99;QO`Kl6+~`mO^a{x)tou|^Q(Io7n&c~#A>?2 zOoO9$o!!@`mi_Y&M>TBS(;ColxrX!YZauSro{#!-i++n8yX4JVXu}nCX2+!acNY9p zGM{p6X?t!U!>j2sj0YrkGFM&b%B|P=+!XVuBL2sk&++@)!?rP>$Sw*G(=)vNAxwy4 z(dA}M55CQ9KW{c1&^)lsfq&!5AEgJcnp`h@Q5bpM#mRfk`xUw`g4dq)k&b7Eq&EP3 CkuX{S literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/set_validator_state.metadata b/parameters/src/testnet_v1/resources/set_validator_state.metadata new file mode 100644 index 0000000000..aba7a5b4f6 --- /dev/null +++ b/parameters/src/testnet_v1/resources/set_validator_state.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "e8fbb86008343485bb95c3e3e75d41b493ba654cc161d8b9f9c6901cb71d7a9d", + "prover_size": 17390188, + "verifier_checksum": "d0942ee642048e21cbf562737b4760524dd378ac17867e7a225736badb23f614", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/set_validator_state.verifier b/parameters/src/testnet_v1/resources/set_validator_state.verifier new file mode 100644 index 0000000000000000000000000000000000000000..b4b175c97cc5c51ec010acf4e228de0ab4c70688 GIT binary patch literal 673 zcmZP+V1R&s+7S8^lwJ`J;ZLZ8(7iSgng>ELJmNlQeVe^^`jnIQ-`!5^I;a}8S~uc1 zug@V7jg8yS^ZPQndc3|CxzKY($x7}u;`t4q^Y_i>dEtJO|2W6GFlK{8HA1tGT)Hx~ z``|PFNpbS)r0Z@qSia<+%2~9lG(z+8%Z3|gt*U!2PImHYOQ}6ADQK4Z(W5zLyX>Re zQ*UIJSBb^T+rJjn-@vKxPu}-kJ0nBGTHl4*$IEuveNldLU{2Lr^%WwC^98lK%uQ}H zan^3UY~tNe>-4j&SoV&ez1&ph^9&pB?pd&9$`tSDnLCdia{aLO-22L6$IL0RuX>8= zZ@fx0USs7oH>5${{-nhIUph~YGVI(r#n*P~*C|^z`B|zbG^@tyE}3_8yRO$Aj#csV zVgzlTgm>RK=(lP<+nEqE59#)X=pB~LvHuH>y)x$XO5bh#e$#ZDoy|@^!Vah_rOduR zWuteu`Wv$YxwTVzts;_UOm3KUs&wXscd>W%4$c>O81lVS>G-V*QG>E$%4LC%vac2L zu5U3Ymv45{)8JdUD~@e@L*4RFwv`_aeB8KF;-_HI+&4n)x4X4>Xnk6-V)Kb^A%}zg zwqI{X%@0y@$`Ls9;x|8I*(9TrIbhAb02nIe)HtS9-ryQr)@bk zZ>M#b;wQ&RrFl!l7`h(q(7B$%v-|tQ#j2^q!;#i>p{CaVisN|Bs2hC CWH5^W literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/split.metadata b/parameters/src/testnet_v1/resources/split.metadata new file mode 100644 index 0000000000..b1d9624677 --- /dev/null +++ b/parameters/src/testnet_v1/resources/split.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "5bf027bcf0476784edd3192c3c0731dbd65f955220ef3d6c060acc0e3d1a5555", + "prover_size": 75161428, + "verifier_checksum": "5eb3cea5fa953b36272b1a4f315df955253840acbb1ff900dd9e1126bb012437", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/split.verifier b/parameters/src/testnet_v1/resources/split.verifier new file mode 100644 index 0000000000000000000000000000000000000000..ccdd8a09705e929d3a3c597aee4ac481883f8285 GIT binary patch literal 673 zcmZP+V1NLh0}whBN*m@df(5pBLFldO5Sj;~jA2Wo%k=%fBowWROg~s&kk7s$SgNwT zXHKR6XCLETrAuGscb+iWP^{nI&ttV^Po`pn)i=$rZ!ZLRAC}vbn_9)U<-WBWOSj9v zzQ;?dQ}`1SdvqpWH2Kh&(b4sMZp;C_dPe@M-_BpDo8z>{rpq?S;=w8AE&EMe%9-ys zFA@y6-zNG$;DS)?r=(Ns|L3nby!uiakP~D ztA#nANzApGzR@VEAzE|k?*DVy)EU>im!4W&&w1>@1eF~rUWp5TC?`$(*>S`;HDl(H zWiL;8pR}93!yu(-e@FcsgZ5QP3^^Uk&#%hzU6rx=*<<#2Z?}VtVU648*=^%mv0!J` zBj$_StTlOpt_wWKjF2+h7~a7+>+6dXE3}njvl>pw9l6ziYRQUN^_V3bljO3sFYM^v z`1@B;!NGQhgDE!4MH>(MoMHI)g7Zmx<+XCZwys!9+g9^~UUQrJrQa{ftS_&iWN38THjkylKPLstjP65!_Tssxs#tnadjVE|88H=Kc;;GKDR85T5={XJ?Qr7 z+(X+=mv;T$_se-AWNMm~zkO#A&dvTYyX$K;p1)+D=*+I1cX^e*b!Xqyg=Q;? z?<$Gu+wJ=C@$BSg&#mHeoee=#7kruM@j_rj;H*VaHdm4plSS@Z#_XPcip}oFZ9$W5 zC)sVUaUA@0YpJC90^^xB4M!BVedapiS~X+!`9^c1Gnq2{oo^LDl&I zojNaj&OM1}-!JfPmW*>_bCvMd#T$0l)k3|bxG|w!Z`+60W%qTi&#Y-T^*DcK5zD6Q3;+0snTc!{zxAgs_RPe_ z$yfF;FK2I^Z|E(-P`YB#2w;oz+! zOl8x1OLolHoxiBzW5fBM?-k?qSp)5Sjyg&hpIIRCf$hY)ymtpP*glj=CiXHx(i;HR C!!xS@ literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/transfer_private_to_public.metadata b/parameters/src/testnet_v1/resources/transfer_private_to_public.metadata new file mode 100644 index 0000000000..0a224a18dc --- /dev/null +++ b/parameters/src/testnet_v1/resources/transfer_private_to_public.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "c96d674e52911b0a8b2d0c6d07e5499b90783d8b8e6623d348fa33547835d64b", + "prover_size": 66299476, + "verifier_checksum": "38d0157f70c16badcfd472dd0c045f754b4ac6572e62be48a0053aaa1157f846", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/transfer_private_to_public.verifier b/parameters/src/testnet_v1/resources/transfer_private_to_public.verifier new file mode 100644 index 0000000000000000000000000000000000000000..5903d51a145d4f555c588bb13a62b7e81490fb6f GIT binary patch literal 673 zcmZP+V1R(eDG+)hls+uO2o~UShR_oCAo4sAih(hBw}oE)mxr#Q9QO(nkF64m`66{B zXr0+jA8{Y`Q`=*_JWh-KNZDKO`sIG*w@Mj?PW7jmJF`P)JurV0v|BJvtLQiLh5F8U zQO&E*yyjYSDD!r|Rq>_9bsML%f2_4L`_d2_$N#1FhYZ()D~j^Rqa}i*7Hj_h6;{{g zEPZHI#H!V|-}HQs{XLO$npeB+8Ab`U#^{rYH}5bOa;5*Bp77h?7DsN)MrWJd;aOAH z-~6*Kv~bp)t5xQ=f)D)raFa{3&G|XQA=4YhUv~bCU)hnX)$@#V#)K}PC+kD&KgqwA zJT1G)!uI{Au$O{7%qOOvZmsZJq{MjbRJG)3<{v7YQ^krNPrPcvzHo(#KMfx&-774F%AWm_AT+0X5}m7w$gi1za%X0Fpztq!beyY~KN^XV;8;*P89 zT&I+-+2+1?<;6`V7Ye?H)-`mOJPxuAIQi-Arhxzc{jU!ysfN7OnY??x#2$%73Gsp= z=e$+sOji#RFU*MDcVhDShA%&IM6LTKnMB+@`kJ#oSZc|JriQG(pr;oen$0-!JFsca zQm(E{`%v~z+Sz-huQ@Wv<@r|Z`WAR@n{lJvUOtPZ?dq3prd;^;y;3cgHMjmvjHl;a z?#`W;kDYT;SC?N`#K>~y!em!2?;yE*{13NtckE8HtFU0$R&_0L_Lo1`%&v*tJqAf= E0E3x0bpQYW literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/transfer_public.metadata b/parameters/src/testnet_v1/resources/transfer_public.metadata new file mode 100644 index 0000000000..3482a6c295 --- /dev/null +++ b/parameters/src/testnet_v1/resources/transfer_public.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "f143e4c90526e0f08a43daa8977323177587778602b9a3dbb0426908eabe7874", + "prover_size": 28913482, + "verifier_checksum": "12da9fc8d7284177cc6bcdfb6c8b48217a11a6c70767e6e71f17ffb4e69f17ee", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/transfer_public.verifier b/parameters/src/testnet_v1/resources/transfer_public.verifier new file mode 100644 index 0000000000000000000000000000000000000000..8008e2d53bd15b19cd611eb17b6150308a1c2791 GIT binary patch literal 673 zcmZP+V1NKa0|>1Kr9<){{PHOfTEh`S^FSyDRlcum+v99zB(*w7Y&oYV_DC$wHF1^e zVWH{UGI%pp8aZwrl&bi=_35$0zXNVbC^K%+KHuEJaP88MM=4t!W|wc5^3?OM)nDr^ zT%`42vSqz_qxfJ3ZM^yEY4B3||9 zcM2tkUzYyO75~fUea*7yw}nbr^1M(u=M;tRw7`xVHsS055>Stwy?e(z|u%!b27 ziF4+8EWNQ;W!ZaXMMjr-|CdU=WQ*!yd<{)K|!Tbo5#>!DEB+l=xZGa&-c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2LJQ>DVkZs~8ei;Ak+_3VE(rg9b^U4;hegeT z8;?oczMq?ZG;UuT1Q-uRL|3`SGkjKU9!y!(WRyTEfsi{O3wV# z>!q>Bzoz8v)5kmbEwcG$Oi5PFck%ntaKrFc{?=NLgS#}IJN)?0*dee@$;8g%iAf6Q z3ZZ-a^GkVIf1dc5VYp-Id#3X#v+@|`EdP93ILj+Ur9^p2(9zl%>61Si9xbR}^y=H! z%2ynJPrM8Yugv)|%REzVjpE*hw+%dz^FkBLe;akIxp0J0w^&t3CE>eYmf|hGmA#Ih z%hbI)R=8NTG;Lu|)iV-Kx!27YvQ5K0>c8VX=G6YeqIA0ir7wHz@`CCL!&}c@KO*`0 z(~qvoU0FT%|K=O@`LfJ$X3*NU_KVup7mRo3UrN!rwMX~N$I4r?w9J@tB_i_{{9{+pZheuoOx?5vx7H>K5 zeEU&N)rNj$gW?iB;ojJ-@E^Jt>V%Ce*Zk*x9e{%TwA*2wZ!@NtN)zPeiJT~ zd4I{efDX;JZw;zfS3gj_)pJE<_IuAb6Gi){zkl8fs#zm=?2+(0&I^Irhnye@4FJ1w BH1+@h literal 0 HcmV?d00001 diff --git a/parameters/src/testnet_v1/resources/unbond_public.metadata b/parameters/src/testnet_v1/resources/unbond_public.metadata new file mode 100644 index 0000000000..ae05372c44 --- /dev/null +++ b/parameters/src/testnet_v1/resources/unbond_public.metadata @@ -0,0 +1,6 @@ +{ + "prover_checksum": "8f5781539f118a849fc1241777dd14489502d64f039ffc363ffbe6605ba330d2", + "prover_size": 17414380, + "verifier_checksum": "ac8c29499b4026ded24b2cfa0fff77b5b1619aacf4fe1a9ff487eda9fbd63316", + "verifier_size": 673 +} \ No newline at end of file diff --git a/parameters/src/testnet_v1/resources/unbond_public.verifier b/parameters/src/testnet_v1/resources/unbond_public.verifier new file mode 100644 index 0000000000000000000000000000000000000000..bd7e1af6b7f13bfbe2ce6b9c9578c47597f35960 GIT binary patch literal 673 zcmZP+V1NKy9SCg*rI#c?_^0b3bgvDB=7CTQZIjjq7)H-J$;YuOcacR;ewt&x!JCQO zZ+Tk%x_)+s_KN+BOn1*+U#xR1IA>G6i$}u-*(ZF5>jb_3-%@_J*!g1h?@K&vW^N{j zS!Z@>d$lC2ejI&cLXCjkFNdNS_UFvp4OMLVTua#}$~qrND)}c}+~s(Uf$7%97V*aq zU;XzgJ=Y-_nWcelv?h|JDHSACm0 z*T;4z?|hd~<~x;sBdzkJu@2*(yg-)+U)cIyDBt@cx8SL(vq<4g{g7{8-{njGtG?>3 zd;7TkQ9XNg>-HToe{zkr8+dFkH`kboRLrm}+PU3QQ`yn@aDAZ2?j3BRYI6jCEzLi; z>HfWsOEX^-I`<1ayW-XOVS;kO%5Cm)GXmD|zBpPCxp+@>=BCn35-w3f0o&T2hMvhd zx;o*A<^nnKHGZp`H5&i>v{W58W9(gV^0k=XuPwjKqc56;eJNh{ks)+RK(in=B`0VzgxD2Z#REePQ}N8F|wuuJ_S9 zsoXp(W?ox)&|Jn9*K0qYv7h|+uKkjv?oEFber(JBFE``u#L&AzEC)~6%-wzMPvqfG zRX3VyugAK}9Aof}4Yu~>zy6_f&a$E;EpeO7Qw8>i3e$GH6SqCA6KB`>#uk#$0J82d A>;M1& literal 0 HcmV?d00001 From 2abf0e14620cf1498ff24c66d8eccea335f7a2d4 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 14:55:14 -0700 Subject: [PATCH 18/32] Add TestnetV1 ID parsing --- ledger/query/src/query.rs | 21 +++++++++++++++++++++ synthesizer/src/vm/helpers/macros.rs | 12 ++++++++++++ 2 files changed, 33 insertions(+) diff --git a/ledger/query/src/query.rs b/ledger/query/src/query.rs index a7c62f184d..95c8625e03 100644 --- a/ledger/query/src/query.rs +++ b/ledger/query/src/query.rs @@ -72,6 +72,9 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/latest/stateRoot"))?.into_json()?) } + console::network::TestnetV1::ID => { + Ok(Self::get_request(&format!("{url}/testnet_v1/latest/stateRoot"))?.into_json()?) + } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -89,6 +92,9 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/latest/stateRoot")).await?.json().await?) } + console::network::TestnetV1::ID => { + Ok(Self::get_request_async(&format!("{url}/testnet_v1/latest/stateRoot")).await?.json().await?) + } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -105,6 +111,9 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/statePath/{commitment}"))?.into_json()?) } + console::network::TestnetV1::ID => { + Ok(Self::get_request(&format!("{url}/testnet_v1/statePath/{commitment}"))?.into_json()?) + } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -122,6 +131,12 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/statePath/{commitment}")).await?.json().await?) } + console::network::TestnetV1::ID => { + Ok(Self::get_request_async(&format!("{url}/testnet_v1/statePath/{commitment}")) + .await? + .json() + .await?) + } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -142,6 +157,9 @@ impl> Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/program/{program_id}"))?.into_json()?) } + console::network::TestnetV1::ID => { + Ok(Self::get_request(&format!("{url}/testnet_v1/program/{program_id}"))?.into_json()?) + } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -161,6 +179,9 @@ impl> Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/program/{program_id}")).await?.json().await?) } + console::network::TestnetV1::ID => { + Ok(Self::get_request_async(&format!("{url}/testnet_v1/program/{program_id}")).await?.json().await?) + } _ => bail!("Unsupported network ID in inclusion query"), }, } diff --git a/synthesizer/src/vm/helpers/macros.rs b/synthesizer/src/vm/helpers/macros.rs index 3b002f09a5..47c3968bee 100644 --- a/synthesizer/src/vm/helpers/macros.rs +++ b/synthesizer/src/vm/helpers/macros.rs @@ -66,6 +66,10 @@ macro_rules! convert { // Process the logic. $logic!(console::network::TestnetV0, circuit::AleoTestnetV0) } + console::network::TestnetV1::ID => { + // Process the logic. + $logic!(console::network::TestnetV1, circuit::AleoTestnetV1) + } _ => bail!("Unsupported VM configuration for network: {}", N::ID), } }}; @@ -93,6 +97,14 @@ macro_rules! process { // Process the logic. $logic!(process.read(), console::network::TestnetV0, circuit::AleoTestnetV0) } + console::network::TestnetV1::ID => { + // Cast the process. + let process = (&$self.process as &dyn std::any::Any) + .downcast_ref::>>>() + .ok_or_else(|| anyhow!("Failed to downcast {}", stringify!($self.process)))?; + // Process the logic. + $logic!(process.read(), console::network::TestnetV1, circuit::AleoTestnetV1) + } _ => bail!("Unsupported VM configuration for network: {}", N::ID), } }}; From 895952ffa2dff271bc46707e861a8f6e2caab043 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Wed, 22 May 2024 14:55:53 -0700 Subject: [PATCH 19/32] Regenerate genesis block --- .../src/testnet_v1/resources/block.genesis | Bin 14943 -> 15485 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/parameters/src/testnet_v1/resources/block.genesis b/parameters/src/testnet_v1/resources/block.genesis index b2f67da9a2e878adc39627a295c1baa99a56fcd1..2274a64bbc60abb0d25f9b91d9d08c25cc5c8846 100644 GIT binary patch literal 15485 zcmcJ#WmsLwwl=yJuyA*RyF+kyf? zez)`O-RI69Yd&+0@zj`Aqw0O@ouh!)&~{L`b)N($rv?J$40hA@qzS(kV4s|iZ2)#- zs}2zWzqo+Eumk1=xt9`o8DLA0E9+W`?Sit-#*ysb%XX zt!s`D+z75vJ5xRx|C;KqZhCU#NCN%o;$7u1&62C4;+`_JdoGI7)2{`z?bSmh4K%x`=?_vcPZshF{?|a6yfjzmm&^*|4WM6*_X7(t< z&wu!i0{ksAKmf3lEQUgDFdRN5(#&H^310wR%Ish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c&N)mp~lvjNoe+Qo{?6c&Sore4)WLZ zqf9v?x|)&2-yFr<;2W#D`}zZ20=>#gdrz%Clg`}Ft!o?>(fdi}=mk{oByw{tv*br}r8OH1k{j3dRF=<+8Ev~7N z$${a>b8SG=e9vzPOW1%F_p{0eBIR#0ucF|1KuW+DV2uiKFYWk3M z)FNEgBng>`Lw99Yo?N{t$TXMjLYt49nHv>Y-=~-9i^}H^q$N z65lv3jiktwj#M-6^WIRiT&s`Bku&0qgaz+*I{<0_{PN@EBOJ_rn{C!5?Q2Eu9hMlE zhwE-r!vY=I`<)0I(C|)rB-GT5lF_J0vkBYRhQRA~_GY4;zAZ*7AAfHq_1APYt#DRT zwXHc0$cmO;&}hC#OywLit7Qg+va4Qzh`7@CbTF@lvx)N<%y~mrEQO~PKg7HH5pyQ` z+>MP;EH&EBf{`buGxYTIOtvieNre??u5WEVR{E?`Amd_H0*2Nnh5m^#`o_JA=WEsvyB5z00QksIw6IRQs6(#b zURR}<^K&Yd6GbmCrn)sB-J4*RmFpMDWd&Cx@qHPx(Dk1!0RkJ(4nEkjtO8UzyP7xN z1(ZQZS0^)?jQQTd`hL1KAcmqAq`fW~VXleYRAIe=rfx1_r7!|gd?-N)Q45}kIP^sD zSD Date: Thu, 23 May 2024 10:42:50 -0700 Subject: [PATCH 20/32] Regenerate genesis block --- console/network/src/testnet_v1.rs | 4 ++-- .../src/testnet_v1/resources/block.genesis | Bin 15485 -> 15485 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/console/network/src/testnet_v1.rs b/console/network/src/testnet_v1.rs index e7b18a3b1b..2326efd193 100644 --- a/console/network/src/testnet_v1.rs +++ b/console/network/src/testnet_v1.rs @@ -133,9 +133,9 @@ impl Network for TestnetV1 { /// The network edition. const EDITION: u16 = 0; /// The genesis block coinbase target. - const GENESIS_COINBASE_TARGET: u64 = (1u64 << 5).saturating_sub(1); + const GENESIS_COINBASE_TARGET: u64 = (1u64 << 10).saturating_sub(1); /// The genesis block proof target. - const GENESIS_PROOF_TARGET: u64 = 1u64 << 3; + const GENESIS_PROOF_TARGET: u64 = 1u64 << 8; /// The fixed timestamp of the genesis block. const GENESIS_TIMESTAMP: i64 = 1715776496 /* 2024-05-15 12:34:56 UTC */; /// The network ID. diff --git a/parameters/src/testnet_v1/resources/block.genesis b/parameters/src/testnet_v1/resources/block.genesis index 2274a64bbc60abb0d25f9b91d9d08c25cc5c8846..e65d9a014bc9564cee37c99c25b175dacf65429c 100644 GIT binary patch delta 11356 zcmZviRa9KtnntUD!rk2^xLa@!5L^lgF2OapRH4Cw6$E#82@(kI4#AyZ!Ciy)Ip_B6 z?mI^Bmo@et`{jR`Yp!p7&)(18)WG4W3R#vE@2|8@dsQLD1d$5%it<6b-?3Nci*P6V z9uuggscrTsgFZt7ufC$j-rz901w?=qPUXA~XDMXRq|Xp>(G!AeAg}O%e?7o|E&qN$ zuaLF=`^&#qfWS)FJKy0Gb0Nq0Z!;sy=-=}p^o_pQ2kE0c@$409KrQcmybV4z+>boS zO#CH&w_Z5=%aV23ZO8GaS;>6G2-*}!j5zK>>wEi?qS9@sYH~(aHeOoaYJm+%GU%#! z$Ib3KsjrEu_FKs$7fZJtdbj!s+LYNxPL^$d;DJCO7#Wv+X|6PC!ZNI}#8M zV81o3m~*sVTHqW0$*f^{o!J?r+mbUdACcNz7&$8qIPK)VZT~Dlr?G&;=S#7b!VY|8 zKe@JMXA-rQu*0**01_DL3TA3zRqIY%DZGMMynl@Sl15_CcXl>|*lJ&71p$BnbO4|b ziMs{_0Kmb^&WZpYS}GZFniz4|KFx@~IWU~mHmV}kriS^DSGj{^l^VBPp3_c82@UIW zfWxNjaV?@!XL6>nVo~MqX`_G74)AY#H;Ix|;L)vLoz}SgEU@tO%heE_*LdOOftk0F z6A_5+Xlvo->}cU;Woi4#oels81U$dD_$+dLe$!pz8unX`(U>myQ9S=uJW(r#neb2t z1=VO&Qjj57>p-uPz?qvC5I{sNspn6H)fI5ui5`%@gaAUL0X{+5H@^@dJ6)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^JsMv<9USb!Nz(9p;AB$OpW zH#@46Rtc);pg|oQnx2uOPsy~XRH=$N{b3O~oH=|D))waQeLs@RB>$hnmK%CVr4TY} zd|;%*nind&BqHXGeVw_zPIZ4=U>bUmaw;AA2gxfp`h{H11*PJ90B|QoU{#4P>%~?t zgy}APLdI>w70dZRrChx%$pCPsqs19ueabLUF!#i-?&^RC3zXM4@fvdUF_V1rokvCt zyr@K$jU&|HTrJz{c{gZU2w>m z-OZ(sHoMVelBdrO36IlGTOvpO8*+Z~LOE-K!+`9J_P#BTM{_Uu1bXT@a0&~H8KW+_fd*=0hC(oT=> z)$Lu=85k1RZh?8&uH-e=$B|VC4&F@c$|%2h~#B-Y$y#M=bS(0SDi56+ev zDqyZMBdEmP^o~@8p7^y2VWlhPe~v^~{cgM|QFDs6+JUDbh$LJuQfd~q=dt2|g%}(> zpk4Y&w8&p^$((Kb<^1~XH<+#&UUb|KKAyVYt|jJ&Z|Pg58%?J&BOdTb+Z#|@7g5_{ zuk*WWFESP}A@oJzkQ{rbeY1D-gWu`&xl?7MDlO2KNwXG*#Xh3tQtkGy8NJ<+vJ*ea z48seyQj8!YZApW-N!%GZprOc3Pe~l-!j`hI_N-=0|9)-AHCgvyBL+px^X+JQ+EFD7 zKWmY_k61~Pj|-WCfg2=kk`SgD`uOl)5{^SK7SD@A2(C_1xC#c*1X(9vKY6-O589-6 z-UtPw{p1EHPe>>@yG`t_d6WTkGyMU#FfBGV$Nt;^$G{Qa_ZD=YQr&!9M89+wQ;E#}xtgJF|Frn#OV3w! z6%6Hiabt3l@6&7xlx-ODhWpi3sA Date: Thu, 23 May 2024 10:48:52 -0700 Subject: [PATCH 21/32] Update the genesis coinbase and proof targets --- console/network/src/testnet_v0.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console/network/src/testnet_v0.rs b/console/network/src/testnet_v0.rs index 315e6ad8c9..a670079e87 100644 --- a/console/network/src/testnet_v0.rs +++ b/console/network/src/testnet_v0.rs @@ -133,9 +133,9 @@ impl Network for TestnetV0 { /// The network edition. const EDITION: u16 = 0; /// The genesis block coinbase target. - const GENESIS_COINBASE_TARGET: u64 = (1u64 << 5).saturating_sub(1); + const GENESIS_COINBASE_TARGET: u64 = (1u64 << 10).saturating_sub(1); /// The genesis block proof target. - const GENESIS_PROOF_TARGET: u64 = 1u64 << 3; + const GENESIS_PROOF_TARGET: u64 = 1u64 << 8; /// The fixed timestamp of the genesis block. const GENESIS_TIMESTAMP: i64 = 1715776496 /* 2024-05-15 12:34:56 UTC */; /// The network ID. From d6384482cc3e51d4c673fedb46b0e9c6d3fa1e2b Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Thu, 23 May 2024 14:24:15 -0700 Subject: [PATCH 22/32] Introduce CanaryV0 --- ...estnet_v1_circuit.rs => canary_circuit.rs} | 82 +++++------ circuit/environment/src/helpers/converter.rs | 6 +- circuit/environment/src/lib.rs | 6 +- .../src/{testnet_v1.rs => canary_v0.rs} | 54 +++---- circuit/network/src/lib.rs | 6 +- circuit/src/lib.rs | 2 +- .../src/{testnet_v1.rs => canary_v0.rs} | 132 +++++++++--------- console/network/src/lib.rs | 6 +- ledger/query/src/query.rs | 27 ++-- parameters/examples/inclusion.rs | 6 +- parameters/examples/setup.rs | 4 +- parameters/scripts/canary/credits.sh | 9 ++ parameters/scripts/canary/inclusion.sh | 9 ++ parameters/scripts/testnet_v1/credits.sh | 9 -- parameters/scripts/testnet_v1/inclusion.sh | 9 -- .../src/{testnet_v1 => canary}/genesis.rs | 0 parameters/src/{testnet_v1 => canary}/mod.rs | 34 ++--- .../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/inclusion.metadata | 0 .../resources/inclusion.verifier | Bin .../resources/join.metadata | 0 .../resources/join.verifier | Bin .../resources/set_validator_state.metadata | 0 .../resources/set_validator_state.verifier | Bin .../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_as_signer.metadata | 0 .../transfer_public_as_signer.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 parameters/src/lib.rs | 4 +- synthesizer/src/vm/helpers/macros.rs | 10 +- 50 files changed, 206 insertions(+), 209 deletions(-) rename circuit/environment/src/{testnet_v1_circuit.rs => canary_circuit.rs} (84%) rename circuit/network/src/{testnet_v1.rs => canary_v0.rs} (89%) rename console/network/src/{testnet_v1.rs => canary_v0.rs} (77%) create mode 100755 parameters/scripts/canary/credits.sh create mode 100755 parameters/scripts/canary/inclusion.sh delete mode 100755 parameters/scripts/testnet_v1/credits.sh delete mode 100755 parameters/scripts/testnet_v1/inclusion.sh rename parameters/src/{testnet_v1 => canary}/genesis.rs (100%) rename parameters/src/{testnet_v1 => canary}/mod.rs (72%) rename parameters/src/{testnet_v1 => canary}/resources/block.genesis (100%) rename parameters/src/{testnet_v1 => canary}/resources/bond_public.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/bond_public.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/claim_unbond_public.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/claim_unbond_public.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/fee_private.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/fee_private.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/fee_public.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/fee_public.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/inclusion.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/inclusion.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/join.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/join.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/set_validator_state.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/set_validator_state.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/split.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/split.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_private.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_private.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_private_to_public.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_private_to_public.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_public.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_public.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_public_as_signer.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_public_as_signer.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_public_to_private.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/transfer_public_to_private.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/unbond_delegator_as_validator.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/unbond_delegator_as_validator.verifier (100%) rename parameters/src/{testnet_v1 => canary}/resources/unbond_public.metadata (100%) rename parameters/src/{testnet_v1 => canary}/resources/unbond_public.verifier (100%) diff --git a/circuit/environment/src/testnet_v1_circuit.rs b/circuit/environment/src/canary_circuit.rs similarity index 84% rename from circuit/environment/src/testnet_v1_circuit.rs rename to circuit/environment/src/canary_circuit.rs index 72c8a6abf3..230e51265e 100644 --- a/circuit/environment/src/testnet_v1_circuit.rs +++ b/circuit/environment/src/canary_circuit.rs @@ -19,25 +19,25 @@ use core::{ fmt, }; -type Field = ::Field; +type Field = ::Field; thread_local! { static VARIABLE_LIMIT: Cell> = Cell::new(None); static CONSTRAINT_LIMIT: Cell> = Cell::new(None); - pub(super) static TESTNET_V1_CIRCUIT: RefCell> = RefCell::new(R1CS::new()); + pub(super) static CANARY_CIRCUIT: RefCell> = RefCell::new(R1CS::new()); static IN_WITNESS: Cell = Cell::new(false); static ZERO: LinearCombination = LinearCombination::zero(); static ONE: LinearCombination = LinearCombination::one(); } #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] -pub struct TestnetV1Circuit; +pub struct CanaryCircuit; -impl Environment for TestnetV1Circuit { - type Affine = ::Affine; +impl Environment for CanaryCircuit { + type Affine = ::Affine; type BaseField = Field; - type Network = console::TestnetV1; - type ScalarField = ::Scalar; + type Network = console::CanaryV0; + type ScalarField = ::Scalar; /// Returns the `zero` constant. fn zero() -> LinearCombination { @@ -62,7 +62,7 @@ impl Environment for TestnetV1Circuit { } } }); - TESTNET_V1_CIRCUIT.with(|circuit| match mode { + CANARY_CIRCUIT.with(|circuit| match mode { Mode::Constant => circuit.borrow_mut().new_constant(value), Mode::Public => circuit.borrow_mut().new_public(value), Mode::Private => circuit.borrow_mut().new_private(value), @@ -97,7 +97,7 @@ impl Environment for TestnetV1Circuit { IN_WITNESS.with(|in_witness| { // Ensure we are not in witness mode. if !in_witness.get() { - TESTNET_V1_CIRCUIT.with(|circuit| { + CANARY_CIRCUIT.with(|circuit| { // Set the entire environment to the new scope. let name = name.into(); if let Err(error) = circuit.borrow_mut().push_scope(&name) { @@ -131,7 +131,7 @@ impl Environment for TestnetV1Circuit { IN_WITNESS.with(|in_witness| { // Ensure we are not in witness mode. if !in_witness.get() { - TESTNET_V1_CIRCUIT.with(|circuit| { + CANARY_CIRCUIT.with(|circuit| { // Ensure that we do not surpass the constraint limit for the circuit. CONSTRAINT_LIMIT.with(|constraint_limit| { if let Some(limit) = constraint_limit.get() { @@ -178,67 +178,67 @@ impl Environment for TestnetV1Circuit { /// Returns `true` if all constraints in the environment are satisfied. fn is_satisfied() -> bool { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied()) } /// Returns `true` if all constraints in the current scope are satisfied. fn is_satisfied_in_scope() -> bool { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied_in_scope()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied_in_scope()) } /// Returns the number of constants in the entire circuit. fn num_constants() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constants()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constants()) } /// Returns the number of public variables in the entire circuit. fn num_public() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_public()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_public()) } /// Returns the number of private variables in the entire circuit. fn num_private() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_private()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_private()) } /// Returns the number of constant, public, and private variables in the entire circuit. fn num_variables() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_variables()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_variables()) } /// Returns the number of constraints in the entire circuit. fn num_constraints() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constraints()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constraints()) } /// Returns the number of nonzeros in the entire circuit. fn num_nonzeros() -> (u64, u64, u64) { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros()) } /// Returns the number of constants for the current scope. fn num_constants_in_scope() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constants_in_scope()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constants_in_scope()) } /// Returns the number of public variables for the current scope. fn num_public_in_scope() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_public_in_scope()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_public_in_scope()) } /// Returns the number of private variables for the current scope. fn num_private_in_scope() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_private_in_scope()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_private_in_scope()) } /// Returns the number of constraints for the current scope. fn num_constraints_in_scope() -> u64 { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_constraints_in_scope()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constraints_in_scope()) } /// Returns the number of nonzeros for the current scope. fn num_nonzeros_in_scope() -> (u64, u64, u64) { - TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros_in_scope()) + CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros_in_scope()) } /// Returns the variable limit for the circuit, if one exists. @@ -270,7 +270,7 @@ impl Environment for TestnetV1Circuit { /// Returns the R1CS circuit, resetting the circuit. fn inject_r1cs(r1cs: R1CS) { - TESTNET_V1_CIRCUIT.with(|circuit| { + CANARY_CIRCUIT.with(|circuit| { // Ensure the circuit is empty before injecting. assert_eq!(0, circuit.borrow().num_constants()); assert_eq!(1, circuit.borrow().num_public()); @@ -290,7 +290,7 @@ impl Environment for TestnetV1Circuit { /// Returns the R1CS circuit, resetting the circuit. fn eject_r1cs_and_reset() -> R1CS { - TESTNET_V1_CIRCUIT.with(|circuit| { + CANARY_CIRCUIT.with(|circuit| { // Reset the witness mode. IN_WITNESS.with(|in_witness| in_witness.replace(false)); // Reset the variable limit. @@ -312,7 +312,7 @@ impl Environment for TestnetV1Circuit { /// Returns the R1CS assignment of the circuit, resetting the circuit. fn eject_assignment_and_reset() -> Assignment<::Field> { - TESTNET_V1_CIRCUIT.with(|circuit| { + CANARY_CIRCUIT.with(|circuit| { // Reset the witness mode. IN_WITNESS.with(|in_witness| in_witness.replace(false)); // Reset the variable limit. @@ -333,7 +333,7 @@ impl Environment for TestnetV1Circuit { /// Clears the circuit and initializes an empty environment. fn reset() { - TESTNET_V1_CIRCUIT.with(|circuit| { + CANARY_CIRCUIT.with(|circuit| { // Reset the witness mode. IN_WITNESS.with(|in_witness| in_witness.replace(false)); // Reset the variable limit. @@ -351,9 +351,9 @@ impl Environment for TestnetV1Circuit { } } -impl fmt::Display for TestnetV1Circuit { +impl fmt::Display for CanaryCircuit { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - TESTNET_V1_CIRCUIT.with(|circuit| write!(f, "{}", circuit.borrow())) + CANARY_CIRCUIT.with(|circuit| write!(f, "{}", circuit.borrow())) } } @@ -387,23 +387,23 @@ mod tests { #[test] fn test_print_circuit() { - let _candidate = create_example_circuit::(); - let output = format!("{TestnetV1Circuit}"); + let _candidate = create_example_circuit::(); + let output = format!("{CanaryCircuit}"); println!("{output}"); } #[test] fn test_circuit_scope() { - TestnetV1Circuit::scope("test_circuit_scope", || { - assert_eq!(0, TestnetV1Circuit::num_constants()); - assert_eq!(1, TestnetV1Circuit::num_public()); - assert_eq!(0, TestnetV1Circuit::num_private()); - assert_eq!(0, TestnetV1Circuit::num_constraints()); - - assert_eq!(0, TestnetV1Circuit::num_constants_in_scope()); - assert_eq!(0, TestnetV1Circuit::num_public_in_scope()); - assert_eq!(0, TestnetV1Circuit::num_private_in_scope()); - assert_eq!(0, TestnetV1Circuit::num_constraints_in_scope()); + CanaryCircuit::scope("test_circuit_scope", || { + assert_eq!(0, CanaryCircuit::num_constants()); + assert_eq!(1, CanaryCircuit::num_public()); + assert_eq!(0, CanaryCircuit::num_private()); + assert_eq!(0, CanaryCircuit::num_constraints()); + + assert_eq!(0, CanaryCircuit::num_constants_in_scope()); + assert_eq!(0, CanaryCircuit::num_public_in_scope()); + assert_eq!(0, CanaryCircuit::num_private_in_scope()); + assert_eq!(0, CanaryCircuit::num_constraints_in_scope()); }) } } diff --git a/circuit/environment/src/helpers/converter.rs b/circuit/environment/src/helpers/converter.rs index f846f23759..9ba96a4142 100644 --- a/circuit/environment/src/helpers/converter.rs +++ b/circuit/environment/src/helpers/converter.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{Circuit, LinearCombination, TestnetCircuit, TestnetV1Circuit, Variable, R1CS}; +use crate::{CanaryCircuit, Circuit, LinearCombination, TestnetCircuit, Variable, R1CS}; use snarkvm_curves::edwards_bls12::Fq; use snarkvm_fields::PrimeField; @@ -44,13 +44,13 @@ impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for TestnetCircuit { } } -impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for TestnetV1Circuit { +impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for CanaryCircuit { /// Synthesizes the constraints from the environment into a `snarkvm_algorithms::r1cs`-compliant constraint system. fn generate_constraints>( &self, cs: &mut CS, ) -> Result<(), snarkvm_algorithms::r1cs::SynthesisError> { - crate::testnet_v1_circuit::TESTNET_V1_CIRCUIT.with(|circuit| circuit.borrow().generate_constraints(cs)) + crate::canary_circuit::CANARY_CIRCUIT.with(|circuit| circuit.borrow().generate_constraints(cs)) } } diff --git a/circuit/environment/src/lib.rs b/circuit/environment/src/lib.rs index 07d2758d40..eb6ac980c9 100644 --- a/circuit/environment/src/lib.rs +++ b/circuit/environment/src/lib.rs @@ -19,6 +19,9 @@ extern crate snarkvm_circuit_environment_witness; pub use snarkvm_circuit_environment_witness::rename_selfs; +pub mod canary_circuit; +pub use canary_circuit::*; + pub mod circuit; pub use circuit::*; @@ -35,9 +38,6 @@ pub use macros::*; pub mod testnet_circuit; pub use testnet_circuit::*; -pub mod testnet_v1_circuit; -pub use testnet_v1_circuit::*; - pub mod traits; pub use traits::*; diff --git a/circuit/network/src/testnet_v1.rs b/circuit/network/src/canary_v0.rs similarity index 89% rename from circuit/network/src/testnet_v1.rs rename to circuit/network/src/canary_v0.rs index 15d0135a61..94238bf55b 100644 --- a/circuit/network/src/testnet_v1.rs +++ b/circuit/network/src/canary_v0.rs @@ -39,7 +39,7 @@ use snarkvm_circuit_algorithms::{ }; use snarkvm_circuit_collections::merkle_tree::MerklePath; use snarkvm_circuit_types::{ - environment::{prelude::*, Assignment, TestnetV1Circuit, R1CS}, + environment::{prelude::*, Assignment, CanaryCircuit, R1CS}, Boolean, Field, Group, @@ -48,59 +48,59 @@ use snarkvm_circuit_types::{ use core::fmt; -type E = TestnetV1Circuit; +type E = CanaryCircuit; 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::TESTNET_V1_BHP_256.clone()); + static BHP_256: BHP256 = BHP256::::constant(console::CANARY_BHP_256.clone()); /// The BHP hash function, which can take an input of up to 512 bits. - static BHP_512: BHP512 = BHP512::::constant(console::TESTNET_V1_BHP_512.clone()); + static BHP_512: BHP512 = BHP512::::constant(console::CANARY_BHP_512.clone()); /// The BHP hash function, which can take an input of up to 768 bits. - static BHP_768: BHP768 = BHP768::::constant(console::TESTNET_V1_BHP_768.clone()); + static BHP_768: BHP768 = BHP768::::constant(console::CANARY_BHP_768.clone()); /// The BHP hash function, which can take an input of up to 1024 bits. - static BHP_1024: BHP1024 = BHP1024::::constant(console::TESTNET_V1_BHP_1024.clone()); + static BHP_1024: BHP1024 = BHP1024::::constant(console::CANARY_BHP_1024.clone()); /// The Keccak hash function, which outputs 256 bits. - static KECCAK_256: Keccak256 = Keccak256::::new(); + static KECCAK_256: Keccak256 = Keccak256::::new(); /// The Keccak hash function, which outputs 384 bits. - static KECCAK_384: Keccak384 = Keccak384::::new(); + static KECCAK_384: Keccak384 = Keccak384::::new(); /// The Keccak hash function, which outputs 512 bits. - static KECCAK_512: Keccak512 = Keccak512::::new(); + static KECCAK_512: Keccak512 = Keccak512::::new(); /// The Pedersen hash function, which can take an input of up to 64 bits. - static PEDERSEN_64: Pedersen64 = Pedersen64::::constant(console::TESTNET_V1_PEDERSEN_64.clone()); + static PEDERSEN_64: Pedersen64 = Pedersen64::::constant(console::CANARY_PEDERSEN_64.clone()); /// The Pedersen hash function, which can take an input of up to 128 bits. - static PEDERSEN_128: Pedersen128 = Pedersen128::::constant(console::TESTNET_V1_PEDERSEN_128.clone()); + static PEDERSEN_128: Pedersen128 = Pedersen128::::constant(console::CANARY_PEDERSEN_128.clone()); /// The Poseidon hash function, using a rate of 2. - static POSEIDON_2: Poseidon2 = Poseidon2::::constant(console::TESTNET_V1_POSEIDON_2.clone()); + static POSEIDON_2: Poseidon2 = Poseidon2::::constant(console::CANARY_POSEIDON_2.clone()); /// The Poseidon hash function, using a rate of 4. - static POSEIDON_4: Poseidon4 = Poseidon4::::constant(console::TESTNET_V1_POSEIDON_4.clone()); + static POSEIDON_4: Poseidon4 = Poseidon4::::constant(console::CANARY_POSEIDON_4.clone()); /// The Poseidon hash function, using a rate of 8. - static POSEIDON_8: Poseidon8 = Poseidon8::::constant(console::TESTNET_V1_POSEIDON_8.clone()); + static POSEIDON_8: Poseidon8 = Poseidon8::::constant(console::CANARY_POSEIDON_8.clone()); /// The SHA-3 hash function, which outputs 256 bits. - static SHA3_256: Sha3_256 = Sha3_256::::new(); + static SHA3_256: Sha3_256 = Sha3_256::::new(); /// The SHA-3 hash function, which outputs 384 bits. - static SHA3_384: Sha3_384 = Sha3_384::::new(); + static SHA3_384: Sha3_384 = Sha3_384::::new(); /// The SHA-3 hash function, which outputs 512 bits. - static SHA3_512: Sha3_512 = Sha3_512::::new(); + static SHA3_512: Sha3_512 = Sha3_512::::new(); } #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] -pub struct AleoTestnetV1; +pub struct AleoCanaryV0; -impl Aleo for AleoTestnetV1 { +impl Aleo for AleoCanaryV0 { /// Initializes the global constants for the Aleo environment. fn initialize_global_constants() { GENERATOR_G.with(|_| ()); @@ -379,7 +379,7 @@ impl Aleo for AleoTestnetV1 { } } -impl Environment for AleoTestnetV1 { +impl Environment for AleoCanaryV0 { type Affine = ::Affine; type BaseField = ::BaseField; type Network = ::Network; @@ -535,10 +535,10 @@ impl Environment for AleoTestnetV1 { } } -impl Display for AleoTestnetV1 { +impl Display for AleoCanaryV0 { fn fmt(&self, f: &mut Formatter) -> fmt::Result { // TODO (howardwu): Find a better way to print the circuit. - fmt::Display::fmt(&TestnetV1Circuit, f) + fmt::Display::fmt(&CanaryCircuit, f) } } @@ -547,7 +547,7 @@ mod tests { use super::*; use snarkvm_circuit_types::Field; - type CurrentAleo = AleoTestnetV1; + type CurrentAleo = AleoCanaryV0; /// Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. fn create_example_circuit() -> Field { diff --git a/circuit/network/src/lib.rs b/circuit/network/src/lib.rs index 58e7b09306..464e4e7ea4 100644 --- a/circuit/network/src/lib.rs +++ b/circuit/network/src/lib.rs @@ -15,12 +15,12 @@ #![forbid(unsafe_code)] #![allow(clippy::too_many_arguments)] +pub mod canary_v0; +pub use canary_v0::*; + pub mod testnet_v0; pub use testnet_v0::*; -pub mod testnet_v1; -pub use testnet_v1::*; - pub mod v0; pub use v0::*; diff --git a/circuit/src/lib.rs b/circuit/src/lib.rs index f8342b02f5..48991bc63a 100644 --- a/circuit/src/lib.rs +++ b/circuit/src/lib.rs @@ -29,13 +29,13 @@ pub mod modules { pub use snarkvm_circuit_environment as environment; pub use snarkvm_circuit_environment::{ Assignment, + CanaryCircuit, Circuit, Eject, Environment, Inject, Mode, TestnetCircuit, - TestnetV1Circuit, }; pub use snarkvm_circuit_network as network; diff --git a/console/network/src/testnet_v1.rs b/console/network/src/canary_v0.rs similarity index 77% rename from console/network/src/testnet_v1.rs rename to console/network/src/canary_v0.rs index 2326efd193..819b1cc1b1 100644 --- a/console/network/src/testnet_v1.rs +++ b/console/network/src/canary_v0.rs @@ -35,55 +35,55 @@ use snarkvm_console_algorithms::{ lazy_static! { /// The group bases for the Aleo signature and encryption schemes. - static ref GENERATOR_G: Vec> = TestnetV1::new_bases("AleoAccountEncryptionAndSignatureScheme0"); + static ref GENERATOR_G: Vec> = CanaryV0::new_bases("AleoAccountEncryptionAndSignatureScheme0"); /// The Varuna sponge parameters. - static ref VARUNA_FS_PARAMETERS: FiatShamirParameters = FiatShamir::::sample_parameters(); + static ref VARUNA_FS_PARAMETERS: FiatShamirParameters = FiatShamir::::sample_parameters(); /// The encryption domain as a constant field element. - static ref ENCRYPTION_DOMAIN: Field = Field::::new_domain_separator("AleoSymmetricEncryption0"); + static ref ENCRYPTION_DOMAIN: Field = Field::::new_domain_separator("AleoSymmetricEncryption0"); /// The graph key domain as a constant field element. - static ref GRAPH_KEY_DOMAIN: Field = Field::::new_domain_separator("AleoGraphKey0"); + static ref GRAPH_KEY_DOMAIN: Field = Field::::new_domain_separator("AleoGraphKey0"); /// The serial number domain as a constant field element. - static ref SERIAL_NUMBER_DOMAIN: Field = Field::::new_domain_separator("AleoSerialNumber0"); + 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 TESTNET_V1_BHP_256: BHP256 = BHP256::::setup("AleoBHP256").expect("Failed to setup BHP256"); + pub static ref CANARY_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 TESTNET_V1_BHP_512: BHP512 = BHP512::::setup("AleoBHP512").expect("Failed to setup BHP512"); + pub static ref CANARY_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 TESTNET_V1_BHP_768: BHP768 = BHP768::::setup("AleoBHP768").expect("Failed to setup BHP768"); + pub static ref CANARY_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 TESTNET_V1_BHP_1024: BHP1024 = BHP1024::::setup("AleoBHP1024").expect("Failed to setup BHP1024"); + pub static ref CANARY_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 TESTNET_V1_PEDERSEN_64: Pedersen64 = Pedersen64::::setup("AleoPedersen64"); + pub static ref CANARY_PEDERSEN_64: Pedersen64 = Pedersen64::::setup("AleoPedersen64"); /// The Pedersen hash function, which can take an input of up to 128 bits. - pub static ref TESTNET_V1_PEDERSEN_128: Pedersen128 = Pedersen128::::setup("AleoPedersen128"); + pub static ref CANARY_PEDERSEN_128: Pedersen128 = Pedersen128::::setup("AleoPedersen128"); /// The Poseidon hash function, using a rate of 2. - pub static ref TESTNET_V1_POSEIDON_2: Poseidon2 = Poseidon2::::setup("AleoPoseidon2").expect("Failed to setup Poseidon2"); + pub static ref CANARY_POSEIDON_2: Poseidon2 = Poseidon2::::setup("AleoPoseidon2").expect("Failed to setup Poseidon2"); /// The Poseidon hash function, using a rate of 4. - pub static ref TESTNET_V1_POSEIDON_4: Poseidon4 = Poseidon4::::setup("AleoPoseidon4").expect("Failed to setup Poseidon4"); + pub static ref CANARY_POSEIDON_4: Poseidon4 = Poseidon4::::setup("AleoPoseidon4").expect("Failed to setup Poseidon4"); /// The Poseidon hash function, using a rate of 8. - pub static ref TESTNET_V1_POSEIDON_8: Poseidon8 = Poseidon8::::setup("AleoPoseidon8").expect("Failed to setup Poseidon8"); + pub static ref CANARY_POSEIDON_8: Poseidon8 = Poseidon8::::setup("AleoPoseidon8").expect("Failed to setup Poseidon8"); - pub static ref TESTNET_V1_CREDITS_PROVING_KEYS: IndexMap>> = { + pub static ref CANARY_CREDITS_PROVING_KEYS: IndexMap>> = { let mut map = IndexMap::new(); - snarkvm_parameters::insert_testnet_v1_credit_keys!(map, VarunaProvingKey, Prover); + snarkvm_parameters::insert_canary_credit_keys!(map, VarunaProvingKey, Prover); map }; - pub static ref TESTNET_V1_CREDITS_VERIFYING_KEYS: IndexMap>> = { + pub static ref CANARY_CREDITS_VERIFYING_KEYS: IndexMap>> = { let mut map = IndexMap::new(); - snarkvm_parameters::insert_testnet_v1_credit_keys!(map, VarunaVerifyingKey, Verifier); + snarkvm_parameters::insert_canary_credit_keys!(map, VarunaVerifyingKey, Verifier); map }; } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] -pub struct TestnetV1; +pub struct CanaryV0; -impl TestnetV1 { +impl CanaryV0 { /// 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. @@ -100,7 +100,7 @@ impl TestnetV1 { } } -impl Environment for TestnetV1 { +impl Environment for CanaryV0 { type Affine = ::Affine; type BigInteger = ::BigInteger; type Field = ::Field; @@ -118,7 +118,7 @@ impl Environment for TestnetV1 { const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B; } -impl Network for TestnetV1 { +impl Network for CanaryV0 { /// The block hash type. type BlockHash = AleoID, { hrp2!("ab") }>; /// The ratification ID type. @@ -145,7 +145,7 @@ impl Network for TestnetV1 { /// The maximum number of certificates in a batch. const MAX_CERTIFICATES: u16 = 100; /// The network name. - const NAME: &'static str = "Aleo Testnet (v1)"; + const NAME: &'static str = "Aleo Canary (v0)"; /// Returns the genesis block bytes. fn genesis_bytes() -> &'static [u8] { @@ -154,14 +154,14 @@ impl Network for TestnetV1 { /// Returns the proving key for the given function name in `credits.aleo`. fn get_credits_proving_key(function_name: String) -> Result<&'static Arc>> { - TESTNET_V1_CREDITS_PROVING_KEYS + CANARY_CREDITS_PROVING_KEYS .get(&function_name) .ok_or_else(|| anyhow!("Proving key for credits.aleo/{function_name}' not found")) } /// Returns the verifying key for the given function name in `credits.aleo`. fn get_credits_verifying_key(function_name: String) -> Result<&'static Arc>> { - TESTNET_V1_CREDITS_VERIFYING_KEYS + CANARY_CREDITS_VERIFYING_KEYS .get(&function_name) .ok_or_else(|| anyhow!("Verifying key for credits.aleo/{function_name}' not found")) } @@ -239,82 +239,82 @@ impl Network for TestnetV1 { /// Returns a BHP commitment with an input hasher of 256-bits and randomizer. fn commit_bhp256(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_256.commit(input, randomizer) + CANARY_BHP_256.commit(input, randomizer) } /// Returns a BHP commitment with an input hasher of 512-bits and randomizer. fn commit_bhp512(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_512.commit(input, randomizer) + CANARY_BHP_512.commit(input, randomizer) } /// Returns a BHP commitment with an input hasher of 768-bits and randomizer. fn commit_bhp768(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_768.commit(input, randomizer) + CANARY_BHP_768.commit(input, randomizer) } /// Returns a BHP commitment with an input hasher of 1024-bits and randomizer. fn commit_bhp1024(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_1024.commit(input, randomizer) + CANARY_BHP_1024.commit(input, randomizer) } /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. fn commit_ped64(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_PEDERSEN_64.commit(input, randomizer) + CANARY_PEDERSEN_64.commit(input, randomizer) } /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. fn commit_ped128(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_PEDERSEN_128.commit(input, randomizer) + CANARY_PEDERSEN_128.commit(input, randomizer) } /// Returns a BHP commitment with an input hasher of 256-bits and randomizer. fn commit_to_group_bhp256(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_256.commit_uncompressed(input, randomizer) + CANARY_BHP_256.commit_uncompressed(input, randomizer) } /// Returns a BHP commitment with an input hasher of 512-bits and randomizer. fn commit_to_group_bhp512(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_512.commit_uncompressed(input, randomizer) + CANARY_BHP_512.commit_uncompressed(input, randomizer) } /// Returns a BHP commitment with an input hasher of 768-bits and randomizer. fn commit_to_group_bhp768(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_768.commit_uncompressed(input, randomizer) + CANARY_BHP_768.commit_uncompressed(input, randomizer) } /// Returns a BHP commitment with an input hasher of 1024-bits and randomizer. fn commit_to_group_bhp1024(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_BHP_1024.commit_uncompressed(input, randomizer) + CANARY_BHP_1024.commit_uncompressed(input, randomizer) } /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. fn commit_to_group_ped64(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_PEDERSEN_64.commit_uncompressed(input, randomizer) + CANARY_PEDERSEN_64.commit_uncompressed(input, randomizer) } /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. fn commit_to_group_ped128(input: &[bool], randomizer: &Scalar) -> Result> { - TESTNET_V1_PEDERSEN_128.commit_uncompressed(input, randomizer) + CANARY_PEDERSEN_128.commit_uncompressed(input, randomizer) } /// Returns the BHP hash with an input hasher of 256-bits. fn hash_bhp256(input: &[bool]) -> Result> { - TESTNET_V1_BHP_256.hash(input) + CANARY_BHP_256.hash(input) } /// Returns the BHP hash with an input hasher of 512-bits. fn hash_bhp512(input: &[bool]) -> Result> { - TESTNET_V1_BHP_512.hash(input) + CANARY_BHP_512.hash(input) } /// Returns the BHP hash with an input hasher of 768-bits. fn hash_bhp768(input: &[bool]) -> Result> { - TESTNET_V1_BHP_768.hash(input) + CANARY_BHP_768.hash(input) } /// Returns the BHP hash with an input hasher of 1024-bits. fn hash_bhp1024(input: &[bool]) -> Result> { - TESTNET_V1_BHP_1024.hash(input) + CANARY_BHP_1024.hash(input) } /// Returns the Keccak hash with a 256-bit output. @@ -334,27 +334,27 @@ impl Network for TestnetV1 { /// Returns the Pedersen hash for a given (up to) 64-bit input. fn hash_ped64(input: &[bool]) -> Result> { - TESTNET_V1_PEDERSEN_64.hash(input) + CANARY_PEDERSEN_64.hash(input) } /// Returns the Pedersen hash for a given (up to) 128-bit input. fn hash_ped128(input: &[bool]) -> Result> { - TESTNET_V1_PEDERSEN_128.hash(input) + CANARY_PEDERSEN_128.hash(input) } /// Returns the Poseidon hash with an input rate of 2. fn hash_psd2(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_2.hash(input) + CANARY_POSEIDON_2.hash(input) } /// Returns the Poseidon hash with an input rate of 4. fn hash_psd4(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_4.hash(input) + CANARY_POSEIDON_4.hash(input) } /// Returns the Poseidon hash with an input rate of 8. fn hash_psd8(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_8.hash(input) + CANARY_POSEIDON_8.hash(input) } /// Returns the SHA-3 hash with a 256-bit output. @@ -374,87 +374,87 @@ impl Network for TestnetV1 { /// Returns the extended Poseidon hash with an input rate of 2. fn hash_many_psd2(input: &[Field], num_outputs: u16) -> Vec> { - TESTNET_V1_POSEIDON_2.hash_many(input, num_outputs) + CANARY_POSEIDON_2.hash_many(input, num_outputs) } /// Returns the extended Poseidon hash with an input rate of 4. fn hash_many_psd4(input: &[Field], num_outputs: u16) -> Vec> { - TESTNET_V1_POSEIDON_4.hash_many(input, num_outputs) + CANARY_POSEIDON_4.hash_many(input, num_outputs) } /// Returns the extended Poseidon hash with an input rate of 8. fn hash_many_psd8(input: &[Field], num_outputs: u16) -> Vec> { - TESTNET_V1_POSEIDON_8.hash_many(input, num_outputs) + CANARY_POSEIDON_8.hash_many(input, num_outputs) } /// Returns the BHP hash with an input hasher of 256-bits. fn hash_to_group_bhp256(input: &[bool]) -> Result> { - TESTNET_V1_BHP_256.hash_uncompressed(input) + CANARY_BHP_256.hash_uncompressed(input) } /// Returns the BHP hash with an input hasher of 512-bits. fn hash_to_group_bhp512(input: &[bool]) -> Result> { - TESTNET_V1_BHP_512.hash_uncompressed(input) + CANARY_BHP_512.hash_uncompressed(input) } /// Returns the BHP hash with an input hasher of 768-bits. fn hash_to_group_bhp768(input: &[bool]) -> Result> { - TESTNET_V1_BHP_768.hash_uncompressed(input) + CANARY_BHP_768.hash_uncompressed(input) } /// Returns the BHP hash with an input hasher of 1024-bits. fn hash_to_group_bhp1024(input: &[bool]) -> Result> { - TESTNET_V1_BHP_1024.hash_uncompressed(input) + CANARY_BHP_1024.hash_uncompressed(input) } /// Returns the Pedersen hash for a given (up to) 64-bit input. fn hash_to_group_ped64(input: &[bool]) -> Result> { - TESTNET_V1_PEDERSEN_64.hash_uncompressed(input) + CANARY_PEDERSEN_64.hash_uncompressed(input) } /// Returns the Pedersen hash for a given (up to) 128-bit input. fn hash_to_group_ped128(input: &[bool]) -> Result> { - TESTNET_V1_PEDERSEN_128.hash_uncompressed(input) + CANARY_PEDERSEN_128.hash_uncompressed(input) } /// Returns the Poseidon hash with an input rate of 2 on the affine curve. fn hash_to_group_psd2(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_2.hash_to_group(input) + CANARY_POSEIDON_2.hash_to_group(input) } /// Returns the Poseidon hash with an input rate of 4 on the affine curve. fn hash_to_group_psd4(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_4.hash_to_group(input) + CANARY_POSEIDON_4.hash_to_group(input) } /// Returns the Poseidon hash with an input rate of 8 on the affine curve. fn hash_to_group_psd8(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_8.hash_to_group(input) + CANARY_POSEIDON_8.hash_to_group(input) } /// Returns the Poseidon hash with an input rate of 2 on the scalar field. fn hash_to_scalar_psd2(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_2.hash_to_scalar(input) + CANARY_POSEIDON_2.hash_to_scalar(input) } /// Returns the Poseidon hash with an input rate of 4 on the scalar field. fn hash_to_scalar_psd4(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_4.hash_to_scalar(input) + CANARY_POSEIDON_4.hash_to_scalar(input) } /// Returns the Poseidon hash with an input rate of 8 on the scalar field. fn hash_to_scalar_psd8(input: &[Field]) -> Result> { - TESTNET_V1_POSEIDON_8.hash_to_scalar(input) + CANARY_POSEIDON_8.hash_to_scalar(input) } /// Returns a Merkle tree with a BHP leaf hasher of 1024-bits and a BHP path hasher of 512-bits. fn merkle_tree_bhp(leaves: &[Vec]) -> Result> { - MerkleTree::new(&*TESTNET_V1_BHP_1024, &*TESTNET_V1_BHP_512, leaves) + MerkleTree::new(&*CANARY_BHP_1024, &*CANARY_BHP_512, leaves) } /// Returns a Merkle tree with a Poseidon leaf hasher with input rate of 4 and a Poseidon path hasher with input rate of 2. fn merkle_tree_psd(leaves: &[Vec>]) -> Result> { - MerkleTree::new(&*TESTNET_V1_POSEIDON_4, &*TESTNET_V1_POSEIDON_2, leaves) + MerkleTree::new(&*CANARY_POSEIDON_4, &*CANARY_POSEIDON_2, leaves) } /// Returns `true` if the given Merkle path is valid for the given root and leaf. @@ -463,7 +463,7 @@ impl Network for TestnetV1 { root: &Field, leaf: &Vec, ) -> bool { - path.verify(&*TESTNET_V1_BHP_1024, &*TESTNET_V1_BHP_512, root, leaf) + path.verify(&*CANARY_BHP_1024, &*CANARY_BHP_512, root, leaf) } /// Returns `true` if the given Merkle path is valid for the given root and leaf. @@ -472,7 +472,7 @@ impl Network for TestnetV1 { root: &Field, leaf: &Vec>, ) -> bool { - path.verify(&*TESTNET_V1_POSEIDON_4, &*TESTNET_V1_POSEIDON_2, root, leaf) + path.verify(&*CANARY_POSEIDON_4, &*CANARY_POSEIDON_2, root, leaf) } } @@ -480,7 +480,7 @@ impl Network for TestnetV1 { mod tests { use super::*; - type CurrentNetwork = TestnetV1; + type CurrentNetwork = CanaryV0; #[test] fn test_g_scalar_multiply() { diff --git a/console/network/src/lib.rs b/console/network/src/lib.rs index c0d42ed9e9..9d905ac761 100644 --- a/console/network/src/lib.rs +++ b/console/network/src/lib.rs @@ -25,15 +25,15 @@ pub use snarkvm_console_network_environment::*; mod helpers; pub use helpers::*; +mod canary_v0; +pub use canary_v0::*; + mod mainnet_v0; pub use mainnet_v0::*; mod testnet_v0; pub use testnet_v0::*; -mod testnet_v1; -pub use testnet_v1::*; - pub mod prelude { pub use crate::{environment::prelude::*, Network}; } diff --git a/ledger/query/src/query.rs b/ledger/query/src/query.rs index 95c8625e03..c5d0ac524d 100644 --- a/ledger/query/src/query.rs +++ b/ledger/query/src/query.rs @@ -72,8 +72,8 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/latest/stateRoot"))?.into_json()?) } - console::network::TestnetV1::ID => { - Ok(Self::get_request(&format!("{url}/testnet_v1/latest/stateRoot"))?.into_json()?) + console::network::CanaryV0::ID => { + Ok(Self::get_request(&format!("{url}/canary/latest/stateRoot"))?.into_json()?) } _ => bail!("Unsupported network ID in inclusion query"), }, @@ -92,8 +92,8 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/latest/stateRoot")).await?.json().await?) } - console::network::TestnetV1::ID => { - Ok(Self::get_request_async(&format!("{url}/testnet_v1/latest/stateRoot")).await?.json().await?) + console::network::CanaryV0::ID => { + Ok(Self::get_request_async(&format!("{url}/canary/latest/stateRoot")).await?.json().await?) } _ => bail!("Unsupported network ID in inclusion query"), }, @@ -111,8 +111,8 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/statePath/{commitment}"))?.into_json()?) } - console::network::TestnetV1::ID => { - Ok(Self::get_request(&format!("{url}/testnet_v1/statePath/{commitment}"))?.into_json()?) + console::network::CanaryV0::ID => { + Ok(Self::get_request(&format!("{url}/canary/statePath/{commitment}"))?.into_json()?) } _ => bail!("Unsupported network ID in inclusion query"), }, @@ -131,11 +131,8 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/statePath/{commitment}")).await?.json().await?) } - console::network::TestnetV1::ID => { - Ok(Self::get_request_async(&format!("{url}/testnet_v1/statePath/{commitment}")) - .await? - .json() - .await?) + console::network::CanaryV0::ID => { + Ok(Self::get_request_async(&format!("{url}/canary/statePath/{commitment}")).await?.json().await?) } _ => bail!("Unsupported network ID in inclusion query"), }, @@ -157,8 +154,8 @@ impl> Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/program/{program_id}"))?.into_json()?) } - console::network::TestnetV1::ID => { - Ok(Self::get_request(&format!("{url}/testnet_v1/program/{program_id}"))?.into_json()?) + console::network::CanaryV0::ID => { + Ok(Self::get_request(&format!("{url}/canary/program/{program_id}"))?.into_json()?) } _ => bail!("Unsupported network ID in inclusion query"), }, @@ -179,8 +176,8 @@ impl> Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/program/{program_id}")).await?.json().await?) } - console::network::TestnetV1::ID => { - Ok(Self::get_request_async(&format!("{url}/testnet_v1/program/{program_id}")).await?.json().await?) + console::network::CanaryV0::ID => { + Ok(Self::get_request_async(&format!("{url}/canary/program/{program_id}")).await?.json().await?) } _ => bail!("Unsupported network ID in inclusion query"), }, diff --git a/parameters/examples/inclusion.rs b/parameters/examples/inclusion.rs index e1acc884cd..83c0f116bc 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::{MainnetV0, Network, TestnetV0, TestnetV1}, + network::{CanaryV0, MainnetV0, Network, TestnetV0}, prelude::{One, ToBytes, Zero}, program::{Plaintext, Record, StatePath}, types::Field, @@ -176,8 +176,8 @@ pub fn main() -> Result<()> { "testnet" => { inclusion::()?; } - "testnet_v1" => { - inclusion::()?; + "canary" => { + inclusion::()?; } _ => panic!("Invalid network"), }; diff --git a/parameters/examples/setup.rs b/parameters/examples/setup.rs index b9f5678545..e324c9b0c3 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, MainnetV0, Network, TestnetV0, TestnetV1}; +use snarkvm_console::network::{prelude::ToBytes, CanaryV0, MainnetV0, Network, TestnetV0}; use snarkvm_synthesizer::{Process, Program}; use anyhow::Result; @@ -152,7 +152,7 @@ pub fn main() -> Result<()> { "credits" => match args[2].as_str() { "mainnet" => credits_program::(), "testnet" => credits_program::(), - "testnet_v1" => credits_program::(), + "canary" => credits_program::(), _ => panic!("Invalid network"), }?, _ => panic!("Invalid parameter"), diff --git a/parameters/scripts/canary/credits.sh b/parameters/scripts/canary/credits.sh new file mode 100755 index 0000000000..5b816dfb84 --- /dev/null +++ b/parameters/scripts/canary/credits.sh @@ -0,0 +1,9 @@ +# Generate proving and verifying keys. + +# Inputs: program name + +cargo run --release --example setup credits canary -- --nocapture || exit + +mv *.metadata ../../src/canary/resources || exit +mv *.prover.* ~/.aleo/resources || exit +mv *.verifier ../../src/canary/resources || exit diff --git a/parameters/scripts/canary/inclusion.sh b/parameters/scripts/canary/inclusion.sh new file mode 100755 index 0000000000..339e1615af --- /dev/null +++ b/parameters/scripts/canary/inclusion.sh @@ -0,0 +1,9 @@ +# Generates the inclusion proving and verifying key. + +# Inputs: network + +cargo run --release --example inclusion canary -- --nocapture || exit + +mv inclusion.metadata ../../src/canary/resources || exit +mv inclusion.prover.* ~/.aleo/resources || exit +mv inclusion.verifier ../../src/canary/resources || exit diff --git a/parameters/scripts/testnet_v1/credits.sh b/parameters/scripts/testnet_v1/credits.sh deleted file mode 100755 index 6ae887f9aa..0000000000 --- a/parameters/scripts/testnet_v1/credits.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Generate proving and verifying keys. - -# Inputs: program name - -cargo run --release --example setup credits testnet_v1 -- --nocapture || exit - -mv *.metadata ../../src/testnet_v1/resources || exit -mv *.prover.* ~/.aleo/resources || exit -mv *.verifier ../../src/testnet_v1/resources || exit diff --git a/parameters/scripts/testnet_v1/inclusion.sh b/parameters/scripts/testnet_v1/inclusion.sh deleted file mode 100755 index e138086670..0000000000 --- a/parameters/scripts/testnet_v1/inclusion.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Generates the inclusion proving and verifying key. - -# Inputs: network - -cargo run --release --example inclusion testnet_v1 -- --nocapture || exit - -mv inclusion.metadata ../../src/testnet_v1/resources || exit -mv inclusion.prover.* ~/.aleo/resources || exit -mv inclusion.verifier ../../src/testnet_v1/resources || exit diff --git a/parameters/src/testnet_v1/genesis.rs b/parameters/src/canary/genesis.rs similarity index 100% rename from parameters/src/testnet_v1/genesis.rs rename to parameters/src/canary/genesis.rs diff --git a/parameters/src/testnet_v1/mod.rs b/parameters/src/canary/mod.rs similarity index 72% rename from parameters/src/testnet_v1/mod.rs rename to parameters/src/canary/mod.rs index a62fcf9558..02dd96dc8f 100644 --- a/parameters/src/testnet_v1/mod.rs +++ b/parameters/src/canary/mod.rs @@ -15,7 +15,7 @@ pub mod genesis; pub use genesis::*; -const REMOTE_URL: &str = "https://s3-us-west-1.amazonaws.com/testnet-v1.parameters"; +const REMOTE_URL: &str = "https://s3-us-west-1.amazonaws.com/canary.parameters"; // BondPublic impl_remote!(BondPublicProver, REMOTE_URL, "resources/", "bond_public", "prover"); @@ -61,30 +61,30 @@ impl_remote!(FeePublicProver, REMOTE_URL, "resources/", "fee_public", "prover"); impl_local!(FeePublicVerifier, "resources/", "fee_public", "verifier"); #[macro_export] -macro_rules! insert_testnet_v1_credit_keys { +macro_rules! insert_canary_credit_keys { ($map:ident, $type:ident<$network:ident>, $variant:ident) => {{ paste::paste! { let string = stringify!([<$variant:lower>]); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("bond_public", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("unbond_public", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("unbond_delegator_as_validator", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("claim_unbond_public", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("set_validator_state", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_private", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_public", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_public_as_signer", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_private_to_public", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("transfer_public_to_private", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("join", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("split", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("fee_private", $crate::testnet_v1::[]::load_bytes())); - $crate::insert_testnet_v1_key!($map, string, $type<$network>, ("fee_public", $crate::testnet_v1::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("bond_public", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("unbond_public", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("unbond_delegator_as_validator", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("claim_unbond_public", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("set_validator_state", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_private", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_public", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_public_as_signer", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_private_to_public", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_public_to_private", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("join", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("split", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("fee_private", $crate::canary::[]::load_bytes())); + $crate::insert_canary_key!($map, string, $type<$network>, ("fee_public", $crate::canary::[]::load_bytes())); } }}; } #[macro_export] -macro_rules! insert_testnet_v1_key { +macro_rules! insert_canary_key { ($map:ident, $string:tt, $type:ident<$network:ident>, ($name:tt, $circuit_key:expr)) => {{ // Load the circuit key bytes. let key_bytes: Vec = $circuit_key.expect(&format!("Failed to load {} bytes", $string)); diff --git a/parameters/src/testnet_v1/resources/block.genesis b/parameters/src/canary/resources/block.genesis similarity index 100% rename from parameters/src/testnet_v1/resources/block.genesis rename to parameters/src/canary/resources/block.genesis diff --git a/parameters/src/testnet_v1/resources/bond_public.metadata b/parameters/src/canary/resources/bond_public.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/bond_public.metadata rename to parameters/src/canary/resources/bond_public.metadata diff --git a/parameters/src/testnet_v1/resources/bond_public.verifier b/parameters/src/canary/resources/bond_public.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/bond_public.verifier rename to parameters/src/canary/resources/bond_public.verifier diff --git a/parameters/src/testnet_v1/resources/claim_unbond_public.metadata b/parameters/src/canary/resources/claim_unbond_public.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/claim_unbond_public.metadata rename to parameters/src/canary/resources/claim_unbond_public.metadata diff --git a/parameters/src/testnet_v1/resources/claim_unbond_public.verifier b/parameters/src/canary/resources/claim_unbond_public.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/claim_unbond_public.verifier rename to parameters/src/canary/resources/claim_unbond_public.verifier diff --git a/parameters/src/testnet_v1/resources/fee_private.metadata b/parameters/src/canary/resources/fee_private.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/fee_private.metadata rename to parameters/src/canary/resources/fee_private.metadata diff --git a/parameters/src/testnet_v1/resources/fee_private.verifier b/parameters/src/canary/resources/fee_private.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/fee_private.verifier rename to parameters/src/canary/resources/fee_private.verifier diff --git a/parameters/src/testnet_v1/resources/fee_public.metadata b/parameters/src/canary/resources/fee_public.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/fee_public.metadata rename to parameters/src/canary/resources/fee_public.metadata diff --git a/parameters/src/testnet_v1/resources/fee_public.verifier b/parameters/src/canary/resources/fee_public.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/fee_public.verifier rename to parameters/src/canary/resources/fee_public.verifier diff --git a/parameters/src/testnet_v1/resources/inclusion.metadata b/parameters/src/canary/resources/inclusion.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/inclusion.metadata rename to parameters/src/canary/resources/inclusion.metadata diff --git a/parameters/src/testnet_v1/resources/inclusion.verifier b/parameters/src/canary/resources/inclusion.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/inclusion.verifier rename to parameters/src/canary/resources/inclusion.verifier diff --git a/parameters/src/testnet_v1/resources/join.metadata b/parameters/src/canary/resources/join.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/join.metadata rename to parameters/src/canary/resources/join.metadata diff --git a/parameters/src/testnet_v1/resources/join.verifier b/parameters/src/canary/resources/join.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/join.verifier rename to parameters/src/canary/resources/join.verifier diff --git a/parameters/src/testnet_v1/resources/set_validator_state.metadata b/parameters/src/canary/resources/set_validator_state.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/set_validator_state.metadata rename to parameters/src/canary/resources/set_validator_state.metadata diff --git a/parameters/src/testnet_v1/resources/set_validator_state.verifier b/parameters/src/canary/resources/set_validator_state.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/set_validator_state.verifier rename to parameters/src/canary/resources/set_validator_state.verifier diff --git a/parameters/src/testnet_v1/resources/split.metadata b/parameters/src/canary/resources/split.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/split.metadata rename to parameters/src/canary/resources/split.metadata diff --git a/parameters/src/testnet_v1/resources/split.verifier b/parameters/src/canary/resources/split.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/split.verifier rename to parameters/src/canary/resources/split.verifier diff --git a/parameters/src/testnet_v1/resources/transfer_private.metadata b/parameters/src/canary/resources/transfer_private.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_private.metadata rename to parameters/src/canary/resources/transfer_private.metadata diff --git a/parameters/src/testnet_v1/resources/transfer_private.verifier b/parameters/src/canary/resources/transfer_private.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_private.verifier rename to parameters/src/canary/resources/transfer_private.verifier diff --git a/parameters/src/testnet_v1/resources/transfer_private_to_public.metadata b/parameters/src/canary/resources/transfer_private_to_public.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_private_to_public.metadata rename to parameters/src/canary/resources/transfer_private_to_public.metadata diff --git a/parameters/src/testnet_v1/resources/transfer_private_to_public.verifier b/parameters/src/canary/resources/transfer_private_to_public.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_private_to_public.verifier rename to parameters/src/canary/resources/transfer_private_to_public.verifier diff --git a/parameters/src/testnet_v1/resources/transfer_public.metadata b/parameters/src/canary/resources/transfer_public.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_public.metadata rename to parameters/src/canary/resources/transfer_public.metadata diff --git a/parameters/src/testnet_v1/resources/transfer_public.verifier b/parameters/src/canary/resources/transfer_public.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_public.verifier rename to parameters/src/canary/resources/transfer_public.verifier diff --git a/parameters/src/testnet_v1/resources/transfer_public_as_signer.metadata b/parameters/src/canary/resources/transfer_public_as_signer.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_public_as_signer.metadata rename to parameters/src/canary/resources/transfer_public_as_signer.metadata diff --git a/parameters/src/testnet_v1/resources/transfer_public_as_signer.verifier b/parameters/src/canary/resources/transfer_public_as_signer.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_public_as_signer.verifier rename to parameters/src/canary/resources/transfer_public_as_signer.verifier diff --git a/parameters/src/testnet_v1/resources/transfer_public_to_private.metadata b/parameters/src/canary/resources/transfer_public_to_private.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_public_to_private.metadata rename to parameters/src/canary/resources/transfer_public_to_private.metadata diff --git a/parameters/src/testnet_v1/resources/transfer_public_to_private.verifier b/parameters/src/canary/resources/transfer_public_to_private.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/transfer_public_to_private.verifier rename to parameters/src/canary/resources/transfer_public_to_private.verifier diff --git a/parameters/src/testnet_v1/resources/unbond_delegator_as_validator.metadata b/parameters/src/canary/resources/unbond_delegator_as_validator.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/unbond_delegator_as_validator.metadata rename to parameters/src/canary/resources/unbond_delegator_as_validator.metadata diff --git a/parameters/src/testnet_v1/resources/unbond_delegator_as_validator.verifier b/parameters/src/canary/resources/unbond_delegator_as_validator.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/unbond_delegator_as_validator.verifier rename to parameters/src/canary/resources/unbond_delegator_as_validator.verifier diff --git a/parameters/src/testnet_v1/resources/unbond_public.metadata b/parameters/src/canary/resources/unbond_public.metadata similarity index 100% rename from parameters/src/testnet_v1/resources/unbond_public.metadata rename to parameters/src/canary/resources/unbond_public.metadata diff --git a/parameters/src/testnet_v1/resources/unbond_public.verifier b/parameters/src/canary/resources/unbond_public.verifier similarity index 100% rename from parameters/src/testnet_v1/resources/unbond_public.verifier rename to parameters/src/canary/resources/unbond_public.verifier diff --git a/parameters/src/lib.rs b/parameters/src/lib.rs index 1616a62186..02ed021cf3 100644 --- a/parameters/src/lib.rs +++ b/parameters/src/lib.rs @@ -30,12 +30,12 @@ pub mod macros; pub mod errors; pub use errors::*; +pub mod canary; + pub mod mainnet; pub mod testnet; -pub mod testnet_v1; - pub mod prelude { pub use crate::errors::*; } diff --git a/synthesizer/src/vm/helpers/macros.rs b/synthesizer/src/vm/helpers/macros.rs index 47c3968bee..1859ec2934 100644 --- a/synthesizer/src/vm/helpers/macros.rs +++ b/synthesizer/src/vm/helpers/macros.rs @@ -66,9 +66,9 @@ macro_rules! convert { // Process the logic. $logic!(console::network::TestnetV0, circuit::AleoTestnetV0) } - console::network::TestnetV1::ID => { + console::network::CanaryV0::ID => { // Process the logic. - $logic!(console::network::TestnetV1, circuit::AleoTestnetV1) + $logic!(console::network::CanaryV0, circuit::AleoCanaryV0) } _ => bail!("Unsupported VM configuration for network: {}", N::ID), } @@ -97,13 +97,13 @@ macro_rules! process { // Process the logic. $logic!(process.read(), console::network::TestnetV0, circuit::AleoTestnetV0) } - console::network::TestnetV1::ID => { + console::network::CanaryV0::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::TestnetV1, circuit::AleoTestnetV1) + $logic!(process.read(), console::network::CanaryV0, circuit::AleoCanaryV0) } _ => bail!("Unsupported VM configuration for network: {}", N::ID), } From fa044515f8028240142ce7f73d85b9047257c330 Mon Sep 17 00:00:00 2001 From: Fabiano Prestes Date: Thu, 23 May 2024 18:07:00 -0400 Subject: [PATCH 23/32] Modify CI to use CircleCI's runners Signed-off-by: Fabiano Prestes --- .circleci/config.yml | 146 +++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2cc706647..cdbddb92ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,7 +137,7 @@ jobs: snarkvm: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - checkout - run: @@ -147,7 +147,7 @@ jobs: algorithms: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: algorithms @@ -156,7 +156,7 @@ jobs: algorithms-profiler: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: # This runs a single test with profiler enabled workspace_member: algorithms @@ -166,7 +166,7 @@ jobs: circuit: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit @@ -175,7 +175,7 @@ jobs: circuit-account: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/account @@ -185,7 +185,7 @@ jobs: circuit-account-noconsole: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/account @@ -195,7 +195,7 @@ jobs: circuit-algorithms: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/algorithms @@ -204,7 +204,7 @@ jobs: circuit-collections: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/collections @@ -214,7 +214,7 @@ jobs: circuit-collections-noconsole: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/collections @@ -224,7 +224,7 @@ jobs: circuit-environment: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/environment @@ -233,7 +233,7 @@ jobs: circuit-network: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/network @@ -242,7 +242,7 @@ jobs: circuit-program: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/program @@ -251,7 +251,7 @@ jobs: circuit-types: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/types @@ -260,7 +260,7 @@ jobs: circuit-types-address: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/types/address @@ -269,7 +269,7 @@ jobs: circuit-types-boolean: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/types/boolean @@ -278,7 +278,7 @@ jobs: circuit-types-field: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/types/field @@ -287,7 +287,7 @@ jobs: circuit-types-group: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/types/group @@ -296,7 +296,7 @@ jobs: circuit-types-integers: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: circuit/types/integers @@ -306,7 +306,7 @@ jobs: circuit-types-scalar: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/types/scalar @@ -315,7 +315,7 @@ jobs: circuit-types-string: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: circuit/types/string @@ -323,7 +323,7 @@ jobs: console: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console @@ -332,7 +332,7 @@ jobs: console-account: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/account @@ -341,7 +341,7 @@ jobs: console-algorithms: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/algorithms @@ -350,7 +350,7 @@ jobs: console-collections: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/collections @@ -359,7 +359,7 @@ jobs: console-network: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/network @@ -368,7 +368,7 @@ jobs: console-network-environment: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/network/environment @@ -377,7 +377,7 @@ jobs: console-program: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/program @@ -386,7 +386,7 @@ jobs: console-types: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types @@ -395,7 +395,7 @@ jobs: console-types-address: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types/address @@ -404,7 +404,7 @@ jobs: console-types-boolean: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types/boolean @@ -413,7 +413,7 @@ jobs: console-types-field: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types/field @@ -422,7 +422,7 @@ jobs: console-types-group: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types/group @@ -431,7 +431,7 @@ jobs: console-types-integers: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types/integers @@ -440,7 +440,7 @@ jobs: console-types-scalar: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types/scalar @@ -449,7 +449,7 @@ jobs: console-types-string: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: console/types/string @@ -458,7 +458,7 @@ jobs: curves: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: curves @@ -467,7 +467,7 @@ jobs: fields: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: fields @@ -476,7 +476,7 @@ jobs: ledger: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger @@ -485,7 +485,7 @@ jobs: ledger-with-rocksdb: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: --features=rocks @@ -495,7 +495,7 @@ jobs: ledger-with-valid-solutions: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: valid_solutions --features=test @@ -505,7 +505,7 @@ jobs: ledger-authority: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/authority @@ -514,7 +514,7 @@ jobs: ledger-block: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/block @@ -523,7 +523,7 @@ jobs: ledger-committee: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: ledger/committee @@ -532,7 +532,7 @@ jobs: ledger-narwhal: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/narwhal @@ -541,7 +541,7 @@ jobs: ledger-narwhal-batch-certificate: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/narwhal/batch-certificate @@ -550,7 +550,7 @@ jobs: ledger-narwhal-batch-header: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/narwhal/batch-header @@ -559,7 +559,7 @@ jobs: ledger-narwhal-data: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/narwhal/data @@ -568,7 +568,7 @@ jobs: ledger-narwhal-subdag: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/narwhal/subdag @@ -577,7 +577,7 @@ jobs: ledger-narwhal-transmission: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/narwhal/transmission @@ -586,7 +586,7 @@ jobs: ledger-narwhal-transmission-id: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/narwhal/transmission-id @@ -595,7 +595,7 @@ jobs: ledger-puzzle: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/puzzle @@ -604,7 +604,7 @@ jobs: ledger-puzzle-epoch: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/puzzle/epoch @@ -613,7 +613,7 @@ jobs: ledger-query: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/query @@ -622,7 +622,7 @@ jobs: ledger-store: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: --features=rocks @@ -632,7 +632,7 @@ jobs: ledger-test-helpers: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: ledger/test-helpers @@ -641,7 +641,7 @@ jobs: parameters: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: parameters @@ -650,7 +650,7 @@ jobs: synthesizer: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: --lib --bins @@ -660,7 +660,7 @@ jobs: synthesizer-integration: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: --test '*' @@ -670,7 +670,7 @@ jobs: synthesizer-process: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: synthesizer/process @@ -679,7 +679,7 @@ jobs: synthesizer-process-with-rocksdb: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: --features=rocks @@ -689,7 +689,7 @@ jobs: synthesizer-program: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: --lib --bins @@ -699,7 +699,7 @@ jobs: synthesizer-program-integration: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: --test '*' -- --skip keccak --skip psd --skip sha @@ -709,7 +709,7 @@ jobs: synthesizer-program-integration-keccak: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: keccak --test '*' @@ -719,7 +719,7 @@ jobs: synthesizer-program-integration-psd: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: psd --test '*' @@ -729,7 +729,7 @@ jobs: synthesizer-program-integration-sha: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: flags: sha --test '*' @@ -739,7 +739,7 @@ jobs: synthesizer-snark: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - run_serial: workspace_member: synthesizer/snark @@ -748,7 +748,7 @@ jobs: utilities: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: utilities @@ -757,7 +757,7 @@ jobs: utilities-derives: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - run_serial: workspace_member: utilities/derives @@ -766,7 +766,7 @@ jobs: wasm: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - checkout - setup_environment: @@ -784,7 +784,7 @@ jobs: check-fmt: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - checkout - install_rust_nightly @@ -800,7 +800,7 @@ jobs: check-clippy: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/2xlarge + resource_class: 2xlarge steps: - checkout - setup_environment: @@ -817,7 +817,7 @@ jobs: check-all-targets: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: anf/xlarge + resource_class: xlarge steps: - checkout - setup_environment: @@ -832,7 +832,7 @@ jobs: verify-windows: executor: name: windows/default - size: xlarge + size: 2xlarge environment: CARGO_NET_GIT_FETCH_WITH_CLI: "true" parameters: From 13b3efabf2d163aa143668276bbeaa70d93ac041 Mon Sep 17 00:00:00 2001 From: raychu86 <14917648+raychu86@users.noreply.github.com> Date: Thu, 23 May 2024 15:17:27 -0700 Subject: [PATCH 24/32] Use parameters::canary --- console/network/src/canary_v0.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/console/network/src/canary_v0.rs b/console/network/src/canary_v0.rs index 819b1cc1b1..9e8d920f0f 100644 --- a/console/network/src/canary_v0.rs +++ b/console/network/src/canary_v0.rs @@ -149,7 +149,7 @@ impl Network for CanaryV0 { /// Returns the genesis block bytes. fn genesis_bytes() -> &'static [u8] { - snarkvm_parameters::testnet::GenesisBytes::load_bytes() + snarkvm_parameters::canary::GenesisBytes::load_bytes() } /// Returns the proving key for the given function name in `credits.aleo`. @@ -172,7 +172,7 @@ impl Network for CanaryV0 { INSTANCE.get_or_init(|| { // Skipping the first byte, which is the encoded version. Arc::new( - CircuitProvingKey::from_bytes_le(&snarkvm_parameters::testnet::INCLUSION_PROVING_KEY[1..]) + CircuitProvingKey::from_bytes_le(&snarkvm_parameters::canary::INCLUSION_PROVING_KEY[1..]) .expect("Failed to load inclusion proving key."), ) }) @@ -184,7 +184,7 @@ impl Network for CanaryV0 { INSTANCE.get_or_init(|| { // Skipping the first byte, which is the encoded version. Arc::new( - CircuitVerifyingKey::from_bytes_le(&snarkvm_parameters::testnet::INCLUSION_VERIFYING_KEY[1..]) + CircuitVerifyingKey::from_bytes_le(&snarkvm_parameters::canary::INCLUSION_VERIFYING_KEY[1..]) .expect("Failed to load inclusion verifying key."), ) }) From 078bd05668ed913f718fd3c5d011db8949b028a5 Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 19:34:39 -0400 Subject: [PATCH 25/32] adding new Testnet genesis block with new coinbase and proof targets Signed-off-by: Fabiano --- .../src/testnet/resources/block.genesis | Bin 14943 -> 14943 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/parameters/src/testnet/resources/block.genesis b/parameters/src/testnet/resources/block.genesis index b2f67da9a2e878adc39627a295c1baa99a56fcd1..53847e49c99fb392a9a5d3b4d42ef01cb4b71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%3j{k!t>$C8rN%To|4__y9?}>;x#KzZ=2QcY45RC|OaQqr2QhmX+TVK5u7Tk2 zNd+AB>2m)d{kfmay1fuqfEG@AM~tc+)qHfjyk9ifAP&-Lsh&CF9J7s7wuD3=ezSP6 zd^Pd%{c_88%{{kT_xu2pJVrDOoxd~0S%)I>HM)DLTfw(7MLkTjqq`+GO(>$Ovt^>z zF8F;g)2}e-Cw1YC`c1(>c)t^fdT?|<^zaIDEq*KKrWd}md|1%6uSCJaz_1YqNhI@Z?fOR_$bYClj9r| zZE7aV#KgpM+g5~9QjOvE-XW~YZ;b|x0JjP-yfG#IKh8CUSoEo1sM!7D6_?33F{3wX z=0)`J+y&>D@6aD)&z0#O+fliFkjkDG!n@{QPvivv{FG=~IcMB-;WqAXtJ7>mcr_|W zV^@~aJz7p4Epf^#Op8@=LMl^)e-7Ik2h5cMfla>;zdCZP0kpchTQ(&E%V892Qdup> zArFXuchdrIw6x$N8aE7H5zwD$sqHP Q`;~ADgMY@ktNg+L52lQ~M*si- From 54c17c0b364d8fcbeca2e9836c26d893cfb08bbe Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 20:21:31 -0400 Subject: [PATCH 26/32] Revert "Merge pull request #2462 from AleoHQ/fix/stored-parameters" This reverts commit a8c0b2d781d01894c1344bdd1c7089d34d1b4cac, reversing changes made to 0bd71b5835f0721b5c22e2ce144da0e19256606d. --- .circleci/config.yml | 146 +++++++++--------- .../mainnet/resources/bond_public.metadata | 4 +- .../mainnet/resources/bond_public.verifier | Bin 673 -> 665 bytes .../resources/claim_unbond_public.metadata | 4 +- .../resources/claim_unbond_public.verifier | Bin 673 -> 665 bytes .../mainnet/resources/fee_private.metadata | 4 +- .../mainnet/resources/fee_private.verifier | Bin 673 -> 665 bytes .../src/mainnet/resources/fee_public.metadata | 4 +- .../src/mainnet/resources/fee_public.verifier | Bin 673 -> 665 bytes .../src/mainnet/resources/inclusion.metadata | 4 +- .../src/mainnet/resources/inclusion.verifier | Bin 673 -> 665 bytes .../src/mainnet/resources/join.metadata | 4 +- .../src/mainnet/resources/join.verifier | Bin 673 -> 665 bytes .../resources/set_validator_state.metadata | 4 +- .../resources/set_validator_state.verifier | Bin 673 -> 665 bytes .../src/mainnet/resources/split.metadata | 4 +- .../src/mainnet/resources/split.verifier | Bin 673 -> 665 bytes .../resources/transfer_private.metadata | 4 +- .../resources/transfer_private.verifier | Bin 673 -> 665 bytes .../transfer_private_to_public.metadata | 4 +- .../transfer_private_to_public.verifier | Bin 673 -> 665 bytes .../resources/transfer_public.metadata | 4 +- .../resources/transfer_public.verifier | Bin 673 -> 665 bytes .../transfer_public_as_signer.metadata | 4 +- .../transfer_public_as_signer.verifier | Bin 673 -> 665 bytes .../transfer_public_to_private.metadata | 4 +- .../transfer_public_to_private.verifier | Bin 673 -> 665 bytes .../unbond_delegator_as_validator.metadata | 4 +- .../unbond_delegator_as_validator.verifier | Bin 673 -> 665 bytes .../mainnet/resources/unbond_public.metadata | 4 +- .../mainnet/resources/unbond_public.verifier | Bin 673 -> 665 bytes .../testnet/resources/bond_public.metadata | 4 +- .../testnet/resources/bond_public.verifier | Bin 673 -> 665 bytes .../resources/claim_unbond_public.metadata | 4 +- .../resources/claim_unbond_public.verifier | Bin 673 -> 665 bytes .../testnet/resources/fee_private.metadata | 4 +- .../testnet/resources/fee_private.verifier | Bin 673 -> 665 bytes .../src/testnet/resources/fee_public.metadata | 4 +- .../src/testnet/resources/fee_public.verifier | Bin 673 -> 665 bytes .../src/testnet/resources/inclusion.metadata | 4 +- .../src/testnet/resources/inclusion.verifier | Bin 673 -> 665 bytes .../src/testnet/resources/join.metadata | 4 +- .../src/testnet/resources/join.verifier | Bin 673 -> 665 bytes .../resources/set_validator_state.metadata | 4 +- .../resources/set_validator_state.verifier | Bin 673 -> 665 bytes .../src/testnet/resources/split.metadata | 4 +- .../src/testnet/resources/split.verifier | Bin 673 -> 665 bytes .../resources/transfer_private.metadata | 4 +- .../resources/transfer_private.verifier | Bin 673 -> 665 bytes .../transfer_private_to_public.metadata | 4 +- .../transfer_private_to_public.verifier | Bin 673 -> 665 bytes .../resources/transfer_public.metadata | 4 +- .../resources/transfer_public.verifier | Bin 673 -> 665 bytes .../transfer_public_as_signer.metadata | 4 +- .../transfer_public_as_signer.verifier | Bin 673 -> 665 bytes .../transfer_public_to_private.metadata | 4 +- .../transfer_public_to_private.verifier | Bin 673 -> 665 bytes .../unbond_delegator_as_validator.metadata | 4 +- .../unbond_delegator_as_validator.verifier | Bin 673 -> 665 bytes .../testnet/resources/unbond_public.metadata | 4 +- .../testnet/resources/unbond_public.verifier | Bin 673 -> 665 bytes 61 files changed, 133 insertions(+), 133 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cdbddb92ba..b2cc706647 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,7 +137,7 @@ jobs: snarkvm: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - checkout - run: @@ -147,7 +147,7 @@ jobs: algorithms: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: algorithms @@ -156,7 +156,7 @@ jobs: algorithms-profiler: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: # This runs a single test with profiler enabled workspace_member: algorithms @@ -166,7 +166,7 @@ jobs: circuit: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit @@ -175,7 +175,7 @@ jobs: circuit-account: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/account @@ -185,7 +185,7 @@ jobs: circuit-account-noconsole: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/account @@ -195,7 +195,7 @@ jobs: circuit-algorithms: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/algorithms @@ -204,7 +204,7 @@ jobs: circuit-collections: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/collections @@ -214,7 +214,7 @@ jobs: circuit-collections-noconsole: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/collections @@ -224,7 +224,7 @@ jobs: circuit-environment: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/environment @@ -233,7 +233,7 @@ jobs: circuit-network: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/network @@ -242,7 +242,7 @@ jobs: circuit-program: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/program @@ -251,7 +251,7 @@ jobs: circuit-types: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/types @@ -260,7 +260,7 @@ jobs: circuit-types-address: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/types/address @@ -269,7 +269,7 @@ jobs: circuit-types-boolean: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/types/boolean @@ -278,7 +278,7 @@ jobs: circuit-types-field: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/types/field @@ -287,7 +287,7 @@ jobs: circuit-types-group: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/types/group @@ -296,7 +296,7 @@ jobs: circuit-types-integers: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: circuit/types/integers @@ -306,7 +306,7 @@ jobs: circuit-types-scalar: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/types/scalar @@ -315,7 +315,7 @@ jobs: circuit-types-string: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: circuit/types/string @@ -323,7 +323,7 @@ jobs: console: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console @@ -332,7 +332,7 @@ jobs: console-account: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/account @@ -341,7 +341,7 @@ jobs: console-algorithms: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/algorithms @@ -350,7 +350,7 @@ jobs: console-collections: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/collections @@ -359,7 +359,7 @@ jobs: console-network: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/network @@ -368,7 +368,7 @@ jobs: console-network-environment: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/network/environment @@ -377,7 +377,7 @@ jobs: console-program: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/program @@ -386,7 +386,7 @@ jobs: console-types: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types @@ -395,7 +395,7 @@ jobs: console-types-address: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types/address @@ -404,7 +404,7 @@ jobs: console-types-boolean: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types/boolean @@ -413,7 +413,7 @@ jobs: console-types-field: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types/field @@ -422,7 +422,7 @@ jobs: console-types-group: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types/group @@ -431,7 +431,7 @@ jobs: console-types-integers: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types/integers @@ -440,7 +440,7 @@ jobs: console-types-scalar: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types/scalar @@ -449,7 +449,7 @@ jobs: console-types-string: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: console/types/string @@ -458,7 +458,7 @@ jobs: curves: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: curves @@ -467,7 +467,7 @@ jobs: fields: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: fields @@ -476,7 +476,7 @@ jobs: ledger: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger @@ -485,7 +485,7 @@ jobs: ledger-with-rocksdb: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: --features=rocks @@ -495,7 +495,7 @@ jobs: ledger-with-valid-solutions: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: valid_solutions --features=test @@ -505,7 +505,7 @@ jobs: ledger-authority: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/authority @@ -514,7 +514,7 @@ jobs: ledger-block: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/block @@ -523,7 +523,7 @@ jobs: ledger-committee: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: ledger/committee @@ -532,7 +532,7 @@ jobs: ledger-narwhal: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/narwhal @@ -541,7 +541,7 @@ jobs: ledger-narwhal-batch-certificate: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/narwhal/batch-certificate @@ -550,7 +550,7 @@ jobs: ledger-narwhal-batch-header: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/narwhal/batch-header @@ -559,7 +559,7 @@ jobs: ledger-narwhal-data: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/narwhal/data @@ -568,7 +568,7 @@ jobs: ledger-narwhal-subdag: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/narwhal/subdag @@ -577,7 +577,7 @@ jobs: ledger-narwhal-transmission: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/narwhal/transmission @@ -586,7 +586,7 @@ jobs: ledger-narwhal-transmission-id: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/narwhal/transmission-id @@ -595,7 +595,7 @@ jobs: ledger-puzzle: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/puzzle @@ -604,7 +604,7 @@ jobs: ledger-puzzle-epoch: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/puzzle/epoch @@ -613,7 +613,7 @@ jobs: ledger-query: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/query @@ -622,7 +622,7 @@ jobs: ledger-store: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: --features=rocks @@ -632,7 +632,7 @@ jobs: ledger-test-helpers: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: ledger/test-helpers @@ -641,7 +641,7 @@ jobs: parameters: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: parameters @@ -650,7 +650,7 @@ jobs: synthesizer: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: --lib --bins @@ -660,7 +660,7 @@ jobs: synthesizer-integration: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: --test '*' @@ -670,7 +670,7 @@ jobs: synthesizer-process: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: synthesizer/process @@ -679,7 +679,7 @@ jobs: synthesizer-process-with-rocksdb: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: --features=rocks @@ -689,7 +689,7 @@ jobs: synthesizer-program: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: --lib --bins @@ -699,7 +699,7 @@ jobs: synthesizer-program-integration: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: --test '*' -- --skip keccak --skip psd --skip sha @@ -709,7 +709,7 @@ jobs: synthesizer-program-integration-keccak: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: keccak --test '*' @@ -719,7 +719,7 @@ jobs: synthesizer-program-integration-psd: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: psd --test '*' @@ -729,7 +729,7 @@ jobs: synthesizer-program-integration-sha: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: flags: sha --test '*' @@ -739,7 +739,7 @@ jobs: synthesizer-snark: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - run_serial: workspace_member: synthesizer/snark @@ -748,7 +748,7 @@ jobs: utilities: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: utilities @@ -757,7 +757,7 @@ jobs: utilities-derives: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - run_serial: workspace_member: utilities/derives @@ -766,7 +766,7 @@ jobs: wasm: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - checkout - setup_environment: @@ -784,7 +784,7 @@ jobs: check-fmt: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - checkout - install_rust_nightly @@ -800,7 +800,7 @@ jobs: check-clippy: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: 2xlarge + resource_class: anf/2xlarge steps: - checkout - setup_environment: @@ -817,7 +817,7 @@ jobs: check-all-targets: docker: - image: cimg/rust:1.76.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well - resource_class: xlarge + resource_class: anf/xlarge steps: - checkout - setup_environment: @@ -832,7 +832,7 @@ jobs: verify-windows: executor: name: windows/default - size: 2xlarge + size: xlarge environment: CARGO_NET_GIT_FETCH_WITH_CLI: "true" parameters: diff --git a/parameters/src/mainnet/resources/bond_public.metadata b/parameters/src/mainnet/resources/bond_public.metadata index 4651d2ff51..9fbc5179a8 100644 --- a/parameters/src/mainnet/resources/bond_public.metadata +++ b/parameters/src/mainnet/resources/bond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "2f0d0703e3ce260286c40830015b1376c644f73dac5ca57cd7c67074e35ef32a", "prover_size": 29353850, - "verifier_checksum": "8ff394ca5509efeab7c71a26f4784ef9befba73528b11169975f057cf7353b77", - "verifier_size": 673 + "verifier_checksum": "f4d689b5252ef4243abd7ee8acea3e6e9d0fb137d85908b6a04661d58490d469", + "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 6944704b9351b157efc6fe98cae4d480a54f2d84..694480daecf08f0f3741ef415ed164174a21ef11 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(*ZVX@m04Uo7cK`qY diff --git a/parameters/src/mainnet/resources/claim_unbond_public.metadata b/parameters/src/mainnet/resources/claim_unbond_public.metadata index 64b2073039..7e651302bc 100644 --- a/parameters/src/mainnet/resources/claim_unbond_public.metadata +++ b/parameters/src/mainnet/resources/claim_unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "5b99b8dc31f44ee56a0b1d07370191174e72414969df2fd35f1cc7c061791815", "prover_size": 16861332, - "verifier_checksum": "1e35a27ec069a4871a65374dedd41fa187e19b0d9cb6b20cc4adf3966ab257c5", - "verifier_size": 673 + "verifier_checksum": "e53699624b4677f8b1826dcc54f6980aa6400170032244a9082e5bee6c89d39d", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/claim_unbond_public.verifier b/parameters/src/mainnet/resources/claim_unbond_public.verifier index 3dfce60306dc725f147b30c78b73628dae389f37..2cbb331c383181c2224488b37b0147df62fe5344 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&aRt#VO04d)CmH+?% diff --git a/parameters/src/mainnet/resources/fee_private.metadata b/parameters/src/mainnet/resources/fee_private.metadata index 6793d31901..ae797e9eae 100644 --- a/parameters/src/mainnet/resources/fee_private.metadata +++ b/parameters/src/mainnet/resources/fee_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "27b72ed5e8086127f8cfcfc94b8c63543e5901a368a3f782aedcb51f9ace738e", "prover_size": 66297972, - "verifier_checksum": "a9951e76ba3738840f472d38b7c0d496c6d26f6bc58a9035ef7f7f68c353a89b", - "verifier_size": 673 + "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 11be848dd3464c95813987399d204a3b36551ce1..7756de8de887b0ac450d17c79644aca9008647b5 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(NhZ(>C04^>BF#rGn diff --git a/parameters/src/mainnet/resources/fee_public.metadata b/parameters/src/mainnet/resources/fee_public.metadata index 76dacefc4c..a4d5aa14c0 100644 --- a/parameters/src/mainnet/resources/fee_public.metadata +++ b/parameters/src/mainnet/resources/fee_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "d967fc683af43a0a01817283af05181f9f8277c49351ca664a642b0eb9ec9363", "prover_size": 29174402, - "verifier_checksum": "ccf30fa4ce688f93ef3a985057684fe9e32585fb8e93f2c472169e506da6cdb0", - "verifier_size": 673 + "verifier_checksum": "1e8cc6ab1de9ec21d1559434c516698af40895df3e3d6afb0615495d0201955b", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/fee_public.verifier b/parameters/src/mainnet/resources/fee_public.verifier index 8939a796b7163be251c1362d961aa74b8e73e3f1..1ae17cb8d279befbb9e6b9277cc8c001adef6333 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOePLX7X~l@042=>6#xJL diff --git a/parameters/src/mainnet/resources/inclusion.metadata b/parameters/src/mainnet/resources/inclusion.metadata index 8df45d6edb..76f795f99c 100644 --- a/parameters/src/mainnet/resources/inclusion.metadata +++ b/parameters/src/mainnet/resources/inclusion.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8faa4d3aaaa5e786d20b61f825e50901f9dcf470455d1d2994e091eefcc66a4e", "prover_size": 233812212, - "verifier_checksum": "57bf79c7a493ee79f8ebed2c8e6e7e8a0a6d11b2f6edcba6e943768cb6a250cc", - "verifier_size": 673 + "verifier_checksum": "2b6fdf5a869db365620a44fc3991e3f807a4e670bb976277ad327f3179866553", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/inclusion.verifier b/parameters/src/mainnet/resources/inclusion.verifier index d037956880aff4737c087407dddcc3f464187d17..f317f07efae1ca78a888a6fd73f19072aa283716 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 VcmbQqx{!6lOeT)LHYNrT001ga1Fir7 diff --git a/parameters/src/mainnet/resources/join.metadata b/parameters/src/mainnet/resources/join.metadata index f7e256ba13..b6ff59da8e 100644 --- a/parameters/src/mainnet/resources/join.metadata +++ b/parameters/src/mainnet/resources/join.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "b609cd8cd51eb0870e87b31db05b45768a77daed7a2b0b3c8f5a570e12044112", "prover_size": 74722164, - "verifier_checksum": "3a441d336ddd9cdc80dce07d161eb435d0cd21afd2463b0de9fc6fdf867f4f6a", - "verifier_size": 673 + "verifier_checksum": "70691d33b4028fd2813edcb9468fa702239b93adab56fc8d3e9ea0636668a844", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/join.verifier b/parameters/src/mainnet/resources/join.verifier index a7afbb3672725806a1f0f5b6af58bfdca084b530..035670470f7244c275bb547c1a595c180df050d7 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 VcmbQqx{!6lOeT(aW<~}O001RC0{Z{} diff --git a/parameters/src/mainnet/resources/set_validator_state.metadata b/parameters/src/mainnet/resources/set_validator_state.metadata index f21df09817..13434d577f 100644 --- a/parameters/src/mainnet/resources/set_validator_state.metadata +++ b/parameters/src/mainnet/resources/set_validator_state.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "f782f04cf9f46464f307b4ae6418f2b8bec375e341e5a02a51c9d6b8b38e4f7f", "prover_size": 17390188, - "verifier_checksum": "294517ffa497c173e0097090c09e33f2c0888c97126c3b74a17731ce3d2f6dd9", - "verifier_size": 673 + "verifier_checksum": "a224e3690b8c789b026fa5c93d2aada9148f4d45c756c492fb59accb128be724", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/set_validator_state.verifier b/parameters/src/mainnet/resources/set_validator_state.verifier index c1cde948e933b205cc157fd0d6d3e27b7f63f8f0..73ac6b6bc3a752afc019a821752e1217c36fd4b3 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(Nb_`$u04j?EtN;K2 diff --git a/parameters/src/mainnet/resources/split.metadata b/parameters/src/mainnet/resources/split.metadata index dc16dfa777..c5712cd3ae 100644 --- a/parameters/src/mainnet/resources/split.metadata +++ b/parameters/src/mainnet/resources/split.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "9a6198f6bf0f9b0516feab70779eaaf91082b8b081ca79d7ddadbca44b58e85a", "prover_size": 75161428, - "verifier_checksum": "1d6bfd787cc09dd6fac674f566dd5fb22acf4c47efca7763bd18bb75d3afce34", - "verifier_size": 673 + "verifier_checksum": "1e576c6838e48ae946724a64e0831bc6bb0c6adc125b469e52da098008c69f06", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/split.verifier b/parameters/src/mainnet/resources/split.verifier index 37335cd1764a8959e6609e29866d4554bb79427a..992b7d62f60fc23020f9e0347cc1657b444d4dd3 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(mUkqRX04x6k@&Et; diff --git a/parameters/src/mainnet/resources/transfer_private.metadata b/parameters/src/mainnet/resources/transfer_private.metadata index cdf533c246..16f11c11cb 100644 --- a/parameters/src/mainnet/resources/transfer_private.metadata +++ b/parameters/src/mainnet/resources/transfer_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "d6c6d61a87f38905468c7e479e30a9899535635450cadf3de69eae4b490621db", "prover_size": 75949172, - "verifier_checksum": "d17b5954edcea8c9f97ebbe267f569a5faca6168e51832fa62e77a0017c25700", - "verifier_size": 673 + "verifier_checksum": "118d42c3a97e01506e233aaadec6956b8de1a187b46ee59e6a266c1e85f14d6f", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_private.verifier b/parameters/src/mainnet/resources/transfer_private.verifier index 5fb4efc72e6390b440d901a295fbc8a76483393d..360b2774aa5ced3bbbda3dc884f7c8f21c59365c 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 VcmbQqx{!6lOeT(ACPoGj001VX11JCh diff --git a/parameters/src/mainnet/resources/transfer_private_to_public.metadata b/parameters/src/mainnet/resources/transfer_private_to_public.metadata index 56d62693ee..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": "4c0561cf4342c601ccd49eee4c039711c2e2cf92a01b0b3a58b7f1242e902ceb", "prover_size": 66299476, - "verifier_checksum": "ffdad62683ba31580632cdadb2bc5e5d7bb4c293774579c9571eb6c0e349a50f", - "verifier_size": 673 + "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 de62d2a1d8f7ca912a9480af4dbb3c3f05d654d3..77b4ab602b3ebc9aa3dbb6a0386372d5aacbd59c 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT)I#~8o>04{q3I{*Lx diff --git a/parameters/src/mainnet/resources/transfer_public.metadata b/parameters/src/mainnet/resources/transfer_public.metadata index e43c4a3925..876e221125 100644 --- a/parameters/src/mainnet/resources/transfer_public.metadata +++ b/parameters/src/mainnet/resources/transfer_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "f8e5f6437b945174b62313ece8a1c9dcbeac5dfff5b0fef2e968c9b92f86da06", "prover_size": 28913482, - "verifier_checksum": "ea77f42a35b3f891e7753c7333df365f356883550c4602df11f270237bef340d", - "verifier_size": 673 + "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 0b59130e9a88ad18574f691b1ee51f20ebd6d71a..1089392f46578aa6e08374dde5f9b841c8a1c609 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&JCk8M804J9NP5=M^ diff --git a/parameters/src/mainnet/resources/transfer_public_as_signer.metadata b/parameters/src/mainnet/resources/transfer_public_as_signer.metadata index bb2a05d311..273338aa05 100644 --- a/parameters/src/mainnet/resources/transfer_public_as_signer.metadata +++ b/parameters/src/mainnet/resources/transfer_public_as_signer.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "7cfc669dd92593e052a8a37d6b3a7c40d09f191c754b41230f69e19e9d0f9c76", "prover_size": 28915282, - "verifier_checksum": "7d869b875c2beaecba4f7c78e2fdc3a2adc01d5eca53ac72d81d2f8f90b7b606", - "verifier_size": 673 + "verifier_checksum": "18e99de56f2098b27318dc9b92eee1743792837c27a4a7001ef19a42c7dbb798", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_public_as_signer.verifier b/parameters/src/mainnet/resources/transfer_public_as_signer.verifier index 4c2f0444e98f3a09d8bf7d8587f49515c10b5336..738d069595f64f5d89678676b013d63389a05abe 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(47X~l@04D7NIRF3v diff --git a/parameters/src/mainnet/resources/transfer_public_to_private.metadata b/parameters/src/mainnet/resources/transfer_public_to_private.metadata index 5cedf109a0..9c9f075355 100644 --- a/parameters/src/mainnet/resources/transfer_public_to_private.metadata +++ b/parameters/src/mainnet/resources/transfer_public_to_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "cf0916dc5debc8b894a856540e1525254214367af3d58b53d1472d5d95af5a95", "prover_size": 38413316, - "verifier_checksum": "fd11e1bb7e49c405e30a78ac1659ab338a3345c7982079f05a6a189bf86c0d48", - "verifier_size": 673 + "verifier_checksum": "472004f0fd523239675d32b5e1ebea61cd6855b5f41126e70e05b83ec6a2a1a4", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/transfer_public_to_private.verifier b/parameters/src/mainnet/resources/transfer_public_to_private.verifier index e6d12bbae98a1d5384d02181be42bc8441c00038..65e2d54f536eacd06774884b9d3384ffd520bb0c 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&ijSOG_04z`g?EnA( diff --git a/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata b/parameters/src/mainnet/resources/unbond_delegator_as_validator.metadata index 5ebd333e69..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": "785f2318f0c12b883b99ff1649cf401d2f1d024fe2dd30916a276cd8c199f757", "prover_size": 27062250, - "verifier_checksum": "880e79301ac40282e0e99ec146c9600015a81150ee58f21f1d840b75058c6093", - "verifier_size": 673 + "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 e5f1737880abbb4300dd375330efaf922a047299..2f245c62d33e7ea025e799d959287c973565bb7b 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&)P7GiG04fIqoB#j- diff --git a/parameters/src/mainnet/resources/unbond_public.metadata b/parameters/src/mainnet/resources/unbond_public.metadata index 22f7c68c81..3dffb3f508 100644 --- a/parameters/src/mainnet/resources/unbond_public.metadata +++ b/parameters/src/mainnet/resources/unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "fc15a9ae0f3eca24e6a622e8a8ce24682e73ec39d64f22b0876db28794763ea4", "prover_size": 17414380, - "verifier_checksum": "5d8e0ad3505f52d232fd429a8aa6625bb19fb0d66214a085a20ba831ec96eed5", - "verifier_size": 673 + "verifier_checksum": "a6106dcfefffd65e46488c7dc6228f9c379c35497c62779f2e186f2d9908eff9", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/mainnet/resources/unbond_public.verifier b/parameters/src/mainnet/resources/unbond_public.verifier index 8d3547736481f64f06786fd87b8c9385148f9b3f..19485b625f2a12b7741373ded5b323ba898edd1a 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&uwhUkZ04p>D!2kdN diff --git a/parameters/src/testnet/resources/bond_public.metadata b/parameters/src/testnet/resources/bond_public.metadata index 0dd03895cb..e68c508153 100644 --- a/parameters/src/testnet/resources/bond_public.metadata +++ b/parameters/src/testnet/resources/bond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "bd3bf4fbe066a1a749d9fbcabb0a324db4f9cc2d4cb9c42b5c4babd1a482d464", "prover_size": 29353850, - "verifier_checksum": "2d1ef6103cf10b45100249d0c7be96dc2b68021b42c08724c44528805974f862", - "verifier_size": 673 + "verifier_checksum": "198a9aa7d4ed09343dc54df66dcfc089f5548d9c3201849d1b7cece1ed5b2b47", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/bond_public.verifier b/parameters/src/testnet/resources/bond_public.verifier index 1eca8bb3bda0881c40cdce92099e348112c315e9..8ecc28c511c7eb3d9540c90f3a8bc622d67293ae 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(*ZVX@m04Uo7cK`qY diff --git a/parameters/src/testnet/resources/claim_unbond_public.metadata b/parameters/src/testnet/resources/claim_unbond_public.metadata index 74f937ec3e..817fb2a66f 100644 --- a/parameters/src/testnet/resources/claim_unbond_public.metadata +++ b/parameters/src/testnet/resources/claim_unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8d79db969bde4f56410db9b327da622a2d38a1e5e1228d591aea6ad2a4f67c86", "prover_size": 16861332, - "verifier_checksum": "ac4abdfe456a2f60495031d405b55e19ae765bf4387b768db6e4154c96b3a4fc", - "verifier_size": 673 + "verifier_checksum": "e20ae8d0b9afa3b1f9bd9e808183e43095dfc4e3782c3b6668beaf696820e808", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/claim_unbond_public.verifier b/parameters/src/testnet/resources/claim_unbond_public.verifier index a152c7c4d625caadc6e39387c19f57e9578c351c..51fce1b1f5ee3467e033ca17cbd51b090733e038 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&aRt#VO04d)CmH+?% diff --git a/parameters/src/testnet/resources/fee_private.metadata b/parameters/src/testnet/resources/fee_private.metadata index 59428d3b8e..5308501fac 100644 --- a/parameters/src/testnet/resources/fee_private.metadata +++ b/parameters/src/testnet/resources/fee_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "e00171b5ce1b7f6629dda2ad571c2b8acf28042997801114fcfd3659e7bd130b", "prover_size": 66297972, - "verifier_checksum": "f210de1bf1dbfd9cd291b2a2569157124700a92800c9cbe428bfc9cf26c57a54", - "verifier_size": 673 + "verifier_checksum": "ca38afe2a01f5eb564afd6c45a412ebec5ffecf1084c548329a360b0db8a177e", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/fee_private.verifier b/parameters/src/testnet/resources/fee_private.verifier index 290209615c61662e51dd6513582cce48c177e8e2..a21859970947b2809a4fa86fdd1ce3cfc38414c3 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(NhZ(>C04^>BF#rGn diff --git a/parameters/src/testnet/resources/fee_public.metadata b/parameters/src/testnet/resources/fee_public.metadata index c907fd9416..55424125d7 100644 --- a/parameters/src/testnet/resources/fee_public.metadata +++ b/parameters/src/testnet/resources/fee_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "f72b6ff291415fb17a3653f447dbf95a5fe48480f7bbd6cf1dfb33963ff6ad58", "prover_size": 29174402, - "verifier_checksum": "6fb9bb7a84f117d93af2e6bf63450252bd2b73ab5b8eee3b9fa509bada23aa79", - "verifier_size": 673 + "verifier_checksum": "8bc7651f85713f62b3a71fa001240e8fcf4ad322589cf2603c964c9426ede96a", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/fee_public.verifier b/parameters/src/testnet/resources/fee_public.verifier index c0c6ced42c8afadd166a5e7a9a2a6fdce40eba77..f804a18f577aee34064ff910402957fd73c61a76 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOePLX7X~l@042=>6#xJL diff --git a/parameters/src/testnet/resources/inclusion.metadata b/parameters/src/testnet/resources/inclusion.metadata index 8df45d6edb..76f795f99c 100644 --- a/parameters/src/testnet/resources/inclusion.metadata +++ b/parameters/src/testnet/resources/inclusion.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8faa4d3aaaa5e786d20b61f825e50901f9dcf470455d1d2994e091eefcc66a4e", "prover_size": 233812212, - "verifier_checksum": "57bf79c7a493ee79f8ebed2c8e6e7e8a0a6d11b2f6edcba6e943768cb6a250cc", - "verifier_size": 673 + "verifier_checksum": "2b6fdf5a869db365620a44fc3991e3f807a4e670bb976277ad327f3179866553", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/inclusion.verifier b/parameters/src/testnet/resources/inclusion.verifier index d037956880aff4737c087407dddcc3f464187d17..f317f07efae1ca78a888a6fd73f19072aa283716 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 VcmbQqx{!6lOeT)LHYNrT001ga1Fir7 diff --git a/parameters/src/testnet/resources/join.metadata b/parameters/src/testnet/resources/join.metadata index e342e900fc..716c8c29db 100644 --- a/parameters/src/testnet/resources/join.metadata +++ b/parameters/src/testnet/resources/join.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "267f60cc100c6c9fc024be16c5d48a383e0122b8b06ebd3612de298b8baafe1b", "prover_size": 74722164, - "verifier_checksum": "be5c34ac7365ce7489fdfe202b5d62a96d11ccad4943927682145c54086fbac7", - "verifier_size": 673 + "verifier_checksum": "5a29b215f24c13d91850cba1dda64b2b2e54247d780db6bf6a6d8bd88af35ead", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/join.verifier b/parameters/src/testnet/resources/join.verifier index f9a5047baa3988345df2b62f24f9704cac9033e8..7220d66154ddeea54e49def7abc6c8ae75f1d845 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 VcmbQqx{!6lOeT(aW<~}O001RC0{Z{} diff --git a/parameters/src/testnet/resources/set_validator_state.metadata b/parameters/src/testnet/resources/set_validator_state.metadata index 6767abb421..8b7a23eb75 100644 --- a/parameters/src/testnet/resources/set_validator_state.metadata +++ b/parameters/src/testnet/resources/set_validator_state.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "34421c854adfff6a5b3c5671f9d1a169835b63328d570d64f1302444af0ea75d", "prover_size": 17390188, - "verifier_checksum": "65c8aa0d579e1c71992febd049ad71bbb8ba34f72d47296e7ad1cd208875ff66", - "verifier_size": 673 + "verifier_checksum": "caa6cb2dd3f5cabf1ba15f7548f1e5eb3a9d0e6daca94393489966ddbdb4ba2f", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/set_validator_state.verifier b/parameters/src/testnet/resources/set_validator_state.verifier index 2c3819675314502db7de72ad61bee16996248daa..1ed138194b36594f40df6232b6de01065a694301 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(Nb_`$u04j?EtN;K2 diff --git a/parameters/src/testnet/resources/split.metadata b/parameters/src/testnet/resources/split.metadata index f41c254397..360fe59e13 100644 --- a/parameters/src/testnet/resources/split.metadata +++ b/parameters/src/testnet/resources/split.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "9af46afb8a0b340b8649d19b5039450699bed5617b661c9bd1176f4547cae258", "prover_size": 75161428, - "verifier_checksum": "cec38390ab075e70977a48aac81fea95dac6f7be1a5115ff36aa966feb1562f4", - "verifier_size": 673 + "verifier_checksum": "53eab92841839522ee7eac56ea33d6b337de02c75ac6c34e2a6caed4aa1a1700", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/split.verifier b/parameters/src/testnet/resources/split.verifier index 5dd471f11e4bc30e43e4643a6c81b4a8e52e2b3a..96bfb7d4376cf853a7d030aa657634509a3b7978 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(mUkqRX04x6k@&Et; diff --git a/parameters/src/testnet/resources/transfer_private.metadata b/parameters/src/testnet/resources/transfer_private.metadata index 5f6e330ad9..8ab0c6d230 100644 --- a/parameters/src/testnet/resources/transfer_private.metadata +++ b/parameters/src/testnet/resources/transfer_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "6733de36be3291a1a6f95ed7b986ccb29fc69707788582fa672395abe3446e80", "prover_size": 75949172, - "verifier_checksum": "86e2667e415b0e6266e0e9f3edb99746837debca70e9e82fd7d55f732ff7d995", - "verifier_size": 673 + "verifier_checksum": "1291734485f70e932337080b7724a3ad49a965c5e2120ed3e47521c75cbf8c83", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_private.verifier b/parameters/src/testnet/resources/transfer_private.verifier index 087378ad3eff4854d3a9934fd06fda164f02fc50..a73f24264a685743d5b56508ec0c6a106ce6c48e 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 VcmbQqx{!6lOeT(ACPoGj001VX11JCh diff --git a/parameters/src/testnet/resources/transfer_private_to_public.metadata b/parameters/src/testnet/resources/transfer_private_to_public.metadata index 08c9973ad9..bd363e8d6d 100644 --- a/parameters/src/testnet/resources/transfer_private_to_public.metadata +++ b/parameters/src/testnet/resources/transfer_private_to_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "d066d733d57185272acb449769163a9fe9409f5bacf02ba584751233d1e91810", "prover_size": 66299476, - "verifier_checksum": "a656a128c7037878e2228e5e72f0a081152f9abe78d7fe1a6bb86b87f3462924", - "verifier_size": 673 + "verifier_checksum": "c7a95f998d30fd36d0696d1bf19379a6d34092110da995b5b719c5538ec700d7", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_private_to_public.verifier b/parameters/src/testnet/resources/transfer_private_to_public.verifier index cc50ebc585ea386f1b9a11ab5802335a865b675a..053eb556b059dac40ea08a8b55e1321027de3b12 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT)I#~8o>04{q3I{*Lx diff --git a/parameters/src/testnet/resources/transfer_public.metadata b/parameters/src/testnet/resources/transfer_public.metadata index 0f56a39c3a..6559dacef5 100644 --- a/parameters/src/testnet/resources/transfer_public.metadata +++ b/parameters/src/testnet/resources/transfer_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "846f86cabf9fa50e5abe347e559a8e9f3018459b5af9fdf52f1c44892b05f7e5", "prover_size": 28913482, - "verifier_checksum": "1b5109468e7992c39bbbc299dd1f94f18e49928e253e60ed68c7d9f02e73fe8d", - "verifier_size": 673 + "verifier_checksum": "48e7e65bbc371bc417766ebdd937aee0307f47c6bebef47ba97f580c56777869", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_public.verifier b/parameters/src/testnet/resources/transfer_public.verifier index ba3722e193033848b88e50d7c4ebf8dbe7b15f6b..6a8df78f911221e7ad9c6faac7c2de4ac48a1986 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&JCk8M804J9NP5=M^ diff --git a/parameters/src/testnet/resources/transfer_public_as_signer.metadata b/parameters/src/testnet/resources/transfer_public_as_signer.metadata index 391566edec..7244e0a786 100644 --- a/parameters/src/testnet/resources/transfer_public_as_signer.metadata +++ b/parameters/src/testnet/resources/transfer_public_as_signer.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "12b5a7b02df59352833512c1dbebc9ce3849a81b0d3e9f1a1e447bb9e1e07277", "prover_size": 28915282, - "verifier_checksum": "54d28a9f8d562ce2654d91463a2a879e21d5943b939044b1d92fc556b694b138", - "verifier_size": 673 + "verifier_checksum": "3576013fded7b170dce276997beee3c564e0585fcaa11ec332f30fbb6e28e933", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_public_as_signer.verifier b/parameters/src/testnet/resources/transfer_public_as_signer.verifier index 47c6a95c54f2b0c02a3ec447887bcfd8657e5105..43b8c9e6b45a51408e7541a9ce2f4802ce9fbb22 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT(47X~l@04D7NIRF3v diff --git a/parameters/src/testnet/resources/transfer_public_to_private.metadata b/parameters/src/testnet/resources/transfer_public_to_private.metadata index 4e8b2d6f4a..8ac5941cfa 100644 --- a/parameters/src/testnet/resources/transfer_public_to_private.metadata +++ b/parameters/src/testnet/resources/transfer_public_to_private.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "8b120ab11dadbf8e051963fba135a099667ab857eaaeb602d8d268c1b2babb8d", "prover_size": 38413316, - "verifier_checksum": "481aa28c8a948fd0651acee10178d02bb3a1840c0f22f223b5433b9df60431e2", - "verifier_size": 673 + "verifier_checksum": "4c2d2288a21e533a3ad5108086f57831b8c6759a152021599bca015b5b0c2586", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/transfer_public_to_private.verifier b/parameters/src/testnet/resources/transfer_public_to_private.verifier index b5f7ecefb3ae0553b8522d960997a917b7976af3..f1327fcc43cc19d12e567411e7091a77fe2d46dd 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&ijSOG_04z`g?EnA( diff --git a/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata b/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata index 77fdc76a85..6457c08e5b 100644 --- a/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata +++ b/parameters/src/testnet/resources/unbond_delegator_as_validator.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "cd98e97c4c79add134e9ba42d1f5114189da518d162c0d3ccb7383d2a8e38933", "prover_size": 27062250, - "verifier_checksum": "c0b02e8abe7fc250734ee74e8ee9602680bb6fdbb067ac97ce4d2086171c6c52", - "verifier_size": 673 + "verifier_checksum": "bb883d677bc912d6cc83eaf08bac4cc6882fe3cb08e77259af8ea1985b2df3be", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/unbond_delegator_as_validator.verifier b/parameters/src/testnet/resources/unbond_delegator_as_validator.verifier index 818ebc697c74638c00ee2b9427bea2da6cc847c5..149c622ccc24beb7e9999beb17ce03db7c290380 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&)P7GiG04fIqoB#j- diff --git a/parameters/src/testnet/resources/unbond_public.metadata b/parameters/src/testnet/resources/unbond_public.metadata index 738a20f707..9396c5a30e 100644 --- a/parameters/src/testnet/resources/unbond_public.metadata +++ b/parameters/src/testnet/resources/unbond_public.metadata @@ -1,6 +1,6 @@ { "prover_checksum": "3904c2e1a9ed82251e5196a76a171f0d518d7271cd31cd9bef7c25414a2103d5", "prover_size": 17414380, - "verifier_checksum": "6f9c617aee96251af2a47d2aaa0d7abf042d09b097d9c72fd69b2b70c5616282", - "verifier_size": 673 + "verifier_checksum": "31e48623ea0e9e59eca4b9fc05ab4bb13f7593d60e7c418398f71a396307c042", + "verifier_size": 665 } \ No newline at end of file diff --git a/parameters/src/testnet/resources/unbond_public.verifier b/parameters/src/testnet/resources/unbond_public.verifier index befd9876fd865bcaca8b63116b7611e008fd8829..6fb4ddcae8bb829a1fe864bc3a804de1a2419ece 100644 GIT binary patch delta 7 OcmZ3;I+Jz7OeO#d;R28V delta 16 UcmbQqx{!6lOeT&uwhUkZ04p>D!2kdN From a129de07eb06a7a9dd9c37ec685adba63e75d9d5 Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 20:23:33 -0400 Subject: [PATCH 27/32] Revert "Merge pull request #2463 from AleoHQ/feat/testnetv1" This reverts commit 0bd71b5835f0721b5c22e2ce144da0e19256606d, reversing changes made to f6ace919c483b599570256bab43d87dd8f7c7756. --- circuit/environment/src/canary_circuit.rs | 409 ------------ circuit/environment/src/helpers/converter.rs | 12 +- circuit/environment/src/lib.rs | 3 - circuit/network/src/canary_v0.rs | 598 ------------------ circuit/network/src/lib.rs | 3 - circuit/src/lib.rs | 11 +- console/network/src/canary_v0.rs | 492 -------------- console/network/src/lib.rs | 3 - ledger/query/src/query.rs | 18 - parameters/examples/inclusion.rs | 5 +- parameters/examples/setup.rs | 3 +- parameters/scripts/canary/credits.sh | 9 - parameters/scripts/canary/inclusion.sh | 9 - parameters/src/canary/genesis.rs | 32 - parameters/src/canary/mod.rs | 138 ---- parameters/src/canary/resources/block.genesis | Bin 15485 -> 0 bytes .../src/canary/resources/bond_public.metadata | 6 - .../src/canary/resources/bond_public.verifier | Bin 673 -> 0 bytes .../resources/claim_unbond_public.metadata | 6 - .../resources/claim_unbond_public.verifier | Bin 673 -> 0 bytes .../src/canary/resources/fee_private.metadata | 6 - .../src/canary/resources/fee_private.verifier | Bin 673 -> 0 bytes .../src/canary/resources/fee_public.metadata | 6 - .../src/canary/resources/fee_public.verifier | Bin 673 -> 0 bytes .../src/canary/resources/inclusion.metadata | 6 - .../src/canary/resources/inclusion.verifier | Bin 673 -> 0 bytes parameters/src/canary/resources/join.metadata | 6 - parameters/src/canary/resources/join.verifier | Bin 673 -> 0 bytes .../resources/set_validator_state.metadata | 6 - .../resources/set_validator_state.verifier | Bin 673 -> 0 bytes .../src/canary/resources/split.metadata | 6 - .../src/canary/resources/split.verifier | Bin 673 -> 0 bytes .../resources/transfer_private.metadata | 6 - .../resources/transfer_private.verifier | Bin 673 -> 0 bytes .../transfer_private_to_public.metadata | 6 - .../transfer_private_to_public.verifier | Bin 673 -> 0 bytes .../canary/resources/transfer_public.metadata | 6 - .../canary/resources/transfer_public.verifier | Bin 673 -> 0 bytes .../transfer_public_as_signer.metadata | 6 - .../transfer_public_as_signer.verifier | Bin 673 -> 0 bytes .../transfer_public_to_private.metadata | 6 - .../transfer_public_to_private.verifier | Bin 673 -> 0 bytes .../unbond_delegator_as_validator.metadata | 6 - .../unbond_delegator_as_validator.verifier | Bin 673 -> 0 bytes .../canary/resources/unbond_public.metadata | 6 - .../canary/resources/unbond_public.verifier | Bin 673 -> 0 bytes parameters/src/lib.rs | 2 - synthesizer/src/vm/helpers/macros.rs | 12 - 48 files changed, 4 insertions(+), 1845 deletions(-) delete mode 100644 circuit/environment/src/canary_circuit.rs delete mode 100644 circuit/network/src/canary_v0.rs delete mode 100644 console/network/src/canary_v0.rs delete mode 100755 parameters/scripts/canary/credits.sh delete mode 100755 parameters/scripts/canary/inclusion.sh delete mode 100644 parameters/src/canary/genesis.rs delete mode 100644 parameters/src/canary/mod.rs delete mode 100644 parameters/src/canary/resources/block.genesis delete mode 100644 parameters/src/canary/resources/bond_public.metadata delete mode 100644 parameters/src/canary/resources/bond_public.verifier delete mode 100644 parameters/src/canary/resources/claim_unbond_public.metadata delete mode 100644 parameters/src/canary/resources/claim_unbond_public.verifier delete mode 100644 parameters/src/canary/resources/fee_private.metadata delete mode 100644 parameters/src/canary/resources/fee_private.verifier delete mode 100644 parameters/src/canary/resources/fee_public.metadata delete mode 100644 parameters/src/canary/resources/fee_public.verifier delete mode 100644 parameters/src/canary/resources/inclusion.metadata delete mode 100644 parameters/src/canary/resources/inclusion.verifier delete mode 100644 parameters/src/canary/resources/join.metadata delete mode 100644 parameters/src/canary/resources/join.verifier delete mode 100644 parameters/src/canary/resources/set_validator_state.metadata delete mode 100644 parameters/src/canary/resources/set_validator_state.verifier delete mode 100644 parameters/src/canary/resources/split.metadata delete mode 100644 parameters/src/canary/resources/split.verifier delete mode 100644 parameters/src/canary/resources/transfer_private.metadata delete mode 100644 parameters/src/canary/resources/transfer_private.verifier delete mode 100644 parameters/src/canary/resources/transfer_private_to_public.metadata delete mode 100644 parameters/src/canary/resources/transfer_private_to_public.verifier delete mode 100644 parameters/src/canary/resources/transfer_public.metadata delete mode 100644 parameters/src/canary/resources/transfer_public.verifier delete mode 100644 parameters/src/canary/resources/transfer_public_as_signer.metadata delete mode 100644 parameters/src/canary/resources/transfer_public_as_signer.verifier delete mode 100644 parameters/src/canary/resources/transfer_public_to_private.metadata delete mode 100644 parameters/src/canary/resources/transfer_public_to_private.verifier delete mode 100644 parameters/src/canary/resources/unbond_delegator_as_validator.metadata delete mode 100644 parameters/src/canary/resources/unbond_delegator_as_validator.verifier delete mode 100644 parameters/src/canary/resources/unbond_public.metadata delete mode 100644 parameters/src/canary/resources/unbond_public.verifier diff --git a/circuit/environment/src/canary_circuit.rs b/circuit/environment/src/canary_circuit.rs deleted file mode 100644 index 230e51265e..0000000000 --- a/circuit/environment/src/canary_circuit.rs +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright (C) 2019-2023 Aleo Systems Inc. -// This file is part of the snarkVM library. - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use crate::{helpers::Constraint, Mode, *}; - -use core::{ - cell::{Cell, RefCell}, - fmt, -}; - -type Field = ::Field; - -thread_local! { - static VARIABLE_LIMIT: Cell> = Cell::new(None); - static CONSTRAINT_LIMIT: Cell> = Cell::new(None); - pub(super) static CANARY_CIRCUIT: RefCell> = RefCell::new(R1CS::new()); - static IN_WITNESS: Cell = Cell::new(false); - static ZERO: LinearCombination = LinearCombination::zero(); - static ONE: LinearCombination = LinearCombination::one(); -} - -#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] -pub struct CanaryCircuit; - -impl Environment for CanaryCircuit { - type Affine = ::Affine; - type BaseField = Field; - type Network = console::CanaryV0; - type ScalarField = ::Scalar; - - /// Returns the `zero` constant. - fn zero() -> LinearCombination { - ZERO.with(|zero| zero.clone()) - } - - /// Returns the `one` constant. - fn one() -> LinearCombination { - ONE.with(|one| one.clone()) - } - - /// Returns a new variable of the given mode and value. - fn new_variable(mode: Mode, value: Self::BaseField) -> Variable { - IN_WITNESS.with(|in_witness| { - // Ensure we are not in witness mode. - if !in_witness.get() { - // Ensure that we do not surpass the variable limit for the circuit. - VARIABLE_LIMIT.with(|variable_limit| { - if let Some(limit) = variable_limit.get() { - if Self::num_variables() > limit { - Self::halt(format!("Surpassed the variable limit ({limit})")) - } - } - }); - CANARY_CIRCUIT.with(|circuit| match mode { - Mode::Constant => circuit.borrow_mut().new_constant(value), - Mode::Public => circuit.borrow_mut().new_public(value), - Mode::Private => circuit.borrow_mut().new_private(value), - }) - } else { - Self::halt("Tried to initialize a new variable in witness mode") - } - }) - } - - /// Returns a new witness of the given mode and value. - fn new_witness Output::Primitive, Output: Inject>(mode: Mode, logic: Fn) -> Output { - IN_WITNESS.with(|in_witness| { - // Set the entire environment to witness mode. - in_witness.replace(true); - - // Run the logic. - let output = logic(); - - // Return the entire environment from witness mode. - in_witness.replace(false); - - Inject::new(mode, output) - }) - } - - /// Enters a new scope for the environment. - fn scope, Fn, Output>(name: S, logic: Fn) -> Output - where - Fn: FnOnce() -> Output, - { - IN_WITNESS.with(|in_witness| { - // Ensure we are not in witness mode. - if !in_witness.get() { - CANARY_CIRCUIT.with(|circuit| { - // Set the entire environment to the new scope. - let name = name.into(); - if let Err(error) = circuit.borrow_mut().push_scope(&name) { - Self::halt(error) - } - - // Run the logic. - let output = logic(); - - // Return the entire environment to the previous scope. - if let Err(error) = circuit.borrow_mut().pop_scope(name) { - Self::halt(error) - } - - output - }) - } else { - Self::halt("Tried to initialize a new scope in witness mode") - } - }) - } - - /// Adds one constraint enforcing that `(A * B) == C`. - fn enforce(constraint: Fn) - where - Fn: FnOnce() -> (A, B, C), - A: Into>, - B: Into>, - C: Into>, - { - IN_WITNESS.with(|in_witness| { - // Ensure we are not in witness mode. - if !in_witness.get() { - CANARY_CIRCUIT.with(|circuit| { - // Ensure that we do not surpass the constraint limit for the circuit. - CONSTRAINT_LIMIT.with(|constraint_limit| { - if let Some(limit) = constraint_limit.get() { - if circuit.borrow().num_constraints() > limit { - Self::halt(format!("Surpassed the constraint limit ({limit})")) - } - } - }); - - let (a, b, c) = constraint(); - let (a, b, c) = (a.into(), b.into(), c.into()); - - // Ensure the constraint is not comprised of constants. - match a.is_constant() && b.is_constant() && c.is_constant() { - true => { - // Evaluate the constant constraint. - assert_eq!( - a.value() * b.value(), - c.value(), - "Constant constraint failed: ({a} * {b}) =?= {c}" - ); - - // match self.counter.scope().is_empty() { - // true => println!("Enforced constraint with constant terms: ({} * {}) =?= {}", a, b, c), - // false => println!( - // "Enforced constraint with constant terms ({}): ({} * {}) =?= {}", - // self.counter.scope(), a, b, c - // ), - // } - } - false => { - // Construct the constraint object. - let constraint = Constraint(circuit.borrow().scope(), a, b, c); - // Append the constraint. - circuit.borrow_mut().enforce(constraint) - } - } - }); - } else { - Self::halt("Tried to add a new constraint in witness mode") - } - }) - } - - /// Returns `true` if all constraints in the environment are satisfied. - fn is_satisfied() -> bool { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied()) - } - - /// Returns `true` if all constraints in the current scope are satisfied. - fn is_satisfied_in_scope() -> bool { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().is_satisfied_in_scope()) - } - - /// Returns the number of constants in the entire circuit. - fn num_constants() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constants()) - } - - /// Returns the number of public variables in the entire circuit. - fn num_public() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_public()) - } - - /// Returns the number of private variables in the entire circuit. - fn num_private() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_private()) - } - - /// Returns the number of constant, public, and private variables in the entire circuit. - fn num_variables() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_variables()) - } - - /// Returns the number of constraints in the entire circuit. - fn num_constraints() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constraints()) - } - - /// Returns the number of nonzeros in the entire circuit. - fn num_nonzeros() -> (u64, u64, u64) { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros()) - } - - /// Returns the number of constants for the current scope. - fn num_constants_in_scope() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constants_in_scope()) - } - - /// Returns the number of public variables for the current scope. - fn num_public_in_scope() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_public_in_scope()) - } - - /// Returns the number of private variables for the current scope. - fn num_private_in_scope() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_private_in_scope()) - } - - /// Returns the number of constraints for the current scope. - fn num_constraints_in_scope() -> u64 { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_constraints_in_scope()) - } - - /// Returns the number of nonzeros for the current scope. - fn num_nonzeros_in_scope() -> (u64, u64, u64) { - CANARY_CIRCUIT.with(|circuit| circuit.borrow().num_nonzeros_in_scope()) - } - - /// Returns the variable limit for the circuit, if one exists. - fn get_variable_limit() -> Option { - VARIABLE_LIMIT.with(|current_limit| current_limit.get()) - } - - /// Sets the variable limit for the circuit. - fn set_variable_limit(limit: Option) { - VARIABLE_LIMIT.with(|current_limit| current_limit.replace(limit)); - } - - /// Returns the constraint limit for the circuit, if one exists. - fn get_constraint_limit() -> Option { - CONSTRAINT_LIMIT.with(|current_limit| current_limit.get()) - } - - /// Sets the constraint limit for the circuit. - fn set_constraint_limit(limit: Option) { - CONSTRAINT_LIMIT.with(|current_limit| current_limit.replace(limit)); - } - - /// Halts the program from further synthesis, evaluation, and execution in the current environment. - fn halt, T>(message: S) -> T { - let error = message.into(); - // eprintln!("{}", &error); - panic!("{}", &error) - } - - /// Returns the R1CS circuit, resetting the circuit. - fn inject_r1cs(r1cs: R1CS) { - CANARY_CIRCUIT.with(|circuit| { - // Ensure the circuit is empty before injecting. - assert_eq!(0, circuit.borrow().num_constants()); - assert_eq!(1, circuit.borrow().num_public()); - assert_eq!(0, circuit.borrow().num_private()); - assert_eq!(1, circuit.borrow().num_variables()); - assert_eq!(0, circuit.borrow().num_constraints()); - // Inject the R1CS instance. - let r1cs = circuit.replace(r1cs); - // Ensure the circuit that was replaced is empty. - assert_eq!(0, r1cs.num_constants()); - assert_eq!(1, r1cs.num_public()); - assert_eq!(0, r1cs.num_private()); - assert_eq!(1, r1cs.num_variables()); - assert_eq!(0, r1cs.num_constraints()); - }) - } - - /// Returns the R1CS circuit, resetting the circuit. - fn eject_r1cs_and_reset() -> R1CS { - CANARY_CIRCUIT.with(|circuit| { - // Reset the witness mode. - IN_WITNESS.with(|in_witness| in_witness.replace(false)); - // Reset the variable limit. - Self::set_variable_limit(None); - // Reset the constraint limit. - Self::set_constraint_limit(None); - // Eject the R1CS instance. - let r1cs = circuit.replace(R1CS::<::BaseField>::new()); - // Ensure the circuit is now empty. - assert_eq!(0, circuit.borrow().num_constants()); - assert_eq!(1, circuit.borrow().num_public()); - assert_eq!(0, circuit.borrow().num_private()); - assert_eq!(1, circuit.borrow().num_variables()); - assert_eq!(0, circuit.borrow().num_constraints()); - // Return the R1CS instance. - r1cs - }) - } - - /// Returns the R1CS assignment of the circuit, resetting the circuit. - fn eject_assignment_and_reset() -> Assignment<::Field> { - CANARY_CIRCUIT.with(|circuit| { - // Reset the witness mode. - IN_WITNESS.with(|in_witness| in_witness.replace(false)); - // Reset the variable limit. - Self::set_variable_limit(None); - // Reset the constraint limit. - Self::set_constraint_limit(None); - // Eject the R1CS instance. - let r1cs = circuit.replace(R1CS::<::BaseField>::new()); - assert_eq!(0, circuit.borrow().num_constants()); - assert_eq!(1, circuit.borrow().num_public()); - assert_eq!(0, circuit.borrow().num_private()); - assert_eq!(1, circuit.borrow().num_variables()); - assert_eq!(0, circuit.borrow().num_constraints()); - // Convert the R1CS instance to an assignment. - Assignment::from(r1cs) - }) - } - - /// Clears the circuit and initializes an empty environment. - fn reset() { - CANARY_CIRCUIT.with(|circuit| { - // Reset the witness mode. - IN_WITNESS.with(|in_witness| in_witness.replace(false)); - // Reset the variable limit. - Self::set_variable_limit(None); - // Reset the constraint limit. - Self::set_constraint_limit(None); - // Reset the circuit. - *circuit.borrow_mut() = R1CS::<::BaseField>::new(); - assert_eq!(0, circuit.borrow().num_constants()); - assert_eq!(1, circuit.borrow().num_public()); - assert_eq!(0, circuit.borrow().num_private()); - assert_eq!(1, circuit.borrow().num_variables()); - assert_eq!(0, circuit.borrow().num_constraints()); - }); - } -} - -impl fmt::Display for CanaryCircuit { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - CANARY_CIRCUIT.with(|circuit| write!(f, "{}", circuit.borrow())) - } -} - -#[cfg(test)] -mod tests { - use snarkvm_circuit::prelude::*; - - /// Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. - fn create_example_circuit() -> Field { - let one = snarkvm_console_types::Field::::one(); - let two = one + one; - - const EXPONENT: u64 = 64; - - // Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. - let mut candidate = Field::::new(Mode::Public, one); - let mut accumulator = Field::new(Mode::Private, two); - for _ in 0..EXPONENT { - candidate += &accumulator; - accumulator *= Field::new(Mode::Private, two); - } - - assert_eq!((accumulator - Field::one()).eject_value(), candidate.eject_value()); - assert_eq!(2, E::num_public()); - assert_eq!(2 * EXPONENT + 1, E::num_private()); - assert_eq!(EXPONENT, E::num_constraints()); - assert!(E::is_satisfied()); - - candidate - } - - #[test] - fn test_print_circuit() { - let _candidate = create_example_circuit::(); - let output = format!("{CanaryCircuit}"); - println!("{output}"); - } - - #[test] - fn test_circuit_scope() { - CanaryCircuit::scope("test_circuit_scope", || { - assert_eq!(0, CanaryCircuit::num_constants()); - assert_eq!(1, CanaryCircuit::num_public()); - assert_eq!(0, CanaryCircuit::num_private()); - assert_eq!(0, CanaryCircuit::num_constraints()); - - assert_eq!(0, CanaryCircuit::num_constants_in_scope()); - assert_eq!(0, CanaryCircuit::num_public_in_scope()); - assert_eq!(0, CanaryCircuit::num_private_in_scope()); - assert_eq!(0, CanaryCircuit::num_constraints_in_scope()); - }) - } -} diff --git a/circuit/environment/src/helpers/converter.rs b/circuit/environment/src/helpers/converter.rs index 9ba96a4142..625b468f24 100644 --- a/circuit/environment/src/helpers/converter.rs +++ b/circuit/environment/src/helpers/converter.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{CanaryCircuit, Circuit, LinearCombination, TestnetCircuit, Variable, R1CS}; +use crate::{Circuit, LinearCombination, TestnetCircuit, Variable, R1CS}; use snarkvm_curves::edwards_bls12::Fq; use snarkvm_fields::PrimeField; @@ -44,16 +44,6 @@ impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for TestnetCircuit { } } -impl snarkvm_algorithms::r1cs::ConstraintSynthesizer for CanaryCircuit { - /// Synthesizes the constraints from the environment into a `snarkvm_algorithms::r1cs`-compliant constraint system. - fn generate_constraints>( - &self, - cs: &mut CS, - ) -> Result<(), snarkvm_algorithms::r1cs::SynthesisError> { - crate::canary_circuit::CANARY_CIRCUIT.with(|circuit| circuit.borrow().generate_constraints(cs)) - } -} - impl R1CS { /// Synthesizes the constraints from the environment into a `snarkvm_algorithms::r1cs`-compliant constraint system. fn generate_constraints>( diff --git a/circuit/environment/src/lib.rs b/circuit/environment/src/lib.rs index eb6ac980c9..b47140bb94 100644 --- a/circuit/environment/src/lib.rs +++ b/circuit/environment/src/lib.rs @@ -19,9 +19,6 @@ extern crate snarkvm_circuit_environment_witness; pub use snarkvm_circuit_environment_witness::rename_selfs; -pub mod canary_circuit; -pub use canary_circuit::*; - pub mod circuit; pub use circuit::*; diff --git a/circuit/network/src/canary_v0.rs b/circuit/network/src/canary_v0.rs deleted file mode 100644 index 94238bf55b..0000000000 --- a/circuit/network/src/canary_v0.rs +++ /dev/null @@ -1,598 +0,0 @@ -// Copyright (C) 2019-2023 Aleo Systems Inc. -// This file is part of the snarkVM library. - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use crate::Aleo; -use snarkvm_circuit_algorithms::{ - Commit, - CommitUncompressed, - Hash, - HashMany, - HashToGroup, - HashToScalar, - HashUncompressed, - Keccak256, - Keccak384, - Keccak512, - Pedersen128, - Pedersen64, - Poseidon2, - Poseidon4, - Poseidon8, - Sha3_256, - Sha3_384, - Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, -}; -use snarkvm_circuit_collections::merkle_tree::MerklePath; -use snarkvm_circuit_types::{ - environment::{prelude::*, Assignment, CanaryCircuit, R1CS}, - Boolean, - Field, - Group, - Scalar, -}; - -use core::fmt; - -type E = CanaryCircuit; - -thread_local! { - /// The group bases for the Aleo signature and encryption schemes. - 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()); - /// The graph key domain as a constant field element. - 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()); - - /// The BHP hash function, which can take an input of up to 256 bits. - static BHP_256: BHP256 = BHP256::::constant(console::CANARY_BHP_256.clone()); - /// The BHP hash function, which can take an input of up to 512 bits. - static BHP_512: BHP512 = BHP512::::constant(console::CANARY_BHP_512.clone()); - /// The BHP hash function, which can take an input of up to 768 bits. - static BHP_768: BHP768 = BHP768::::constant(console::CANARY_BHP_768.clone()); - /// The BHP hash function, which can take an input of up to 1024 bits. - static BHP_1024: BHP1024 = BHP1024::::constant(console::CANARY_BHP_1024.clone()); - - /// The Keccak hash function, which outputs 256 bits. - static KECCAK_256: Keccak256 = Keccak256::::new(); - /// The Keccak hash function, which outputs 384 bits. - static KECCAK_384: Keccak384 = Keccak384::::new(); - /// The Keccak hash function, which outputs 512 bits. - static KECCAK_512: Keccak512 = Keccak512::::new(); - - /// The Pedersen hash function, which can take an input of up to 64 bits. - static PEDERSEN_64: Pedersen64 = Pedersen64::::constant(console::CANARY_PEDERSEN_64.clone()); - /// The Pedersen hash function, which can take an input of up to 128 bits. - static PEDERSEN_128: Pedersen128 = Pedersen128::::constant(console::CANARY_PEDERSEN_128.clone()); - - /// The Poseidon hash function, using a rate of 2. - static POSEIDON_2: Poseidon2 = Poseidon2::::constant(console::CANARY_POSEIDON_2.clone()); - /// The Poseidon hash function, using a rate of 4. - static POSEIDON_4: Poseidon4 = Poseidon4::::constant(console::CANARY_POSEIDON_4.clone()); - /// The Poseidon hash function, using a rate of 8. - static POSEIDON_8: Poseidon8 = Poseidon8::::constant(console::CANARY_POSEIDON_8.clone()); - - /// The SHA-3 hash function, which outputs 256 bits. - static SHA3_256: Sha3_256 = Sha3_256::::new(); - /// The SHA-3 hash function, which outputs 384 bits. - static SHA3_384: Sha3_384 = Sha3_384::::new(); - /// The SHA-3 hash function, which outputs 512 bits. - static SHA3_512: Sha3_512 = Sha3_512::::new(); -} - -#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] -pub struct AleoCanaryV0; - -impl Aleo for AleoCanaryV0 { - /// Initializes the global constants for the Aleo environment. - fn initialize_global_constants() { - GENERATOR_G.with(|_| ()); - ENCRYPTION_DOMAIN.with(|_| ()); - GRAPH_KEY_DOMAIN.with(|_| ()); - SERIAL_NUMBER_DOMAIN.with(|_| ()); - BHP_256.with(|_| ()); - BHP_512.with(|_| ()); - BHP_768.with(|_| ()); - BHP_1024.with(|_| ()); - KECCAK_256.with(|_| ()); - KECCAK_384.with(|_| ()); - KECCAK_512.with(|_| ()); - PEDERSEN_64.with(|_| ()); - PEDERSEN_128.with(|_| ()); - POSEIDON_2.with(|_| ()); - POSEIDON_4.with(|_| ()); - POSEIDON_8.with(|_| ()); - SHA3_256.with(|_| ()); - SHA3_384.with(|_| ()); - SHA3_512.with(|_| ()); - } - - /// Returns the encryption domain as a constant field element. - fn encryption_domain() -> Field { - ENCRYPTION_DOMAIN.with(|domain| domain.clone()) - } - - /// Returns the graph key domain as a constant field element. - fn graph_key_domain() -> Field { - GRAPH_KEY_DOMAIN.with(|domain| domain.clone()) - } - - /// Returns the serial number domain as a constant field element. - fn serial_number_domain() -> Field { - SERIAL_NUMBER_DOMAIN.with(|domain| domain.clone()) - } - - /// Returns the scalar multiplication on the generator `G`. - #[inline] - fn g_scalar_multiply(scalar: &Scalar) -> Group { - GENERATOR_G.with(|bases| { - bases - .iter() - .zip_eq(&scalar.to_bits_le()) - .fold(Group::zero(), |output, (base, bit)| Group::ternary(bit, &(&output + base), &output)) - }) - } - - /// Returns a BHP commitment with an input hasher of 256-bits. - fn commit_bhp256(input: &[Boolean], randomizer: &Scalar) -> Field { - BHP_256.with(|bhp| bhp.commit(input, randomizer)) - } - - /// Returns a BHP commitment with an input hasher of 512-bits. - fn commit_bhp512(input: &[Boolean], randomizer: &Scalar) -> Field { - BHP_512.with(|bhp| bhp.commit(input, randomizer)) - } - - /// Returns a BHP commitment with an input hasher of 768-bits. - fn commit_bhp768(input: &[Boolean], randomizer: &Scalar) -> Field { - BHP_768.with(|bhp| bhp.commit(input, randomizer)) - } - - /// Returns a BHP commitment with an input hasher of 1024-bits. - fn commit_bhp1024(input: &[Boolean], randomizer: &Scalar) -> Field { - BHP_1024.with(|bhp| bhp.commit(input, randomizer)) - } - - /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. - fn commit_ped64(input: &[Boolean], randomizer: &Scalar) -> Field { - PEDERSEN_64.with(|pedersen| pedersen.commit(input, randomizer)) - } - - /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. - fn commit_ped128(input: &[Boolean], randomizer: &Scalar) -> Field { - PEDERSEN_128.with(|pedersen| pedersen.commit(input, randomizer)) - } - - /// Returns a BHP commitment with an input hasher of 256-bits. - fn commit_to_group_bhp256(input: &[Boolean], randomizer: &Scalar) -> Group { - BHP_256.with(|bhp| bhp.commit_uncompressed(input, randomizer)) - } - - /// Returns a BHP commitment with an input hasher of 512-bits. - fn commit_to_group_bhp512(input: &[Boolean], randomizer: &Scalar) -> Group { - BHP_512.with(|bhp| bhp.commit_uncompressed(input, randomizer)) - } - - /// Returns a BHP commitment with an input hasher of 768-bits. - fn commit_to_group_bhp768(input: &[Boolean], randomizer: &Scalar) -> Group { - BHP_768.with(|bhp| bhp.commit_uncompressed(input, randomizer)) - } - - /// Returns a BHP commitment with an input hasher of 1024-bits. - fn commit_to_group_bhp1024(input: &[Boolean], randomizer: &Scalar) -> Group { - BHP_1024.with(|bhp| bhp.commit_uncompressed(input, randomizer)) - } - - /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. - fn commit_to_group_ped64(input: &[Boolean], randomizer: &Scalar) -> Group { - PEDERSEN_64.with(|pedersen| pedersen.commit_uncompressed(input, randomizer)) - } - - /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. - fn commit_to_group_ped128(input: &[Boolean], randomizer: &Scalar) -> Group { - PEDERSEN_128.with(|pedersen| pedersen.commit_uncompressed(input, randomizer)) - } - - /// Returns the BHP hash with an input hasher of 256-bits. - fn hash_bhp256(input: &[Boolean]) -> Field { - BHP_256.with(|bhp| bhp.hash(input)) - } - - /// Returns the BHP hash with an input hasher of 512-bits. - fn hash_bhp512(input: &[Boolean]) -> Field { - BHP_512.with(|bhp| bhp.hash(input)) - } - - /// Returns the BHP hash with an input hasher of 768-bits. - fn hash_bhp768(input: &[Boolean]) -> Field { - BHP_768.with(|bhp| bhp.hash(input)) - } - - /// Returns the BHP hash with an input hasher of 1024-bits. - fn hash_bhp1024(input: &[Boolean]) -> Field { - BHP_1024.with(|bhp| bhp.hash(input)) - } - - /// Returns the Keccak hash with a 256-bit output. - fn hash_keccak256(input: &[Boolean]) -> Vec> { - KECCAK_256.with(|keccak| keccak.hash(input)) - } - - /// Returns the Keccak hash with a 384-bit output. - fn hash_keccak384(input: &[Boolean]) -> Vec> { - KECCAK_384.with(|keccak| keccak.hash(input)) - } - - /// Returns the Keccak hash with a 512-bit output. - fn hash_keccak512(input: &[Boolean]) -> Vec> { - KECCAK_512.with(|keccak| keccak.hash(input)) - } - - /// Returns the Pedersen hash for a given (up to) 64-bit input. - fn hash_ped64(input: &[Boolean]) -> Field { - PEDERSEN_64.with(|pedersen| pedersen.hash(input)) - } - - /// Returns the Pedersen hash for a given (up to) 128-bit input. - fn hash_ped128(input: &[Boolean]) -> Field { - PEDERSEN_128.with(|pedersen| pedersen.hash(input)) - } - - /// Returns the Poseidon hash with an input rate of 2. - fn hash_psd2(input: &[Field]) -> Field { - POSEIDON_2.with(|poseidon| poseidon.hash(input)) - } - - /// Returns the Poseidon hash with an input rate of 4. - fn hash_psd4(input: &[Field]) -> Field { - POSEIDON_4.with(|poseidon| poseidon.hash(input)) - } - - /// Returns the Poseidon hash with an input rate of 8. - fn hash_psd8(input: &[Field]) -> Field { - POSEIDON_8.with(|poseidon| poseidon.hash(input)) - } - - /// Returns the SHA-3 hash with a 256-bit output. - fn hash_sha3_256(input: &[Boolean]) -> Vec> { - SHA3_256.with(|sha3| sha3.hash(input)) - } - - /// Returns the SHA-3 hash with a 384-bit output. - fn hash_sha3_384(input: &[Boolean]) -> Vec> { - SHA3_384.with(|sha3| sha3.hash(input)) - } - - /// Returns the SHA-3 hash with a 512-bit output. - fn hash_sha3_512(input: &[Boolean]) -> Vec> { - SHA3_512.with(|sha3| sha3.hash(input)) - } - - /// Returns the extended Poseidon hash with an input rate of 2. - fn hash_many_psd2(input: &[Field], num_outputs: u16) -> Vec> { - POSEIDON_2.with(|poseidon| poseidon.hash_many(input, num_outputs)) - } - - /// Returns the extended Poseidon hash with an input rate of 4. - fn hash_many_psd4(input: &[Field], num_outputs: u16) -> Vec> { - POSEIDON_4.with(|poseidon| poseidon.hash_many(input, num_outputs)) - } - - /// Returns the extended Poseidon hash with an input rate of 8. - fn hash_many_psd8(input: &[Field], num_outputs: u16) -> Vec> { - POSEIDON_8.with(|poseidon| poseidon.hash_many(input, num_outputs)) - } - - /// Returns the BHP hash with an input hasher of 256-bits. - fn hash_to_group_bhp256(input: &[Boolean]) -> Group { - BHP_256.with(|bhp| bhp.hash_uncompressed(input)) - } - - /// Returns the BHP hash with an input hasher of 512-bits. - fn hash_to_group_bhp512(input: &[Boolean]) -> Group { - BHP_512.with(|bhp| bhp.hash_uncompressed(input)) - } - - /// Returns the BHP hash with an input hasher of 768-bits. - fn hash_to_group_bhp768(input: &[Boolean]) -> Group { - BHP_768.with(|bhp| bhp.hash_uncompressed(input)) - } - - /// Returns the BHP hash with an input hasher of 1024-bits. - fn hash_to_group_bhp1024(input: &[Boolean]) -> Group { - BHP_1024.with(|bhp| bhp.hash_uncompressed(input)) - } - - /// Returns the Pedersen hash for a given (up to) 64-bit input. - fn hash_to_group_ped64(input: &[Boolean]) -> Group { - PEDERSEN_64.with(|pedersen| pedersen.hash_uncompressed(input)) - } - - /// Returns the Pedersen hash for a given (up to) 128-bit input. - fn hash_to_group_ped128(input: &[Boolean]) -> Group { - PEDERSEN_128.with(|pedersen| pedersen.hash_uncompressed(input)) - } - - /// Returns the Poseidon hash with an input rate of 2 on the affine curve. - fn hash_to_group_psd2(input: &[Field]) -> Group { - POSEIDON_2.with(|poseidon| poseidon.hash_to_group(input)) - } - - /// Returns the Poseidon hash with an input rate of 4 on the affine curve. - fn hash_to_group_psd4(input: &[Field]) -> Group { - POSEIDON_4.with(|poseidon| poseidon.hash_to_group(input)) - } - - /// Returns the Poseidon hash with an input rate of 8 on the affine curve. - fn hash_to_group_psd8(input: &[Field]) -> Group { - POSEIDON_8.with(|poseidon| poseidon.hash_to_group(input)) - } - - /// Returns the Poseidon hash with an input rate of 2 on the scalar field. - fn hash_to_scalar_psd2(input: &[Field]) -> Scalar { - POSEIDON_2.with(|poseidon| poseidon.hash_to_scalar(input)) - } - - /// Returns the Poseidon hash with an input rate of 4 on the scalar field. - fn hash_to_scalar_psd4(input: &[Field]) -> Scalar { - POSEIDON_4.with(|poseidon| poseidon.hash_to_scalar(input)) - } - - /// Returns the Poseidon hash with an input rate of 8 on the scalar field. - fn hash_to_scalar_psd8(input: &[Field]) -> Scalar { - POSEIDON_8.with(|poseidon| poseidon.hash_to_scalar(input)) - } - - /// Returns `true` if the given Merkle path is valid for the given root and leaf. - fn verify_merkle_path_bhp( - path: &MerklePath, - root: &Field, - leaf: &Vec>, - ) -> Boolean { - BHP_1024.with(|bhp1024| BHP_512.with(|bhp512| path.verify(bhp1024, bhp512, root, leaf))) - } - - /// Returns `true` if the given Merkle path is valid for the given root and leaf. - fn verify_merkle_path_psd( - path: &MerklePath, - root: &Field, - leaf: &Vec>, - ) -> Boolean { - POSEIDON_4.with(|psd4| POSEIDON_2.with(|psd2| path.verify(psd4, psd2, root, leaf))) - } -} - -impl Environment for AleoCanaryV0 { - type Affine = ::Affine; - type BaseField = ::BaseField; - type Network = ::Network; - type ScalarField = ::ScalarField; - - /// Returns the `zero` constant. - fn zero() -> LinearCombination { - E::zero() - } - - /// Returns the `one` constant. - fn one() -> LinearCombination { - E::one() - } - - /// Returns a new variable of the given mode and value. - fn new_variable(mode: Mode, value: Self::BaseField) -> Variable { - E::new_variable(mode, value) - } - - /// Returns a new witness of the given mode and value. - fn new_witness Output::Primitive, Output: Inject>(mode: Mode, logic: Fn) -> Output { - E::new_witness(mode, logic) - } - - /// Enters a new scope for the environment. - fn scope, Fn, Output>(name: S, logic: Fn) -> Output - where - Fn: FnOnce() -> Output, - { - E::scope(name, logic) - } - - /// Adds one constraint enforcing that `(A * B) == C`. - fn enforce(constraint: Fn) - where - Fn: FnOnce() -> (A, B, C), - A: Into>, - B: Into>, - C: Into>, - { - E::enforce(constraint) - } - - /// Returns `true` if all constraints in the environment are satisfied. - fn is_satisfied() -> bool { - E::is_satisfied() - } - - /// Returns `true` if all constraints in the current scope are satisfied. - fn is_satisfied_in_scope() -> bool { - E::is_satisfied_in_scope() - } - - /// Returns the number of constants in the entire circuit. - fn num_constants() -> u64 { - E::num_constants() - } - - /// Returns the number of public variables in the entire circuit. - fn num_public() -> u64 { - E::num_public() - } - - /// Returns the number of private variables in the entire circuit. - fn num_private() -> u64 { - E::num_private() - } - - /// Returns the number of constant, public, and private variables in the entire circuit. - fn num_variables() -> u64 { - E::num_variables() - } - - /// Returns the number of constraints in the entire circuit. - fn num_constraints() -> u64 { - E::num_constraints() - } - - /// Returns the number of nonzeros in the entire circuit. - fn num_nonzeros() -> (u64, u64, u64) { - E::num_nonzeros() - } - - /// Returns the number of constants for the current scope. - fn num_constants_in_scope() -> u64 { - E::num_constants_in_scope() - } - - /// Returns the number of public variables for the current scope. - fn num_public_in_scope() -> u64 { - E::num_public_in_scope() - } - - /// Returns the number of private variables for the current scope. - fn num_private_in_scope() -> u64 { - E::num_private_in_scope() - } - - /// Returns the number of constraints for the current scope. - fn num_constraints_in_scope() -> u64 { - E::num_constraints_in_scope() - } - - /// Returns the number of nonzeros for the current scope. - fn num_nonzeros_in_scope() -> (u64, u64, u64) { - E::num_nonzeros_in_scope() - } - - /// Returns the variable limit for the circuit, if one exists. - fn get_variable_limit() -> Option { - E::get_variable_limit() - } - - /// Sets the variable limit for the circuit. - fn set_variable_limit(limit: Option) { - E::set_variable_limit(limit) - } - - /// Returns the constraint limit for the circuit, if one exists. - fn get_constraint_limit() -> Option { - E::get_constraint_limit() - } - - /// Sets the constraint limit for the circuit. - fn set_constraint_limit(limit: Option) { - E::set_constraint_limit(limit) - } - - /// Halts the program from further synthesis, evaluation, and execution in the current environment. - fn halt, T>(message: S) -> T { - E::halt(message) - } - - /// Returns the R1CS circuit, resetting the circuit. - fn inject_r1cs(r1cs: R1CS) { - E::inject_r1cs(r1cs) - } - - /// Returns the R1CS circuit, resetting the circuit. - fn eject_r1cs_and_reset() -> R1CS { - E::eject_r1cs_and_reset() - } - - /// Returns the R1CS assignment of the circuit, resetting the circuit. - fn eject_assignment_and_reset() -> Assignment<::Field> { - E::eject_assignment_and_reset() - } - - /// Clears the circuit and initializes an empty environment. - fn reset() { - E::reset() - } -} - -impl Display for AleoCanaryV0 { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { - // TODO (howardwu): Find a better way to print the circuit. - fmt::Display::fmt(&CanaryCircuit, f) - } -} - -#[cfg(test)] -mod tests { - use super::*; - use snarkvm_circuit_types::Field; - - type CurrentAleo = AleoCanaryV0; - - /// Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. - fn create_example_circuit() -> Field { - let one = snarkvm_console_types::Field::<::Network>::one(); - let two = one + one; - - const EXPONENT: u64 = 64; - - // Compute 2^EXPONENT - 1, in a purposefully constraint-inefficient manner for testing. - let mut candidate = Field::::new(Mode::Public, one); - let mut accumulator = Field::new(Mode::Private, two); - for _ in 0..EXPONENT { - candidate += &accumulator; - accumulator *= Field::new(Mode::Private, two); - } - - assert_eq!((accumulator - Field::one()).eject_value(), candidate.eject_value()); - assert_eq!(2, E::num_public()); - assert_eq!(2 * EXPONENT + 1, E::num_private()); - assert_eq!(EXPONENT, E::num_constraints()); - assert!(E::is_satisfied()); - - candidate - } - - #[test] - fn test_print_circuit() { - let circuit = CurrentAleo {}; - let _candidate = create_example_circuit::(); - let output = format!("{circuit}"); - println!("{output}"); - } - - #[test] - fn test_circuit_scope() { - CurrentAleo::scope("test_circuit_scope", || { - assert_eq!(0, CurrentAleo::num_constants()); - assert_eq!(1, CurrentAleo::num_public()); - assert_eq!(0, CurrentAleo::num_private()); - assert_eq!(0, CurrentAleo::num_constraints()); - - assert_eq!(0, CurrentAleo::num_constants_in_scope()); - assert_eq!(0, CurrentAleo::num_public_in_scope()); - assert_eq!(0, CurrentAleo::num_private_in_scope()); - assert_eq!(0, CurrentAleo::num_constraints_in_scope()); - }) - } -} diff --git a/circuit/network/src/lib.rs b/circuit/network/src/lib.rs index 464e4e7ea4..36c131a70d 100644 --- a/circuit/network/src/lib.rs +++ b/circuit/network/src/lib.rs @@ -15,9 +15,6 @@ #![forbid(unsafe_code)] #![allow(clippy::too_many_arguments)] -pub mod canary_v0; -pub use canary_v0::*; - pub mod testnet_v0; pub use testnet_v0::*; diff --git a/circuit/src/lib.rs b/circuit/src/lib.rs index 48991bc63a..78af7cfe6c 100644 --- a/circuit/src/lib.rs +++ b/circuit/src/lib.rs @@ -27,16 +27,7 @@ pub mod modules { pub use snarkvm_circuit_collections::*; pub use snarkvm_circuit_environment as environment; - pub use snarkvm_circuit_environment::{ - Assignment, - CanaryCircuit, - Circuit, - Eject, - Environment, - Inject, - Mode, - TestnetCircuit, - }; + pub use snarkvm_circuit_environment::{Assignment, Circuit, Eject, Environment, Inject, Mode, TestnetCircuit}; pub use snarkvm_circuit_network as network; pub use snarkvm_circuit_network::*; diff --git a/console/network/src/canary_v0.rs b/console/network/src/canary_v0.rs deleted file mode 100644 index 9e8d920f0f..0000000000 --- a/console/network/src/canary_v0.rs +++ /dev/null @@ -1,492 +0,0 @@ -// Copyright (C) 2019-2023 Aleo Systems Inc. -// This file is part of the snarkVM library. - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use super::*; -use crate::TRANSACTION_PREFIX; -use snarkvm_console_algorithms::{ - Blake2Xs, - Keccak256, - Keccak384, - Keccak512, - Pedersen128, - Pedersen64, - Poseidon2, - Poseidon4, - Poseidon8, - Sha3_256, - Sha3_384, - Sha3_512, - BHP1024, - BHP256, - BHP512, - BHP768, -}; - -lazy_static! { - /// The group bases for the Aleo signature and encryption schemes. - static ref GENERATOR_G: Vec> = CanaryV0::new_bases("AleoAccountEncryptionAndSignatureScheme0"); - - /// The Varuna sponge parameters. - static ref VARUNA_FS_PARAMETERS: FiatShamirParameters = FiatShamir::::sample_parameters(); - - /// The encryption domain as a constant field element. - static ref ENCRYPTION_DOMAIN: Field = Field::::new_domain_separator("AleoSymmetricEncryption0"); - /// The graph key domain as a constant field element. - static ref GRAPH_KEY_DOMAIN: Field = Field::::new_domain_separator("AleoGraphKey0"); - /// The serial number domain as a constant field element. - 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 CANARY_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 CANARY_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 CANARY_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 CANARY_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 CANARY_PEDERSEN_64: Pedersen64 = Pedersen64::::setup("AleoPedersen64"); - /// The Pedersen hash function, which can take an input of up to 128 bits. - pub static ref CANARY_PEDERSEN_128: Pedersen128 = Pedersen128::::setup("AleoPedersen128"); - - /// The Poseidon hash function, using a rate of 2. - pub static ref CANARY_POSEIDON_2: Poseidon2 = Poseidon2::::setup("AleoPoseidon2").expect("Failed to setup Poseidon2"); - /// The Poseidon hash function, using a rate of 4. - pub static ref CANARY_POSEIDON_4: Poseidon4 = Poseidon4::::setup("AleoPoseidon4").expect("Failed to setup Poseidon4"); - /// The Poseidon hash function, using a rate of 8. - pub static ref CANARY_POSEIDON_8: Poseidon8 = Poseidon8::::setup("AleoPoseidon8").expect("Failed to setup Poseidon8"); - - pub static ref CANARY_CREDITS_PROVING_KEYS: IndexMap>> = { - let mut map = IndexMap::new(); - snarkvm_parameters::insert_canary_credit_keys!(map, VarunaProvingKey, Prover); - map - }; - pub static ref CANARY_CREDITS_VERIFYING_KEYS: IndexMap>> = { - let mut map = IndexMap::new(); - snarkvm_parameters::insert_canary_credit_keys!(map, VarunaVerifyingKey, Verifier); - map - }; -} - -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] -pub struct CanaryV0; - -impl CanaryV0 { - /// 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. - let (base, _, _) = Blake2Xs::hash_to_curve::<::Affine>(message); - - // Compute the bases up to the size of the scalar field (in bits). - let mut g = Group::::new(base); - let mut g_bases = Vec::with_capacity(Scalar::::size_in_bits()); - for _ in 0..Scalar::::size_in_bits() { - g_bases.push(g); - g = g.double(); - } - g_bases - } -} - -impl Environment for CanaryV0 { - type Affine = ::Affine; - type BigInteger = ::BigInteger; - type Field = ::Field; - type PairingCurve = ::PairingCurve; - type Projective = ::Projective; - type Scalar = ::Scalar; - - /// The coefficient `A` of the twisted Edwards curve. - const EDWARDS_A: Self::Field = Console::EDWARDS_A; - /// The coefficient `D` of the twisted Edwards curve. - const EDWARDS_D: Self::Field = Console::EDWARDS_D; - /// The coefficient `A` of the Montgomery curve. - const MONTGOMERY_A: Self::Field = Console::MONTGOMERY_A; - /// The coefficient `B` of the Montgomery curve. - const MONTGOMERY_B: Self::Field = Console::MONTGOMERY_B; -} - -impl Network for CanaryV0 { - /// The block hash type. - type BlockHash = AleoID, { hrp2!("ab") }>; - /// The ratification ID type. - type RatificationID = AleoID, { hrp2!("ar") }>; - /// The state root type. - type StateRoot = AleoID, { hrp2!("sr") }>; - /// The transaction ID type. - type TransactionID = AleoID, { hrp2!(TRANSACTION_PREFIX) }>; - /// The transition ID type. - type TransitionID = AleoID, { hrp2!("au") }>; - - /// The network edition. - const EDITION: u16 = 0; - /// The genesis block coinbase target. - const GENESIS_COINBASE_TARGET: u64 = (1u64 << 10).saturating_sub(1); - /// The genesis block proof target. - const GENESIS_PROOF_TARGET: u64 = 1u64 << 8; - /// The fixed timestamp of the genesis block. - const GENESIS_TIMESTAMP: i64 = 1715776496 /* 2024-05-15 12:34:56 UTC */; - /// The network ID. - const ID: u16 = 2; - /// The function name for the inclusion circuit. - const INCLUSION_FUNCTION_NAME: &'static str = MainnetV0::INCLUSION_FUNCTION_NAME; - /// The maximum number of certificates in a batch. - const MAX_CERTIFICATES: u16 = 100; - /// The network name. - const NAME: &'static str = "Aleo Canary (v0)"; - - /// Returns the genesis block bytes. - fn genesis_bytes() -> &'static [u8] { - snarkvm_parameters::canary::GenesisBytes::load_bytes() - } - - /// Returns the proving key for the given function name in `credits.aleo`. - fn get_credits_proving_key(function_name: String) -> Result<&'static Arc>> { - CANARY_CREDITS_PROVING_KEYS - .get(&function_name) - .ok_or_else(|| anyhow!("Proving key for credits.aleo/{function_name}' not found")) - } - - /// Returns the verifying key for the given function name in `credits.aleo`. - fn get_credits_verifying_key(function_name: String) -> Result<&'static Arc>> { - CANARY_CREDITS_VERIFYING_KEYS - .get(&function_name) - .ok_or_else(|| anyhow!("Verifying key for credits.aleo/{function_name}' not found")) - } - - /// Returns the `proving key` for the inclusion circuit. - fn inclusion_proving_key() -> &'static Arc> { - static INSTANCE: OnceCell>> = OnceCell::new(); - INSTANCE.get_or_init(|| { - // Skipping the first byte, which is the encoded version. - Arc::new( - CircuitProvingKey::from_bytes_le(&snarkvm_parameters::canary::INCLUSION_PROVING_KEY[1..]) - .expect("Failed to load inclusion proving key."), - ) - }) - } - - /// Returns the `verifying key` for the inclusion circuit. - fn inclusion_verifying_key() -> &'static Arc> { - static INSTANCE: OnceCell>> = OnceCell::new(); - INSTANCE.get_or_init(|| { - // Skipping the first byte, which is the encoded version. - Arc::new( - CircuitVerifyingKey::from_bytes_le(&snarkvm_parameters::canary::INCLUSION_VERIFYING_KEY[1..]) - .expect("Failed to load inclusion verifying key."), - ) - }) - } - - /// Returns the powers of `G`. - fn g_powers() -> &'static Vec> { - &GENERATOR_G - } - - /// Returns the scalar multiplication on the generator `G`. - fn g_scalar_multiply(scalar: &Scalar) -> Group { - GENERATOR_G - .iter() - .zip_eq(&scalar.to_bits_le()) - .filter_map(|(base, bit)| match bit { - true => Some(base), - false => None, - }) - .sum() - } - - /// Returns the Varuna universal prover. - fn varuna_universal_prover() -> &'static UniversalProver { - MainnetV0::varuna_universal_prover() - } - - /// Returns the Varuna universal verifier. - fn varuna_universal_verifier() -> &'static UniversalVerifier { - MainnetV0::varuna_universal_verifier() - } - - /// Returns the sponge parameters used for the sponge in the Varuna SNARK. - fn varuna_fs_parameters() -> &'static FiatShamirParameters { - &VARUNA_FS_PARAMETERS - } - - /// Returns the encryption domain as a constant field element. - fn encryption_domain() -> Field { - *ENCRYPTION_DOMAIN - } - - /// Returns the graph key domain as a constant field element. - fn graph_key_domain() -> Field { - *GRAPH_KEY_DOMAIN - } - - /// Returns the serial number domain as a constant field element. - fn serial_number_domain() -> Field { - *SERIAL_NUMBER_DOMAIN - } - - /// Returns a BHP commitment with an input hasher of 256-bits and randomizer. - fn commit_bhp256(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_256.commit(input, randomizer) - } - - /// Returns a BHP commitment with an input hasher of 512-bits and randomizer. - fn commit_bhp512(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_512.commit(input, randomizer) - } - - /// Returns a BHP commitment with an input hasher of 768-bits and randomizer. - fn commit_bhp768(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_768.commit(input, randomizer) - } - - /// Returns a BHP commitment with an input hasher of 1024-bits and randomizer. - fn commit_bhp1024(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_1024.commit(input, randomizer) - } - - /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. - fn commit_ped64(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_PEDERSEN_64.commit(input, randomizer) - } - - /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. - fn commit_ped128(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_PEDERSEN_128.commit(input, randomizer) - } - - /// Returns a BHP commitment with an input hasher of 256-bits and randomizer. - fn commit_to_group_bhp256(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_256.commit_uncompressed(input, randomizer) - } - - /// Returns a BHP commitment with an input hasher of 512-bits and randomizer. - fn commit_to_group_bhp512(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_512.commit_uncompressed(input, randomizer) - } - - /// Returns a BHP commitment with an input hasher of 768-bits and randomizer. - fn commit_to_group_bhp768(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_768.commit_uncompressed(input, randomizer) - } - - /// Returns a BHP commitment with an input hasher of 1024-bits and randomizer. - fn commit_to_group_bhp1024(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_BHP_1024.commit_uncompressed(input, randomizer) - } - - /// Returns a Pedersen commitment for the given (up to) 64-bit input and randomizer. - fn commit_to_group_ped64(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_PEDERSEN_64.commit_uncompressed(input, randomizer) - } - - /// Returns a Pedersen commitment for the given (up to) 128-bit input and randomizer. - fn commit_to_group_ped128(input: &[bool], randomizer: &Scalar) -> Result> { - CANARY_PEDERSEN_128.commit_uncompressed(input, randomizer) - } - - /// Returns the BHP hash with an input hasher of 256-bits. - fn hash_bhp256(input: &[bool]) -> Result> { - CANARY_BHP_256.hash(input) - } - - /// Returns the BHP hash with an input hasher of 512-bits. - fn hash_bhp512(input: &[bool]) -> Result> { - CANARY_BHP_512.hash(input) - } - - /// Returns the BHP hash with an input hasher of 768-bits. - fn hash_bhp768(input: &[bool]) -> Result> { - CANARY_BHP_768.hash(input) - } - - /// Returns the BHP hash with an input hasher of 1024-bits. - fn hash_bhp1024(input: &[bool]) -> Result> { - CANARY_BHP_1024.hash(input) - } - - /// Returns the Keccak hash with a 256-bit output. - fn hash_keccak256(input: &[bool]) -> Result> { - Keccak256::default().hash(input) - } - - /// Returns the Keccak hash with a 384-bit output. - fn hash_keccak384(input: &[bool]) -> Result> { - Keccak384::default().hash(input) - } - - /// Returns the Keccak hash with a 512-bit output. - fn hash_keccak512(input: &[bool]) -> Result> { - Keccak512::default().hash(input) - } - - /// Returns the Pedersen hash for a given (up to) 64-bit input. - fn hash_ped64(input: &[bool]) -> Result> { - CANARY_PEDERSEN_64.hash(input) - } - - /// Returns the Pedersen hash for a given (up to) 128-bit input. - fn hash_ped128(input: &[bool]) -> Result> { - CANARY_PEDERSEN_128.hash(input) - } - - /// Returns the Poseidon hash with an input rate of 2. - fn hash_psd2(input: &[Field]) -> Result> { - CANARY_POSEIDON_2.hash(input) - } - - /// Returns the Poseidon hash with an input rate of 4. - fn hash_psd4(input: &[Field]) -> Result> { - CANARY_POSEIDON_4.hash(input) - } - - /// Returns the Poseidon hash with an input rate of 8. - fn hash_psd8(input: &[Field]) -> Result> { - CANARY_POSEIDON_8.hash(input) - } - - /// Returns the SHA-3 hash with a 256-bit output. - fn hash_sha3_256(input: &[bool]) -> Result> { - Sha3_256::default().hash(input) - } - - /// Returns the SHA-3 hash with a 384-bit output. - fn hash_sha3_384(input: &[bool]) -> Result> { - Sha3_384::default().hash(input) - } - - /// Returns the SHA-3 hash with a 512-bit output. - fn hash_sha3_512(input: &[bool]) -> Result> { - Sha3_512::default().hash(input) - } - - /// Returns the extended Poseidon hash with an input rate of 2. - fn hash_many_psd2(input: &[Field], num_outputs: u16) -> Vec> { - CANARY_POSEIDON_2.hash_many(input, num_outputs) - } - - /// Returns the extended Poseidon hash with an input rate of 4. - fn hash_many_psd4(input: &[Field], num_outputs: u16) -> Vec> { - CANARY_POSEIDON_4.hash_many(input, num_outputs) - } - - /// Returns the extended Poseidon hash with an input rate of 8. - fn hash_many_psd8(input: &[Field], num_outputs: u16) -> Vec> { - CANARY_POSEIDON_8.hash_many(input, num_outputs) - } - - /// Returns the BHP hash with an input hasher of 256-bits. - fn hash_to_group_bhp256(input: &[bool]) -> Result> { - CANARY_BHP_256.hash_uncompressed(input) - } - - /// Returns the BHP hash with an input hasher of 512-bits. - fn hash_to_group_bhp512(input: &[bool]) -> Result> { - CANARY_BHP_512.hash_uncompressed(input) - } - - /// Returns the BHP hash with an input hasher of 768-bits. - fn hash_to_group_bhp768(input: &[bool]) -> Result> { - CANARY_BHP_768.hash_uncompressed(input) - } - - /// Returns the BHP hash with an input hasher of 1024-bits. - fn hash_to_group_bhp1024(input: &[bool]) -> Result> { - CANARY_BHP_1024.hash_uncompressed(input) - } - - /// Returns the Pedersen hash for a given (up to) 64-bit input. - fn hash_to_group_ped64(input: &[bool]) -> Result> { - CANARY_PEDERSEN_64.hash_uncompressed(input) - } - - /// Returns the Pedersen hash for a given (up to) 128-bit input. - fn hash_to_group_ped128(input: &[bool]) -> Result> { - CANARY_PEDERSEN_128.hash_uncompressed(input) - } - - /// Returns the Poseidon hash with an input rate of 2 on the affine curve. - fn hash_to_group_psd2(input: &[Field]) -> Result> { - CANARY_POSEIDON_2.hash_to_group(input) - } - - /// Returns the Poseidon hash with an input rate of 4 on the affine curve. - fn hash_to_group_psd4(input: &[Field]) -> Result> { - CANARY_POSEIDON_4.hash_to_group(input) - } - - /// Returns the Poseidon hash with an input rate of 8 on the affine curve. - fn hash_to_group_psd8(input: &[Field]) -> Result> { - CANARY_POSEIDON_8.hash_to_group(input) - } - - /// Returns the Poseidon hash with an input rate of 2 on the scalar field. - fn hash_to_scalar_psd2(input: &[Field]) -> Result> { - CANARY_POSEIDON_2.hash_to_scalar(input) - } - - /// Returns the Poseidon hash with an input rate of 4 on the scalar field. - fn hash_to_scalar_psd4(input: &[Field]) -> Result> { - CANARY_POSEIDON_4.hash_to_scalar(input) - } - - /// Returns the Poseidon hash with an input rate of 8 on the scalar field. - fn hash_to_scalar_psd8(input: &[Field]) -> Result> { - CANARY_POSEIDON_8.hash_to_scalar(input) - } - - /// Returns a Merkle tree with a BHP leaf hasher of 1024-bits and a BHP path hasher of 512-bits. - fn merkle_tree_bhp(leaves: &[Vec]) -> Result> { - MerkleTree::new(&*CANARY_BHP_1024, &*CANARY_BHP_512, leaves) - } - - /// Returns a Merkle tree with a Poseidon leaf hasher with input rate of 4 and a Poseidon path hasher with input rate of 2. - fn merkle_tree_psd(leaves: &[Vec>]) -> Result> { - MerkleTree::new(&*CANARY_POSEIDON_4, &*CANARY_POSEIDON_2, leaves) - } - - /// Returns `true` if the given Merkle path is valid for the given root and leaf. - fn verify_merkle_path_bhp( - path: &MerklePath, - root: &Field, - leaf: &Vec, - ) -> bool { - path.verify(&*CANARY_BHP_1024, &*CANARY_BHP_512, root, leaf) - } - - /// Returns `true` if the given Merkle path is valid for the given root and leaf. - fn verify_merkle_path_psd( - path: &MerklePath, - root: &Field, - leaf: &Vec>, - ) -> bool { - path.verify(&*CANARY_POSEIDON_4, &*CANARY_POSEIDON_2, root, leaf) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - type CurrentNetwork = CanaryV0; - - #[test] - fn test_g_scalar_multiply() { - // Compute G^r. - let scalar = Scalar::rand(&mut TestRng::default()); - let group = CurrentNetwork::g_scalar_multiply(&scalar); - assert_eq!(group, CurrentNetwork::g_powers()[0] * scalar); - } -} diff --git a/console/network/src/lib.rs b/console/network/src/lib.rs index 9d905ac761..306a77b6fe 100644 --- a/console/network/src/lib.rs +++ b/console/network/src/lib.rs @@ -25,9 +25,6 @@ pub use snarkvm_console_network_environment::*; mod helpers; pub use helpers::*; -mod canary_v0; -pub use canary_v0::*; - mod mainnet_v0; pub use mainnet_v0::*; diff --git a/ledger/query/src/query.rs b/ledger/query/src/query.rs index c5d0ac524d..a7c62f184d 100644 --- a/ledger/query/src/query.rs +++ b/ledger/query/src/query.rs @@ -72,9 +72,6 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/latest/stateRoot"))?.into_json()?) } - console::network::CanaryV0::ID => { - Ok(Self::get_request(&format!("{url}/canary/latest/stateRoot"))?.into_json()?) - } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -92,9 +89,6 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/latest/stateRoot")).await?.json().await?) } - console::network::CanaryV0::ID => { - Ok(Self::get_request_async(&format!("{url}/canary/latest/stateRoot")).await?.json().await?) - } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -111,9 +105,6 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/statePath/{commitment}"))?.into_json()?) } - console::network::CanaryV0::ID => { - Ok(Self::get_request(&format!("{url}/canary/statePath/{commitment}"))?.into_json()?) - } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -131,9 +122,6 @@ impl> QueryTrait for Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/statePath/{commitment}")).await?.json().await?) } - console::network::CanaryV0::ID => { - Ok(Self::get_request_async(&format!("{url}/canary/statePath/{commitment}")).await?.json().await?) - } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -154,9 +142,6 @@ impl> Query { console::network::TestnetV0::ID => { Ok(Self::get_request(&format!("{url}/testnet/program/{program_id}"))?.into_json()?) } - console::network::CanaryV0::ID => { - Ok(Self::get_request(&format!("{url}/canary/program/{program_id}"))?.into_json()?) - } _ => bail!("Unsupported network ID in inclusion query"), }, } @@ -176,9 +161,6 @@ impl> Query { console::network::TestnetV0::ID => { Ok(Self::get_request_async(&format!("{url}/testnet/program/{program_id}")).await?.json().await?) } - console::network::CanaryV0::ID => { - Ok(Self::get_request_async(&format!("{url}/canary/program/{program_id}")).await?.json().await?) - } _ => bail!("Unsupported network ID in inclusion query"), }, } diff --git a/parameters/examples/inclusion.rs b/parameters/examples/inclusion.rs index 83c0f116bc..4b69ffaa2c 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::{CanaryV0, MainnetV0, Network, TestnetV0}, + network::{MainnetV0, Network, TestnetV0}, prelude::{One, ToBytes, Zero}, program::{Plaintext, Record, StatePath}, types::Field, @@ -176,9 +176,6 @@ pub fn main() -> Result<()> { "testnet" => { inclusion::()?; } - "canary" => { - inclusion::()?; - } _ => panic!("Invalid network"), }; diff --git a/parameters/examples/setup.rs b/parameters/examples/setup.rs index e324c9b0c3..557879d374 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, CanaryV0, MainnetV0, Network, TestnetV0}; +use snarkvm_console::network::{prelude::ToBytes, MainnetV0, Network, TestnetV0}; use snarkvm_synthesizer::{Process, Program}; use anyhow::Result; @@ -152,7 +152,6 @@ pub fn main() -> Result<()> { "credits" => match args[2].as_str() { "mainnet" => credits_program::(), "testnet" => credits_program::(), - "canary" => credits_program::(), _ => panic!("Invalid network"), }?, _ => panic!("Invalid parameter"), diff --git a/parameters/scripts/canary/credits.sh b/parameters/scripts/canary/credits.sh deleted file mode 100755 index 5b816dfb84..0000000000 --- a/parameters/scripts/canary/credits.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Generate proving and verifying keys. - -# Inputs: program name - -cargo run --release --example setup credits canary -- --nocapture || exit - -mv *.metadata ../../src/canary/resources || exit -mv *.prover.* ~/.aleo/resources || exit -mv *.verifier ../../src/canary/resources || exit diff --git a/parameters/scripts/canary/inclusion.sh b/parameters/scripts/canary/inclusion.sh deleted file mode 100755 index 339e1615af..0000000000 --- a/parameters/scripts/canary/inclusion.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Generates the inclusion proving and verifying key. - -# Inputs: network - -cargo run --release --example inclusion canary -- --nocapture || exit - -mv inclusion.metadata ../../src/canary/resources || exit -mv inclusion.prover.* ~/.aleo/resources || exit -mv inclusion.verifier ../../src/canary/resources || exit diff --git a/parameters/src/canary/genesis.rs b/parameters/src/canary/genesis.rs deleted file mode 100644 index d3a8b49351..0000000000 --- a/parameters/src/canary/genesis.rs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2019-2023 Aleo Systems Inc. -// This file is part of the snarkVM library. - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub struct GenesisBytes; - -impl GenesisBytes { - pub const fn load_bytes() -> &'static [u8] { - include_bytes!("./resources/block.genesis") - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_genesis_block() { - let bytes = GenesisBytes::load_bytes(); - assert_eq!(14943, bytes.len() as u64, "Update me if serialization has changed"); - } -} diff --git a/parameters/src/canary/mod.rs b/parameters/src/canary/mod.rs deleted file mode 100644 index 02dd96dc8f..0000000000 --- a/parameters/src/canary/mod.rs +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (C) 2019-2023 Aleo Systems Inc. -// This file is part of the snarkVM library. - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: -// http://www.apache.org/licenses/LICENSE-2.0 - -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -pub mod genesis; -pub use genesis::*; - -const REMOTE_URL: &str = "https://s3-us-west-1.amazonaws.com/canary.parameters"; - -// BondPublic -impl_remote!(BondPublicProver, REMOTE_URL, "resources/", "bond_public", "prover"); -impl_local!(BondPublicVerifier, "resources/", "bond_public", "verifier"); -// UnbondPublic -impl_remote!(UnbondPublicProver, REMOTE_URL, "resources/", "unbond_public", "prover"); -impl_local!(UnbondPublicVerifier, "resources/", "unbond_public", "verifier"); -// UnbondDelegatorAsValidator -impl_remote!(UnbondDelegatorAsValidatorProver, REMOTE_URL, "resources/", "unbond_delegator_as_validator", "prover"); -impl_local!(UnbondDelegatorAsValidatorVerifier, "resources/", "unbond_delegator_as_validator", "verifier"); -// ClaimUnbondPublic -impl_remote!(ClaimUnbondPublicProver, REMOTE_URL, "resources/", "claim_unbond_public", "prover"); -impl_local!(ClaimUnbondPublicVerifier, "resources/", "claim_unbond_public", "verifier"); -// SetValidatorState -impl_remote!(SetValidatorStateProver, REMOTE_URL, "resources/", "set_validator_state", "prover"); -impl_local!(SetValidatorStateVerifier, "resources/", "set_validator_state", "verifier"); -// TransferPrivate -impl_remote!(TransferPrivateProver, REMOTE_URL, "resources/", "transfer_private", "prover"); -impl_local!(TransferPrivateVerifier, "resources/", "transfer_private", "verifier"); -// TransferPublic -impl_remote!(TransferPublicProver, REMOTE_URL, "resources/", "transfer_public", "prover"); -impl_local!(TransferPublicVerifier, "resources/", "transfer_public", "verifier"); -// TransferPublicAsSigner -impl_remote!(TransferPublicAsSignerProver, REMOTE_URL, "resources/", "transfer_public_as_signer", "prover"); -impl_local!(TransferPublicAsSignerVerifier, "resources/", "transfer_public_as_signer", "verifier"); -// TransferPrivateToPublic -impl_remote!(TransferPrivateToPublicProver, REMOTE_URL, "resources/", "transfer_private_to_public", "prover"); -impl_local!(TransferPrivateToPublicVerifier, "resources/", "transfer_private_to_public", "verifier"); -// TransferPublicToPrivate -impl_remote!(TransferPublicToPrivateProver, REMOTE_URL, "resources/", "transfer_public_to_private", "prover"); -impl_local!(TransferPublicToPrivateVerifier, "resources/", "transfer_public_to_private", "verifier"); -// Join -impl_remote!(JoinProver, REMOTE_URL, "resources/", "join", "prover"); -impl_local!(JoinVerifier, "resources/", "join", "verifier"); -// Split -impl_remote!(SplitProver, REMOTE_URL, "resources/", "split", "prover"); -impl_local!(SplitVerifier, "resources/", "split", "verifier"); -// FeePrivate -impl_remote!(FeePrivateProver, REMOTE_URL, "resources/", "fee_private", "prover"); -impl_local!(FeePrivateVerifier, "resources/", "fee_private", "verifier"); -// FeePublic -impl_remote!(FeePublicProver, REMOTE_URL, "resources/", "fee_public", "prover"); -impl_local!(FeePublicVerifier, "resources/", "fee_public", "verifier"); - -#[macro_export] -macro_rules! insert_canary_credit_keys { - ($map:ident, $type:ident<$network:ident>, $variant:ident) => {{ - paste::paste! { - let string = stringify!([<$variant:lower>]); - $crate::insert_canary_key!($map, string, $type<$network>, ("bond_public", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("unbond_public", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("unbond_delegator_as_validator", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("claim_unbond_public", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("set_validator_state", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_private", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_public", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_public_as_signer", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_private_to_public", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("transfer_public_to_private", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("join", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("split", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("fee_private", $crate::canary::[]::load_bytes())); - $crate::insert_canary_key!($map, string, $type<$network>, ("fee_public", $crate::canary::[]::load_bytes())); - } - }}; -} - -#[macro_export] -macro_rules! insert_canary_key { - ($map:ident, $string:tt, $type:ident<$network:ident>, ($name:tt, $circuit_key:expr)) => {{ - // Load the circuit key bytes. - let key_bytes: Vec = $circuit_key.expect(&format!("Failed to load {} bytes", $string)); - // Recover the circuit key. - let key = $type::<$network>::from_bytes_le(&key_bytes[1..]).expect(&format!("Failed to recover {}", $string)); - // Insert the circuit key. - $map.insert($name.to_string(), std::sync::Arc::new(key)); - }}; -} - -// Inclusion -impl_remote!(InclusionProver, REMOTE_URL, "resources/", "inclusion", "prover"); -impl_local!(InclusionVerifier, "resources/", "inclusion", "verifier"); - -/// The function name for the inclusion circuit. -pub const NETWORK_INCLUSION_FUNCTION_NAME: &str = "inclusion"; - -lazy_static! { - pub static ref INCLUSION_PROVING_KEY: Vec = - InclusionProver::load_bytes().expect("Failed to load inclusion proving key"); - pub static ref INCLUSION_VERIFYING_KEY: Vec = - InclusionVerifier::load_bytes().expect("Failed to load inclusion verifying key"); -} - -#[cfg(test)] -mod tests { - use super::*; - use wasm_bindgen_test::*; - wasm_bindgen_test_configure!(run_in_browser); - - #[wasm_bindgen_test] - fn test_load_bytes() { - BondPublicVerifier::load_bytes().expect("Failed to load bond_public verifier"); - UnbondPublicVerifier::load_bytes().expect("Failed to load unbond_public verifier"); - UnbondDelegatorAsValidatorVerifier::load_bytes() - .expect("Failed to load unbond_delegator_as_validator verifier"); - ClaimUnbondPublicVerifier::load_bytes().expect("Failed to load claim_unbond_public verifier"); - SetValidatorStateVerifier::load_bytes().expect("Failed to load set_validator_state verifier"); - TransferPrivateVerifier::load_bytes().expect("Failed to load transfer_private verifier"); - TransferPublicVerifier::load_bytes().expect("Failed to load transfer_public verifier"); - TransferPublicAsSignerVerifier::load_bytes().expect("Failed to load transfer_public_as_signer verifier"); - TransferPrivateToPublicVerifier::load_bytes().expect("Failed to load transfer_private_to_public verifier"); - TransferPublicToPrivateVerifier::load_bytes().expect("Failed to load transfer_public_to_private verifier"); - FeePrivateProver::load_bytes().expect("Failed to load fee_private prover"); - FeePrivateVerifier::load_bytes().expect("Failed to load fee_private verifier"); - FeePublicProver::load_bytes().expect("Failed to load fee_public prover"); - FeePublicVerifier::load_bytes().expect("Failed to load fee_public verifier"); - InclusionProver::load_bytes().expect("Failed to load inclusion prover"); - InclusionVerifier::load_bytes().expect("Failed to load inclusion verifier"); - } -} diff --git a/parameters/src/canary/resources/block.genesis b/parameters/src/canary/resources/block.genesis deleted file mode 100644 index e65d9a014bc9564cee37c99c25b175dacf65429c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15485 zcmb_?WmH|sw)Hu*B5-$=wK2g~1lm+Hvhe=z@O8IYpMq8fE!x-;wh_sa(DcXS=(aql>(z zF+yk~xJ>g@^Ux-1 zD&Z+DEyyL`g(Lm&F4?p*>%=WHw>u)JDF7WH;)Qmu^P|zjsdH*_Yo8~^&RgGg_0p^9 zEwomOrAV2kjP}-xufcHt;&@$X%_shTJx@)Q7>7Fy!r6@UCOubY-qy`~5N_&UTfBWY z4uUFLsZ6?0E1_=?N{RH1`OER+bCK&3;1o)B5U!>>{zh7kN z55Hd|=nubN~ z+W#xgU(bji-}{$q`d9YTv4s+5aofU(d)NL3at2V7G?T_jt=?8YEEw_+BAP@wH!L%?_7(Qki-J*lXaoYJX!O^RNvHdP7tg5e% z7#`Nd$;{N!#Tm-T#>}3;#mUId+1$*@z`@nn#?r*V#ooZd$bc@8yN|kwm zm~rnLos<&1_)@q@-H}l?X9&C-59l-OkL`~2#-wb4#Ho$adi9XF-Q96F~L@kRm@@R{l8!kmd#z*5)>(;69wt*gnCs)|~!Id(4n z4E@5RdE~1YEVZ`1y^*E*X`26!T?Y~XkPFLJ0Sy2^KuS#W1MV72Y0&Fw&>3B(gy{Bk z$JO=92-L}9J&DSkp(W(%HXI(4j)!q{t22OuhD;wC1w>CI4P)~KksSB{W?Fxb4QF?Tgz^+=Jc{WU;iwb0_>FxWMI{d!_`gmH)j#%FzXE_CWA-oO z#=iYwrJ}9?D+dGxdh63FKX{cYwta#E*6GPDC>&#qR#(pax545J<$VquY=mD`I@n$=w9$!|24t{O+7M^vET%xQ$@V=@;j75?VOL1I(<9*taoNcxie3lgp zkj5cy2tmb@Qr6$vCnFxge>tMl^=;oYfVM=M6}#_z=1$JTO;@$Jp=zV7K1K4)>`4!4 z-q&RLclS|UR>GrJksY0~<3j$2;8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+>HLhMe^-Izy(ltY&cy>FBe<-wbgK7-1Uhzde)WFl3!mu(Y-#LNz zOY12iX`6CgR@;!64xX|*^cpUln;dav*ED!|aULMB&#M~_!jgZv$(-BSWv*Nj;B|Dwk_^HMNh2W%vmV!Q&i)z^3Pg~!8lLt#w@jbqM zz+&!r#S{cnpsIz!Om9X-q8LT+@pG&JfcehwTx5i$<{qRtb@;>+KlsrV`+aSLj^oSM zK$TVgxgDL-3XR?9r0h?hhP_nA@}^ zL|tta_=cyI36`@$T8)=fU?A$5c1T4T`i!-%F4${UiAZmx72B`d>VwiOHRP4%9&%!- z&{}5u`DbB4a>sg*~>-!_cl!P7((am7g%4K|R9kwCr+9A?zYBm*G zWPA#3g$@QgFP*L}mIAiuI*>jLn?gz5FT25{6z<0qKh-&8p$WjY z?%Z6zkA%BQm@uD~tzU+CS`2qj0t_wA71y@OB3D*rmYSe~Mo|#M0+-D?gk@h`FVDEu z<}}#*Q{^J9%7#XS@vaCMGMec$`PNSP9`@qC90YYkh{~8A#L!MwLx7mvuH&dVf@0Jl0%Zu>|!7^#2GRyw4<*dlUY_wu+=4ILEh=<3%yu7RkA zmIh!ZSM&#}VDVWWwJhP+AC_1gBwS-_;o)94v8cPG=SV%HqVph6e z?V@RI7p*^#k;z4zekokT*0%VHJNd2%?N~0)L{$jk#?$lvq#7faE`EHK<&(w4X5wyL z#B$Vy$-gM-ciKO_k~+MVwJztGpjhU70I4HoN;h-$=jYjl*EU+&RS!I~kssSku KL;ZFo`2PWaMG|ZP diff --git a/parameters/src/canary/resources/bond_public.metadata b/parameters/src/canary/resources/bond_public.metadata deleted file mode 100644 index 8462ca243f..0000000000 --- a/parameters/src/canary/resources/bond_public.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "ec245a43cd43f977cade50d77ec05b094b513a6bfcb219ff4c3571443b424128", - "prover_size": 29353850, - "verifier_checksum": "0efa4a4f9269397b1e7be9cdc2bbbf997155d6020f14d28de348fb9d4f5dc4fb", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/bond_public.verifier b/parameters/src/canary/resources/bond_public.verifier deleted file mode 100644 index de20c47e6ba5a7858f7aaf7dbbc1d9ec12b1c37a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1R%^69}CJrSH~2_*E+*G@l!U=7CTQ6RQ`OW^25eKk4=3Whu&?4F5Spzn8GQ zyjHws-t3d1T}7(V0d4#(eTVcrRD8VKsty@gw^lLDe!VgJ zS6$@GxIG+MN|nh+v!8iMoZPLhyytdggUW-i`P?j*OEv6RSQ?-Idt9BeHTCAZKHc8n z9yN!(r_A2=O_y2TbUW{QV3>c1&Xk6!$B#+Bs?KPxetwPh$dmL+?S+e5wwLx@aafhJ z;m!Q3Z5q)GXA~~jT|T>+{lmT$d5sfR=sN89`E2^eNYDG1R!@5?{-LYr3+tI?&d}fr z#pwO#rhVNPH2=nxk`vu3D<;^aHN1N-+WuwFhX?IVO5q`K9F?}0=N%Vxmf3CpSu9lf zi}0tl%^y@AzE)FTAK?4#;43)9-S^A@Gp)D>=-ZM)&(+^xIngsgdwy%f^8BKhvj zvW#T0@2|hCbPc(ao>2=@(WYP z%|z#zxmQyv<2M`#T;Z3)#h9Ebz|H#q!JUlIm>CaW%PRf8aqW!rBE!Go)mag(9{1RW+_4-HzlGVCHleoRKS8@K%S)_?pAY5cNm$!{ih z{y4k(XphfwhS_0%Qy80;f3vW5wDz0H=X6L=>*SQ(9zL&L+3KqtDwfk)biC*3Ui;?{ zA}t zf7#_LbNf(MgUaLNvs}!z+)Jfh7;Z3q42?gwY3hk9vA#J&~}D+eDbz zW?RKYoRpsv_x`5oMvbTLUm9FO&wldjcFxJWlKnlaVtc~QuCOh)W}W$5*=i*A_+`;X z8wY1r@85GC2mM`Wp7Yj~u~_UV<0g$$nXQ`Hl7e$D{qR4}m(I0LD1syZ?(bzM4Vt+m zA5GNIHrK4S{pdUQeJ7*m=im!9HYXhV{LiG^xbShJV3I>n!`@5MMc*&1-T&+NnT)IN zC8dO#n96QS>-FuQ!63N8we>IKU$@EAG<;?KPKT-ftqXqqPF8NxnSKw}5|i@_uC1QW zevv~%B+mPb?rc8BXB+O!c>CUG=Q01TgB8XvGGyg{#wUFdsc2}`d?uy5J6|_Lec$6o z9kx>`Uw_qqUB<}$aK-26Ohw^)4^%l+X-(bIxp&7R%U=)g?m1gAQ8_o}_7N*cLIVJa C_B8eY diff --git a/parameters/src/canary/resources/fee_private.metadata b/parameters/src/canary/resources/fee_private.metadata deleted file mode 100644 index d09bee560b..0000000000 --- a/parameters/src/canary/resources/fee_private.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "b3640d77dd92a0a03aa3cb9e7e5d7241e10165d61066cc2cf8e3dd2aeb9bc0b2", - "prover_size": 66297972, - "verifier_checksum": "c1242f35a0943dbe9d3d68ae29c5e69871e2ed62a876792324f2583320a6b07a", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/fee_private.verifier b/parameters/src/canary/resources/fee_private.verifier deleted file mode 100644 index a261e295ab69f59477a6223e432af397f4b33def..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1R&cQy?_QR0w@UmJ!S-afHwg_aNdt5Q<^ibMKb@y=!d*FAHwoI3s2Erdbme zj-C2`x^Kp9uDT3gQ-SUBnIWYvGJ;WFnvQJk4COoQAMQISc5=Zhn|n`wz7R^^9=ytS z=GI=V=$jjE%{M)|{PyNAyJuH=d^z2(^GfV8cH6oyi+8ytNpYA^Qq9a396G3<*I4~MIX^Rbtl zk1`#0-(1Dye^F~^)TGeF}1GW`qtg5=V|P`Pk)nw*L$vc9<;LCTPH2= zTtyhY(sOGNLzxc2^Q#C*q^US;t!=^I=pLhXOWv>X zuT~$^{-`;*%r7`gKgULOZ-dh1vIFfUXZ`Z$vgK_NauS=-`}WalORlXmG(<94d!lFk zU!WXV^yl{4sH1#kTRxgJ_D@)H`OHGW3OC7_H>&JTzS(n3BjxnUl($)zrd{b`bv-M> zE$3N$kC)@jw{O0EpG_LYmOVXsab01r+y8q1fVbI^CF*?}vQqes4{Dx&!60oT8^Av6 z#<$zf$rau^cl#|ZZqS}1#3H(K4}Ve!-;~Q1>V|vVMfb-|mSfNTRPQuPG)LpwVMsy) E0Ih8=RR910 diff --git a/parameters/src/canary/resources/fee_public.metadata b/parameters/src/canary/resources/fee_public.metadata deleted file mode 100644 index 1476ce96c7..0000000000 --- a/parameters/src/canary/resources/fee_public.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "1667bf508398fb94cb97dc7c99b647195492e0e8a9bf57fdb73fa3c294a3ceaf", - "prover_size": 29174402, - "verifier_checksum": "63936b8503ef8daf476e48d54106872fe813041a0b81e0f44c9714999866ebc4", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/fee_public.verifier b/parameters/src/canary/resources/fee_public.verifier deleted file mode 100644 index 3fbae8a94100115e44da896cee06d70dab47b9e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1R&bBM99LrEAI|e9wgt+Rhn5^FSzuQ-9NnCzo=y+;s^F$3E@E}vPk*}$P8%#oR))zC^LrBCjq`Kk#vYV~S|r}>%MKe1Yol_%3&BOocH zn6TIIz*O0&H}kyq`E5=-#NZ&(<($;3v1h0GuOgw~$o}mA`C$ohQ#RM#*wm`KbnXOJ z-%D?O3T}KAlQOS7z&?xN%U>>o_txF(7vR%h78a=FP=@>p6GW74~oGN1Dmcoy!FSNZWqDQBA2;pa}31)T~^ zZKn;=m-EkBcROFd@r^R;ZpS$t?v?S&s=mF>R(K}2C(p*$Ht0Untb=Z?-$LKp8E#*Z z;TV|{IN55pk8)#QQ`yH4k1xwcG;Hg*Uvt9L<^0vk19~BOMOUQR9{jm!H>t<}`>RT; zj}c|ozjrS@)S%uy`P(A}r*xl$Gjr!J-_U;4&ABgM`Jh7?m!m<#EX`$>E|7!<09j}& AzyJUM diff --git a/parameters/src/canary/resources/inclusion.metadata b/parameters/src/canary/resources/inclusion.metadata deleted file mode 100644 index 8df45d6edb..0000000000 --- a/parameters/src/canary/resources/inclusion.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "8faa4d3aaaa5e786d20b61f825e50901f9dcf470455d1d2994e091eefcc66a4e", - "prover_size": 233812212, - "verifier_checksum": "57bf79c7a493ee79f8ebed2c8e6e7e8a0a6d11b2f6edcba6e943768cb6a250cc", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/inclusion.verifier b/parameters/src/canary/resources/inclusion.verifier deleted file mode 100644 index d037956880aff4737c087407dddcc3f464187d17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZQ%VSs=oyi8z5J|Bd3&V|T4SO(#5S<4KT=Ygs});E#&%j-#}gG`k@Yvzc@i`&iS z7i51krEd50gKB%%CjH|Tdeo%I&GXuK;u@<>O^iiXk~9LggsfVw@amLYiXG>ymtAJr zGR&{}*)uFIUVZPz&%tD}Zj(yxuJ{!TdsUMfs`q@IXW5Ya=^bC=B^OCvQLD;s3+>>a z_BkIWzbu}p`91#l>zy}VWJcC1WxHHnXTxyK@#SGQ-)kR3cXTr>=1>+{{mj2)b&rf9I7m)KxhRn%3Rs()H4v1!g-hPAiDpUZH0f4>-!E$tZQHq-Rj`tA4MD@>i# z;}q-KqJ78e%m$a!$J3b?ZoL0R;(Ip3i$D2YWxp4%Y&J-5m|}AH%Z)o#yw5A_{~T#t z@V=x|z4`DX=JI>*EMO=$bqrDA8^DE+Zz&+QLaW|zEwWU=#CJ!^?Xif7*Sj=O3M4{xdc z^*g+F)j#E}Wh-_*JN_eQ?WK1N!O!(m@2PD*AU>6a$J^D*EL+M_o#*-*1KYFzCM$oj zohvqf)vaDbm&-Fg$!=J1j=Ry2OY+(R&#t|5|GO%Ey4L1UBRlP_@jQRCn4>M~GbdLp zXlF7qein2=d4}VrZS&$180wF6&Ty4t(!Wx}m3+?bzkAyxuC}G`3#TQ>z0^D2cyh<( z@b|%nZf%EO_mx@lTrg{hp6lv*cFwV<=dS6@3rRT`Brs#{gJbnK*9fGX`+j^|)s7lz z6Q2(+{+BBxlyXiq5@XC#4)L^6=~uN6os{Q4!zBWj@ F0{|IOF?av~ diff --git a/parameters/src/canary/resources/join.metadata b/parameters/src/canary/resources/join.metadata deleted file mode 100644 index 42ed8eb33c..0000000000 --- a/parameters/src/canary/resources/join.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "11c8e1702e4644ac8b31e2ad67c97ebf7d2f84e7f82298bbc52d25fe69b26150", - "prover_size": 74722164, - "verifier_checksum": "ec6395b9c03b49c941fcba788c16f73ff4896c4ee1cbb0dd19c9d13d43f51479", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/join.verifier b/parameters/src/canary/resources/join.verifier deleted file mode 100644 index 8a5b2fbde76b83dec98860cd0ca36375ef88ad00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1R(wBM`a*N-v9G1PeqJKxhvQ2+adke4V8zteY$&g>&?7mKX=ishUaU-1M(OdUW*(S;ke}`+r#mBv3RiM@4D2iiDhe& z-!9w}Tlj(LguZ$GLx-cPhqYH9z8yHjvT^s5S%*`8@lRcIebEem@sJyfWiAR&oO)*6 zT!-e_vfpnyH$C&)TVyGER&-5f<OWYj&dz3>QvdF8*0rRZ%Mr%}uAY^Reaxb0U@aeOFYI?W zIr{%g-$1$Ar_S0D;!8!(-*@m-XY6{cR;kt4_V-8Xf9@EiS7mF|OtMz)(qoYL{c^(1 z|1bS29(h+sL^pnZpfArHay^sLV)AjH{X2iJJ1Z2tO{(aUqmOcD5!(ayFY9_9B+Bi3 zVqg2l+q7t#)x)5Ve4k5SR5Q$2!p$bRF(xn2&F{CSO8q;||MgKE%f8k+-Q&niV@{oZ z<=?B%NydBD22NQpZ)wBX1{HUqhf54NQY(4N!b97I!(Oew{c&$w%*^?$d0J&FcWis` zLjJ(+6U;xOK6CH=I-R}I@NS-+TI99;QO`Kl6+~`mO^a{x)tou|^Q(Io7n&c~#A>?2 zOoO9$o!!@`mi_Y&M>TBS(;ColxrX!YZauSro{#!-i++n8yX4JVXu}nCX2+!acNY9p zGM{p6X?t!U!>j2sj0YrkGFM&b%B|P=+!XVuBL2sk&++@)!?rP>$Sw*G(=)vNAxwy4 z(dA}M55CQ9KW{c1&^)lsfq&!5AEgJcnp`h@Q5bpM#mRfk`xUw`g4dq)k&b7Eq&EP3 CkuX{S diff --git a/parameters/src/canary/resources/set_validator_state.metadata b/parameters/src/canary/resources/set_validator_state.metadata deleted file mode 100644 index aba7a5b4f6..0000000000 --- a/parameters/src/canary/resources/set_validator_state.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "e8fbb86008343485bb95c3e3e75d41b493ba654cc161d8b9f9c6901cb71d7a9d", - "prover_size": 17390188, - "verifier_checksum": "d0942ee642048e21cbf562737b4760524dd378ac17867e7a225736badb23f614", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/set_validator_state.verifier b/parameters/src/canary/resources/set_validator_state.verifier deleted file mode 100644 index b4b175c97cc5c51ec010acf4e228de0ab4c70688..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1R&s+7S8^lwJ`J;ZLZ8(7iSgng>ELJmNlQeVe^^`jnIQ-`!5^I;a}8S~uc1 zug@V7jg8yS^ZPQndc3|CxzKY($x7}u;`t4q^Y_i>dEtJO|2W6GFlK{8HA1tGT)Hx~ z``|PFNpbS)r0Z@qSia<+%2~9lG(z+8%Z3|gt*U!2PImHYOQ}6ADQK4Z(W5zLyX>Re zQ*UIJSBb^T+rJjn-@vKxPu}-kJ0nBGTHl4*$IEuveNldLU{2Lr^%WwC^98lK%uQ}H zan^3UY~tNe>-4j&SoV&ez1&ph^9&pB?pd&9$`tSDnLCdia{aLO-22L6$IL0RuX>8= zZ@fx0USs7oH>5${{-nhIUph~YGVI(r#n*P~*C|^z`B|zbG^@tyE}3_8yRO$Aj#csV zVgzlTgm>RK=(lP<+nEqE59#)X=pB~LvHuH>y)x$XO5bh#e$#ZDoy|@^!Vah_rOduR zWuteu`Wv$YxwTVzts;_UOm3KUs&wXscd>W%4$c>O81lVS>G-V*QG>E$%4LC%vac2L zu5U3Ymv45{)8JdUD~@e@L*4RFwv`_aeB8KF;-_HI+&4n)x4X4>Xnk6-V)Kb^A%}zg zwqI{X%@0y@$`Ls9;x|8I*(9TrIbhAb02nIe)HtS9-ryQr)@bk zZ>M#b;wQ&RrFl!l7`h(q(7B$%v-|tQ#j2^q!;#i>p{CaVisN|Bs2hC CWH5^W diff --git a/parameters/src/canary/resources/split.metadata b/parameters/src/canary/resources/split.metadata deleted file mode 100644 index b1d9624677..0000000000 --- a/parameters/src/canary/resources/split.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "5bf027bcf0476784edd3192c3c0731dbd65f955220ef3d6c060acc0e3d1a5555", - "prover_size": 75161428, - "verifier_checksum": "5eb3cea5fa953b36272b1a4f315df955253840acbb1ff900dd9e1126bb012437", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/split.verifier b/parameters/src/canary/resources/split.verifier deleted file mode 100644 index ccdd8a09705e929d3a3c597aee4ac481883f8285..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1NLh0}whBN*m@df(5pBLFldO5Sj;~jA2Wo%k=%fBowWROg~s&kk7s$SgNwT zXHKR6XCLETrAuGscb+iWP^{nI&ttV^Po`pn)i=$rZ!ZLRAC}vbn_9)U<-WBWOSj9v zzQ;?dQ}`1SdvqpWH2Kh&(b4sMZp;C_dPe@M-_BpDo8z>{rpq?S;=w8AE&EMe%9-ys zFA@y6-zNG$;DS)?r=(Ns|L3nby!uiakP~D ztA#nANzApGzR@VEAzE|k?*DVy)EU>im!4W&&w1>@1eF~rUWp5TC?`$(*>S`;HDl(H zWiL;8pR}93!yu(-e@FcsgZ5QP3^^Uk&#%hzU6rx=*<<#2Z?}VtVU648*=^%mv0!J` zBj$_StTlOpt_wWKjF2+h7~a7+>+6dXE3}njvl>pw9l6ziYRQUN^_V3bljO3sFYM^v z`1@B;!NGQhgDE!4MH>(MoMHI)g7Zmx<+XCZwys!9+g9^~UUQrJrQa{ftS_&iWN38THjkylKPLstjP65!_Tssxs#tnadjVE|88H=Kc;;GKDR85T5={XJ?Qr7 z+(X+=mv;T$_se-AWNMm~zkO#A&dvTYyX$K;p1)+D=*+I1cX^e*b!Xqyg=Q;? z?<$Gu+wJ=C@$BSg&#mHeoee=#7kruM@j_rj;H*VaHdm4plSS@Z#_XPcip}oFZ9$W5 zC)sVUaUA@0YpJC90^^xB4M!BVedapiS~X+!`9^c1Gnq2{oo^LDl&I zojNaj&OM1}-!JfPmW*>_bCvMd#T$0l)k3|bxG|w!Z`+60W%qTi&#Y-T^*DcK5zD6Q3;+0snTc!{zxAgs_RPe_ z$yfF;FK2I^Z|E(-P`YB#2w;oz+! zOl8x1OLolHoxiBzW5fBM?-k?qSp)5Sjyg&hpIIRCf$hY)ymtpP*glj=CiXHx(i;HR C!!xS@ diff --git a/parameters/src/canary/resources/transfer_private_to_public.metadata b/parameters/src/canary/resources/transfer_private_to_public.metadata deleted file mode 100644 index 0a224a18dc..0000000000 --- a/parameters/src/canary/resources/transfer_private_to_public.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "c96d674e52911b0a8b2d0c6d07e5499b90783d8b8e6623d348fa33547835d64b", - "prover_size": 66299476, - "verifier_checksum": "38d0157f70c16badcfd472dd0c045f754b4ac6572e62be48a0053aaa1157f846", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/transfer_private_to_public.verifier b/parameters/src/canary/resources/transfer_private_to_public.verifier deleted file mode 100644 index 5903d51a145d4f555c588bb13a62b7e81490fb6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1R(eDG+)hls+uO2o~UShR_oCAo4sAih(hBw}oE)mxr#Q9QO(nkF64m`66{B zXr0+jA8{Y`Q`=*_JWh-KNZDKO`sIG*w@Mj?PW7jmJF`P)JurV0v|BJvtLQiLh5F8U zQO&E*yyjYSDD!r|Rq>_9bsML%f2_4L`_d2_$N#1FhYZ()D~j^Rqa}i*7Hj_h6;{{g zEPZHI#H!V|-}HQs{XLO$npeB+8Ab`U#^{rYH}5bOa;5*Bp77h?7DsN)MrWJd;aOAH z-~6*Kv~bp)t5xQ=f)D)raFa{3&G|XQA=4YhUv~bCU)hnX)$@#V#)K}PC+kD&KgqwA zJT1G)!uI{Au$O{7%qOOvZmsZJq{MjbRJG)3<{v7YQ^krNPrPcvzHo(#KMfx&-774F%AWm_AT+0X5}m7w$gi1za%X0Fpztq!beyY~KN^XV;8;*P89 zT&I+-+2+1?<;6`V7Ye?H)-`mOJPxuAIQi-Arhxzc{jU!ysfN7OnY??x#2$%73Gsp= z=e$+sOji#RFU*MDcVhDShA%&IM6LTKnMB+@`kJ#oSZc|JriQG(pr;oen$0-!JFsca zQm(E{`%v~z+Sz-huQ@Wv<@r|Z`WAR@n{lJvUOtPZ?dq3prd;^;y;3cgHMjmvjHl;a z?#`W;kDYT;SC?N`#K>~y!em!2?;yE*{13NtckE8HtFU0$R&_0L_Lo1`%&v*tJqAf= E0E3x0bpQYW diff --git a/parameters/src/canary/resources/transfer_public.metadata b/parameters/src/canary/resources/transfer_public.metadata deleted file mode 100644 index 3482a6c295..0000000000 --- a/parameters/src/canary/resources/transfer_public.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "f143e4c90526e0f08a43daa8977323177587778602b9a3dbb0426908eabe7874", - "prover_size": 28913482, - "verifier_checksum": "12da9fc8d7284177cc6bcdfb6c8b48217a11a6c70767e6e71f17ffb4e69f17ee", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/transfer_public.verifier b/parameters/src/canary/resources/transfer_public.verifier deleted file mode 100644 index 8008e2d53bd15b19cd611eb17b6150308a1c2791..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1NKa0|>1Kr9<){{PHOfTEh`S^FSyDRlcum+v99zB(*w7Y&oYV_DC$wHF1^e zVWH{UGI%pp8aZwrl&bi=_35$0zXNVbC^K%+KHuEJaP88MM=4t!W|wc5^3?OM)nDr^ zT%`42vSqz_qxfJ3ZM^yEY4B3||9 zcM2tkUzYyO75~fUea*7yw}nbr^1M(u=M;tRw7`xVHsS055>Stwy?e(z|u%!b27 ziF4+8EWNQ;W!ZaXMMjr-|CdU=WQ*!yd<{)K|!Tbo5#>!DEB+l=xZGa&-c< zwim8(*UoEOb-W=o1RrIYd?{Jtp=TGtUm^FSzumcGBXxAJv2D2C}vFnJc(yDPq4*t1wV z=#TcdL$~*BjkM$I-tgOC$}vH=Tjo1TvlvY@FWS90eK_H_a<-%oN6(XKrD}&uDpfdN zNPpKC)VjL2U+S^bhWNt)eoy2%8|EEiXkDPQ@X+Um8n-Fg z{o1V3Ki-AyQ{)nTG4u7UuYdlnt8QZO+w)zv$nz(2U%9Qr(it!2wu>K_`S{}cO-~ov zt==X6eczA6kL}cCf0mu!U8Bl+&a8p&UC!K-4J&5qAD6gcdQn-#-5@IY#Y)>-W&gd- zyim91&B>n-mpZ3!X{d?)9WkYu3?I7R2>er9%+fPaVzNX{zxzDHGUb>xwrNu}Zp+rN z-TK*9v0Y||snpRwIvPAvHC8dCEfO&N%jzgFIW8|-Kwt6Z#0Tr$tIjHJeXHC!gY`*u z>Y06h%Ck7~i#6RDE}cxh-_TaR$e>vv>zDT9Wy`|%PtA;GeVO>@>SdoF{D!|*ov~fg zy8m5%O4)3|x$bNdytZi!7cP~)_x#U%e3QJoAjSC+muOP$z?+K6ArNsZtGUHI~Uwd0Ql-I_3Q|X6yM;R4Xf0y%a;M@>x z*wFLiRzMWTf`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ata deleted file mode 100644 index ae05372c44..0000000000 --- a/parameters/src/canary/resources/unbond_public.metadata +++ /dev/null @@ -1,6 +0,0 @@ -{ - "prover_checksum": "8f5781539f118a849fc1241777dd14489502d64f039ffc363ffbe6605ba330d2", - "prover_size": 17414380, - "verifier_checksum": "ac8c29499b4026ded24b2cfa0fff77b5b1619aacf4fe1a9ff487eda9fbd63316", - "verifier_size": 673 -} \ No newline at end of file diff --git a/parameters/src/canary/resources/unbond_public.verifier b/parameters/src/canary/resources/unbond_public.verifier deleted file mode 100644 index bd7e1af6b7f13bfbe2ce6b9c9578c47597f35960..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZP+V1NKy9SCg*rI#c?_^0b3bgvDB=7CTQZIjjq7)H-J$;YuOcacR;ewt&x!JCQO zZ+Tk%x_)+s_KN+BOn1*+U#xR1IA>G6i$}u-*(ZF5>jb_3-%@_J*!g1h?@K&vW^N{j zS!Z@>d$lC2ejI&cLXCjkFNdNS_UFvp4OMLVTua#}$~qrND)}c}+~s(Uf$7%97V*aq zU;XzgJ=Y-_nWcelv?h|JDHSACm0 z*T;4z?|hd~<~x;sBdzkJu@2*(yg-)+U)cIyDBt@cx8SL(vq<4g{g7{8-{njGtG?>3 zd;7TkQ9XNg>-HToe{zkr8+dFkH`kboRLrm}+PU3QQ`yn@aDAZ2?j3BRYI6jCEzLi; z>HfWsOEX^-I`<1ayW-XOVS;kO%5Cm)GXmD|zBpPCxp+@>=BCn35-w3f0o&T2hMvhd zx;o*A<^nnKHGZp`H5&i>v{W58W9(gV^0k=XuPwjKqc56;eJNh{ks)+RK(in=B`0VzgxD2Z#REePQ}N8F|wuuJ_S9 zsoXp(W?ox)&|Jn9*K0qYv7h|+uKkjv?oEFber(JBFE``u#L&AzEC)~6%-wzMPvqfG zRX3VyugAK}9Aof}4Yu~>zy6_f&a$E;EpeO7Qw8>i3e$GH6SqCA6KB`>#uk#$0J82d A>;M1& diff --git a/parameters/src/lib.rs b/parameters/src/lib.rs index 02ed021cf3..221b9c2754 100644 --- a/parameters/src/lib.rs +++ b/parameters/src/lib.rs @@ -30,8 +30,6 @@ pub mod macros; pub mod errors; pub use errors::*; -pub mod canary; - pub mod mainnet; pub mod testnet; diff --git a/synthesizer/src/vm/helpers/macros.rs b/synthesizer/src/vm/helpers/macros.rs index 1859ec2934..3b002f09a5 100644 --- a/synthesizer/src/vm/helpers/macros.rs +++ b/synthesizer/src/vm/helpers/macros.rs @@ -66,10 +66,6 @@ macro_rules! convert { // Process the logic. $logic!(console::network::TestnetV0, circuit::AleoTestnetV0) } - console::network::CanaryV0::ID => { - // Process the logic. - $logic!(console::network::CanaryV0, circuit::AleoCanaryV0) - } _ => bail!("Unsupported VM configuration for network: {}", N::ID), } }}; @@ -97,14 +93,6 @@ macro_rules! process { // Process the logic. $logic!(process.read(), console::network::TestnetV0, circuit::AleoTestnetV0) } - console::network::CanaryV0::ID => { - // Cast the process. - let process = (&$self.process as &dyn std::any::Any) - .downcast_ref::>>>() - .ok_or_else(|| anyhow!("Failed to downcast {}", stringify!($self.process)))?; - // Process the logic. - $logic!(process.read(), console::network::CanaryV0, circuit::AleoCanaryV0) - } _ => bail!("Unsupported VM configuration for network: {}", N::ID), } }}; From 1816887d0093560381158c89504607d537df1355 Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 20:27:13 -0400 Subject: [PATCH 28/32] Revert "Merge pull request #2452 from AleoNet/only_abort_deploys_early" This reverts commit f6ace919c483b599570256bab43d87dd8f7c7756, reversing changes made to 9d956ddf516890c84aaf619aa4e79fb34b9a1242. --- ledger/Cargo.toml | 4 - ledger/src/tests.rs | 311 +++++++-------------------------- synthesizer/src/vm/finalize.rs | 14 +- 3 files changed, 73 insertions(+), 256 deletions(-) diff --git a/ledger/Cargo.toml b/ledger/Cargo.toml index 709a32abe0..e75f892a86 100644 --- a/ledger/Cargo.toml +++ b/ledger/Cargo.toml @@ -149,10 +149,6 @@ package = "snarkvm-ledger-block" path = "./block" features = [ "test" ] -[dev-dependencies.ledger-test-helpers] -package = "snarkvm-ledger-test-helpers" -path = "./test-helpers" - [dev-dependencies.serde_json] version = "1.0" features = [ "preserve_order" ] diff --git a/ledger/src/tests.rs b/ledger/src/tests.rs index ef31b48a05..1dd5e6eadd 100644 --- a/ledger/src/tests.rs +++ b/ledger/src/tests.rs @@ -25,7 +25,7 @@ use console::{ program::{Entry, Identifier, Literal, Plaintext, ProgramID, Value}, types::U16, }; -use ledger_block::{ConfirmedTransaction, Execution, Ratify, Rejected, Transaction}; +use ledger_block::{ConfirmedTransaction, Ratify, Rejected, Transaction}; use ledger_committee::{Committee, MIN_VALIDATOR_STAKE}; use ledger_store::{helpers::memory::ConsensusMemory, ConsensusStore}; use synthesizer::{program::Program, vm::VM, Stack}; @@ -749,107 +749,56 @@ fn test_execute_duplicate_input_ids() { // Fetch the unspent records. let records = find_records(); - let record_execution = records[0].clone(); - let record_deployment = records[1].clone(); + let record_1 = records[0].clone(); - // Prepare a transfer that spends a record. + // Prepare a transfer that spends the record. let inputs = [ - Value::Record(record_execution.clone()), + Value::Record(record_1.clone()), Value::from_str(&format!("{address}")).unwrap(), Value::from_str("100u64").unwrap(), ]; + let transfer_1 = ledger + .vm + .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.into_iter(), None, 0, None, rng) + .unwrap(); + let transfer_1_id = transfer_1.id(); - let num_duplicate_deployments = 3; - let mut executions = Vec::with_capacity(num_duplicate_deployments + 1); - let mut execution_ids = Vec::with_capacity(num_duplicate_deployments + 1); - let mut deployments = Vec::with_capacity(num_duplicate_deployments); - let mut deployment_ids = Vec::with_capacity(num_duplicate_deployments); - - // Create Executions and Deployments, spending the same record. - for i in 0..num_duplicate_deployments { - // Execute. - let execution = ledger - .vm - .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.clone().iter(), None, 0, None, rng) - .unwrap(); - execution_ids.push(execution.id()); - executions.push(execution); - // Deploy. - let program_id = ProgramID::::from_str(&format!("dummy_program_{i}.aleo")).unwrap(); - let program = Program::::from_str(&format!( - " -program {program_id}; -function foo: - input r0 as u8.private; - async foo r0 into r1; - output r1 as {program_id}/foo.future; -finalize foo: - input r0 as u8.public; - add r0 r0 into r1;", - )) + // Prepare a transfer that attempts to spend the same record. + let inputs = [ + Value::Record(record_1.clone()), + Value::from_str(&format!("{address}")).unwrap(), + Value::from_str("1000u64").unwrap(), + ]; + let transfer_2 = ledger + .vm + .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.into_iter(), None, 0, None, rng) .unwrap(); - let deployment = - ledger.vm.deploy(&private_key, &program, Some(record_deployment.clone()), 0, None, rng).unwrap(); - deployment_ids.push(deployment.id()); - deployments.push(deployment); - } + let transfer_2_id = transfer_2.id(); - // Create one more execution which spends the record as a fee. + // Prepare a transfer that attempts to spend the same record in the fee. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("100u64").unwrap()]; - let execution = ledger + let transfer_3 = ledger .vm .execute( &private_key, ("credits.aleo", "transfer_public"), - inputs.clone().iter(), - Some(record_execution.clone()), + inputs.into_iter(), + Some(record_1.clone()), 0, None, rng, ) .unwrap(); - execution_ids.push(execution.id()); - executions.push(execution); - - // Select a transaction to mutate by a malicious validator. - let transaction_to_mutate = executions.last().unwrap().clone(); - - // Create a mutated execution which adds one transition, resulting in a different transaction id. - // This simulates a malicious validator re-using execution content. - let execution_to_mutate = transaction_to_mutate.execution().unwrap(); - // Sample a transition. - let sample = ledger_test_helpers::sample_transition(rng); - // Extend the transitions. - let mutated_transitions = std::iter::once(sample).chain(execution_to_mutate.transitions().cloned()); - // Create a mutated execution. - let mutated_execution = Execution::from( - mutated_transitions, - execution_to_mutate.global_state_root(), - execution_to_mutate.proof().cloned(), - ) - .unwrap(); - // Create a new fee for the execution. - let fee_authorization = ledger + let transfer_3_id = transfer_3.id(); + + // Prepare a transfer that attempts to spend the same record for the subsequent block. + let inputs = + [Value::Record(record_1), Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; + let transfer_4 = ledger .vm - .authorize_fee_public( - &private_key, - *executions.last().unwrap().fee_amount().unwrap(), - 0, - mutated_execution.to_execution_id().unwrap(), - rng, - ) + .execute(&private_key, ("credits.aleo", "transfer_private"), inputs.into_iter(), None, 0, None, rng) .unwrap(); - let fee = ledger.vm.execute_fee_authorization(fee_authorization, None, rng).unwrap(); - // Create a mutated transaction. - let mutated_transaction = Transaction::from_execution(mutated_execution, Some(fee)).unwrap(); - execution_ids.push(mutated_transaction.id()); - executions.push(mutated_transaction); - - // Create a mutated execution which just takes the fee transition, resulting in a different transaction id. - // This simulates a malicious validator transforming a transaction to a fee transaction. - let mutated_transaction = Transaction::from_fee(transaction_to_mutate.fee_transition().unwrap()).unwrap(); - execution_ids.push(mutated_transaction.id()); - executions.push(mutated_transaction); + let transfer_4_id = transfer_4.id(); // Create a block. let block = ledger @@ -857,15 +806,7 @@ finalize foo: &private_key, vec![], vec![], - vec![ - executions.pop().unwrap(), - executions.pop().unwrap(), - executions.pop().unwrap(), - executions.pop().unwrap(), - executions.pop().unwrap(), - deployments.pop().unwrap(), - deployments.pop().unwrap(), - ], + vec![transfer_1, transfer_2, transfer_3], rng, ) .unwrap(); @@ -877,45 +818,27 @@ finalize foo: ledger.advance_to_next_block(&block).unwrap(); // Enforce that the block transactions were correct. - assert_eq!(block.transactions().num_accepted(), 2); - println!("execution_ids: {:?}", execution_ids); - assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&execution_ids[2], &deployment_ids[2]]); - assert_eq!(block.aborted_transaction_ids(), &vec![ - execution_ids[5], - execution_ids[4], - execution_ids[3], - execution_ids[1], - deployment_ids[1] - ]); - - // Ensure that verification was not run on aborted deployments. - let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); + assert_eq!(block.transactions().num_accepted(), 1); + assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_1_id]); + assert_eq!(block.aborted_transaction_ids(), &vec![transfer_2_id, transfer_3_id]); - assert!(partially_verified_transaction.contains(&execution_ids[2])); - assert!(partially_verified_transaction.contains(&deployment_ids[2])); - assert!(!partially_verified_transaction.contains(&execution_ids[1])); - assert!(!partially_verified_transaction.contains(&deployment_ids[1])); - assert!(!partially_verified_transaction.contains(&execution_ids[3])); - assert!(!partially_verified_transaction.contains(&execution_ids[4])); // Verification was run, but the execution was invalid. - assert!(!partially_verified_transaction.contains(&execution_ids[5])); + // Ensure that verification was not run on aborted transactions. + let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); + assert!(partially_verified_transaction.contains(&transfer_1_id)); + assert!(!partially_verified_transaction.contains(&transfer_2_id)); + assert!(!partially_verified_transaction.contains(&transfer_3_id)); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; - let transfer = ledger + let transfer_5 = ledger .vm .execute(&private_key, ("credits.aleo", "transfer_public"), inputs.into_iter(), None, 0, None, rng) .unwrap(); - let transfer_id = transfer.id(); + let transfer_5_id = transfer_5.id(); // Create a block. let block = ledger - .prepare_advance_to_next_beacon_block( - &private_key, - vec![], - vec![], - vec![executions.pop().unwrap(), deployments.pop().unwrap(), transfer], - rng, - ) + .prepare_advance_to_next_beacon_block(&private_key, vec![], vec![], vec![transfer_4, transfer_5], rng) .unwrap(); // Check that the next block is valid. @@ -926,14 +849,13 @@ finalize foo: // Enforce that the block transactions were correct. assert_eq!(block.transactions().num_accepted(), 1); - assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_id]); - assert_eq!(block.aborted_transaction_ids(), &vec![execution_ids[0], deployment_ids[0]]); + assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_5_id]); + assert_eq!(block.aborted_transaction_ids(), &vec![transfer_4_id]); - // Ensure that verification was not run on transactions aborted in a previous block. + // Ensure that verification was not run on aborted transactions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); - assert!(partially_verified_transaction.contains(&transfer_id)); - assert!(!partially_verified_transaction.contains(&execution_ids[0])); - assert!(!partially_verified_transaction.contains(&deployment_ids[0])); + assert!(partially_verified_transaction.contains(&transfer_5_id)); + assert!(!partially_verified_transaction.contains(&transfer_4_id)); } #[test] @@ -941,8 +863,7 @@ fn test_execute_duplicate_output_ids() { let rng = &mut TestRng::default(); // Initialize the test environment. - let crate::test_helpers::TestEnv { ledger, private_key, view_key, address, .. } = - crate::test_helpers::sample_test_env(rng); + let crate::test_helpers::TestEnv { ledger, private_key, address, .. } = crate::test_helpers::sample_test_env(rng); // Deploy a test program to the ledger. let program = Program::::from_str( @@ -975,25 +896,8 @@ function create_duplicate_record: // Add the block to the ledger. ledger.advance_to_next_block(&block).unwrap(); - // A helper function to find records. - let find_records = || { - let microcredits = Identifier::from_str("microcredits").unwrap(); - ledger - .find_records(&view_key, RecordsFilter::SlowUnspent(private_key)) - .unwrap() - .filter(|(_, record)| match record.data().get(µcredits) { - Some(Entry::Private(Plaintext::Literal(Literal::U64(amount), _))) => !amount.is_zero(), - _ => false, - }) - .collect::>() - }; - - // Fetch the unspent records. - let records = find_records(); - let record_1 = records[0].clone(); - - // Create an execution with different transition ids, but with a fixed output record (output ID). - let mut create_execution_with_duplicate_output_id = |x: u64| -> Transaction { + // Create a transaction with different transition ids, but with a fixed output record (output ID). + let mut create_transaction_with_duplicate_output_id = |x: u64| -> Transaction { // Use a fixed seed RNG. let fixed_rng = &mut TestRng::from_seed(1); @@ -1030,61 +934,16 @@ function create_duplicate_record: Transaction::from_execution(execution, Some(fee)).unwrap() }; - // Create an deployment with different transition ids, but with a fixed output record (output ID). - let create_deployment_with_duplicate_output_id = |x: u64| -> Transaction { - // Use a fixed seed RNG. - let fixed_rng = &mut TestRng::from_seed(1); - - // Deploy a test program to the ledger. - let program = Program::::from_str(&format!( - " -program dummy_program_{x}.aleo; - -record dummy_program: - owner as address.private; - rand_var as u64.private; - -function create_duplicate_record: - input r0 as u64.private; - cast self.caller 1u64 into r1 as dummy_program.record; - output r1 as dummy_program.record;" - )) - .unwrap(); - - // Create a transaction with a fixed rng. - let transaction = ledger.vm.deploy(&private_key, &program, None, 0, None, fixed_rng).unwrap(); - - // Extract the deployment and owner. - let deployment = transaction.deployment().unwrap().clone(); - let owner = *transaction.owner().unwrap(); - - // Create a new fee for the execution. - let fee_authorization = ledger - .vm - .authorize_fee_private( - &private_key, - record_1.clone(), - *transaction.fee_amount().unwrap(), - 0, - deployment.to_deployment_id().unwrap(), - fixed_rng, - ) - .unwrap(); - let fee = ledger.vm.execute_fee_authorization(fee_authorization, None, fixed_rng).unwrap(); - - Transaction::from_deployment(owner, deployment, fee).unwrap() - }; - // Create the first transfer. - let transfer_1 = create_execution_with_duplicate_output_id(1); + let transfer_1 = create_transaction_with_duplicate_output_id(1); let transfer_1_id = transfer_1.id(); // Create a second transfer with the same output id. - let transfer_2 = create_execution_with_duplicate_output_id(2); + let transfer_2 = create_transaction_with_duplicate_output_id(2); let transfer_2_id = transfer_2.id(); // Create a third transfer with the same output id. - let transfer_3 = create_execution_with_duplicate_output_id(3); + let transfer_3 = create_transaction_with_duplicate_output_id(3); let transfer_3_id = transfer_3.id(); // Ensure that each transaction has a duplicate output id. @@ -1094,34 +953,9 @@ function create_duplicate_record: assert_eq!(tx_1_output_id, tx_2_output_id); assert_eq!(tx_1_output_id, tx_3_output_id); - // Create the first deployment. - let deployment_1 = create_deployment_with_duplicate_output_id(1); - let deployment_1_id = deployment_1.id(); - - // Create a second deployment with the same output id. - let deployment_2 = create_deployment_with_duplicate_output_id(2); - let deployment_2_id = deployment_2.id(); - - // Create a third deployment with the same output id. - let deployment_3 = create_deployment_with_duplicate_output_id(3); - let deployment_3_id = deployment_3.id(); - - // Ensure that each transaction has a duplicate output id. - let deployment_1_output_id = deployment_1.output_ids().next().unwrap(); - let deployment_2_output_id = deployment_2.output_ids().next().unwrap(); - let deployment_3_output_id = deployment_3.output_ids().next().unwrap(); - assert_eq!(deployment_1_output_id, deployment_2_output_id); - assert_eq!(deployment_1_output_id, deployment_3_output_id); - // Create a block. let block = ledger - .prepare_advance_to_next_beacon_block( - &private_key, - vec![], - vec![], - vec![transfer_1, transfer_2, deployment_1, deployment_2], - rng, - ) + .prepare_advance_to_next_beacon_block(&private_key, vec![], vec![], vec![transfer_1, transfer_2], rng) .unwrap(); // Check that the next block is valid. @@ -1131,16 +965,14 @@ function create_duplicate_record: ledger.advance_to_next_block(&block).unwrap(); // Enforce that the block transactions were correct. - assert_eq!(block.transactions().num_accepted(), 2); - assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_1_id, &deployment_1_id]); - assert_eq!(block.aborted_transaction_ids(), &vec![transfer_2_id, deployment_2_id]); + assert_eq!(block.transactions().num_accepted(), 1); + assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_1_id]); + assert_eq!(block.aborted_transaction_ids(), &vec![transfer_2_id]); - // Ensure that verification was not run on aborted deployments. + // Ensure that verification was not run on aborted transactions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_1_id)); - assert!(partially_verified_transaction.contains(&deployment_1_id)); assert!(!partially_verified_transaction.contains(&transfer_2_id)); - assert!(!partially_verified_transaction.contains(&deployment_2_id)); // Prepare a transfer that will succeed for the subsequent block. let inputs = [Value::from_str(&format!("{address}")).unwrap(), Value::from_str("1000u64").unwrap()]; @@ -1152,13 +984,7 @@ function create_duplicate_record: // Create a block. let block = ledger - .prepare_advance_to_next_beacon_block( - &private_key, - vec![], - vec![], - vec![transfer_3, transfer_4, deployment_3], - rng, - ) + .prepare_advance_to_next_beacon_block(&private_key, vec![], vec![], vec![transfer_3, transfer_4], rng) .unwrap(); // Check that the next block is valid. @@ -1170,13 +996,12 @@ function create_duplicate_record: // Enforce that the block transactions were correct. assert_eq!(block.transactions().num_accepted(), 1); assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_4_id]); - assert_eq!(block.aborted_transaction_ids(), &vec![transfer_3_id, deployment_3_id]); + assert_eq!(block.aborted_transaction_ids(), &vec![transfer_3_id]); - // Ensure that verification was not run on transactions aborted in a previous block. + // Ensure that verification was not run on aborted transactions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_4_id)); assert!(!partially_verified_transaction.contains(&transfer_3_id)); - assert!(!partially_verified_transaction.contains(&deployment_3_id)); } #[test] @@ -1212,9 +1037,6 @@ function empty_function: ledger.advance_to_next_block(&block).unwrap(); // Create a transaction with different transaction IDs, but with a fixed transition ID. - // NOTE: there's no use creating deployments with duplicate (fee) transition ids, - // as this is only possible if they have duplicate programs, duplicate transaction_ids, - // which will not abort but fail on check_next_block. let mut create_transaction_with_duplicate_transition_id = || -> Transaction { // Use a fixed seed RNG. let fixed_rng = &mut TestRng::from_seed(1); @@ -1322,7 +1144,7 @@ function empty_function: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_transaction_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_3_id]); - // Ensure that verification was not run on transactions aborted in a previous block. + // Ensure that verification was not run on aborted transactions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_transaction_id)); assert!(!partially_verified_transaction.contains(&transaction_3_id)); @@ -1363,10 +1185,7 @@ function simple_output: // Add the block to the ledger. ledger.advance_to_next_block(&block).unwrap(); - // Create a transaction with different transaction ids, but with a duplicate TPK. - // NOTE: there's no use creating deployments with duplicate (fee) TPKs, - // as this is only possible if they have duplicate programs, duplicate transaction_ids, - // which will not abort but fail on check_next_block. + // Create a transaction with different transaction ids, but with a TPK. let mut create_transaction_with_duplicate_tpk = |function: &str| -> Transaction { // Use a fixed seed RNG. let fixed_rng = &mut TestRng::from_seed(1); @@ -1472,7 +1291,7 @@ function simple_output: assert_eq!(block.transactions().transaction_ids().collect::>(), vec![&transfer_transaction_id]); assert_eq!(block.aborted_transaction_ids(), &vec![transaction_3_id]); - // Ensure that verification was not run on transactions aborted in a previous block. + // Ensure that verification was not run on aborted transactions. let partially_verified_transaction = ledger.vm().partially_verified_transactions().read().clone(); assert!(partially_verified_transaction.contains(&transfer_transaction_id)); assert!(!partially_verified_transaction.contains(&transaction_3_id)); diff --git a/synthesizer/src/vm/finalize.rs b/synthesizer/src/vm/finalize.rs index bc67e22a8b..a16dbc4af8 100644 --- a/synthesizer/src/vm/finalize.rs +++ b/synthesizer/src/vm/finalize.rs @@ -855,12 +855,6 @@ impl> VM { // Abort the transactions that are have duplicates or are invalid. This will prevent the VM from performing // verification on transactions that would have been aborted in `VM::atomic_speculate`. for transaction in transactions.iter() { - // Abort the transaction early if it is a fee transaction. - if transaction.is_fee() { - aborted_transactions.push((*transaction, "Fee transactions are not allowed in speculate".to_string())); - continue; - } - // Determine if the transaction should be aborted. match self.should_abort_transaction( transaction, @@ -906,6 +900,14 @@ impl> VM { // Verify the transactions and collect the error message if there is one. let (valid, invalid): (Vec<_>, Vec<_>) = cfg_into_iter!(transactions).zip(rngs).partition_map(|(transaction, mut rng)| { + // Abort the transaction if it is a fee transaction. + if transaction.is_fee() { + return Either::Right(( + *transaction, + "Fee transactions are not allowed in speculate".to_string(), + )); + } + // Verify the transaction. match self.check_transaction(transaction, None, &mut rng) { // If the transaction is valid, add it to the list of valid transactions. From 1f9aef271dbd78a39e866c2c1ed5ccdab7a4884a Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 20:27:25 -0400 Subject: [PATCH 29/32] Revert "Merge pull request #2450 from ljedrz/feat/cfg_sorted_by" This reverts commit 9d956ddf516890c84aaf619aa4e79fb34b9a1242, reversing changes made to dbc101b21a01637f73b0433f56f27572a58b21f4. --- utilities/src/parallel.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/utilities/src/parallel.rs b/utilities/src/parallel.rs index 1a73bfce03..be2520f7ef 100644 --- a/utilities/src/parallel.rs +++ b/utilities/src/parallel.rs @@ -292,19 +292,3 @@ macro_rules! cfg_sort_by_cached_key { $self.par_sort_by_cached_key($closure); }}; } - -/// Returns a sorted, by-value iterator for the given IndexMap/IndexSet -#[macro_export] -macro_rules! cfg_sorted_by { - ($self: expr, $closure: expr) => {{ - #[cfg(feature = "serial")] - { - $self.sorted_by($closure) - } - - #[cfg(not(feature = "serial"))] - { - $self.par_sorted_by($closure) - } - }}; -} From 10ec10d43a50c8722c2a37215155131b96719320 Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 20:29:24 -0400 Subject: [PATCH 30/32] Revert "Merge pull request #2459 from ljedrz/refactor/futureproof_literals" This reverts commit dbc101b21a01637f73b0433f56f27572a58b21f4, reversing changes made to a4712815859f4754014328ac9f6a2e68dd604302. --- .../src/data_types/literal_type/mod.rs | 2 +- .../src/data_types/literal_type/parse.rs | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/console/program/src/data_types/literal_type/mod.rs b/console/program/src/data_types/literal_type/mod.rs index 4fdcfd0692..0f0dea6e75 100644 --- a/console/program/src/data_types/literal_type/mod.rs +++ b/console/program/src/data_types/literal_type/mod.rs @@ -67,7 +67,7 @@ pub enum LiteralType { impl LiteralType { /// Returns the literal type name. - pub const fn type_name(&self) -> &str { + pub fn type_name(&self) -> &str { match self { Self::Address => "address", Self::Boolean => "boolean", diff --git a/console/program/src/data_types/literal_type/parse.rs b/console/program/src/data_types/literal_type/parse.rs index a414e2c3ac..806eee0dc2 100644 --- a/console/program/src/data_types/literal_type/parse.rs +++ b/console/program/src/data_types/literal_type/parse.rs @@ -20,23 +20,23 @@ impl Parser for LiteralType { fn parse(string: &str) -> ParserResult { // Parse the type from the string. alt(( - map(tag(Self::Address.type_name()), |_| Self::Address), - map(tag(Self::Boolean.type_name()), |_| Self::Boolean), - map(tag(Self::Field.type_name()), |_| Self::Field), - map(tag(Self::Group.type_name()), |_| Self::Group), - map(tag(Self::I8.type_name()), |_| Self::I8), - map(tag(Self::I16.type_name()), |_| Self::I16), - map(tag(Self::I32.type_name()), |_| Self::I32), - map(tag(Self::I64.type_name()), |_| Self::I64), - map(tag(Self::I128.type_name()), |_| Self::I128), - map(tag(Self::U8.type_name()), |_| Self::U8), - map(tag(Self::U16.type_name()), |_| Self::U16), - map(tag(Self::U32.type_name()), |_| Self::U32), - map(tag(Self::U64.type_name()), |_| Self::U64), - map(tag(Self::U128.type_name()), |_| Self::U128), - map(tag(Self::Scalar.type_name()), |_| Self::Scalar), - map(tag(Self::Signature.type_name()), |_| Self::Signature), - map(tag(Self::String.type_name()), |_| Self::String), + map(tag("address"), |_| Self::Address), + map(tag("boolean"), |_| Self::Boolean), + map(tag("field"), |_| Self::Field), + map(tag("group"), |_| Self::Group), + map(tag("i8"), |_| Self::I8), + map(tag("i16"), |_| Self::I16), + map(tag("i32"), |_| Self::I32), + map(tag("i64"), |_| Self::I64), + map(tag("i128"), |_| Self::I128), + map(tag("u8"), |_| Self::U8), + map(tag("u16"), |_| Self::U16), + map(tag("u32"), |_| Self::U32), + map(tag("u64"), |_| Self::U64), + map(tag("u128"), |_| Self::U128), + map(tag("scalar"), |_| Self::Scalar), + map(tag("signature"), |_| Self::Signature), + map(tag("string"), |_| Self::String), ))(string) } } From d85b49d6838ca3b0c2a1f6bf93a89078348fc30b Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 20:29:52 -0400 Subject: [PATCH 31/32] Revert "Merge pull request #2454 from ljedrz/perf/identifier_literal_type_parsing" This reverts commit a4712815859f4754014328ac9f6a2e68dd604302, reversing changes made to 757e5d5f50d5e11692f86e6e499e9630458af7e6. --- Cargo.lock | 21 ------------------- console/program/Cargo.toml | 3 --- console/program/src/data/identifier/parse.rs | 2 +- .../src/data_types/literal_type/mod.rs | 3 +-- 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ceff8f73c2..3697583dfc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -857,26 +857,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "enum-iterator" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c280b9e6b3ae19e152d8e31cf47f18389781e119d4013a2a2bb0180e5facc635" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" -dependencies = [ - "proc-macro2", - "quote 1.0.35", - "syn 2.0.48", -] - [[package]] name = "enum_index" version = "0.2.0" @@ -2932,7 +2912,6 @@ name = "snarkvm-console-program" version = "0.16.19" dependencies = [ "bincode", - "enum-iterator", "enum_index", "enum_index_derive", "indexmap 2.1.0", diff --git a/console/program/Cargo.toml b/console/program/Cargo.toml index 8f20c2f8ee..23df63249a 100644 --- a/console/program/Cargo.toml +++ b/console/program/Cargo.toml @@ -40,9 +40,6 @@ version = "0.2" [dependencies.enum_index_derive] version = "0.2" -[dependencies.enum-iterator] -version = "2.1" - [dependencies.indexmap] version = "2.0" diff --git a/console/program/src/data/identifier/parse.rs b/console/program/src/data/identifier/parse.rs index 1ab087141b..daf02185fb 100644 --- a/console/program/src/data/identifier/parse.rs +++ b/console/program/src/data/identifier/parse.rs @@ -54,7 +54,7 @@ impl FromStr for Identifier { // Ensure that the identifier is not a literal. ensure!( - !enum_iterator::all::().any(|lt| lt.type_name() == identifier), + crate::LiteralType::from_str(identifier).is_err(), "Identifier '{identifier}' is a reserved literal type" ); diff --git a/console/program/src/data_types/literal_type/mod.rs b/console/program/src/data_types/literal_type/mod.rs index 0f0dea6e75..d6ddf2f5a0 100644 --- a/console/program/src/data_types/literal_type/mod.rs +++ b/console/program/src/data_types/literal_type/mod.rs @@ -23,11 +23,10 @@ use snarkvm_console_network::prelude::*; use snarkvm_console_types::{prelude::*, Boolean}; use core::fmt::{self, Debug, Display}; -use enum_iterator::Sequence; use num_derive::FromPrimitive; use num_traits::FromPrimitive; -#[derive(Copy, Clone, PartialEq, Eq, Hash, FromPrimitive, Sequence)] +#[derive(Copy, Clone, PartialEq, Eq, Hash, FromPrimitive)] pub enum LiteralType { /// The Aleo address type. Address, From 1ce3cb33c797fbef5d86c42c71d23bf852bccdfd Mon Sep 17 00:00:00 2001 From: Fabiano Date: Thu, 23 May 2024 20:30:05 -0400 Subject: [PATCH 32/32] Revert "Merge pull request #2458 from ljedrz/perf/plaintext_bits_allocs" This reverts commit 757e5d5f50d5e11692f86e6e499e9630458af7e6, reversing changes made to 140ff26f87697c2e9d18212cce2cc831fc4b146a. --- circuit/program/src/data/plaintext/to_bits.rs | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/circuit/program/src/data/plaintext/to_bits.rs b/circuit/program/src/data/plaintext/to_bits.rs index aafec36c10..c2bea90341 100644 --- a/circuit/program/src/data/plaintext/to_bits.rs +++ b/circuit/program/src/data/plaintext/to_bits.rs @@ -23,12 +23,10 @@ impl ToBits for Plaintext { Self::Literal(literal, bits_le) => { // Compute the bits of the literal. let bits = bits_le.get_or_init(|| { - let mut bits_le = Vec::new(); - bits_le.extend([Boolean::constant(false), Boolean::constant(false)]); // Variant bit. + let mut bits_le = vec![Boolean::constant(false), Boolean::constant(false)]; // Variant bit. literal.variant().write_bits_le(&mut bits_le); literal.size_in_bits().write_bits_le(&mut bits_le); literal.write_bits_le(&mut bits_le); - bits_le.shrink_to_fit(); bits_le }); // Extend the vector with the bits of the literal. @@ -37,17 +35,15 @@ impl ToBits for Plaintext { Self::Struct(members, bits_le) => { // Compute the bits of the struct. let bits = bits_le.get_or_init(|| { - let mut bits_le = Vec::new(); - bits_le.extend([Boolean::constant(false), Boolean::constant(true)]); // Variant bit. + let mut bits_le = vec![Boolean::constant(false), Boolean::constant(true)]; // Variant bit. U8::constant(console::U8::new(members.len() as u8)).write_bits_le(&mut bits_le); for (identifier, value) in members { let value_bits = value.to_bits_le(); identifier.size_in_bits().write_bits_le(&mut bits_le); identifier.write_bits_le(&mut bits_le); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_le(&mut bits_le); - bits_le.extend(value_bits); + bits_le.extend_from_slice(&value_bits); } - bits_le.shrink_to_fit(); bits_le }); // Extend the vector with the bits of the struct. @@ -56,15 +52,13 @@ impl ToBits for Plaintext { Self::Array(elements, bits_le) => { // Compute the bits of the array. let bits = bits_le.get_or_init(|| { - let mut bits_le = Vec::new(); - bits_le.extend([Boolean::constant(true), Boolean::constant(false)]); // Variant bit. + let mut bits_le = vec![Boolean::constant(true), Boolean::constant(false)]; // Variant bit. U32::constant(console::U32::new(elements.len() as u32)).write_bits_le(&mut bits_le); for value in elements { let value_bits = value.to_bits_le(); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_le(&mut bits_le); bits_le.extend(value_bits); } - bits_le.shrink_to_fit(); bits_le }); // Extend the vector with the bits of the array. @@ -79,12 +73,10 @@ impl ToBits for Plaintext { Self::Literal(literal, bits_be) => { // Compute the bits of the literal. let bits = bits_be.get_or_init(|| { - let mut bits_be = Vec::new(); - bits_be.extend([Boolean::constant(false), Boolean::constant(false)]); // Variant bit. + let mut bits_be = vec![Boolean::constant(false), Boolean::constant(false)]; // Variant bit. literal.variant().write_bits_be(&mut bits_be); literal.size_in_bits().write_bits_be(&mut bits_be); literal.write_bits_be(&mut bits_be); - bits_be.shrink_to_fit(); bits_be }); // Extend the vector with the bits of the literal. @@ -93,17 +85,15 @@ impl ToBits for Plaintext { Self::Struct(members, bits_be) => { // Compute the bits of the struct. let bits = bits_be.get_or_init(|| { - let mut bits_be = Vec::new(); - bits_be.extend([Boolean::constant(false), Boolean::constant(true)]); // Variant bit. + let mut bits_be = vec![Boolean::constant(false), Boolean::constant(true)]; // Variant bit. U8::constant(console::U8::new(members.len() as u8)).write_bits_be(&mut bits_be); for (identifier, value) in members { let value_bits = value.to_bits_be(); identifier.size_in_bits().write_bits_be(&mut bits_be); identifier.write_bits_be(&mut bits_be); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_be(&mut bits_be); - bits_be.extend(value_bits); + bits_be.extend_from_slice(&value_bits); } - bits_be.shrink_to_fit(); bits_be }); // Extend the vector with the bits of the struct. @@ -112,15 +102,13 @@ impl ToBits for Plaintext { Self::Array(elements, bits_be) => { // Compute the bits of the array. let bits = bits_be.get_or_init(|| { - let mut bits_be = Vec::new(); - bits_be.extend([Boolean::constant(true), Boolean::constant(false)]); // Variant bit. + let mut bits_be = vec![Boolean::constant(true), Boolean::constant(false)]; // Variant bit. U32::constant(console::U32::new(elements.len() as u32)).write_bits_be(&mut bits_be); for value in elements { let value_bits = value.to_bits_be(); U16::constant(console::U16::new(value_bits.len() as u16)).write_bits_be(&mut bits_be); bits_be.extend(value_bits); } - bits_be.shrink_to_fit(); bits_be }); // Extend the vector with the bits of the array.