Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
- Increased the maximum query limit for the store ([#1443](https://github.com/0xMiden/miden-node/pull/1443)).
- [BREAKING] Migrated to version `v0.20` of the VM ([#1476](https://github.com/0xMiden/miden-node/pull/1476)).
- [BREAKING] Change account in database representation ([#1481](https://github.com/0xMiden/miden-node/pull/1481)).
- Remove the cyclic database optimization ([#1497](https://github.com/0xMiden/miden-node/pull/1497)).
- Remove the cyclic database optimization ([#1497](https://github.com/0xMiden/miden-node/pull/1497)).
- Fix race condition at DB shutdown in tests ([#1503](https://github.com/0xMiden/miden-node/pull/1503)).
- [BREAKING] Updated to new miden-base protocol: removed `aux` and `execution_hint` from `NoteMetadata`, removed `NoteExecutionMode`, and `NoteMetadata::new()` is now infallible ([#1526](https://github.com/0xMiden/miden-node/pull/1526)).

### Fixes

Expand Down
53 changes: 34 additions & 19 deletions Cargo.lock

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

13 changes: 6 additions & 7 deletions bin/network-monitor/src/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use miden_protocol::crypto::dsa::falcon512_rpo::SecretKey;
use miden_protocol::note::{
Note,
NoteAssets,
NoteExecutionHint,
NoteInputs,
NoteMetadata,
NoteRecipient,
Expand All @@ -30,7 +29,7 @@ use miden_protocol::note::{
};
use miden_protocol::transaction::{InputNotes, PartialBlockchain, TransactionArgs};
use miden_protocol::utils::Deserializable;
use miden_protocol::{Felt, Word, ZERO};
use miden_protocol::{Felt, Word};
use miden_standards::account::interface::{AccountInterface, AccountInterfaceExt};
use miden_standards::code_builder::CodeBuilder;
use miden_tx::auth::BasicAuthenticator;
Expand Down Expand Up @@ -794,6 +793,8 @@ async fn create_and_submit_network_note(
.await
.context("Failed to execute transaction")?;

let tx_inputs = executed_tx.tx_inputs().to_bytes();

let final_account = executed_tx.final_account().clone();

// Prove the transaction
Expand All @@ -803,7 +804,7 @@ async fn create_and_submit_network_note(
// Submit the proven transaction
let request = ProvenTransaction {
transaction: proven_tx.to_bytes(),
transaction_inputs: None,
transaction_inputs: Some(tx_inputs),
};

let block_height: BlockNumber = rpc_client
Expand Down Expand Up @@ -851,10 +852,8 @@ fn create_network_note(
let metadata = NoteMetadata::new(
wallet_account.id(),
NoteType::Public,
NoteTag::from_account_id(counter_account.id()),
NoteExecutionHint::Always,
ZERO,
)?;
NoteTag::with_account_target(counter_account.id()),
);

let serial_num = Word::new([
Felt::new(rng.random()),
Expand Down
2 changes: 1 addition & 1 deletion bin/stress-test/src/seeding/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ fn create_note(faucet_id: AccountId, target_id: AccountId, rng: &mut RpoRandomCo
target_id,
vec![asset],
miden_protocol::note::NoteType::Public,
Felt::default(),
miden_protocol::note::NoteAttachment::default(),
rng,
)
.expect("note creation failed")
Expand Down
4 changes: 2 additions & 2 deletions bin/stress-test/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub async fn sync_state(
) -> (Duration, proto::rpc::SyncStateResponse) {
let note_tags = account_ids
.iter()
.map(|id| u32::from(NoteTag::from_account_id(*id)))
.map(|id| u32::from(NoteTag::with_account_target(*id)))
.collect::<Vec<_>>();

let account_ids = account_ids
Expand Down Expand Up @@ -158,7 +158,7 @@ pub async fn sync_notes(
) -> Duration {
let note_tags = account_ids
.iter()
.map(|id| u32::from(NoteTag::from_account_id(*id)))
.map(|id| u32::from(NoteTag::with_account_target(*id)))
.collect::<Vec<_>>();
let sync_request = proto::rpc::SyncNotesRequest {
block_range: Some(proto::rpc::BlockRange { block_from: 0, block_to: None }),
Expand Down
5 changes: 2 additions & 3 deletions crates/block-producer/src/domain/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::sync::Arc;
use miden_protocol::Word;
use miden_protocol::account::AccountId;
use miden_protocol::block::BlockNumber;
use miden_protocol::note::Nullifier;
use miden_protocol::note::{NoteHeader, Nullifier};
use miden_protocol::transaction::{OutputNote, ProvenTransaction, TransactionId, TxAccountUpdate};

use crate::errors::VerifyTxError;
Expand Down Expand Up @@ -119,8 +119,7 @@ impl AuthenticatedTransaction {
pub fn unauthenticated_note_commitments(&self) -> impl Iterator<Item = Word> + '_ {
self.inner
.unauthenticated_notes()
.copied()
.map(|header| header.commitment())
.map(NoteHeader::commitment)
.filter(|commitment| !self.notes_authenticated_by_store.contains(commitment))
}

Expand Down
2 changes: 1 addition & 1 deletion crates/block-producer/src/test_utils/proven_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl MockProvenTxBuilder {
.map(|note_index| {
let note = Note::mock_noop(Word::from([0, 0, 0, note_index]));

OutputNote::Header(*note.header())
OutputNote::Header(note.header().clone())
})
.collect();

Expand Down
Loading