-
Notifications
You must be signed in to change notification settings - Fork 381
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
ICS-27 Revision #564
Comments
I guess the easiest thing to do is to open a PR with the agreed-upon changes and take it from there. |
I agree, ordered channels should not be used by multiple mutually distrusting actors, in general. In the future, when IBC supports something like #550, different accounts could have logically separate ordering on a single channel, which would address most of the concerns here I think. |
Also, the initial ics-27 spec assumes that the The primary goal here is to get a minimalist interchain-account module onto the hub, that allows for chains to register and control accounts on the hub. Seeing as this is the case isn't the following (described in the spec) unnecessary for the core interchain account module?
You can see how this is imeplemted here and here Seeing as this can now be handled outside of the core interchain account module we should simply define what the receiving functionality should look like and describe the expected packet structure etc. A chain that wants to register an account on another chain should handle the logic to create outgoing packets and also handle the logic to create a new port per user & channel (ordered) creation. |
Re: Channel Ordering I think there is consensus here. Update the spec to require ordered channels which use one account per channel. It should be noted that a future version of the specification will use #550. We can use the ICA version to indicate this. Re: cosmos sdk specific details I'm curious to hear @cwgoes thoughts, but details such as how to decode a message being sent to an SDK chain should be added as ICS 27 SDK spec. I think in general this file should only require information needed for successful ICS 27 communication. Particularly information the counterparty or a relayer might need to successfully construct an IBC packet that can be understood once relayed. I'm not aware of anything outside of how to encode/decode the message which would be required. We should not define the actual message types. Just that it should be an encoded
|
In general, I think SDK-specific details should not be included in the ICS specifications. There are cases where this is a bit awkward - this case of interchain accounts, because the content of the messages is chain-specific, and also client recovery via governance, which is quite complex but not specified here because it is specific to the SDK governance system. I think this clear separation is worth maintaining - but we should be careful to clearly specify the SDK-specific parts in the SDK repository internal documentation. |
I guess the packet data decoding spec for SDK can be linked in the example implementation section. I think client recovery definitely doesn't need to be specified here as it is self contained in the ibc-go implementation (relayers or counterpartys need not implement any functionality to support it) |
These are 2 things I miss a lot in the current repo. They have great abstract specs, but actual details to implement it byte-for-byte compatible with another sdk implementation, as well as the higher level user stories are very valuable. Simply saying "put them somewhere else" is a bit too dismissive in my eyes. Let us define a proper place for them and start requiring them for all new specs (and backporting them for old ones). Many good devs say the spec is almost unapproachable as the actual goal and constraints are never clearly communicated. I think this re-write of ICS27 to include such information is great and should be supported. |
As to the questions directly
|
I was thinking about writing an ADR outlining the cosmos-sdk implementation and maybe keeping this in the modules repo (potentially in ibc-go in the future?). But, I'm totally open to whatever is decided here, it would be nice to make a decision on this soon. I think we should agree on a protocol for this and then get moving:
I see @ethanfrey point about making these specifications more approachable by other developers, and I also understand the desire to keep the ics standards as abstract protocols. I think some decisions need to be made here. What does the future of interchain standards look like? In the PR I've made I have assumed we're keeping this on the abstract side of things with each chain-specific implementation having its own specification in another repo, but I'm happy to rewrite depending on what we decide here. |
I am happy to have them separate documents and any organization. |
My two cents: the documents in this repository should be sufficient for byte-to-byte compatibility & data exchange between IBC implementations - it should not be necessary to consult anywhere else. For the core standards, I think this is mostly the case - but if not, please file issues. The core standards, however, are not in any way specific to one SDK or implementation. Perhaps we should have a different policy for application-level standards (of which ICS 27 is one). One option is to just make ICS 27 Cosmos-SDK-specific, and if someone wants to implement interchain accounts for another SDK they will be required to write a separate ICS which specifies all the specific messages. I think this is actually fine, maybe it would be clearer. |
Continuing the conversation that has been ongoing here -> cosmos/interchain-accounts-demo#22
Issues that have been outlined thus far:
Channel Ordering:
At present, the specification does not outline how many accounts can be used/registered per channel.
The implementation here interprets the spec to mean that you can multiplex multiple accounts on a single channel namespaced via
{port-id}/{channel-id}/{salt}
.A potential actor vector with this approach can be described as follows (thanks @ethanfrey):
@okwme
You asked me earlier why can we not just say that the standard here (maybe defined in developer documentation somewhere) should be that relayers/client/helper module developers should only allow one account per channel. The problem is how can we enforce this? A user will always have to trust the client they are using, unless they are running their own relayer. In the short term, I guess this won't be a problem as we can communicate this to application developers who can enforce this in their own application logic. I guess longer term this would get messy.
Short term solution: 1 account per 1 ordered channel
Quoting @AdityaSripal
So I'm in favor of a single ORDERED channel dedicated to a single account for now, with partially ordered channels as an ideal upgrade that might happen in the 6+month time frame as ethan suggests.
This simplifies the packet data since we already know who the authorizer is whenever they send a packet through a channel.
We can just send the message bytes. The receiving chain already knows who the sender is because there can only be 1 SENDER address for that channel. So the receiving chain must simply check that the sender address of that channel is authorized to send the particular message(s) that are in the packet. NOTE: Signature checks still happen on sender chain, Application-dependent sender authentication still happens on receiving chain here.
My thinking is that the flow could look like this:
The current ICS27 spec does not define specific enough implementation details for a cosmos SDK chain
This makes sense as the interchain IBC specs are for defining generic protocols. The question is where should a Cosmos ICS27 spec be kept? Should this just be an ADR/Architecture document kept in the repo with the specific implementation? Maybe we can just update the spec defined here to have more information.
Agreed upon updates to the spec:
A complaint has been that the ics27 spec does not outline use cases and how this protocol can be used in the real world. Should we add a section for this?
Governance: @okwme
Smart Contracts: @ethanfrey
IBCAccount
/ibcaccount
toInterchainAccount
/interchainaccount
The text was updated successfully, but these errors were encountered: