-
Notifications
You must be signed in to change notification settings - Fork 166
Conversation
Countermeasure 2 for `eclipse attack`
Reviewed 3 of 3 files at r1. p2p/discover/table.go, line 148 at r1 (raw file):
Old loop needs to be removed, as it overwrites the buckets with initialized p2p/discover/table.go, line 148 at r1 (raw file):
I can't see the initialization of p2p/discover/table_test.go, line 173 at r1 (raw file):
what about the "ping" functionality from p2p/distip/net.go, line 23 at r1 (raw file):
stringify key here, once. We don't need key in original form. p2p/distip/net.go, line 34 at r1 (raw file):
Same here. We can convert key to string once, before assigning to variable. p2p/distip/net.go, line 53 at r1 (raw file):
Why Comments from Reviewable |
Review status: 1 of 3 files reviewed at latest revision, 6 unresolved discussions. p2p/discover/table.go, line 148 at r1 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
Done. p2p/distip/net.go, line 23 at r1 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
Done. p2p/distip/net.go, line 34 at r1 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
Done. p2p/distip/net.go, line 53 at r1 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
Done. Comments from Reviewable |
Review status: 1 of 3 files reviewed at latest revision, 6 unresolved discussions, some commit checks failed. p2p/discover/table.go, line 148 at r1 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
Comments from Reviewable |
Reviewed 2 of 2 files at r2. Comments from Reviewable |
p2p/discover/table_test.go
Outdated
@@ -144,6 +144,39 @@ func fillBucket(tab *Table, ld int) (last *Node) { | |||
return b.entries[bucketSize-1] | |||
} | |||
|
|||
// This checks that the table-wide IP limit is applied correctly. | |||
func TestTable_IPLimit(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not clear to me what the difference should be between this test and TestTable_BucketIPLimit
..?
FYI My proposed changes from whilei@dfbe261 fix the panic
currently causing these tests to fail, but still this test fails because table ip limit is exceeded.
😕 Where are the other CI builds? |
yeap, have the same question. @tzdybal, @ia do you have admin access to check hooks in Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. Comments from Reviewable |
I changed settings right now, to enable running CI on PR's from forks. I'll try to trigger the build. |
solution: initial tests for receiver functions
solution: wait for tab initDone
|
And just bumping this question since it got "outdated" from merge -- #537 (comment) |
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. p2p/discover/table_test.go, line 148 at r2 (raw file): Previously, whilei (ia) wrote…
it calls Comments from Reviewable |
Reviewed 49 of 50 files at r3. coverage.tmp, line 1 at r3 (raw file):
I think we should remove this file. accounts/testdata/keystore/accounts.db, line 0 at r3 (raw file): p2p/distip/net_test.go, line 39 at r3 (raw file):
Test with more then one IP would be cool. Comments from Reviewable |
accounts/testdata/keystore/accounts.db, line at r3 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
affirmative
Comments from Reviewable |
Node managment inside buckets
Review status: 0 of 5 files reviewed at latest revision, 5 unresolved discussions. accounts/testdata/keystore/accounts.db, line at r3 (raw file): Previously, whilei (ia) wrote…
Done Comments from Reviewable |
Review status: 0 of 5 files reviewed at latest revision, 5 unresolved discussions. coverage.tmp, line 1 at r3 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
Done. Comments from Reviewable |
Reviewed 1 of 3 files at r1. Comments from Reviewable |
) * Apply source code formating provided by `go` tool * solution: remove not-to-be versioned accounts.db testdata * problem: should test distinctNetSet with >1 address solution: create test for dynamic number of ips problem: test fails * Fix for p2p table Node managment inside buckets * solution: remove coverage.tmp * Updated findnode mechanism to filter out local IPs * problem: test fails because that's not how distinctNetSet is supposed to work solution: use EF test for EF code
p2p/discover/table.go
Outdated
@@ -595,43 +610,69 @@ func (tab *Table) ping(id NodeID, addr *net.UDPAddr) error { | |||
return nil | |||
} | |||
|
|||
// add attempts to add the given node its corresponding bucket. If the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get rid of this?
Except for this questionable commented code hunk, LGTM |
Reviewed 1 of 50 files at r3, 2 of 4 files at r4, 5 of 6 files at r5, 2 of 2 files at r6, 1 of 1 files at r7. p2p/discover/udp.go, line 165 at r7 (raw file):
Why error? This is definitely not common config, but restriction looks quite arbitral. Comments from Reviewable |
p2p/discover/udp.go, line 165 at r7 (raw file): Previously, tzdybal (Tomasz Zdybał) wrote…
Because ports <1024 are "reserved", see https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers Comments from Reviewable |
p2p/discover/udp.go, line 165 at r7 (raw file): Previously, whilei (ia) wrote…
*"many ports <1024"... but not all Comments from Reviewable |
Countermeasure 2 for
eclipse attack