Skip to content

Generalize threshold worker task settlement#167

Merged
zjma merged 1 commit into
mainfrom
codex/threshold-vrf-early-exit
Jul 13, 2026
Merged

Generalize threshold worker task settlement#167
zjma merged 1 commit into
mainfrom
codex/threshold-vrf-early-exit

Conversation

@zjma

@zjma zjma commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the fetch-specific helper with generic settleUntilThreshold(tasks, threshold) orchestration
  • return one ordered fulfilled | rejected | discarded result for every input task
  • make cancellation explicitly cooperative/best-effort and abort unfinished tasks after the fulfillment threshold
  • move HTTP deadlines into the worker tasks through postWithTimeout; the generic runner has no timeout policy
  • migrate IBE basic, IBE custom, and threshold VRF so each opaque task owns fetch, decrypt, parse, and cryptographic validation
  • preserve quorum-failure diagnostics while returning immediately once enough tasks fulfill

Closes #156

Validation

  • pnpm --dir ts-sdk typecheck
  • focused TypeScript tests: 40 passed
  • pnpm --dir scenarios test-ibe-aptos-basic
  • pnpm --dir scenarios test-ibe-aptos-custom
  • pnpm --dir scenarios test-threshold-vrf-derive-flow
  • git diff --check

@zjma
zjma force-pushed the codex/threshold-vrf-early-exit branch from a22e231 to af3abd8 Compare July 13, 2026 05:40
@zjma zjma changed the title Early-exit threshold VRF share fetching Generalize threshold worker task settlement Jul 13, 2026
@zjma
zjma merged commit 5ad1e92 into main Jul 13, 2026
18 checks passed
@zjma
zjma deleted the codex/threshold-vrf-early-exit branch July 13, 2026 05:54
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.

SDK: early-exit worker fan-out when threshold shares are collected

1 participant