Skip to content

Geolocation: add location and timing fields to signed TWAMP replies for paired probing#3194

Merged
ben-dz merged 5 commits intomainfrom
bdz/inbound-probe-measurement
Mar 6, 2026
Merged

Geolocation: add location and timing fields to signed TWAMP replies for paired probing#3194
ben-dz merged 5 commits intomainfrom
bdz/inbound-probe-measurement

Conversation

@ben-dz
Copy link
Contributor

@ben-dz ben-dz commented Mar 6, 2026

Resolves: #3190

Summary of Changes

  • Extend the signed TWAMP reply packet with five new fields (MeasurementSlot, Lat, Lng, SinceLastRxNs, RttNs) and embed DZD LocationOffset blobs, enabling inbound geolocation probing for TEE-based targets that cannot measure time
  • Implement paired probing in the target-sender: two probes sent back-to-back let the reflector compute the inter-arrival delta (SinceLastRxNs) as a proxy RTT
  • Add IP-binding for probe pairs on the reflector — both probes in a pair must originate from the same source IP, preventing cross-sender interference
  • Add pair-based rate limiting (2 probes per window per sender pubkey) to bound reply throughput
  • Add ParseOffsetInfo to extract location/timing data from Borsh-encoded LocationOffset blobs without importing the full geoprobe package
  • Re-add probe signature verification logging in the target-sender for defense-in-depth audit trails
  • Update RFC16 to document the paired-probing inbound measurement flow (steps 5–9)

Related: RFC16 — Geolocation Verification

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 4 +319 / -146 +173
Tests 3 +321 / -57 +264
Docs 1 +36 / -19 +17
Config/build 1 +1 / -1 0

~60% of the diff is test coverage; core logic is concentrated in 4 files.

Key files (click to expand)

Testing Verification

  • All tools/twamp/pkg/signed/... tests pass (38 tests), including new tests for IP-binding rejection, second-probe signature rejection, pair-based rate limiting with SinceLastRxNs assertions, and ParseOffsetInfo field-skip validation
  • All controlplane/telemetry/cmd/geoprobe-target-sender/... tests pass with updated paired-probe output format
  • geoprobe-agent binary builds cleanly
  • Manual end-to-end testing with deployed geoprobe-agent and target-sender binaries

@ben-dz ben-dz added this to the Geo Location milestone Mar 6, 2026
@ben-dz ben-dz marked this pull request as ready for review March 6, 2026 21:27
@ben-dz ben-dz requested a review from snormore March 6, 2026 21:27
@ben-dz ben-dz enabled auto-merge (squash) March 6, 2026 22:29
@ben-dz ben-dz merged commit 7f08e72 into main Mar 6, 2026
30 checks passed
@ben-dz ben-dz deleted the bdz/inbound-probe-measurement branch March 6, 2026 22:37
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.

geolocation: Update inbound probing to include time delta since last inbound

2 participants