Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geth transactions not broadcast and stuck in pending state #28518

Closed
testuse111 opened this issue Nov 13, 2023 · 2 comments
Closed

Geth transactions not broadcast and stuck in pending state #28518

testuse111 opened this issue Nov 13, 2023 · 2 comments
Labels

Comments

@testuse111
Copy link

testuse111 commented Nov 13, 2023

Setup three Geth private network nodes(Clique) via docker container. They are deployed on three different VMs. Among 3 nodes, there is a miner node to mine the block, a RPC node to accept RPC request, and a boot peer node to connect both of them. This boot node connect to miner and RPC node peer by peer while RPC and miner node has no directly connection.

Issue found: Sometimes when there are transactions, they are stuck in pending state and never broadcast. This situation happens randomly, sometimes the transactions can be processed by miner but sometimes they just stuck in pending transaction forever, and restart the Geth node does not work at all.

There is no problem with the gas and the nonce. Also, if I connect my RPC node to miner node by admin.addPeer() manually, which make this 3-node private network fully-connected, then this situation totally disappear and everything become normal, which, the transactions can be processed by miner. The question seems to be the RPC node sometimes does not broadcast my transactions if it does not connect to a miner directly.

Another situation worth mentioning: the blocks can sync within the private network, get the same number when eth.blockNumber, but sometimes RPC node may sync slow, for example the miner has now mined 100 blocks, and the RPC may only sync to 80 blocks while eth.syncing returns false, although finally it will catch up with the block, it sometimes lag behind the miner.

System information

Geth version: Geth/v1.11.6
OS & Version: Ubuntu 22.04
Miner start commands:
--nodekey=miner.key
--bootnodes="enode://${BOOTNODE_KEY}@${BOOTNODE_IP}:${BOOTNODE_PORT}"
--syncmode=full
--gcmode=archive
--miner.etherbase=${ADDR}
--mine
--miner.threads=1
--networkid=${NETWORK_ID}
--unlock=${ADDR}
--password=password
--allow-insecure-unlock
--verbosity=5
RPC start commands:
--nodekey=rpc.key
--bootnodes="enode://${BOOTNODE_KEY}@${BOOTNODE_IP}:${BOOTNODE_PORT}"
--syncmode=full
--gcmode=archive
--networkid=${NETWORK_ID}
--http
--http.vhosts=""
--http.addr="0.0.0.0"
--http.port=8545
--http.corsdomain="
"

Expected behaviour

Transactions are successfully broadcasted and mined.

Actual behaviour

Transaction sometime not broadcast within the private network.
txpool of RPC
txpool.inspect
{
pending: {
0x55FAac070a63F809eDF68D72856Ea88c183171C8: {
0: "contract creation: 0 wei + 5171633 gas × 2000000000 wei",
1: "contract creation: 0 wei + 4398916 gas × 2000000000 wei",
2: "contract creation: 0 wei + 5131938 gas × 2000000000 wei"
}
},
queued: {}
}

txpool of miner and boot node

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

@testuse111
Copy link
Author

It seems that the issue is very similar to #22308 (comment)

@testuse111 testuse111 changed the title Geth does not broadcast transactions and stuck in pending transaction Geth transactions not broadcast and stuck in pending state Nov 14, 2023
@MariusVanDerWijden
Copy link
Member

The latest geth master does not support Clique anymore. Will close this for now. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants