Skip to content

fix(rust-client): apply expiration_delta to requests without own output notes - #2580

Merged
igamigo merged 1 commit into
0xMiden:nextfrom
Bruce039:fix-expiration-delta-without-output-notes
Sep 22, 2026
Merged

igamigo merged 1 commit into
0xMiden:nextfrom
Bruce039:fix-expiration-delta-without-output-notes

Conversation

@Bruce039

Copy link
Copy Markdown
Contributor

Summary

Closes #2579.

TransactionRequestBuilder::expiration_delta was only applied through the SendNotes transaction script. A request without own output notes (consume, pswap cancel, bare build()) accepted the delta and then ran without a script, so the transaction never expired (expiration_block_num() == u32::MAX).

Changes

  • TransactionRequest::build_transaction_script: when there is no script template and a non-zero expiration delta is set, return the standard ExpirationTransactionScript together with its tx_script_args(), so the kernel enforces the delta.
  • Unit test expiration_delta_without_script_template_builds_expiration_script and mock-chain test expiration_delta_applies_to_request_without_own_output_notes, which fails on next with left: BlockNumber(4294967295) right: BlockNumber(13).
  • CHANGELOG entry.

cargo nextest run -p miden-client --lib: 187 passed; miden-client-unit-tests: 143 passed; clippy clean.

@Bruce039 Bruce039 closed this Sep 18, 2026
@Bruce039
Bruce039 force-pushed the fix-expiration-delta-without-output-notes branch from 4cbd47a to 1f4ff27 Compare September 18, 2026 22:31
@Bruce039 Bruce039 reopened this Sep 18, 2026
@Bruce039
Bruce039 force-pushed the fix-expiration-delta-without-output-notes branch from 2edbf8c to a319655 Compare September 22, 2026 11:44

@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.

Thanks!

@igamigo
igamigo merged commit 76bc2db into 0xMiden:next Sep 22, 2026
21 checks passed
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.

expiration_delta is dropped for transaction requests without own output notes

2 participants