Skip to content

chore: upgrade protocol to RC3 - #2356

Open
juan518munoz wants to merge 6 commits into
nextfrom
jmunoz-update-miden-deps
Open

chore: upgrade protocol to RC3#2356
juan518munoz wants to merge 6 commits into
nextfrom
jmunoz-update-miden-deps

Conversation

@juan518munoz

@juan518munoz juan518munoz commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Bump miden dependencies to their latest git next versions.

Depends on 0xMiden/node#2421 getting merged into its own next.

@juan518munoz
juan518munoz marked this pull request as ready for review August 3, 2026 17:55
@igamigo igamigo changed the title chore: update miden deps chore: update protocol to RC3 Aug 7, 2026
@igamigo igamigo changed the title chore: update protocol to RC3 chore: upgrade protocol to RC3 Aug 7, 2026

@igamigo igamigo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM! Left some small comments I think we should address before merging.

Comment on lines +201 to +207
async fn chain_fee_faucet_id(client: &TestClient) -> Result<AccountId> {
let (genesis, _) = client
.get_block_header_by_num(BlockNumber::GENESIS)
.await?
.context("genesis block header is not in the store")?;
Ok(genesis.fee_parameters().fee_faucet_id())
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's inline this function call


/// Builds a fee policy manager pricing every note the account can consume at zero.
async fn zero_fee_policy_manager(
client: &TestClient,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, Client here is only used for getting the genesis, right? We can just pass the token faucet if that's the case

NO_AUTH_PACKAGE,
MULTISIG_AUTH_PACKAGE,
ACL_AUTH_PACKAGE,
];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if there's new standards to add here?

Comment thread bin/miden-cli/build.rs
/// Builds a package and stores it under `{OUT_DIR}/{PACKAGE_DIR}` or
/// `{OUT_DIR}/{PACKAGE_DIR}/{subdirectory}` if a subdirectory is provided.
pub fn build_package(
package_name: &str,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need package_name now that component_package is now of type Package?

Comment thread bin/miden-cli/build.rs
// state is changed. Provides no cryptographic authentication.
let no_auth_metadata = NoAuth::component_metadata();
build_package("no-auth", NoAuth::code().as_library(), &no_auth_metadata, Some("auth"));
build_package("no-auth", NoAuth::code().as_package(), &no_auth_metadata, Some("auth"));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird that we transform the code to package here and then re-create a new package within the build_package function

Comment on lines +167 to +170
assert!(
result.is_err(),
"an account with no fee asset balance should not be able to pay the fee"
);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's match on a more specific error variant here

&self,
code_interface: &AccountCodeInterface,
) -> Result<Option<TransactionScript>, TransactionRequestError> {
) -> Result<Option<(TransactionScript, Option<Word>)>, TransactionRequestError> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the doc comments on this function and explain why this is now needed? Does the send tx script have non-zero args?

Comment on lines +273 to +279
/// Declares the asset the transaction fee is paid in, and the rate converting the chain's
/// native fee into it.
#[must_use]
pub fn fee_conversion_info(self, conversion_info: FeeConversionInfo, salt: Word) -> Self {
let (auth_arg, preimage) = commit_fee_conversion_info(conversion_info, salt);
self.auth_arg(auth_arg).extend_advice_map([(auth_arg, preimage)])
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's specify in the doc comments that only accounts with fee-conversion-aware components will work. Is there any way we can validate this before executing and showing a nice error if the account does not support it?

Comment on lines +134 to +140
/// Aggregates individual attachment commitments into the note's attachments commitment.
///
/// The element layout mirrors [`NoteAttachments`]' own sequential commitment, so hashing this
/// yields the same value as the full attachments would, without needing their contents.
struct AttachmentCommitments(Vec<Word>);

impl SequentialCommit for AttachmentCommitments {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a TODO here referencing issue #2360 for making better use of this new change

Comment on lines +152 to +153
impl TryFrom<proto::note::NoteSyncMetadata> for NoteMetadata {
type Error = RpcConversionError;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add a similar TODO here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants