Feature/cosmos integration nico#1206
Conversation
| nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile()) | ||
| if err != nil { | ||
| return nil, err | ||
| nodeKey := &p2p.NodeKey{ |
There was a problem hiding this comment.
@krhubert why removing loadOrGenNodeKey? The goal of this PR is to use a maximum of stuff already done by Cosmos SDK. We could implement our own system to store the node and validator private keys later on ;)
There was a problem hiding this comment.
You said that node key will be generated every time engine start, so why we want to load them? Using loadOrGen is misleading for other devs.
By generating directly pub key it's clear that the key is changing on every start.
There was a problem hiding this comment.
The goal of this PR is simply to start tendermint with the most similar logic and code than
cosmos sdk. we can change the behavior later on.
Only the genesis is generated to avoid to add its hardcoded json version to the source code. But it brings some limitation and complicated when we add store to the cosmos app..
| // PubKeyEd25519 is type used to parse value provided by envconfig. | ||
| type PubKeyEd25519 ed25519.PubKeyEd25519 | ||
|
|
||
| func (key *PubKeyEd25519) Decode(value string) error { |
There was a problem hiding this comment.
Maybe we could do a PR on tendermint repo to add this function ;)
There was a problem hiding this comment.
They use viper for receiving flags/args/envs and so I don't think so it would pass :/
# Conflicts: # dev
|
Commit e32d912 make it possible for a second tendermint node to connect to the validator and receive blocks 🎊 |
# Conflicts: # config/config.go # core/main.go
|
closed in favor of #1211 |
To start the engine in validator mode: no new config 🎊 🍾
To start a another engine that connect to a validator one:
don't forget to replace
MESG_TENDERMINT_VALIDATORPUBKEYandMESG_TENDERMINT_P2P_SEEDS;)