bnb-chain / bsc

A BNB Smart Chain client based on the go-ethereum fork
GNU Lesser General Public License v3.0
2.73k stars 1.56k forks source link

Fatal: Failed to register the Ethereum service: state is not available #2539

Closed roman-syrota closed 4 months ago

roman-syrota commented 4 months ago

Hello everyone,

Guys, I ran into a problem when launching geth_linux after the update. Here is the logs:

INFO [06-25|10:55:02.835] Starting Geth on BSC mainnet...
INFO [06-25|10:55:02.836] Maximum peer count                       ETH=100 total=100
INFO [06-25|10:55:02.837] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [06-25|10:55:02.837] Using pebble as db engine
INFO [06-25|11:01:36.232] Use config state scheme                  config=path
INFO [06-25|11:01:36.232] Automatically disables snap protocol due to verify mode mode=none
WARN [06-25|11:01:36.232] Only local TriesVerifyMode can support snap sync, resetting to full sync mode=none
INFO [06-25|11:01:36.233] Set global gas cap                       cap=50,000,000
INFO [06-25|11:01:36.233] Initializing the KZG library             backend=gokzg
INFO [06-25|11:01:36.277] Using pebble as the backing database
INFO [06-25|11:01:36.277] Allocated cache and file handles         database=/home/bsc/node/geth/chaindata cache=3.12GiB handles=524,288 "memory table"=800.00MiB
INFO [06-25|11:01:36.540] Opened ancient database                  database=/home/bsc/node/geth/chaindata/ancient/chain readonly=false frozen=39,422,279
INFO [06-25|11:01:36.558] State scheme set by user                 scheme=path
INFO [06-25|11:01:36.558] Capped dirty cache size                  provided=1.95GiB adjusted=256.00MiB
INFO [06-25|11:01:36.558] Clean cache size                         provided=1.17GiB
INFO [06-25|11:01:36.558] Allocated trie memory caches             clean=1.17GiB dirty=256.00MiB
INFO [06-25|11:01:36.559] Unprotected transactions allowed
INFO [06-25|11:01:36.559] Parlia                                   chainConfig="{ChainID: 56 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Berlin: 31302048, YOLO v3: <nil>, CatalystBlock: <nil>, London: 31302048, ArrowGlacier: <nil>, MergeFork:<nil>, Euler: 18907621, Gibbs: 23846001, Nano: 21962149, Moran: 22107423, Planck: 27281024,Luban: 29020050, Plato: 30720096, Hertz: 31302048, Hertzfix: 34140700, ShanghaiTime: 1705996800, KeplerTime: 1705996800, FeynmanTime: 1713419340, FeynmanFixTime: 1713419340, CancunTime: 1718863500, HaberTime: 1718863500, Engine: parlia}"
INFO [06-25|11:01:36.574] Initialising Ethereum protocol           network=56 dbversion=8
INFO [06-25|11:01:36.931] New journal reader                       path=/home/bsc/node/geth/chaindata/trie.journal journalType=0
INFO [06-25|11:01:38.170] New async node buffer                    limit=256.00MiB layers=326
INFO [06-25|11:01:39.254] Loaded layer journal                     diskroot=16c2d7..3dd30c diffhead=9a0a60..174aaf elapsed=2.679s
INFO [06-25|11:01:39.260] Initialised chain configuration          config="{ChainID: 56 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Berlin: 31302048, YOLO v3: <nil>, CatalystBlock: <nil>, London: 31302048, ArrowGlacier: <nil>, MergeFork:<nil>, Euler: 18907621, Gibbs: 23846001, Nano: 21962149, Moran: 22107423, Planck: 27281024,Luban: 29020050, Plato: 30720096, Hertz: 31302048, Hertzfix: 34140700, ShanghaiTime: 1705996800, KeplerTime: 1705996800, FeynmanTime: 1713419340, FeynmanFixTime: 1713419340, CancunTime: 1718863500, HaberTime: 1718863500, Engine: parlia}"
INFO [06-25|11:01:39.291] Loaded most recent local header          number=39,422,280 hash=087206..3874a1 hash=9a0a60..174aaf td=78,321,104 age=2w3d7h
INFO [06-25|11:01:39.291] Loaded most recent local block           number=0          hash=0d2184..d57b5b root=919fcc..03b422 td=1          age=4y2mo3w
INFO [06-25|11:01:39.291] Loaded most recent local snap block      number=39,422,280 hash=087206..3874a1 root=9a0a60..174aaf td=78,321,104 age=2w3d7h
INFO [06-25|11:01:39.291] Loaded most recent local finalized block number=39,422,278 hash=bc3862..843f7b root=6ff6f0..11f086 td=78,321,100 age=2w3d7h
INFO [06-25|11:01:39.292] Loaded last snap-sync pivot marker       number=35,629,523
INFO [06-25|11:01:39.292] Genesis state is missing, wait state sync
WARN [06-25|11:01:39.835] Snapshot is not continuous with chain    snaproot=9a0a60..174aaf chainroot=919fcc..03b422
INFO [06-25|11:01:39.835] Snapshot loaded                          diskRoot=6ccf4f..829c91 root=919fcc..03b422
INFO [06-25|11:01:39.835] Initialized transaction indexer          range="last 90000 blocks"
WARN [06-25|11:01:39.835] Sanitizing invalid txpool lifetime       provided=0s      updated=3h0m0s
WARN [06-25|11:01:39.836] Sanitizing invalid txpool reannounce time provided=0s      updated=1m0s
Fatal: Failed to register the Ethereum service: state is not available

What does this error mean? : Fatal: Failed to register the Ethereum service: state is not available Here is the configuration:

[Eth]
NetworkId = 56
LightPeers = 100
TrieTimeout = 150000000000
StateScheme = "path"

[Eth.Miner]
GasCeil = 140000000
GasPrice = 3000000000
Recommit = 10000000000

[Eth.TxPool]
Locals = []
NoLocals = true
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 3000000000
PriceBump = 10
AccountSlots = 200
GlobalSlots = 8000
AccountQueue = 200
GlobalQueue = 4000

[Eth.GPO]
Blocks = 20
Percentile = 60
OracleThreshold = 1000

[Node]
IPCPath = "geth.ipc"
HTTPHost = "64.20.43.162"
InsecureUnlockAllowed = false
HTTPPort = 8545
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["eth", "net", "web3", "txpool", "parlia"]
WSHost = "64.20.43.162"
WSPort = 8546
WSModules = ["net", "web3", "eth"]

[Node.P2P]
MaxPeers = 200
NoDiscovery = false
StaticNodes = []
ListenAddr = ":30311"
EnableMsgEvents = false

#[Node.LogConfig]
#FilePath = "bsc.log"
#MaxBytesSize = 10485760
#Level = "info"
#FileRoot = ""

Here is the startup script:

./geth_linux --config ./mainnet/config.toml \
--datadir ./node \
--history.transactions=90000 \
--tries-verify-mode=none \
--db.engine=pebble \
--cache 8000 \
--rpc.allow-unprotected-txs  \
--http \
--maxpeers 100 \
--ws \
--allow-insecure-unlock \
--rpc.enabledeprecatedpersonal \
--http.api "db,eth,net,web3,personal,web3" \
console

I have no idea what to do?

Thank you.

STdevK commented 4 months ago

which snapshot did you use?

roman-syrota commented 4 months ago

I’ve actually tried almost everything, but the last one was this: https://snapshots.48.club/geth.pbss.39422280.tar.zst Thank you.

zzzckck commented 4 months ago
Fatal: Failed to register the Ethereum service: state is not available
image

Seems like your database don't have any block any all, which version of BSC client do you use? v1.4.8 could have some issue, could you try v1.4.10?