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

Encode heights used as keys in sled-based lightstore in big-endian representation #769

Closed
romac opened this issue Jan 5, 2021 · 0 comments · Fixed by #773
Closed

Encode heights used as keys in sled-based lightstore in big-endian representation #769

romac opened this issue Jan 5, 2021 · 0 comments · Fixed by #773
Assignees
Labels
bug Something isn't working
Milestone

Comments

@romac
Copy link
Member

romac commented Jan 5, 2021

According to the sled documentation [1] and example [2], one needs to represent the keys in big-endian form for sled's iterators and ordered operations to work properly.

Our light client might currently be misbehaving when more than 255 blocks were stored in the database.

[1] https://github.com/spacejam/sled#a-note-on-lexicographic-ordering-and-endianness
[2] https://github.com/spacejam/sled/blob/aa3fcf37d844e2d1382e0a58267dc3b3ae3b25aa/examples/structured.rs#L23-L30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant