You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment MerkleProof hard-codes ics23::HostFunctionsManager as
generic argument to ics23::verify_membership and
ics23::verify_non_membership functions. That manager implements all
necessary methods using crates.
However, on platforms where syscalls are provided for calculating
hashes this is wasteful and in fact may lead to program failure due
execution time limits.
I’m specifically talking about Solana. We're hitting compute units
limits when trying to verify proofs. Solana offers syscalls for hash
functions which execute naively by the runtime and thus consume less
compute units. But as described above there’s no way for us to use
those syscalls in ibc-rs since it just assumes HostFunctionsManager.
Proposal
Make MerkleProof proof generic on the ics23::HostFunctionsProvider and
expose that configuration to the users of deliver function. I don’t
know what’s the best option of achieving that to be honest.
The text was updated successfully, but these errors were encountered:
mina86
changed the title
FR: Allow customising HostFunctionsProvider in MerklePRoof
FR: Allow customising HostFunctionsProvider in MerkleProof
Apr 2, 2024
Feature Summary
At the moment MerkleProof hard-codes ics23::HostFunctionsManager as
generic argument to ics23::verify_membership and
ics23::verify_non_membership functions. That manager implements all
necessary methods using crates.
However, on platforms where syscalls are provided for calculating
hashes this is wasteful and in fact may lead to program failure due
execution time limits.
I’m specifically talking about Solana. We're hitting compute units
limits when trying to verify proofs. Solana offers syscalls for hash
functions which execute naively by the runtime and thus consume less
compute units. But as described above there’s no way for us to use
those syscalls in ibc-rs since it just assumes HostFunctionsManager.
Proposal
Make MerkleProof proof generic on the ics23::HostFunctionsProvider and
expose that configuration to the users of deliver function. I don’t
know what’s the best option of achieving that to be honest.
The text was updated successfully, but these errors were encountered: