Skip to content

--dev mode restart error with --datadir #29955

@HowHsu

Description

@HowHsu

System information

Geth version: geth version
CL client & version: e.g. lighthouse/nimbus/[email protected]
OS & Version: Linux
Commit hash : 68c0ec0

Expected behaviour

geth successfully starts

Actual behaviour

geth canot start, error: Fatal: Could not read genesis from database: could not unmarshal genesis state json: missing required field 'balance' for Account

Steps to reproduce the behaviour

./build/bin/geth --dev --datadir ./data --http --http.api personal,eth,net,web3,debug --allow-insecure-unlock

run this command, ctrl+c to quit it, then run this command again, the error occurs.

Backtrace

INFO [06-07|16:24:29.422] Starting Geth in ephemeral dev mode...
WARN [06-07|16:24:29.422] You are running Geth in --dev mode. Please note the following:

  1. This mode is only intended for fast, iterative development without assumptions on
     security or persistence.
  2. The database is created in memory unless specified otherwise. Therefore, shutting down
     your computer or losing power will wipe your entire block data and chain state for
     your dev environment.
  3. A random, pre-allocated developer account will be available and unlocked as
     eth.coinbase, which can be used for testing. The random dev account is temporary,
     stored on a ramdisk, and will be lost if your machine is restarted.
  4. Mining is enabled by default. However, the client will only seal blocks if transactions
     are pending in the mempool. The miner's minimum accepted gas price is 1.
  5. Networking is disabled; there is no listen-address, the maximum number of peers is set
     to 0, and discovery is disabled.

INFO [06-07|16:24:29.424] Maximum peer count                       ETH=50 total=50
INFO [06-07|16:24:29.425] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [06-07|16:24:29.428] Set global gas cap                       cap=50,000,000
INFO [06-07|16:24:29.494] Using developer account                  address=0x958dd2c08650fF154d0030923790250eFd06EffB
INFO [06-07|16:24:29.495] Using pebble as the backing database
INFO [06-07|16:24:29.495] Allocated cache and file handles         database=/home/tmp/geth_node/data/geth/chaindata cache=512.00MiB handles=524,288
INFO [06-07|16:24:29.496] Opened ancient database                  database=/home/tmp/geth_node/data/geth/chaindata/ancient/chain readonly=true
Fatal: Could not read genesis from database: could not unmarshal genesis state json: missing required field 'balance' for Account

When submitting logs: please submit them as text and not screenshots.

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