Remove gradient sync nonce and simplify replay handling#10459
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the “gradient sync” opt-in nonces and simplifies PhoneAPI’s initial sync by (a) always sending thin NodeInfo headers for peers and (b) draining cached satellite-DB data (positions/telemetry/environment/status) after config_complete_id, interleaved with live traffic in STATE_SEND_PACKETS.
Changes:
- Removed gradient-sync nonce definitions and the
clientWantsGradientSync()gate. - Replaced the four replay states with a
ReplayPhasemini-state-machine that drains inSTATE_SEND_PACKETS. - Updated Copilot instructions to describe the new default sync/replay flow.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/mesh/PhoneAPI.h |
Removes gradient nonce constants and introduces ReplayPhase helpers for post-sync replay. |
src/mesh/PhoneAPI.cpp |
Moves satellite replay to trail config_complete_id and interleave with live traffic; adjusts replay packet shaping (broadcast-like). |
.github/copilot-instructions.md |
Documents the new default sync flow (thin NodeInfos + post-complete replay drain). |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/cfa93978-e2e0-4dc2-ba5f-b82b5b43cef8 Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Applied the requested review-thread fixes in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| meshtastic_PositionLite TypeConversions::ConvertToPositionLite(meshtastic_Position position) | ||
| { | ||
| meshtastic_PositionLite lite = meshtastic_PositionLite_init_default; | ||
| lite.latitude_i = position.latitude_i; | ||
| lite.longitude_i = position.longitude_i; | ||
| lite.altitude = position.altitude; | ||
| lite.location_source = position.location_source; | ||
| lite.time = position.time; | ||
| lite.precision_bits = position.precision_bits; |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/41572cbc-408e-499d-b59e-00f330b5789f Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Applied the review-thread follow-ups in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
I'm willing to admit, the gradient sync was a good idea, but it was a mistake to add new nonces. We should just always split the telem and position sync post complete node sync. Tested and it's working great on iOS. I'll do some Android testing too.