Report which input note failed during multi-note transaction execution
- Dominant language
- Rust
- Stars
- 78
- Forks
- 129
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 52
Description
## Problem
When a transaction consumes multiple input notes and one note fails during execution, the whole transaction fails. Developers currently do not get enough feedback to tell which input note caused the failure.
Pioneer feedback says the workaround is to manually simulate each received note one by one until the failing note is found.
## Why this matters
Multi-note transactions are common for app flows that aggregate liquidity, consume multiple pending notes, or batch user actions. Without per-note diagnostics, a single bad note turns into a slow manual debugging process.
## Proposed scope
Add standardized diagnostics for multi-input-note execution failures. Possible approaches:
- include the failing input note ID/index in the error when available,
- add a helper that simulates/screens each candidate note independently and returns a structured report,
- expose note-level execution traces/errors in a form usable by Rust, Web, and React consumers.
The ideal API should help developers answer:
- which note failed,
- what error occurred,
- whether the failure is deterministic or related to missing local/network data,
- what note/account/script context was involved.
## Acceptance criteria
- A failed multi-note execution can identify the failing input note ID or index when possible.
- There is a documented API/helper for diagnosing multi-note failures.
- The error shape is usable by SDK consumers without string parsing.
- Tests cover a transaction where one of several input notes fails.
## Related context
- Pioneer feedback from Zoro.
- Existing note screening infrastructure in `miden-client`.
- Network-note diagnostics are tracked separately by node/client status endpoints.
Contributor guide
Research direction
Look at the note screening infrastructure in `miden-client` and the transaction execution flow. The goal is to modify error reporting to include the failing input note ID or index. Start by finding where multi-note transactions are executed and where errors are propagated. Write a test that simulates a transaction with one failing note to verify the new diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100