tendermint / spn

A blockchain to launch blockchains.
Other
112 stars 43 forks source link

How to run SPN and publish own blockchain here? #976

Closed silverstr89 closed 2 years ago

silverstr89 commented 2 years ago

Describe the bug Hello everyone

i totally do not understand how to work with SPN

I cloned this repo, and then started as in readme and i got

🛠️  Building proto...
📦 Installing dependencies...
🛠️  Building the blockchain...
💿 Initializing the app...
🙂 Created account "user1" with address "cosmos1gsj3kuq0pljhlrcecvyuz6l4vgdn5umcsa59my" with mnemonic: "analyst thank planet attack immense become stage pride point obey stuff rescue loan cushion ready alert ancient strike quantum boil ivory history flat fun"
🙂 Created account "user2" with address "cosmos1p0nlq3hyqmm7frva6klyd5fq2fz3kyjpwl6f4d" with mnemonic: "large wrong until armor mass collect powder lady dirt steak entire absurd disease fit exit pony weapon behind noise reward marine shuffle basic boss"
🌍 Tendermint node: http://0.0.0.0:26657
🌍 Blockchain API: http://0.0.0.0:1317
🌍 Token faucet: http://0.0.0.0:4500

ok, what next? is there SPN already started?

i trying connect to my SPN

ignite n chain list --spn-node-address "http://my IP:26657"

and getting connect: connection refused, but of course my server is available!

i trying to publish blockchain in SPN

ignite network chain publish or whatever --spn-node-address "http://my IP:26657" and getting connection refused

basically my idea is make similar with https://www.youtube.com/watch?v=DhciTJHxvAY&t=46s , but for ignite. and i cannot do that

is there any chance someone could help me to run my own blockchain?

To Reproduce Steps to reproduce the behavior: described above

Please provide output of commands

lumtis commented 2 years ago

Hey, the flow is correct, when running the chain on your machine, you should be able to connect with Ignite CLI to it.

ignite network chain publish or whatever --spn-node-address "http://my/ IP:26657" and getting connection refused

On the same machine, you can connect with

ignite n chain list --spn-node-address "http://0.0.0.0:26657"

If you run spn on your server and want to access it, you need to open port 26657 on your machine

We also have a config_2.yml using different ports for spn that is compatible with Ignite CLI --local flag.

If you serve spn from config_2.yml:

ignite c serve -r -c config_2.yml
Cosmos SDK's version is: stargate - v0.46.1

🔄 Resetting the app state...
🛠️  Building proto...
📦 Installing dependencies...
🛠️  Building the blockchain...
💿 Initializing the app...
🙂 Created account "alice" with address "spn1ezptsm3npn54qx9vvpah4nymre59ykr9exx2ul" with mnemonic: "slide moment original seven milk crawl help text kick fluid boring awkward doll wonder sure fragile plate grid hard next casual expire okay body"
🙂 Created account "bob" with address "spn1aqn8ynvr3jmq67879qulzrwhchq5dtrvtx0nhe" with mnemonic: "trap possible liquid elite embody host segment fantasy swim cable digital eager tiny broom burden diary earn hen grow engine pigeon fringe claim program"
🌍 Tendermint node: http://0.0.0.0:26661
🌍 Blockchain API: http://0.0.0.0:1319
🌍 Token faucet: http://0.0.0.0:4502

You can use on the same machine the --local flag to interact with the chain

ignite n chain list --local

Please beware that spn is under active development and the pulled version from develop may not be compatible with the release version of the Ignite CLI

silverstr89 commented 2 years ago

@lubtd thank you so much! can i mount blockchain from private repo?

i trying to use source https://github.com/privaterepo but it requires authorisation and i don't have idea how to authorise

silverstr89 commented 2 years ago

@lubtd i don't know why. this now running, but i cannot connect remotely to this machine

for example, my spn work at http://someIp:26661, and on local host it works

when i trying to connect from other machine ignite n chain list --spn-node-address "http://someIp:26661" i getting connection refused. server is available

lumtis commented 2 years ago

We currently can't use the network with private repo. And we shouldn't with the public Ignite Chain.

But it may be a good idea to allow to on a local network for experimentation. Using Github token, we can open an issue and do investigation for this

silverstr89 commented 2 years ago

@lubtd what could you say about second question? why i cannot connect to the port of spn network?

lumtis commented 2 years ago

when i trying to connect from other machine ignite n chain list --spn-node-address "http://someip:26661/" i getting connection refused. server is available

When you say that server is available, does it mean you can access http://someip:26661/ from a browser?

silverstr89 commented 2 years ago

i mean some ip is working, but when i trying connect to 26661 it is refused. other ports working ok when i ping them

lumtis commented 2 years ago

Seems like to be related to your server firewall or something. Is it doing the same for every port? You can change the RPC port with the value validators[x].config.rpc.laddr in your config yml file

validators:
- name: alice
  bonded: 100000000uspn
  app:
    api:
      address: :1319
    grpc:
      address: :9094
    grpc-web:
      address: :9095
  config:
    p2p:
      laddr: :26660
    rpc:
      laddr: :26661
      pprof_laddr: :6062
silverstr89 commented 2 years ago

it is related to https://github.com/tendermint/spn/issues/966

now i connecting without problems