Skip to content

DF-25178: Optimizes blocksize-capital EA WS connection for subs/unsubs#5035

Open
cl-efornaciari wants to merge 4 commits into
mainfrom
feature/DF-25178/optimize-blocksize-capital-ws-requests
Open

DF-25178: Optimizes blocksize-capital EA WS connection for subs/unsubs#5035
cl-efornaciari wants to merge 4 commits into
mainfrom
feature/DF-25178/optimize-blocksize-capital-ws-requests

Conversation

@cl-efornaciari

@cl-efornaciari cl-efornaciari commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Closes #ISSUE_NUMBER_GOES_HERE

Description

Implements custom subscription logic for multiple tickers in a single subscribe/unsubscribe batch

Steps to Test

Test plan — DF1 mainnet regression (2026-06-16)

Scope

  • 250 unique POST payloads from live DF1 mainnet feeds using blocksize-capital
  • Endpoint: crypto (213 default transport, 37 explicit transport=ws)
  • Pass criteria: HTTP 200 + EA statusCode 200 + numeric result

Execution settings

Setting Value
Workers 1 (sequential)
Timeout 180s per attempt
Retries 5 (6 attempts total, exponential backoff from 2s)
Local target http://localhost:8080 (fresh instance, this branch)
Prod baseline https://adapters.main.prod.cldev.sh/blocksize-capital

Results

Environment EA success Failed http/default ws
Local (this branch) 247 / 250 (98.8%) 3 210 / 213 37 / 37
Prod (deployed main) 247 / 250 (98.8%) 3 210 / 213 37 / 37

Local vs prod: identical pass/fail set — 0 payloads fail locally that pass on prod (and vice versa).

Failures (same on local and prod)

Pair Transport Error Notes
ADA/BNB http/default 504 (6 attempts) ETH/BNB cross; known slow coverage
BSW/USD http/default 504 (6 attempts)
SXP/USD http/default 504 (6 attempts) Suspected Blocksize coverage gap (cat_c2)

All failures are 504 timeouts on default-path feeds, not provider 502s or WS subscribe errors. transport=ws payloads: 37 / 37 on both environments.

Retries (local)

Attempts Payloads
1 90
2 42
3 34
4 28
5 34
6 22

160/250 local payloads needed at least one retry (cold WS subscription buildup); 157 recovered. Prod needed only 4 retries (warm deployment).

Conclusion

Batch subscribe changes match prod behavior on the full DF1 payload matrix. The 3 shared failures exist on both local and prod and are unrelated to the batch builder migration. WS transport coverage is 100% (37/37).

Artifacts: /tmp/blocksize-df1-regression-local-fresh.json, /tmp/blocksize-df1-regression-prod-fresh.json

Quality Assurance

  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

@changeset-bot

changeset-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2872b04

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cl-efornaciari cl-efornaciari force-pushed the feature/DF-25178/optimize-blocksize-capital-ws-requests branch from d7a0944 to bffd0c3 Compare June 9, 2026 22:00
Comment thread packages/composites/gm-token/package.json
Comment thread packages/sources/blocksize-capital/src/transport/price.ts
@cl-efornaciari cl-efornaciari force-pushed the feature/DF-25178/optimize-blocksize-capital-ws-requests branch from bffd0c3 to 65a702d Compare June 16, 2026 19:42
@cl-efornaciari cl-efornaciari force-pushed the feature/DF-25178/optimize-blocksize-capital-ws-requests branch from 2dcbbfc to 336f210 Compare June 17, 2026 21:32
@cl-efornaciari cl-efornaciari marked this pull request as ready for review June 17, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants