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

The block height of the node server lags behind the official #2046

Closed
AbelGate opened this issue Dec 7, 2023 · 4 comments
Closed

The block height of the node server lags behind the official #2046

AbelGate opened this issue Dec 7, 2023 · 4 comments

Comments

@AbelGate
Copy link

AbelGate commented Dec 7, 2023

When I changed the [Node] HTTPHost configuration option in the config.toml file in the server from "localhost" to "0.0.0.0", I found the following changes:

The block height of the node server lags behind the official node. And the CPU of our node server will soar from 20% to 100%.

Below are some server logs I obtained. You can compare the difference in processing speed between the two configurations. We are using the same machine and the same program; we just modified the configuration options.

Set localhost

t=2023-12-07T06:48:51+0000 lvl=info msg="Imported new chain segment"             blocks=1  txs=1256  mgas=44.837   elapsed=172.035ms mgasps=260.626 number=34,139,043 hash=0xf4726f1eee418ba10d0a4ccc57eeeac07b3dec84e40079b413b38b0a24aefe92 dirty="0.00 B"
t=2023-12-07T06:48:51+0000 lvl=info msg="Imported new chain segment"             blocks=1  txs=1002  mgas=33.957   elapsed=129.288ms mgasps=262.642 number=34,139,044 hash=0x442ffb6660a9000018e3c8d251b450c490a6795c4e2264db958ddaa3b77df82a dirty="0.00 B"
t=2023-12-07T06:48:51+0000 lvl=info msg="Imported new chain segment"             blocks=1  txs=1008  mgas=34.408   elapsed=64.769ms  mgasps=531.231 number=34,139,044 hash=0x00730b8dd9a1005ab3c0de116d01373b691d0e3b25562ab0aade31d559f0f25c dirty="0.00 B"
t=2023-12-07T06:48:51+0000 lvl=info msg="Imported new chain segment"             blocks=1  txs=690   mgas=24.224   elapsed=68.739ms  mgasps=352.410 number=34,139,045 hash=0x7dd90d4d96b86d83029d71b2a8ef7b7b2c852c91890886fa404c6aef9eecb26a dirty="0.00 B"

Set '0.0.0.0'

t=2023-12-07T06:43:17+0000 lvl=info msg="Imported new chain segment"             blocks=2  txs=742  mgas=35.751 elapsed=13.832s     mgasps=2.585 number=34,138,866 hash=0xdc094422fa188eb957d9cb2b7b39e0d3af3d97ce2542319a2fd4f389e012a84d age=3m26s    dirty="0.00 B"
t=2023-12-07T06:43:27+0000 lvl=info msg="Imported new chain segment"             blocks=1  txs=665  mgas=32.496 elapsed=10.007s     mgasps=3.247 number=34,138,867 hash=0xf21d672d5b7ae90d070d4180b307dd4cbaf58823f71fd69a05a6af01c7492508 age=3m33s    dirty="0.00 B"
t=2023-12-07T06:43:37+0000 lvl=info msg="Imported new chain segment"             blocks=1  txs=565  mgas=23.384 elapsed=10.309s     mgasps=2.268 number=34,138,868 hash=0x701a9714795e90633642d50d188158a24c3ae3a64dc95bbed604b82347060a87 age=3m40s    dirty="0.00 B"

Obviously, when set to "localhost", the synchronization speed of the server will be very fast. Please tell me why this is?

System information
Geth version: geth 1.2.15
OS & Version: Linux

hw:
8 core CPU 2.70GHz
32G RAM
1007G ssd hard drive

config.toml

[Eth]
NetworkId = 56
LightPeers = 100
TrieTimeout = 150000000000

[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 = "localhost"
InsecureUnlockAllowed = false
HTTPPort = 8565
HTTPVirtualHosts = ["localhost"]
HTTPModules = ["eth", "net", "web3", "txpool", "parlia"]
WSPort = 8566
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 = ""

@deepcrazy
Copy link

Hi there, It seems you're lacking on hardware specs. Recommended HW specs are this: https://docs.bnbchain.org/docs/validator/fullnode#suggested-requirements. Please upgrade your hw specs and then run your node.
Also, Do share your full geth startup command too.

@AbelGate
Copy link
Author

AbelGate commented Dec 8, 2023

Hi there, It seems you're lacking on hardware specs. Recommended HW specs are this: https://docs.bnbchain.org/docs/validator/fullnode#suggested-requirements. Please upgrade your hw specs and then run your node. Also, Do share your full geth startup command too.

geth startup command is:

geth --config /bsc/config/config.toml --datadir /bsc/node/ \
--cache 8000 --rpc.allow-unprotected-txs --txlookuplimit=0 \
--syncmode=full --tries-verify-mode=none --pruneancient=true \
--diffblock=5000 --ws --ws.addr 0.0.0.0 --maxpeers 200

@zzzckck
Copy link
Collaborator

zzzckck commented Dec 8, 2023

  • running fast node(--tries-verify-mode=none)
  • did not upgrade to v1.3.4 or v1.2.15 before the Hertzfix hard fork, 07th Dec ~8am UTC

If you met the above 2 condition and your node failed to sync, you may need to download the fastnode snapshot and sync again: https://github.com/48Club/bsc-snapshots

@AbelGate
Copy link
Author

AbelGate commented Dec 8, 2023

Thanks for everyone's help. I have found the problem of our node being stuck. It is because the network of this machine is public. When a process on the machine starts running, the bsc synchronization progress will be greatly delayed.

@AbelGate AbelGate closed this as completed Dec 8, 2023
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

3 participants