diff --git a/consensus/ibft/ibft.go b/consensus/ibft/ibft.go index 82f910c736..81b66e49fb 100644 --- a/consensus/ibft/ibft.go +++ b/consensus/ibft/ibft.go @@ -900,11 +900,24 @@ func (i *Ibft) runValidateState() { } if msg == nil { + i.logger.Debug("ValidateState got message timeout, should change round", + "sequence", i.state.view.Sequence, "round", i.state.view.Round+1) + i.state.unlock() i.setState(RoundChangeState) continue } + // check msg number and round, might from some faulty nodes + if i.state.view.Sequence != msg.View.GetSequence() || + i.state.view.Round != msg.View.GetRound() { + i.logger.Debug("ValidateState got message not matching sequence and round", + "my-sequence", i.state.view.Sequence, "my-round", i.state.view.Round+1, + "other-sequence", msg.View.GetSequence(), "other-round", msg.View.GetRound()) + + continue + } + switch msg.Type { case proto.MessageReq_Prepare: i.state.addPrepared(msg) diff --git a/contracts/abis/abis.go b/contracts/abis/abis.go index 5506ef752d..9c939b951a 100644 --- a/contracts/abis/abis.go +++ b/contracts/abis/abis.go @@ -15,4 +15,7 @@ var ( ) // Temporarily deployed contract ABI -var StressTestABI = abi.MustNewABI(StressTestJSONABI) +var ( + // StressTest contract abi + StressTestABI = abi.MustNewABI(StressTestJSONABI) +) diff --git a/e2e/framework/config.go b/e2e/framework/config.go index 3458078160..87bc7fee5a 100644 --- a/e2e/framework/config.go +++ b/e2e/framework/config.go @@ -26,26 +26,27 @@ type SrvAccount struct { // TestServerConfig for the test server type TestServerConfig struct { ReservedPorts []ReservedPort - JSONRPCPort int // The JSON RPC endpoint port - GRPCPort int // The GRPC endpoint port - LibP2PPort int // The Libp2p endpoint port - Seal bool // Flag indicating if blocks should be sealed - RootDir string // The root directory for test environment - IBFTDirPrefix string // The prefix of data directory for IBFT - IBFTDir string // The name of data directory for IBFT - PremineAccts []*SrvAccount // Accounts with existing balances (genesis accounts) - GenesisValidatorBalance *big.Int // Genesis the balance for the validators - DevStakers []types.Address // List of initial staking addresses for the ValidatorSet SC with dev consensus - Consensus ConsensusType // Consensus MechanismType - Bootnodes []string // Bootnode Addresses - PriceLimit *uint64 // Minimum gas price limit to enforce for acceptance into the pool - DevInterval int // Dev consensus update interval [s] - EpochSize uint64 // The epoch size in blocks for the IBFT layer - BlockGasLimit uint64 // Block gas limit - BlockGasTarget uint64 // Gas target for new blocks - ShowsLog bool // Flag specifying if logs are shown - IsPos bool // Specifies the mechanism used for IBFT (PoA / PoS) - Signer *crypto.EIP155Signer // Signer used for transactions + JSONRPCPort int // The JSON RPC endpoint port + GRPCPort int // The GRPC endpoint port + LibP2PPort int // The Libp2p endpoint port + Seal bool // Flag indicating if blocks should be sealed + RootDir string // The root directory for test environment + IBFTDirPrefix string // The prefix of data directory for IBFT + IBFTDir string // The name of data directory for IBFT + PremineAccts []*SrvAccount // Accounts with existing balances (genesis accounts) + GenesisValidatorBalance *big.Int // Genesis the balance for the validators + // List of initial staking addresses for the ValidatorSet SC with dev consensus + DevStakers []types.Address + Consensus ConsensusType // Consensus MechanismType + Bootnodes []string // Bootnode Addresses + PriceLimit *uint64 // Minimum gas price limit to enforce for acceptance into the pool + DevInterval int // Dev consensus update interval [s] + EpochSize uint64 // The epoch size in blocks for the IBFT layer + BlockGasLimit uint64 // Block gas limit + BlockGasTarget uint64 // Gas target for new blocks + ShowsLog bool // Flag specifying if logs are shown + IsPos bool // Specifies the mechanism used for IBFT (PoA / PoS) + Signer *crypto.EIP155Signer // Signer used for transactions } // DataDir returns path of data directory server uses