cosmos / relayer-archive

An example of a server side IBC relayer to be used for Game of Zones and beyond
56 stars 31 forks source link

UX Improvements #49

Closed jackzampolin closed 4 years ago

jackzampolin commented 4 years ago

This PR adds the ability to do basic config management using the CLI:

# list all configured chains
relayer chains list

# interactively prompts user, then modifies config with the validated chain connection
relayer chains add

# removes a chain from the config
relayer chains delete [chain-id]

# lists all configured paths
relayer paths list

# interactively prompts user, then adds path to the list of paths
relayer paths add

# generates some random identifiers then writes those into a new path between chains 
relayer path add-rand [src-chain-id] [dst-chain-id]

# removes a path from the config
relayer path delete [index]
jackzampolin commented 4 years ago

Working on relayer init as well. Have the chain config pieces wrapped up mostly. Moving on to the path mgmt next.

cwgoes commented 4 years ago

The full-path command seems to run several steps twice, at least when I test locally:

I[2020-03-12|12:51:35.224] Downloading trusted header using options     
I[2020-03-12|12:51:35.351] Downloading trusted header using options     
I[2020-03-12|12:51:41.904] tx.hash=2129C60E104EEF3F907F6E14D258A6EDB28620E2D3BA5C13854D7E73F34BEBE8 chain=ibc0 action=create-client
I[2020-03-12|12:51:46.905] tx.hash=33CEC930542DB49B097CA02958CCB91D71F65303F935B1CE236246D65AE95179 chain=ibc1 action=create-client
I[2020-03-12|12:51:51.900] tx.hash=210C66F4EBC12C74A93F3DBA61C35A0359360EBC69DDA27535B20938CCEA3963 chain=ibc0 action=connection_open_init
I[2020-03-12|12:52:01.936] tx.hash=5FAC188A5305595B7D8ED78B8487ED0B3F67C8C7CBBB3FF59E35A0158ADC3A1A chain=ibc1 action=connection_open_try
I[2020-03-12|12:52:11.951] tx.hash=6EC38EB690BCF1748FC2535E539914F28E088C8479E6F2EE04864C7D42A79A20 chain=ibc0 action=connection_open_ack
{"height":"11","txhash":"BCA1A188384C8A766C9727A32D3B2E8708FFEB5996C32E03134116187E5F557C","codespace":"connection","code":5,"gas_wanted":"200000","gas_used":"102319"}
I[2020-03-12|12:52:21.963] tx.hash=BCA1A188384C8A766C9727A32D3B2E8708FFEB5996C32E03134116187E5F557C chain=ibc0 action=connection_open_ack
I[2020-03-12|12:52:31.983] tx.hash=3C56B68657F869934C5A6DCFB635368FFCEE1FC554B2956AC5B21BF71BD14BAE chain=ibc1 action=connection_open_confirm
{"height":"15","txhash":"BA4109A013C1D9C96B55F4CFDCCBE727AF1AB5222B75CD03F22218C2829E132A","codespace":"connection","code":5,"gas_wanted":"200000","gas_used":"93619"}
I[2020-03-12|12:52:41.981] tx.hash=BA4109A013C1D9C96B55F4CFDCCBE727AF1AB5222B75CD03F22218C2829E132A chain=ibc1 action=connection_open_confirm
I[2020-03-12|12:52:52.000] tx.hash=5A2FB6CB238F1B178B1FA5D6C557986B031E3CB34CC0949A664DA70C45DA2206 chain=ibc0 action=channel_open_init
{"height":"19","txhash":"B03EABDE9849A16E28CAF337813494910BDB53C54E715D75A4FC37177137C4DA","codespace":"channels","code":1,"gas_wanted":"200000","gas_used":"45283"}
I[2020-03-12|12:53:02.010] tx.hash=B03EABDE9849A16E28CAF337813494910BDB53C54E715D75A4FC37177137C4DA chain=ibc0 action=channel_open_init
I[2020-03-12|12:53:12.016] tx.hash=25BB707B8FFE35F9670DDD89CFBAEBD8F559D15A177495BB8D39C28D1AC2D078 chain=ibc1 action=channel_open_try
I[2020-03-12|12:53:22.040] tx.hash=A74663D3A76F2F98262B9934998CB50A6CF114DF8C0735696CDA5C5146AC420B chain=ibc1 action=channel_open_try
I[2020-03-12|12:53:27.034] tx.hash=937F0FDDA4294F46C386D2056513DE603326F18AD50EC5106A42828509618CBA chain=ibc0 action=channel_open_ack
I[2020-03-12|12:53:42.071] tx.hash=320018215F8FBC2C60029C0E4D23898B1AC9F093DB8BF863D89011FCDA9102DA chain=ibc1 action=channel_open_confirm
{"height":"29","txhash":"AD2CDBB17984A80DED4942683E0BC12D8A72A37CFBD622822C2BBE7F91806E20","codespace":"channels","code":4,"gas_wanted":"200000","gas_used":"93726"}
I[2020-03-12|12:53:52.084] tx.hash=AD2CDBB17984A80DED4942683E0BC12D8A72A37CFBD622822C2BBE7F91806E20 chain=ibc1 action=channel_open_confirm

It does retry & the connection & channel seem to be set up correctly at the end though.

jackzampolin commented 4 years ago

TODO:

Blocking merge

Stretch/room for contributions

I've opened issues for all of the below 👇

Need to create issues for some of those stretch ones too ☝️