-
Notifications
You must be signed in to change notification settings - Fork 32
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
Improve the proto-compiler to generate canonical rust files #6
Comments
This problem is now tracked in the SDK cosmos/cosmos-sdk#10323 |
One more serious problem we're seeing is that the output of proto compiler (i.e., the Rust-generated files) is not deterministic. Soares first spotted this problem while working on no_std. Mentioned in informalsystems/hermes#1439
This is a problem because it makes reviewing difficult. The diff contains many changes, but most of the diff changes are irrelevant, spawning from re-ordering of types in the generated Rust files. For an example see this. We don't have a solution to this yet. One idea suggested was that the problem is caused by tonic or prost using |
This has been fixed in #78 |
Crate
ibc-proto & ibc-proto-compiler
Summary
Improve the proto-compiler to serve as a means for generating canonical Rust files by compiling SDK & IBC proto files.
Problem Definition
https://github.com/informalsystems/ibc-rs/blob/26087d575c620d1ec57b3343d1aaf5afd1db72d5/proto-compiler/src/cmd/compile.rs#L104-L106
TryFrom<RawType> for DomainType
,From<DomainType> for RawType
, etc.).Proposal
Here's one possible solution to address these issues:
Acceptance Criteria
ibc-proto files are usable by other ecosystem projects.
For Admin Use
The text was updated successfully, but these errors were encountered: