Overview
Mezo is a Cosmos SDK-based chain with EVM compatibility running on top of CometBFT consensus engine. The Mezod client codebase was forked from the LGPL version of Evmos and heavily modified for Mezo’s specific requirements.Key Features
Bitcoin-first Design
Native BTC integration and gas payments
EVM Compatibility
Full Ethereum Virtual Machine support
tBTC Bridging
Reliable cross-chain Bitcoin transfers
Dual Staking Model
Rewards and validation mechanisms
Repository Structure
The Mezod repository contains:- Go Modules: Core blockchain client implementation
- x/ modules: Custom Cosmos SDK modules
- EVM Integration: Ethereum compatibility layer
- Configuration: Chain configuration and parameters
Development Setup
Prerequisites
- Go 1.21+ (check
go.modfor exact version) - Git
- Make
- Docker (optional, for containerized development)
Installation
Development Environment
- Local Development
- Docker Development
Chain Configuration
Network Parameters
Mezod supports multiple network configurations:- Mainnet: Production Mezo network
- Testnet: Public testing network
- Local: Development network
Configuration Files
Key configuration files:config.toml: Node configurationapp.toml: Application-specific settingsclient.toml: Client configuration
config.toml
EVM Integration
Ethereum Compatibility
Mezod provides full EVM compatibility, allowing you to:- Deploy Ethereum smart contracts
- Use Ethereum tooling (Hardhat, Foundry, etc.)
- Interact with contracts using Web3 libraries
Connecting via Web3
Gas and Fees
- BTC for Gas: Pay transaction fees in Bitcoin
- Dynamic Pricing: Gas prices adjust based on network conditions
- EVM Gas Model: Compatible with Ethereum gas calculations
Node Types
Full Node
A complete node that stores the entire blockchain:Light Client
A lightweight client for mobile and resource-constrained environments:Archive Node
A node that stores all historical data:RPC Endpoints
Cosmos SDK RPC
- Port: 26657
- Endpoints: Standard Cosmos SDK RPC methods
- WebSocket: Real-time updates
EVM RPC
- Port: 8545
- Endpoints: Ethereum-compatible JSON-RPC
- Methods: eth_getBalance, eth_sendTransaction, etc.
Development Workflow
Building Contracts
Testing
Integration Examples
Cosmos SDK Integration
Monitoring and Debugging
Logging
Metrics
- Prometheus: Built-in metrics collection on port 26660
- Grafana: Dashboard for monitoring
- Health Checks: HTTP endpoints for health monitoring
Deployment
Production Deployment
Hardware Requirements:- Minimum: 8GB RAM, 100GB SSD
- Recommended: 16GB RAM, 500GB NVMe SSD
Docker Deployment
Troubleshooting
Common Issues
Connection Issues
Connection Issues
Check RPC endpoints and network connectivity. Verify firewall rules allow traffic on required ports (26656, 26657, 8545).
Sync Problems
Sync Problems
Verify blockchain synchronization status using
mezod status. Check peer connections and ensure you have sufficient peers.Gas Issues
Gas Issues
Monitor gas prices and adjust accordingly. Ensure your wallet has sufficient BTC for gas fees.
Debug Commands
Additional Resources
Mezod Repository
Main repository and source code
Configure Environment
Set up your development environment
Cosmos SDK Documentation
Cosmos SDK reference documentation
EVM Documentation
Ethereum Virtual Machine specification
Support
For development support:- Join the Mezo Discord
- Check the GitHub Issues
- Review the FAQ