flare-fcc

Explains building, registering, and deploying Flare Confidential Compute TEE extensions on Coston2.

Updated Aug 10, 2026
One-click install
npx skills add https://github.com/isreal916/pistis --skill flare-fcc-isreal916
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flare-fcc
Source: https://github.com/isreal916/pistis/tree/main/.agents/skills/flare-fcc
Command: npx skills add https://github.com/isreal916/pistis --skill flare-fcc-isreal916

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers building Flare Confidential Compute (FCC) extensions face a complex multi-layer system: Trusted Execution Environments, on-chain registries, instruction routing, attestation, and reproducible builds. This Skill provides the domain knowledge and step-by-step guidance needed to design, deploy, and troubleshoot TEE extensions without prior FCC experience. ## Core Features & Use Cases - Architecture Guidance: Explains the instruction lifecycle, the TeeExtensionRegistry/TeeMachineRegistry contracts, the InstructionSender pattern, and the OPType/OPCommand routing model that links Solidity contracts to in-enclave handlers. - Deployment Walkthroughs: Covers the full Coston2 lifecycle for the fce-extension-scaffold, fce-sign, and fce-weather-insurance repos, including ngrok proxy setup, code-hash whitelisting, governance registration, and attestation. - Troubleshooting Reference: Documents common failure modes such as Verification.ChallengeExpired, InvalidGovernanceHash, MachineManager.TooMany, and code-hash mismatches with their fixes. - Use Case: A developer wants to build a parametric insurance extension that fetches weather data inside a TEE and settles policies on-chain; this Skill explains the contract, handler, signature verification, and deployment steps end to end. ## Quick Start Ask how to build and deploy a Flare Confidential Compute extension on Coston2 using the fce-extension-scaffold.

Frequently Asked Questions about flare-fcc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Flare Confidential Compute TEE extension?

Start from the fce-extension-scaffold repository, a runnable Hello World extension in Go with contracts, deploy tooling, and a types server. You modify the config constants, request/response types, action handlers, and the InstructionSender contract, then follow the pre-build, start-services, post-build, and test scripts to deploy on Coston2.

How does the OPType and OPCommand routing model work in FCC?

OPType selects an operation group and OPCommand sub-routes within it, and both must match exactly across the Solidity contract, Go config constants, and the extension router. They are bytes32 identifiers, so keep them under 31 bytes; mismatches fall through to unsupported op type or op command errors.

What is the difference between MODE=0 and MODE=1 attestation?

MODE=0 is the production attestation backend whose results Flare data providers accept on testnet and mainnet. MODE=1 produces simulated attestation for local development only and is rejected on live networks, so production images must bake MODE=0 with SIMULATED_TEE=false.

Why does TEE registration fail with Verification.ChallengeExpired?

The attestation challenge issued during register-tee has expired before completion. Re-run post-build.sh and ensure register-tee uses the -command rRap flag, which issues a fresh attestation challenge on each run.

Can I write a Flare TEE extension in Python or TypeScript?

Yes, the fce-sign example ships in Go, Python, and TypeScript, selected via the LANGUAGE variable in .env. Python and TypeScript use a Framework class that registers handlers by opType and opCommand pair, though only the Go build is bit-for-bit reproducible across machines.

Is it safe to store encrypted secrets on-chain for a TEE extension?

No, storing encrypted secrets on-chain is not safe for production because on-chain data is public and encryption weakens over time. The fce-sign repo demonstrates this pattern for demo purposes only; use off-chain channels for secret delivery in real applications.