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
As we migrate to pulsar and the api module, we want to have a better way of registering protobuf information with the codec than what currently happens with the InterfaceRegistry.
The main design principle is to have everything the registry needs to know about declaratively specified in the .proto files themselves so that the registry only requires that a module register file descriptors.
Things we want to take care with the registry include:
register interface implementations
validate msg signers
ensure correct proto paths
use pinned file descriptors for unknown field rejection and gRPC reflection
store pinned file descriptors in state and update them with chain upgrades (probably in x/upgrade)
We may want to consider a middleware design pattern for the registry where different extensions can perform a validation step for .proto options they use.
The text was updated successfully, but these errors were encountered:
I have noticed that what happens in the sdk, and applications build with the sdk, is that protobuf files are not imported as they register themselves.
For example, gogoproto is imported everywhere in the sdk proto files as gogoproto/gogo.proto, but gogo.proto generated code registers itself as gogo.proto.
This causes a bug in reflection services in which files cannot be correctly resolved, and this yields to invalid field descriptors.
NOTE: this might be irrelevant for protov2, pending investigation.
As we migrate to pulsar and the api module, we want to have a better way of registering protobuf information with the codec than what currently happens with the
InterfaceRegistry
.The main design principle is to have everything the registry needs to know about declaratively specified in the .proto files themselves so that the registry only requires that a module register file descriptors.
The proposed design is here:
cosmos-sdk/codec/types/interface_registry.go
Lines 377 to 390 in 21fcd17
Things we want to take care with the registry include:
We may want to consider a middleware design pattern for the registry where different extensions can perform a validation step for .proto options they use.
The text was updated successfully, but these errors were encountered: