-
Notifications
You must be signed in to change notification settings - Fork 302
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
proto: 🔧 conversions for tendermint-*
compatibility
#4447
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inherit settings in the package manifest from the workspace. remove `default-features = true` directives while we are here. they are *default* featues, this only needs to be explicitly turned *off* via `default-features = false`. we also tidy up the dependencies while we are here.
add a link to the RPC this implements, and what it does. add a link to the proxy type.
there are only two files in this library. rather than reëxporting the type in the `lib.rs`, just define it there and import it where we use it. this puts the important, core type provided by the library right at the top of the reader's entrypoint.
…nversions first, we break down the `get_tx(..)` endpoint, outlining the conversions therein. - GetTxResponse - TxResult - Tag NB: there is a `TODO(kate)` added here noting what looks like an errantly disabled boolean in `tendermint::abci::EventAttribute`.
…sync(..)` conversions - BroadcastTxAsyncResponse
…ync(..)` conversions - BroadcastTxSyncResponse
…eight(..)` conversions this is by far the most involved of the endpoints, as it involves converting blocks between the two libraries.
zbuc
reviewed
May 28, 2024
Self { | ||
key: key.into_bytes(), | ||
value: value.into_bytes(), | ||
// TODO(kate): this was set to false previously, but it should probably use the |
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.
good catch
zbuc
approved these changes
May 28, 2024
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.
LGTM, much cleaner 🥇
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-mock-consensus
Area: Relates to the mock consensus engine
A-testing
Area: Relates to testing of Penumbra
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
💭 describe your changes
in order to integrate mock consensus tests with the view server, we will need
the ability to respond to requests made by the view server to the tendermint
proxy service.
currently conversions from
tendermint
,tendermint-rpc
, andtendermint-proto
types intopenumbra-proto
types are defined inline insideof the
TendermintProxyService
implementation.to aid that journey, this branch takes that code and decomposes it into a
family of
From<T>
andTryFrom<T, Error = E>
implementations. this is nota comprehensive pass at a compatibility layer between
penumbra-proto
and thetendermint
crates, it is tightly focused on laying the groundwork tomock this service in tests.
to prevent the additions of new dependencies from interfering with builds in
environments such as
wasm32-wasi
orwasm32-unknown-unknown
, thesefacilities are gated behind a
#[cfg(feature = "tendermint")]
feature flag.🔖 issue ticket number and link
see #3913.
✅ checklist before requesting a review
if this code contains consensus-breaking changes, i have added the "consensus-breaking" label. otherwise, i declare my belief that there are not consensus-breaking changes, for the following reason: