Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
- [BREAKING] Changed `SyncChainMmr` endpoint: the upper end of the block range we're syncing is now the chain tip with the requested finality level. Validator signature is also returned ([#2075](https://github.com/0xMiden/node/pull/2075)).
- [BREAKING] Renamed `SubmitProvenTransaction` RPC endpoint to `SubmitProvenTx` ([#2094](https://github.com/0xMiden/node/pull/2094)).
- [BREAKING] Renamed `SubmitProvenBatch` RPC endpoint to `SubmitProvenTxBatch` ([#2094](https://github.com/0xMiden/node/pull/2094)).
- [BREAKING] Updated `miden-protocol` to `v0.15.0` and `miden-crypto` to `v0.25`. Faucet-vs-wallet distinction is now component-based; the former `AccountStorageMode` is renamed to `AccountType` with only `Public`/`Private` variants. Genesis config `storage_mode` is renamed to `account_type`, the `Network` variant is removed, and the implicit default for wallets and faucets is now `Private`. The `has_updatable_code` wallet field is removed. `NetworkAccountId` is removed; network-account identity is now a plain `AccountId`. Fixed `proto::note::NoteHeader` so it round-trips losslessly (wire field is now `details_commitment` instead of `note_id`) ([#2095](https://github.com/0xMiden/node/pull/2095), [#2132](https://github.com/0xMiden/node/pull/2132)).
- Updated `miden-protocol` and bumped `miden-crypto` to `v0.25`. `AccountId::is_network()` was removed upstream, so `SubmitProvenTx` and `SubmitProvenTxBatch` now consult the store to classify post-deployment public-account transactions as network accounts.
- [BREAKING] Removed `Network` variant from genesis config `StorageMode`. The implicit default for wallets and fungible faucets is now `Private` (previously `Network`, which mapped to `Public` storage) ([#2095](https://github.com/0xMiden/node/pull/2095)).
- [BREAKING] Updated `miden-protocol` family of crates to the published `v0.15.0` on crates.io (previously tracked the `next` branch). The published release removes the multi-variant `AccountType` (`RegularAccount*`, `FungibleFaucet`, `NonFungibleFaucet`) and renames the former `AccountStorageMode` to `AccountType` with only `Public`/`Private`. Faucet-vs-wallet distinction is now component-based.
Expand Down
100 changes: 50 additions & 50 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions bin/network-monitor/src/deploy/wallet.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Wallet account creation functionality.

use anyhow::Result;
use miden_node_utils::crypto::get_rpo_random_coin;
use miden_node_utils::crypto::get_random_coin;
use miden_protocol::account::auth::AuthScheme;
use miden_protocol::account::{Account, AccountType};
use miden_protocol::crypto::dsa::falcon512_poseidon2::SecretKey;
Expand All @@ -19,7 +19,7 @@ use crate::COMPONENT;
#[instrument(target = COMPONENT, name = "create-wallet-account", skip_all, ret(level = "debug"))]
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 secret_key = SecretKey::with_rng(&mut get_random_coin(&mut rng));
let auth = AuthMethod::SingleSig {
approver: (secret_key.public_key().into(), AuthScheme::Falcon512Poseidon2),
};
Expand Down
17 changes: 7 additions & 10 deletions bin/ntx-builder/src/actor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use allowlist::{NoteScriptNotAllowlisted, partition_by_allowlist};
use anyhow::Context;
use candidate::TransactionCandidate;
use futures::FutureExt;
use miden_node_proto::domain::account::NetworkAccountId;
use miden_node_utils::ErrorReport;
use miden_node_utils::lru_cache::LruCache;
use miden_protocol::Word;
use miden_protocol::account::AccountId;
use miden_protocol::block::BlockNumber;
use miden_protocol::note::{NoteScript, Nullifier};
use miden_protocol::transaction::TransactionId;
Expand Down Expand Up @@ -196,7 +196,7 @@ enum ActorMode {
/// actor exits of its own accord when idle for longer than [`ActorConfig::idle_timeout`].
pub struct AccountActor {
/// The network account this actor is responsible for.
account_id: NetworkAccountId,
account_id: AccountId,
/// gRPC clients used by the actor.
clients: GrpcClients,
/// Shared state accessed by the actor.
Expand All @@ -213,7 +213,7 @@ pub struct AccountActor {
impl AccountActor {
/// Constructs a new account actor with the given configuration.
pub fn new(
account_id: NetworkAccountId,
account_id: AccountId,
actor_context: &AccountActorContext,
notify: Arc<Notify>,
) -> Self {
Expand Down Expand Up @@ -328,7 +328,7 @@ impl AccountActor {
/// Selects a transaction candidate by querying the DB.
async fn select_candidate_from_db(
&self,
account_id: NetworkAccountId,
account_id: AccountId,
chain_state: ChainState,
) -> anyhow::Result<Option<TransactionCandidate>> {
let block_num = chain_state.chain_tip_header.block_num();
Expand Down Expand Up @@ -388,10 +388,7 @@ impl AccountActor {
/// the coordinator will respawn a new actor when the account reappears through
/// [`Coordinator::send_targeted`](crate::coordinator::Coordinator::send_targeted) or the
/// account loader.
async fn wait_for_committed_account(
&self,
account_id: NetworkAccountId,
) -> anyhow::Result<bool> {
async fn wait_for_committed_account(&self, account_id: AccountId) -> anyhow::Result<bool> {
// Check if the account is already committed.
if self
.state
Expand Down Expand Up @@ -439,7 +436,7 @@ impl AccountActor {
#[tracing::instrument(name = "ntx.actor.execute_transactions", skip(self, tx_candidate))]
async fn execute_transactions(
&self,
account_id: NetworkAccountId,
account_id: AccountId,
tx_candidate: TransactionCandidate,
) -> ActorMode {
let block_num = tx_candidate.chain_tip_header.block_num();
Expand Down Expand Up @@ -606,7 +603,7 @@ end";

fn actor_with_request_handler(
db: &Db,
account_id: NetworkAccountId,
account_id: AccountId,
) -> (AccountActor, AccountActorContext) {
let (request_tx, request_rx) = mpsc::channel(8);
let mut context = AccountActorContext::test(db);
Expand Down
Loading
Loading