Be more patient: increase companion timeouts#1691
Open
weebl2000 wants to merge 1 commit intomeshcore-dev:devfrom
Open
Be more patient: increase companion timeouts#1691weebl2000 wants to merge 1 commit intomeshcore-dev:devfrom
weebl2000 wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
And use attempt to progressively wait longer. Currently we only wait 3-4 hops of airtime. When destination is 10-20 hops away we send 3 flood messages before the first one will have a chance of arriving.
|
Would love to see this tested in a dense mesh. I think this has a good chance of reducing flood packets from retries. |
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.
Increase base timeout constants and scale flood timeouts by attempt number.
Problem
The flood timeout (
500ms + 16× airtime) only covers ~3-4 hop round trips. Each forwarding node adds ~airtime + random(0-5)×airtime/2 delay, so a 10-20 hop destination needs 15-31 seconds round trip — but the timeout fires after ~6s, causing premature retries that add congestion and make subsequent attempts even less likely to succeed.Changes
Increased base constants:
SEND_TIMEOUT_BASE_MILLIS: 500 → 1000FLOOD_SEND_TIMEOUT_FACTOR: 16 → 32DIRECT_SEND_PERHOP_FACTOR: 6 → 10DIRECT_SEND_PERHOP_EXTRA_MILLIS: 250 → 500Attempt-based scaling for flood timeouts:
base_timeout × (attempt + 1)For a typical 345ms airtime packet (29B, SF8, BW62.5kHz, CR4/8):
Only
sendMessageandsendCommandDatapassattempt— other send functions (login, anon req, contact request) default toattempt=0, no behavior change.Build firmware: Build from this branch