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

ics27 controller API review #753

Closed
3 tasks
damiannolan opened this issue Jan 18, 2022 · 6 comments · Fixed by #786
Closed
3 tasks

ics27 controller API review #753

damiannolan opened this issue Jan 18, 2022 · 6 comments · Fixed by #786

Comments

@damiannolan
Copy link
Contributor

Summary

As we move towards a beta-1 release of interchain accounts I think we should take a moment to review the API exposed to authentication module developers via the controller submodule. When we finalise a release these APIs become harder to change, if not impossible to change without causing disruptions. Raising this issue to open a discussion on this and make a proposal.

Proposal

Rename both functions exposed to authentication module developers.

InitInterchainAccount -> RegisterInterchainAccount

Originally I believe this was named InitInterchainAccount as it is initialising a channel handshake by creating and routing a new MsgChannelOpenInit via the sdk's msg service router. I propose we rename this to RegisterInterchainAccount as essentially its implicit that we are using ibc and channel creation should be opaque from the user's perspective. This function is part of the controller submodule and as such, there is no naming collision with RegisterInterchainAccount in host, in my opinion it aligns nicely.

TrySendTx -> SendTx / ExecuteTx

We should remove Try from the function name here. I think this implies that something could often go wrong on packet execution, when in reality we want all valid packets to succeed. Try is a word seen commonly with error handling syntax and libraries and with that in mind I think it makes a clearer API to just remove it from the function definition.
I propose either SendTx or ExecuteTx. The latter aligns with the enum naming of Type used in InterchainAccountPacketData, but I don't feel particularly strongly in favour of either.

Thoughts on this?


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@crodriguezvega
Copy link
Contributor

My vote goes for RegisterInterchainAccount and SendTx

@crodriguezvega crodriguezvega moved this to Backlog in ibc-go Jan 18, 2022
@crodriguezvega crodriguezvega moved this from Backlog to Todo in ibc-go Jan 18, 2022
@damiannolan
Copy link
Contributor Author

My vote goes for RegisterInterchainAccount and SendTx

+1 from me, they would be my preference

@colin-axner
Copy link
Contributor

+1 on SendTx

RegisterInterchainAccount sounds fine with me. I'm interested in potentially other suggestions?

@colin-axner
Copy link
Contributor

Food for thought: BeginInterchainAccountCreation()

@seantking
Copy link
Contributor

+1 on SendTx

I will ponder on the RegisterInterchainAccount suggestion. Maybe it's totally fine.

I am just hesitant to hide all the magic we are doing with channel creation behind the Register concept.

@seantking
Copy link
Contributor

Food for thought: BeginInterchainAccountCreation()

This is interesting.

@colin-axner colin-axner added this to the Interchain Accounts milestone Jan 21, 2022
@seantking seantking mentioned this issue Jan 25, 2022
9 tasks
@seantking seantking self-assigned this Jan 25, 2022
@seantking seantking moved this from Todo to In review in ibc-go Jan 25, 2022
Repository owner moved this from In review to Done in ibc-go Jan 27, 2022
faddat pushed a commit to notional-labs/ibc-go that referenced this issue Feb 23, 2022
GH Action includes:
- check for lint errors
- check for backward compatibility breaking changes

Migrated buf config files from v1beta1 to v1 using command:
'buf config migrate-v1beta1'
(https://docs.buf.build/configuration/v1beta1-migration-guide)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants