reth
reth copied to clipboard
fix(db): upgrade to libmdbx 0.12.2;
This pr tries to fix the compile error described in https://github.com/paradigmxyz/reth/discussions/368. I had tried some previous libmdbx versions, and v0.12.1 is not work in x86_64, reth should use the latest version, it works.
I upgrade libmdbx version steps as below:
- Visit release page libmdbx 0.12.2;
- Download libmdbx-amalgamated-0_12_2.zip;
- Unzip source code, and replace in path
crates/storage/libmdbx-rs/mdbx-sys/libmdbx
; - Test it,
cargo clean
&cargo test --all
;
Great you found the fix! but we need to follow the procedure from here: https://github.com/paradigmxyz/reth/tree/main/crates/storage/libmdbx-rs (I think it trims down some files)
Appreciate you taking the time.
Let's not rush with merging also - would like to understand what changed / why this if a fix, and if there's any license issues.
Great you found the fix! but we need to follow the procedure from here: https://github.com/paradigmxyz/reth/tree/main/crates/storage/libmdbx-rs (I think it trims down some files)
Hi @rakita , I reproduce libmdbx code by the below steps, it gets the same files, with no change to release v0.12.2.
cd crates/storage/libmdbx-rs
git clone https://gitflic.ru/project/erthink/libmdbx.git ~/libmdbx --branch v0.12.2
make -C ~/libmdbx dist
rm -rf mdbx-sys/libmdbx
cp -R ~/libmdbx/dist mdbx-sys/libmdbx
git add mdbx-sys/libmdbx
This helped resolve many of the errors I had trying to build on Windows 10, but I am left with two involving afl.rs. They are the exact same as reported in this open issue with an older version: https://github.com/rust-fuzz/afl.rs/issues/186 .
Yikes - but yeah this is expected given we use a c library and try to go cross platform. Appreciate the patience until we dig into this and eventually switch to a pure Rust db like https://github.com/cberner/redb.