Cosmos integration#1211
Conversation
| logger.Init(cfg.Log.Format, cfg.Log.Level, cfg.Log.ForceColors) | ||
|
|
||
| // init app | ||
| db := db.NewMemDB() |
There was a problem hiding this comment.
doesn't matter for this PR but just a reminder that this is in memory
| MESG_TENDERMINT_VALIDATORPUBKEY=${MESG_TENDERMINT_VALIDATORPUBKEY:-$VALIDATOR_PUBKEY} | ||
|
|
||
| # Setup the validator private keys | ||
| if [[ $* == *--validator* ]]; then |
There was a problem hiding this comment.
@krhubert if you know a better way to read flag but definitely not blocking
There was a problem hiding this comment.
yes, there is getopts tool (one of many examples https://sookocheff.com/post/bash/parsing-bash-script-arguments-with-shopts/)
| genesis := &types.GenesisDoc{ | ||
| GenesisTime: time.Date(2019, 8, 8, 0, 0, 0, 0, time.UTC), | ||
| ChainID: "xxx", | ||
| ConsensusParams: types.DefaultConsensusParams(), |
There was a problem hiding this comment.
using the default consensus here but a config with 10 sec. Don't we have any issue with that?
There was a problem hiding this comment.
ConsensusParams != config.Consensus
config.Consensus is stored in config/config.toml:
##### consensus configuration options #####
[consensus]
wal_file = "data/cs.wal/wal"
timeout_propose = "3s"
timeout_propose_delta = "500ms"
timeout_prevote = "1s"
timeout_prevote_delta = "500ms"
timeout_precommit = "1s"
timeout_precommit_delta = "500ms"
timeout_commit = "5s"
# ....ConsensusParams is stored in config/genesis.json:
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
},| gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect | ||
| golang.org/x/tools v0.0.0-20190712213246-8b927904ee0d // indirect | ||
| google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532 // indirect | ||
| google.golang.org/grpc v1.22.0 |
There was a problem hiding this comment.
many dependencies changed what's the reason? Is this really necessary for this PR and if it is we need to make sure it didn't break anything and test all that
There was a problem hiding this comment.
Dependency with cosmos-sdk is the reason.
|
there are also issues on codacy because of missing comments to fix |
antho1404
left a comment
There was a problem hiding this comment.
Ok for me, it looks great, just resolving the conflicts and then it's ready to merge for me :)
I got some issues with the dev script but apparently, it is fixed on another PR
…cosmos-integration # Conflicts: # config/config.go # core/main.go # go.mod # go.sum
This PR integrate Cosmos and mainly tendermint in the Engine 🍾 🎊
There is 2 ways to run cosmos, as validator (will create the blocks) and as client (will receive blocks from a validator).
A working blockchain should have at least one validator.
To run a validator, execute:
To run a client, execute:
If you want to run multiple Engine on the same computer, you'll need to set a different name, path and port:
To override default, you can specificy the validator with the following envs:
The logs from Cosmos are too much and will be configurable in another PR.
Closes #1195