solana-labs / rbpf

Rust virtual machine and JIT compiler for eBPF programs
Apache License 2.0
277 stars 169 forks source link

Refactor - `Config::enabled_sbpf_versions` #582

Closed Lichtso closed 3 months ago

Lichtso commented 3 months ago

Turns the two explicit flags into a range to describe the enabled SBPFVersions in the Config in anticipation of there being a lot more SBPFVersions.

Config::enabled_sbpf_versions is a range and not a set because in some places we need to know the highest enabled SBPFVersion. Also, because features are enabled for ranges of versions themselves, it makes little sense to leave out versions in the middle of a range, so sets are needlessly verbose.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.01%. Comparing base (a996494) to head (ff194ed). Report is 3 commits behind head on main.

Files Patch % Lines
src/elf.rs 80.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #582 +/- ## ========================================== + Coverage 89.92% 90.01% +0.09% ========================================== Files 22 22 Lines 9735 9673 -62 ========================================== - Hits 8754 8707 -47 + Misses 981 966 -15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.