Skip to content

Geth does not start in --dev mod with empty blockchain and custom genesis block #24453

@DimaStebaev

Description

@DimaStebaev

System information

Geth version: 1.10.16
OS & Version: Ubuntu 21.10 Implish

Expected behaviour

If run

geth --datadir /tmp/blockchain/ init genesis.json
geth --datadir /tmp/blockchain --dev

geth starts in develop mode.

Actual behaviour

geth fails with an error:

Fatal: Could not open database: open /tmp/blockchain/geth/chaindata/ancient/headers.cidx: no such file or directory

Steps to reproduce the behaviour

  1. Create valid genesis block and write in to genesis.json file
  2. Run geth --datadir /tmp/blockchain/ init genesis.json
  3. Run geth --datadir /tmp/blockchain --dev

Backtrace

INFO [02-22|17:03:03.930] Starting Geth in ephemeral dev mode... 
INFO [02-22|17:03:03.931] Maximum peer count                       ETH=50 LES=0 total=50
INFO [02-22|17:03:03.931] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [02-22|17:03:03.931] Set global gas cap                       cap=50,000,000
INFO [02-22|17:03:04.078] Using developer account                  address=0x426b4b03F4d92Fc4c45dC9858B9D62BC9625C853
INFO [02-22|17:03:04.078] Allocated cache and file handles         database=/tmp/blockchain/geth/chaindata cache=512.00MiB handles=524,288 readonly=true
Fatal: Could not open database: open /tmp/blockchain/geth/chaindata/ancient/headers.cidx: no such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions