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

[TT-449] Automation Benchmark RPC Fault Tolerance #10676

Merged
merged 36 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ff28ccb
Fix imports
kalverra Sep 18, 2023
670c8bd
More imports
kalverra Sep 18, 2023
187a028
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Sep 18, 2023
796281b
Consolidate logger and tester
kalverra Sep 18, 2023
4bd216d
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Sep 18, 2023
2b95285
Update
kalverra Sep 18, 2023
46c4ace
Cleanup
kalverra Sep 18, 2023
f6f35d9
Format
kalverra Sep 18, 2023
4caba46
Merge
kalverra Sep 18, 2023
09bf393
RPC fault tolerance step 1
kalverra Sep 18, 2023
00a7de0
Update vers
kalverra Sep 19, 2023
bfab7d1
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Sep 19, 2023
f5a8b88
Roughly working
kalverra Sep 19, 2023
c820d1f
Do final report
kalverra Sep 19, 2023
07bcdcf
Merge
kalverra Sep 19, 2023
a8bdd21
Avoid loop reference
kalverra Sep 20, 2023
ff2eefc
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Sep 20, 2023
98b7818
Tighter test loop
kalverra Sep 20, 2023
03dd539
Adds checks for interrupt
kalverra Sep 20, 2023
f5a38f2
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Sep 20, 2023
6e9df81
Merge
kalverra Sep 22, 2023
2024848
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Sep 22, 2023
5328ef1
Merge
kalverra Sep 28, 2023
5b3b443
Cleanup
kalverra Sep 28, 2023
6805955
Merge
kalverra Oct 2, 2023
1918cb4
Fix imports
kalverra Oct 2, 2023
005fa3e
Fix build triggers
kalverra Oct 2, 2023
5d27746
Merge'
kalverra Oct 3, 2023
3fbdf75
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Oct 5, 2023
29aef0f
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Oct 5, 2023
08592fa
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
kalverra Oct 6, 2023
df5af30
Simplify subscriptions
kalverra Oct 6, 2023
2fb00f4
Merge
kalverra Oct 10, 2023
2d4af00
Add backoff
kalverra Oct 11, 2023
4551cfe
Remove debug
kalverra Oct 11, 2023
232c9e0
Merge branch 'develop' into keeperRPC
kalverra Oct 11, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY

