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 27, 2024
1 parent 619e972 commit 84ef892
Show file tree
Hide file tree
Showing 20 changed files with 1,783 additions and 163 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
14 changes: 13 additions & 1 deletion .github/workflows/k6-web-socket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ on:
description: 'Number of wallets to simulate'
type: number
required: true
default: 1000
default: 100
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: 100

jobs:
web-socket:
Expand Down Expand Up @@ -55,6 +65,8 @@ 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 }}
--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
7 changes: 1 addition & 6 deletions nix/cardano-services/deployments/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ in
};

ws-server = {
enabled = false;
enabled = true;
resources.limits = mkPodResources "300Mi" "300m";
resources.requests = mkPodResources "150Mi" "200m";
};
Expand Down Expand Up @@ -230,7 +230,6 @@ in

values = {
useAccelerator = true;
ws-server.enabled = true;
stakepool.databaseName = "stakepoolv2";
cardano-services = {
ingresOrder = 99;
Expand Down Expand Up @@ -316,7 +315,6 @@ in
};

values = {
ws-server.enabled = true;
cardano-services = {
ingresOrder = 99;
additionalRoutes = [
Expand Down Expand Up @@ -366,7 +364,6 @@ in

values = {
useAccelerator = true;
ws-server.enabled = true;
stakepool.databaseName = "stakepoolv2";
backend.allowedOrigins = lib.concatStringsSep "," allowedOriginsDev;

Expand Down Expand Up @@ -406,7 +403,6 @@ in
};

values = {
ws-server.enabled = true;
stakepool.databaseName = "stakepoolv2";
blockfrost-worker.enabled = true;
pg-boss-worker.enabled = true;
Expand Down Expand Up @@ -714,7 +710,6 @@ in
values = {
pg-boss-worker.enabled = true;
pg-boss-worker.queues = "pool-delist-schedule,pool-metadata,pool-metrics,pool-rewards";
ws-server.enabled = true;
cardano-services = {
ingresOrder = 99;
};
Expand Down
Loading

0 comments on commit 84ef892

Please sign in to comment.