https://github.com/envoy1084/bedrock-avs
Bedrock is an AVS that provides cryptographically verifiable state proofs across heterogeneous blockchains
https://github.com/envoy1084/bedrock-avs
avs eigenlayer eigenlayer-avs ethereum risc0 zero-knowledge
Last synced: 3 months ago
JSON representation
Bedrock is an AVS that provides cryptographically verifiable state proofs across heterogeneous blockchains
- Host: GitHub
- URL: https://github.com/envoy1084/bedrock-avs
- Owner: envoy1084
- License: mit
- Created: 2025-07-07T22:14:54.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-01T21:08:54.000Z (5 months ago)
- Last Synced: 2025-11-22T15:24:09.663Z (4 months ago)
- Topics: avs, eigenlayer, eigenlayer-avs, ethereum, risc0, zero-knowledge
- Language: Rust
- Homepage:
- Size: 587 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **Note:** This project is currently in active development and is not yet ready for production use. Please use at your own risk.
# Bedrock State Attestation Service AVS
## Overview
**Bedrock State Attestations** is an [EigenLayer AVS](https://docs.eigenlayer.xyz/) that provides cryptographically verifiable state proofs across heterogeneous blockchains, including EVM-based chains and Bitcoin. It enables smart contracts to access and trustlessly verify data such as storage slots, transactions, or account balances, unlocking new cross-chain use cases and composability.
Bedrock AVS is powered by the [Othentic Stack](https://docs.othentic.xyz/main), a modular framework for decentralized services, consensus, and operator management.
---
## How It Works
1. **Request Submission**:
A user or smart contract submits a `BedrockRequest` specifying the data to be attested.
2. **Execution Service**:
The Executor Operator receives the request and generates a cryptographic proof using [Risc Zero](https://www.risczero.com/). The proving method is configurable:
- **Local Proving**: Proof generated on the operator’s hardware.
- **Bonsai Proving**: Uses Risc Zero’s Bonsai cloud prover.
- **Decentralized Boundless Prover**: Distributed proving across the network.
3. **Attestation & Aggregation**:
- **Attestor Nodes**: Validate the proof and sign the attestation.
- **Aggregator Node**: Collects signatures from attestors and forms a final aggregated attestation.
4. **On-chain Verification**:
The aggregated attestation is submitted to the L2 EVM blockchain, where smart contracts can verify the proof and act on the attested data.
The request and response models are defined in [`crates/core/src/models/mod.rs`](./crates/core/src/models/mod.rs).
```solidity
enum BedrockOperationType {
AccountInfo
}
struct BedrockRequest {
uint8 version;
BedrockOperationType requestType;
uint256 chainId;
bytes data;
}
struct BedrockResponse {
uint8 version;
BedrockOperationType responseType;
bytes journal;
bytes seal;
}
```
---
## Quick Start
The repository contains the following components:
- `crates/core`: The core logic for the Bedrock AVS, including proof generation, verification and data models.
- `crates/executor`: An example server for executing Bedrock AVS requests.
- `crates/validator`: An example server for validating Bedrock AVS requests.
- `crates/programs`: A collection of Risc Zero programs for attesting states.
The fastest way to run Bedrock AVS locally is via Docker Compose. This will start all required services, including aggregator, attestors, execution, and validation services.
### Prerequisites
- [Docker](https://www.docker.com/get-started)
- [Docker Compose](https://docs.docker.com/compose/)
### Steps
1. Clone the repository:
```sh
git clone https://github.com/Envoy-VC/bedrock-avs.git
cd bedrock-avs
```
2. Copy the `.env.example` file to `.env`:
```sh
cp .env.example .env
```
3. Update the `.env` file with your desired configuration, follow [Othentic Getting Started Guide](https://docs.othentic.xyz/main/welcome/getting-started) for setting up your AVS.
4. Start the services:
```sh
docker compose up --build
```
This will launch:
- 1x Aggregator node
- 3x Attestor nodes
- 1x Execution Service
- 1x Validation Service
5. **Interact with the AVS:**
Run the Execute example in the [examples](./crates/executor/examples) folder:
```sh
cargo run -p executor --example execute
```
This will submit a BedrockRequest to the AVS and print the response.
---
## References & Further Reading
- [Othentic Stack Documentation](https://docs.othentic.xyz/main)
- [Bedrock AVS Design Doc](https://hackmd.io/@envoy1084/HkZfeHMBle)
- [EigenLayer](https://docs.eigenlayer.xyz/)
- [Risc Zero](https://www.risczero.com/)
- [Risc Zero Steel](https://docs.beboundless.xyz/developers/steel/what-is-steel)
- [Boundless Market](https://docs.beboundless.xyz/developers/what)
---
## Contributing
Contributions are welcome! Please open issues or pull requests for bug fixes, features, or documentation improvements.
---
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.