diff --git a/consensus/polybft/polybft.go b/consensus/polybft/polybft.go index 0b85c59661..664b254695 100644 --- a/consensus/polybft/polybft.go +++ b/consensus/polybft/polybft.go @@ -81,7 +81,7 @@ type Polybft struct { // closeCh is used to signal that consensus protocol is stopped closeCh chan struct{} - // ibft is the ibft engine + // ibft is the wrapper around ibft consensus engine ibft *IBFTConsensusWrapper // state is reference to the struct which encapsulates consensus data persistence logic diff --git a/e2e/framework/config.go b/e2e/framework/config.go index c3dccf2e3a..cdc3275273 100644 --- a/e2e/framework/config.go +++ b/e2e/framework/config.go @@ -38,7 +38,6 @@ type TestServerConfig struct { 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 BaseFee uint64 // Initial base fee @@ -47,8 +46,7 @@ type TestServerConfig struct { SaveLogs bool // Flag specifying if logs are saved LogsDir string // Directory where logs are saved Signer crypto.TxSigner // Signer used for transactions - BlockTime uint64 // Minimum block generation time (in s) - BurnContracts map[uint64]types.Address + } // DataDir returns path of data directory server uses @@ -56,14 +54,6 @@ func (t *TestServerConfig) DataDir() string { return t.RootDir } -func (t *TestServerConfig) SetSigner(signer crypto.TxSigner) { - t.Signer = signer -} - -func (t *TestServerConfig) SetBlockTime(blockTime uint64) { - t.BlockTime = blockTime -} - // CALLBACKS // // Premine callback specifies an account with a balance (in WEI) @@ -88,15 +78,6 @@ func (t *TestServerConfig) SetBlockGasTarget(target uint64) { t.BlockGasTarget = target } -// SetBurnContract sets the given burn contract for the test server -func (t *TestServerConfig) SetBurnContract(block uint64, address types.Address) { - if t.BurnContracts == nil { - t.BurnContracts = map[uint64]types.Address{} - } - - t.BurnContracts[block] = address -} - // SetConsensus callback sets consensus func (t *TestServerConfig) SetConsensus(c ConsensusType) { t.Consensus = c @@ -127,12 +108,6 @@ func (t *TestServerConfig) SetShowsLog(f bool) { t.ShowsLog = f } -// SetEpochSize sets the epoch size for the consensus layer. -// It controls the rate at which the validator set is updated -func (t *TestServerConfig) SetEpochSize(epochSize uint64) { - t.EpochSize = epochSize -} - // SetSaveLogs sets flag for saving logs func (t *TestServerConfig) SetSaveLogs(f bool) { t.SaveLogs = f diff --git a/e2e/framework/helper.go b/e2e/framework/helper.go index bcd8b25ace..e3c409ea52 100644 --- a/e2e/framework/helper.go +++ b/e2e/framework/helper.go @@ -332,8 +332,8 @@ func NewTestServers(t *testing.T, num int, conf func(*TestServerConfig)) []*Test t.Fatal(err) } - // It is safe to use a dummy MultiAddr here, since this init method - // is called for the Dev consensus mode, and IBFT servers are initialized with NewIBFTServersManager. + // It is safe to use a dummy MultiAddr here, + // since this init method is called for the Dev consensus mode // This method needs to be standardized in the future bootnodes := []string{tests.GenerateTestMultiAddr(t).String()} diff --git a/e2e/framework/testserver.go b/e2e/framework/testserver.go index ea38d90991..436d64e885 100644 --- a/e2e/framework/testserver.go +++ b/e2e/framework/testserver.go @@ -175,13 +175,6 @@ func (t *TestServer) GenerateGenesis() error { args = append(args, "--premine", acct.Addr.String()+":0x"+acct.Balance.Text(16)) } - // provide block time flag - // (e2e framework expects BlockTime parameter to be provided in seconds) - if t.Config.BlockTime != 0 { - args = append(args, "--block-time", - (time.Duration(t.Config.BlockTime) * time.Second).String()) - } - // add consensus flags switch t.Config.Consensus { case ConsensusDev: @@ -207,15 +200,8 @@ func (t *TestServer) GenerateGenesis() error { args = append(args, "--base-fee-config", *common.EncodeUint64(t.Config.BaseFee)) } - // add burn contracts - if len(t.Config.BurnContracts) != 0 { - for block, addr := range t.Config.BurnContracts { - args = append(args, "--burn-contract", fmt.Sprintf("%d:%s", block, addr)) - } - } else { - // london hardfork is enabled by default so there must be a default burn contract - args = append(args, "--burn-contract", "0:0x0000000000000000000000000000000000000000") - } + // london hardfork is enabled by default so there must be a default burn contract + args = append(args, "--burn-contract", "0:0x0000000000000000000000000000000000000000") cmd := exec.Command(resolveBinary(), args...) //nolint:gosec cmd.Dir = t.Config.RootDir