Skip to content

geoprobe: geoProbe server (doublezero-geoprobe-agent) #2900

@nikw9944

Description

@nikw9944

RFC Reference: rfc16-geolocation-verification.md — Phase 1, item 2 (geoProbe server)
Tracking issue: #2893

Goal

Build a new Go service that acts as the intermediary Probe: reflects TWAMP from DZDs, receives DZD Offsets, measures RTT to targets, generates composite Offsets with DZD references, and delivers them to targets.

Scope

  • New binary at controlplane/telemetry/cmd/geoprobe-agent/main.go
  • CLI flags: --additional-parents (DZD pubkeys + addresses), --additional-targets (target IPs), -verbose
  • TWAMP Reflector: reuse twamplight.Reflector from tools/twamp/pkg/light/ to respond to DZD probes
  • UDP Listener (port 8923): receive signed LocationOffset datagrams from DZDs
  • Signature Verifier: validate Ed25519 signatures on incoming DZD Offsets using the shared geoprobe library
  • Offset Cache: store recent DZD Offsets keyed by DZD pubkey in memory, with configurable TTL (max_offset_age_seconds) and max size
  • Target Measurement: measure RTT to targets via TWAMP (for Phase 1 POC per RFC)
  • Composite Offset Generation: create new LocationOffset with DZD Offset(s) as references, sign with probe's keypair
  • UDP Sender: post composite Offset to targets on port 8923
  • Key management: should follow the pattern established in controlplane/telemetry

Composite offset details

  • RttNs is the sum of the reference RTT plus measured RTT to target
  • lat/lng is copied from the reference (in this POC phase there will only be 1 reference)

Components

  • main.go — flag parsing, component wiring, goroutine management (following patterns from existing cmd/telemetry/main.go)
  • Offset cache — in-memory map with TTL eviction
  • TWAMP pinger for targets — reuse TWAMP implementation in controlplane/telemetry
  • Composite offset builder — attaches DZD offset references and computes total RttNs

Files to create

  • controlplane/telemetry/cmd/geoprobe-agent/main.go

Estimated scope

Large (~500+ lines)

Dependencies

Depends on #2898 (shared geoprobe library). Independent of Issue 2.

Other

  • Only make 1 changelog entry per component
  • If you’re working on the RFC, add a review to make sure there’s nothing in the code that’s not strictly required for the rfc
  • Run go-fmt before you commit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions