-
Notifications
You must be signed in to change notification settings - Fork 7
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
research: provide Osmosis Hook/ICS27 contract packet calls #111
Comments
@dhruvja are you aware of some no_std crate to handle manipulation with borch encoded instructions? |
Not that i am aware of. I can ask in the discord if anybody knows it over there. |
Still wondering on how you would know which accounts are required by the sub program you would be calling? |
relayer will parse memo instructions. instructions tell accs read and write. relayer passes these to ibc contract. ibc send these to hook trait as vec. trait impl picks relavn accs if it needs. but fun thing is, that ix already contain all accs. so really do nothing. so relayr must tx these as rest of input array. just it. |
Would u be sending the accounts in the order the program expects? |
sorted. jusr grab all accas from all instructions and sort. use highest priviledge, like write if it is write on any. |
so i not sure if it is needed, but seems it is root to grow cvm(evm analog) |
Right right, we can try and test this once the bridge is up because i still doubt the order of the accounts depends on how the program is written. |
invoke program on chain does picks axcpunts automatically as written in ix. but accounts must be sent by relayer. and only ix of relayer cares order. |
but, in order to write conditional instructions, i mean assemle instructions on the go, need sorted array of possible. accounts depending on ifs in cvm. |
|
it seems okey. just provide set of account infos to |
Cool, that makes sense. |
is it required #104 for this? did you tried just array for accounts info in the end for macro? i guess it will be expanded |
Dzmitry Lahoda #111 feat: provide Osmosis Hook/ICS27 contract packet calls // all accounts from instuctions must be passed to client TX Dzmitry Lahoda #457 feat(solana): manual instruction ls accounts propagation to cross chain calls #84 research: cross chain transactions gas fees #1019 FR: Allow binary data in ibc::apps::transfer::types::Memo Dzmitry Lahoda |
provide ICS20 memo packet handler and/or ICS27 handler contract, so
that it calls host function to find out what program accounts to propagate as part of its execution to subpogram calls
there are 3-4 ways (and slight modifications of these) to do cross chain calls over IBC.
one suggested
https://github.com/osmosis-labs/osmosis/tree/main/x/ibc-hooks
so
memo
istrim spaces, json escape = like in cosmos.
memo handling is part of TX - so if it is not up to ibc-hooks rules -i fails tx
caller/payer account is derived account from channel + sender, as on other chains. that sender receives funds
so sender side MUST know how to form proper caller to produce instructions.
because solana has depth 4 of contracts calls, suggestion is to use traits to implement app stack on solana with and without hook. do not do 2 contracts, as it will eat one program call level.
all ics 20 assets transferred to ibc hook derived account (transfer/channel/sender), it is up to sender to enode SPL or sol transfer as part of instuctions downsteam.
optimizations
accounts in instructions are copied several times, compression or map? nope. why solana does not that already?
and it leads to custom format, so cannot just send borch Vec bytes but some custom format.
Sure until there is cute no_std lib which handles all of that
caller is placeholder
in theory caller account may be placerholder, so that can plug it on relayer side, but that would require ibc and relayer aware of such possibility. not sure if it is good.
not json
who will maintain ibc-go/ibc-apps forks?
The text was updated successfully, but these errors were encountered: