ignite / cli

Ignite is a CLI tool and hub designed for constructing Proof of Stake Blockchains rooted in Cosmos-SDK
https://ignite.com
Other
1.26k stars 547 forks source link

starport network chain join: investigate and fix hanging problem #780

Closed faddat closed 3 years ago

faddat commented 3 years ago

Myself, and a number of others have experienced this issue where starport hangs exactly here:

Screen Shot 2021-02-22 at 11 20 05 PM

Exact configuration:

Screen Shot 2021-02-22 at 11 23 09 PM

The chain is totally boilerplate and I've removed customization to config.yml in order to test this.

Both I and a number of users have experienced this issue on a wide range of setups.

Works perfectly on a 2017 macbook pro.

It was a totally fresh Ubuntu machine, I ran the following commands:

apt install snapd
sudo apt update
sudo apt install snapd
snap install go --classic
snap install node --classic
snap install protobuf --classic
curl https://get.starport.network/starport! | bash
apt install git
git clone https://github.com/fivesixnine/splash
starport network chain create 59splash9
mkdir ~/go
export PATH=$PATH:~/go/bin
export GOPATH=~/go
starport network chain create 59splash9 # This works
starport network chain join 59splash9 # we hang here
fadeev commented 3 years ago

@ilgooz @ltacker when you have the time, let's try to debug this 🙏

faddat commented 3 years ago

Suggest that we launch a chain together, without gitpods and on cheap whatever-boxes.

Actually as these things go, hetzner.de is pretty good, think Contabo or https://www.lowendtalk.com/ class machines.

But the thing that has me puzzled is that they've all got public ipv4's so that shouldn't be the issue.

faddat commented 3 years ago
appd keys add

Can be used to check if this is a go1.16 related issue with os.keyring

faddat commented 3 years ago

I can confirm that this is not a Go version issue:

go version
go version go1.16 linux/amd64
starport version
starport version v0.13.2-79-gfbb381e linux/amd64 -build date: 2021-03-07T15:27:46
git object hash: fbb381e64f213c486258dbeacfd66946487593ed

Any thoughts?

PS:

On the same machine....

 gaiad keys add chicken
Enter keyring passphrase:
Re-enter keyring passphrase:

- name: chicken
  type: local
  address: cosmos1fcm48njv588y8v0a7vhsrp6e7ecdvvk2ex2x6s
  pubkey: cosmospub1addwnpepqtuf5naqe56rnl70yw5yzr28xpzdpfk4mxxwfu98hc2fp05fvlescscx3c8
  mnemonic: ""
  threshold: 0
  pubkeys: []

that works successfully.

faddat commented 3 years ago

I've gotten feedback from two users that this is resolved-- at least in this environment:

https://megadrive.blurt.foundation/cryptopie/

Cryptopie is the Blurt Raspberry Pi image.......

but

It is also a starport development environment, and the feedback is that we're good to go. I'll re-open this issue if we begin experiencing issues again.

Context:

Blurt is branching out into Splash, which will be airdropped (stake-dropped technically) on holders of Blurt and WLS. In order to avoid key issues, users will simply send a small amount of BLURT or WLS to the account "freewilly".

Whaleshares is a very, very simple blogging blockchain with no reward pool, just tipping. Splash will mainly resemble Whaleshares economically.

https://youtu.be/02VJXEz6M5c?t=97

Video context:

Willy, the Whaleshares whale, jumping to the free waters of a better consensus mechanism and independence from exchanges.

alexanderbez commented 3 years ago

Why was this closed? I'm experiencing this on the latest 0.14 version w/ Go 1.16.x.

faddat commented 3 years ago

Hm. I closed it because I was no longer able to replicate it, nor were the folks in the splash community.

What operating system were you using?

For us, things improved when I moved to the latest Arch Linux. I was also building starport from scratch.

alexanderbez commented 3 years ago

This is a droplet on DO. Specs:

8 GB Memory / 4 Intel vCPUs / 160 GB Disk / NYC3 - Ubuntu 20.04 (LTS) x64

I've tried Go 1.15.x and 1.16.x

faddat commented 3 years ago

Mind using nvm to install node.js like

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

nvm i node

and then compiling starport like:

git clone https://github.com/tendermint/starport
cd starport
make install

?

I am very curious if that'll resolve the issue.

When it started working for the splashers, thing is, we did not know why it started working again.

alexanderbez commented 3 years ago

I installed starport via the install script. Do i really need to manually install node and compile from source just to get this to work?

But if you're confident that will fix it, I will give it a shot.

faddat commented 3 years ago

I am not certain that this will fix the problem; instead I am trying to make a determination of exactly where the problem is.

When it began working for members of the splash community, we did not know why it began to work.

If it works with the setup that I mentioned above, then we've probably made a determination that the current code in the development branch has resolved the issue.

alexanderbez commented 3 years ago

@faddat what version of node.js should I attempt to install?

alexanderbez commented 3 years ago

Installed nvm and node.js 14.16.x

lumtis commented 3 years ago

When trying on Ubuntu, I directly have the keyring prompt. If it hangs and never shows this prompt, it should be a problem with the os keyring

4656514
lumtis commented 3 years ago

It's not directly a problem from using os keyring (because you can create an account for spn) but when using os keyring with the for a command run with the cmdrunner package (appd keys add) it seems there is an issue for certain machine with the stdin not being read

lumtis commented 3 years ago

FYI: A specific keyring backend can be specified when using the join command (so the created account for the blockchain to join will be stored with this keyring backend).

This should prevent the hanging issue to happen: starport network chain join [name] --keyring-backend test --nightly (using develop branch)