Change denom trace parsing to use channel identifier #1698
Labels
20-transfer
type: refactor
Architecture, code or CI improvements that may or may not tackle technical debt.
Milestone
Summary
Change the denom trace parsing to use the channel identifier as opposed to the port string "transfer".
Problem Definition
ICS20 does not enforce the usage of "transfer" as the port string. Certain applications/chains may choose to use non-transfer port strings, thus causing the stored denom trace to be incorrect. One current example is cosm wasm ports use a non transfer string.
The IBC specification does not enforce the "channel-X" format for channel identifiers. Other IBC implementations may choose to use a different format causing the stored denom trace to be incorrect.
To correctly parse the base denomination from a single string, some splitting point must be used. Neither the channel identifier or the port identifier provide reliable sources. A longer solution fix should create a separate field for the base denomination. I suspect without a longer solution fix, other use cases which want to make use of the base denomination will also only be able to support a subset of users (either users who use the naming "transfer" for their port, or users who use the format "channel-X" for channel identifiers).
Proposal
Short term: Change the denom trace parsing to use the channel identifier rather than the port string. The current implementation uses the port to split, but all ibc-go implementations use the same channel identifier format, thus more users will be supported in the short term by splitting on the channel identifier.
Long term (followup issue): Create a separate field within the ICS20 packet for the base denom
For Admin Use
The text was updated successfully, but these errors were encountered: