-
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.
VRF-599: add load tests; test refactoring to have configurable setup;… (
#10834) * VRF-599: add load tests; test refactoring to have configurable setup; adding GH Action workflow * VRF-599: PR comments * VRF-599: PR comments
- Loading branch information
1 parent
38384ec
commit 05d7b5a
Showing
14 changed files
with
732 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: On Demand VRFV2 Plus Load Test | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
network: | ||
description: Network to run tests on | ||
type: choice | ||
options: | ||
- "ETHEREUM_MAINNET" | ||
- "SIMULATED" | ||
- "SEPOLIA" | ||
- "OPTIMISM_MAINNET" | ||
- "OPTIMISM_GOERLI" | ||
- "ARBITRUM_MAINNET" | ||
- "ARBITRUM_GOERLI" | ||
- "BSC_MAINNET" | ||
- "BSC_TESTNET" | ||
- "POLYGON_MAINNET" | ||
- "MUMBAI" | ||
- "AVALANCHE_FUJI" | ||
- "AVALANCHE_MAINNET" | ||
fundingPrivateKey: | ||
description: Private funding key (Skip for Simulated) | ||
required: false | ||
type: string | ||
wsURL: | ||
description: WS URL for the network (Skip for Simulated) | ||
required: false | ||
type: string | ||
httpURL: | ||
description: HTTP URL for the network (Skip for Simulated) | ||
required: false | ||
type: string | ||
chainlinkImage: | ||
description: Container image location for the Chainlink nodes | ||
required: true | ||
default: public.ecr.aws/chainlink/chainlink | ||
chainlinkVersion: | ||
description: Container image version for the Chainlink nodes | ||
required: true | ||
default: "2.5.0" | ||
testDuration: | ||
description: Duration of the test (time string) | ||
required: false | ||
default: 1m | ||
chainlinkNodeFunding: | ||
description: How much to fund each Chainlink node (in ETH) | ||
required: false | ||
default: ".1" | ||
rps: | ||
description: Requests Per Second | ||
required: false | ||
default: 1 | ||
rateLimitDuration: | ||
description: How long to wait between requests | ||
required: false | ||
default: 1m | ||
randomnessRequestCountPerRequest: | ||
description: Randomness request Count per one TX request | ||
required: false | ||
default: 1 | ||
jobs: | ||
vrfv2plus_load_test: | ||
name: ${{ inputs.network }} VRFV2 Plus Load Test | ||
environment: integration | ||
runs-on: ubuntu20.04-8cores-32GB | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
id-token: write | ||
contents: read | ||
env: | ||
SELECTED_NETWORKS: ${{ inputs.network }} | ||
VRFV2PLUS_TEST_DURATION: ${{ inputs.testDuration }} | ||
VRFV2PLUS_CHAINLINK_NODE_FUNDING: ${{ inputs.chainlinkNodeFunding }} | ||
VRFV2PLUS_RATE_LIMIT_UNIT_DURATION: ${{ inputs.rateLimitDuration }} | ||
VRFV2PLUS_RPS: ${{ inputs.rps }} | ||
VRFV2PLUS_RANDOMNESS_REQUEST_COUNT_PER_REQUEST: ${{ inputs.randomnessRequestCountPerRequest }} | ||
|
||
TEST_LOG_LEVEL: debug | ||
REF_NAME: ${{ github.head_ref || github.ref_name }} | ||
ENV_JOB_IMAGE_BASE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests | ||
|
||
WASP_LOG_LEVEL: info | ||
steps: | ||
- name: Collect Metrics | ||
id: collect-gha-metrics | ||
uses: smartcontractkit/push-gha-metrics-action@d2c2b7bdc9012651230b2608a1bcb0c48538b6ec | ||
with: | ||
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} | ||
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} | ||
this-job-name: ${{ inputs.network }} VRFV2 Plus Load Test | ||
continue-on-error: true | ||
- name: Get Inputs | ||
run: | | ||
EVM_URLS=$(jq -r '.inputs.wsURL' $GITHUB_EVENT_PATH) | ||
EVM_HTTP_URLS=$(jq -r '.inputs.httpURL' $GITHUB_EVENT_PATH) | ||
EVM_KEYS=$(jq -r '.inputs.fundingPrivateKey' $GITHUB_EVENT_PATH) | ||
echo ::add-mask::$EVM_URLS | ||
echo ::add-mask::$EVM_HTTP_URLS | ||
echo ::add-mask::$EVM_KEYS | ||
echo EVM_URLS=$EVM_URLS >> $GITHUB_ENV | ||
echo EVM_HTTP_URLS=$EVM_HTTP_URLS >> $GITHUB_ENV | ||
echo EVM_KEYS=$EVM_KEYS >> $GITHUB_ENV | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run E2E soak tests | ||
run: | | ||
cd integration-tests/load/vrfv2plus | ||
go test -v -timeout 8h -run TestVRFV2PlusLoad/vrfv2plus_soak_test | ||
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
35 changes: 35 additions & 0 deletions
35
integration-tests/actions/vrfv2plus/vrfv2plus_config/config.go
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,35 @@ | ||
package vrfv2plus_config | ||
|
||
import "time" | ||
|
||
type VRFV2PlusConfig struct { | ||
ChainlinkNodeFunding float64 `envconfig:"CHAINLINK_NODE_FUNDING" default:".1"` // Amount of native currency to fund each chainlink node with | ||
IsNativePayment bool `envconfig:"IS_NATIVE_PAYMENT" default:"false"` // Whether to use native payment or LINK token | ||
LinkNativeFeedResponse int64 `envconfig:"LINK_NATIVE_FEED_RESPONSE" default:"1000000000000000000"` // Response of the LINK/ETH feed | ||
MinimumConfirmations uint16 `envconfig:"MINIMUM_CONFIRMATIONS" default:"3"` // Minimum number of confirmations for the VRF Coordinator | ||
SubscriptionFundingAmountLink int64 `envconfig:"SUBSCRIPTION_FUNDING_AMOUNT_LINK" default:"10"` // Amount of LINK to fund the subscription with | ||
SubscriptionFundingAmountNative int64 `envconfig:"SUBSCRIPTION_FUNDING_AMOUNT_NATIVE" default:"1"` // Amount of native currency to fund the subscription with | ||
NumberOfWords uint32 `envconfig:"NUMBER_OF_WORDS" default:"3"` // Number of words to request | ||
CallbackGasLimit uint32 `envconfig:"CALLBACK_GAS_LIMIT" default:"1000000"` // Gas limit for the callback | ||
MaxGasLimitCoordinatorConfig uint32 `envconfig:"MAX_GAS_LIMIT_COORDINATOR_CONFIG" default:"2500000"` // Max gas limit for the VRF Coordinator config | ||
FallbackWeiPerUnitLink int64 `envconfig:"FALLBACK_WEI_PER_UNIT_LINK" default:"60000000000000000"` // Fallback wei per unit LINK for the VRF Coordinator config | ||
StalenessSeconds uint32 `envconfig:"STALENESS_SECONDS" default:"86400"` // Staleness in seconds for the VRF Coordinator config | ||
GasAfterPaymentCalculation uint32 `envconfig:"GAS_AFTER_PAYMENT_CALCULATION" default:"33825"` // Gas after payment calculation for the VRF Coordinator config | ||
FulfillmentFlatFeeLinkPPM uint32 `envconfig:"FULFILLMENT_FLAT_FEE_LINK_PPM" default:"500"` // Flat fee in ppm for LINK for the VRF Coordinator config | ||
FulfillmentFlatFeeNativePPM uint32 `envconfig:"FULFILLMENT_FLAT_FEE_NATIVE_PPM" default:"500"` // Flat fee in ppm for native currency for the VRF Coordinator config | ||
|
||
RandomnessRequestCountPerRequest uint16 `envconfig:"RANDOMNESS_REQUEST_COUNT_PER_REQUEST" default:"1"` // How many randomness requests to send per request | ||
|
||
//Wrapper Config | ||
WrapperGasOverhead uint32 `envconfig:"WRAPPER_GAS_OVERHEAD" default:"50000"` | ||
CoordinatorGasOverhead uint32 `envconfig:"COORDINATOR_GAS_OVERHEAD" default:"52000"` | ||
WrapperPremiumPercentage uint8 `envconfig:"WRAPPER_PREMIUM_PERCENTAGE" default:"25"` | ||
WrapperMaxNumberOfWords uint8 `envconfig:"WRAPPER_MAX_NUMBER_OF_WORDS" default:"10"` | ||
WrapperConsumerFundingAmountNativeToken float64 `envconfig:"WRAPPER_CONSUMER_FUNDING_AMOUNT_NATIVE_TOKEN" default:"1"` | ||
WrapperConsumerFundingAmountLink int64 `envconfig:"WRAPPER_CONSUMER_FUNDING_AMOUNT_LINK" default:"10"` | ||
|
||
//LOAD/SOAK Test Config | ||
TestDuration time.Duration `envconfig:"TEST_DURATION" default:"3m"` // How long to run the test for | ||
RPS int64 `envconfig:"RPS" default:"1"` // How many requests per second to send | ||
RateLimitUnitDuration time.Duration `envconfig:"RATE_LIMIT_UNIT_DURATION" default:"1m"` | ||
} |
40 changes: 0 additions & 40 deletions
40
integration-tests/actions/vrfv2plus/vrfv2plus_constants/constants.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.