ibc-rs icon indicating copy to clipboard operation
ibc-rs copied to clipboard

Follow-up for light client extraction PR

Open hu55a1n1 opened this issue 2 years ago • 0 comments

Summary

This is the follow-up issue for PR informalsystems/hermes#2483.

  • [ ] Use the downcast-rs crate - This will allow us to remove the AsAny and AsAnyMut code we currently have. It also provides a way for going from boxed trait objects to boxed concrete types without cloning, something that isn't possible with the current API. eg. Box<dyn ClientState> -> Box<TmClientState>.
  • [ ] Use macros for ErasedPartialEq defs and impls. Ideally all erased traits and their blanket impls must follow the convention that most well-known dyn-* rust crates use, for e.g. dyn-clone ->
    /// Define trait with supertrait
    trait MyTrait: DynClone {
        /* ... */
    }
    
    /// Use proc-macro to provide default impl
    dyn_clone::clone_trait_object!(MyTrait);
    
  • [ ] Separate trait for into_box(). (downcast-rs might already have a solution for this)

For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate milestone (priority) applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

hu55a1n1 avatar Aug 26 '22 10:08 hu55a1n1