Skip to content

Conversation

@jbrazio
Copy link
Contributor

@jbrazio jbrazio commented Dec 9, 2025

This pull request updates the advertisement sending logic in the mesh examples to allow for both "flood" and "zero hop" advertisement modes. The changes introduce a new flood parameter to the sendSelfAdvertisement method, making it possible to specify the advertisement type. The initial advertisement sent during setup in all examples is now a zero hop advertisement.

The CLI command "advert" continues to use flood advertisements for backward compatibility, as the flood parameter is omitted (defaulting to true).

Adds a STEALTH_MODE switch to remove automatic node advertisement when booting and DISCOVER_REQ processing.

@jbrazio jbrazio changed the title Default to zero hop advert when booting Default to zero hop advert when booting + STEALTH_MODE flag Dec 10, 2025
@fdlamotte
Copy link
Collaborator

This behavior has already been discussed (and the fact that bootlooping repeaters are an issue)

Another change that should be included upon @ripplebiz decision ...

@jbrazio
Copy link
Contributor Author

jbrazio commented Dec 12, 2025

tbh I would prefer for repeaters not to issue any adverts during setup().. nevertheless I kept it backward compatible but having less impact on the network by using zh.

@mattzzw
Copy link
Contributor

mattzzw commented Dec 14, 2025

This would fix the DDOS/advert situation, see issue #1091

@jbrazio
Copy link
Contributor Author

jbrazio commented Dec 15, 2025

Implements #1217 (comment)

  -D MIN_LOCAL_ADVERT_INTERVAL=60
  -D MAX_LOCAL_ADVERT_INTERVAL=240
  -D MIN_FLOOD_ADVERT_INTERVAL=3
  -D MAX_FLOOD_ADVERT_INTERVAL=48

@mattzzw
Copy link
Contributor

mattzzw commented Dec 15, 2025

Why is local in minutes and flood in hours?

@jbrazio
Copy link
Contributor Author

jbrazio commented Dec 15, 2025

Why is local in minutes and flood in hours?

@ripplebiz

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.

3 participants