feat(network): initialize prepare command#1806
Conversation
| @@ -0,0 +1,79 @@ | |||
| package networktypes | |||
There was a problem hiding this comment.
Can we move this to the network pkg?
There was a problem hiding this comment.
Why? The information is used by networkchain so we don't have a network dependency in networkchain
There was a problem hiding this comment.
ok I just noticed that. but still, I'm a bit un comfortable with with the networktypes pkg in general. because it feels like we define all of the types of network pkg to there whereas we only put the shared types there between the network and networkchain.
Anyways, I'll try to make a refactoring on this later and see if we can rm this pkg completely.
There was a problem hiding this comment.
we define all of the types of network pkg to there whereas we only put the shared types there between the network and networkchain.
I didn't get this statement. The point is actually to define what is shared between network and networkchain. Example, networkchain should be agnostic to spn communication but it should still have somewhere the concept of a genesis account in order to build the chain with Genesis Information
I'm not closed to a refactoring for this but I think it's better if we discuss the new architecture before creating a PR
Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>
Co-authored-by: Danilo Pantani <danpantani@gmail.com>
* Initialize command * add requests for prepare * Initialize prepare * fix * Initialize cosmosaddress * get prefux * Apply genesis accounts * Apply vesting options * lint * Genesis setup validators * lint * Add todo comment * Support path for prepare * Add prepare option * Set genesis time * Initialize genesis state * Genesis test * Remove launch dir * Initial genesis * lint * fixes * fix utc time * Fix time test * small refactor * Update TODO comment * refactor queries * Revert queries * comments * Fix gentx path * Network types * Genesis information query * Use genesis info * Comments * Add launch time * fix join * refactor * lint * type tests * from flag * Update starport/services/network/networktypes/genesisinformation.go Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com> * Update starport/services/network/networkchain/prepare.go Co-authored-by: Danilo Pantani <danpantani@gmail.com> * Renaming Co-authored-by: Danilo Pantani <danpantani@gmail.com> Co-authored-by: Barrie Byron <barrie.byron@tendermint.com> Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>
Will initialize and set up the genesis and config of the chain from the approved requests
If the config dir doesn't exist, the chain is fully initialized with a validator key
If the config dir exists, the genesis file is reinitialized and the validator remains the same