Skip to content

Conversation

@ilgooz
Copy link
Member

@ilgooz ilgooz commented Nov 26, 2021

No description provided.

@ilgooz ilgooz force-pushed the refactor/network branch 5 times, most recently from c22d8a3 to 5f9e18f Compare November 29, 2021 08:57
@ilgooz ilgooz marked this pull request as ready for review November 29, 2021 09:01
@ilgooz ilgooz linked an issue Nov 29, 2021 that may be closed by this pull request
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.

👌🏽 nice organization

@ilgooz ilgooz requested a review from Pantani November 30, 2021 08:35
@lumtis
Copy link
Contributor

lumtis commented Nov 30, 2021

Shouldn't we remove the network prefix?

network/
  chain/
    account.go
    chain.go
    init.go
  network.go
  publish.go
  join.go

Copy link
Contributor

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

I'm very comfortable with this design👍 I just have one comment on the naming above

Also, it may be out of scope for this refactor but I think Join should be independent from the chain object.
You just pass a gentx path to Join and it makes the communication with spn checking accounts on spn, sending msg, etc...

And the verification related to the chain genesis like account already exists in the initial genesis or invalid gentx are perform in the chain package and called independently before Join
But I think we can implement this in #1791

@ilgooz
Copy link
Member Author

ilgooz commented Nov 30, 2021

Shouldn't we remove the network prefix?

network/
  chain/
    account.go
    chain.go
    init.go
  network.go
  publish.go
  join.go

I changed the file names de3d77d but kept the networkchain dir name because we already have another chain pkg, it's better they have different names to make the import lines explicit.

@ilgooz
Copy link
Member Author

ilgooz commented Nov 30, 2021

I'm very comfortable with this design👍 I just have one comment on the naming above

Also, it may be out of scope for this refactor but I think Join should be independent from the chain object. You just pass a gentx path to Join and it makes the communication with spn checking accounts on spn, sending msg, etc...

And the verification related to the chain genesis like account already exists in the initial genesis or invalid gentx are perform in the chain package and called independently before Join But I think we can implement this in #1791

I was also thinking the same about Join, maybe it does not need to depend on Chain except that, it still needs to know the tendermint node id and we get it by executing a command on chain which requires Chain to be initialized.

@ilgooz ilgooz requested a review from lumtis November 30, 2021 10:06
@lumtis
Copy link
Contributor

lumtis commented Nov 30, 2021

I'm getting a new error:

starport n --local chain publish https://github.com/lubtd/earth --no-check
✔ Source code fetched
✔ Blockchain set up
cannot retrieve tokens from faucet: cannot send tokens (SDK code 32): account sequence mismatch, expected 1, got 0: incorrect account sequence

I'm looking into it, do you think it could be related to #1846?

[UPDATE] it seems I don't have the issue using --from alice and so occurs when using default

@ilgooz
Copy link
Member Author

ilgooz commented Nov 30, 2021

@lubtd can you please test again?

@Pantani Pantani requested a review from ivanovpetr November 30, 2021 13:14
@Pantani
Copy link
Collaborator

Pantani commented Nov 30, 2021

@lubtd can you please test again?

The issue persists for me but works on the second try

Screen Shot 2021-11-30 at 10 29 54

@Pantani
Copy link
Collaborator

Pantani commented Nov 30, 2021

For each new account, the publish command fails on the first try but works on the next one

Screen Shot 2021-11-30 at 10 35 19

@ilgooz
Copy link
Member Author

ilgooz commented Nov 30, 2021

I created an issue for this one #1857, lets track it there to unblock this PR.

@lumtis
Copy link
Contributor

lumtis commented Nov 30, 2021

Yes it works the second time now

@ilgooz ilgooz merged commit 3b0da49 into develop Nov 30, 2021
@ilgooz ilgooz deleted the refactor/network branch November 30, 2021 16:45
Jchicode pushed a commit to Jchicode/cli that referenced this pull request Aug 9, 2023
* refactor: network

* fix

* Update starport/services/network/networkchain/networkchain.go

Co-authored-by: Danilo Pantani <[email protected]>

* Update starport/cmd/network.go

Co-authored-by: Danilo Pantani <[email protected]>

* Update starport/cmd/cmd.go

Co-authored-by: Danilo Pantani <[email protected]>

* simplified file names

* fix cosmosclient init

Co-authored-by: Danilo Pantani <[email protected]>
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.

network publish: initialize the chain with a temporary home directory

5 participants