#2698·node

Decide the lifecycle of unconfirmed notes in note transport

Author: kkovaacsCreated Sep 25, 2026Updated Sep 27, 2026

The note transport API currently accepts notes through both SendNote and SendNoteWithProof. SendNote stores a valid private note without checking whether it is committed on chain. Its optional after_block_num is an unverified hint for recipients. SendNoteWithProof verifies the note’s inclusion proof against the configured node’s block note root, then stores the verified block number.

Both methods use the same storage limits and retention policy. The default retention is 30 days, and the default storage cap is 1 GiB. Notes are expired by insertion time; cleanup is lazy and removes at most 10 expired notes during an insertion. There is no per-caller rate limit or authentication in the service. The global byte cap limits total payload storage, but a caller able to submit notes can fill that capacity with unconfirmed notes and block later submissions until space is reclaimed.

Why this needs a decision

Clients are moving to submit notes only after they are committed on chain, with an inclusion proof. That makes SendNote unnecessary for the intended client flow. Keeping it allows callers to submit unconfirmed notes that receive the same long retention as verified notes, which creates a storage exhaustion risk and may leave recipients with notes that never become usable.

The service currently uses its node RPC client to fetch a block header by height for proof verification. It does not run a chain-sync process or promote existing notes when they become committed. A promotion feature would need a way to check pending note IDs against chain state, update their commitment status, and apply the longer retention policy. The current RPC has GetNotesById, which may be useful to investigate, but the service does not use it today.

Options

  1. Remove or disable SendNote. Make proof-bearing submission the only write path. This aligns the API with the new client flow and avoids retaining arbitrary unconfirmed notes. Consider protobuf/API compatibility for existing clients and whether to remove after_block_num from fetched notes.

  2. Keep SendNote with protections and short retention. Add controls such as authentication or per-client quotas/rate limits, retain unconfirmed notes for only a few minutes, and keep the longer retention for verified notes. The policy needs to account for deployment behind proxies, where caller IP limits may be ineffective or misleading.

  3. Keep SendNote and promote notes after confirmation. Store unconfirmed notes briefly, then have the service check chain state and promote confirmed notes to the longer retention period. This preserves early note delivery, but adds sync/checkpointing, database state transitions, and recovery behavior. It also needs a clear answer for how the service detects commitment reliably and handles reorgs.

Questions

  • Should SendNote be removed, or retained for a bounded use case?
  • If retained, which abuse control is required, and what should the unconfirmed-note lifetime be?
  • Should confirmation promotion be part of this service, or should clients submit only after commitment?
  • What compatibility and rollout policy should apply to the existing RPC and fetched-note fields?