diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e425f2c80..7ccb6aaedc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ ### Changes +- Added a check that the guardian public key is not one of the approver public keys ([#3764](https://github.com/0xMiden/protocol/pull/3764)). +- [BREAKING] Updated the Miden VM and crypto crate family to v0.31.0 and `midenc-hir-type` to v0.13.0. Execution proofs now include a format version and compatible VM and PVM verifier roots, and protocol deserialization rejects unversioned proof bytes from earlier releases. Verifier outcomes now report separate VM and precompile security parameters ([#3806](https://github.com/0xMiden/protocol/pull/3806)). +- [BREAKING] Updated the Miden VM and crypto crate family to v0.30.0 and `midenc-hir-type` to v0.12.0. `LocalTransactionProver::new` now takes `miden_prover::Prover`, `CoreLibrary` exposes one merged package, and `TransactionVerifier::verify` now returns `VerificationOutcome` so callers can handle outstanding precompile work ([#3782](https://github.com/0xMiden/protocol/pull/3782)). +- [BREAKING] Removed the `BlockProof` placeholder in favor of `ExecutionProof` on `ProvenBlock`, matching `ProvenTransaction` and `ProvenBatch`, and `LocalBlockProver::prove` now takes an `ExecutedBlock` ([#3703](https://github.com/0xMiden/protocol/pull/3703)). +- Added the `miden::protocol::tx::before_block_witness_load` kernel event, emitted before a block other than the reference block is read from the partial blockchain ([#3699](https://github.com/0xMiden/protocol/pull/3699)). - [BREAKING] Replaced `StandardNote::expected_num_storage_items` with `StandardNote::num_storage_items`, which returns the `NumStorageItems` a note kind accepts instead of a single value that was neither exact nor a bound for MINT and the config notes, whose storage size constants are now typed as `NumStorageItems` ([#3810](https://github.com/0xMiden/protocol/pull/3810)). - Fixed `RoleBasedAccessControl` role administration becoming permanently unmanageable when a role's admin was delegated to a memberless role ([#3476](https://github.com/0xMiden/protocol/pull/3476)). - [BREAKING] Moved the `note_tag` MASM module from `miden::standards::note_tag` to `miden::standards::note::note_tag` ([#3473](https://github.com/0xMiden/protocol/pull/3473)). diff --git a/crates/miden-protocol/asm/kernels/transaction-core/src/callbacks.masm b/crates/miden-protocol/asm/kernels/transaction-core/src/callbacks.masm index fd0f06b3fc..25f57d64e0 100644 --- a/crates/miden-protocol/asm/kernels/transaction-core/src/callbacks.masm +++ b/crates/miden-protocol/asm/kernels/transaction-core/src/callbacks.masm @@ -102,7 +102,10 @@ end #! procedure root from the provided slot ID in the faucet's storage, and invoking it via `dyncall`. #! #! If the faucet does not have the callback storage slot, or if the slot contains the empty word, -#! the callback is skipped and its inputs are consumed. +#! the callback is skipped and its inputs are consumed. Both conditions are evaluated only after the +#! foreign context has been started, so a faucet whose account ID has the asset callback flag +#! enabled is loaded as a foreign account on every movement of its assets, even when it registers no +#! callback procedure root. #! #! custom_data should be set to 0 for the account callback and to note_idx for the note callback. #! diff --git a/crates/miden-protocol/src/account/builder/mod.rs b/crates/miden-protocol/src/account/builder/mod.rs index 31bdaa5597..76ba5c129b 100644 --- a/crates/miden-protocol/src/account/builder/mod.rs +++ b/crates/miden-protocol/src/account/builder/mod.rs @@ -48,6 +48,13 @@ use crate::{Felt, Word}; /// installing a callback slot, so that the account retains the ability to add a callback slot via /// an account upgrade later. This is particularly useful if new types of callbacks are introduced. /// +/// An enabled flag makes the account's state a required input of every transaction that moves one +/// of its assets: dispatching a callback starts a foreign context against the issuing account, and +/// the foreign state is loaded before the callback slot is looked up, so the load happens even when +/// no callback procedure root is registered. An [`AccountType::Private`] account publishes only its +/// commitment, so its holders have to obtain that state out of band. Both the account type and the +/// flag are immutable parts of the [`AccountId`], so this is settled at creation. +/// /// [`AccountBuilder::with_component`] (or [`AccountBuilder::with_components`]) must be called at /// least once, and exactly one of the added components must be an authentication component (i.e. a /// component exporting a procedure marked with the `@auth_script` attribute). The auth component is diff --git a/crates/miden-standards/src/account/policies/manager.rs b/crates/miden-standards/src/account/policies/manager.rs index 21c6beb462..d61440a06d 100644 --- a/crates/miden-standards/src/account/policies/manager.rs +++ b/crates/miden-standards/src/account/policies/manager.rs @@ -215,7 +215,10 @@ struct PolicyConfig { /// the flag is an immutable property of the account ID, it applies for the faucet's entire /// lifetime, so promoting a reserved policy later via `set_send_policy` / `set_receive_policy` /// enforces it against the whole circulating supply rather than only assets minted after the -/// switch. +/// switch. A faucet created as +/// [`AccountType::Private`][miden_protocol::account::AccountType::Private] publishes only its +/// commitment, so its holders have to obtain the state each of their transactions needs out of +/// band. The account type is immutable, so that is settled at creation. /// /// The slots are omitted only when no send or receive policy of any kind is registered, in which /// case the faucet's account ID is created with