-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Milestone
Description
Parent: #3404
Add a new OutboundIcmp target type (= 2) across the onchain program, SDKs, and CLI. This type is like Outbound (uses an IPv4 address) but instructs the geoprobe-agent to use ICMP pings instead of TWAMP probes. It does not need a location_offset_port or TWAMP port.
Changes
Smart Contract (smartcontract/programs/doublezero-geolocation/)
state/geolocation_user.rs: AddOutboundIcmp = 2toGeoLocationTargetTypeenum. UpdateDisplayimpl.processors/geolocation_user/add_target.rs: ValidateOutboundIcmptargets the same asOutbound(public IPv4 required), butlocation_offset_portshould be0(unused) andtarget_pkshould be default.processors/geolocation_user/remove_target.rs: HandleOutboundIcmpin target matching (same asOutbound— match by IP address).- Unit + integration tests: Add
OutboundIcmptest cases for add, remove, serialization round-trip.
Rust SDK (smartcontract/sdk/rs/)
geolocation/geolocation_user/add_target.rs: Add validation branch forOutboundIcmp(require public IP, reject non-default target_pk).geolocation/geolocation_user/remove_target.rs: HandleOutboundIcmpin remove validation.
Rust CLI (smartcontract/cli/)
geolocation/user/add_target.rs: AddOutboundIcmpto theTargetTypeclap enum. ForOutboundIcmp, require--target-ip, reject--target-pk, and don't require--target-port.geolocation/user/remove_target.rs: AddOutboundIcmpto theTargetTypeenum and handle it likeOutbound(match by IP).geolocation/user/get.rs: DisplayOutboundIcmptargets correctly inTargetDisplay.
Go SDK (sdk/geolocation/go/)
state.go: AddGeoLocationTargetTypeOutboundIcmp = 2. UpdateString()and deserialization validation bound.state_test.go: Add round-trip and string tests for the new type.
Acceptance
doublezero geolocation user add-target --type outbound-icmp --target-ip 8.8.8.8 --probe <probe>succeedsdoublezero geolocation user get --user <code>shows the target as typeoutbound-icmp- Go SDK deserializes
OutboundIcmptargets without error - All existing tests still pass
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels