Skip to content

cli: show exchange code and signing pubkey in geolocation probe list#3723

Merged
ben-dz merged 1 commit into
mainfrom
bdz/geolocation-probe-list-pks
May 21, 2026
Merged

cli: show exchange code and signing pubkey in geolocation probe list#3723
ben-dz merged 1 commit into
mainfrom
bdz/geolocation-probe-list-pks

Conversation

@ben-dz
Copy link
Copy Markdown
Contributor

@ben-dz ben-dz commented May 19, 2026

Summary of Changes

  • doublezero geolocation probe list now displays the exchange's code (e.g. ams) instead of the exchange pubkey, falling back to the pubkey string when the exchange can't be resolved.
  • Added a signing_pubkey column (sourced from the probe's metrics_publisher_pk) so users can see which key the geoprobe is signing with probe get per row. Allows a user to fill out a target's CLI arguments from only probe list, rather than having to subsequently run a probe get.
  • Added list_exchanges() to the GeoCliCommand trait so the geolocation CLI can pull exchanges via the serviceability client and map pubkey → code in a single pass.
  • Behavior change for JSON consumers: the exchange field is now the code string instead of the pubkey string.

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 2 +104 / -6 +98
Docs 1 +1 / 0 +1

Production change is ~17 lines; the bulk is updated tests covering the new output and the unknown-exchange fallback.

Key files (click to expand)
  • smartcontract/cli/src/geolocation/probe/list.rs — swap exchange: Pubkey for resolved exchange: String + new signing_pubkey column; fetch exchanges in execute; tests updated and new fallback test added
  • smartcontract/cli/src/geoclicommand.rs — add list_exchanges() to the GeoCliCommand trait and implement it on GeoCliCommandImpl using the serviceability client
  • CHANGELOG.md — entry for the new column / display change

Testing Verification

  • cargo test -p doublezero_cli --lib — 329 tests pass, including 4 in geolocation::probe::list (one new test, test_cli_geo_probe_list_table_unknown_exchange_falls_back_to_pubkey, covers the pubkey fallback when the exchange map is missing the entry).
  • Manually checked the doublezero geolocation probe list behavior.

@ben-dz ben-dz force-pushed the bdz/geolocation-probe-list-pks branch from 5d359a5 to c91fc10 Compare May 21, 2026 12:18
@ben-dz ben-dz enabled auto-merge (squash) May 21, 2026 12:18
@ben-dz ben-dz merged commit f7a06e1 into main May 21, 2026
33 checks passed
@ben-dz ben-dz deleted the bdz/geolocation-probe-list-pks branch May 21, 2026 12:36
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.

2 participants