Skip to content

fix: enforce sequence bounds on remote mutable replies - #66

Merged
rklaehn merged 1 commit into
mainfrom
fix/validate-lookup-responses
Nov 18, 2026
Merged

rklaehn merged 1 commit into
mainfrom
fix/validate-lookup-responses

Conversation

@rklaehn

@rklaehn rklaehn commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

A remote node can answer a mutable lookup with a correctly signed value whose sequence number does not satisfy more_recent_than. Previously the client delivered that value and cached it for subscribers to the active lookup.

Check the requested sequence bound after validating the value. Only values with a strictly greater sequence number reach subscribers or the active lookup's response cache. Valid older replies still contribute nodes and tokens as before.

Validation: 128 tests pass with cargo test --locked --all-features --all-targets -- --skip put_get_mutable_real_dht (the skipped test writes to the public DHT). A loopback UDP regression checks no bound, a lower bound, and equal/higher bounds against a responder that ignores the requested sequence. Formatting, diff checks, and Clippy with -D warnings pass.

@rklaehn
rklaehn merged commit d5cf5f8 into main Nov 18, 2026
3 checks passed
@rklaehn
rklaehn deleted the fix/validate-lookup-responses branch November 18, 2026 13:10
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.

1 participant