Skip to content

Commit a94af33

Browse files
Mohsin ZaidiMohsin Zaidi
authored andcommitted
address PR review comments for self-anchoring docs
- Add anchor contract section with pre-deployed addresses (Ethereum, Gnosis) - Add deployment instructions linking to ceramic-anchor-service repo - Replace --ethereum-rpc-urls with --evm-rpc-url (used for both submit and verify) - Add --additional-chain-rpc-urls for validating anchors from other chains - Update all examples to use simplified configuration
1 parent c6b8c4f commit a94af33

2 files changed

Lines changed: 67 additions & 25 deletions

File tree

docs/protocol/ceramic-one/anchoring/evm-configuration.mdx

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,94 @@ description: Configure self-anchoring for any EVM-compatible blockchain
77

88
This guide covers the configuration options for running self-anchoring on EVM-compatible blockchains.
99

10-
## Required Options
10+
## Anchor Contract
1111

12-
Self-anchoring requires both anchor verification RPC endpoints and transaction submission configuration:
12+
Self-anchoring requires an anchor contract deployed on your chosen EVM blockchain.
1313

14-
### Anchor Proof Verification
14+
### Pre-deployed Contracts
1515

16-
| Option | Environment Variable | Description |
17-
|--------|---------------------|-------------|
18-
| `--ethereum-rpc-urls` | `CERAMIC_ONE_ETHEREUM_RPC_URLS` | Comma-separated list of RPC URLs for verifying anchor proofs |
16+
The anchor contract is already deployed on the following networks:
17+
18+
| Network | Chain ID | Contract Address |
19+
|---------|----------|------------------|
20+
| Ethereum Mainnet | 1 | `0x231055A0852D67C7107Ad0d0DFeab60278fE6AdC` |
21+
| Gnosis Chain | 100 | `0x231055A0852D67C7107Ad0d0DFeab60278fE6AdC` |
22+
23+
You can use these addresses directly with `--evm-contract-address` without deploying your own contract.
24+
25+
### Deploying to Other Networks
26+
27+
To deploy the anchor contract on a different EVM chain:
28+
29+
The contract source code is available at:
30+
[ceramicnetwork/ceramic-anchor-service/contracts](https://github.com/ceramicnetwork/ceramic-anchor-service/tree/develop/contracts)
31+
32+
The contract (`CeramicAnchorServiceV2.sol`) implements [CIP-110](https://github.com/ceramicnetwork/CIPs/blob/main/CIPs/cip-110.md) for indexable anchors.
33+
34+
**Deployment steps:**
35+
36+
1. Clone the repository:
37+
```bash
38+
git clone https://github.com/ceramicnetwork/ceramic-anchor-service.git
39+
cd ceramic-anchor-service/contracts
40+
```
1941

20-
This is required for validating anchor proofs, including the proofs created by your own self-anchoring. The node uses these endpoints to verify that anchors exist on-chain.
42+
2. Install dependencies (requires [Foundry](https://book.getfoundry.sh/getting-started/installation)):
43+
```bash
44+
make installDeps
45+
make build
46+
```
2147

22-
### Transaction Submission
48+
3. Deploy to your network:
49+
```bash
50+
export ETH_WALLET_PK=your-private-key
51+
export ETH_RPC_HOST=https://rpc.yournetwork.com
52+
export ETH_RPC_PORT=443
53+
make create
54+
```
55+
56+
4. Note the deployed contract address from the output for use with `--evm-contract-address`.
57+
58+
## Required Options
2359

2460
All of these options must be provided together to enable self-anchoring:
2561

2662
| Option | Environment Variable | Description |
2763
|--------|---------------------|-------------|
28-
| `--evm-rpc-url` | `CERAMIC_ONE_EVM_RPC_URL` | RPC endpoint URL for submitting anchor transactions |
64+
| `--evm-rpc-url` | `CERAMIC_ONE_EVM_RPC_URL` | RPC endpoint URL for submitting anchor transactions and verifying anchor proofs |
2965
| `--evm-private-key` | `CERAMIC_ONE_EVM_PRIVATE_KEY` | Private key in hex format (without 0x prefix) |
3066
| `--evm-chain-id` | `CERAMIC_ONE_EVM_CHAIN_ID` | Network/chain ID (e.g., 1 for Ethereum mainnet) |
31-
| `--evm-contract-address` | `CERAMIC_ONE_EVM_CONTRACT_ADDRESS` | Deployed anchor contract address |
67+
| `--evm-contract-address` | `CERAMIC_ONE_EVM_CONTRACT_ADDRESS` | Deployed anchor contract address (see [Deploying the Anchor Contract](#deploying-the-anchor-contract)) |
68+
69+
The `--evm-rpc-url` is used both for submitting anchor transactions and for verifying anchor proofs on that chain.
3270

3371
## Optional Settings
3472

3573
| Option | Environment Variable | Default | Description |
3674
|--------|---------------------|---------|-------------|
3775
| `--evm-confirmations` | `CERAMIC_ONE_EVM_CONFIRMATIONS` | 4 | Number of block confirmations before anchor is final |
3876
| `--anchor-interval` | `CERAMIC_ONE_ANCHOR_INTERVAL` | 3600 | Anchoring frequency in seconds |
77+
| `--additional-chain-rpc-urls` | `CERAMIC_ONE_ADDITIONAL_CHAIN_RPC_URLS` | - | Comma-separated list of RPC URLs for validating anchors from other chains |
78+
79+
### Validating Anchors from Other Chains
80+
81+
If your node syncs events from the network that were anchored on different chains (e.g., historical anchors or events from other nodes), you can provide additional RPC endpoints to validate those proofs:
82+
83+
```bash
84+
ceramic-one daemon \
85+
--evm-rpc-url https://rpc.gnosis.io \
86+
--additional-chain-rpc-urls https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY,https://polygon-rpc.com \
87+
...
88+
```
89+
90+
The node uses the first valid RPC for each chain ID.
3991

4092
## Configuration Methods
4193

4294
### CLI Flags
4395

4496
```bash
4597
ceramic-one daemon \
46-
--ethereum-rpc-urls https://rpc.yournetwork.com \
4798
--evm-rpc-url https://rpc.yournetwork.com \
4899
--evm-private-key abcd1234... \
49100
--evm-chain-id 12345 \
@@ -55,7 +106,6 @@ ceramic-one daemon \
55106
### Environment Variables
56107

57108
```bash
58-
export CERAMIC_ONE_ETHEREUM_RPC_URLS=https://rpc.yournetwork.com
59109
export CERAMIC_ONE_EVM_RPC_URL=https://rpc.yournetwork.com
60110
export CERAMIC_ONE_EVM_PRIVATE_KEY=abcd1234...
61111
export CERAMIC_ONE_EVM_CHAIN_ID=12345
@@ -76,7 +126,6 @@ services:
76126
image: public.ecr.aws/r5b3e0r5/3box/ceramic-one:latest
77127
network_mode: "host"
78128
environment:
79-
- CERAMIC_ONE_ETHEREUM_RPC_URLS=https://rpc.yournetwork.com
80129
- CERAMIC_ONE_EVM_RPC_URL=https://rpc.yournetwork.com
81130
- CERAMIC_ONE_EVM_PRIVATE_KEY=${EVM_PRIVATE_KEY}
82131
- CERAMIC_ONE_EVM_CHAIN_ID=12345

docs/protocol/ceramic-one/anchoring/overview.mdx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,14 @@ When events are anchored:
2828
Before configuring self-anchoring, ensure you have:
2929

3030
1. **A running Ceramic One node** - See [Installation](../usage/installation)
31-
2. **Access to EVM RPC endpoints** - For both submitting transactions and verifying anchor proofs
31+
2. **Access to an EVM RPC endpoint** - For submitting transactions and verifying anchor proofs
3232
3. **A funded wallet** - The wallet must have sufficient funds for transaction fees on your chosen network
33-
4. **The anchor contract address** - The deployed Ceramic anchor contract on your target network
33+
4. **A deployed anchor contract** - See [Deploying the Anchor Contract](./evm-configuration#deploying-the-anchor-contract)
3434

3535
## Quick Start
3636

37-
Self-anchoring requires two types of RPC configuration:
38-
39-
1. **`--ethereum-rpc-urls`** - For verifying anchor proofs (required)
40-
2. **`--evm-rpc-url`** - For submitting anchor transactions (required for self-anchoring)
41-
4237
```bash
4338
ceramic-one daemon \
44-
--ethereum-rpc-urls https://rpc.yournetwork.com \
4539
--evm-rpc-url https://rpc.yournetwork.com \
4640
--evm-private-key your-private-key-hex \
4741
--evm-chain-id 1 \
@@ -52,7 +46,6 @@ ceramic-one daemon \
5246
Or use environment variables:
5347

5448
```bash
55-
export CERAMIC_ONE_ETHEREUM_RPC_URLS=https://rpc.yournetwork.com
5649
export CERAMIC_ONE_EVM_RPC_URL=https://rpc.yournetwork.com
5750
export CERAMIC_ONE_EVM_PRIVATE_KEY=your-private-key-hex
5851
export CERAMIC_ONE_EVM_CHAIN_ID=1
@@ -68,19 +61,19 @@ See [EVM Configuration](./evm-configuration) for detailed setup instructions and
6861

6962
| Option | Environment Variable | Purpose |
7063
|--------|---------------------|---------|
71-
| `--ethereum-rpc-urls` | `CERAMIC_ONE_ETHEREUM_RPC_URLS` | Verify anchor proofs from the network |
72-
| `--evm-rpc-url` | `CERAMIC_ONE_EVM_RPC_URL` | Submit anchor transactions |
64+
| `--evm-rpc-url` | `CERAMIC_ONE_EVM_RPC_URL` | Submit anchor transactions and verify proofs |
7365
| `--evm-private-key` | `CERAMIC_ONE_EVM_PRIVATE_KEY` | Sign anchor transactions |
7466
| `--evm-chain-id` | `CERAMIC_ONE_EVM_CHAIN_ID` | Target blockchain network |
7567
| `--evm-contract-address` | `CERAMIC_ONE_EVM_CONTRACT_ADDRESS` | Anchor contract address |
68+
| `--additional-chain-rpc-urls` | `CERAMIC_ONE_ADDITIONAL_CHAIN_RPC_URLS` | Validate anchors from other chains (optional) |
7669

7770
## How It Works
7871

7972
1. **Event Collection**: Ceramic One collects pending events that need anchoring
8073
2. **Merkle Tree Construction**: Events are batched and organized into a Merkle tree
8174
3. **Blockchain Transaction**: The Merkle root is written to the anchor contract on your chosen EVM chain
8275
4. **Confirmation**: After the configured number of block confirmations, anchors are considered final
83-
5. **Proof Verification**: The node verifies anchor proofs using `--ethereum-rpc-urls`
76+
5. **Proof Verification**: The node verifies anchor proofs using the configured RPC endpoints
8477
6. **Proof Distribution**: Anchor proofs are distributed to relevant streams
8578

8679
## Next Steps

0 commit comments

Comments
 (0)