cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: introduce node command

Open tbruyelle opened this issue 3 years ago • 8 comments

Fix #2489

This PR continues the work of #2539. An other PR was required because the original branch was from an other repo.

What I did so far :

  • rebase on develop (fixed a bunch on conflicts)
  • finish @ilgooz refac on integration tooling
  • fix node command integration tests
  • fix spinner display in node command that hides the os keyring passphrase prompt. The problem exists because a spinner is displayed as soon as cliui.New() is invoked. Maybe other commands are impacted. c66131f
  • revamp the bank send toAccount fromAccount impl so it doesn't need the --from flag and accepts both account name or address.
  • fix broadcast error message. There was an old mention of SPN 6fe217f
  • add --fees flag (required for tx on cosmos-hub apparently) cb4ab7c
  • add --broadcast-mode flag to let the user change it to sync, to avoid timeouts when the requested node is too busy e3b92cf5cc59a2a388d8b87027eeabac7c8f6900
  • Tested node q bank balances and node tx bank send with cosmos-hub account (see latest txs of https://www.mintscan.io/cosmos/account/cosmos1k2m58vv732yjrs6pnhaf3ar8dtwdql5mlcv478)
  • Integration tests: replace time.Sleep in favor of new method app.WaitNBlocks()

Kudos to @bjaanes who did the major part of the work!

tbruyelle avatar Jul 27 '22 14:07 tbruyelle

Should we split down this PR to parts for ex:

  • changes for cosmosclient
  • changes for integration pkg api
  • ... maybe more?
  • finally we can merge this PR to add node cmd feature and its integration tests

ilgooz avatar Jul 29 '22 14:07 ilgooz

Should we split down this PR to parts for ex:

  • changes for cosmosclient
  • changes for integration pkg api
  • ... maybe more?
  • finally we can merge this PR to add node cmd feature and its integration tests

The cosmosclient changes are nested with the previous changes of the original PR, so that's complicated... I can try!

tbruyelle avatar Jul 29 '22 14:07 tbruyelle

we don't need to worry much about this I think if it requires a ton of work, I'm in favor of not splitting

ilgooz avatar Jul 29 '22 14:07 ilgooz

Visit the preview URL for this PR (updated for commit 8af2605):

https://ignite-go-docs--pr2669-issue-2489-node-bank-aivug5xs.web.app

(expires Mon, 29 Aug 2022 08:31:15 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

github-actions[bot] avatar Aug 11 '22 10:08 github-actions[bot]

Can we resolve the existing conflicts? Reviewing now

aljo242 avatar Aug 12 '22 13:08 aljo242

All commands fail with the default flag as https://rpc.cosmos.network with the following error:

post failed: Post "https://rpc.cosmos.network": dial tcp: address rpc.cosmos.network: missing port in address

Commands work if i use --node https://rpc.cosmos.network:443 so I think we just need to add the proper port.

aljo242 avatar Aug 12 '22 13:08 aljo242

All commands fail with the default flag as https://rpc.cosmos.network with the following error:

post failed: Post "https://rpc.cosmos.network": dial tcp: address rpc.cosmos.network: missing port in address

Commands work if i use --node https://rpc.cosmos.network:443 so I think we just need to add the proper port.

I can't reproduce the problem on my side, but I have noticed it sometimes ago with an other node, so let's add it 10bd29e2

tbruyelle avatar Aug 12 '22 14:08 tbruyelle

LGTM - just a formatting suggestion

aljo242 avatar Aug 13 '22 15:08 aljo242

Tried to update the branch and created a merge error - my bad

Fixed 3fa6677

aljo242 avatar Aug 16 '22 13:08 aljo242