Skip to content

feat(network): initialize prepare command#1806

Merged
ilgooz merged 52 commits intodevelopfrom
feat/network-prepare
Dec 6, 2021
Merged

feat(network): initialize prepare command#1806
ilgooz merged 52 commits intodevelopfrom
feat/network-prepare

Conversation

@lumtis
Copy link
Contributor

@lumtis lumtis commented Nov 12, 2021

starport network chain prepare <launch-id>

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

@lumtis lumtis marked this pull request as ready for review November 24, 2021 08:48
barriebyron
barriebyron previously approved these changes Dec 3, 2021
Copy link
Contributor

@barriebyron barriebyron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Pantani
Pantani previously approved these changes Dec 4, 2021
Copy link
Collaborator

@Pantani Pantani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏽

Copy link
Contributor

@ilgooz ilgooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@@ -0,0 +1,79 @@
package networktypes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to the network pkg?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? The information is used by networkchain so we don't have a network dependency in networkchain

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@lumtis lumtis dismissed stale reviews from Pantani and barriebyron via d5f87a4 December 6, 2021 09:47
@ilgooz ilgooz merged commit f46d82b into develop Dec 6, 2021
@ilgooz ilgooz deleted the feat/network-prepare branch December 6, 2021 10:38
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

starport network chain prepare

4 participants