29 votes
Accepted

What are the peer discovery mechanisms involved in Ethereum?

The peer discovery algorithm is based on the kademlia protocol. More details: https://github.com/ethereum/devp2p A standalone implementation can be found here. Edit: A simplified model of how the p2p ...
Sebi's user avatar
  • 5,284
7 votes
Accepted

What is parity bootnode role in a private network an how should I setup it?

Bootnodes are the nodes which provide information about other peers, txns, blocks. Once that information is received, bootnode does not need to be online. But bootnodes are always kept online, because ...
Ayushya's user avatar
  • 1,698
7 votes

What are the peer discovery mechanisms involved in Ethereum?

The accepted answer is not correct. The bootnodes are unreliable. A node can get blacklisted from the bootnodes and the bootnodes are sometimes unavailable without any apparent reason. The Ethereum ...
Sentinel's user avatar
  • 1,238
7 votes
Accepted

Can one use ethereum as a client over Tor?

Ethereum requires UDP port 30301 for node discovery, and Tor only supports TCP-based transport. It's likely that your blockchain sync hasn't started because your client can't find any peers.
Richard Horrocks's user avatar
6 votes

Why is Geth ignoring --nodiscover?

I've had the same issue. It appears that --nodiscover is just disabling your node from running node-discovering algorithm to find peers to connect, but it doesn't prevent others from discovering and ...
xiaoyao's user avatar
  • 273
6 votes
Accepted

How do nodes find peers without bootnodes?

yes there is some built-in bootstrap nodes you could check the code in github : Geth : https://github.com/ethereum/go-ethereum/blob/ff2c966e7f0550f4c0cb2b482d1af3064e6db0fe/params/bootnodes.go // ...
Badr Bellaj's user avatar
  • 18.8k
6 votes

How does Ethereum client select which peers to synchronise with?

Only a partial answer for the first couple of sub-questions... How many nodes do we connect to? The maximum number is set to 25 by default, but can be configured using the --maxpeers flag on the ...
Richard Horrocks's user avatar
5 votes

Is there a way to export/import peers?

As i know there is not built in option to do so, however you could do it using a script : i am trying here to give you some response elements. the following snippet to output all the connected peers ...
Badr Bellaj's user avatar
  • 18.8k
4 votes
Accepted

Node discovery: unreachable bootnode in private distributed network

Well, apparently the reason why the connection is being refused is that "'Connection refused' is ok for the Go bootnode. [as i]t does not accept TCP connections", as suggested by fjl in the go-...
Betty Sanchez's user avatar
4 votes

Where can I find the DHT in my system?

These are stored in the the ~/.ethereum/nodes/ directory as a LevelDB database (in .ldb files). The reading and writing of these files is handeled by database.go. To read them you'd need a tool which ...
Richard Horrocks's user avatar
4 votes
Accepted

Is it possible to tell which node broadcast a transaction?

