I just created a local Binance Smart Chain full node on my PC with the following specs:

OS: Linux running on Windows Subsystem for Linux
Storage: 1TB SSD (Samsung 980 Pro)
CPU: AMD Ryzen 7 5800x
Ram: 32GB
Internet speed: 940 mbps up/down fiber

I set up the full node late last night and was surprised to see that it was synced within about 14 hours. I verified that it was synced by using eth.syncing in the geth console, checked the output of my logs, and verified that I was pulling the most recent block by using web3.eth.get_block('latest') from the Python Web3.py library while connected to localhost. However, I was doing some testing and noticed that sometimes web3.eth.get_block('latest') from https://bsc-dataseed.binance.org/ was pulling later blocks than my local full node.

For example, these commands were run in succession:

# connected to https://bsc-dataseed.binance.org/
In: web3_bsc.eth.get_block('latest')['number']
Out: 8079724

# connected to local full node
In: web3_local.eth.get_block('latest')['number']
Out: 8079723

# connected to https://bsc-dataseed.binance.org/
In: web3_bsc.eth.get_block('latest')['number']
Out: 8079724

How is my local full node behind https://bsc-dataseed.binance.org/? I was expecting to be one or two blocks ahead of the bsc mainnet with my specs, not one block behind.

  • New blocks take time to propagate across nodes. Maybe try a remote node that's closer to your physical location, you might notice a similar effect. Jun 10 at 6:10
  • Thanks @scorpion9979. I'm hosting a full node because I want to be able to detect blocks/transactions before others. Do you think I would be better off just using a publicly hosted node? And would increasing my cache or doing a full sync make things faster for me?
    – John
    Jun 10 at 6:15
  • I'd only use the public node, unless you're running a really critical service that should never have a down time. But, I've seen engineers do more interesting things to spawn their own nodes like having them as part of a Kubernetes cluster to make sure an instance is available at all times. If you do that, things would go much smoother and you'll only need to rely on the Kubernetes cluster as the source of truth. Jun 10 at 6:24
  • But if I want to process my own transactions, isn't using my locally hosted node faster?
    – John
    Jun 10 at 6:42
  • Even if you were mining blocks on that full node, I don't think your transactions would be picked faster from the mempool just because you're broadcasting TXs closer to that node. AFAIK, mining only favors TXs with the highest gas. Jun 10 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.