Skip to content

Commit

Permalink
polishing up and refactoring minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
iljapavlovs committed Nov 22, 2023
1 parent f19cf35 commit 9bbe378
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 30 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/on-demand-vrfv2-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- "BSC_MAINNET"
- "BSC_TESTNET"
- "POLYGON_MAINNET"
- "MUMBAI"
- "POLYGON_MUMBAI"
- "AVALANCHE_FUJI"
- "AVALANCHE_MAINNET"
fundingPrivateKey:
Expand Down Expand Up @@ -61,7 +61,7 @@ on:
required: false
jobs:
vrfv2_performance_test:
name: ${{ inputs.network }} VRFV2 Performance Test
name: ${{ inputs.network }} VRFV2 Performance Test
environment: integration
runs-on: ubuntu20.04-8cores-32GB
permissions:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: ${{ inputs.network }} VRFV2 Performance Test
this-job-name: ${{ inputs.network }} VRFV2 Performance Test
continue-on-error: true
- name: Setup Push Tag
shell: bash
Expand Down Expand Up @@ -121,13 +121,13 @@ jobs:
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@7d541cbbca52d45b8a718257af86d9cf49774d1f # v2.2.15
with:
test_command_to_run: cd ./integration-tests && go test -v -count=1 -timeout 6h -run TestVRFV2Performance/vrfv2_performance_test ./load/vrfv2
test_command_to_run: cd ./integration-tests && go test -v -count=1 -timeout 24h -run TestVRFV2Performance/vrfv2_performance_test ./load/vrfv2
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ inputs.chainlinkImage }}
cl_image_tag: ${{ inputs.chainlinkVersion }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: vrf-test-logs
artifacts_location: ./integration-tests/load/logs/
artifacts_location: ./integration-tests/load/vrfv2/logs/
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
should_cleanup: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-demand-vrfv2plus-performance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- "BSC_MAINNET"
- "BSC_TESTNET"
- "POLYGON_MAINNET"
- "MUMBAI"
- "POLYGON_MUMBAI"
- "AVALANCHE_FUJI"
- "AVALANCHE_MAINNET"
fundingPrivateKey:
Expand Down Expand Up @@ -121,13 +121,13 @@ jobs:
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@7d541cbbca52d45b8a718257af86d9cf49774d1f # v2.2.15
with:
test_command_to_run: cd ./integration-tests && go test -v -count=1 -timeout 6h -run TestVRFV2PlusPerformance/vrfv2plus_performance_test ./load/vrfv2plus
test_command_to_run: cd ./integration-tests && go test -v -count=1 -timeout 24h -run TestVRFV2PlusPerformance/vrfv2plus_performance_test ./load/vrfv2plus
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ inputs.chainlinkImage }}
cl_image_tag: ${{ inputs.chainlinkVersion }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_name: vrf-test-logs
artifacts_location: ./integration-tests/load/logs/
artifacts_location: ./integration-tests/load/vrfv2plus/logs/
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
should_cleanup: false
Expand Down
7 changes: 0 additions & 7 deletions integration-tests/actions/vrfv2/vrfv2_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ var (
ErrDeployVRFV2Contracts = "error deploying VRFV2 contracts"
ErrSetVRFCoordinatorConfig = "error setting config for VRF Coordinator contract"
ErrCreateVRFSubscription = "error creating VRF Subscription"
ErrFindSubID = "error finding created subscription ID"
ErrAddConsumerToSub = "error adding consumer to VRF Subscription"
ErrFundSubWithLinkToken = "error funding subscription with Link tokens"
ErrCreateVRFV2Jobs = "error creating VRF V2 Jobs"
Expand Down Expand Up @@ -411,12 +410,6 @@ func CreateSubAndFindSubID(env *test_env.CLClusterTestEnv, coordinator contracts
//SubscriptionsCreated Log should be emitted with the subscription ID
subID := receipt.Logs[0].Topics[1].Big().Uint64()

//verify that the subscription was created
_, err = coordinator.FindSubscriptionID(subID)
if err != nil {
return 0, fmt.Errorf("%s, err %w", ErrFindSubID, err)
}

return subID, nil
}

Expand Down
7 changes: 0 additions & 7 deletions integration-tests/actions/vrfv2plus/vrfv2plus_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var (
ErrDeployVRFV2_5Contracts = "error deploying VRFV2_5 contracts"
ErrSetVRFCoordinatorConfig = "error setting config for VRF Coordinator contract"
ErrCreateVRFSubscription = "error creating VRF Subscription"
ErrFindSubID = "error finding created subscription ID"
ErrAddConsumerToSub = "error adding consumer to VRF Subscription"
ErrFundSubWithNativeToken = "error funding subscription with native token"
ErrSetLinkNativeLinkFeed = "error setting Link and ETH/LINK feed for VRF Coordinator contract"
Expand Down Expand Up @@ -430,12 +429,6 @@ func CreateSubAndFindSubID(env *test_env.CLClusterTestEnv, coordinator contracts
//SubscriptionsCreated Log should be emitted with the subscription ID
subID := receipt.Logs[0].Topics[1].Big()

//verify that the subscription was created
_, err = coordinator.FindSubscriptionID(subID)
if err != nil {
return nil, fmt.Errorf("%s, err %w", ErrFindSubID, err)
}

return subID, nil
}

Expand Down
16 changes: 8 additions & 8 deletions integration-tests/load/vrfv2/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[Common]
minimum_confirmations = 1
minimum_confirmations = 3

[NewEnvConfig]
sub_funds_link = 1
Expand All @@ -16,12 +16,12 @@ link_address = "0xb1D4538B4571d411F07960EF2838Ce337FE1E80E"
sub_funds_link = 3
node_sending_key_funding_min = 2
node_sending_keys = [
"0x3d659dE506d3b22e7660d579327126221EfB2651",
"0x7cAF21fA7423b3f4Ec15f87C7BBa83aE8cA4bDf3",
"0x8E1aDA97ac6883E8D7738E2dB9cC1A32211d3429",
"0xA4fdfE2c9438fd8388C2837c0AB199946f8041D3",
"0xb4CC2d6f933244Ff596dd1A7aB6E96769d237B3b",
"0xded252Eb0caA71aFABab6a0fd948eA9CaAdf7012",
"",
"",
"",
"",
"",
"",
]

# 10 RPM - 1 tx request with 1 rand request in each tx every 6 seconds
Expand All @@ -32,7 +32,7 @@ randomness_request_count_per_request = 1 # amount of randomness requests to make
randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting
number_of_sub_to_create = 1

# approx 60 RPM - 1 tx request with 4 rand requests in each tx every 3 seconds
# approx 60 RPM - 1 tx request with 3 rand requests in each tx every 3 seconds
[Load]
rate_limit_unit_duration = "3s"
rps = 1
Expand Down

0 comments on commit 9bbe378

Please sign in to comment.