If Geth is available on Windows, shouldn't that mean it's doable, or am I misunderstanding how it works? I was under the impression that Geth is essentially the node software. Is that not so?
[Ethereum] Can a Binance SmartChain / BSC full node be run on Windows
binancebscgo-ethereumnodes
Related Solutions
Q: I know that when a new geth instance runs it connects to the bootstrap nodes. What I want to know that do other nodes download blockchain from the bootstrap nodes or nor?
A: No. Regular nodes do not download the blockchain from bootnodes. The only role for the bootnodes is to allow regular nodes to connect to and get the connection information on other regular nodes. The regular nodes will then use this information to connect to other regular nodes.
Q: Bootstrap nodes are highly available so why just simply connect to bootstrap nodes instead of connecting to some other node in the network.
A: The bootnode's only role is to provide the connection information for regular nodes to connect to each other. The connection information for several bootnodes are hard-coded into the regular node source code - see bootnodes.go
As the bootnodes only serve very little information to each regular node, the bootnode server resources can be focussed on providing this information and not get bogged down transferring the blockchain data.
Q What if bootstrap nodes provide wrong information. The whole network is compromised right?
A Not necessarily. You are able to specify new bootnodes on the command line parameters of the regular node client:
geth help | grep bootnode
--bootnodes value Comma separated enode URLs for P2P discovery bootstrap
You are also able to manually enter a list of other regular nodes on the network using the admin.addPeer(...)
command.
Recently many users reported that their regular nodes was not able to find peers. There were some problems with the bootnodes. See geth does not sync out of the box.
The temporary workaround was to get a list of regular node connection information from peers that were already connected to peers, and pasting this connection information into the regular node that was experiencing the peer discovery problem. See How can I create a list of peers from my syncing geth node to manually paste into my non-syncing geth node using the admin.addPeer() command?.
Q: How is a regular node different than a bootstrap node?
A The regular node has the peer discovery mechanism of the bootstrap node. Additionally, the regular node will download and synchronise the blockchain with other regular nodes. The bootstrap node cannot be used directly to synchronise the blockchain.
Q: And also How does peer discovery actually works?
A: See Node discovery protocol and What are the peer discovery mechanisms involved in Ethereum?
Q: What if nodes only download and not upload?
A: There are sufficient nodes (~6,000) on the network that your node should find other nodes to download from.
Q: What if I execute a denial of service attack which connect to many nodes in the network and downloads blockchain?
A: You will need a lot of computing and networking resources to try to execute a denial of service attack on ~6,000 nodes.
The executable to run a bootnode is bootnode
. In Ubuntu, this installed alongside /usr/bin/geth
in /usr/bin/bootnode
.
You will have to generate a key to run your bootnode:
user@Kumquat:/tmp$ bootnode -genkey nodekeyfile
user@Kumquat:/tmp$ cat nodekeyfile
3bed8e0fa771475049cddac0fcc20a6cf1005e271e2b12ef339f213218b2dbdb
user@Kumquat:/tmp$ bootnode -nodekey nodekeyfile
I1001 23:17:42.874776 p2p/discover/udp.go:217] Listening, enode://d3b75b24a4fd718b1358d28ba576b2e98f73a7465326c4504f21cc0d124466a91919de18fb72a634f9108f0eedd5ef943aea5c250b41c974c4a7fb7c159b9968@[::]:30301
In a separate window, I ran the netstat
command to view the UDP 30301 port that bootnode
is listening on:
user@Kumquat:/tmp$ sudo netstat -anp | grep boot
[sudo] password for user:
udp6 0 0 :::30301 :::* 8317/bootnode
This bootnode
program only serves as a bootstrapping node and will not provide any blockchain data transfers.
You should now be able to use enode://d3b75b24a4fd718b1358d28ba576b2e98f73a7465326c4504f21cc0d124466a91919de18fb72a634f9108f0eedd5ef943aea5c250b41c974c4a7fb7c159b9968@[::]:30301
as your geth --bootnodes
parameter value, where you replace [::]
with the IP address of your bootnode computer.
Update
If you have issues getting the peer-to-peer discovery to work, add the --verbosity 6
before the console
parameter of geth
. You should see the communications to the bootnode in action.
You can also add the verbosity parameter to the bootnode
command:
user@Kumquat:/tmp$ bootnode -nodekey nodekeyfile -verbosity 9
I1001 23:17:42.874776 p2p/discover/udp.go:217] Listening, enode://d3b75b24a4fd718b1358d28ba576b2e98f73a7465326c4504f21cc0d124466a91919de18fb72a634f9108f0eedd5ef943aea5c250b41c974c4a7fb7c159b9968@[::]:30301
I1001 23:39:12.546003 p2p/discover/udp.go:453] >>> 192.168.1.14:54991 discover.pong
I1001 23:39:12.546145 p2p/discover/udp.go:521] <<< 192.168.1.14:54991 *discover.ping: ok
I1001 23:39:12.546226 p2p/discover/database.go:183] failed to retrieve node b68ed408e685e6dc75ea457b65f945fa2c6f2171c8bfaf26e32d6362c3ebe9ed3ef3aeb682991e3a01250f93f2a68ea8ca1a98676e669cc007ed227c35d7c3f1: leveldb: not found
I1001 23:39:12.546337 p2p/discover/table.go:473] Bonding b68ed408e685e6dc: known=false, fails=0 age=409813h39m12.54632801s
I1001 23:39:12.547012 p2p/discover/udp.go:453] >>> 192.168.1.14:54991 discover.ping
I1001 23:39:12.549582 p2p/discover/udp.go:521] <<< 192.168.1.14:54991 *discover.pong: ok
I1001 23:39:12.556974 p2p/discover/udp.go:453] >>> 192.168.1.14:54991 discover.neighbors
I1001 23:39:12.557059 p2p/discover/udp.go:521] <<< 192.168.1.14:54991 *discover.findnode: ok
And the latest P2P discovery protocol documentation can be found at RLPx: Cryptographic Network & Transport Protocol.
Best Answer
It's one of the client implementations, yes. (There are other Ethereum client implementations that adhere to the spec, listed here. As far as I know there's only one implementation for BSC... which is the one controlled by Binance.)
Should be, according to the installation instructions in the BSC GitHub repository. (And yes, they link to the main Ethereum Geth instructions, which includes a set for Windows.)