update aggregate sig epoch

pull/3374/head
Rongjian Lan 4 years ago
parent 5b993107e6
commit a4d8e7d949
  1. 6
      consensus/consensus_service.go
  2. 2
      staking/verify/verify.go

@ -309,8 +309,10 @@ func (consensus *Consensus) UpdateConsensusInformation() Mode {
consensus.BlockPeriod = 5 * time.Second
// TODO: remove once multisig is fully upgraded in the network
if consensus.ChainReader.Config().ChainID != params.MainnetChainID || curEpoch.Cmp(big.NewInt(1000)) > 0 {
// Enable aggregate sig at epoch 1000 for mainnet, at epoch 53000 for testnet, and always for other nets.
if (consensus.ChainReader.Config().ChainID == params.MainnetChainID && curEpoch.Cmp(big.NewInt(1000)) > 0) ||
(consensus.ChainReader.Config().ChainID == params.TestnetChainID && curEpoch.Cmp(big.NewInt(53000)) > 0) ||
(consensus.ChainReader.Config().ChainID != params.MainnetChainID && consensus.ChainReader.Config().ChainID != params.TestChainID) {
consensus.AggregateSig = true
}

@ -14,7 +14,7 @@ import (
)
var (
errQuorumVerifyAggSign = errors.New("insufficient voting power to verify aggreate sig")
errQuorumVerifyAggSign = errors.New("insufficient voting power to verify aggregate sig")
errAggregateSigFail = errors.New("could not verify hash of aggregate signature")
)

Loading…
Cancel
Save