bnb-chain / bsc

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

nodes #710

Closed nilampatel-engineer closed 1 year ago

nilampatel-engineer commented 2 years ago

is there anyone can share the node details which I can add to config.toml file for better connectivity? may b as a bootstrap or in static node

RumeelHussainbnb commented 2 years ago

https://docs.binance.org/smart-chain/developer/rpc.html

Zaczero commented 2 years ago

I suppose the most crucial setting in terms of pure connectivity is the MaxPeers setting inside the [Node.P2P] section. This determines how many peers at most you will be connected with. There are some drawbacks though, the more peers = the higher CPU usage. But there are some optimizations to be made:

  1. Disable tx relying by setting DisablePeerTxBroadcast = true under [Eth] section. This will not impact your personal tx broadcasts in any way. However, you will lose access to the mempool txs so it all depends on your use case.
    Source: https://github.com/binance-chain/bsc/issues/502#issuecomment-959563983

  2. Make sure to use the --diffsync flag (config.toml entry is not supported).
    Learn more here: https://github.com/binance-chain/bsc/issues/502

  3. Finally, you can stop serving light clients by setting LightPeers = 0 under [Eth] section. Light clients are people with SyncMode = light and they are making use of other full nodes to query the blockchain. If you are not about helping them (for free), you can stop that and conserve your energy.

j75689 commented 2 years ago

Hi @nilampatel-engineer you can use these bootstrap nodes:

BootstrapNodes = ["enode://1cc4534b14cfe351ab740a1418ab944a234ca2f702915eadb7e558a02010cb7c5a8c295a3b56bcefa7701c07752acd5539cb13df2aab8ae2d98934d712611443@52.71.43.172:30311","enode://28b1d16562dac280dacaaf45d54516b85bc6c994252a9825c5cc4e080d3e53446d05f63ba495ea7d44d6c316b54cd92b245c5c328c37da24605c4a93a0d099c4@34.246.65.14:30311","enode://5a7b996048d1b0a07683a949662c87c09b55247ce774aeee10bb886892e586e3c604564393292e38ef43c023ee9981e1f8b335766ec4f0f256e57f8640b079d5@35.73.137.11:30311"]
nilampatel-engineer commented 2 years ago

Hi @nilampatel-engineer you can use these bootstrap nodes:

BootstrapNodes = ["enode://1cc4534b14cfe351ab740a1418ab944a234ca2f702915eadb7e558a02010cb7c5a8c295a3b56bcefa7701c07752acd5539cb13df2aab8ae2d98934d712611443@52.71.43.172:30311","enode://28b1d16562dac280dacaaf45d54516b85bc6c994252a9825c5cc4e080d3e53446d05f63ba495ea7d44d6c316b54cd92b245c5c328c37da24605c4a93a0d099c4@34.246.65.14:30311","enode://5a7b996048d1b0a07683a949662c87c09b55247ce774aeee10bb886892e586e3c604564393292e38ef43c023ee9981e1f8b335766ec4f0f256e57f8640b079d5@35.73.137.11:30311"]

I have this bootstrap node in config.toml

RumeelHussainbnb commented 2 years ago

We have responded to the question and will proceed to close the case as we didn't get any additional question after 3days. Please proceed to join our Discord channel for more discussion at https://discord.com/invite/buildnbuild

nilampatel-engineer commented 2 years ago

I suppose the most crucial setting in terms of pure connectivity is the MaxPeers setting inside the [Node.P2P] section. This determines how many peers at most you will be connected with. There are some drawbacks though, the more peers = the higher CPU usage. But there are some optimizations to be made:

  1. Disable tx relying by setting DisablePeerTxBroadcast = true under [Eth] section. This will not impact your personal tx broadcasts in any way. However, you will lose access to the mempool txs so it all depends on your use case. Source: Tips for running a BSC full node #502 (comment)
  2. Make sure to use the --diffsync flag (config.toml entry is not supported). Learn more here: Tips for running a BSC full node #502
  3. Finally, you can stop serving light clients by setting LightPeers = 0 under [Eth] section. Light clients are people with SyncMode = light and they are making use of other full nodes to query the blockchain. If you are not about helping them (for free), you can stop that and conserve your energy.

by setting Lightpeers = 0 under [Eth} in config.toml file, does that save on any cost? on running node