Bor can't start from pruned snapshot
System information
Geth version: 0.2.9-stable OS & Version: Linux Commit hash : f020b881575ee6c2265d0560365b2a1169a3cb8b
Bor
Version: 0.2.9-stable
Git Commit: f020b881575ee6c2265d0560365b2a1169a3cb8b
Architecture: amd64
Go Version: go1.17.2
Operating System: linux
GOPATH=
GOROOT=go
Expected behaviour
Bor works normally.
Actual behaviour
I've tried snapshots of different dates, but Bor constantly crashes.
Steps to reproduce the behaviour
wget https://raw.githubusercontent.com/maticnetwork/launch/master/mainnet-v1/without-sentry/bor/genesis.json
wget https://matic-blockchain-snapshots.s3-accelerate.amazonaws.com/matic-mainnet/bor-pruned-snapshot-2021-11-07.tar.gz
bor --datadir=/datadir init /datadir/genesis.json
# extract pruned snapshot to bor/chaindata
tar xf bor-pruned-snapshot-2021-11-07.tar.gz
bor --syncmode=full --cache=4096 --datadir=/datadir --networkid=137 --bor.heimdall=http://172.20.5.141:1317 --miner.gaslimit=200000000 --miner.gastarget=20000000 --http --http.addr=0.0.0.0 --http.port=8545 --http.api=eth,net,web3,admin,debug,bor --http.corsdomain='*' --http.vhosts='*' --ws --ws.addr=0.0.0.0 --ws.port=8545 --ws.api=eth,net,web3,admin,debug,bor --ws.origins='*' --ipcdisable --nousb --bootnodes "enode://0cb82b395094ee4a2915e9714894627de9ed8498fb881cec6db7c65e8b9a5bd7f2f25cc84e71e89d0947e51c76e85d0847de848c7782b13c0255247a6758178c@44.232.55.71:30303,enode://88116f4295f5a31538ae409e4d44ad40d22e44ee9342869e7d68bdec55b0f83c1530355ce8b41fbec0928a7d75a5745d528450d30aec92066ab6ba1ee351d710@159.203.9.164:30303,enode://3178257cd1e1ab8f95eeb7cc45e28b6047a0432b2f9412cff1db9bb31426eac30edeb81fedc30b7cd3059f0902b5350f75d1b376d2c632e1b375af0553813e6f@35.221.13.28:30303,enode://16d9a28eadbd247a09ff53b7b1f22231f6deaf10b86d4b23924023aea49bfdd51465b36d79d29be46a5497a96151a1a1ea448f8a8666266284e004306b2afb6e@35.199.4.13:30303,enode://ef271e1c28382daa6ac2d1006dd1924356cfd843dbe88a7397d53396e0741ca1a8da0a113913dee52d9071f0ad8d39e3ce87aa81ebc190776432ee7ddc9d9470@35.230.116.151:30303"
Backtrace
INFO [11-15|09:39:09.747] Maximum peer count ETH=50 LES=0 total=50
INFO [11-15|09:39:09.748] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory"
WARN [11-15|09:39:09.748] Option nousb is deprecated and USB is deactivated by default. Use --usb to enable
WARN [11-15|09:39:09.750] The generic --miner.gastarget flag is deprecated and will be removed in the future!
INFO [11-15|09:39:09.751] Set global gas cap cap=50,000,000
INFO [11-15|09:39:09.751] Allocated trie memory caches clean=614.00MiB dirty=1024.00MiB
INFO [11-15|09:39:09.752] Allocated cache and file handles database=/datadir/bor/chaindata cache=2.00GiB handles=524,288
WARN [11-15|10:11:28.602] Truncating dangling head database=/datadir/bor/chaindata/ancient table=headers indexed=1.27GiB stored=1.27GiB
(trimmed)
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.85MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.84MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.82MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.81MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.78MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.76MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.75MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.73MiB stored=434.52MiB
WARN [11-15|10:11:28.705] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.71MiB stored=434.52MiB
WARN [11-15|10:11:28.706] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=bodies indexed=439.68MiB stored=434.52MiB
(trimmed)
WARN [11-15|10:11:28.764] Truncating dangling head database=/datadir/bor/chaindata/ancient table=receipts indexed=276.87MiB stored=295.07MiB
WARN [11-15|10:11:28.771] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=diffs indexed=97.93MiB stored=97.90MiB
WARN [11-15|10:11:28.771] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=diffs indexed=97.93MiB stored=97.90MiB
(trimmed)
WARN [11-15|10:11:28.910] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=diffs indexed=97.90MiB stored=97.90MiB
WARN [11-15|10:11:28.910] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=diffs indexed=97.90MiB stored=97.90MiB
WARN [11-15|10:11:28.910] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=diffs indexed=97.90MiB stored=97.90MiB
WARN [11-15|10:11:28.910] Truncating dangling indexes database=/datadir/bor/chaindata/ancient table=diffs indexed=97.90MiB stored=97.90MiB
WARN [11-15|10:11:28.941] Truncating dangling head database=/datadir/bor/chaindata/ancient table=matic-bor-receipts indexed=107.86MiB stored=107.88MiB
INFO [11-15|10:11:28.944] Filling all data into freezer for backward compatablity name=matic-bor-receipts items=21,005,978 number=21,006,559
WARN [11-15|10:11:28.953] Truncating freezer table database=/datadir/bor/chaindata/ancient table=headers items=21,006,559 limit=21,005,920
WARN [11-15|10:11:28.954] Truncating freezer table database=/datadir/bor/chaindata/ancient table=hashes items=21,006,965 limit=21,005,920
WARN [11-15|10:11:28.957] Truncating freezer table database=/datadir/bor/chaindata/ancient table=bodies items=21,009,752 limit=21,005,920
WARN [11-15|10:11:28.959] Truncating freezer table database=/datadir/bor/chaindata/ancient table=receipts items=21,011,117 limit=21,005,920
WARN [11-15|10:11:28.960] Truncating freezer table database=/datadir/bor/chaindata/ancient table=matic-bor-receipts items=21,006,559 limit=21,005,920
INFO [11-15|10:11:28.960] Opened ancient database database=/datadir/bor/chaindata/ancient readonly=false
ERROR[11-15|10:11:28.997] Current full block number unavailable hash=9ffa57..1fe702
INFO [11-15|10:11:29.002] Initialised chain configuration config="{ChainID: 137 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 3395000, Muir Glacier: 3395000, Berlin: 14750000, London: <nil>, Engine: bor}"
INFO [11-15|10:11:29.227] Gasprice oracle is ignoring threshold set threshold=2
INFO [11-15|10:11:29.237] Initialising Ethereum protocol network=137 dbversion=8
WARN [11-15|10:11:29.270] Head block missing, resetting chain hash=9ffa57..1fe702
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x946794]
goroutine 1 [running]:
github.com/ethereum/go-ethereum/core/types.(*Block).NumberU64(...)
github.com/ethereum/go-ethereum/core/types/block.go:292
github.com/ethereum/go-ethereum/core.(*BlockChain).SetHeadBeyondRoot(0xc00053ec80, 0x0, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...})
github.com/ethereum/go-ethereum/core/blockchain.go:616 +0x214
github.com/ethereum/go-ethereum/core.(*BlockChain).SetHead(0xc000604cd0, 0x652f8b)
github.com/ethereum/go-ethereum/core/blockchain.go:488 +0x27
github.com/ethereum/go-ethereum/core.(*BlockChain).ResetWithGenesisBlock(0xc00053ec80, 0xc000fb5440)
github.com/ethereum/go-ethereum/core/blockchain.go:720 +0x5d
github.com/ethereum/go-ethereum/core.(*BlockChain).Reset(0x1e763c0)
github.com/ethereum/go-ethereum/core/blockchain.go:713 +0x25
github.com/ethereum/go-ethereum/core.(*BlockChain).loadLastState(0xc00053ec80)
github.com/ethereum/go-ethereum/core/blockchain.go:443 +0x1025
github.com/ethereum/go-ethereum/core.NewBlockChain({_, _}, _, _, {_, _}, {0x0, {0x0, 0x0}, 0x0, ...}, ...)
github.com/ethereum/go-ethereum/core/blockchain.go:288 +0x925
github.com/ethereum/go-ethereum/eth.New(0xc0003435f0, 0xc00027d100)
github.com/ethereum/go-ethereum/eth/backend.go:208 +0x1128
github.com/ethereum/go-ethereum/cmd/utils.RegisterEthService(0x0, 0xc00027d100)
github.com/ethereum/go-ethereum/cmd/utils/flags.go:1753 +0x18e
main.makeFullNode(0x1)
github.com/ethereum/go-ethereum/cmd/geth/config.go:175 +0x1a5
main.geth(0xc000148420)
github.com/ethereum/go-ethereum/cmd/geth/main.go:330 +0xb8
gopkg.in/urfave/cli%2ev1.HandleAction({0x1193fa0, 0x14a16f8}, 0xc000122000)
gopkg.in/urfave/[email protected]/app.go:490 +0x5a
gopkg.in/urfave/cli%2ev1.(*App).Run(0xc000387860, {0xc000032180, 0x17, 0x18})
gopkg.in/urfave/[email protected]/app.go:264 +0x5e6
main.main()
github.com/ethereum/go-ethereum/cmd/geth/main.go:267 +0x35
I met the same problem.
met followed error
Error: invalid merkle root (remote: 32fb7a7bf722ef0964a6ef6de14d26d7cd27ae6fdf8bfbaee32f82c3f224a71c local: 6611ac77213f7bb4cdd240ab793fc71a25809a252000458882e30bc9315010f4)
##############################
WARN [11-22|14:46:32.230] Synchronisation failed, dropping peer peer=c4a675d0dd2b504dffcb348b7e6e50cd24cb091db9c61fe3ae363182c72a8a4a err="retrieved hash chain is invalid: invalid merkle root (remote: 32fb7a7bf722ef0964a6ef6de14d26d7cd27ae6fdf8bfbaee32f82c3f224a71c local: 6611ac77213f7bb4cdd240ab793fc71a25809a252000458882e30bc9315010f4)"
Faced the same issue!
INFO [03-18|08:08:37.081] Disabling direct-ancient mode origin=13,772,971 ancient=12,976,127
INFO [03-18|08:08:37.156] Imported new block headers count=62 elapsed=21.959ms number=13,773,034 hash=22eb0c..4db933 age=3mo1w1d ignored=1
INFO [03-18|08:08:37.199] Downloader queue stats receiptTasks=9 blockTasks=11 itemSize=41.40KiB throttle=6333
INFO [03-18|08:08:37.199] Imported new block receipts count=0 elapsed="10.861µs" number=13,772,972 hash=027c12..7a6f5b age=3mo1w1d size=0.00B ignored=1
INFO [03-18|08:08:37.199] Rebuilding state snapshot
INFO [03-18|08:08:37.200] Committed new head block number=13,772,972 hash=027c12..7a6f5b
INFO [03-18|08:08:37.200] Resuming state snapshot generation root=283607..09e399 accounts=0 slots=0 storage=0.00B elapsed="637.847µs"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x60fc7a]
goroutine 15106 [running]:
github.com/ethereum/go-ethereum/params.(*BorConfig).CalculateBurntContract(0x0, 0xd228ae, 0xc098f3e200, 0xc00434edc0)
github.com/ethereum/go-ethereum/params/config.go:529 +0x3a
....
Tried pruning a healthy node's ledger. Pruning was successful but the node crashes after prune
INFO [04-19|02:53:58.155] Filling all data into freezer for backward compatablity name=matic-bor-receipts items=27,189,957 number=27,189,970
panic: reflect: call of reflect.Value.Type on zero Value
goroutine 1 [running]:
reflect.Value.Type({0x0, 0x0, 0xc007ccc000})
reflect/value.go:2262 +0x12e
github.com/ethereum/go-ethereum/rlp.(*encbuf).encode(0x221c0a0, {0x0, 0x0})
github.com/ethereum/go-ethereum/rlp/encode.go:152 +0xb8
github.com/ethereum/go-ethereum/rlp.Encode({0x18dcac0, 0xc0003064e0}, {0x0, 0x0})
github.com/ethereum/go-ethereum/rlp/encode.go:62 +0x137
github.com/ethereum/go-ethereum/core/rawdb.(*freezerTableBatch).Append(0xc0003064d0, 0x1522f82, {0x0, 0x0})
github.com/ethereum/go-ethereum/core/rawdb/freezer_batch.go:124 +0x45
github.com/ethereum/go-ethereum/core/rawdb.(*freezerTable).Fill(0xc0001cca80, 0x19ee2d2)
github.com/ethereum/go-ethereum/core/rawdb/freezer_table.go:754 +0x217
github.com/ethereum/go-ethereum/core/rawdb.newFreezer({0xc00051e8a0, 0x25}, {0x14ec249, 0x11}, 0x0, 0x0, 0xc000700000)
github.com/ethereum/go-ethereum/core/rawdb/freezer.go:154 +0x5ba
github.com/ethereum/go-ethereum/core/rawdb.NewDatabaseWithFreezer({0x1916250, 0xc0013bea00}, {0xc00051e8a0, 0x80000}, {0x14ec249, 0x56620a}, 0xa0)
github.com/ethereum/go-ethereum/core/rawdb/database.go:133 +0x75
github.com/ethereum/go-ethereum/core/rawdb.NewLevelDBDatabaseWithFreezer({0xc00024eb40, 0x14e3214}, 0x9, 0x65797c, {0xc00051e8a0, 0x25}, {0x14ec249, 0x11}, 0x68)
github.com/ethereum/go-ethereum/core/rawdb/database.go:245 +0x8f
github.com/ethereum/go-ethereum/node.(*Node).OpenDatabaseWithFreezer(0xc0001f65b0, {0x14e3214, 0x3}, 0xc0003c4350, 0x4, {0x0, 0x0}, {0x14ec249, 0x11}, 0x0)
github.com/ethereum/go-ethereum/node/node.go:602 +0x2dd
github.com/ethereum/go-ethereum/eth.New(0xc0001f65b0, 0xc000402a00)
github.com/ethereum/go-ethereum/eth/backend.go:131 +0x533
github.com/ethereum/go-ethereum/cmd/utils.RegisterEthService(0x0, 0xc000402a00)
github.com/ethereum/go-ethereum/cmd/utils/flags.go:1737 +0x18e
main.makeFullNode(0x1)
github.com/ethereum/go-ethereum/cmd/geth/config.go:175 +0x1d2
main.geth(0xc0001c29a0)
github.com/ethereum/go-ethereum/cmd/geth/main.go:325 +0xb8
gopkg.in/urfave/cli%2ev1.HandleAction({0x12b3120, 0x176ae10}, 0xc0002fb000)
gopkg.in/urfave/[email protected]/app.go:490 +0x5a
gopkg.in/urfave/cli%2ev1.(*App).Run(0xc0001029c0, {0xc00003c280, 0x28, 0x28})
gopkg.in/urfave/[email protected]/app.go:264 +0x5e6
main.main()
github.com/ethereum/go-ethereum/cmd/geth/main.go:262 +0x35
$
@mikoim We understand your concern.
On checking the provided details we notice that you are on the older bor version.
Please upgrade your bor to the latest release: https://forum.polygon.technology/t/bor-upgrade-v0-2-14/847
That should solve the issue if not reattach the logs again.
Closing this as no further updates on this
same one
Please join the discord server: https://discord.gg/epsBG3Yf and post your queries in #full-node channel and our team will help you resolve the issue.
I'm facing this same exact issue