Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write minValidatorCount to genesis.json #1547

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions command/genesis/polybft_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,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
Loading