-
Notifications
You must be signed in to change notification settings - Fork 133
Does not start if genesis is specified #166
Comments
Hey @hackable, You might want to try enabling the Tendermint logs to debug (run with |
The set home method has bug when genesisPath & keyPath as specified it hashes them and looks for node_keys etc in a different directory private setHome() {
/**
* if genesis and key paths are provided,
* home path is hash(genesisPath + keyPath)
*
* otherwise a random id is generated.
*/
if (this.config.genesisPath && this.config.keyPath) {
this.home = join(
this.lotionHome,
createHash('sha256')
.update(fs.readFileSync(this.config.genesisPath))
.update(fs.readFileSync(this.config.keyPath))
.digest('hex')
)
} else {
this.home = join(this.lotionHome, randomBytes(16).toString('hex'))
}
}
` |
Will this be fixed anytime soon? |
Hey @hackable, are you specifying a path to your private key on your validator? ( Also it looks like a few of the options you provided aren't valid, double check this section to make sure you're using the correct options. |
I'm having the same issue. An easy way to reproduce is as follows: WORKING
Outputs:
NOT WORKING:
Outputs:
And essentially hangs. |
The application is hanging because it's waiting for the validators specified in the genesis to come online and start creating blocks. The genesis says who has the authority to create blocks at the beginning of the chain. So by specifying a genesis, you've said exactly which validators can participate in consensus; they're just not online. When you don't specify a genesis or validator key, Tendermint just generates a new validator key and then makes a genesis where that key has all the authority. If you provide a path to your validator key in Perhaps a message explaining this would make sense when an application starts with a genesis but no validator key. (PR's welcome!) |
It wouldn't start if genesisPath and GCI is specified.
Node v11.8.0
Lotion 0.4.8
lotion({ initialState: { blockNo: 0, txCount: 0 }, ports: { abci: 58354, p2p: 58355, rpc: 58356 }, GCI: '08a5972afaf42e5751cd7f1af542c4e5e259e07dd0d45d31ffba3eaced632549', genesisPath: '/Users/admin/.lotion/networks/806f53597c1bfb8fdd9d128aca662a19/config/genesis.json' })
The text was updated successfully, but these errors were encountered: