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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- [BREAKING] Refactored account ID and nonce memory and advice stack layout ([#2442](https://github.com/0xMiden/miden-base/pull/2442)).
- [BREAKING] Removed `hash_account` ([#2442](https://github.com/0xMiden/miden-base/pull/2442)).
- [BREAKING] Renamed `AccountHeader::commitment`, `Account::commitment` and `PartialAccount::commitment` to `to_commitment` ([#2442](https://github.com/0xMiden/miden-base/pull/2442)).
- [BREAKING] Remove `BlockSigner` trait ([#2447](https://github.com/0xMiden/miden-base/pull/2447)).

## 0.13.3 (2026-01-27)

Expand Down
3 changes: 0 additions & 3 deletions crates/miden-protocol/src/block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ pub use block_inputs::BlockInputs;
mod note_tree;
pub use note_tree::{BlockNoteIndex, BlockNoteTree};

mod signer;
pub use signer::BlockSigner;

/// The set of notes created in a transaction batch with their index in the batch.
///
/// The index is included as some notes may be erased at the block level that were part of the
Expand Down
28 changes: 0 additions & 28 deletions crates/miden-protocol/src/block/signer.rs

This file was deleted.

7 changes: 3 additions & 4 deletions crates/miden-protocol/src/testing/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ use crate::Word;
use crate::account::Account;
use crate::block::account_tree::{AccountTree, account_id_to_smt_key};
use crate::block::{BlockHeader, BlockNumber, FeeParameters};
use crate::crypto::dsa::ecdsa_k256_keccak::SecretKey;
use crate::testing::account_id::ACCOUNT_ID_PUBLIC_FUNGIBLE_FAUCET;
use crate::testing::random_signer::RandomBlockSigner;
use crate::testing::random_secret_key::random_secret_key;

impl BlockHeader {
/// Creates a mock block. The account tree is formed from the provided `accounts`,
Expand All @@ -35,7 +34,7 @@ impl BlockHeader {
let fee_parameters =
FeeParameters::new(ACCOUNT_ID_PUBLIC_FUNGIBLE_FAUCET.try_into().unwrap(), 500)
.expect("native asset ID should be a fungible faucet ID");
let validator_key = SecretKey::random().public_key();
let validator_key = random_secret_key();

#[cfg(not(target_family = "wasm"))]
let (
Expand Down Expand Up @@ -92,7 +91,7 @@ impl BlockHeader {
note_root,
tx_commitment,
tx_kernel_commitment,
validator_key,
validator_key.public_key(),
fee_parameters,
timestamp,
)
Expand Down
2 changes: 1 addition & 1 deletion crates/miden-protocol/src/testing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod mock_util_lib;
pub mod noop_auth_component;
pub mod note;
pub mod partial_blockchain;
pub mod random_signer;
pub mod random_secret_key;
pub mod slot_name;
pub mod storage;
pub mod tx;
14 changes: 14 additions & 0 deletions crates/miden-protocol/src/testing/random_secret_key.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// NO STD ECDSA SECRET KEY
// ================================================================================================

use crate::crypto::dsa::ecdsa_k256_keccak::SecretKey;

// NO STD SECRET KEY
// ================================================================================================

pub fn random_secret_key() -> SecretKey {
use rand::SeedableRng;
use rand_chacha::ChaCha20Rng;
let mut rng = ChaCha20Rng::from_os_rng();
SecretKey::with_rng(&mut rng)
}
22 changes: 0 additions & 22 deletions crates/miden-protocol/src/testing/random_signer.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ async fn test_check_note_consumability_static_analysis_invalid_inputs() -> anyho
.build_tx_context(
TxContextInput::Account(account),
&[],
&vec![
&[
p2ide_wrong_inputs_number.clone(),
p2ide_invalid_target_id.clone(),
p2ide_invalid_reclaim.clone(),
Expand Down
5 changes: 2 additions & 3 deletions crates/miden-testing/src/mock_chain/chain_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ use miden_protocol::block::{
OutputNoteBatch,
ProvenBlock,
};
use miden_protocol::crypto::dsa::ecdsa_k256_keccak::SecretKey;
use miden_protocol::crypto::merkle::smt::Smt;
use miden_protocol::errors::NoteError;
use miden_protocol::note::{Note, NoteAttachment, NoteDetails, NoteType};
use miden_protocol::testing::account_id::ACCOUNT_ID_NATIVE_ASSET_FAUCET;
use miden_protocol::testing::random_signer::RandomBlockSigner;
use miden_protocol::testing::random_secret_key::random_secret_key;
use miden_protocol::transaction::{OrderedTransactionHeaders, OutputNote, TransactionKernel};
use miden_protocol::{Felt, MAX_OUTPUT_NOTES_PER_BATCH, Word};
use miden_standards::account::faucets::{BasicFungibleFaucet, NetworkFungibleFaucet};
Expand Down Expand Up @@ -221,7 +220,7 @@ impl MockChainBuilder {
let timestamp = MockChain::TIMESTAMP_START_SECS;
let fee_parameters = FeeParameters::new(self.native_asset_id, self.verification_base_fee)
.context("failed to construct fee parameters")?;
let validator_secret_key = SecretKey::random();
let validator_secret_key = random_secret_key();
let validator_public_key = validator_secret_key.public_key();

let header = BlockHeader::new(
Expand Down