geolocation: add result destination for LocationOffsets#3480
Open
geolocation: add result destination for LocationOffsets#3480
Conversation
a822d1c to
baf7ff2
Compare
baf7ff2 to
a0d9f8e
Compare
84e4f3b to
569f815
Compare
Base automatically changed from
bdz/geolocation-alt-offset-onchain-only
to
main
April 10, 2026 20:16
Rust SDK command, CLI with client-side destination validation, display in user get, Go SDK deserialization with backwards compatibility.
a0d9f8e to
cd0e330
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #3468
Summary of Changes
SetResultDestinationCommandthat builds the onchain transaction with user PDA + probe account metasuser set-result-destination --destination <host:port>(or--clear) with client-side validation of IP routability and domain format before transaction submissionresult_destinationinuser getoutput (shows"none"when unset)ResultDestination stringfield onGeolocationUserwith backwards-compatible deserialization (old accounts default to"")Stacked on #3501 which adds the onchain
SetResultDestinationinstruction andresult_destinationfield.Diff Breakdown
Core logic is the CLI command (290 lines including validation + tests), Rust SDK command (118 lines), and Go SDK deserialization. Scaffolding is trait wiring and subcommand registration.
Key files (click to expand)
smartcontract/cli/src/geolocation/user/set_result_destination.rs— CLI command with clap args, client-sidehost:portvalidation (IP routability + domain format per RFC 1035), mock tests for set/clear/invalid inputssmartcontract/sdk/rs/src/geolocation/geolocation_user/set_result_destination.rs— Rust SDK command: validates code, derives user PDA, passes probe account metas toexecute_transactionsdk/geolocation/go/state.go—ResultDestination stringfield, serialize/deserialize with try-decode-default for backwards compatsdk/geolocation/go/state_test.go— round-trip and backwards-compat tests (truncated data defaults to empty)smartcontract/cli/src/geoclicommand.rs—set_result_destinationtrait method + implTesting Verification