Home

Awesome

BNB Smart Chain Private Cluster

Create a private BNB Smart Chain cluster and run bep20 truffle test in local docker.

Prerequisites

Account & Private Keys

Account 1: 0xb75573a04648535Bddc52adf6fBc887149624253, private key: 0x953dbe85f02d84377f90a6eb6d8a6dd128aa50f69c4671d32414b139040be24b
Account 2: 0xA2bC4Cf857f3D7a22b29c71774B4d8f25cc7edD0, private key: 0xa568b36fca21714f879e3cf157f021a4c5dccd6229ef6e6eee7fb7888193c026
Account 3: 0x59b02D4d2F94ea5c55230715a58EBb0b703bCD4B, private key: 0xc484de1ef84e998869d59752d1f09bffa161673d54250ea152ec82d684e2f154
Account 4: 0xBb46AbbCC95213754f549E0CFa2B13bef0aBFaB6, private key: 0x4d5211ccb78c977d7ae7094b27b561458274a1c2df8be5f3c66479fe33ea8838
Account 5: 0x8E1Ad6FaC6ea5871140594ABEF5b1D503385e936, private key: 0x3c6efff45290e2204cc19b091cdefffcead5757b074b1723e9cf8973e6337ba4
Account 6: 0xC8D063A7e0A118432721daE5e059404b5598BD76, private key: 0x81f43b0303746bfacbaae64947850e86deca412d3b39b1f8d3c89bf483d615f3
Account 7: 0xc32ec0115BCB6693d4b4854531cA5e6a99217ABF, private key: 0xeca0930606860b8ae4a7f2b9a56ee62c4e11f613a894810b7642cabef689cf09
Account 8: 0x7fd60C817837dCFEFCa6D0A52A44980d12F70C59, private key: 0x68ef711b398fa47f22fbc44a972efbd2c2e25338e7c6afb92dc84b569bf784a5

Simple Validator Node Cluster

Three Validator Node Cluster

Development Configuration

You may need to rebuild BSC docker image, reset data or start cluster with new configuration.

[Optional] Rebuild BSC Docker Image:

[Optional] Reset Data:

[Optional] Start Cluster With New Configuration:

Bootnode Configuration

The bsc-rpc act as a bootstrap endpoint with config/bootstrap.key and its corresponding BOOTSTRAP_PUB_KEY (as in .env).

If you want to generate a new bootstrap.key and BOOTSTRAP_PUB_KEY, just execute below commands:

# this ./bootnode binary only applicable for MacOS
chmod +x ./bootnode

# Generate bootstrap.key
./bootnode -genkey bootstrap.key

# Create a new BOOTSTRAP_PUB_KEY from bootstrap.key
./bootnode -nodekey bootstrap.key -writeaddress