pot_verify
Verify Proof of Time validity using hash and GRG shards to determine timestamp accuracy and mode for blockchain transactions.
Instructions
Verify a Proof of Time using its hash and GRG shards. Returns validity, mode (turbo/full), and timestamp.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| potHash | Yes | PoT hash to verify (hex with 0x prefix) | |
| grgShards | Yes | Array of hex-encoded GRG integrity shards | |
| chainId | Yes | EVM chain ID (e.g. 84532 for Base Sepolia) | |
| poolAddress | Yes | Uniswap V4 pool address (0x-prefixed) |
Implementation Reference
- tools.ts:94-123 (handler)The handler for the pot_verify tool. It reconstructs shards using the GrgPipeline and validates the proof.
export async function potVerify(args: { potHash: string; grgShards: string[]; chainId: number; poolAddress: string; }): Promise<unknown> { telemetryIncrement("pot_verify"); const shards = args.grgShards.map((hex) => new Uint8Array(Buffer.from(hex, "hex"))); let valid = false; let reconstructedSize = 0; try { const recovered = GrgPipeline.processInverse(shards, 0, args.chainId, args.poolAddress); valid = recovered.length > 0; reconstructedSize = recovered.length; } catch { valid = false; } const mode = adaptiveSwitch.getCurrentMode() === AdaptiveMode.TURBO ? "turbo" : "full"; return serialize({ valid, mode, potHash: args.potHash, reconstructedBytes: reconstructedSize, verifiedAt: Date.now(), }); }