hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.52k stars 839 forks source link

unable to get transactions confirmed #7784

Closed dragoonduel closed 2 weeks ago

dragoonduel commented 1 month ago

Description

i want to setup a private network that is gasless and able to submit contracts

Acceptance Criteria

able to get my contract deployed and transactions approved.

Steps to Reproduce (Bug)

setup my besu using ibft2 with 4 validators and 1 rpc node validators are up and running and able to create blocks. when i sent a test raw transaction t send eth, it is not getting confirmed and pending in the txpool

Expected behavior: [What you expect to happen] able to get my transaction confirmed

Actual behavior: [What actually happens] transactions are pending Frequency: [What percentage of the time does it occur?] 100%

Logs (if a bug)

Please post relevant logs from Besu (and the consensus client, if running proof of stake) from before and after the issue.

2024-10-18 04:35:03.011+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,073 / 0 tx / 1 pending / 0 (0.0%) gas / (0xa13307f072a5713c1a1d19e9fee16323d0ff85964e8d23fcf482585cffbddff6) 2024-10-18 04:35:05.011+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,074 / 0 tx / 1 pending / 0 (0.0%) gas / (0x53aaa499e48212a3e434870076a704df5189a970934c4fbaba293d72c9cae07f) 2024-10-18 04:35:07.016+00:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Block 1075 (0x1ff6bf60a1fdfa4a78a62fcf57e994c020f4e6374ca0c9a321dd9d04a23b96ba) is already imported 2024-10-18 04:35:07.018+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,075 / 0 tx / 1 pending / 0 (0.0%) gas / (0x1ff6bf60a1fdfa4a78a62fcf57e994c020f4e6374ca0c9a321dd9d04a23b96ba) 2024-10-18 04:35:09.012+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Produced #1,076 / 0 tx / 1 pending / 0 (0.0%) gas / (0xb09c2808dbaf69b15d15c2e879dc6ca37121c87ee86336f8c35f75be98b7367b) 2024-10-18 04:35:11.012+00:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Block 1077 (0x05e359653f936fb4e44c28c0ef1fbdc61d02a45f633374ae39968d561c39998d) is already imported 2024-10-18 04:35:11.013+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,077 / 0 tx / 1 pending / 0 (0.0%) gas / (0x05e359653f936fb4e44c28c0ef1fbdc61d02a45f633374ae39968d561c39998d) 2024-10-18 04:35:13.011+00:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Block 1078 (0xc401550a871ac0fcf4f16f39be010175ec9765921474d4a59b0d381100bb3224) is already imported 2024-10-18 04:35:13.013+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,078 / 0 tx / 1 pending / 0 (0.0%) gas / (0xc401550a871ac0fcf4f16f39be010175ec9765921474d4a59b0d381100bb3224) 2024-10-18 04:35:15.011+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,079 / 0 tx / 1 pending / 0 (0.0%) gas / (0xcda4d8d317c0401957e93fbd06ba300ec56e6ee9b7b676f425fa9dbfca4c831f) 2024-10-18 04:35:17.012+00:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Block 1080 (0x0a9b7b41de3542ed6eb0a5968789609a688ac4abd816b7705524295169bec18c) is already imported 2024-10-18 04:35:17.014+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Produced #1,080 / 0 tx / 1 pending / 0 (0.0%) gas / (0x0a9b7b41de3542ed6eb0a5968789609a688ac4abd816b7705524295169bec18c) 2024-10-18 04:35:19.010+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,081 / 0 tx / 1 pending / 0 (0.0%) gas / (0x705f63ed1488337c8c40b5fcee740eb1f685cf818348f2ccfdb0bc8fbbeefbe1) 2024-10-18 04:35:21.011+00:00 | BftProcessorExecutor-IBFT-0 | INFO | IbftBesuControllerBuilder | Imported #1,082 / 0 tx / 1 pending / 0 (0.0%) gas / (0x45320130d441a6451245c7dfeb9494ed18169c6a4f6244591f20810890cba791) 2024-10-18 04:35:23.014+00:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Imported empty block #1,083 / 0 tx / 0 om / 0 (0.0%) gas / (0x6d5a9f750e2e02e713a6a0b0063fcb36a31fb30cf264c153efee7d34a6f085df) in 0.001s. Peers: 4

