penumbra-zone / tower-abci

Tower-based ABCI interface.
MIT License
75 stars 24 forks source link

[Compile error]:the trait `prost::Message` is not implemented for `tendermint_proto::abci::Request` #17

Closed lshoo closed 1 year ago

lshoo commented 1 year ago

Hello, When I compile the project with main branch, I get 5 errors:

src/server.rs:203:39
    |
203 |                 FramedRead::new(read, Decode::<pb::Request>::default()),
    |                 ---------------       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `prost::Message` is not implemented for `tendermint_proto::abci::Request`
    |                 |
    |                 required by a bound introduced by this call
    |
    = help: the following other types implement trait `prost::Message`:
              ()
              Box<M>
              Vec<u8>
              bool
              bytes::Bytes
              f32
              f64
              i32
            and 4 others
note: required for `Decode<tendermint_proto::abci::Request>` to implement `Decoder`
src/server.rs:212:38
    |
212 |                   req = request_stream.next() => {
    |                                        ^^^^ method cannot be called on `FramedRead<tokio::net::tcp::ReadHalf<'_>, Decode<tendermint_proto::abci::Request>>` due to unsatisfied trait bounds
    |
   ::: /home/lshoo/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/tokio-util-0.6.10/src/codec/framed_read.rs:14:1
    |
14  | / pin_project! {
15  | |     /// A [`Stream`] of messages decoded from an [`AsyncRead`].
16  | |     ///
17  | |     /// [`Stream`]: futures_core::Stream
...   |
22  | |     }
23  | | }
    | | -
    | | |
    | |_doesn't satisfy `_: Stream`
    |   doesn't satisfy `_: futures::StreamExt`
    |
    = note: the following trait bounds were not satisfied:
            `FramedRead<tokio::net::tcp::ReadHalf<'_>, Decode<tendermint_proto::abci::Request>>: Stream`
            which is required by `FramedRead<tokio::net::tcp::ReadHalf<'_>, Decode<tendermint_proto::abci::Request>>: futures::StreamExt`

....

I use the ubuntu22.04 and rust 1.65.0

erwanor commented 1 year ago

@lshoo thanks for the report, this is because main relies on a yanked tendermint-rs version, I will fix up main next week. In the meantime, you can compile the branch penumbra-034 which uses a fork of tendermint-rs.

hdevalence commented 1 year ago

Try using 0.2.0, it should fix this problem.

lshoo commented 1 year ago

Thanks