{"id":47936631,"url":"https://github.com/tangle-network/phala-tee-cloud-avs","last_synced_at":"2026-04-04T07:44:31.472Z","repository":{"id":288061009,"uuid":"966698239","full_name":"tangle-network/phala-tee-cloud-avs","owner":"tangle-network","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-25T17:20:32.000Z","size":389,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-04T07:44:29.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tangle-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T10:15:08.000Z","updated_at":"2025-04-15T10:24:59.000Z","dependencies_parsed_at":"2025-04-15T11:52:40.633Z","dependency_job_id":null,"html_url":"https://github.com/tangle-network/phala-tee-cloud-avs","commit_stats":null,"previous_names":["tangle-network/phala-tee-cloud-avs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tangle-network/phala-tee-cloud-avs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fphala-tee-cloud-avs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fphala-tee-cloud-avs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fphala-tee-cloud-avs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fphala-tee-cloud-avs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tangle-network","download_url":"https://codeload.github.com/tangle-network/phala-tee-cloud-avs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tangle-network%2Fphala-tee-cloud-avs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31392186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T07:44:30.715Z","updated_at":"2026-04-04T07:44:31.402Z","avatar_url":"https://github.com/tangle-network.png","language":"Rust","readme":"# \u003ch1 align=\"center\"\u003ePhala Cloud EigenLayer AVS Blueprint ☁️\u003c/h1\u003e\n\n## 📚 Overview\n\nThis repository contains the off-chain operator blueprint implementation for the Phala Cloud Actively Validated Service (AVS) built on EigenLayer.\n\nThe Phala Cloud AVS aims to provide a decentralized cloud computing network where:\n\n- **Providers** (Operators) run TEE-secured (Trusted Execution Environment, e.g., Intel TDX) compute nodes and register with the AVS.\n- **Stakers** delegate PHA tokens (or potentially other LSTs via EigenLayer restaking) to operators.\n- **Operators** are rewarded for maintaining Service Level Agreements (SLA), primarily liveness and availability, verified through TEE attestations and potentially on-chain challenges.\n- **Users** can deploy workloads onto the provider network.\n- **Rewards** (from a Phala Reward Pool) and potential **slashing** are managed through the EigenLayer framework and custom AVS smart contracts.\n\nThis specific blueprint focuses on the **off-chain operator software** that interacts with the EigenLayer contracts, the Phala AVS contracts, and the TEE environment to fulfill the operator's responsibilities.\n\nIt utilizes the [Blueprint SDK](https://github.com/tangle-network/blueprint) to structure the off-chain service, leveraging Eigenlayer-specific components.\n\n## ✨ Key Components\n\n- **Off-Chain Operator Service (Rust):**\n  - `phala-tee-cloud-avs-lib`: Core logic including context management, job handlers (SLA checks, challenge responses), TEE interaction, and EVM communication.\n  - `phala-tee-cloud-avs-bin`: Binary entrypoint that configures and runs the Blueprint service using `BlueprintRunner`.\n  - Uses `alloy-rs` for EVM interactions and `tokio` for asynchronous operations.\n- **On-Chain Contracts (Solidity):**\n  - `contracts/`: Contains the Solidity smart contracts for the Phala AVS, including:\n    - `PhalaServiceManager.sol`: Manages operator registration (via TEE attestations), handles reward proposals from the Tokenomic Manager, and interacts with the SLA Oracle.\n    - `PhalaSlaOracle.sol`: Manages SLA challenges and operator responses, reporting failures to the Service Manager.\n  - Built using [Foundry](https://getfoundry.sh).\n- **EigenLayer Integration:** Leverages EigenLayer's core contracts for staking, delegation, and reward coordination.\n\n## 📋 Prerequisites\n\nBefore you can build and run this project, ensure you have the following installed:\n\n- [Rust](https://www.rust-lang.org/tools/install) (including `cargo`)\n- [Foundry](https://getfoundry.sh) (including `forge`)\n- Docker (Potentially needed for TEE simulation/testing, depending on implementation)\n\n## ⭐ Getting Started\n\n1.  **Clone the repository:**\n\n    ```bash\n    git clone \u003crepository-url\u003e\n    cd \u003crepository-name\u003e\n    ```\n\n2.  **Install Foundry dependencies:**\n\n    ```bash\n    forge soldeer update -d\n    ```\n\n3.  **Build the contracts:**\n\n    ```bash\n    forge build\n    ```\n\n4.  **Build the Rust blueprint service:**\n    ```bash\n    cargo build --release\n    ```\n\n## 🛠️ Development \u0026 Running\n\n- **Contracts:** Use `forge` commands (`build`, `test`, `script`, `deploy`) to manage the Solidity contracts.\n- **Blueprint Service:**\n  - Configure necessary environment variables (RPC endpoints, keystore paths, contract addresses, etc.). Refer to `BlueprintEnvironment` usage in `main.rs`.\n  - Run the operator service: `cargo run --release --bin phala-tee-cloud-avs-bin`\n- **Testing:**\n  - Run contract tests: `forge test`\n  - Run Rust integration/e2e tests: `cargo test` (Note: E2E tests require Anvil and contract deployments, see `tests/e2e.rs`)\n\n## 📜 License\n\nLicensed under either of\n\n- Apache License, Version 2.0\n  ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fphala-tee-cloud-avs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftangle-network%2Fphala-tee-cloud-avs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftangle-network%2Fphala-tee-cloud-avs/lists"}