Fantom-foundation / go-opera

Opera blockchain protocol secured by the Lachesis consensus algorithm
https://fantom.foundation/
GNU Lesser General Public License v3.0
283 stars 283 forks source link

Blocks not syncing and too many "Generating state snapshot and New LLR summary "s #488

Closed jsyqrt closed 9 months ago

jsyqrt commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

I 've setup an opera full api node with command like below and it seems that block syncing is not working, any insight on this?

command:


binpath=/home/go-opera/build/
binfile=$binpath/opera

datadir=/data/fantom/mainnet/
logfile=$datadir/opera.log
genesis=/data/fantom-mainnet-109331-full-mpt.g

ip="0.0.0.0"
port=8888

mkdir -p $datadir

# Start opera node
nohup $binfile \
    --genesis.allowExperimental \
        --genesis=$genesis \
        --datadir=$datadir \
        --http --http.port=$port \
        --http.addr=$ip --http.corsdomain="*"  \
        --http.api=eth,web3,net,txpool,ftm \
        --db.preset ldb-1 > $logfile 2>&1 &

and the log always says:

image

when i call lastest block number with

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' -H 'content-type: application/json;' http://127.0.0.1:8888

i got this

{"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":"0x174876e800","difficulty":"0x0","epoch":"0x1ab12","extraData":"0x","gasLimit":"0xffffffffffff","gasUsed":"0xdfd164","hash":"0x0001ab120000187fd8069d3a4f6501d48ad4800778f40a76d79cf02469272a43","logsBloom":"0x0820400080100502000001018000400118000000000000040800020000c008000008000010208000008100000100000000002000001c0000046003002020000040220f000000000a00006108000030e000120000180000006040210000008000440240080004001040000000000008042000c0400000000000020010001200280000030000800200000002a00000046100011282000000080008004040080000024004002008400000800000080800480001002000040000900040000010080000000002008000000000018400000180010000048804021040000200000000402810080200002000000000008000090000000000004000040002414000000002","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x23ee603","parentHash":"0x0001ab1200001872b6ffe2a55452e3a48d363c5d1a12f4d17d3f3e329712f07c","receiptsRoot":"0xeb638ab56a62dcf4c4f1f5111c442cf6b800a6cc5b2ef19466d99b55d24b2963","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x5320","stateRoot":"0xe796b5024b47ff9a9205c19919b1fd89b91626b401ea29453f6331c90a25cc43","timestamp":"0x6274eb7c","timestampNano":"0x16ec7a4b9a82ebfe","totalDifficulty":"0x0","transactions":["0x964be76098327c781c496b54d41c65fd354c1516bbbac313f90ff9d8b169efb3","0x3caacb5d2292c530aa349e9ca8e93e5cc952ac65f0024de18bfdaf60a4510ca1","0x63ab23fadd6e348724dc698b85c5247ffdd620a4555329b1a6a1b3a78bae7ba1","0x3ded884712d3194277092719fe44c1508bebab2c57fed6604de6be89fd49fbec","0xab15420e774d15940f57116d50306098c2419d55c37778d309732a794ff08d84","0xfa2d54f2e8a55f9b36acee6438e08fee7731e239582d2f29766d1b6f59d655c0","0x44873fe85335968fc2d659bb29515e74c3325ef33c354993f55e48467046a5f4","0x7adb74a3751833d64a2eed24dc7ff29bb0cbb22858c4b2162a5f974f4c9eefc8","0x8681fbc7501dfc3bc069dbdfd4e3c7d0443f587ead571aedf7b0daf59d338c51","0x3ca5478fbe1702e6cca12b227fa012c31020b1f4c88713fdd593c0a96bd1ed4a","0xbd672c5740b6447b7c17773318fe6bdfb8264868688ab3ce9a56842200fea41b","0x71edfcc6e3393be1fa88d2c85ae0ce777d4113955f87c06b8a7f2eec4db35b56","0x73f0a3090ab7535a4b9f9bec0f36beb814b97bcc1051b6efa1dd1f467124ecf3"],"transactionsRoot":"0x23225fdf4a62a43181480d4a96ec3e1b3d68ddb7ca862a4830ec01a9123d3b72","uncles":[]}}

the block number is 37676547 and can be found here https://ftmscan.com/block/37676547, which is a very old block.

And this block number stuck here for almost several hours or maybe days. Please let me know if i do anything wrong,

Thanks very much for your help!

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

quan8 commented 1 year ago

Hi @jsyqrt , performance depends largely on machine configs. To trouble shoot, here are some hints: https://docs.fantom.foundation/node/troubleshooting#4.2-slow-syncing

bgiegel commented 11 months ago

Hello ! I got the same issues with the latest version v1.1.3 rc.5. Did you managed to successfully sync your node @jsyqrt ? If so what was the issue in your case ?

zhy827827 commented 4 months ago

Go-Opera Version: 1.1.3-txtracing-rc.5 Git Commit: c8590b987412ba782b3048287df328d0ab4b2f94 Git Commit Date: 1697285648 Architecture: amd64 Protocol Versions: [63] Go Version: go1.19.8 Operating System: linux GOPATH= GOROOT=/usr/local/go

same issues!

