Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ADR 001: coin cross-chain transfer source tracing #6662
ADR 001: coin cross-chain transfer source tracing #6662
Changes from 18 commits
0833c55
6bca8df
13cf126
ca1de7e
3a9dc3e
5532428
82a30db
5abb1ed
a4fdab9
5ba6b58
2f69f4d
0dab556
7ebf21b
56d2b11
3ff4bb9
fbaf655
1954510
95199d5
38d99eb
d63f0c9
628ec72
33ba62e
80d76b0
8591fc3
1e8f02f
ae34c2c
4da7e85
18bc6ec
1560d6d
ed677ec
8e5c044
6d3b25f
152b2e1
e9ccb3c
295d93c
f35a843
54ee703
e66e0e3
dd564e8
a7f99d0
52b621b
ae3b4b3
b73908d
6fd5c19
810d517
a18409e
cdc1d66
88994bb
d3de242
f886641
e8d754f
c205a8d
877d67f
cadeacf
3a69288
a71be5c
7b882c4
226eb92
c0cab23
ea3655c
9a9b144
75a3eff
59363c1
18e86c1
2dcfff2
07b9ec0
cb4907f
c01d0da
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also check that
len(denomSplit) == 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will always be according to the
Split
godoc. Do you want me to add it as a safety check?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because I want to ensure that it is only one element and not more than that.
Otherwise a denomSplit
atom/notatom
will enter this conditional if the passed-in denom isatom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check length is expected here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do we know the trace is in the lookup table, what if i transfer for the first time from zoneA -> zoneB -> zoneC -> Hub. How would the Hub know the trace if it simply receives
ibc/tracehash/denom
from zoneC? Would it be extracted from the coin metadata?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it being set in
OnRecvPacket
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I think of it you are right. The app won't be able to retrieve the trace from the hash if it's received the first time. I'd propose adding an optional extra field to the
FungibleTokenPacketData
that contains theTrace
info for each coin in theAmount
field.Thoughts @cwgoes @AdityaSripal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems alright. Alternatively, we could require that the
Trace
is always provided and always hashed (instead of looking it up).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer Chris' approach personally. It would create a simpler implementation.
Otherwise the sending chain would have to "know" which traces the receiving chain has stored, so that it can sent the trace info along if the receiving chain doesn't have it.
We could do some sort of "resend with trace" logic based on whether the ack tells us if the receiving chain doesn't have the trace, but that seems unnecessarily complicated. Seems better to just always send unhashed trace in the packet data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea bump @fedekunze , I still think passing in full trace in packet is the way to go. Could you confirm a decision and put it in this PR, thanks!