mimblewimble / grin

Minimal implementation of the Mimblewimble protocol.
https://grin.mw/
Apache License 2.0
5.04k stars 992 forks source link

croaring-rs upgrade 0.5.2 -> 1.0.1 #3779

Closed yeastplume closed 5 months ago

yeastplume commented 5 months ago

Attempt to upgrade croaring-rs to 1.0.1, from 0.5.2, in an attempt to address odd instruction set issues such as found in https://github.com/mimblewimble/grin-gui/issues/73

Note this has not yet been tested, and this is here as a first pass, mostly to determine whether it does indeed address issues. A windows test was failing on the CI server at pow::lean::test::lean_miner. If this no longer fails after the update, this is a good sign.

pub fn trim(&mut self) {
        // trimming successively
        while self.edges.cardinality() > (7 * (self.params.num_edges >> 8) / 8) as u64 {
            self.count_and_kill();
        }
    }

Issues that need to be looked into:

---- pmmr_reload stdout ----
env logger already initialized: SetLoggerError(())
idx: 1, shift_cache.len(): 0
thread 'pmmr_reload' panicked at store\src\prune_list.rs:156:26:
attempt to subtract with overflow

failures:
    compact_twice
    pmmr_compact_entire_peak
    pmmr_compact_horizon
    pmmr_compact_single_leaves
    pmmr_reload
    pmmr_rewind
yeastplume commented 5 months ago
yeastplume commented 5 months ago

Also note this reverts the CI testing environment to the windows-2019 image as per compiler bug found in https://github.com/RoaringBitmap/croaring-rs/pull/128