Jun 28 07:59:01  opera[665442]: INFO [06-28|07:59:01.083] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad2b14..00d0d1 accounts=135,237,433 slots=676,809,815 storage=54.58GiB elapsed=10m16.022s
Jun 28 07:59:02  opera[665442]: INFO [06-28|07:59:02.333] New LLR summary                          last_epoch=290454 last_block=83908692 new_evs=0 new_ers=0 new_bvs=272 new_brs=0   age=1m20.161s
Jun 28 07:59:09  opera[665442]: INFO [06-28|07:59:09.083] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad3089..6b7212 accounts=135,237,433 slots=676,856,622 storage=54.58GiB elapsed=10m24.022s
Jun 28 07:59:13  opera[665442]: INFO [06-28|07:59:13.457] New LLR summary                          last_epoch=290454 last_block=83908692 new_evs=0 new_ers=0 new_bvs=256 new_brs=1   age=1m31.284s
Jun 28 07:59:17  opera[665442]: INFO [06-28|07:59:17.083] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad359b..937ae8 accounts=135,237,433 slots=676,900,757 storage=54.58GiB elapsed=10m32.022s
Jun 28 07:59:25  opera[665442]: INFO [06-28|07:59:25.083] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad3b09..14e17d accounts=135,237,433 slots=676,947,505 storage=54.59GiB elapsed=10m40.022s
Jun 28 07:59:32  opera[665442]: WARN [06-28|07:59:32.130] Served miner_setEtherbase                conn=194.67.206.49:52600 reqid=1 t="9.671µs" err="the method miner_setEtherbase does not exist/is not available"
Jun 28 07:59:32  opera[665442]: WARN [06-28|07:59:32.710] Served miner_start                       conn=185.87.48.4:56232   reqid=1 t="11.574µs" err="the method miner_start does not exist/is not available"
Jun 28 07:59:33  opera[665442]: INFO [06-28|07:59:33.083] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad40a5..f08372 accounts=135,237,433 slots=676,995,985 storage=54.59GiB elapsed=10m48.022s
Jun 28 07:59:41  opera[665442]: INFO [06-28|07:59:41.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad45cb..6c3b56 accounts=135,237,433 slots=677,040,661 storage=54.59GiB elapsed=10m56.023s
Jun 28 07:59:49  opera[665442]: INFO [06-28|07:59:49.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad4af1..d8ae83 accounts=135,237,433 slots=677,084,967 storage=54.60GiB elapsed=11m4.023s
Jun 28 07:59:57  opera[665442]: INFO [06-28|07:59:57.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad504d..89ecd1 accounts=135,237,433 slots=677,131,165 storage=54.60GiB elapsed=11m12.023s
Jun 28 08:00:05  opera[665442]: INFO [06-28|08:00:05.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad5569..071b72 accounts=135,237,433 slots=677,175,721 storage=54.60GiB elapsed=11m20.023s
Jun 28 08:00:13  opera[665442]: INFO [06-28|08:00:13.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad5a9f..f9f530 accounts=135,237,433 slots=677,220,539 storage=54.61GiB elapsed=11m28.023s
Jun 28 08:00:21  opera[665442]: INFO [06-28|08:00:21.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad5fdd..dc5e0e accounts=135,237,433 slots=677,265,960 storage=54.61GiB elapsed=11m36.023s
Jun 28 08:00:29  opera[665442]: INFO [06-28|08:00:29.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad654b..38a504 accounts=135,237,433 slots=677,312,665 storage=54.61GiB elapsed=11m44.023s
Jun 28 08:00:36  opera[665442]: INFO [06-28|08:00:36.342] New LLR summary                          last_epoch=290454 last_block=83908756 new_evs=0 new_ers=0 new_bvs=64  new_brs=115 age=1m37.223s
Jun 28 08:00:37  opera[665442]: INFO [06-28|08:00:37.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad6aa2..0756f5 accounts=135,237,433 slots=677,358,674 storage=54.61GiB elapsed=11m52.024s
Jun 28 08:00:45  opera[665442]: INFO [06-28|08:00:45.084] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad6fca..a9e969 accounts=135,237,433 slots=677,403,166 storage=54.62GiB elapsed=12m0.024s
Jun 28 08:00:45  opera[665442]: INFO [06-28|08:00:45.558] Looking for peers                        peercount=23 tried=3450 static=0
Jun 28 08:00:53  opera[665442]: INFO [06-28|08:00:53.085] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad73e7..f61257 accounts=135,237,433 slots=677,438,679 storage=54.62GiB elapsed=12m8.024s
Jun 28 08:01:01  opera[665442]: INFO [06-28|08:01:01.085] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad794d..954845 accounts=135,237,433 slots=677,484,740 storage=54.62GiB elapsed=12m16.024s
Jun 28 08:01:09  opera[665442]: INFO [06-28|08:01:09.085] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad7e96..348ba3 accounts=135,237,433 slots=677,530,434 storage=54.63GiB elapsed=12m24.024s
Jun 28 08:01:17  opera[665442]: INFO [06-28|08:01:17.085] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad83e8..d84c7a accounts=135,237,433 slots=677,575,993 storage=54.63GiB elapsed=12m32.024s
Jun 28 08:01:25  opera[665442]: INFO [06-28|08:01:25.085] Generating state snapshot                root=1346f5..6d1e4f in=c9e817..711e4a at=ad8927..ca2439 accounts=135,237,433 slots=677,620,899 storage=54.63GiB elapsed=12m40.024s