-
Notifications
You must be signed in to change notification settings - Fork 215
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
feat: implement .transfer
on CosmosOrchestrationAccount
#9882
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ab95b23
feat: get timerBrand from currentTime TimestampRecord
0xpatrickdev ee8b806
feat: simplify transferChannel lookup
0xpatrickdev 4d57f81
chore: ibc/applications/transfer/v1/tx.js in package exports
0xpatrickdev cbe876b
feat: parseOutgoingTxPacket test util
0xpatrickdev 02cb704
feat: guard orchAccount.transfer opts
0xpatrickdev ed5998f
feat: export createMockAckMap helper
0xpatrickdev 6a90c4c
refactor: simplify sendPacket switch statement
0xpatrickdev 8f4fe48
refactor: use SIMULATED_ERRORS const
0xpatrickdev b1fdde1
feat: add transfer method to CosmosOrchestrationAccount
0xpatrickdev 1e5f500
feat: ensure mock lca address is unique
0xpatrickdev b88db1e
feat: LocalOrchestrationAccount Transfer invitation
0xpatrickdev 3481ec5
types: opts: IBCMsgTransferOptions are optional
0xpatrickdev 9567d1c
refactor: simplify stakeIca proposals
0xpatrickdev e3ce160
refactor: rename ibc/mocks.ts
turadg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,6 +120,7 @@ classDiagram | |
redelegate() | ||
send() | ||
sendAll() | ||
transfer() | ||
undelegate() | ||
withdrawReward() | ||
} | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Thinking on this more, I suspect the relayer could also be delayed. Any harm in making this
ackLater
?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.
Seems like a trade-off. IIRC:
sendPacket
message could have an immediate failure before leaving the local node (i.e. just over the bridge) or after a reply from a relayer.If (2) is false, then let's distinguish.
If (2) is true then we have to pick the better way to handle both. The pro of ackLater is that it let's us test doing other work before the ack arrives. The con is that it's something someone could forget in a test, and even when they don't it's more work.
The other immediate con is that it may break some tests and need fixing.
I don't have a strong stance on which is better. Whatever infidelity you choose, please leave a comment explaining the decision.
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.
Thinking on this more, I also don't have a strong stance. It seems the main benefit of
ackLater
is to allow us to control timing in the test context.ackImmediately
seems like a sensible default, as someone can always choose to supply a mock to the bridge that will useackLater
.Nonetheless, sharing some thoughts/findings to your question -
Correct, the sendPacket handler can fail via ReceiveSendPacket before leaving agoric golang and going out to a relayer.
It seems this might only fail if an invalid
sourcePort
andsourceChannel
are provided. I'm not sure whenibc.js
ornetwork.js
would allow this since.downcall()
is heavily guarded with ocaps + closures - the only thing coming to mind is bad state where a channel is closed but ibc/network are unaware.