Skip to content

20.7 Off-chain-computation trigger class #1061

Description

@determined-001

Labels: type:feature area:workers needs-design type:security
Milestone: Phase 4 - Workers W2: external operators
Effort: High
Depends on: 20.6

Description

Third trigger class from §C.1: run when an external result lands - an oracle
resolves and settlement must execute, a model finishes an analysis and a position
must change.

This class is where verifiability gets hard, because the condition is not on
chain. The design must state what an off-chain condition means for 19.1's
verdicts: an unverifiable trigger is not a miss, and must not be scored as one.

Reflector Subscriptions already offers price-threshold triggers with webhook
notification (§C.8) and overlaps this use case. Position deliberately rather than
by accident.

Acceptance criteria

  • Off-chain conditions are attested: the result carries a signature from a
    declared source, and the source is part of the manifest
  • The attestation is submitted with, or referenced by, the invocation so the
    chain records why the worker fired
  • Verification produces unverifiable rather than missed where the condition
    cannot be reconstructed from chain data
  • unverifiable windows are excluded from reputation scores, not counted as
    successes
  • Positioning against Reflector Subscriptions documented in the design note
  • Security review covers a malicious or compromised computation source

Implementation notes

  1. Decide the attestation model before writing code; needs-design clears on the
    design note.
  2. Silently scoring unverifiable windows as successes turns the reputation score
    into a number operators can inflate by choosing unverifiable triggers.
  3. Reuse packages/abi-registry/src/attestation.ts if its signature model fits
    rather than introducing a second attestation concept.

Affected files

  • packages/worker-core/src/triggers/computationTrigger.ts
  • packages/worker-core/src/triggers/attestation.ts
  • packages/worker-core/src/verification/verdict.ts
  • docs/design/worker-offchain-triggers.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveDrips Wave Program - opt an issue in by applying this labelarea:workersWorker layer and worker marketplace (packages/worker-core)blockedWaiting on an upstream issuecomplexity:high200 pointsneeds-designProposal / approach must be agreed before implementationtype:feature--forcetype:security--force

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions