0

I have a local test setup with 3 Geth nodes, of which 2 are miners (Clique) and 1 non-miner.

I noticed that submitted transactions are never synchronized with other nodes.

Consequently, on a non-miner, submitted transactions never make it to the blocks.

That can't be normal behavior with Clique, can it?

Startup commands:

Node1: geth --identity node1 --datadir node1/ --syncmode full --port 30304 --rpc --rpcport 8545 --bootnodes "enode://c0f96309ca5918bd0de1b69a0f062a590c7877681d7d69a370f3174cc3f137f200e024e86482ed3718c074a4d70488e09b7ff154dc5210ee0e890773646a25d8@127.0.0.1:30304" --nat none --networkid 2640 --gasprice 1 -unlock 0xe148888d6a894101a39b84da4d5f24c97f0ba3bd --password node1/password.txt --mine console

Node2: geth --identity node2 --datadir node2/ --syncmode full --port 30305 --rpc --rpcport 8555 --ipcdisable --bootnodes "enode://c0f96309ca5918bd0de1b69a0f062a590c7877681d7d69a370f3174cc3f137f200e024e86482ed3718c074a4d70488e09b7ff154dc5210ee0e890773646a25d8@127.0.0.1:30304" --nat none --networkid 2640 --gasprice 1 -unlock 0x9d6189a2082a9df61d432cf384cb1f606cea1528 --password node2/password.txt --mine console

Node3: geth --identity node3 --datadir node3/ --syncmode full --port 30306 --rpc --rpcport 8556 --ipcdisable --bootnodes "enode://c0f96309ca5918bd0de1b69a0f062a590c7877681d7d69a370f3174cc3f137f200e024e86482ed3718c074a4d70488e09b7ff154dc5210ee0e890773646a25d8@127.0.0.1:30304" --nat none --networkid 2640 --gasprice 1 -unlock 0xd134a62fb3d349c8ba2991dfba48e091544a8a13 --password node3/password.txt console

The nodes are connected

(On Node1, Node2, Node3):

> net.peerCount
2

Blocks are being mined and synchronized

On Node3:

INFO [05-07|14:31:42] Imported new chain segment               blocks=1 txs=0 mgas=0.000 elapsed=0s      mgasps=NaN   number=2375 hash=8271c9…543b5e cache=0.00B
INFO [05-07|14:31:47] Imported new chain segment               blocks=1 txs=0 mgas=0.000 elapsed=0s      mgasps=NaN   number=2376 hash=9442d8…b5b467 cache=0.00B
INFO [05-07|14:31:52] Imported new chain segment               blocks=1 txs=0 mgas=0.000 elapsed=0s      mgasps=NaN   number=2377 hash=611ee5…02ba2e cache=0.00B

But if I submit a transaction on a non-miner Node3:

> personal.sendTransaction({from:'0xd134a62fb3d349c8ba2991dfba48e091544a8a13', to:'0xE0ca7d355F0CC6C1EECDA7Ce081353b7D87Aa1d7', value: 1},'redacted')
INFO [05-07|14:31:16] Submitted transaction                    fullhash=0x9d1f3fa3a4c0037daed01371bd57d2ca6876cdb3d088ec7917656f272ce6485d recipient=0xE0ca7d355F0CC6C1EECDA7Ce081353b7D87Aa1d7
"0x9d1f3fa3a4c0037daed01371bd57d2ca6876cdb3d088ec7917656f272ce6485d"

Then nothing happens. The transaction remains in "pending" status forever:

> txpool.inspect
{
  pending: {
    0xD134A62fB3D349c8ba2991dFbA48E091544A8a13: {
      0: "0xE0ca7d355F0CC6C1EECDA7Ce081353b7D87Aa1d7: 1 wei + 90000 gas × 0 wei"
    }
  },
  queued: {}
}

Empty blocks are still coming in on Node3:

> INFO [05-07|14:31:17] Imported new chain segment               blocks=1 txs=0 mgas=0.000 elapsed=0s      mgasps=NaN   number=2370 hash=33498f…5077c1 cache=0.00B

On other nodes there are no pending transaction at all:

Node1, Node2:

> txpool.inspect
{
  pending: {},
  queued: {}
}

Why is this and how to get transactions working on a non-miner?

Running Geth/v1.8.3-stable-329ac18e/windows-amd64/go1.10

0

The miners were started with --gasprice 1, but the transaction didn't specify any gas price, so it defaulted to 0, which can also be seen in the calculation "90000 gas × 0 wei".

0 < 1, so the transaction is rejected by the miners as underpriced (it works locally because local transactions are exempt from gas price limits).

To solve this issue, remove the gas price threshold at the miners (is OK for private chains only)

geth --mine --gasprice 0

Or specify some gasPrice with the transaction:

personal.sendTransaction({ from:xxx, to:xxx, value: 1, gasPrice: 1}, 'pw')

The downside is that some ether will be spent, so the from-address need to be sufficiently funded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.