-
Notifications
You must be signed in to change notification settings - Fork 780
Description
Bug Report
Setup
CometBFT version (use cometbft version or git rev-parse --verify HEAD if installed from source):
> cometbft version
1.0.0-dev+f8366fc42
Have you tried the latest version: yes
ABCI app (name for built-in, URL for self-written if it's publicly available): kv_store
Environment:
- OS (e.g. from /etc/os-release):
MacOS
node command runtime flags: cometbft start --proxy_app=kv_store
Config
What happened?
Got the lastest code from main and when running the kv_store app got an error
ERROR: failed to create node: synchrony.MessageDelay must be greater than 0. Got: 0
What did you expect to happen?
The node would start without any errors
How to reproduce it
The reason I've got that error was because I already had some files in the $CMTHOME and the genesis.toml file didn't have the synchrony parameters as the ones below generated after I removed the old files and did a cometbft init
"synchrony": {
"precision": "500000000",
"message_delay": "2000000000"
},
"feature": {
"vote_extensions_enable_height": "0",
"pbts_enable_height": "0"
}
Logs
If you start CometBFT using a genesis that doesn't have PBTS params, you get an error:
(cometbft) > cometbft start --proxy_app=kvstore
ERROR: failed to create node: synchrony.MessageDelay must be greater than 0. Got: 0
After removing old files and re-starting it worked.
(cometbft) > rm -Rf ~/.cometbft
(cometbft) > cometbft init
I[2024-03-11|18:21:13.329] Generated private validator module=main keyFile=/Users/andynogueira/.cometbft/config/priv_validator_key.json stateFile=/Users/andynogueira/.cometbft/data/priv_validator_state.json
I[2024-03-11|18:21:13.330] Generated node key module=main path=/Users/andynogueira/.cometbft/config/node_key.json
I[2024-03-11|18:21:13.330] Generated genesis file module=main path=/Users/andynogueira/.cometbft/config/genesis.json
(cometbft) > cometbft start --proxy_app=kvstore
I[2024-03-11|18:21:16.895] WARNING: deleting genesis file from database if present, the database stores a hash of the original genesis file now module=main
I[2024-03-11|18:21:16.895] service start module=proxy msg="Starting multiAppConn service" impl=multiAppConn
I[2024-03-11|18:21:16.895] service start module=abci-client connection=query msg="Starting localClient service" impl=localClient
I[2024-03-11|18:21:16.895] service start module=abci-client connection=snapshot msg="Starting localClient service" impl=localClient
I[2024-03-11|18:21:16.895] service start module=abci-client connection=mempool msg="Starting localClient service" impl=localClient
I[2024-03-11|18:21:16.895] service start module=abci-client connection=consensus msg="Starting localClient service" impl=localClient
Anything else we need to know
Probably a good idea is to skip the check for the synchrony parameters if PBTS is not enabled.