ethereum-optimism / op-geth

GNU Lesser General Public License v3.0
255 stars 654 forks source link

Cannot sync block data from an op-geth instance to another #339

Open DavidCoder88 opened 1 week ago

DavidCoder88 commented 1 week ago

First, I deployed a local chain with such instances: one op-geth one op-node one op-batcher one op-proposer

The deploy command for op-geth is this: ./build/bin/geth --datadir ./datadir --http --http.corsdomain= --http.vhosts= --http.addr=0.0.0.0 --http.port=8545 --http.api=web3,debug,eth,txpool,net,engine,admin --ws --ws.addr=0.0.0.0 --ws.port=8546 --ws.origins= --ws.api=debug,eth,txpool,net,engine,admin --syncmode=full --gcmode=archive --maxpeers=10 --networkid=242069 --authrpc.vhosts= --authrpc.addr=0.0.0.0 --authrpc.port=8521 --authrpc.jwtsecret=./jwt.txt --rollup.disabletxpoolgossip=true --nat=none --verbosity=5 --port=8503

It can work well, I can transfer eth from admin account to another account by metamask wallet.

Second, I want to deploy another op-geth which can link to the same chain that deployed in my first step. The deploy command for another op-geth is this: ./build/bin/geth --datadir ./datadir2 --http --http.corsdomain= --http.vhosts= --http.addr=0.0.0.0 --http.port=8555 --http.api=web3,debug,eth,txpool,net,engine,admin --ws --ws.addr=0.0.0.0 --ws.port=8556 --ws.origins= --ws.api=debug,eth,txpool,net,engine --syncmode=full --maxpeers=10 --networkid=242069 --authrpc.vhosts= --authrpc.addr=0.0.0.0 --authrpc.port=8531 --authrpc.jwtsecret=./jwt.txt --rollup.disabletxpoolgossip=true --port 8504 --bootnodes=enode://839402d8a0110125ce98b3d10b79be9f6398f69611294f7df33743afb7c42c92e1e34eb4c1508234be770d7d1bbee70f1f251620289b1617eb117519962eaec4@127.0.0.1:8503 --rollup.sequencerhttp=http://127.0.0.1:8545 --verbosity=5 --nat=none

I can get one object response from the api of admin.peers for each other( Results are right ). But it cannot sync data from the bootnode. and also I cannot get same balance from the two rpc endpoints of the two op-geth instances. It means they are not in same chain.

eth.syncing { currentBlock: 0, healedBytecodeBytes: 0, healedBytecodes: 0, healedTrienodeBytes: 0, healedTrienodes: 0, healingBytecode: 0, healingTrienodes: 0, highestBlock: 0, startingBlock: 0, syncedAccountBytes: 0, syncedAccounts: 0, syncedBytecodeBytes: 0, syncedBytecodes: 0, syncedStorage: 0, syncedStorageBytes: 0, txIndexFinishedBlocks: 0, txIndexRemainingBlocks: 1 }

I already checked the parameter of --bootnodes, make sure that it's right value. Both instances are deployed in one machine. I make sure that the data directories are initialized by same genesis.json Can you help me find the reason?