Consensys / linea-besu

Linea implementation based on Besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
62 stars 57 forks source link

besu node rpc returns data exception #39

Open rayn316 opened 6 months ago

rayn316 commented 6 months ago

os: ubuntu 22.04 network: mainnet bin: ./besu-24.3.0/bin/besu --config-file=/node/full/linea/bin/config-mainnet.toml

There is a problem with besu software debug_traceBlockByHash debug_traceBlockByNumber. Compared with geth, the data returned is abnormally large at certain times. besu returns 200MB+ data (Some blocks are even larger) geth returns 92KB data

curl --location --request POST '127.0.0.1:8545' \
--header 'Content-Type: application/json' \
--data-raw '{"method":"debug_traceBlockByHash","params":["0x908dc81be1f01948e7c002407e36c8401bf301d48e979e04a512e7513af79d13", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}'

image

Gabriel-Trintinalia commented 6 months ago

Maybe disableMemory could help?

rayn316 commented 6 months ago

How to disable Memory I don’t see it in the command help, what should I do?

Gabriel-Trintinalia commented 6 months ago

@rayn316 You can check the tracer config here: https://besu.hyperledger.org/public-networks/reference/api#debug_traceblockbynumber

{
   "jsonrpc":"2.0",
   "method":"debug_traceBlockByHash",
   "params":[
      "0x908dc81be1f01948e7c002407e36c8401bf301d48e979e04a512e7513af79d13",
      {
         "disableMemory":true
      }
   ],
   "id":1
}
rayn316 commented 6 months ago

There is still a problem in the return. After turning on disableMemory, it is still very large. After turning off all three projects, the data is all meaningless.

curl -Ls -X POST -H 'Content-Type: application/json' -d '{
   "jsonrpc":"2.0",
   "method":"debug_traceBlockByHash",
   "params":[
      "0x0db7b4ae8fe16ddbeb676e0cfdcb2728f0eac64d25905e0887b178edf619fae4",
      {
         "disableMemory":true,
         "disableStorage":true,
         "disableStack":true
      }
   ],
   "id":1
}' 'http://127.0.0.1:8545'

image image image

Gabriel-Trintinalia commented 6 months ago

@rayn316 Could you please post what you are seeing with Geth?

rayn316 commented 6 months ago

image info.txt

manofthemooon commented 5 months ago

Issue with the size of the data returned by the debug_traceBlockByHash and debug_traceBlockByNumber methods in Besu compared to Geth, particularly when dealing with certain blocks. While Geth returns data in the range of kilobytes, Besu returns significantly larger data, sometimes exceeding 200MB.