Skip to content

fix(sdk): align Python SDK with gateway dkg_evidence API + add CI#34

Open
gilbertsahumada wants to merge 3 commits intoChaosChain:mainfrom
gilbertsahumada:fix/sdk-dkg-evidence-and-ci
Open

fix(sdk): align Python SDK with gateway dkg_evidence API + add CI#34
gilbertsahumada wants to merge 3 commits intoChaosChain:mainfrom
gilbertsahumada:fix/sdk-dkg-evidence-and-ci

Conversation

@gilbertsahumada
Copy link
Copy Markdown
Contributor

Summary

  • Python SDK: submit_work and submit_work_and_wait now send dkg_evidence instead of
    thread_root/evidence_root, matching the current gateway API
  • CI pipeline: Added test workflow that runs gateway unit tests and Python SDK tests on every PR to main
  • Test port fix: Changed test GATEWAY_URL from localhost:3000 to localhost:39999 to avoid conflicts with local
    dev servers

Context

Both SDKs (Python and TypeScript) were out of sync with the gateway API:

  • SDKs sent: thread_root + evidence_root
  • Gateway expects: dkg_evidence (array of evidence packages)
  • Result: 400 — "dkg_evidence must be an array"

The gateway computes thread_root and evidence_root internally from the dkg_evidence array via the DKG engine. This
PR fixes the Python SDK. The TypeScript SDK (separate repo) needs a separate PR.

Test results

  • Python SDK: 30 passed
  • Gateway unit tests: 352 passed

Note

The TypeScript SDK (chaoschain-sdk-ts) has the same issue and needs to be updated separately.

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.

1 participant