Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subject: BSC Node Syncing Issue – Current Block Ahead of Highest Block #2864

Open
osizadmin opened this issue Jan 23, 2025 · 5 comments
Open
Assignees

Comments

@osizadmin
Copy link

osizadmin commented Jan 23, 2025

I am experiencing an issue with my Binance Smart Chain (BSC) full node while syncing. Below are the details of my setup and the issue encountered:

System Information
Geth version: Geth/v1.4.16-2df94c37-20241125/linux-amd64/go1.21.13
OS & Version: Linux (Ubuntu 22.04)
Commit hash: (if applicable)

Expected Behaviour
The node should sync properly, with the currentBlock value progressing until it matches the highestBlock.

Actual Behaviour
The currentBlock is ahead of the highestBlock, which is causing an unexpected sync state.

Command Output:

eth.syncing.highestBlock - eth.syncing.currentBlock
-120
Syncing Details:

{
currentBlock: 46012765,
highestBlock: 46012644,
startingBlock: 46012642,
syncedAccounts: 0,
txIndexFinishedBlocks: 603136,
txIndexRemainingBlocks: 45409630
}

Steps to Reproduce the Behaviour

restarted bnb core

Observed the block difference using eth.syncing.
Checked peer count with admin.peers.length (90 peers connected).

Also we are facing this error: InvalidResponseError: Returned error: transaction indexing is in progress

@osizadmin
Copy link
Author

Now:

{
currentBlock: 46018991,
healedBytecodeBytes: 0,
healedBytecodes: 0,
healedTrienodeBytes: 0,
healedTrienodes: 0,
healingBytecode: 0,
healingTrienodes: 0,
highestBlock: 46016654,
startingBlock: 46016653,
syncedAccountBytes: 0,
syncedAccounts: 0,
syncedBytecodeBytes: 0,
syncedBytecodes: 0,
syncedStorage: 0,
syncedStorageBytes: 0,
txIndexFinishedBlocks: 609362,
txIndexRemainingBlocks: 45409630
}

eth.syncing.highestBlock - eth.syncing.currentBlock
-2341
eth.syncing.highestBlock - eth.syncing.currentBlock
-2367

Also we are facing this error: InvalidResponseError: Returned error: transaction indexing is in progress

@STdevK
Copy link

STdevK commented Jan 23, 2025

@osizadmin what's your node start up command?

@osizadmin
Copy link
Author

node start up command:

./opt/bsc/geth_linux --cache=16000 --config /opt/bsc/config.toml --datadir /opt/bsc/node --rpc.allow-unprotected-txs --http --maxpeers=500 --ws --syncmode=snap --history.transactions=0 --allow-insecure-unlock --tries-verify-mode=none --db.engine=pebble

@emailtovamos
Copy link
Contributor

There are two independent ways a node can receive new blocks while syncing:

  1. The downloader’s active sync peer: The node requests batches of headers/bodies from a chosen peer to catch up. The “highestBlock” reflects that peer’s best-known height.
  2. Block gossip from other peers: Even as the node syncs, it can still receive newly mined blocks from other peers via the P2P gossip protocol. If those blocks are valid and extend the chain, your local currentBlock can move up, sometimes beyond what the sync peer reported.

Hence, it is not unusual to see currentBlock occasionally surpass highestBlock in eth.syncing. Once the node finishes full sync, the values should align.
Let us know if you still see this behavior after the node is fully synced.

@osizadmin
Copy link
Author

We are facing the following error: InvalidResponseError: Returned error: transaction indexing is in progress.

The transaction is completed, but we are unable to retrieve the indexed data to display user transaction history on our website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@emailtovamos @osizadmin @STdevK and others