Skip to content

[Bug] Asimov and Bradbury testnets share the same chain ID (4221), breaking consensus initialization and replay protection #309

@zakaziko86

Description

@zakaziko86

Description

Both testnet_asimov and testnet_bradbury define id=4221, creating a chain ID collision.

genlayer_py/chains/testnet_asimov.py:22:

testnet_asimov: GenLayerChain = GenLayerChain(
    id=4221,
    name="Genlayer Asimov Testnet",

genlayer_py/chains/testnet_bradbury.py:119:

testnet_bradbury: GenLayerChain = GenLayerChain(
    id=4221,
    name="Genlayer Bradbury Testnet",

Impact

  • Consensus initialization is skipped for Bradbury — initialize_consensus_smart_contract() returns early for BOTH testnets since they share the same ID.
  • EIP-155 replay protection is broken — transactions signed for one testnet can be replayed on the other.
  • Wallet/explorer differentiation fails.

Suggested Fix

Assign unique chain IDs:

  • Asimov: 4221
  • Bradbury: 4222

Notes

  • Blockchain chain IDs must be globally unique per EIP-155.
  • Check CLI, JS SDK, and Studio for hardcoded 4221.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions