Open wnjoon opened 2 weeks ago
Hi there - are you sending all of the transactions from the same account? and with the same nonce? are you incrementing the nonce? I am not sure how you are sending these txs, probably web3j. There may be documentation on how to increment the nonce on that side. If there is a nonce gap as well, that could cause issues.
Transactions with the same sender and same nonce will not be included and are considered invalid. Nonces cannot be re-used. Let me know if this was helpful or if there is more of a bug here that we can try to reproduce.
@non-fungible-nelson
Thanks for response. I sent transactions from various users to itself so nonce didnt affect any problems.
But I found a different issue, caused by 'gas limit'. Since I use go-ethereum for sending transaction to besu, I allocated all values to genesis.json for free-gas network. (https://besu.hyperledger.org/development/private-networks/how-to/configure/free-gas)
But when I set same gas limit inside go-ethereum while building transaction, It always send single transaction even though there is enough usable gas.
tx := types.NewTx(&types.LegacyTx{
...
Gas: uint64(9007199254740990)
}
But when client calculates gas limit real-time and allocate it to transaction (using ethclient.EstimateGas), lots of transactions can be sent in single block. If client uses less than highest gas limit (9007199254740990), many transactions allocated to single block, but not as many as when calculating gas limit real-time.
Here is my assumptions.
Is there someone can help me?
Please report the Besu configuration overview that is printed at the beginning just after you start it, because I am not sure which txpool implementation you are using
I have the same issue as @wnjoon. I used --tx-pool="sequence". I tried switching to the 'layered' txpool type, but it still the same problem
Here my genesis file
{
"config" : {
"chainId" : 7777,
"homesteadBlock" : 0,
"daoForkBlock" : 0,
"daoForkSupport" : true,
"eip150Block" : 0,
"eip150Hash" : "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0",
"eip155Block" : 0,
"eip158Block" : 0,
"byzantiumBlock" : 0,
"constantinopleBlock" : 0,
"petersburgBlock": 0,
"istanbulBlock":0,
"muirGlacierBlock" : 0,
"berlinBlock" : 0,
"londonBlock" : 0,
"arrowGlacierBlock" : 0,
"grayGlacierBlock" : 0,
"parisBlock" : 0,
"shanghaiTime" : 0,
"cancunTime" : 0,
"zeroBaseFee" : true,
"qbft" : {
"blockperiodseconds" : 2,
"epochlength" : 30000,
"requesttimeoutseconds" : 4
}
},
"nonce" : "0x0",
"timestamp" : "0x58ee40ba",
"gasLimit" : "0x1fffffffffffff",
"difficulty" : "0x1",
"mixHash" : "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase" : "0x0000000000000000000000000000000000000000",
"alloc" : {
"0fe2c00ca55f25655a6c49a359552ab4c176a883" : {
"comment" : "Node 1 address",
"balance" : "1000000000000000000000000000"
},
"8b819fc1afb3be79b561939411fc4cd91bbe3b3f" : {
"comment" : "Node 2 address",
"balance" : "1000000000000000000000000000"
},
"d1aaa514cfda4b16e914c315f181f8f2ffb626af" : {
"comment" : "Node 3 address",
"balance" : "1000000000000000000000000000"
},
"fd6bc1c8a1fe39f93247d91bdfd9ea0dfe1cdabd" : {
"comment" : "Node 4 address",
"balance" : "1000000000000000000000000000"
},
"76E046c0811edDA17E57dB5D2C088DB0F30DcC74" : {
"balance" : "1000000000000000000000000000"
},
"79310C4f47e1CC21eB7e3BE7aAF15D79b3d1b2d1" : {
"balance" : "1000000000000000000000000000"
}
},
"extraData" : "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f854940fe2c00ca55f25655a6c49a359552ab4c176a883948b819fc1afb3be79b561939411fc4cd91bbe3b3f94d1aaa514cfda4b16e914c315f181f8f2ffb626af94fd6bc1c8a1fe39f93247d91bdfd9ea0dfe1cdabdc080c0"
}
here is config.toml file:
ata-path="./data"
genesis-file="../networkFiles/genesis_v1.0.json"
profile="private"
rpc-http-enabled=true
rpc-http-api=["ETH","NET","QBFT","TXPOOL","WEB3"]
rpc-http-cors-origins=["all"]
rpc-http-host="0.0.0.0"
rpc-http-port=8545
rpc-http-max-active-connections=10000 #The maximum number of allowed HTTP JSON-RPC connections.
rpc-gas-cap=50000000
rpc-ws-enabled=true
rpc-ws-api=["ETH","NET","IBFT"]
rpc-ws-host="0.0.0.0"
rpc-ws-port=8546
host-allowlist=["*"]
p2p-host="178.128.116.25"
p2p-port=30303
min-gas-price=0
#min priority gas price
## TXPOOL
#tx-pool="sequenced"
#tx-pool-enable-save-restore=true
#tx-pool-limit-by-account-percentage=1
#tx-pool-retention-hours=1
tx-pool="layered"
tx-pool-enable-save-restore=true
tx-pool-max-future-by-sender="250"
#tx-pool-price-bump=0
revert-reason-enabled=true
rpc-max-logs-range=0
The besu version i used is 24.5.4
Scenario
here is my configurations
genesis.json
run script
application is configured using free-gas-network written in official docs. I guess since all transactions are added to txpool simultaneously and it means sending is not a problem. and nework setting is might be problem.
thanks.