Skip to content

Commit

Permalink
Merge pull request #2275 from cheng762/develop
Browse files Browse the repository at this point in the history
update gov param  max validators to 225
  • Loading branch information
benbaley authored Nov 22, 2024
2 parents 3f7c948 + 5fd5a79 commit 9d3ec22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions x/plugin/gov_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ func (govPlugin *GovPlugin) BeginBlock(blockHash common.Hash, header *types.Head
}
log.Info("Successfully upgraded the new version 1.3.0", "blockNumber", blockNumber, "blockHash", blockHash, "preActiveProposalID", preActiveVersionProposalID)
}
if versionProposal.NewVersion == params.FORKVERSION_1_5_0 {
if err := gov.UpdateGovernParamValue(gov.ModuleStaking, gov.KeyMaxValidators, fmt.Sprint(xcom.MaxValidatorsForVersion150), blockNumber+1, blockHash); err != nil {
return err
}
log.Info("Successfully upgraded the new version 1.5.0", "blockNumber", blockNumber, "blockHash", blockHash)
}

log.Info("version proposal is active", "blockNumber", blockNumber, "proposalID", versionProposal.ProposalID, "newVersion", versionProposal.NewVersion, "newVersionString", xutil.ProgramVersion2Str(versionProposal.NewVersion))
}
Expand Down
7 changes: 5 additions & 2 deletions x/xcom/common_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/PlatONnetwork/PlatON-Go/params"
"github.com/PlatONnetwork/PlatON-Go/rlp"
"math/big"
"sync"

"github.com/PlatONnetwork/PlatON-Go/params"
"github.com/PlatONnetwork/PlatON-Go/rlp"

"github.com/PlatONnetwork/PlatON-Go/log"

"github.com/PlatONnetwork/PlatON-Go/common"
Expand Down Expand Up @@ -69,6 +70,8 @@ const (
ElectionBasePIP3 = 43

MainNetECHash = "0x259176769541cdb61bc19806cbf5a3f3489f4829b6b69f804f45f947a0c9c3e9"

MaxValidatorsForVersion150 = 225
)

var (
Expand Down

0 comments on commit 9d3ec22

Please sign in to comment.