eigen-da
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEigenDA Skill
EigenDA Skill
Store and retrieve data blobs on EigenDA — EigenLayer's Data Availability layer. EigenDA provides high-throughput, low-cost data availability for rollups and applications.
在EigenDA(EigenLayer的数据可用性层)上存储和检索数据Blob。EigenDA为rollup和应用提供高吞吐量、低成本的数据可用性服务。
What is EigenDA?
什么是EigenDA?
EigenDA is a data availability (DA) service built on EigenLayer. It lets you:
- Store blobs — submit arbitrary data, get back a cryptographic commitment
- Retrieve blobs — fetch data using the commitment hash
- Verify — KZG commitments prove data integrity
EigenDA是基于EigenLayer构建的数据可用性(DA)服务。它支持:
- 存储Blob——提交任意数据,获取加密承诺值
- 检索Blob——使用承诺哈希值获取数据
- 验证——KZG承诺可证明数据完整性
Architecture
架构
Your App → EigenDA Proxy (localhost:3100) → EigenDA Disperser → EigenDA OperatorsThe EigenDA Proxy is a local REST server that handles encoding, KZG verification, and communication with the EigenDA disperser network.
你的应用 → EigenDA Proxy(localhost:3100)→ EigenDA Disperser → EigenDA OperatorsEigenDA Proxy是一个本地REST服务器,负责编码、KZG验证以及与EigenDA分散网络的通信。
Prerequisites
前置条件
Run the EigenDA Proxy locally via Docker:
bash
docker run -d \
--name eigenda-proxy \
-p 3100:3100 \
ghcr.io/layr-labs/eigenda-proxy:latest \
--eigenda.disperser-rpc=disperser-sepolia.eigenda.xyz:443 \
--eigenda.service-manager-addr=0xD4A7E1Bd8015057293f0D0A557088c286942e84b \
--eigenda.eth-rpc=YOUR_SEPOLIA_RPC_URL \
--eigenda.status-query-timeout=45s \
--eigenda.signer-private-key-hex=YOUR_PRIVATE_KEY \
--memstore.enabled=false \
--eigenda.disable-tls=false通过Docker在本地运行EigenDA Proxy:
bash
docker run -d \
--name eigenda-proxy \
-p 3100:3100 \
ghcr.io/layr-labs/eigenda-proxy:latest \
--eigenda.disperser-rpc=disperser-sepolia.eigenda.xyz:443 \
--eigenda.service-manager-addr=0xD4A7E1Bd8015057293f0D0A557088c286942e84b \
--eigenda.eth-rpc=YOUR_SEPOLIA_RPC_URL \
--eigenda.status-query-timeout=45s \
--eigenda.signer-private-key-hex=YOUR_PRIVATE_KEY \
--memstore.enabled=false \
--eigenda.disable-tls=falseWhen to use this skill
何时使用该Skill
Use when the user asks about:
- Storing data on EigenDA
- Retrieving data from EigenDA by commitment
- Data availability for rollups
- Blob storage and retrieval
- EigenDA proxy setup
- Verifying data commitments
- EigenDA health/status checks
当用户询问以下内容时使用:
- 在EigenDA上存储数据
- 通过承诺值从EigenDA检索数据
- Rollup的数据可用性
- Blob存储与检索
- EigenDA代理设置
- 验证数据承诺值
- EigenDA健康/状态检查
How to use
使用方法
Store a blob via proxy
通过代理存储Blob
bash
curl -s -X POST "http://127.0.0.1:3100/put?commitment_mode=standard" \
-H "Content-Type: application/json" \
-d '{"key": "value", "timestamp": "2025-01-01T00:00:00Z"}'Returns: a hex commitment string (the blob's address on EigenDA).
bash
curl -s -X POST "http://127.0.0.1:3100/put?commitment_mode=standard" \
-H "Content-Type: application/json" \
-d '{"key": "value", "timestamp": "2025-01-01T00:00:00Z"}'返回结果:十六进制的承诺字符串(该Blob在EigenDA上的地址)。
Retrieve a blob via proxy
通过代理检索Blob
bash
curl -s "http://127.0.0.1:3100/get/COMMITMENT_HASH?commitment_mode=standard"Returns: the original JSON data.
bash
curl -s "http://127.0.0.1:3100/get/COMMITMENT_HASH?commitment_mode=standard"返回结果:原始JSON数据。
Health check
健康检查
bash
curl -s "http://127.0.0.1:3100/health"bash
curl -s "http://127.0.0.1:3100/health"View blob on explorer
在浏览器中查看Blob
After storing, view the blob at:
https://blobs-sepolia.eigenda.xyz/blobs/COMMITMENT_HASH存储完成后,可通过以下地址查看Blob:
https://blobs-sepolia.eigenda.xyz/blobs/COMMITMENT_HASHEigenDA v2 Disperser API (Direct)
EigenDA v2 Disperser API(直接调用)
For direct access without the proxy (advanced):
无需代理直接访问(高级用法):
Disperse a blob
分散Blob
The v2 disperser uses gRPC at :
disperser-sepolia.eigenda.xyz:443- — enqueue a blob for dispersal
DisperseBlob() - — poll dispersal status
GetBlobStatus() - — get the KZG commitment
GetBlobCommitment()
v2分散器在使用gRPC:
disperser-sepolia.eigenda.xyz:443- ——将Blob加入分散队列
DisperseBlob() - ——轮询分散状态
GetBlobStatus() - ——获取KZG承诺值
GetBlobCommitment()
Retrieve from relay
从中继节点检索
The v2 Relay API provides:
- — retrieve blob from relay nodes
GetBlob(blob_key)
v2 Relay API提供:
- ——从中继节点检索Blob
GetBlob(blob_key)
Configuration
配置
| Env Var | Default | Description |
|---|---|---|
| | Proxy address |
| | |
| | Timeout in ms |
| 环境变量 | 默认值 | 描述 |
|---|---|---|
| | 代理地址 |
| | |
| | 超时时间(毫秒) |
Commitment modes
承诺模式
- standard — full KZG commitment, highest security
- optimistic — faster but with weaker guarantees
- standard——完整KZG承诺,安全性最高
- optimistic——速度更快但保障较弱
Networks
网络
| Network | Disperser RPC | Service Manager |
|---|---|---|
| Sepolia | | |
| Mainnet | | Check EigenLayer docs |
| 网络 | Disperser RPC | 服务管理器 |
|---|---|---|
| Sepolia | | |
| 主网 | | 查看EigenLayer文档 |
Programmatic Usage
程序化使用
javascript
const EigenDA = require('eigen-skills/skills/eigen-da/scripts/da-api');
const da = new EigenDA({
proxyUrl: 'http://127.0.0.1:3100', // default
commitmentMode: 'standard', // default
timeout: 60000, // default
});
// Store data
const commitment = await da.store({ key: 'value', timestamp: new Date() });
console.log('Commitment:', commitment);
console.log('Explorer:', da.getExplorerUrl(commitment));
// Retrieve data
const data = await da.retrieve(commitment);
console.log('Retrieved:', data);
// Health check
const healthy = await da.healthCheck();javascript
const EigenDA = require('eigen-skills/skills/eigen-da/scripts/da-api');
const da = new EigenDA({
proxyUrl: 'http://127.0.0.1:3100', // 默认值
commitmentMode: 'standard', // 默认值
timeout: 60000, // 默认值
});
// 存储数据
const commitment = await da.store({ key: 'value', timestamp: new Date() });
console.log('Commitment:', commitment);
console.log('Explorer:', da.getExplorerUrl(commitment));
// 检索数据
const data = await da.retrieve(commitment);
console.log('Retrieved:', data);
// 健康检查
const healthy = await da.healthCheck();