Skip to content

Encourage adoption of regions and multi-byte hashes#2840

Open
ZjMNZHgG5jMXw wants to merge 1 commit into
meshcore-dev:devfrom
ZjMNZHgG5jMXw:sb/filter-distant-traffic
Open

Encourage adoption of regions and multi-byte hashes#2840
ZjMNZHgG5jMXw wants to merge 1 commit into
meshcore-dev:devfrom
ZjMNZHgG5jMXw:sb/filter-distant-traffic

Conversation

@ZjMNZHgG5jMXw

@ZjMNZHgG5jMXw ZjMNZHgG5jMXw commented Jun 25, 2026

Copy link
Copy Markdown

This patch defines two new settings for repeaters.

  • repeat.unrestricted.hops (default 64) defines the number of hops for which the repeater will not apply any restrictions to packets.
  • repeat.restrict.path.hash.size (default 1) defines the minimum path hash size which the repeater will require for repeating packets with restrictions applying.

How

The repeater will first look whether restrictions should apply to incoming packets by evaluating their path length and comparing them with repeat.unrestricted.hops. If the path length is exceeding this maximum and restrictions apply, packets without transport codes (aka scope or region) will be discarded. Packets with transport codes will be considered for repeating if their path hash size is at least matching the minimum repeat.restrict.path.hash.size. All other mainstream repeater restrictions (flood.max, flood.max.unscoped, flood.max.advert, scope/region logic, etc.) apply after these new checks.

The default values make sure that the new settings won't affect the repeater until explicitly set.

Why

The recommended settings will create a safe zone of three hops which newbies can use to get in contact with others no matter whether they have regions or hash sizes set to modern values. Other mesh users in this hop proximity can instruct these newbies how to adjust their settings for achieving a wider message distribution range, for instance by using regions and avoiding ID/path collisions by using multi-byte hash sizes.

Recommended settings

set repeat.unrestricted.hops 2       // the repeater will add itself as hop 3
set repeat.restrict.path.hash.size 2 // deny 1-byte, allow 2 and 3-byte hashes
region allowf *                      // reset to default
set flood.max 64                     // reset to no-op/default
set flood.max.unscoped 64            // reset to no-op/default
set flood.max.advert 8               // reset to default

@ZjMNZHgG5jMXw ZjMNZHgG5jMXw marked this pull request as draft June 26, 2026 05:30
@ZjMNZHgG5jMXw ZjMNZHgG5jMXw force-pushed the sb/filter-distant-traffic branch from 9be8825 to d1acd71 Compare June 26, 2026 05:38
@ZjMNZHgG5jMXw ZjMNZHgG5jMXw changed the base branch from main to dev June 26, 2026 05:39
@ZjMNZHgG5jMXw ZjMNZHgG5jMXw force-pushed the sb/filter-distant-traffic branch from d1acd71 to c4eef74 Compare June 26, 2026 05:41
@ZjMNZHgG5jMXw ZjMNZHgG5jMXw force-pushed the sb/filter-distant-traffic branch from c4eef74 to 598c0e0 Compare June 26, 2026 05:44
@ZjMNZHgG5jMXw ZjMNZHgG5jMXw marked this pull request as ready for review June 26, 2026 05:46
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.

1 participant