bridge: each node draws its own receiver noise - #23
Merged
Merged
Conversation
The chip model's noise seed was never set, so every native node ran the same receiver-noise stream from the same counter. That stream is what a node seeds its RNG from - fast_rng.begin(radio.getRngSeed()) reads it - so every node's CSMA backoff and advert jitter were correlated across the whole mesh, and any result that depends on two nodes not choosing the same slot was optimistic or pessimistic in a way nothing measured. The chip's noise seed now defaults to the node's identity seed, which the simulator already makes distinct per node, XORed so it is not literally the number the keypair is also derived from. --noise-seed overrides it for a caller that wants to set it directly. This is the native half of the per-node noise the emulated backend already had (MeshBench/meshbench#556). MeshBench/meshbench#720 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q9HbD44EKWWTRYgxbFGxf6
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.
Every native node ran the chip model's noise stream from the same seed (0) and the same counter, so every node's
fast_rng(fast_rng.begin(radio.getRngSeed()), which reads the chip's random register) was seeded identically. CSMA backoff and advert jitter were correlated across the whole mesh (MeshBench/meshbench#720).The chip's noise seed now defaults to the node's identity seed - which the simulator already makes distinct per node via
--seed- XORed with a constant so it is not literally the number the keypair is derived from.--noise-seed Noverrides it. This is the native equivalent of the per-node noise the emulated chip got in MeshBench/meshbench#556 (vsx_set_noise_seed); the vendoredvirtual-sx1262already exposessetNoiseSeed, it was simply never called.Unknown args are ignored by the parser, so an older simulator that does not send
--noise-seedstill gets per-node noise from the identity-seed default.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9HbD44EKWWTRYgxbFGxf6