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

IBC TransferPacket Demo #46

Closed jackzampolin closed 4 years ago

jackzampolin commented 4 years ago

This picks up where the last debugging PR left off!

cwgoes commented 4 years ago

Pulled the upstream codec changes.

Now running

relayer --home /tmp/tmp.TxR1XReIG7 tx raw xfer ibc0 ibc1 ibconechan ibczerochan bank bank 10stake cosmos1j4lwntu00ltj9y3asp7ypndm7s6wrc7jvf9f8n

results in

{"height":"28","txhash":"C30382EB4EA5B2E0CC967EF0DBEEE7E72752AF9DB03EE6CAB88D72C971F55227","raw_log":"[{\"msg_index\":0,\"log\":\"\",\"events\":[{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"transfer\"},{\"key\":\"sender\",\"value\":\"cosmos1day7d56p0wvdt7th26d7tl8ksrahjdjmavxa5w\"},{\"key\":\"sender\",\"value\":\"cosmos1day7d56p0wvdt7th26d7tl8ksrahjdjmavxa5w\"},{\"key\":\"module\",\"value\":\"ibc_transfer\"},{\"key\":\"sender\",\"value\":\"cosmos1day7d56p0wvdt7th26d7tl8ksrahjdjmavxa5w\"},{\"key\":\"receiver\",\"value\":\"cosmos1j4lwntu00ltj9y3asp7ypndm7s6wrc7jvf9f8n\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta\"},{\"key\":\"amount\",\"value\":\"5000stake\"},{\"key\":\"recipient\",\"value\":\"cosmos17q3spjp3r9fesvedejv0ujtpl72hjp6nwhwq03\"},{\"key\":\"amount\",\"value\":\"10stake\"}]}]}]","logs":[{"msg_index":0,"log":"","events":[{"type":"message","attributes":[{"key":"action","value":"transfer"},{"key":"sender","value":"cosmos1day7d56p0wvdt7th26d7tl8ksrahjdjmavxa5w"},{"key":"sender","value":"cosmos1day7d56p0wvdt7th26d7tl8ksrahjdjmavxa5w"},{"key":"module","value":"ibc_transfer"},{"key":"sender","value":"cosmos1day7d56p0wvdt7th26d7tl8ksrahjdjmavxa5w"},{"key":"receiver","value":"cosmos1j4lwntu00ltj9y3asp7ypndm7s6wrc7jvf9f8n"}]},{"type":"transfer","attributes":[{"key":"recipient","value":"cosmos17xpfvakm2amg962yls6f84z3kell8c5lserqta"},{"key":"amount","value":"5000stake"},{"key":"recipient","value":"cosmos17q3spjp3r9fesvedejv0ujtpl72hjp6nwhwq03"},{"key":"amount","value":"10stake"}]}]}],"gas_wanted":"200000","gas_used":"72928"}
{"height":"0","txhash":"EC5D53668E94F69236EDEB5D4196C0F466D5E649F7726C1345346A8AD6E607DD","codespace":"host","code":1,"raw_log":"internal error"}

Looks like the first MsgTransfer is succeeding but the MsgRecvPacket is failing.

cwgoes commented 4 years ago

Back to the dreaded "internal error" again, I really wish we could fix this persistently.

For now I edited the local SDK code to remove the internal error override, now:

{"height":"0","txhash":"7ADAE3044FAC407CBBCAAE55EF52B9DA2B8538E3C10DA14E7F50228D09254EA2","codespace":"host","code":1,"raw_log":"invalid identifier: identifier  has invalid length: 0, must be between 10-20 characters"}

Looks like some sort of ValidateBasic()-related identifier error, trying to isolate further.

cwgoes commented 4 years ago

Full second transaction: https://gist.github.com/cwgoes/85773f1d6700637191eadcb5da0620d2

Looks like the client ID in the update client message is wrong.

cwgoes commented 4 years ago

Significant progress! Fixed a few identifier issues; now at:

{"height":"0","txhash":"28DC6D93BF7B5D9224BB6C24DE19C1BD3ECEB268B6F558997E83D3D991FB361D","codespace":"sdk","code":5,"raw_log":"insufficient funds"}