Problem: Currently, interface inheritance in libmultiprocess only works if capnproto base and derived interfaces both use $Proxy.wrap annotations and have C++ base and derived classes implementing methods of both interfaces. It is currently not possible to have derived capnproto interface that uses $Proxy.wrap inherit from a base interface that is unwrapped. This is needed for the stable/unstable Chain interface split proposed in bitcoin/bitcoin#34981. This limitation exists because ProxyMethod template class which is responsible for mapping capnproto method types to c++ method pointers currently assumes that that every capnproto method will be implemented by the wrapped base interface, and doesn't allow them to be implemented be derived classes.
Solution: Pass an interface type template parameter to ProxyMethod and to the ProxyMethodTraits, ProxyClientMethodTraits and ProxyServerMethodTraits traits classes, and have mpgen generate ProxyMethod specializations for every method an interface handles, including inherited ones. Small change to proxy.h, proxy-types.h and gen.cpp, plus a test of an interface inheriting from a base interface with no C++ class.
This is a potentially breaking change for code that specializes ProxyClientMethodTraits or ProxyServerMethodTraits, which now takes the interface type as its first template argument. But Bitcoin Core master does not have any of these specializations currently, so it needs no changes. Generated code is otherwise equivalent and there are no wire protocol changes.