I have followed the Boot Bios sequence of eosio and setup a eos private blockchain. The problem is my even though i have created also Block producers and also voted for them still the blocks are getting signed or produced by only eosio not my created block producers and also in the schedule list of block producers there's only eosiowith its producer key. Can anyone help me out with this that how to put the created block producers on the block producers schedule list.
2 Answers
First, you have to register 21 BPs.
Second, Check the token. In order to change the BP, requirement is minimum 15% of tokens have been staked to producers votes.
https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence //chapter 3.
If you issued the token 10000 EOS, 1500 of tokens have been staked to producers votes.
And, if you want to edit the BP's number
void system_contract::update_elected_producers( block_timestamp block_time ) {
_gstate.last_producer_schedule_update = block_time;
auto idx = _producers.get_index<"prototalvote"_n>();
std::vector< std::pair<eosio::producer_key,uint16_t> > top_producers;
top_producers.reserve(21);
for ( auto it = idx.cbegin(); it != idx.cend() && top_producers.size() < 21 && 0 < it->total_votes && it->active(); ++it ) {
top_producers.emplace_back( std::pair<eosio::producer_key,uint16_t>({{it->owner, it->producer_key}, it->location}) );
}.
if ( top_producers.size() < _gstate.last_producer_schedule_size ) {
return;
}
21 --> Desired number
Fianlly. Check the vote producer
./cleos system listproducers
you can see how many staked token were voted
-
1The requirement of 15% tokens needing to be staked is incorrect. There is a
min_activated_stake
variable that is hardcoded to 150M, github.com/EOSIO/eosio.contracts/blob/master/contracts/… I have already opened an issue regarding this incorrect error message. It should either tell the user to stake 150M+ tokens, or the contract logic needs to be altered to check the max_supply of the tokens issued to determine the min_activated_stake. github.com/EOSIO/eosio.contracts/issues/291 Jul 24, 2019 at 19:51
You simply need to issue and stake over 150M tokens from the eosio.token
contract as it is hardcoded into the eosio.system
contract, https://github.com/EOSIO/eosio.contracts/blob/master/contracts/eosio.system/include/eosio.system/eosio.system.hpp#L67.
There is no additional requirement to register 21+ BPs.
Complete Steps to Activate Fully Featured Testnet
- Add
producer1
to nodeos config.ini along with private signing key - Create system blockchain accounts
eosio.token
eosio.msig
eosio.bpay
eosio.names
eosio.ram
eosio.ramfee
eosio.saving
eosio.stake
eosio.vpay
eosio.rex
- Deploy system contracts (bios before system)
eosio.bios
eosio.token
eosio.msig
eosio.system
- Create EOS token with at LEAST 150M supply
- Issue tokens to eosio and stake at LEAST 150M tokens
- Create
producer1
account - Register
producer1
as BP with private signing key setup in config.ini - Vote
producer1
as BP - Testnet is now active and should be fully functional with
producer1
signing blocks
I have already filed an issue with the eosio.system
contract to resolve the erroneous error message or logic.