Skip to content

feat(contracts): implement verifiable puzzle seed beacon (#404) - #416

Closed
nuvoraxis wants to merge 1 commit into
MindFlowInteractive:mainfrom
nuvoraxis:feat/404-verifiable-puzzle-seed-beacon
Closed

nuvoraxis wants to merge 1 commit into
MindFlowInteractive:mainfrom
nuvoraxis:feat/404-verifiable-puzzle-seed-beacon

Conversation

@nuvoraxis

Copy link
Copy Markdown

Summary

This PR implements the Verifiable Puzzle Seed Beacon contract for Soroban smart contracts on Stellar (#404).

Key Features

  • Deterministic Seed Commit & Reveal: Two-phase commit-reveal mechanism where an authorized beacon commits future target ledger sequence numbers with SHA256 hashed commitments.
  • Verifiable Random Seed: Once target ledger sequence is reached, the beacon reveals the secret seed preimage. The contract verifies sha256(preimage) == commitment and archives the canonical seed.
  • Public Verification & Query: Consumers and puzzles can query canonical seed per round or verify puzzle seed generation with tamper-proof guarantees.
  • Idempotency & Expiration: Protects against double-reveals, premature reveals, and invalid hashes.
  • Comprehensive Unit Tests: Full test suite verifying commit, premature reveal rejection, valid reveal, tamper rejection, and sequence gating.

Resolves #404

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.

Verifiable Puzzle Seed Beacon

2 participants