Skip to content

CMT_HOME is not picked up by cometbft init #982

Closed

Description

@sergio-mena

Bug Report

Setup

CometBFT version : main

Have you tried the latest version: yes

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

Environment:

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

node command runtime flags:

Config

N/A

What happened?

Our docs state that both CMTHOME and CMT_HOME are valid variable names to set the root directory where data and config will live.

Command init does not pick up CMT_HOME:

% echo $CMT_HOME 

% export CMT_HOME=/tmp/my_cmt
% echo $CMT_HOME             
/tmp/my_cmt
% mkdir $CMT_HOME
% build/cometbft init validator
I[2023-06-16|17:02:35.885] Generated private validator                  module=main keyFile=/Users/sergio/.cometbft/config/priv_validator_key.json stateFile=/Users/sergio/.cometbft/data/priv_validator_state.json
I[2023-06-16|17:02:35.885] Generated node key                           module=main path=/Users/sergio/.cometbft/config/node_key.json
I[2023-06-16|17:02:35.885] Generated genesis file                       module=main path=/Users/sergio/.cometbft/config/genesis.json
% 

Check the logs: the root directory is the default one (.cometbft in my home dir)

What did you expect to happen?

init command should pick up the value of CMT_HOME (/tmp/my_cmt in the example above)

How to reproduce it

See above

Logs

See above

dump_consensus_state output

N/A

Anything else we need to know

No

Activity

  1. added
    bug
    on Jun 16, 2023
  2. self-assigned this
    on Jun 16, 2023
  3. moved this from Todo to Ready for Review in CometBFT 2023on Jun 16, 2023
  4. added a commit that references this issue on Jun 19, 2023
    b7be568
  5. moved this from Ready for Review to Done in CometBFT 2023on Jun 19, 2023
  6. added 3 commits that reference this issue on Jun 19, 2023
    a9458b6
    20f0c5b
    500d1f3
  7. added 5 commits that reference this issue on Jun 19, 2023
    37dca67
    4aaea49
    42bc062
    3e0cd1a
    ffc580f
  8. added a commit that references this issue on Jan 16, 2024
    5fbe88d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions