-
Notifications
You must be signed in to change notification settings - Fork 91
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
[ICS07] Detach verifier
field from Tendermint ClientState
struct
#979
Comments
For the methods included as part of the new These would include:
Are there other methods that are appropriate to be added to this new trait? |
Indeed, the verifier is invoked within these two methods. pub trait TmVerifier {
type Verifier: tendermint_light_client_verifier::Verifier;
fn verifier(&self) -> Self::Verifier;
}
impl TmVerifier for ClientState {
type Verifier = ProdVerifier;
fn verifier(&self) -> Self::Verifier {
ProdVerifier::default()
}
} However, I am uncertain about the optimal strategy. Ideally, default implementors should not be required to introduce additional elements. At the top, we might require to set a |
So depending on the underlying verifier that is used, it might be called at different points during the flow of |
Still the |
The approach you outlined works well for any hosts that are fine with utilizing the default |
That's exactly why I was not sure if that was the optimal approach. It makes anyone seeking a custom verifier re-implement all the |
I'm a bit confused on why all of the |
Overview
Relevant Context: #958
The current Tendermint
ClientState
struct includes averifier
field that serves as a handle for calling underlying verification functions. This design, while functional, poses challenges in terms of consistency with the proto-generatedClientState
struct and hinders the support for customized header/misbehaviour verifications as requested here.Proposal
Ideally, Tendermint clients should implement a
Verifier
trait with averifier
method to give callers a handle and an associated type so they can determine underlying ed25519 verifier implementation. We can then provide a built-in/standard implementation of our interfaces on the TendermintClientState
struct, utilizing the defaultProdVerifier
, which is intended for the majority of users who would typically import it. Though, still projects would have the flexibility to opt for a more cost-effective verifier implementation of their choice.How to get our design there:
ClientState
with default ProdVerifierClientState
struct can be easily re-implemented by users requiring customized verification.The text was updated successfully, but these errors were encountered: