Go-ethereum: Geth not broadcasting transactions and not mining pending transactions on private network

Created on 21 Feb 2017  Â·  36Comments  Â·  Source: ethereum/go-ethereum

System information

Geth version: 1.5.9-stable
OS & Version: Linux
Commit hash : a07539fb88db7231d18db918ed7a6a4e32f97450

Synopsis

I have a private network comprising of 2 nodes. One of them is the miner. Both are peers. I can send a transaction from the miner. However, when I send a transaction from the normal node, it is simply added to the pending transactions and is not being mined.

Steps to reproduce the behaviour

  1. Create two nodes using geth
  2. Join them using admin.addPeer
  3. Start mining on one
  4. Try to send a transaction from the miner to any account. It succeeds.
  5. Try to send a transaction from the other node to any account. It doesn't succeed and is added to the pending list.

Most helpful comment

I just commented out the synced check in lines 660-662 here https://github.com/ethereum/go-ethereum/blob/master/eth/handler.go#L660

For private testnets with low volume transactions this appears to work fine. I tested it and transactions are coming in instantly and being mined on the miner node.

Maybe we can have a command line argument to disable this check?

All 36 comments

Started 2 miners to circumvent the issue.

I am just witnessing this same problem, I have two well connected nodes.. they broadcast blocks perfectly fine, however transactions are not being broadcast.. I have to mine them from the same node that created them and then the block propagates the tx.

I thought it might be a gasprice issue, but lowering the gasprice via geth --gasprice didn't work.

One node is Windows, the other is Linux

This issue apparently exists since 1.4.6 link. As soon as I started 2 miners, the issue got resolved.

Thanks for the link. That definitely sounds like it has something to do with it.

I just tried mining on multiple nodes and it hasn't solved it for me unfortunately.

I have the same thing happening on the Ropsten testnet with 4 connected peers, same geth version and commit hash. Transactions are just piling up as pending, got to 700 eventually over an hour or so before I killed the process. Restarted geth and the same thing is happening, up to 6 connected peers now. Something is broken.

@mjackson001 the ropsten network is getting "spammed" which is more likely causing your issue: https://www.reddit.com/r/ethereum/comments/5vuni5/testnet_ropsten_is_currently_being_spammed/

I just commented out the synced check in lines 660-662 here https://github.com/ethereum/go-ethereum/blob/master/eth/handler.go#L660

For private testnets with low volume transactions this appears to work fine. I tested it and transactions are coming in instantly and being mined on the miner node.

Maybe we can have a command line argument to disable this check?

This should be fixed on master.

Karalabe, how can we wolve this problem in the meantime ?. What is the correct order to start a private blockchain in order to have all transactions broadcasted and mined ?. Tahnks very much in advance. Best regards

Use master? If you are running a private network I don't see a reason not to use the latest code always.

Well I download the latest geth release so I imagine that is the master. I am having problems when sending transactions with broadcasting and mining. Not seeing even the same data on a simple txpool.status on the 2 nodes I am running. I am stuck :-(. Srry for bothering oyu

The latest stable release is 1.5.9. This was fixed on 1.6.0 (i.e. master). Both can be downloaded from our downloads page and both can be installed via package managers.

What does geth version print?

1.5.9-stable

I downloaded from https://geth.ethereum.org/downloads/ on my Windows and on Amazon AWS i follow the instructions from https://steemit.com/ethereum/@coininstant/amazon-aws-ethereum-cloud-mining-tutorial-12-step-guide-to-generating-etc
also 1.5.9 version

Scroll a bit down on the downloads page to the develop builds. This bug was fixed recently and you need Geth 1.6.0 to fix it without a hacky workaround.

I saw the 1.6.0 version but don't know how to install in AWS as i used this commands:
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum-qt
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install ethereum

If i get 1.6.0 on both nodes problem will go away rite ?. Is it a bug or I am running somethin wrong ?. Bets regards

Ah ok srry. I got on my windows 1.6.0 but no idea how to install it on AWS as I see no version on the commands I wrote before. Srry for this Karalabe and tks vm for your kind help

Those instructions are quite old and out of date. Please use these: https://geth.ethereum.org/install/

Notably to install the latest develop build, use:

sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum-unstable

Karalabe tks vm for your help and time. I will install 1.6.0 on both machines and get back to you with final outcome. Tks vm very much appreciate your help. Very best regards and have a great day my friend :-). By the way I am trying to build a bank over blockchain so I would like to test some things first. Tks again all the best

Good morning again @karalabe

I tried with 1.6.0 but couldn't reach to the same point due to lot of issues. Let me write them down:

a) I cannot prefund: before I run geth with new genesis.json; then I created a new Account; stop geth and delete everything but keystore; I place alloc in that new account and restart geth. The account was prefunded. With new 1.6.0 when I ren geth again with the alloc I got an error on a kind of inconsistence with the database

b) I cannot mine. I opened several nodes on the same machien with different dataDirs and different numbers in both rpcport and port. Also the same geensis.json, networkid. I connect the nodes and in one of them I either run miner.start(1) or --mine --etherbase 0xxxx but the node get crashed

What I am trying to do is create a new private blockchain with permissioned miner nodes and normal peers to create a new cryptoToken. As I told yesterday I would like to test some things to test services in order to create a new platform for new banking and new economy ( 2getherbank.com ... take a look :-) Can you help pls ?. I need a complete new blockcahin to manage crypto tokens on it. Best reagrds. Tks vm help

a) & b) Could you please provide some logs? It's really hard to figure out what's wrong without it.

b) Also if you are running multiple miners on the same machine, could you try setting the --ethash.dagdir to a different folder for them. I'm not sure how things behave when multiple processes generate DAGs into it. Also, logs please!

a) If you created a chain already (i.e. start geth), then it may not accept you reiniting it with a different genesis block for security reasons (i.e. not to accidentally overwrite your chain). Please delete your chaindata folder before you try to init a different chain to the same location.

Good night Karabale. Srry late respond but been out. We l I am rebuilding everything for my private with the new master version. I fixed some problems and I am rebuilding everything. I am going to try first with just one miner and let you know how it does. Then I will try with two but in different machines. I will run with logs to provide them for your check. Tks vm for help. Will let you know soon. My best regards. Salñvador

Be certain to initialise geth init /path/to/custom-genesis.json before starting geth normally. If this is forgotten it will lead to the behaviour you describe.

Good morning,

 Thanks vm Samuel.

 Yes finally I got it :-) ... Peter, Samuel I followed all your advices

from the very begining and I got it !!! :-)

 I got my private blockchain, connected nodes and mining. On Windows I

had no problem at all but on AWS ( free as I don't have too much resources
🤔 ) DAG generation is taking a while and after x% percentage generation it
crashed. Could it be due to dev space issues ?.

 Thanks vm for your kind help

Best regards,

Salvador

On Sun, Apr 16, 2017 at 12:57 PM, Samuel Brooks notifications@github.com
wrote:

Be certain to initialise geth init /path/to/custom-genesis.json before
starting geth normally. If this is forgotten it will lead to the behaviour
you describe.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/go-ethereum/issues/3694#issuecomment-294345742,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARzmnVU9nPSnsWOENp1pJ-HXn0s2_M3Gks5rwfQbgaJpZM4MG4qN
.

I'm having the same issue, using latest geth (1.7.0). Got 3 mining peers connected, but when sending transactions from one of them, only that one can see and mine them. the trace says that the transaction was broadcasted, but txpool.status returns 0 and eth.pendingTransactions an empty list on the other two peers. .

Anything i can do to try to solve this?

Check your gas price and the limit your miners are accepting. Chances are, you are creating transactions with a low gas price.

Looks this was really the problem, thought that by setting the miner.setGasPrice to a very low number, most transactions would be accepted?

Same issue: running two nodes from console, trying to make transaction (deploy contract) from one node then start miner on the other node - empty blocks are being mined, but the transaction is still pending.

Was able to workaround in the following way: before making any transactions started and stopped miner from console, after that transactions were distributed to the miner node. Seems that starting miner triggers some code (initialization, protocol feature?) within geth allowing transactions to be distributed.

I'm new to go-ethereum, would you suggest where to look in the sources or any means to debug it?

Yeah, I also have this issue. Is there a way to debug it? I would like to know why pending transactions on a node are not mined on the mining nodes even though there are no other transactions taking place. How can I tell if it’s a gas problem or something else?

Had the same problem when moving some accounts between parity, geth, and the mist wallet directory. The nonce count was wrong for some reason. I cleared the transaction queue and the transactions started broadcasting OK. If the transactions are not being broadcast to the network and you have 1 or more peers, I believe the most likely issue is that the nonce count is wrong. Here are the instructions I followed for clearing the pending transactions queue. https://ethereum.stackexchange.com/questions/1774/geth-how-to-clear-queued-transactions

@raymondcarl how did you cleared the pending/queued transactions? i am not able to find geth/transactions.rlp in my system! Can you please tell me which path you tried.

$ geth version
Geth
Version: 1.8.11-stable
Git Commit: dea1ce052a10cd7d401a5c04f83f371a06fe293c
Architecture: amd64
Protocol Versions: [63 62]
Go Version: go1.10
Operating System: linux

same issue still here. :(
It is sometimes broadcasted and gets a transaction receipt but does not be mined. :(

Experiencing a similar issue with 2 signing nodes and 1 regular node. Transactions submitted to regular node are not mined

17189

Working well for me with one miner and multiple regular nodes with very low difficulty

I had the same problem. I solved it through NTP Synchronization.

This issue is outdated, it refers to a very old version; closing it.

Was this page helpful?
0 / 5 - 0 ratings