Skip to content

Commit

Permalink
Write minValidatorCount to genesis.json (#1547)
Browse files Browse the repository at this point in the history
* Write the value from the genesis '--min-validator-count' flag to the genesis.json output

* Update comment on MinValidatorSetSize

Co-authored-by: Stefan Negovanović <93934272+Stefan-Ethernal@users.noreply.github.com>

---------

Co-authored-by: Stefan Negovanović <93934272+Stefan-Ethernal@users.noreply.github.com>
  • Loading branch information
jp-imx and Stefan-Ethernal committed May 29, 2023
1 parent 709a1d2 commit 44bbefc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions command/genesis/polybft_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func (p *genesisParams) generatePolyBftChainConfig(o command.OutputFormatter) er
Governance: initialValidators[0].Address,
InitialTrieRoot: types.StringToHash(p.initialStateRoot),
NativeTokenConfig: p.nativeTokenConfig,
MinValidatorSetSize: p.minNumValidators,
MaxValidatorSetSize: p.maxNumValidators,
RewardConfig: &polybft.RewardsConfig{
TokenAddress: rewardTokenAddr,
Expand Down
3 changes: 3 additions & 0 deletions consensus/polybft/polybft_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ type PolyBFTConfig struct {
// SupernetID indicates ID of given supernet generated by stake manager contract
SupernetID int64 `json:"supernetID"`

// MinValidatorSetSize indicates the minimum size of validator set
MinValidatorSetSize uint64 `json:"minValidatorSetSize"`

// MaxValidatorSetSize indicates the maximum size of validator set
MaxValidatorSetSize uint64 `json:"maxValidatorSetSize"`

Expand Down

0 comments on commit 44bbefc

Please sign in to comment.