Skip to main content
The thought_epoch program is the on-chain anchor for Lucid’s receipt verification system. It stores Merkle Mountain Range (MMR) roots on Solana, making AI interaction history permanently verifiable. Program ID (devnet): 8QXiFjguJT4PLVzH6BYNMHXZ3eLRaoF8cwx23EBc44Q6

Instructions

Account Structures

EpochRecord

Stores a single MMR root. PDA seeds: ["epoch", authority]

EpochRecordBatch

Stores up to 16 MMR roots in a single account. PDA seeds: ["epochs", authority]

EpochRecordV2

Extended epoch record with metadata for richer on-chain queries. PDA seeds: ["epoch_v2", authority]

Usage

The offchain engine finalizes an epoch when either threshold is met (100+ receipts or 1+ hour). It then calls commit_epoch_v2 to anchor the root:

Gas Costs

  • Single commit: 5 LUCID (mGas)
  • Batch commit (up to 16 roots): 7 LUCID total (2 base + 5 mGas)

Errors