Skip to content

feat(note-transport): add nonce to FetchNotes cursor - #2640

Merged
kkovaacs merged 5 commits into
nextfrom
krisztian/note-transport-add-cursor-nonce
Sep 22, 2026
Merged

kkovaacs merged 5 commits into
nextfrom
krisztian/note-transport-add-cursor-nonce

Conversation

@kkovaacs

Copy link
Copy Markdown
Collaborator

Summary

Replace scalar cursors with a fixed64 nonce and sequence. Persist the nonce across restarts and return FAILED_PRECONDITION for cursors from a replaced database. Includes migration, regression tests, and updated documentation.

This is a solution to the issue where after a catastrophic event (eg. losing the note transport databse) clients get stuck receiving new notes because they're using invalid cursors. For a more detailed description please check 0xMiden/note-transport-service#97.

Changelog

[[entry]]
scope       = "note-transport"
impact      = "breaking"
description = "Changed FetchNotes cursor to a structured message containing a nonce."

@kkovaacs
kkovaacs force-pushed the krisztian/note-transport-add-cursor-nonce branch from 5efe58d to a9a30dd Compare September 17, 2026 12:04
@kkovaacs
kkovaacs marked this pull request as ready for review September 17, 2026 12:05
Comment thread proto/proto/note_transport.proto
@kkovaacs
kkovaacs force-pushed the krisztian/note-transport-add-cursor-nonce branch 2 times, most recently from bd268b8 to bb3d853 Compare September 18, 2026 05:42
@kkovaacs
kkovaacs force-pushed the krisztian/note-transport-add-cursor-nonce branch from bb3d853 to 97a48aa Compare September 18, 2026 06:33
@Mirko-von-Leipzig
Mirko-von-Leipzig added this pull request to stack #2661 September 21, 2026 10:26
Comment thread bin/note-transport/src/db/mod.rs Outdated
Comment thread bin/note-transport/src/db/migrations/002_cursor_nonce.rs Outdated
@kkovaacs
kkovaacs force-pushed the krisztian/note-transport-add-cursor-nonce branch 3 times, most recently from 2332a3d to 5088be5 Compare September 22, 2026 08:19
An error occurred while trying to automatically change base from krisztian/note-transport-import to next September 22, 2026 11:25
@kkovaacs
kkovaacs force-pushed the krisztian/note-transport-add-cursor-nonce branch 2 times, most recently from 5a73ccb to 6f4e142 Compare September 22, 2026 12:02
@kkovaacs
kkovaacs removed this pull request from stack #2661 September 22, 2026 12:09
@kkovaacs
kkovaacs changed the base branch from krisztian/note-transport-import to next September 22, 2026 12:09
@kkovaacs
kkovaacs added this pull request to stack #2673 September 22, 2026 12:09
@kkovaacs
kkovaacs force-pushed the krisztian/note-transport-add-cursor-nonce branch from 6f4e142 to b6dc210 Compare September 22, 2026 12:39
@kkovaacs
kkovaacs merged commit 1d7d3aa into next Sep 22, 2026
27 checks passed
@kkovaacs
kkovaacs deleted the krisztian/note-transport-add-cursor-nonce branch September 22, 2026 12:45
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