Exorium Guide
  • 🟢Introduction
  • ⚫Architecture
  • 🟢Governance Model
    • Treasury & Resource Allocation
    • Benefits of Decentralized Governance
    • Future Governance Enhancements
  • ⚫Validator
  • 🟢Tokenomics
    • Utility & Use Cases
    • Staking & Reward Mechanisms
    • Sustainability & Growth
  • Getting Started
    • ⚫Getting Started
    • 🟢Setup Exorium Network
    • ⚫Consensus Engine
    • 🟢Genesis File
      • Example of a Minimal Genesis File
      • Maintenance & Version Control
    • ⚫Contributing
    • 🟢Smart Contract
    • ⚫ERC721
  • 🟢Roadmap
  • Staking Guide
    • Formula for APY
Powered by GitBook
On this page
  • What is a Genesis File?
  • Why It Matters
  • Typical Genesis File Fields
  • Nonce & Timestamp
  • Gas Limit
  • Difficulty
  • Alloc (Genesis Allocations)
  • Mixhash & ParentHash
  1. Getting Started

Genesis File

PreviousConsensus EngineNextExample of a Minimal Genesis File

Last updated 4 months ago

This document explains how the genesis file of the Exorium Network is structured, what it defines, and why it is essential for initializing a new chain.

What is a Genesis File?

A genesis file is a JSON file that defines the initial state of your blockchain. It can be viewed as the “block at height 0.” The first block, at height 1, will reference this genesis file as its parent. Everything your blockchain does afterward (e.g processing transactions, minting new blocks) builds upon the conditions laid out in the genesis file.

The state defined in the genesis file contains crucial information, including:

  • Initial token allocation for specific addresses (premines, distribution, or vesting addresses).

  • Consensus parameters (e.g difficulty, block gas limits, epoch durations).

  • Genesis timestamp and default chain settings (e.g chain ID, network ID, block time).

  • Optional network configurations, such as forks/upgrades to activate at certain blocks.

Genesis Link: (Replace or update this link with the direct path to your genesis file if applicable.)


Why It Matters

  • Blockchain Identity: The genesis file defines the chain unique fingerprint. This includes the Chain ID, ensuring transactions intended for one network cannot be replayed on another.

  • Starting Parameters: It sets the foundational rules: how blocks are produced, which addresses have initial balances or privileges, and how the consensus engine behaves at the start.

  • Upgrade & Fork Control: Some blockchains define future hard forks or parameter changes right in the genesis file. Even if not, the genesis file can reference planned upgrades that later come into effect.

Typical Genesis File Fields

Below are common fields you might see in an Exorium genesis file. Actual names and formats may vary depending on your tooling or framework.

"config": {
  "chainId": 7957,
  "homesteadBlock": 0,
  "eip150Block": 0,
  "eip155Block": 0,
  "eip158Block": 0,
  "byzantiumBlock": 0,
  "constantinopleBlock": 0,
  "petersburgBlock": 0,
  "istanbulBlock": 0,
  "muirGlacierBlock": 0,
  "clique": {
    "period": 5,
    "epoch": 30000
  }
}
  • chainId: Identifies your network and prevents cross-chain transaction replays.

  • homesteadBlock, eip150Block, etc.: Specifies which Ethereum Improvement Proposals (EIPs) or forks are activated at block 0 (or at a specified block). Even in Exorium, you might inherit Ethereum-like EIPs if you’re EVM-compatible.

  • clique (or another consensus section, e.g ExorPOS): Configuration parameters for your consensus engine like block production intervals, epoch durations, or other mechanism-specific settings.

Nonce & Timestamp

"nonce": "0x0",
"timestamp": "0x5f5e100"
  • nonce: Often used in PoW-based genesis files. In PoS systems (like Exorium ExorPOS), it might just be a placeholder.

  • timestamp: The epoch time marking when this genesis block is considered “created.”

Extra Data

"extraData": "0x..."

Some consensus mechanisms store additional info here, such as validator signatures or metadata indicating which validators are recognized at genesis.

Gas Limit

"gasLimit": "0x47E7C4"

Defines the maximum amount of gas allowed in a block. For Exorium, you might set it high enough to handle numerous transactions yet low enough to prevent spam.

Difficulty

"difficulty": "0x4000"

In a PoW chain, this sets the mining difficulty for the genesis block. In a PoS chain, it might be symbolic or unused.

Alloc (Genesis Allocations)

"alloc": {
  "0x1111...": { "balance": "0x3635C9ADC5DEA00000" },
  "0x2222...": { "balance": "0xDE0B6B3A7640000" }
}

A key-value mapping of addresses to their initial balances. Useful for distributing tokens at genesis, rewarding early contributors, or setting up DAO/community funds.

Mixhash & ParentHash

"mixHash": "0x...",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
  • parentHash is typically zero for genesis, as there is no previous block.

  • mixHash is often relevant to PoW. For PoS or other consensus models, it may be kept as a placeholder.

BaseFeePerGas (EIP-1559 related)

"baseFeePerGas": "0x3b9aca00"

If EIP-1559 is active, you may see a base fee setup for your chain. This helps define the initial base fee for transactions.

🟢
GitHub: exoriumprotocol
Maintenance & Version Control
Example of a Minimal Genesis File