build-test-image:
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || contains(join(github.event.pull_request.labels.*.name, ' '), 'build-test-image')
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'schedule' || contains(join(github.event.pull_request.labels.*.name, ' '), 'build-test-image')
environment: integration
permissions:
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ run_test_with_local_image: build_docker_image
SELECTED_NETWORKS="SIMULATED,SIMULATED_1,SIMULATED_2" \
ARGS="$(args)" \
PRODUCT=$(product) \
./scripts/run_product_tests
./scripts/run_product_tests
14 changes: 7 additions & 7 deletions integration-tests/benchmark/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,22 @@ func TestAutomationBenchmark(t *testing.T) {
chainClient, err := blockchain.NewEVMClient(benchmarkNetwork, testEnvironment, l)
require.NoError(t, err, "Error connecting to blockchain")
registryVersions := addRegistry(RegistryToTest)
keeperBenchmarkTest := testsetups.NewKeeperBenchmarkTest(
keeperBenchmarkTest := testsetups.NewKeeperBenchmarkTest(t,
testsetups.KeeperBenchmarkTestInputs{
BlockchainClient: chainClient,
RegistryVersions: registryVersions,
KeeperRegistrySettings: &contracts.KeeperRegistrySettings{
PaymentPremiumPPB: uint32(0),
BlockCountPerTurn: big.NewInt(100),
CheckGasLimit: uint32(45000000), //45M
StalenessSeconds: big.NewInt(90000),
CheckGasLimit: uint32(45_000_000), //45M
StalenessSeconds: big.NewInt(90_000),
GasCeilingMultiplier: uint16(2),
MaxPerformGas: uint32(MaxPerformGas),
MinUpkeepSpend: big.NewInt(0),
FallbackGasPrice: big.NewInt(2e11),
FallbackLinkPrice: big.NewInt(2e18),
MaxCheckDataSize: uint32(5000),
MaxPerformDataSize: uint32(5000),
MaxCheckDataSize: uint32(5_000),
MaxPerformDataSize: uint32(5_000),
},
Upkeeps: &testsetups.UpkeepConfig{
NumberOfUpkeeps: NumberOfUpkeeps,
Expand Down Expand Up @@ -202,8 +202,8 @@ func TestAutomationBenchmark(t *testing.T) {
l.Error().Err(err).Msg("Error when tearing down remote suite")
}
})
keeperBenchmarkTest.Setup(t, testEnvironment)
keeperBenchmarkTest.Run(t)
keeperBenchmarkTest.Setup(testEnvironment)
keeperBenchmarkTest.Run()
}

func addRegistry(registryToTest string) []eth_contracts.KeeperRegistryVersion {
Expand Down
20 changes: 10 additions & 10 deletions integration-tests/contracts/ethereum_keeper_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -1355,13 +1355,13 @@ type KeeperConsumerBenchmarkRoundConfirmer struct {
context context.Context
cancel context.CancelFunc

firstBlockNum uint64 // Records the number of the first block that came in
lastBlockNum uint64 // Records the number of the last block that came in
blockRange int64 // How many blocks to watch upkeeps for
upkeepSLA int64 // SLA after which an upkeep is counted as 'missed'
metricsReporter *testreporters.KeeperBenchmarkTestReporter // Testreporter to track results
upkeepIndex int64
firstEligibleuffer int64
firstBlockNum uint64 // Records the number of the first block that came in
lastBlockNum uint64 // Records the number of the last block that came in
blockRange int64 // How many blocks to watch upkeeps for
upkeepSLA int64 // SLA after which an upkeep is counted as 'missed'
metricsReporter *testreporters.KeeperBenchmarkTestReporter // Testreporter to track results
upkeepIndex int64
firstEligibleBuffer int64

// State variables, changes as we get blocks
blocksSinceSubscription int64 // How many blocks have passed since subscribing
Expand All @@ -1384,7 +1384,7 @@ func NewKeeperConsumerBenchmarkRoundConfirmer(
upkeepSLA int64,
metricsReporter *testreporters.KeeperBenchmarkTestReporter,
upkeepIndex int64,
firstEligibleuffer int64,
firstEligibleBuffer int64,
logger zerolog.Logger,
) *KeeperConsumerBenchmarkRoundConfirmer {
ctx, cancelFunc := context.WithCancel(context.Background())
Expand All @@ -1406,7 +1406,7 @@ func NewKeeperConsumerBenchmarkRoundConfirmer(
lastBlockNum: 0,
upkeepIndex: upkeepIndex,
firstBlockNum: 0,
firstEligibleuffer: firstEligibleuffer,
firstEligibleBuffer: firstEligibleBuffer,
l: logger,
}
}
Expand Down Expand Up @@ -1457,7 +1457,7 @@ func (o *KeeperConsumerBenchmarkRoundConfirmer) ReceiveHeader(receivedHeader blo
o.blocksSinceEligible = 0
}

isEligible, err := o.instance.CheckEligible(context.Background(), big.NewInt(o.upkeepIndex), big.NewInt(o.blockRange), big.NewInt(o.firstEligibleuffer))
isEligible, err := o.instance.CheckEligible(context.Background(), big.NewInt(o.upkeepIndex), big.NewInt(o.blockRange), big.NewInt(o.firstEligibleBuffer))
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion integration-tests/contracts/ethereum_vrf_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/rs/zerolog/log"

"github.com/smartcontractkit/chainlink-testing-framework/blockchain"

"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/batch_blockhash_store"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/solidity_vrf_consumer_interface"
Expand Down
1 change: 0 additions & 1 deletion integration-tests/smoke/vrfv2plus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"

"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-testing-framework/logging"
Expand Down
Loading
Loading