Skip to main content
Mezod is the reference client implementation for the Mezo chain, a Bitcoin-first blockchain designed for user ownership, reliable bridging with tBTC, BTC for gas, dual staking model, and EVM compatibility.

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:

Development Setup

Prerequisites

  • Go 1.21+ (check go.mod for exact version)
  • Git
  • Make
  • Docker (optional, for containerized development)

Installation

1

Clone the repository

2

Install Go dependencies

3

Build the client

Development Environment

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 configuration
  • app.toml: Application-specific settings
  • client.toml: Client configuration
Example 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

1

Write Solidity Contracts

Use standard Ethereum tooling
2

Compile

Use Hardhat, Foundry, or solc directly
3

Deploy

Deploy to Mezo testnet/mainnet
4

Interact

Use Web3 libraries or direct RPC calls

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
1

Configure firewall and network ports

Set up proper network security
2

Set up proper access controls

Configure authentication and authorization
3

Deploy monitoring stack

Set up Prometheus and Grafana
4

Start node with production config

Launch the node with production settings

Docker Deployment

Troubleshooting

Common Issues

Check RPC endpoints and network connectivity. Verify firewall rules allow traffic on required ports (26656, 26657, 8545).
Verify blockchain synchronization status using mezod status. Check peer connections and ensure you have sufficient peers.
Monitor gas prices and adjust accordingly. Ensure your wallet has sufficient BTC for gas fees.

Debug Commands

The unsafe-reset-all command will delete all blockchain data. Use with caution and ensure you have backups.

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: