Skip to content

Commit

Permalink
Bump snarkVM rev
Browse files Browse the repository at this point in the history
  • Loading branch information
howardwu committed Jan 20, 2022
1 parent e0d6639 commit c3efa9b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 20 deletions.
35 changes: 22 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 6 additions & 1 deletion src/rpc/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();
assert!(!decrypted_records.is_empty());
let record_commitment = decrypted_records[0].commitment();

Expand Down
2 changes: 1 addition & 1 deletion storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 5 additions & 3 deletions storage/src/state/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();

let ledger_proof = ledger.get_ledger_inclusion_proof(coinbase_record[0].commitment()).unwrap();

Expand Down Expand Up @@ -337,8 +337,10 @@ fn test_transaction_fees() {
assert_eq!(2, ledger.latest_block_height());

let expected_block_reward = Block::<Testnet2>::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::<Vec<_>>()[0];
let new_coinbase_record = &block_2.transactions()[1].to_decrypted_records(&view_key.into()).collect::<Vec<_>>()[0];

// Check that the output record balances are correct.
assert_eq!(new_coinbase_record.value(), expected_block_reward);
Expand Down
2 changes: 1 addition & 1 deletion testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ path = "../storage"

[dependencies.snarkvm]
git = "https://github.com/AleoHQ/snarkVM.git"
rev = "48c59e9"
rev = "fbfaa3a"
#path = "../../snarkVM"

[dependencies.anyhow]
Expand Down

0 comments on commit c3efa9b

Please sign in to comment.