Skip to content

Reject seals whose Drand round falls outside the commit window #376

Description

@karagozemin

Goal

Refuse a bid seal, both off-chain and in the round contract, when its Drand quicknet round is not the round the auction committed to open.

Why this is High

Sealing lives in @sub-rosa/tlock and the on-chain check lives in the Soroban drand module. A seal that opens too early or never opens breaks the sealed-bid assumption. Both sides must share one window rule.

Requirements

  • Define the allowed reveal round as the round stored on the auction, not a caller-supplied value.
  • Reject seals before commit in the tlock package and again inside the contract.
  • Return stable errors for too-early, too-late, and malformed round numbers.
  • Add vectors that use the quicknet chain parameters already in the repo.

Acceptance criteria

  • A seal for a different Drand round cannot be committed.
  • The contract and the TypeScript helper reject the same fixture set.
  • Overflowing or zero round numbers fail before any escrow lock.
  • Existing happy-path seal tests still pass.

Pointers

  • packages/tlock/src/seal.ts
  • packages/tlock/src/quicknet.ts
  • packages/tlock/src/freshness.ts
  • contracts/round/src/drand.rs
  • services/drand-tools/src/quicknet.ts

Validation

  • tlock package tests and pnpm contract:test

Drips

  • Drips Complexity: High
  • Expected Drips Points: 200
  • Add this issue from the Drips maintainer dashboard and set complexity to High.
  • Do not apply the Stellar Wave label on GitHub. That path defaults the issue to Trivial (100 points).

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssue proposed for the Drips Stellar Wave programarea: contractSoroban smart contractarea: tlockDrand tlock sealing and auditor blobcomplexity: highExpected high implementation complexitydrips-candidateCandidate for a Drips Stellar Wave

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions