-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: update penumbra deps to v1 crates #31
Conversation
Simply for consistency's sake, shouldn't affect the runtime logic.
Doing this for readability, so it's obvious which types are used throughout the module.
This just pulls in the new v1 dependencies [0], doesn't actually consume them yet.
Not finished yet, but I think this is the pattern we're forced to use. We cannot round-trip via serde because the tendermint crates use protobuf for serialization, which means versioning info is preserved, prohibiting naive round-tripping across versions. So instead I'm manually unpacking every field, reducing it to primitive types, and re-encoding.
f402090
to
0b78f48
Compare
I think the overall approach we have in the current version of the draft is good. I think for For other types, I think we can get away with something more independent:
Also, for juggling multiple versions, maybe what we should do is:
Then, each sub module would re-export the same types with the same name, importing from the same tendermint protos. Then, it would be easy to see that if you have a function of type: fn foo(x: tendermint_compat::DeliverTx) -> tendermint_compat::v0o37::DeliverTx what's going on. This scales to the inevitable time when we have more than two version as well, since we won't need to change anything. |
Still fleshing out compat types for everything we need... will update the trait as I go. It's going to take a lot of verbose translations between 0.37 and 0.40 tendermint types to provide the compat we need.
5e1fb75
to
e48ffd5
Compare
Rough-and-ready first pass, with copious unwraps. Just trying to get full coverage on porting the type signatures, will need to circle back and port the helper fns for converting Evidence, Misbehavior.
Pushed a rough draft of the compat types. Still doesn't compile, but the shape of the impls seems workable. There's too many |
Beautiful! With the latest additions, I can run the |
Using minor version bump because the CLI interface hasn't changed. The Penumbra trait interface has changed drastically, but we're still in in 0.x, so let's rock.
Opening early to discuss implementation options. Refs #30.