Skip to content

GETH responds {'code': -32000, 'message': 'replacement transaction underpriced'} after high volume of transactions & needs restart #23705

@justinf123

Description

@justinf123

System information

Geth version: 1.10.8-stable-26675454
OS & Version: Windows 10 Home 21H1 (64 Bit), 3Ghz, 32 GB RAM, multiple SSD's.

Expected behaviour

GETH process & propagate transactions, my balance to be depleted by the transaction amount + costs.

Actual behaviour

After about 8,000 - 10,000 transactions, on occasion, I start receiving: {'code': -32000, 'message': 'replacement transaction underpriced'}
If I increase the gas price, I get a valid looking transaction hash back from GETH, though the transaction NEVER propagates off my node (can't see on Etherscan etc) & my balance does NOT decrease.

Steps to reproduce the behaviour

I am starting GETH with the following command:

"c:\Program Files\Geth\geth.exe" --ropsten --http --http.api eth,net,web3,personal,miner,admin,txpool,debug --http.corsdomain '*' --http.addr 127.0.0.1 --http.port 8545 --metrics --mine --syncmode "full" --miner.etherbase { my account } --datadir d:\Ethereum\ropsten\ --allow-insecure-unlock --maxpeers 9999 --maxpendpeers 9999 --whitelist 10920274=0xfd652086d220d506ae5b7cb80fde97d2f3f7028d346cc7d9d384a83d3d638532 --rpc.allow-unprotected-txs --txpool.globalslots=250000 --txpool.globalqueue=50000

I am retrieving the nonce via: web3.eth.getTransactionCount(address)

Then processing transactions via:

web3.toHex(web3.eth.sendRawTransaction(web3.eth.account.sign_transaction({"nonce" : transaction_nonce, "to" : receiver_account, "value" : web3.toWei(EthusedinGwei,'gwei'), "gas" : 21000, "gasPrice" : web3.toWei(5+extra_gas,'gwei')},private_key).rawTransaction))

After about 8,000 - 10,000 transactions, on occasion, I start receiving: {'code': -32000, 'message': 'replacement transaction underpriced'}

These are new, not replacement transactions. I should note, on occasion, GETH has processed more than 100k transactions without issue.

Once transactions start failing like this, every transaction fails. I have to restart GETH, wait a while, then start my applications again.

This is what the GETH console shows: (addresses removed)

WARN [10-11|19:47:40.869] Served eth_sendRawTransaction conn=127.0.0.1:62940 reqid=137 t=0s err="replacement transaction underpriced"
INFO [10-11|19:47:41.097] Submitted transaction hash=0x1e957e98232a0b3e833e0e2968c40fc729db3439a38dc5578c20ab3998ae2f98 from=0x0000000000000000000000000000000000000000 nonce=396,884 recipient=0x0000000000000000000000000000000000000000 value=30,073,000,300,730

WARN [10-11|19:47:41.244] Served eth_sendRawTransaction conn=127.0.0.1:62940 reqid=140 t=0s err="replacement transaction underpriced"
INFO [10-11|19:47:41.525] Submitted transaction hash=0x54e1406b8d1f46f1333230ba1b8e56a209fba005abb3868de42e2b2627ab8adc from=0x0000000000000000000000000000000000000000 nonce=396,886 recipient=0x0000000000000000000000000000000000000000 value=32,594,514,981,000

WARN [10-11|19:47:41.577] Served eth_sendRawTransaction conn=127.0.0.1:62940 reqid=143 t=0s err="replacement transaction underpriced"
INFO [10-11|19:47:41.744] Submitted transaction hash=0xab0d98f4d7c04872f4f0cf527d48cda5b5f8d39237758a7b5dedf3d40ee9bc93 from=0x0000000000000000000000000000000000000000 nonce=396,888 recipient=0x0000000000000000000000000000000000000000 value=145,579,501,164,636

If you check on Etherscan, none of those "submitted transactions" ever got further than my own node.

https://ropsten.etherscan.io/tx/0x7d67bbbfa23812f44b361232da2bf3a2f2b25b9e42343aae1da84868242966bc

On my local GETH I see the following: (addresses removed)

print (json.dumps(json.loads(Web3.toJSON(web3.eth.get_transaction('0x7d67bbbfa23812f44b361232da2bf3a2f2b25b9e42343aae1da84868242966bc'))),indent=4))
{
"blockHash": null,
"blockNumber": null,
"from": "0x0000000000000000000000000000000000000000",
"gas": 21000,
"gasPrice": 6000000000,
"hash": "0x7d67bbbfa23812f44b361232da2bf3a2f2b25b9e42343aae1da84868242966bc",
"input": "0x",
"nonce": 411656,
"to": "0x0000000000000000000000000000000000000000",
"transactionIndex": null,
"value": 2588033813005314,
"type": "0x0",
"v": 28,
"r": "0x8095bcfb8052eb62528d3b89bfc16c8929ee46bf6d32ff72f9ace0b11593cc43",
"s": "0x463482bdf483cffb4c10db0508cc4f77c030260bd8c031c97b71fc609a38d26a"
}

If verbose logs would be helpful, please advise how to generate & I will supply.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions