-
Notifications
You must be signed in to change notification settings - Fork 80
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
FR: Allow custom verifier in ibc::clients::tendermint::types::ClientState #1078
Comments
Totally makes sense. We've also got the same request in #979. We might prioritize this. |
@mina86 Could you give us a pointer or a bit more context on this? What's the argument about? why is it necessary? That would be helpful. |
The way verification works in Solana is that client (who sends the transaction into the block) sends a transaction in which it calls two programs: a system one doing signature verification and the actual smart contract. The smart contract then looks at the transaction it belongs to and checks whether the call to the signature verification program exists in it. The issue is that to perform that check, the smart contract needs a special object (an Instruction sysvar program account). You can think of it like verification happening in hardware and the verification code needs some handler to access that hardware. The second issue is that Solana smart contract cannot have global mutable state, so it’s not possible to set that object in one place in the code and than retrieve it in another. |
Hi @mina86, just wanted to bring to your attention that the Let us know if anything about this is unclear 🙂 |
If I understand correctly, I have to implement |
Yes, that's correct. We decided to maintain the happy path of opting for the default |
If it's an important enough use-case, we could look into designing a proc macro that would generate a lot of the client state boilerplate for those looking to introduce a custom verifier. |
Feature Summary
At the moment
verifier
field inibc::clients::tendermint::types::ClientState
is hard coded to be tendermint’sProdVerifier
. That type implement signature verification using Rust implementation of Ed25519. However, this doesn’t work for Solana where signatures need to be verified using Solana-specific code.As an aside, the actual implementation of verification on Solana is more complex than just replacing a stateless function (specifically to verify state an extra argument needs to be passed to the verifier) but I could live without addressing that.
Proposal
Make
ibc::clients::tendermint::types::ClientState
generic on the verifier type.The text was updated successfully, but these errors were encountered: