Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(transfer): Cannot send namespaced IBC denom using slashes #1446

Closed
3 tasks
fedekunze opened this issue May 27, 2022 · 3 comments · Fixed by #1451
Closed
3 tasks

bug(transfer): Cannot send namespaced IBC denom using slashes #1446

fedekunze opened this issue May 27, 2022 · 3 comments · Fixed by #1451
Assignees
Labels
20-transfer type: bug Something isn't working as expected

Comments

@fedekunze
Copy link
Contributor

Summary of Bug

#894 wasn't fully resolved as ParseDenomTrace still assumes no slashes on the raw IBC denomination. Sending an erc20/ prefixed denomination from Evmos

evmosd tx ibc-transfer transfer transfer channel-7 osmo1anwz9u6nrtq20rumr0hhmgx48j29wakt9wle3f   "1000000000000000000erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA" \
--fees 80atevmos --from hot2 \
--node="https://tendermint.bd.evmos.dev:26657/" --chain-id evmos_9000-4 -b block

results in

raw_log: 'failed to execute message; message index: 0: 87AAE606C6372DE2C90C3D88B29CE730D9282D95F3238D2CD71D57B43576A3BD:
  denomination trace not found'

The bug is in this line: transfer/types/trace.go#L36

Version

main / v3 (latest)

Steps to Reproduce

  • Send the transaction from Evmos testnet as defined above, or
  • Add a unit test on TestParceDenomTrace using erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA or gamm/pool/1 as base denom
--- FAIL: TestParseDenomTrace (0.00s)
    /Users/federico/ibc-go/modules/apps/transfer/types/trace_test.go:26: 
        	Error Trace:	trace_test.go:26
        	Error:      	Not equal: 
        	            	expected: types.DenomTrace{Path:"transfer/channelToA", BaseDenom:"erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA"}
        	            	actual  : types.DenomTrace{Path:"transfer/channelToA/erc20", BaseDenom:"0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA"}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,4 +1,4 @@
        	            	 (types.DenomTrace) {
        	            	- Path: (string) (len=19) "transfer/channelToA",
        	            	- BaseDenom: (string) (len=48) "erc20/0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA"
        	            	+ Path: (string) (len=25) "transfer/channelToA/erc20",
        	            	+ BaseDenom: (string) (len=42) "0x85bcBCd7e79Ec36f4fBBDc54F90C643d921151AA"
        	            	 }
        	Test:       	TestParseDenomTrace
        	Messages:   	trace info

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@fedekunze fedekunze changed the title Cannot send namespaced IBC denom using slashes bug(transfers): Cannot send namespaced IBC denom using slashes May 27, 2022
@fedekunze fedekunze changed the title bug(transfers): Cannot send namespaced IBC denom using slashes bug(transfer): Cannot send namespaced IBC denom using slashes May 27, 2022
@fedekunze fedekunze added type: bug Something isn't working as expected 20-transfer labels May 27, 2022
@AdityaSripal
Copy link
Member

Is this error returned on the sender chain? ParseDenomTrace does not get called in SendTransfer

@crodriguezvega
Copy link
Contributor

Is this error returned on the sender chain? ParseDenomTrace does not get called in SendTransfer

It gets called here.

@AdityaSripal
Copy link
Member

Ahh very nice, this is an issue on the frontend.

Ok, we should fix this and verify sending and receiving end at the same time. The receiving end is definitely broken as well.

https://github.com/cosmos/ibc-go/blob/main/modules/apps/transfer/keeper/relay.go#L235

We should make sure to manually test the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
20-transfer type: bug Something isn't working as expected
Projects
Archived in project
3 participants