* Add optional hop limiting to overlay traffic
* Cleanup commented code
* Add optional broadcast functionality for wakeup messages
* Update simulator to better handle changing network connections.
* Update wireshark plugin
* Fix frame tests
* Fix incorrect broadcast signature verification
* Move broadcast consts to consts file
* Only send broadcasts on the best connection to a peer
* Send broadcast immediately to newly added peer
* Fix broadcast frame marshalling
* Move keepalive timeouts to consts file
* Hook broadcasts into the sim logic
* Add broadcast info to sim ui
* Fix sim broadcast timestamps
* Add proper timestamps to broadcast events
* Drain timer when disabling broadcasts
* Update licensing comments for new broadcast files
* Remove unnecessary logging
* Filter broadcasts based on time since last seen broadcast
* Fix traffic forwarding comment
* Only send broadcasts to peer using best connection
* Ensure bootstraps have same root key and sequence
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* Hybrid routing
* Clear the coords cache when the root changes
* Define `coordsCacheLifetime`
* Refactor sim pings to use router FilterFn for hop counting
* Various tweaks, fix stretch calc, two packet types again temporarily
* Back to a single packet type again
* Speed up sim, link prioritisation for tree routing
* Put consts together
* Preamble pings so `simws` peers don't cause panics
* Don't drop things that aren't pings
* Smaller tree announcements
* Don't send a watermark when tree-routing
* Fix frame test and add new test for hybrid routing variants
* Cleanup sim adversaries to match new protocol types
* Refactor sim stretch reporting
* Start ping hop count at 1 since dest node doesn't increment count
* Move coords cache timer interval to a constant
* Add TODO
Co-authored-by: Devon Hudson <devonhudson@librem.one>
* Initial soft-state testing
* Fix `pineconeip`
* Try raising the intervals a bit
* Tighter expiry
* Tweaks
* Try to speed up convergence but reduce idle noise
* More tweaks
* Handle disconnections on destination ports, tweak next-hops
* All traffic is either bootstrap or not, more tweaking
* Protocol calming, loop detection, bootstrap signatures
* Tidy up sim
* Fix unit test
* Don't drop pong responses as looping traffic
* Remove unused snake path id
* Remove unused variable from nextHopsSNEK
* Unassign setup acks capability from soft state capabilites
* Cleanup comments to reflect new softstate logic
* Remove unused candidate variable from state
* Update sim and events to reflect softstate changes
* Update wireshark dissector to match softstate frames
* Add unit test for snake bootstrap
* Fix incorrect comment about bootstrap forwarding conditions
* Add `queue` interface
* Initial docs update for softstate algorithm
* Softstate doc updates
* Fix logic for selecting lowest latency links
* Update docs with watermark information (#52)
* Update docs with watermark information
* Further clarifications to watermark docs
* Fix `pinecone.lua`
Co-authored-by: Devon Hudson <devonhudson@librem.one>
* Remove duplicate coordinate info from frames
* Update unit tests to match new frame layouts
* Remove frame ID offset for ping frames
* Update wireshark dissector to match new frame layouts
* Sim - display keys as capital hex
* Sim - add more details to node hover text
* Sim - add basic sim commands into ws api
* Sim - use an actor for running simulator event sequences
* Sim - handle AddNode command
* Fully reset state when all peers disconnect
* Sim - implement AddPeer and RemovePeer functionality
* Sim - Add state debug command to log all node state
* Sim - add remove node functionality to sim server
* Sim - use enums in ui code for update/command message IDs
* Sim - extract api enums into a separate file
* Sim - refactor server api so other modules can send commands
* Sim - swap letters for icons and add tool panel to ui
* Sim - bump up ui button margins
* Sim - unify approach to ui overlay buttons
* Sim - add multiselect and hook up node removal
* Sim - handle edge cases when removing node from ui
* Sim - fully stub out toolbox ui
* Sim - small UI tweaks
* Sim - show all selected nodes in the right panel
* Sim - hook up node and peer creation ui
* Sim - add feature to remove peer connections from ui
* Sim - fix edge case when trying to delete the same peering twice
* Sim - stub out play/pause commands
* Sim - add feature to import and play event sequence from a file
* Sim - fix ui bug where removing nodes didn't update stats panel
* Sim - add feature to play/pause event sequences
* Sim - log when a user event listener closes
* Sim - improve event sequence import validation
* Sim - refactor event sequence validation to own function
* Sim - Add adversary configuration commands to sim api
* Sim - Add node type select to node creation form
* Sim - work towards adversarial nodes
* Sim - fix handling of adversary peer settings command
* Sim - update drop rates with chosen adversary template
* Sim - add node type information to simulator state
* Sim - set adversary node colour to red
* Sim - adversary node work
* Sim - adversary now drops packets appropriately
* Sim - fix bug where disconnected peer state wasn't updated properly
* Sim - add adversary configuration options to ui
* Sim - refactor peer option override checkbox
* Sim - update example sequences to show more full use cases
* Sim - fix unsanitized logging
* Sim - escape html meta-characters for ui sliders
* Sim - parse slider inner value as number
* Sim - refactor ui by breaking out forms into separate files
* A few minor tweaks to reduce duplicate timers, letting GC do some work for us
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* Parent tweaks
* Remove separate root record
* Fix bugs in spanning tree
* Other bug fixes
* Tweaks
* Some light refactoring to see if we can improve de-parenting performance (although still not functioning as well as I'd like...)
* Detect ancestor parent changes, tweaks
* Various refactoring, fixes and tweaks that might hopefully make parent selection less horrible
* Simplify parent selection again (extra iterations are ultimately unnecessary)
* Reuse port numbers if possible, bug fixes
* Well this isn't an improvement at all
* Refactor announcements a bit
* Refactor peer management
* Refactor root sequence
* Various tweaks
* Well that was incredibly tedious
* Tuning
* Check direct peers in default case
* Bootstrap faster if we lose the port that our ascending node was reachable via
* De-race SNEK a bit
* The moment a peer is cancelled, it should be marked as no longer started
* This is backward-incompatible