Skip to content

Commit

Permalink
feat: add web socket based transactions by addresses provider
Browse files Browse the repository at this point in the history
  • Loading branch information
iccicci committed Sep 24, 2024
1 parent dc90eeb commit 594b83e
Show file tree
Hide file tree
Showing 21 changed files with 1,776 additions and 157 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/continuous-integration-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
KEY_MANAGEMENT_PARAMS: '{"bip32Ed25519": "Sodium", "accountIndex": 0, "chainId":{"networkId": 0, "networkMagic": 888}, "passphrase":"some_passphrase","mnemonic":"vacant violin soft weird deliver render brief always monitor general maid smart jelly core drastic erode echo there clump dizzy card filter option defense"}'
TEST_CLIENT_ASSET_PROVIDER: 'http'
TEST_CLIENT_ASSET_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4014/"}'
TEST_CLIENT_CHAIN_HISTORY_PROVIDER: 'http'
TEST_CLIENT_CHAIN_HISTORY_PROVIDER: 'ws'
TEST_CLIENT_CHAIN_HISTORY_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}'
DB_SYNC_CONNECTION_STRING: 'postgresql://postgres:doNoUseThisSecret!@localhost:5435/cexplorer'
TEST_CLIENT_HANDLE_PROVIDER: 'http'
Expand All @@ -22,7 +22,7 @@ env:
TEST_CLIENT_REWARDS_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}'
TEST_CLIENT_TX_SUBMIT_PROVIDER: 'http'
TEST_CLIENT_TX_SUBMIT_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}'
TEST_CLIENT_UTXO_PROVIDER: 'http'
TEST_CLIENT_UTXO_PROVIDER: 'ws'
TEST_CLIENT_UTXO_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}'
TEST_CLIENT_STAKE_POOL_PROVIDER: 'http'
TEST_CLIENT_STAKE_POOL_PROVIDER_PARAMS: '{"baseUrl":"http://localhost:4000/"}'
Expand Down Expand Up @@ -79,7 +79,6 @@ jobs:
run: |
yarn workspace @cardano-sdk/e2e test:wallet:epoch0
yarn workspace @cardano-sdk/e2e test:projection
yarn workspace @cardano-sdk/e2e test:ws
- name: Wait for epoch 3
run: |
Expand All @@ -88,6 +87,7 @@ jobs:
- name: 🔬 Test - e2e - wallet at epoch 3
run: |
yarn workspace @cardano-sdk/e2e test:wallet:epoch3
yarn workspace @cardano-sdk/e2e test:ws
yarn workspace @cardano-sdk/e2e test:pg-boss
yarn workspace @cardano-sdk/e2e test:providers
env:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/k6-wallets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ on:
options:
- '5m'
- '2m'

env:
TARGET_ENV: ${{ inputs.environment || 'dev' }}
TARGET_NET: ${{ inputs.network || 'mainnet'}}
Expand All @@ -58,7 +58,6 @@ env:
HD_ACTIVE_ADDR_COUNT: ${{ inputs.hd-addr-per-wallet || 10 }}
HD_MAX_TX_HISTORY: ${{ inputs.hd-tx-history-size-per-wallet || 100 }}


jobs:
wallet-restoration:
runs-on: ubuntu-latest
Expand All @@ -81,7 +80,7 @@ jobs:
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
with:
filename: ./packages/e2e/test/k6/scenarios/wallets.test.js
cloud: true
cloud: false
token: ${{ secrets.K6_CLOUD_API_TOKEN }}
flags: >
-e TARGET_ENV=$TARGET_ENV
Expand All @@ -91,4 +90,4 @@ jobs:
-e RAMP_UP_DURATION=$RAMP_UP_DURATION
-e STEADY_STATE_DURATION=$STEADY_STATE_DURATION
-e HD_ACTIVE_ADDR_COUNT=$HD_ACTIVE_ADDR_COUNT
-e HD_MAX_TX_HISTORY=$HD_MAX_TX_HISTORY
-e HD_MAX_TX_HISTORY=$HD_MAX_TX_HISTORY
18 changes: 18 additions & 0 deletions .github/workflows/k6-web-socket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ on:
type: number
required: true
default: 1000
hd-addr-per-wallet:
description: 'Number of addresses per wallet.'
type: number
required: true
default: 10
hd-tx-history-size-per-wallet:
description: 'Maximum number of transactions per wallet. Filter wallet addresses to have a tx history size smaller than this value.'
type: number
required: true
default: 1000
max-vu:
description: 'Maximum number of simultaneous simulated users.'
type: number
required: true
default: 100

jobs:
web-socket:
Expand Down Expand Up @@ -55,6 +70,9 @@ jobs:
-e TARGET_ENV=${{ inputs.environment }}
-e TARGET_NET=${{ inputs.network }}
-e WALLETS=${{ inputs.wallets }}
-e HD_ACTIVE_ADDR_COUNT=${{ inputs.hd-addr-per-wallet }}
-e HD_MAX_TX_HISTORY=${{ inputs.hd-tx-history-size-per-wallet }}
-e MAX_VU=${{ inputs.max-vu }}
--out json=web-socket-results.json
--quiet
- name: Upload performance test results
Expand Down
2 changes: 2 additions & 0 deletions compose/common.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# cSpell:ignore utxo

x-from-sdk: &from-sdk
healthcheck:
interval: 10s
Expand Down
Loading

0 comments on commit 594b83e

Please sign in to comment.