LogoLogo
  • Technical Architecture
  • LagomChain CLI
    • Configuration
    • Working With Docker
    • Single Node
    • Multi Node
    • Alternative Databases
    • CLI Commands
    • Drafting a proposal
  • Concepts
    • Accounts
    • EIP-155: Replay Protection
    • Chain ID
    • Encoding
    • Gas and Fees
    • IBC Relayers
    • Key Management
    • Keyring
    • State Export/Imort
    • Multisig
    • Pending State
    • Signing
    • Token
    • Transactions
  • Modules
    • epochs
    • erc20
    • evm
    • feemarket
    • inflation
    • vesting
  • Module Accounts
  • Bugs
  • IBC Channels
  • Security Overview
    • Audits
    • Simple Arrangement for Funding Upload (SAFU)
  • Metrics
  • Frequently Asked Questions
Powered by GitBook
On this page
  • LagomChain's Chain ID Format
  • Official Chain IDs
  • The Chain Identifier in LagomChain
  • Chain ID Upgrade Process
  • Why Chain ID Matters
  1. Concepts

Chain ID

A Chain ID is a unique identifier assigned to a blockchain network. It helps to:

  • Differentiate networks (Mainnet, Testnet, Devnet).

  • Ensure transactions are broadcasted to the correct network.

  • Prevent replay attacks by including the Chain ID in signed transactions (EIP-155 compliance).


LagomChain's Chain ID Format

LagomChain follows a structured Chain ID format, which includes:

  1. Identifier – Defines the blockchain name.

  2. EIP-155 Number – Immutable replay protection number.

  3. Version Number – Represents the current network version and is incremented upon upgrades or forks.

Chain ID Format in Genesis

{identifier}_{EIP155}-{version}

Example:

lagom_986-1

Official Chain IDs

Mainnet:

lagom_986-1

Testnet:

lagom_testnet-986-1

Certain upgrades may require an increase in the version number, but not all protocol changes necessitate a Chain ID change.


The Chain Identifier in LagomChain

Every blockchain must have a unique chain-id defined in genesis.json. LagomChain’s Chain ID is used in:

  • EIP-155 replay protection to prevent cross-chain transaction replays.

  • Cosmos SDK standardization for smooth chain upgrades.

  • Tendermint consensus rules, ensuring network integrity.

Example Configuration in genesis.json

{
  "chain_id": "lagom_986-1"
}

Chain ID Upgrade Process

When upgrading the LagomChain network, the version number must be incremented to avoid consensus issues.

Example of Chain ID Upgrade:

Previous Chain ID

Upgraded Chain ID

Reason for Change

lagom_986-1

lagom_986-2

Major upgrade requiring new consensus rules

lagom_testnet-986-1

lagom_testnet-986-2

Testnet upgrade for new feature testing


Why Chain ID Matters

1. Ensures Network Uniqueness

Each blockchain network must have a distinct Chain ID to differentiate it from others.

2. Prevents Replay Attacks (EIP-155 Compliance)

Transactions signed on one network cannot be replayed on another due to the Chain ID being embedded in the transaction data.

3. Enables Seamless Upgrades

By following the structured Chain ID format, LagomChain ensures smooth protocol upgrades without breaking consensus.

PreviousEIP-155: Replay ProtectionNextEncoding

Last updated 3 months ago