Hot answers tagged

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 ...
user avatar
  • 5,154
22 votes

What's the difference between node and peer?

It's a language thing about the relationship. It's like "people" and "friends". It's not that friends aren't also people. We might say that people are friends because they have a certain relationship ...
user avatar
  • 51.8k
19 votes

How to set up a Private network and connect peers in geth?

Setting up genesis block: The first block (block zero) of the block chain is called as the genesis block. This is the only block on the network that doesn't point to the predecessor block. By default ...
user avatar
14 votes
Accepted

Why doesn't my Ethereum node have any peers?

By default, geth uses port 30303 for connection to other nodes. You may need to modify your firewall to allow traffic over this port. You can check your peer count as well as getting a list of peers ...
user avatar
11 votes
Accepted

How to prevent being blacklisted for running an ethereum client?

You can tell parity to avoid scanning private IPs by simply running: parity --allow-ips public You can even fine-tune parity to do less aggressive peering: parity --allow-ips public --no-discovery -...
user avatar
  • 31.5k
9 votes

What's the difference between node and peer?

In my opinion : a network node is a connection point(endpoint) that can receive, create, store or send data along distributed network routes. In Ethereum it could be full or Lightweight. in case of ...
user avatar
  • 17.6k
8 votes
Accepted

How can I create a list of peers from my syncing geth node to manually paste into my non-syncing geth node using the admin.addPeer() command?

Run the following command in your syncing node to create a list of admin.addPeer(...) commands that you can paste into your non-syncing node: function getPeers() { admin.peers.forEach( function(e) {...
user avatar
8 votes

Automatic peer discovery in a private blockchain

No, there is no peer discovery methods other than modifying the boot nodes. The IP addresses are configured in the source code of the clients. If the IP changes, the list of the last bootstrap node ...
user avatar
  • 9,403
8 votes

How to use static-nodes.json / trusted-nodes.json to prevent connection loss on private network?

Data format [ "enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fbaf6416c0@33.4.2.1:30303", "enode://pubkey@ip:...
user avatar
  • 9,403
7 votes

How to prevent being blacklisted for running an ethereum client?

I had a similar problem like you. Hetzner noticed that the abuse warning was triggered because the host tried to send tpc/udp packets to private network addresses (RFC1918). In order to avoid getting ...
user avatar
  • 7,194
7 votes
Accepted

How to add peers on a private network?

Your problem is probably the same genesis block. You need to specify the same genesis json file and be sure that he is used with all commands (and the init too). Set the verbosity to 10 to understand ...
user avatar
  • 2,314
7 votes
Accepted

What are the challenges in creating a peer2peer coin flipping contract in ethereum?

Yes, by using the properties of hash functions. step1 with 2 transactions: A and B each submit a hash of (their bet + a random number) step2 with 2 transactions: A and B disclose their bet and random ...
user avatar
6 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 ...
user avatar
  • 1,178
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 // ...
user avatar
  • 17.6k
5 votes

How to add peers on a private network?

The genesis.json has to be the exact same in all the nodes. If you aren't sure, try checking it with a checksum Please make sure there are no network issues. If you are using a VM, try using a bridged ...
user avatar
5 votes

Removing a peer/node

If you don't mind building Geth from source, there's currently an open PR to implement an admin.removePeer() command, which would allow you to remove a node from the static* node array: https://...
user avatar
5 votes
Accepted

Only a few peers

That seems low for your normal number of peers. I've encountered low peer counts in the past (with geth versions less than or equal to 1.4.13; I use Parity now) and they've been due to incorrectly ...
user avatar
  • 6,550
4 votes
Accepted

Removing a peer/node

As per the documentation Currently the console is lacking support for removing a peer, increasing peercount or adding a non-static peer but not to keep try reconnecting.
user avatar
  • 9,403
4 votes

Why doesn't my Ethereum node have any peers?

Good you checked the time, but the most common reason for failing to find peers is firewall and network configuration. If a firewall is running, try disabling it.
user avatar
  • 78.8k
4 votes

Authentication of Ethereum Node on a private block chain

In a private blockchain, a new node cannot get automatically connected to the private network. That's why the network is private. Regarding authentication, the unique --networkid of your network and ...
user avatar
  • 3,855
4 votes

Authentication of Ethereum Node on a private block chain

you could take some measure to prevent undesirable nodes : 1- use the option --nodiscover Use this option to make sure that your node is not discoverable by people who do not manually add you. ...
user avatar
  • 17.6k
4 votes

Automatic peer discovery in a private blockchain

In a private chain the discovery protocol didn't work. you have one of 2 options use --bootnodes or a static file /static-nodes.json where you store your nodes. Idea : you could write a simple code ...
user avatar
  • 17.6k
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 ...
user avatar
4 votes
Accepted

What do the 3 different peer numbers represent in Parity?

Active, connected, and currently configured minimum number of connections. <active> / <connected> / <min_configured> If you're seeing 0/25/25 it means that you have the minimum ...
user avatar
4 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 ...
user avatar
  • 17.6k
4 votes
Accepted

Understanding transaction broadcast better

Second question first: pendingTransactions are transactions held in memory, while getBlock('pending').transactions are the transactions included in the block being mined. A full node checks blocks ...
user avatar
4 votes

Can we improve the performance of Geth server by setting maxpeers to 0?

maxpeers indicates how many node will be allowed to communicate with geth. Settings to zero will means the server can't communicate with other nodes. On the other hand having more nodes means it can ...
user avatar
  • 29.5k
3 votes
Accepted

peers keep connects and disconnects into private Ethereum blockchain

https://ethereum.stackexchange.com/a/5931/4575 is answer to my question. My main problem was my local time was incorrect. "Ethereum nodes (regardless of mining) need to have an accurate time, ...
user avatar
  • 7,729
3 votes

How to add peers on a private network?

Not sure if you already solved your problem, but I had a similar issue a while back. For me, the issue was that the networking defaults to the localhost IP address (127.0.0.1). You should add the ...
user avatar
  • 81
3 votes

Why doesn't my Ethereum node have any peers?

I use this script if my node is acting odd ... obviously you need to modify it to suite your situation... #!/usr/bin/env bash trap "exit" INT LOCALIP=(192.168.10.11) (put your machines IP here) ...
user avatar

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