I assume that with "address" you mean IP address? IP addresses are exposed when running a node (Node's IP exposed). You can of course get some information based on an IP (geolocation for example) ...
Lauri Peltonen's user avatar
3 votes
Accepted

Does --nodekey work with geth or just bootnode?

Yes geth --nodkey=key.txt will (re)generate the same enode url repeatedly as the cli options would suggest. It wasn't working for me due to the unfortunate combination of a typo in my sh script and a ...
BrassApparatus's user avatar
3 votes
Accepted

How to get Nodes on local Geth Private Network to Discover Peers OF THEIR PEERS

Bootnodes is a cheap and effective solution to aid the network self-discovery, but they need to catch up with a proper genesis file to isolate your network. When you run geth, the genesis block is ...
M. Riggi's user avatar
  • 191
3 votes

How many bootnodes are hardcoded into Ethereum clients?

Have a look in bootnodes.go. It's still 3 for the Geth clients: // ETH/DEV Go Bootnodes discover.MustParseNode("enode://...
Richard Horrocks's user avatar
3 votes
Accepted

Best Discovery Protocol implementation

You can use implementations of existing clients: Besu - Java implementation Geth - Go implementation Parity1 - Rust implementation 1 At this point, I would be careful to use Parity's implementation ...
import-antigravity's user avatar
3 votes
Accepted

How to distinguish between ETH & ETC Node

Unfortunately there is no way to differentiate between ETH & ETC peers at the P2P layer due to the fact that most client implement eth/63, which would defines STATUS 0x00 as [protocolVersion: P,...
0xsegfault's user avatar
  • 1,260
2 votes

Sharing enodeURLs on a private blockchain

I'd consider using a distributed key-value store such as ETCD (https://coreos.com/etcd/docs/latest/getting-started-with-etcd.html). You could set up an ETCD alongside ethereum and share arbitrary data ...
John Henry's user avatar
2 votes
Accepted

Adding nodes in private network of docker containers hosted in different VMs

Prepare your nodekey for each node in advance. It is just a 512-bit random number. Then store them somewhere, along with the public ECDSA keys derived from there. The public keys are the components ...
Herman Junge's user avatar
  • 2,381
2 votes

addPeer doesn't work

I have met the same problem and now I have solved it trough delete the director "datadir" which in your case is ".". Then I reinit with the json document again.Going down the steps, maybe it will ...
zhao-lei Xiong's user avatar
2 votes
Accepted

Do bootnodes require trust?

Generally speaking, the answer is yes, there needs to be some sort of trust in the Ethereum network as a whole, i.e. there are more good people than bad. Yuval Marcus, Ethan Heilman and Sharon ...
Paul Razvan Berg's user avatar
2 votes
Accepted

Discovery Protocol Broadcasting

Correct. Ethereum node discovery works by nodes gossiping enode addresses between each other, so you have to connect to at least one node manually. The mainnet/testnets get around this inconvenience ...
natewelch_'s user avatar
2 votes
Accepted

How many nodes does Geth attempt to connect to by default?

Geth attempts to connect to 25 peers by default, as stated on the CLI commands page. This can be changed with: --maxpeers value Maximum number of network peers (network disabled if set to 0) (...
Shane Fontaine's user avatar
2 votes
Accepted

How to retrieve IP address and Port from Ethereum Node Records (ENR)?

There is also a rust enr-cli library to assist with decoding ENR strings. You can install it via cargo install enr-cli --version 0.1.0-alpha An example of its use is: $ enr-cli -e -...
Age's user avatar
  • 36
1 vote

Target addresses in Kademlia

It performs this lookup with its own address as target address only when the table is empty.
Jan Telov's user avatar
1 vote
Accepted

Node Discovery Protocol - Node Table entries

You must understand that the distant it can be simple interpret as the different of bit. Let's say n1 = 0x80 which in bit is 1000 0000. So the distant for each ith is this routing table: 0th 1000 ...
haxerl's user avatar
  • 1,104
1 vote

how do I know which node picks up my transaction? in general, how is a node assigned to broadcast a specific transaction?

You're missing the blockchain concept. Transactions are processed on all nodes. Mining determines the order of the transactions all nodes eventually agree on. This is not the same thing as a node ...
Rob Hitchens's user avatar
1 vote

Why is Geth ignoring --nodiscover?

You could give your node a nodekey (see --nodekey) and set it as bootnode (see --bootnodes). See also the bootnode executable for how to easily create a nodekey and the associated enode URL. With ...
Gerhard's user avatar
  • 231
1 vote

Bootnode Discovery with external IPs instead of local ones

So here is how I solved my issue. I host my kubernetes cluster in google cloud, but the same concepts should apply to any provider. First I created the clusters within a predefined VPC with subnets. ...
Fábio's user avatar
  • 111
1 vote

Different comportement when bootnodes are set in command line and in static-nodes.json

At least one difference between the two is that the --bootnodes argument sets explicitly the boot node addresses, whereas the static-nodes.json file sets the addresses of static full nodes (peers).
Gerhard's user avatar
  • 231
1 vote

Private Blockchain - Nodes Lose Connectivity

Yes, you enable tracing on the node for the sync module, like that: parity -l sync=trace This will produce a lot of noise, but you will be able to see why nodes are talking to each other, or why not....
q9f's user avatar
  • 32.9k

Only top scored, non community-wiki answers of a minimum length are eligible