parallelchain-io / hotstuff_rs

Rust implementation of the HotStuff consensus algorithm.
34 stars 4 forks source link

Error on tests and other parts of the library are missing tests #6

Closed ghost closed 11 months ago

ghost commented 1 year ago

The tests crate only has two tests What are these doing? They are not readable. Can't run them

The build failed with this error on my machine when I run cargo test

error[E0658]: generic associated types are unstable
   --> src\state.rs:755:5
    |
755 |     type Snapshot<'a>: 'a + KVGet;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information

Where are the other tests which cover other parts of the library? There seems to be none The code is buggy and unreadable. Doubt if it really work? Hard to trust it

lyulka commented 1 year ago

Your tests are not building because you are using an older version of Rust. Generic associated types were stabilized in Rust version 1.65.

What each of the two integration tests do is documented in the top-level docs of the test module.

A more comprehensive testing strategy is in the pipeline, but we're likely leaving that until after we get some essential features implemented in 0.3.

ghost commented 12 months ago

That is bullshit. The version I used is 1.69.0 cargo 1.69.0 (6e9a83356 2023-04-12)

lyulka commented 11 months ago

I can't reproduce your issue. Updating the cargo toolchain using rustup update and then running cargo test doesn't cause any errors, and tests pass.

lyulka commented 11 months ago

Closing due to inactivity.