Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

starport chain serve fails when proto file is defined in node_modules #1513

Closed
fedekunze opened this issue Aug 26, 2021 · 9 comments
Closed
Labels

Comments

@fedekunze
Copy link

fedekunze commented Aug 26, 2021

Describe the bug
A clear and concise description of what the bug is.

We wanted to use starport for liveness testing, but the chain can't start when there are additional proto files. Ideally we should start the chain without running proto or use the proto config defined for the workspace on buf.work.yaml

To Reproduce
Steps to reproduce the behavior:

clone and checkout the ethermint branch

git clone github.com/tharsis/ethermint
cd ethermint

run starport

starport chain serve --reset-once -v -c ./starport.yml                      
[STARPORT] Cosmos SDK's version is: Stargate v0.40.0 (or later)
[STARPORT] 
[STARPORT] 🔄 Resetting the app state...
[STARPORT] 🛠️  Building proto...
[STARPORT] cannot build app:
[STARPORT] 
[STARPORT] 	file: /Users/federico/tharsis/ethermint/tests/solidity/node_modules/protocol-buffers-schema/test/fixtures/no-tags.proto: <input>:2:25: found ";" but expected [field =]
[STARPORT] Waiting for a fix before retrying...

chain on SDK v0.43

Please provide output of commands

  • starport version: starport version v0.17.3 darwin/amd64 -build date: 2021-08-19T09:13:08Z
  • go version: go version go1.16.6 darwin/amd64
  • uname -a: Darwin Federicos-MBP-2.fritz.box 20.1.0 Darwin Kernel Version 20.1.0: Sat Oct 31 00:07:11 PDT 2020; root:xnu-7195.50.7~2/RELEASE_X86_64 x86_6
@fedekunze
Copy link
Author

fedekunze commented Aug 26, 2021

Note: I think running the chain without proto changes and using buf.work.yml are independent solutions that should be pursued

@Pantani
Copy link
Collaborator

Pantani commented Aug 27, 2021

@fedekunze, thanks for the reporting!!! ❤️

We already fixed it, but it's not in the version v0.17.3, we will release it in the next version, but the fix is in the develop branch. You can try to build Starport from the source using make install

@ilgooz
Copy link
Member

ilgooz commented Aug 27, 2021

this should also do it: curl https://get.starport.network/starport@develop! | bash

@fadeev
Copy link
Contributor

fadeev commented Sep 3, 2021

@fedekunze have you had a chance to test this with the develop version?

@fedekunze
Copy link
Author

this should also do it: curl https://get.starport.network/starport@develop! | bash

I'm getting Release tag develop not found

@fedekunze
Copy link
Author

used make install on develop and I'm still able to reproduce the error

@fadeev fadeev added this to the v0.18 milestone Sep 6, 2021
@fadeev fadeev assigned ilgooz and unassigned Pantani Sep 6, 2021
@Pantani
Copy link
Collaborator

Pantani commented Sep 6, 2021

used make install on develop and I'm still able to reproduce the error

@fedekunze, may you need to delete the old binary from /usr/bin/starport before installing from the source. the make install put the binary into the $GOPATH/bin/starport

@ilgooz
Copy link
Member

ilgooz commented Sep 21, 2021

@fedekunze I can confirm that, develop branch will fix it for you. You probably have a binary leftover from your prev installation as Danilo mentioned.

I tested it on Gitpod for Starport v0.17.3 and develop by first running npm install inside your tests/solidity and making sure that no-tags.proto exists in the same path printed in your error message.

I can reproduce it in v0.17.3, but in develop everything is fine.

I also had to randomly decrease your coin amounts in your starport.yml because I was getting invalid coins error after the daemon has started. So you probably need to check that as well. Adding my starport.yml below. Please let me know if the proto issue is somehow still persist.

Thank you for trying Starport out, your feedbacks are pretty valuable for us! We get pretty excited when core devs starts adopting to Starport to make their daily development easier!

I would recommend you to just delete your buf.work.yaml file and and your third_party dir entirely, including your protoc gen scripts if you're not doing something way custom. Starport automatically includes third party proto files from the SDK for the exact SDK version defined in your go.mod. It also makes other proto files available that may be living in other repos added as dependencies in your go mod. For ex, if you go get tendermint/liqudity, you can import any of the proto files defined in it, like import tendermint/liquidity/v1beta1/tx.proto.

Starport will automatically generate code for your proto files and we plan to allow advanced customization options for different needs, such as enabling custom protoc plugin support. But right now, you can already generate the Go code for your chain, a Dart and Vue client and an Open API spec for your chain. Please take a look at our docs: https://docs.starport.network/kb/config.html.

accounts:
  - name: alice
    coins: ["100000000uatom", "1000000000000aphoton"]
  - name: bob
    coins: ["5000000000000aphoton"]
  - name: faucet
    coins: ["1000000000000aphoton"]
validator:
  name: alice
  staked: "1000000000000aphoton"
faucet:
  port: 4500
  name: "faucet"
  coins: ["1000000000000aphoton"]
  coins_max: ["100000000aphoton"]
build:
  binary: "ethermintd"
init:
  home: "$HOME/.ethermintd"
  app:
    api:
      enable: true
    json-rpc:
      address: "0.0.0.0:8545"     # change the JSON-RPC address and port
      ws-address: "0.0.0.0:8546"  # change the JSON-RPC websocket address and port
genesis:
  chain_id: "ethermint_9000-1"
  app_state:
    staking:
      params:
        bond_denom: "aphoton"
    mint:
      params:
        mint_denom: "aphoton"
    crisis:
      constant_fee:
        denom: "aphoton"
    gov:
      deposit_params:
        min_deposit:
          - amount: "10000000"
            denom: "aphoton"
    evm:
      params:
        evm_denom: "aphoton"

@salmad3
Copy link
Member

salmad3 commented Nov 14, 2023

I believe this has been resolved. Please reopen if otherwise.

@salmad3 salmad3 closed this as completed Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants