fix(note-transport): explicit block hint on sendPrivate; add sendPrivateOutput (0.16/next) - #264
Merged
Merged
Conversation
…ateOutput (expected_height) 0.16 / next-channel version of #263 (which targets main/0.15). This is a breaking change, so it belongs on the next dist-tag. Addresses maintainer review feedback (igamigo) on the private-note block-hint fix: - `client.notes.sendPrivate({ note, to })` now requires an explicit `scanAfterBlockNum` — the block the recipient scans forward from for the note's on-chain commitment — instead of the SDK inferring it from the client's current sync height (which overshoots the commitment once the sender has synced past the note and silently drops delivery). - New `client.notes.sendPrivateOutput({ noteId, to })` derives the block from the output note's stored `expected_height` (the chain tip when its transaction was submitted), so relaying one of this client's own notes is correct regardless of sync/relay timing. react-sdk's useTransaction/useSend/useMultiSend relay via sendPrivateOutputNote. Cross-client node regression tests guard both the convenience path (delivers after syncing past the commitment) and the agnostic path (a too-high explicit hint drops delivery). Verified compiling against next's 0.16 miden-client.
igamigo
approved these changes
Aug 6, 2026
igamigo
left a comment
Collaborator
There was a problem hiding this comment.
LGTM! Just in case: we can still fix this in main by keeping the old signature (and adding a new function that adds the parameter). This will make the fix non-breaking and users (such as the wallet) can hotfix this by calling the new signature instead of the new one. If you think this is unnecessary though, please disregard!
WiktorStarczewski
force-pushed
the
port/private-note-hint-next
branch
from
August 6, 2026 19:40
c506f28 to
b272263
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The 0.16 /
next-channel version of #263 (which targetsmain/0.15). This is a breaking change, so it belongs on thenextdist-tag.Addresses maintainer review feedback (igamigo) on the private-note block-hint fix:
client.notes.sendPrivate({ note, to })now requires an explicitscanAfterBlockNum— the block the recipient scans forward from for the note's on-chain commitment — instead of the SDK inferring it from the client's current sync height. A hint above the commitment is never scanned back to, so the sync-height inference silently dropped delivery once the sender had synced past the note (e.g. relaying after waiting for the transaction to commit).client.notes.sendPrivateOutput({ noteId, to })derives the block from the output note's storedexpected_height(the chain tip when its transaction was submitted) — exactly the value the review pointed to for output notes — so relaying one of this client's own notes is correct regardless of sync/relay timing.The old sync-height auto-read is removed, so an arbitrary note is never silently relayed with a bad hint.
react-sdk's
useTransaction/useSend/useMultiSendrelay viasendPrivateOutputNote. Cross-client node regression tests guard both paths: the convenience method (delivers after the sender syncs past the commitment) and the agnosticsendPrivateNote(a deliberately-too-high explicit hint drops delivery). Verified compiling and passing againstnext's 0.16miden-client.Supersedes #263 (which targets
main) for the 0.16 line.closes #262