Skip to content

feat(transport): resendPrivateNoteById() for post-failure recovery#26

Open
WiktorStarczewski wants to merge 3 commits into
mainfrom
wiktor/migrate-2061-resend-private-note
Open

feat(transport): resendPrivateNoteById() for post-failure recovery#26
WiktorStarczewski wants to merge 3 commits into
mainfrom
wiktor/migrate-2061-resend-private-note

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

@WiktorStarczewski WiktorStarczewski commented Apr 28, 2026

Client PR: #2061

Migrated from miden-client#2061 as part of the web-sdk split (web/WASM components moved out of miden-client into this dedicated repo — see miden-client #1992 / #2135).

Summary (per the original PR)

Adds a resendPrivateNoteById() method to the WebClient note transport, allowing post-failure recovery by re-sending a previously created private note by its ID. The CLI/Rust-only changes from the original PR remain on miden-client#2061.

Migrated from 0xMiden/miden-client#2061 (author: WiktorStarczewski) as
part of the web-sdk split. Original PR: 0xMiden/miden-client#2061
Repoint workspace dep at miden-client#2061's branch so CI can compile
against `Client::resend_private_note_by_id()` (added by that PR, not
yet released).

Revert before merge — see PR description for the merge sequence.
@WiktorStarczewski WiktorStarczewski added the no changelog PR doesn't need a CHANGELOG entry (trivial / non-user-visible) label Apr 30, 2026
WiktorStarczewski added a commit that referenced this pull request Apr 30, 2026
Now that miden-client#1835's wiktor-storekeys branch has been merged
with miden-client@dab6cf7b (the same snapshot of next that web-sdk
currently pins), the dep retarget that #23/#25/#26/#31 use works for
this PR too.

Local 'cargo check --workspace --target wasm32-unknown-unknown' is clean
(was 23 errors before the upstream merge, due to the alpha-protocol
mismatch the PR description mentions).

Revert before merge — see PR description merge gate.
…op manual dep retarget

Brings auto-patch infra in. Cargo.toml + Cargo.lock now match main
verbatim; the 'Client PR: #2061' marker on the PR description drives
the runtime dep injection.
@github-actions
Copy link
Copy Markdown

🔗 Linked client PR: 0xMiden/miden-client#2061

Field Value
Patched at 0xMiden/miden-client@wiktor/resend-private-note
Pin (head sha) 912a17794c9d054d06af521d5aade97f4f7c8f0b
Upstream state open (merged: false)

This run is testing against the linked PR's head. The published artifact will use the canonical miden-client source — CI on main/next does not auto-patch.

Local-dev parity:

scripts/dev-with-client-pr.sh 2061    # apply the same patch locally
scripts/dev-with-client-pr.sh --clear                            # remove it before commit

WiktorStarczewski added a commit to 0xMiden/miden-client that referenced this pull request May 4, 2026
When a private note send's transport step fails (network error, service
outage) after the on-chain tx committed, the sender's asset is consumed
but the recipient can never discover the note — private notes have no
on-chain details, only the commitment. Without a resend primitive the
asset is effectively lost.

Adds resend_private_note_by_id(note_id, address) on the Rust Client.
Looks up the output note from the local store, reconstructs the full
Note, and re-hands it to the transport layer.

Consumers (wallet, external apps) can now surface a retry flow when
they observe a transport failure, or run a background loop that retries
pending transports.

The web-client / WASM JS bindings live in 0xMiden/web-sdk#26 — split
out per the post-#1992 repo layout.
WiktorStarczewski added a commit to 0xMiden/miden-client that referenced this pull request May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR doesn't need a CHANGELOG entry (trivial / non-user-visible)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant