Skip to content
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

CheckBytes<DefaultValidator<'_>> is not implemented #15

Closed
ureeves opened this issue Apr 11, 2023 · 0 comments · Fixed by #16
Closed

CheckBytes<DefaultValidator<'_>> is not implemented #15

ureeves opened this issue Apr 11, 2023 · 0 comments · Fixed by #16
Labels
fix:bug Something isn't working team:Core Low Level Core Development Team (Rust)

Comments

@ureeves
Copy link
Member

ureeves commented Apr 11, 2023

Describe the bug
During the use of this crate in the implementation of dusk-network/piecrust#166, the following compilation error occurs.

error[E0277]: the trait bound `ArchivedTree<store::hash::Hash, 32, 4>: bytecheck::CheckBytes<DefaultValidator<'_>>` is not satisfied
   --> piecrust/src/store.rs:296:16
    |
296 |     let tree = rkyv::from_bytes(&tree_bytes).map_err(|err| {
    |                ^^^^^^^^^^^^^^^^ the trait `bytecheck::CheckBytes<DefaultValidator<'_>>` is not implemented for `ArchivedTree<store::hash::Hash, 32, 4>`

Expected behaviour
It should be possible to validate the structure on disk.

@ureeves ureeves added fix:bug Something isn't working team:Core Low Level Core Development Team (Rust) labels Apr 11, 2023
@ureeves ureeves changed the title CheckBytes<DefaultValidator<'_>> is not implemented CheckBytes<DefaultValidator<'_>> is not implemented Apr 11, 2023
ureeves added a commit that referenced this issue Apr 11, 2023
This is required to be able to validate a `Tree` when archived to disk.

Resolves #15
@ureeves ureeves mentioned this issue Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix:bug Something isn't working team:Core Low Level Core Development Team (Rust)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant