-
Notifications
You must be signed in to change notification settings - Fork 332
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
ICS26 API requirements: deliver
versus dispatch
#450
Comments
Hi,
Good question. The short answer is: We were assuming that The long answer...
Indeed,
There is one main disadvantage to using There are two smaller disadvantage of preferring
Thanks for the pointers, they are very helpful. Looking at your code, then it seems your requirement could be to have an interface to ibc-rs as follows: pub fn deliver_datagrams<Ctx>(ctx: &mut Ctx, messages: Vec<Datagram>) -> Result<Vec<Event>, Error> where
Happy to provide further clarifications if these questions are not clear enough! ps. Thanks for your patience, it took us some time to respond because this was a slightly busier period. |
deliver
in "modules/src/ics26_routing/handler.rs"?deliver
versus dispatch
Thanks, Adi The interface is not a big problem.
For option 1, because neither prost::Any nor SCALE is defined by us, it will not work. At present, a workaround is wrapping a self-defined deliver(see below), looking forward to a better solution. Sending transaction: Receiving transaction: Also, for substrate, the signer in MsgCreateAnyClient will not be used, because substrate handles signing and verifying signatures. |
The wrapped deliver function: |
Thank you @adizere for the clarification. Here are some supplements.
As our current wrapped deliver, the
Atomicity of multiple messages is not a concern in our current development stage. We are still exploring solutions for the integration, will follow ibc-rs' update, and adapt our code accordingly. |
PS: could you add an issue label named "substrate-ibc"? it would be convenient to track the relevant issues, thank you |
hmm ... I realized that I can wrap a local related code: |
Hi @livelybug, I'm going to close this issue as per email response confirming this is not an issue anymore. |
Hello,
We are investigating how to integrate ibc-rs in substrate-ibc.
Here's a question about the functions
deliver
anddispatch
in "modules/src/ics26_routing/handler.rs".As both function
deliver
anddispatch
are public, may I say functiondeliver
is optional?Why such an assumption, because the function
deliver
's parametermessages: Vec<Any>
is encoded data and later decoded inside the same functiondeliver
.In a substrate's pallet, the corresponding functions in the same layer of "deliver", already have decoded parameter, you may refer to such a function here and below:
We plan to skip ibc-rs'
deliver
function and call ibc-rs'dispatch
function in "substrate-ibc", as below:It's appreciated if any advise.
Thank you
For Admin Use
The text was updated successfully, but these errors were encountered: