-
Notifications
You must be signed in to change notification settings - Fork 228
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
Side-by-side support for Tendermint 0.34 and 0.37 #1193
Conversation
in my understanding, an MVP of multi-version tendermint-rs may need the following changes:
|
I don't think it's currently possible to implement support for both 0.34 and 0.37 on |
I think it should be possible to have limited legacy support for 0.34 in tendermint-rs, by generating the |
820c013
to
fae22f9
Compare
f52b30b
to
c44c2de
Compare
Codecov Report
@@ Coverage Diff @@
## main #1193 +/- ##
=======================================
- Coverage 64.3% 64.2% -0.2%
=======================================
Files 250 271 +21
Lines 21618 24268 +2650
=======================================
+ Hits 13915 15583 +1668
- Misses 7703 8685 +982
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
2e4d38b
to
c72063e
Compare
d7ea496
to
c8505bd
Compare
950205c
to
e1e7a43
Compare
Print out the prost-build error to display protoc output line by line rather than as an unreadable Debug dump.
Also adapted the tendermint-abci crate as necessary. Committing this helps take stock of the protocol changes since 0.34, before multi-version support can be implemented.
This normalizes the content of the module for protocol updates.
Modify proto-compiler to generate protobuf modules for both versions of the Tendermint protocol. The different versions are disambiguated by module paths, presently tendermint::v0_34 and tendermint::v0_37, with the latest supported version reimported as tendermint::*.
This variant does not get expressed in RPC or protobuf, seems like this protocol change was not taken as per https://github.com/tendermint/tendermint/blob/91fba07e49cee43048fd761c8b2c2ec3c017acc8/docs/architecture/adr-047-handling-evidence-from-light-client.md
This should be used in preference to nullable where `nil` in the format could be met as a quirk admitted by the Go implementation, but otherwise the preferred form is some, possibly default value.
Keep it as a stub to avoid more extensive changes.
Define hand-written Serialize/Deserialize impls for Evidence.
- Filter out the empty non-Tendermint files. - Improve use of the WalkDir iterator. - Use OS-agnostic path construction.
Returning blank responses does not make a good migration path for applications that are yet unaware of the ABCI++ proposal handling phases. Implement the simplest sensible behaviors by default for Application::prepare_proposal and Application::process_proposal to fulfill the specification.
}, | ||
TendermintVersion { | ||
ident: "v0_37", | ||
commitish: "v0.37.0-alpha.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the last tag in Tendermint Core where the proto files had bundled Google well known types, before switching to buf to refer to dependencies. Adapting to buf will require more changes to the proto-compiler tool, and I have already done this already once in an older branch.
Here I'm leaving the migration to buf, and switching to CometBFT, as follow-on tasks.
There is no difference in protobuf message formats with the latest state in CometBFT branch v0.37.x
(as per commit d26bdfe1d424ff24c9676fee5bef9a180870315e).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes from the review call:
Instead of Latest as a variant, have only the explicit list of supported protocol versions as the enum variants. Make LATEST an associated const.
Replace the *Config structs with a proper builder API for better extensibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work there @mzabaluev! I think we can finally get this in :)
I have one question left, but I don't believe it should block this PR from being merged.
ADR: #1274
A cross-chain bridge agent, such as a relayer, may need to communicate with nodes using different Tendermint versions. To enable this use with a single linked instance of
tendermint-rpc
/tendermint-abcicrate, and also to disentangle tendermint-rs versioning from the versions of the Tendermint Core protocol, changetendermint-proto
to have generated protobuf structs for all supported tendermint versions in side-by-side modules, and adapt the higher level client APIs to be able to select the version expected from the node..changelog/