bnb-chain / bsc

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

how to be validator in private bsc network #813

Closed huahuayu closed 11 months ago

huahuayu commented 2 years ago

Hi, I want start a private bsc network for test purpose, in etherem I can simply use --mine flag to set the node be a miner, but it's not working in bsc.

I searched the issues and read the documents, it seems a bnbcli command can be used, but it's for production. Could you please provide some guidelines?

It's very simple in ethereum https://github.com/huahuayu/ethereum-local-private-network

huahuayu commented 2 years ago

Hi @steventranjs is there a straightforward way to create a validator and run it.

yutianwu commented 2 years ago

do you have any specific purpose to test the validator node, we don't have docs for setting up private validators for now.

huahuayu commented 2 years ago

Hi @yutianwu I need a local test env which can lunch within mins and have fully control so I can test things out. Without validator there is no block be produced.

yutianwu commented 2 years ago

you can set up a private ethereum node, it's the same

huahuayu commented 2 years ago

I made some changes for bsc node to speed up the trading, so I'd like to use bsc node to test. I think you do have benchmark tests besides mainnet?

People have needs to test in the private chain, for time-saving and cost-saving, there's other issues mentioned the same problem https://github.com/bnb-chain/bsc/issues/788 https://github.com/bnb-chain/bsc/issues/231

haliliceylan commented 2 years ago

Hi, I want start a private bsc network for test purpose, in etherem I can simply use --mine flag to set the node be a miner, but it's not working in bsc.

I searched the issues and read the documents, it seems a bnbcli command can be used, but it's for production. Could you please provide some guidelines?

It's very simple in ethereum https://github.com/huahuayu/ethereum-local-private-network

the git repository you mentioned has a bsc branch, does this work?

huahuayu commented 2 years ago

Hi, I want start a private bsc network for test purpose, in etherem I can simply use --mine flag to set the node be a miner, but it's not working in bsc. I searched the issues and read the documents, it seems a bnbcli command can be used, but it's for production. Could you please provide some guidelines? It's very simple in ethereum https://github.com/huahuayu/ethereum-local-private-network

the git repository you mentioned has a bsc branch, does this work?

yes, it works, it can start a three-node network, one miner two peers, but the network is not same as bsc production.

yutianwu commented 2 years ago

Hi, I want start a private bsc network for test purpose, in etherem I can simply use --mine flag to set the node be a miner, but it's not working in bsc. I searched the issues and read the documents, it seems a bnbcli command can be used, but it's for production. Could you please provide some guidelines? It's very simple in ethereum https://github.com/huahuayu/ethereum-local-private-network

the git repository you mentioned has a bsc branch, does this work?

yes, it works, it can start a three-node network, one miner two peers, but the network is not same as bsc production.

what do you mean by as bsc production, chain id or something else

huahuayu commented 2 years ago

Basically, the genesis config is different, and there's no validator, I just use --miner flag.

Davincible commented 1 year ago

Would be nice to have some clear docs on this

bnb-tw commented 1 year ago

This is a current issue for us as well. We have started the process of documenting how we setup local devnets for BSC that run parlia consensus, and the new fast finality mechanism. I'll assign myself to this issue so I can track it.

zzzckck commented 11 months ago

Try this one, should work: https://github.com/bnb-chain/node-deploy