Conversation
faeb01b to
0d2f855
Compare
|
I mentioned this on one of the Slack group conversations but never commented on the issue (apologies for this, definitely should've left a comment):
Maybe these concerns are no longer applicable for some reason (I have not followed recent changes here, like the ones in the base branch of this PR), but just wanted to comment on it here just in case. |
I think the primary issue that after a catastrophic event (which shouldn't be "normal") client behavior is just bad. Should we lose the database clients will be eventually "stuck" receiving new notes because the cursor they're persistently storing is way ahead in the future (and invalid). Frankly, I think we should probably make cursor a bit more structured: in addition to the sequence number we should maybe have a "generation count" in the cursor so that the note transport service can detect if a cursor submitted by a client is invalid? |
I agree with this, but on worst case (e.g., the catastrophic event) a client can at least always sync from 0.
I realize now that I also didn't copy the second message in my reply 🫠, but I suggested this as well:
|
|
Closing this for now, will open an new PR implementing a generation counter instead. |
Summary
Implements cursor reset described in 0xMiden/note-transport-service#97.
We now detect if the client's trying to use an invalid (too high) cursor value and reset the cursor to 0 in the response.
Changelog
Stack created with GitHub Stacks CLI • Give Feedback 💬