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

make gethGasLimit configurable #13799

Closed
wants to merge 2 commits into from
Closed
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
23 changes: 11 additions & 12 deletions integration-tests/load/automationv2_1/automationv2_1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,22 @@ func TestLogTrigger(t *testing.T) {
Str("Tag", version).
Msg("Test Config")

testConfigFormat := `Number of Nodes: %d
Duration: %d
Block Time: %d
Spec Type: %s
Log Level: %s
Image: %s
testConfigFormat := `Image: %s
Tag: %s

General Config:
%s

Load Config:
%s`

prettyLoadConfig, err := toml.Marshal(loadedTestConfig.Automation.Load)
require.NoError(t, err, "Error marshalling load config")

testConfig := fmt.Sprintf(testConfigFormat, *loadedTestConfig.Automation.General.NumberOfNodes, *loadedTestConfig.Automation.General.Duration,
*loadedTestConfig.Automation.General.BlockTime, *loadedTestConfig.Automation.General.SpecType, *loadedTestConfig.Automation.General.ChainlinkNodeLogLevel, image, version, string(prettyLoadConfig))
prettyGeneralConfig, err := toml.Marshal(loadedTestConfig.Automation.General)
require.NoError(t, err, "Error marshalling load config")

testConfig := fmt.Sprintf(testConfigFormat, image, version, string(prettyGeneralConfig), string(prettyLoadConfig))
l.Info().Str("testConfig", testConfig).Msg("Test Config")

testNetwork := networks.MustGetSelectedNetworkConfig(loadedTestConfig.Network)[0]
Expand All @@ -216,10 +216,9 @@ Load Config:
Values: map[string]interface{}{
"resources": gethNodeSpec,
"geth": map[string]interface{}{
"blocktime": *loadedTestConfig.Automation.General.BlockTime,
"capacity": "20Gi",
"startGaslimit": "20000000",
"targetGasLimit": "30000000",
"blocktime": *loadedTestConfig.Automation.General.BlockTime,
"capacity": "20Gi",
"startGaslimit": loadedTestConfig.Automation.General.GethGasLimit.String(),
},
},
}))
Expand Down
18 changes: 11 additions & 7 deletions integration-tests/testconfig/automation/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ func (c *Config) Validate() error {

// General is a common configuration for all automation performance tests
type General struct {
NumberOfNodes *int `toml:"number_of_nodes"`
Duration *int `toml:"duration"`
BlockTime *int `toml:"block_time"`
SpecType *string `toml:"spec_type"`
ChainlinkNodeLogLevel *string `toml:"chainlink_node_log_level"`
UsePrometheus *bool `toml:"use_prometheus"`
RemoveNamespace *bool `toml:"remove_namespace"`
NumberOfNodes *int `toml:"number_of_nodes"`
Duration *int `toml:"duration"`
BlockTime *int `toml:"block_time"`
GethGasLimit *big.Int `toml:"gethGasLimit"`
SpecType *string `toml:"spec_type"`
ChainlinkNodeLogLevel *string `toml:"chainlink_node_log_level"`
UsePrometheus *bool `toml:"use_prometheus"`
RemoveNamespace *bool `toml:"remove_namespace"`
}

func (c *General) Validate() error {
Expand All @@ -73,6 +74,9 @@ func (c *General) Validate() error {
if c.RemoveNamespace == nil {
return errors.New("remove_namespace must be set")
}
if c.GethGasLimit == nil || c.GethGasLimit.Cmp(big.NewInt(0)) < 0 {
c.GethGasLimit = big.NewInt(20000000)
}

return nil
}
Expand Down
Loading