The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

19

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 to us. Ethereum nodes are initially alone, and then they seek out other nodes to talk to. When nodes agree to talk, they become peers to each other. "Peers" ...


19

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 the genesis block is hard coded into Ethereum clients. However as we are setting up our own test network, this step is essential. All subsequent blocks will be ...


17

The peer discovery algorithm is based on the kademlia protocol. A standalone implementation can be found here. Edit: A simplified model of how the p2p algorithm works is the following: you have nodes that are assumed to be always available/online (in Ethereum they are called bootstrap nodes) bootstrap nodes maintain a list of all nodes that connected to ...


12

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 when attached to the javascript console (geth attach). instance: Geth/v1.3.2/darwin/go1.5.1 datadir: /Users/home/Library/Ethereum coinbase: ...


11

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 --max-pending-peers 4 --min-peers 4 --max-peers 8 Or just block reserved IPs via iptables: iptables -A OUTPUT -p tcp -s 0/0 -d 0.0.0.0/8 -j DROP iptables -A ...


8

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 Ethereum, Peer is another term for node but referring the direct connectivity between nodes, because we are using a p2p network in which nodes are connected ...


7

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 flagged, you can setup firewall rules blocking outgoing packets to RFC1918 networks. Example using iptables: iptables -A OUTPUT -p tcp -s 0/0 -d 10.0.0.0/8 -...


7

Data format [ "enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fbaf6416c0@33.4.2.1:30303", "enode://pubkey@ip:port" ] You can configure permanent static nodes by putting something like the following into <datadir>/static-nodes.json Common problems with ...


7

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 what happens.


7

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 that it connected to will change (the old IP will be removed and when the node connects again the new IP will be stored in the list). What are the peer ...


7

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 number as part of the 2nd transaction of step2: the contract pays the winner. Instead of writing the whole thing, here are a few ideas: function hashing(bool ...


6

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) { console.log("admin.addPeer('enode://" + e.id + "@" + e.network.remoteAddress.substring(0, e.network.remoteAddress.indexOf(':')) + ":...


5

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 number of connections set by your configuration, but that the nodes you're connected to aren't active. One thing you could do is try setting the minimum to a ...


5

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 synchronized clock (not so far off as to be cut off from the network, but bad enough to have fewer peers); attempting to have too many peers relative to my ...


4

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 network or an NAT network, so that the nodes can easily communicate between each other. Please take care of the port numbers. Different nodes need to have ...


4

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://github.com/ethereum/go-ethereum/pull/2740 *It wouldn't allow you to remove nodes from the list of "bootstrap" nodes.


4

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.


4

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.


4

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 your genesis file act as a first level of authentication factors to your private blockchain network. In other words, a new node cannot be added to the network ...


4

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. 2- use the option --maxpeers 0 Use maxpeers 0 if you do not want anyone else connecting to your test chain. Alternatively, you can adjust this number if you ...


4

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 which scan the network and add the nodes to the nodes json file. read also : Peer discovery not working on private network


4

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 understood the schema on which the database is based, which is described here. I don't know of any existing tool for the node data, but block explorers work in ...


4

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 admin.peers.forEach(function(value){console.log(value.id+"@"+value.network.remoteAddress)}) you need to write a script which read the outputs and use them as ...


4

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 // MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on // the main Ethereum network. var MainnetBootnodes = []string{ // Ethereum ...


3

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, otherwise they will not be able to connect to peers and to the network " "Common problems with connectivity Sometimes you just can’t get connected. The most common ...


3

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 flag "--rpcaddr" followed by your IP address. So it should look like: --rpcaddr 10.10.23.196 Hope this helped!


3

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) IP=$(dig +short myip.opendns.com @resolver1.opendns.com) echo "Local IP: $LOCALIP" echo "Public IP: $IP" echo "Starting eth" eth --bootstrap --peers 50 --...


3

Please post the output of your geth command. Make sure the RPC port (--rpcport) and the eth port (--port) are different in all the geth instances. If the machines are not on the same network, you'll have to use the public IP address while adding peer. To check if the instances are running on a private blockchain, check for a similar message after starting ...


3

The connection will drop if they are on different chains, you can run Parity with -lsync=trace to see what is going on. It probably has to do with hard fork transitions, Geth does not include them by default. Have a look here and try using the linked generator.


3

...and I can't find new ones because peer discovery is done through UDP and tor only runs through TCP. Is this an accurate understanding? Yes. As per the issue thread you linked to, you could attempt to add peers (using --reserved-peers) from the hard-coded bootnodes list in the ETC (go-ethereum, not Parity) codebase, located in bootnodes.go. The list, ...


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