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

Refactor send_tx-related methods into plain functions #1975

Closed
5 tasks
soareschen opened this issue Mar 17, 2022 · 0 comments · Fixed by #2044
Closed
5 tasks

Refactor send_tx-related methods into plain functions #1975

soareschen opened this issue Mar 17, 2022 · 0 comments · Fixed by #2044
Assignees
Labels
I: logic Internal: related to the relaying logic I: rpc Internal: related to (g)RPC O: code-hygiene Objective: cause to improve code hygiene O: performance Objective: cause to improve performance
Milestone

Comments

@soareschen
Copy link
Contributor

soareschen commented Mar 17, 2022

Summary

The method CosmosSdkChain::send_tx() method is tightly coupled with the CosmosSdkChain struct, with deeply nested method calls. This makes it challenging to use the functionality without spawning the entire relayer. This is because the construction of CosmosSdkChain is not straightforward, and involves a lot of indirection through other structures such as ChainHandle and ChainRuntime.

This complication is the main reason why ibc-test-framework currently performs token transfer by calling the gaiad command, because the current design of send_tx() does not allow such simple functionality without a ChainHandle. However since ChainHandle is configured with a global wallet that cannot be changed, this presents challenges of reusing the same ChainHandle to perform transfer for different wallets.

Moving forward, if we want to improve the relayer performance by parallelizing the query operations and send_tx operations, it is also necessary to do this refactoring so that they do not end up in the same struct CosmosSdkChain.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@soareschen soareschen added this to the v0.14.0 milestone Mar 17, 2022
@adizere adizere added I: logic Internal: related to the relaying logic O: code-hygiene Objective: cause to improve code hygiene O: performance Objective: cause to improve performance I: rpc Internal: related to (g)RPC labels Mar 29, 2022
@adizere adizere modified the milestones: v0.14.0, v0.15.0 Mar 29, 2022
@adizere adizere modified the milestones: v0.15.0, v0.14.0 Apr 5, 2022
@adizere adizere added the P-high label Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: logic Internal: related to the relaying logic I: rpc Internal: related to (g)RPC O: code-hygiene Objective: cause to improve code hygiene O: performance Objective: cause to improve performance
Projects
No open projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

2 participants