Skip to content

config: configuration of genesis_hash value has no effect #2722

@cason

Description

@cason

Bug Report

Setup

CometBFT version (use cometbft version or git rev-parse --verify HEAD if installed from source):

4d4ac3417ab7894fc3284eb8950236aff66ff414, top of v1.x branch

Have you tried the latest version: yes/no

It is the latest version.

ABCI app (name for built-in, URL for self-written if it's publicly available):

Irrelevant, test with noop application.

Environment:

  • OS (e.g. from /etc/os-release): Mac OS
  • Install tools:
  • Others:

node command runtime flags:

cometbft --home home-1 start --proxy_app noop

Config

545c545
# Hash of the Genesis file (as hex string), passed to CometBFT via the command line.
# If this hash mismatches the hash that CometBFT computes on the genesis file,
# the node is not able to boot.
< genesis_hash = "a wrong hash"
---
> genesis_hash = ""

What happened?

Nothing, the node starts as usual.

What did you expect to happen?

As described in the comment above, the node shouldn't be able to boot.

How to reproduce it

  1. cometbft init
  2. Change the configuration file as above described
  3. comebft start --proxy_app noop

Logs

Irrelevant.

dump_consensus_state output

Irrelevant.

Anything else we need to know

I can fix this by moving the genesis_hash to the [storage] section.

By fixing I mean it breaks as in:

ERROR: failed to create node: genesis hash provided by operator cannot be decoded

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfigneeds-triageThis issue/PR has not yet been triaged by the team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions