Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | p2p/discover: prevent bonding self | Felix Lange | 2016-05-03 | 1 | -0/+4 |
| | |||||
* | all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}() | Ricardo Catalinas Jiménez | 2016-02-22 | 1 | -3/+3 |
| | | | | As we aren't really using the standarized SHA-3 | ||||
* | p2p, p2p/discover: track bootstrap state in p2p/discover | Felix Lange | 2015-12-18 | 1 | -37/+68 |
| | | | | | | This change simplifies the dial scheduling logic because it no longer needs to track whether the discovery table has been bootstrapped. | ||||
* | p2p/discover: support incomplete node URLs, add Resolve | Felix Lange | 2015-12-18 | 1 | -2/+24 |
| | |||||
* | node: customizable protocol and service stacks | Péter Szilágyi | 2015-11-27 | 1 | -4/+3 |
| | |||||
* | p2p/discover: remove unused lastLookup field | Felix Lange | 2015-09-30 | 1 | -6/+1 |
| | |||||
* | p2p/discover: fix race involving the seed node iterator | Felix Lange | 2015-09-30 | 1 | -56/+105 |
| | | | | | | | | | | | | | | | | | | | nodeDB.querySeeds was not safe for concurrent use but could be called concurrenty on multiple goroutines in the following case: - the table was empty - a timed refresh started - a lookup was started and initiated refresh These conditions are unlikely to coincide during normal use, but are much more likely to occur all at once when the user's machine just woke from sleep. The root cause of the issue is that querySeeds reused the same leveldb iterator until it was exhausted. This commit moves the refresh scheduling logic into its own goroutine (so only one refresh is ever active) and changes querySeeds to not use a persistent iterator. The seed node selection is now more random and ignores nodes that have not been contacted in the last 5 days. | ||||
* | p2p/discover: don't attempt to replace nodes that are being replaced | Felix Lange | 2015-08-19 | 1 | -4/+11 |
| | | | | | | | | PR #1621 changed Table locking so the mutex is not held while a contested node is being pinged. If multiple nodes ping the local node during this time window, multiple ping packets will be sent to the contested node. The changes in this commit prevent multiple packets by tracking whether the node is being replaced. | ||||
* | p2p/discover: unlock the table during ping replacement | Felix Lange | 2015-08-11 | 1 | -48/+73 |
| | | | | | | Table.mutex was being held while waiting for a reply packet, which effectively made many parts of the whole stack block on that packet, including the net_peerCount RPC call. | ||||
* | p2p/discover: close Table during testing | Felix Lange | 2015-08-06 | 1 | -1/+3 |
| | | | | Not closing the table used to be fine, but now the table has a database. | ||||
* | all: fix license headers one more time | Felix Lange | 2015-07-24 | 1 | -1/+1 |
| | | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a. | ||||
* | all: update license headers to distiguish GPL/LGPL | Felix Lange | 2015-07-23 | 1 | -4/+4 |
| | | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library". | ||||
* | all: update license information | Felix Lange | 2015-07-07 | 1 | -0/+16 |
| | |||||
* | p2p/discover: deflake TestUDP_successfulPing | Felix Lange | 2015-06-10 | 1 | -0/+8 |
| | |||||
* | p2p/discover: bond with seed nodes too (runs only if findnode failed) | Péter Szilágyi | 2015-05-27 | 1 | -7/+4 |
| | |||||
* | p2p/discovery: fix a cornercase loop if no seeds or bootnodes are known | Péter Szilágyi | 2015-05-27 | 1 | -5/+9 |
| | |||||
* | p2p/discover: force refresh if the table is empty | Péter Szilágyi | 2015-05-27 | 1 | -13/+41 |
| | |||||
* | p2p/discover: permit temporary bond failures for previously known nodes | Péter Szilágyi | 2015-05-27 | 1 | -12/+15 |
| | |||||
* | p2p/discover: watch find failures, evacuate on too many, rebond if failed | Péter Szilágyi | 2015-05-27 | 1 | -8/+47 |
| | |||||
* | p2p/discover: add ReadRandomNodes | Felix Lange | 2015-05-25 | 1 | -0/+49 |
| | |||||
* | p2p/discover: fix #838, evacuate self entries from the node db | Péter Szilágyi | 2015-05-22 | 1 | -2/+2 |
| | |||||
* | p2p/discover: bump maxBondingPingPongs to 16 | Felix Lange | 2015-05-14 | 1 | -1/+1 |
| | | | | | This should increase the speed a bit because all findnode results (up to 16) can be verified at the same time. | ||||
* | p2p/discover: new distance metric based on sha3(id) | Felix Lange | 2015-05-06 | 1 | -24/+30 |
| | | | | | | | The previous metric was pubkey1^pubkey2, as specified in the Kademlia paper. We missed that EC public keys are not uniformly distributed. Using the hash of the public keys addresses that. It also makes it a bit harder to generate node IDs that are close to a particular node. | ||||
* | p2p/discover: track sha3(ID) in Node | Felix Lange | 2015-04-30 | 1 | -5/+6 |
| | |||||
* | p2p/discover: new endpoint format | Felix Lange | 2015-04-30 | 1 | -7/+2 |
| | | | | | | This commit changes the discovery protocol to use the new "v4" endpoint format, which allows for separate UDP and TCP ports and makes it possible to discover the UDP address after NAT. | ||||
* | p2p/discover: fix goroutine leak due to blocking on sync.Once | Péter Szilágyi | 2015-04-28 | 1 | -1/+1 |
| | |||||
* | p2p/discover: add node expirer and related tests | Péter Szilágyi | 2015-04-27 | 1 | -0/+2 |
| | |||||
* | p2p/discover: parametrize nodedb version, add persistency tests | Péter Szilágyi | 2015-04-27 | 1 | -2/+2 |
| | |||||
* | p2p/discover: wrap the pinger to update the node db too | Péter Szilágyi | 2015-04-27 | 1 | -4/+15 |
| | |||||
* | p2p/discover: write the basic tests, catch RLP bug | Péter Szilágyi | 2015-04-27 | 1 | -1/+1 |
| | |||||
* | p2p/discovery: fix issues raised in the nodeDb PR | Péter Szilágyi | 2015-04-27 | 1 | -3/+2 |
| | |||||
* | cmd/bootnode, eth, p2p, p2p/discover: use a fancier db design | Péter Szilágyi | 2015-04-24 | 1 | -11/+25 |
| | |||||
* | cmd/bootnode, eth, p2p, p2p/discover: clean up the seeder and mesh into eth. | Péter Szilágyi | 2015-04-24 | 1 | -13/+10 |
| | |||||
* | p2p/discovery: use the seed table for finding nodes, auto drop stale ones | Péter Szilágyi | 2015-04-24 | 1 | -2/+8 |
| | |||||
* | cmd, eth, p2p, p2p/discover: init and clean up the seed cache | Péter Szilágyi | 2015-04-24 | 1 | -3/+13 |
| | |||||
* | p2p/discover: store nodes in leveldb | Felix Lange | 2015-04-24 | 1 | -1/+2 |
| | |||||
* | p2p/discover: remove unused field Node.activeStamp | Felix Lange | 2015-04-13 | 1 | -1/+0 |
| | |||||
* | p2p/discover: fix off by one error causing buckets to contain duplicates | Felix Lange | 2015-04-01 | 1 | -1/+1 |
| | |||||
* | p2p/discover: implement node bonding | Felix Lange | 2015-04-01 | 1 | -50/+133 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | p2p: server>discover table Self=Node exported | zelig | 2015-03-15 | 1 | -3/+3 |
| | |||||
* | p2p/discover: code review fixes | Felix Lange | 2015-02-13 | 1 | -4/+4 |
| | |||||
* | p2p/discover: deflake UDP tests | Felix Lange | 2015-02-09 | 1 | -1/+2 |
| | |||||
* | cmd/ethereum, cmd/mist: add flag for discovery bootstrap nodes | Felix Lange | 2015-02-07 | 1 | -2/+2 |
| | |||||
* | p2p/discover: add node URL functions, distinguish TCP/UDP ports | Felix Lange | 2015-02-07 | 1 | -193/+4 |
| | | | | | The discovery RPC protocol does not yet distinguish TCP and UDP ports. But it can't hurt to do so in our internal model. | ||||
* | p2p/discover: add some helper functions | Felix Lange | 2015-02-06 | 1 | -8/+29 |
| | |||||
* | p2p/discover: new package implementing the Node Discovery Protocol | Felix Lange | 2015-02-06 | 1 | -0/+447 |