-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic gas in load tests (#12416)
* use experimental seth, use dynamic gas also when sending funds * fix a situation, when we lose transaction timeout setting for networks that are not overwritten * go mod tidy * add gas limit for Fiji, fix a situation when new networks were ignored * update Seth version * fix lints * fix lints * newer seth * newer Seth * use transfer fee not gas limit for sending funds, modify defaults for missing networks * use latest Seth that uses block headers not entire blocks * try new Seth config; more refund logic * use latest seth, fix fund return issue where if a retry was used, only funds from 1st node were returned * do not return, but continue, if one node has has less balance than tx costs on return * go mod tidy * validate seth config before creating k8s env in ocr soak test, better default tx timeout * init seth client, before staring ocr soak test * fix complile errors * go mod * use latest seth * couple of renames and streamlines * use Seth Network urls if provided, otherwise take url from evmnetwork * testconfig will now correctly use custom EVMNetwork * latest Seth; set gas limit to 0 in TOMLs, so that it can be estimated by the node; use urls_secret for Seth Network when set, otherwise use WS endpoints from EVMNetwork; update default TOMLs with new values * go mod * skip funds return for given CL node if balance is 0 * latest seth * gomodtidy + latest seth * fix load compile --------- Co-authored-by: davidcauchi <[email protected]>
- Loading branch information
1 parent
401d126
commit a3d5276
Showing
17 changed files
with
322 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package experiments | ||
|
||
import ( | ||
"testing" | ||
"time" | ||
|
||
"github.com/smartcontractkit/seth" | ||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/smartcontractkit/chainlink-testing-framework/logging" | ||
"github.com/smartcontractkit/chainlink-testing-framework/networks" | ||
"github.com/smartcontractkit/chainlink/integration-tests/contracts" | ||
tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" | ||
"github.com/smartcontractkit/chainlink/integration-tests/utils" | ||
) | ||
|
||
func TestGasExperiment(t *testing.T) { | ||
l := logging.GetTestLogger(t) | ||
config, err := tc.GetConfig("Soak", tc.OCR) | ||
require.NoError(t, err, "Error getting config") | ||
|
||
network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] | ||
readSethCfg := config.GetSethConfig() | ||
require.NotNil(t, readSethCfg, "Seth config shouldn't be nil") | ||
|
||
sethCfg, err := utils.MergeSethAndEvmNetworkConfigs(network, *readSethCfg) | ||
require.NoError(t, err, "Error merging seth and evm network configs") | ||
err = utils.ValidateSethNetworkConfig(sethCfg.Network) | ||
require.NoError(t, err, "Error validating seth network config") | ||
|
||
seth, err := seth.NewClientWithConfig(&sethCfg) | ||
require.NoError(t, err, "Error creating seth client") | ||
|
||
for i := 0; i < 1; i++ { | ||
_, err = contracts.DeployLinkTokenContract(l, seth) | ||
require.NoError(t, err, "Error deploying LINK contract") | ||
time.Sleep(2 * time.Second) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.