Skip to content

Commit

Permalink
VRF-1134: Adjust BHS test to run on chains where txs needed for block…
Browse files Browse the repository at this point in the history
…… (#13819)

* VRF-1134: Adjust BHS test to run on chains where txs needed for blocks to be generated

* VRF-1134: fixing tests
  • Loading branch information
iljapavlovs authored Jul 11, 2024
1 parent 9a6fef7 commit 1dd4df7
Show file tree
Hide file tree
Showing 21 changed files with 911 additions and 78 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/on-demand-vrfv2plus-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ on:
type: string
performanceTestType:
description: Performance Test Type of test to run
type: choice
options:
- "Smoke"
- "Soak"
- "Load"
- "Stress"
- "Spike"
type: string
required: true
test_list_regex:
description: "Regex for tests to run"
required: false
Expand Down
1 change: 1 addition & 0 deletions contracts/scripts/native_solc_compile_all_vrf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ compileContract vrf/testhelpers/VRFV2LoadTestWithMetrics.sol
compileContract vrf/testhelpers/VRFV2OwnerTestConsumer.sol
compileContractAltOpts vrf/testhelpers/VRFCoordinatorTestV2.sol 10000
compileContract vrf/testhelpers/VRFMockETHLINKAggregator.sol
compileContract vrf/testhelpers/Counter.sol

# Helper contracts
compileContract vrf/interfaces/IAuthorizedReceiver.sol
Expand Down
26 changes: 26 additions & 0 deletions contracts/src/v0.8/vrf/testhelpers/Counter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Counter {
error AlwaysRevert();

uint256 public count = 0;

function increment() public returns (uint256) {
count += 1;
return count;
}

function reset() public {
count = 0;
}

function alwaysRevert() public pure {
revert AlwaysRevert();
}

function alwaysRevertWithString() public pure {
revert("always revert");
}
}
274 changes: 274 additions & 0 deletions core/gethwrappers/generated/counter/counter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ blockhash_store: ../../contracts/solc/v0.8.19/BlockhashStore/BlockhashStore.abi
chain_module_base: ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.abi ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.bin 39dfce79330e921e5c169051b11c6e5ea15cd4db5a7b09c06aabbe9658148915
chain_reader_tester: ../../contracts/solc/v0.8.19/ChainReaderTester/ChainReaderTester.abi ../../contracts/solc/v0.8.19/ChainReaderTester/ChainReaderTester.bin de88c7e68de36b96aa2bec844bdc96fcd7c9017b38e25062b3b9f9cec42c814f
chain_specific_util_helper: ../../contracts/solc/v0.8.6/ChainSpecificUtilHelper/ChainSpecificUtilHelper.abi ../../contracts/solc/v0.8.6/ChainSpecificUtilHelper/ChainSpecificUtilHelper.bin 66eb30b0717fefe05672df5ec863c0b9a5a654623c4757307a2726d8f31e26b1
counter: ../../contracts/solc/v0.8.6/Counter/Counter.abi ../../contracts/solc/v0.8.6/Counter/Counter.bin 6ca06e000e8423573ffa0bdfda749d88236ab3da2a4cbb4a868c706da90488c9
cron_upkeep_factory_wrapper: ../../contracts/solc/v0.8.6/CronUpkeepFactory/CronUpkeepFactory.abi - dacb0f8cdf54ae9d2781c5e720fc314b32ed5e58eddccff512c75d6067292cd7
cron_upkeep_wrapper: ../../contracts/solc/v0.8.6/CronUpkeepFactory/CronUpkeep.abi - 362fcfcf30a6ab3acff83095ea4b2b9056dd5e9dcb94bc5411aae58995d22709
dummy_protocol_wrapper: ../../contracts/solc/v0.8.16/DummyProtocol/DummyProtocol.abi ../../contracts/solc/v0.8.16/DummyProtocol/DummyProtocol.bin 583a448170b13abf7ed64e406e8177d78c9e55ab44efd141eee60de23a71ee3b
Expand Down
1 change: 1 addition & 0 deletions core/gethwrappers/go_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ package gethwrappers
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics/VRFV2LoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics/VRFV2LoadTestWithMetrics.bin VRFV2LoadTestWithMetrics vrf_load_test_with_metrics
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer/VRFV2OwnerTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer/VRFV2OwnerTestConsumer.bin VRFV2OwnerTestConsumer vrf_owner_test_consumer
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFv2Consumer/VRFv2Consumer.abi ../../contracts/solc/v0.8.6/VRFv2Consumer/VRFv2Consumer.bin VRFv2Consumer vrf_v2_consumer_wrapper
//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/Counter/Counter.abi ../../contracts/solc/v0.8.6/Counter/Counter.bin Counter counter

//go:generate go run ./generation/generate_link/wrap_link.go

Expand Down
Loading

0 comments on commit 1dd4df7

Please sign in to comment.