Péter Szilágyi
b569550a39
p2p/discover: fix api issues caused by leveldb update
10 years ago
Péter Szilágyi
4992765032
p2p/discover: fix goroutine leak due to blocking on sync.Once
10 years ago
Péter Szilágyi
437cf4b3ac
p2p/discover: add node expirer and related tests
10 years ago
Péter Szilágyi
a136e2bb22
p2p/discover: parametrize nodedb version, add persistency tests
10 years ago
Péter Szilágyi
75fd738dea
p2p/discover: drop a superfluous warning
10 years ago
Péter Szilágyi
706da56f75
p2p/discover: wrap the pinger to update the node db too
10 years ago
Péter Szilágyi
85b4b44235
p2p/discover: use iterator based seeding, drop old protocol test
10 years ago
Péter Szilágyi
8de8f61d36
p2p/discover: write the basic tests, catch RLP bug
10 years ago
Péter Szilágyi
0201c04b95
p2p/discovery: fix issues raised in the nodeDb PR
10 years ago
Péter Szilágyi
8646365b42
cmd/bootnode, eth, p2p, p2p/discover: use a fancier db design
10 years ago
Péter Szilágyi
6def110c37
cmd/bootnode, eth, p2p, p2p/discover: clean up the seeder and mesh into eth.
10 years ago
Péter Szilágyi
971702e7a1
p2p/discovery: fix broken tests due to API update
10 years ago
Péter Szilágyi
af923c965f
p2p/discovery: use the seed table for finding nodes, auto drop stale ones
10 years ago
Péter Szilágyi
5f735d6fce
cmd, eth, p2p, p2p/discover: init and clean up the seed cache
10 years ago
Felix Lange
936c8e19ff
p2p/discover: store nodes in leveldb
10 years ago
Felix Lange
eedbb1ee9a
p2p/discover: use rlp.DecodeBytes
10 years ago
Felix Lange
0217652d1b
p2p/discover: improve timer handling for reply timeouts
10 years ago
Felix Lange
b8aeb04f6f
p2p/discover: remove unused field Node.activeStamp
10 years ago
Felix Lange
7be05b4b9d
p2p/discover: don't log packet content
10 years ago
Felix Lange
9cd8c96157
p2p/discover: make packet processing less concurrent
10 years ago
obscuren
688d118c7e
Updated logging
10 years ago
Felix Lange
a77c431e37
p2p/discover: fix off by one error causing buckets to contain duplicates
10 years ago
Felix Lange
de7af720d6
p2p/discover: implement node bonding
...
This a fix for an attack vector where the discovery protocol could be
used to amplify traffic in a DDOS attack. A malicious actor would send a
findnode request with the IP address and UDP port of the target as the
source address. The recipient of the findnode packet would then send a
neighbors packet (which is 16x the size of findnode) to the victim.
Our solution is to require a 'bond' with the sender of findnode. If no
bond exists, the findnode packet is not processed. A bond between nodes
α and β is created when α replies to a ping from β.
This (initial) version of the bonding implementation might still be
vulnerable against replay attacks during the expiration time window.
We will add stricter source address validation later.
10 years ago
Felix Lange
92928309b2
p2p/discover: add version number to ping packet
...
The primary motivation for doing this right now is that old PoC 8
nodes and newer PoC 9 nodes keep discovering each other, causing
handshake failures.
10 years ago
obscuren
4f5b362bda
%#x => %x
10 years ago
zelig
e150832734
p2p: server>discover table Self=Node exported
10 years ago
Felix Lange
2c505efd1e
p2p/discover: add NodeID.Pubkey
10 years ago
Felix Lange
7ea131d4ff
p2p/discover: fix pending replies iteration
...
Range expressions capture the length of the slice once before the first
iteration. A range expression cannot be used here since the loop
modifies the slice variable (including length changes).
10 years ago
Felix Lange
cf754b9483
p2p/discover: fix race in ListenUDP
...
udp.Table was assigned after the readLoop started, so
packets could arrive and be processed before the Table was there.
10 years ago
Felix Lange
170eb3ac68
p2p/discover: map listening port using configured mechanism
10 years ago
Felix Lange
82f0bd9009
p2p/discover: code review fixes
10 years ago
Felix Lange
9915d3c3be
p2p/discover: deflake UDP tests
10 years ago
Felix Lange
028775a086
cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes
10 years ago
Felix Lange
8564eb9f7e
p2p/discover: add node URL functions, distinguish TCP/UDP ports
...
The discovery RPC protocol does not yet distinguish TCP and UDP ports.
But it can't hurt to do so in our internal model.
10 years ago
Felix Lange
739066ec56
p2p/discover: add some helper functions
10 years ago
Felix Lange
12224c7f59
p2p/discover: new package implementing the Node Discovery Protocol
10 years ago