Versions (Add all that apply)

Smart contract information (If you're reporting an issue arising from deploying or calling a smart contract, please supply related information)

Additional Information (Add any of the following or anything else that may be relevant)

validator node config file

data-path="/opt/syst/besu/data" # Path bootnodes=["enode://d361a6527c20de2bd332090b95acdff697cc708b58889b46b74b18d48a277ab2752a8a202e8b354215611207168ffea32347f2ae3c6b9ab2aa851c6562b96fe6@xxx:30303","enode://e79e594ecb09b28f2658bc5931c908f6d186c5b71e89a8384a0b7efb4a148179817df4328cee84291339aefdd3c94fbbda14d243cca232d632cb1a0f4deb03f0@xxx:30303","enode://a233fc85b9ee21ce42fedd8a3100e01150c2a9fe0cdc85d4b778609f583db2926aeedd7554e0d01a1637e593e2f3471feb32a6fc829e8655a1532b382e6faea4@xxx:30303","enode://dda98f3c87640ad264f8a0b74992d403758268e2e9a4d9f6ca5a7dadf5146c118e175c0b775909cc00910b0e3c149b9c6dccf00134830808b8956ab425307d07@xxx:30303"] p2p-host="xxx" p2p-port=30303 max-peers=42

host-allowlist=["*"]

metrics-enabled=true metrics-host="xxx" metrics-port=9545 metrics-protocol="PROMETHEUS" min-gas-price=0 genesis-file="/opt/syst/besu/data/genesis.json" # Path to the custom genesis file

RPC node config

data-path="/opt/syst/besu/data" # Path

bootnodes=["enode://d361a6527c20de2bd332090b95acdff697cc708b58889b46b74b18d48a277ab2752a8a202e8b354215611207168ffea32347f2ae3c6b9ab2aa851c6562b96fe6@xxx:30303","enode://e79e594ecb09b28f2658bc5931c908f6d186c5b71e89a8384a0b7efb4a148179817df4328cee84291339aefdd3c94fbbda14d243cca232d632cb1a0f4deb03f0@xxx:30303","enode://a233fc85b9ee21ce42fedd8a3100e01150c2a9fe0cdc85d4b778609f583db2926aeedd7554e0d01a1637e593e2f3471feb32a6fc829e8655a1532b382e6faea4@xxx:30303","enode://dda98f3c87640ad264f8a0b74992d403758268e2e9a4d9f6ca5a7dadf5146c118e175c0b775909cc00910b0e3c149b9c6dccf00134830808b8956ab425307d07@xxx:30303"]

p2p-host="xxx" p2p-port=30303 max-peers=42

rpc-http-enabled=true rpc-http-api=["ETH","NET","WEB3", "IBFT", "TRACE", "DEBUG", "PRIV", "TXPOOL", "EEA"] rpc-http-host="xxx" rpc-http-port=8545 host-allowlist=[""] rpc-http-cors-origins=[""]

rpc-ws-enabled=true rpc-ws-host="xxx" rpc-ws-port=8546

metrics-enabled=true metrics-host="xxx" metrics-port=9545 metrics-protocol="PROMETHEUS" min-gas-price=0 genesis-file="/opt/syst/besu/data/genesis.json" # Path to the custom genesis file

macfarla commented 2 weeks ago

Can you try using the sequenced txpool https://besu.hyperledger.org/public-networks/concepts/transactions/pool#sequenced-transaction-pool

@fab-10 did you have another theory on this one?

dragoonduel commented 2 weeks ago

I tried sending transactions with gasfee 1 apparently the transactions went through. It seems that even though the chain is started as a zero gass fee network (confirmed during startup), it seems that it still requires gas fee. Not sure if it is a bug or not..

I managed to solved it by changing the genesis to start with londonblock and zerobasefee=true and able to take in 0 gas fee in transactions and it is getting confirmed. Seems berlinblock has issues with zero gas fees