diff --git a/Cargo.lock b/Cargo.lock index 316ea59fb5..eac2aab068 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2491,7 +2491,7 @@ dependencies = [ [[package]] name = "snarkvm" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "snarkvm-algorithms", "snarkvm-dpc", @@ -2501,7 +2501,7 @@ dependencies = [ [[package]] name = "snarkvm-algorithms" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "anyhow", "blake2", @@ -2512,6 +2512,7 @@ dependencies = [ "hex", "itertools", "lazy_static", + "num_cpus", "once_cell", "rand", "rand_chacha", @@ -2531,7 +2532,7 @@ dependencies = [ [[package]] name = "snarkvm-curves" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "derivative", "rand", @@ -2545,7 +2546,7 @@ dependencies = [ [[package]] name = "snarkvm-derives" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "proc-macro-crate", "proc-macro-error", @@ -2557,7 +2558,7 @@ dependencies = [ [[package]] name = "snarkvm-dpc" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "anyhow", "base58", @@ -2589,11 +2590,12 @@ dependencies = [ [[package]] name = "snarkvm-fields" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "anyhow", "derivative", "rand", + "rayon", "serde", "snarkvm-utilities", "thiserror", @@ -2602,7 +2604,7 @@ dependencies = [ [[package]] name = "snarkvm-gadgets" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "anyhow", "derivative", @@ -2622,7 +2624,7 @@ dependencies = [ [[package]] name = "snarkvm-marlin" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "bincode", "blake2", @@ -2648,7 +2650,7 @@ dependencies = [ [[package]] name = "snarkvm-parameters" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "aleo-std", "anyhow", @@ -2665,12 +2667,15 @@ dependencies = [ [[package]] name = "snarkvm-polycommit" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "derivative", "digest 0.9.0", "hashbrown", + "itertools", + "rand", "rand_core", + "rayon", "snarkvm-algorithms", "snarkvm-curves", "snarkvm-fields", @@ -2683,12 +2688,12 @@ dependencies = [ [[package]] name = "snarkvm-profiler" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" [[package]] name = "snarkvm-r1cs" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ "anyhow", "cfg-if 1.0.0", @@ -2704,12 +2709,16 @@ dependencies = [ [[package]] name = "snarkvm-utilities" version = "0.7.5" -source = "git+https://github.com/AleoHQ/snarkVM.git?rev=48c59e9#48c59e96aa8ba856f48ff0ea62362c2398587f5b" +source = "git+https://github.com/AleoHQ/snarkVM.git?rev=fbfaa3a#fbfaa3aba3179a4b0f6e6e1ad85b0117086c5849" dependencies = [ + "aleo-std", "anyhow", "bincode", + "itertools", "num-bigint", + "num_cpus", "rand", + "rayon", "serde", "snarkvm-derives", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index c8f06baebd..29afec6253 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ prometheus = ["snarkos-metrics"] test = [] [dependencies] -snarkvm = { git = "https://github.com/AleoHQ/snarkVM.git", rev = "48c59e9" } +snarkvm = { git = "https://github.com/AleoHQ/snarkVM.git", rev = "fbfaa3a" } #snarkvm = { path = "../snarkVM" } bytes = "1.0.0" diff --git a/src/rpc/rpc.rs b/src/rpc/rpc.rs index 0946a593bd..2672eac233 100644 --- a/src/rpc/rpc.rs +++ b/src/rpc/rpc.rs @@ -1109,7 +1109,12 @@ mod tests { assert_eq!(1, ledger_state.latest_block_height()); // Get the record commitment. - let decrypted_records = block_1.transactions().first().unwrap().to_decrypted_records(account.view_key()); + let decrypted_records = block_1 + .transactions() + .first() + .unwrap() + .to_decrypted_records(&account.view_key().into()) + .collect::>(); assert!(!decrypted_records.is_empty()); let record_commitment = decrypted_records[0].commitment(); diff --git a/storage/Cargo.toml b/storage/Cargo.toml index 8b99b5ab91..199cc7c78e 100644 --- a/storage/Cargo.toml +++ b/storage/Cargo.toml @@ -21,7 +21,7 @@ name = "lookups" harness = false [dependencies] -snarkvm = { git = "https://github.com/AleoHQ/snarkVM.git", rev = "48c59e9" } +snarkvm = { git = "https://github.com/AleoHQ/snarkVM.git", rev = "fbfaa3a" } #snarkvm = { path = "../../snarkVM" } [dependencies.anyhow] diff --git a/storage/src/state/tests.rs b/storage/src/state/tests.rs index 78c4e9adb1..48572b254b 100644 --- a/storage/src/state/tests.rs +++ b/storage/src/state/tests.rs @@ -300,7 +300,7 @@ fn test_transaction_fees() { let available_balance = AleoAmount::from_i64(-1 * coinbase_transaction.value_balance().0); let fee = AleoAmount::from_i64(rng.gen_range(1..available_balance.0)); let amount = available_balance.sub(fee.clone()); - let coinbase_record = coinbase_transaction.to_decrypted_records(view_key); + let coinbase_record = coinbase_transaction.to_decrypted_records(&view_key.into()).collect::>(); let ledger_proof = ledger.get_ledger_inclusion_proof(coinbase_record[0].commitment()).unwrap(); @@ -337,8 +337,10 @@ fn test_transaction_fees() { assert_eq!(2, ledger.latest_block_height()); let expected_block_reward = Block::::block_reward(2).add(fee); - let output_record = &block_2.transactions()[0].to_decrypted_records(recipient_view_key)[0]; - let new_coinbase_record = &block_2.transactions()[1].to_decrypted_records(view_key)[0]; + let output_record = &block_2.transactions()[0] + .to_decrypted_records(&recipient_view_key.into()) + .collect::>()[0]; + let new_coinbase_record = &block_2.transactions()[1].to_decrypted_records(&view_key.into()).collect::>()[0]; // Check that the output record balances are correct. assert_eq!(new_coinbase_record.value(), expected_block_reward); diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 9c0e0390f4..678ee8ea3a 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -25,7 +25,7 @@ path = "../storage" [dependencies.snarkvm] git = "https://github.com/AleoHQ/snarkVM.git" -rev = "48c59e9" +rev = "fbfaa3a" #path = "../../snarkVM" [dependencies.anyhow]