Sync problem between two nodes starting with genesis block.
sifnoc opened this issue · 1 comments
There is problem with syncing between operator node & bootnode both has at genesis block.
But, Sync well when restart bootnode after operator node has not genesis block( 1 more block.).
System information
Geth version: geth v1.9.10
OS & Version: MacOSX
Commit hash : migrate/1.9.10
Expected behaviour
Synced Well between Operator node and Bootnode
Actual behaviour
Could not sync at all just after operator node generated block from Operator & Bootnode has genesis block.
Steps to reproduce the behaviour
Pre-process
- Compiled plasma-evm(geth) migrated v1.9.10 version.
- Running go-ethereum as rootchain at localhost.
- Starting Position at
plasma-evm $
.
Reproduce
-
deploy rootchain
Run script for deploy contract on rootchain.
#!/bin/bash OPERATOR_KEY="b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291" DATADIR=pls.data OPERATOR="0x71562b71999873DB5b286dF957af199Ec94617F7" ROOTCHAIN_IP=localhost # Onther Ropsten Geth Node IP. # Deploy contracts at rootchain echo "Deploy rootchain contract and others" build/bin/geth \ --rootchain.url "ws://$ROOTCHAIN_IP:8546" \ --operator.key $OPERATOR_KEY \ --datadir $DATADIR \ deploy "./genesis.json" 77 true 4
-
Generate boot keyfile
plasma-evm $ echo "e854e2f029be6364f0f961bd7571fd4431f99355b51ab79d23c56506f5f1a7c3" > boot.key
-
Run Bootnode
Run this script for geme
#!/bin/bash build/bin/geth --cache 512 init --datadir ./chaindata-user --rootchain.url ws://localhost:8546 ./genesis.json build/bin/geth --syncmode="full" \ --datadir ./chaindata-user \ --networkid 77 \ --rootchain.url ws://localhost:8546 \ --rpc --rpcaddr '0.0.0.0' \ --rpcport 8548 \ --rpcapi eth,net,debug \ --rpccorsdomain "*" \ --rpcvhosts=localhost \ --ws --wsorigins '*' \ --wsaddr '0.0.0.0' \ --wsport 8549 \ --cache 512 \ --port 30307 \ --nat extip:::1 \ --maxpeers 512 \ --lightpeers=256 \ --lightserv=50 \ --nodekey ./boot.key \ --miner.gastarget 0 \ --miner.gaslimit 0 \ --miner.gasprice 0
-
Run Bootnode
Run this script for geme
#!/bin/bash build/bin/geth --cache 512 init --datadir ./chaindata-oper --rootchain.url ws://localhost:8546 ./genesis.json build/bin/geth account importKey b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291 --datadir ./chaindata-oper build/bin/geth --datadir ./chaindata \ --syncmode="full" \ --networkid 77 \ --datadir ./chaindata-oper \ --rootchain.url ws://localhost:8546 \ --operator 0x71562b71999873DB5b286dF957af199Ec94617F7 \ --rootchain.challenger 0x3616BE06D68dD22886505e9c2CaAa9EcA84564b8 \ --port 30306 \ -nat extip:::1 \ --bootnodes "enode:/4966a7e4621c2c0b1b1b3295b4a35ccc4224ba1d529bf5aa2323e4650f6075bd5eb6618372b2579965819347307f1f97315ce91b09ca342d60c2e98ad88db9f3@127.0.0.1:30307" \ --maxpeers 50 \ --password ./signer.pass \ --mine \ --miner.gastarget 1000000000 \ --miner.gaslimit 1000000000 \ --miner.gasprice 0 \ --targetgaslimit 1000000000
-
Check connecting peer between operator & bootnod
-
Generate dummy block in operator node
Backtrace
Attached Bootnode log.. Propagated block has invalid body ..
[backtrace]
bash geth.local.migrate.user.sh
INFO [02-13|18:34:28.595] Root chain backend connected url=ws://localhost:8546
INFO [02-13|18:34:28.598] Stamina config is set mindeposit=500000000000000000 recoverepochlength=10080 withdrawaldelay=30240
INFO [02-13|18:34:28.598] Maximum peer count ETH=50 LES=0 total=50
INFO [02-13|18:34:28.623] Set options for submitting a block mingaspirce=1000000000 maxgasprice=100000000000 resubmit=0s
INFO [02-13|18:34:28.623] Allocated cache and file handles database=/Users/jinhwan/gitrepo/plasma-evm/chaindata-user/geth/chaindata cache=16.00MiB handles=16
INFO [02-13|18:34:28.671] Writing custom genesis block rootChainContract=0x3Dc2cd8F2E345951508427872d8ac9f635fBe0EC
INFO [02-13|18:34:28.672] Persisted trie from memory database nodes=21 size=6.54KiB time=290.508µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=-116.00B
INFO [02-13|18:34:28.673] Genesis stored file=/Users/jinhwan/gitrepo/plasma-evm/chaindata-user/geth/genesis.json
INFO [02-13|18:34:28.674] Successfully wrote genesis state database=chaindata hash=19a9bb…be3953
INFO [02-13|18:34:28.674] Allocated cache and file handles database=/Users/jinhwan/gitrepo/plasma-evm/chaindata-user/geth/lightchaindata cache=16.00MiB handles=16
INFO [02-13|18:34:28.691] Writing custom genesis block rootChainContract=0x3Dc2cd8F2E345951508427872d8ac9f635fBe0EC
INFO [02-13|18:34:28.692] Persisted trie from memory database nodes=21 size=6.54KiB time=434.853µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=-116.00B
INFO [02-13|18:34:28.692] Genesis stored file=/Users/jinhwan/gitrepo/plasma-evm/chaindata-user/geth/genesis.json
INFO [02-13|18:34:28.693] Successfully wrote genesis state database=lightchaindata hash=19a9bb…be3953
INFO [02-13|18:34:28.753] Maximum peer count ETH=256 LES=256 total=512
INFO [02-13|18:34:28.781] Set options for submitting a block mingaspirce=1000000000 maxgasprice=100000000000 resubmit=10s
INFO [02-13|18:34:28.781] Starting peer-to-peer node instance=Geth/v1.9.10-stable-31018f52/darwin-amd64/go1.13.4
WARN [02-13|18:34:28.781] Sanitizing invalid miner gas price provided=0 updated=0
INFO [02-13|18:34:28.781] Allocated trie memory caches clean=128.00MiB dirty=128.00MiB
INFO [02-13|18:34:28.781] Allocated cache and file handles database=/Users/jinhwan/gitrepo/plasma-evm/chaindata-user/geth/chaindata cache=256.00MiB handles=5120
INFO [02-13|18:34:28.847] Opened ancient database database=/Users/jinhwan/gitrepo/plasma-evm/chaindata-user/geth/chaindata/ancient
INFO [02-13|18:34:28.848] Initialised chain configuration config="{ChainID: 77 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, E
ngine: ethash}"
WARN [02-13|18:34:28.848] Ethash used in fake mode
INFO [02-13|18:34:28.848] Initialising Plasma protocol versions="[64 63]" network=77 dbversion=<nil>
WARN [02-13|18:34:28.848] Upgrade blockchain database version from=<nil> to=7
INFO [02-13|18:34:28.849] Loaded most recent local header number=0 hash=19a9bb…be3953 td=1 age=50y10mo5d
INFO [02-13|18:34:28.849] Loaded most recent local full block number=0 hash=19a9bb…be3953 td=1 age=50y10mo5d
INFO [02-13|18:34:28.849] Loaded most recent local fast block number=0 hash=19a9bb…be3953 td=1 age=50y10mo5d
INFO [02-13|18:34:28.850] Regenerated local transaction journal transactions=0 accounts=0
INFO [02-13|18:34:28.852] Rootchain provider connected url=ws://localhost:8546
INFO [02-13|18:34:28.854] Transaction manager loaded numAccounts=0
INFO [02-13|18:34:28.865] Checkpoint registrar is not enabled
INFO [02-13|18:34:28.887] Mapped network port proto=tcp extport=30307 intport=30307 interface=ExtIP(::1)
INFO [02-13|18:34:28.887] Mapped network port proto=udp extport=30307 intport=30307 interface=ExtIP(::1)
INFO [02-13|18:34:28.889] New local node record seq=1 id=c075b353195d7b96 ip=127.0.0.1 udp=30307 tcp=30307
INFO [02-13|18:34:28.890] UDP listener up net=enode://4966a7e4621c2c0b1b1b3295b4a35ccc4224ba1d529bf5aa2323e4650f6075bd5eb6618372b2579965819347307f1f97315ce91b09ca342d60c2e98ad88db9f3@[::]:30307
INFO [02-13|18:34:28.891] Started P2P networking self=enode://4966a7e4621c2c0b1b1b3295b4a35ccc4224ba1d529bf5aa2323e4650f6075bd5eb6618372b2579965819347307f1f97315ce91b09ca342d60c2e98ad88db9f3@127.0.0.1:30307
INFO [02-13|18:34:28.891] Starting topic registration topic=LES2@19a9bbb52b470d6a
INFO [02-13|18:34:28.894] Iterating epoch prepared event
INFO [02-13|18:34:28.894] RootChain epoch prepared epochNumber=1 startBlockNumber=1 endBlockNumber=4 epochLength=4 isRequest=false userActivated=false isEmpty=false ForkNumber=0 isRebase=false
INFO [02-13|18:34:28.895] Iterating block finalized event
INFO [02-13|18:34:28.895] RootChain block finalized forkNumber=0 blockNubmer=0
ERROR[02-13|18:34:28.895] Failed to get challenger account err="unknown account"
INFO [02-13|18:34:28.896] Watching epoch prepared event startBlockNumber=0
INFO [02-13|18:34:28.897] Watching block finalized event startBlockNumber=0
INFO [02-13|18:34:28.900] IPC endpoint opened url=/Users/jinhwan/gitrepo/plasma-evm/chaindata-user/geth.ipc
INFO [02-13|18:34:28.900] HTTP endpoint opened url=http://0.0.0.0:8548 cors=* vhosts=localhost
INFO [02-13|18:34:28.900] WebSocket endpoint opened url=ws://[::]:8549
...
INFO [02-13|18:35:07.003] New root chain block mined number=148 numTxs=0 gasUsed=0 gasLimit=7500000
WARN [02-13|18:35:07.542] Propagated block has invalid body have=b6455d…bd9df8 exp=a01044…f4c96f
INFO [02-13|18:35:08.003] New root chain block mined number=149 numTxs=0 gasUsed=0 gasLimit=7500000
...