Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -49,8 +49,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
85 changes: 60 additions & 25 deletions Cargo.lock

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

17 changes: 8 additions & 9 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 @@ -318,7 +317,7 @@ async fn setup_increment_task(
.await?
.unwrap_or(wallet_account_file.account.clone());

let AuthSecretKey::RpoFalcon512(secret_key) = wallet_account_file
let AuthSecretKey::Falcon512Rpo(secret_key) = wallet_account_file
.auth_secret_keys
.first()
.expect("wallet account file should have one auth secret key")
Expand Down Expand Up @@ -770,7 +769,7 @@ async fn create_and_submit_network_note(
rng: &mut ChaCha20Rng,
) -> Result<(String, AccountHeader, BlockNumber)> {
// Create authenticator for transaction signing
let authenticator = BasicAuthenticator::new(&[AuthSecretKey::RpoFalcon512(secret_key.clone())]);
let authenticator = BasicAuthenticator::new(&[AuthSecretKey::Falcon512Rpo(secret_key.clone())]);

let account_interface = AccountInterface::from_account(wallet_account);

Expand All @@ -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
4 changes: 2 additions & 2 deletions bin/network-monitor/src/deploy/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::COMPONENT;
pub fn create_wallet_account() -> Result<(Account, SecretKey)> {
let mut rng = ChaCha20Rng::from_seed(rand::random());
let secret_key = SecretKey::with_rng(&mut get_rpo_random_coin(&mut rng));
let auth = AuthScheme::RpoFalcon512 { pub_key: secret_key.public_key().into() };
let auth = AuthScheme::Falcon512Rpo { pub_key: secret_key.public_key().into() };
let init_seed: [u8; 32] = rng.random();

let wallet_account = create_basic_wallet(
Expand All @@ -41,7 +41,7 @@ pub fn save_wallet_account(
secret_key: &SecretKey,
file_path: &Path,
) -> Result<()> {
let auth_secret_key = AuthSecretKey::RpoFalcon512(secret_key.clone());
let auth_secret_key = AuthSecretKey::Falcon512Rpo(secret_key.clone());
let account_file = AccountFile::new(account.clone(), vec![auth_secret_key]);
account_file.write(file_path)?;
Ok(())
Expand Down
11 changes: 6 additions & 5 deletions bin/stress-test/src/seeding/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use miden_protocol::block::{
use miden_protocol::crypto::dsa::ecdsa_k256_keccak::SecretKey as EcdsaSecretKey;
use miden_protocol::crypto::dsa::falcon512_rpo::{PublicKey, SecretKey};
use miden_protocol::crypto::rand::RpoRandomCoin;
use miden_protocol::errors::AssetError;
use miden_protocol::note::{Note, NoteHeader, NoteId, NoteInclusionProof};
use miden_protocol::transaction::{
InputNote,
Expand All @@ -45,8 +46,8 @@ use miden_protocol::transaction::{
TransactionHeader,
};
use miden_protocol::utils::Serializable;
use miden_protocol::{AssetError, Felt, ONE, Word};
use miden_standards::account::auth::AuthRpoFalcon512;
use miden_protocol::{Felt, ONE, Word};
use miden_standards::account::auth::AuthFalcon512Rpo;
use miden_standards::account::faucets::BasicFungibleFaucet;
use miden_standards::account::wallets::BasicWallet;
use miden_standards::note::create_p2id_note;
Expand Down Expand Up @@ -314,7 +315,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 All @@ -327,7 +328,7 @@ fn create_account(public_key: PublicKey, index: u64, storage_mode: AccountStorag
AccountBuilder::new(init_seed.try_into().unwrap())
.account_type(AccountType::RegularAccountImmutableCode)
.storage_mode(storage_mode)
.with_auth_component(AuthRpoFalcon512::new(public_key.into()))
.with_auth_component(AuthFalcon512Rpo::new(public_key.into()))
.with_component(BasicWallet)
.build()
.unwrap()
Expand All @@ -345,7 +346,7 @@ fn create_faucet() -> Account {
.account_type(AccountType::FungibleFaucet)
.storage_mode(AccountStorageMode::Private)
.with_component(BasicFungibleFaucet::new(token_symbol, 2, Felt::new(u64::MAX)).unwrap())
.with_auth_component(AuthRpoFalcon512::new(key_pair.public_key().into()))
.with_auth_component(AuthFalcon512Rpo::new(key_pair.public_key().into()))
.build()
.unwrap()
}
Expand Down
Loading