摘要
Aleph Zero is a Layer 1 blockchain focusing on privacy and scalability using a novel consensus mechanism. Its RPC endpoint allows developers to interact with the chain via JSON-RPC calls. This page covers chain settings, available endpoints, common JSON-RPC methods, and how to choose a reliable RPC provider for production workloads.
Aleph Zero RPC decision checklist
Before you start building on Aleph Zero, consider these three questions to choose the right RPC setup:
- Traffic and reliability needs: If your dApp expects high request volume or needs consistent low latency, evaluate dedicated or premium RPC plans over public endpoints.
- Data requirements: Determine if you need archive data for historical queries or just the latest state. Archive nodes are heavier but unlock full chain history.
- WebSocket for real-time: If you rely on push notifications (e.g., pending transactions or events), ensure your provider offers WebSocket endpoints with adequate subscription limits.
Aleph Zero is a public Layer 1 blockchain designed for privacy, scalability, and fast finality using a Directed Acyclic Graph (DAG) structure and a consensus called AlephBFT. It provides a JSON-RPC interface compatible with Ethereum tooling, making it easy for developers familiar with Ethereum to deploy smart contracts and build dApps.
Chain settings
| Parameter | Value |
|---|---|
| Chain ID | 2039 |
| Network name | Aleph Zero Mainnet |
| Protocol | EVM-compatible (Ethereum Virtual Machine) |
| Native token | AZERO |
| Public RPC endpoint | https://rpc.alephzero.team |
| WebSocket endpoint | wss://rpc.alephzero.team/ws |
| Testnet | Aleph Zero Testnet (chain ID 2039? Check docs for testnet specifics) |
| Block explorer | Aleph Zero Subscan |
| Faucet | Aleph Zero Faucet |
Note: The chain ID and public endpoints may change over time. Always verify against Aleph Zero official documentation.
JSON-RPC methods
Aleph Zero supports standard Ethereum JSON-RPC methods as well as some Aleph-specific endpoints. Common calls include:
eth_blockNumbereth_getBalanceeth_calleth_sendRawTransactioneth_getTransactionReceipteth_getLogseth_chainIdnet_version
Example: Get latest block number
curl -X POST https://rpc.alephzero.team \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
Example: Get balance of an address
curl -X POST https://rpc.alephzero.team \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xYourAddressHere", "latest"],
"id": 1
}'
Choosing an RPC provider for Aleph Zero
Public RPC endpoints are adequate for testing and light usage, but production applications benefit from managed infrastructure. Key factors to evaluate:
| Criterion | What to check | Why it matters |
|---|---|---|
| Rate limits | Requests per second (RPS) and monthly quota | Public endpoints often throttle; heavy dApps need higher limits |
| WebSocket support | Stable connection, subscription limits | Real-time features like pending transactions require WebSocket |
| Archive data | Availability of archive nodes | Historical queries and indexing need full state |
| Uptime guarantee | Historical uptime, redundancy | Downtime breaks your application; look for SLAs |
| Latency | Geographic distribution | Lower latency improves user experience |
| Dedicated options | Isolated nodes or shared access | Dedicated nodes eliminate noisy-neighbor issues |
Managed providers like OnFinality offer Aleph Zero endpoints with scalable plans, archive support, and detailed metrics through a dashboard.
Setting up MetaMask for Aleph Zero
- Open MetaMask and click the network dropdown.
- Select Add Network.
- Fill in:
- Network Name: Aleph Zero Mainnet
- RPC URL:
https://rpc.alephzero.team - Chain ID:
2039 - Currency Symbol: AZERO
- Block Explorer URL:
https://alephzero.subscan.io
- Click Save.
For a private endpoint, replace the RPC URL with your provider's URL (e.g., from OnFinality after selecting Aleph Zero).
Common pitfalls and troubleshooting
- Incorrect chain ID: Using
2039ensures compatibility. Double-check if you’re on testnet. - Outdated endpoints: Public endpoints may rotate. Use a provider that keeps endpoints stable.
- Gas estimation: Aleph Zero uses a gas model similar to Ethereum. Use
eth_estimateGasto avoid transaction failures. - WebSocket reconnection: Implement reconnection logic in your client to handle transient disconnections.
- Transaction replacement: If you send a transaction with the same nonce, it will be replaced; avoid nonce reuse.
Key Takeaways
- Aleph Zero is an EVM-compatible L1 blockchain with chain ID 2039.
- Public RPC endpoints are available but may have rate limits; consider a managed provider for production.
- Use standard Ethereum JSON-RPC methods to interact with the chain.
- For real-time features, WebSocket is essential; verify provider support.
- Evaluate rate limits, uptime, latency, and archive data when choosing an RPC provider.
Frequently Asked Questions
Q: Is Aleph Zero EVM-compatible? A: Yes, it uses the Ethereum Virtual Machine, so Ethereum tooling and libraries like ethers.js and web3.js work directly.
Q: What is the native token? A: AZERO, used for transaction fees and staking.
Q: Where can I get testnet AZERO? A: Use the Aleph Zero faucet at faucet.alephzero.org.
Q: How does Aleph Zero achieve finality? A: Through the AlephBFT consensus, which provides instant finality (no forks).
Q: Can I run my own node? A: Yes, but running a node requires technical overhead. Managed RPC services are simpler for most developers.
For more details on RPC endpoints, pricing, and supported networks, visit the OnFinality networks page and RPC pricing page.