Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial peer scoring implementation to detect problematic nodes #36

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ac952ea
Add basic integration test using the simulator
devonh Jan 28, 2022
7b02958
Add basic integration test for snake neighbours
devonh Jan 28, 2022
3a055b0
Fix event api race condition when first subscribing to a node
devonh Jan 29, 2022
51e0672
Move integration tests to live alongside router code
devonh Jan 29, 2022
1d8ddb6
Refactor integration tests to be able to reuse validation functions
devonh Jan 29, 2022
f40c3d1
Add simple adversary integration tests
devonh Jan 30, 2022
1eabba5
Annotate integration test functions with param names
devonh Jan 30, 2022
54033d7
Add null events to sim command interface
devonh Jan 31, 2022
f153699
Add ping/pong packet types to drop packets filter
devonh Jan 31, 2022
61d48ce
Update router filter logging for more details
devonh Jan 31, 2022
4f9086f
Don't update sim graph if not being used
devonh Jan 31, 2022
67e9c1f
Add logging on successful sim snek ping/pong
devonh Jan 31, 2022
58555a2
Add adversarial integration tests
devonh Jan 31, 2022
a7133f7
Allow for running specific test cases since using run isn't working
devonh Feb 10, 2022
d0b3cd8
Rename adversary test to better align with new test parameters
devonh Feb 10, 2022
02a66ca
Fix bug where bootstrap ack was handled incorrectly (#31)
devonh Feb 23, 2022
32cd2d9
Fix buffer size checks for un/marshal snake bootstrap (#32)
devonh Feb 24, 2022
70b73bb
Initial prototype to assist nodes failing to bootstrap
devonh Feb 26, 2022
b01af6d
Test out peer scoring on bootstrap setup frames
devonh Mar 8, 2022
23b411b
Add peer scoring to failing bootstrap frames
devonh Mar 8, 2022
3a583ce
Rearrange bootstrap ack signature verification
devonh Mar 8, 2022
624c122
Limit number of neglected nodes being tracked
devonh Mar 9, 2022
be09fc3
Fix scoring for acknowledged bootstrap frames
devonh Mar 9, 2022
55dcc7d
Remove exploit due to manipulating bootstrap attempt count
devonh Mar 9, 2022
16648c4
Add ack settling time to prevent preemptive peer scoring
devonh Mar 9, 2022
a6578b7
Cleanup peer scoring reset call sites
devonh Mar 9, 2022
03f3fc8
Swap attempt cout for single failing byte
devonh Mar 22, 2022
b5de1e3
Update snake frame size check
devonh Mar 23, 2022
9a8eba7
Switch to per peer score accumulation
devonh Mar 24, 2022
244d399
Silently drop duplicate frames with bootstrap failures
devonh Mar 26, 2022
06f1be7
Ensure peer is still running before resetting the score accumulator
devonh Mar 26, 2022
fd97796
Don't crash simulator when root node cannot be interpreted
devonh Mar 26, 2022
ea63fa2
Add back in logging when negative peer scoring is being applied
devonh Mar 26, 2022
b596ff7
Add simulator sequences for testing sybil attacks
devonh Mar 26, 2022
8a41db8
Merge main into resilient-snek
devonh Mar 26, 2022
a4fbd6c
Merge branch 'main' into resilient-snek
neilalexander Mar 29, 2022
e071b42
Disable peer scoring by default behind a feature flag
devonh Apr 26, 2022
8225a1b
Merge remote-tracking branch 'origin/main' into resilient-snek
devonh Apr 26, 2022
f7a7f0d
Cleanup unused code
devonh Apr 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add logging on successful sim snek ping/pong
  • Loading branch information
devonh committed Jan 31, 2022
commit 67e9c1f281ad8f1aa52511729116851232c89bf5
1 change: 1 addition & 0 deletions cmd/pineconesim/simulator/pathfind.go
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ func (sim *Simulator) PingSNEK(from, to string) (uint16, time.Duration, error) {
}

success = true
sim.log.Printf("Successful ping from %s to %s", from, to)
sim.ReportDistance(from, to, int64(hops), true)
return hops, rtt, nil
}