solana-labs / rbpf

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

Refactor - vm interface of `BuiltinFunction`s #535

Closed Lichtso closed 11 months ago

Lichtso commented 11 months ago

This drastically simplifies the vm interface of BuiltinFunctions so that it becomes a lot closer to the vm internal call interface:

Unfortunately, encrypt_runtime_environment is now no longer optional as we can not read the config of the VM without dereferencing the potentially encrypted VM pointer.

codecov-commenter commented 11 months ago

Codecov Report

Merging #535 (b4391ac) into main (b1b50f7) will decrease coverage by 0.16%. The diff coverage is 95.08%.

@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   89.70%   89.55%   -0.16%     
==========================================
  Files          24       24              
  Lines       10213    10094     -119     
==========================================
- Hits         9162     9040     -122     
- Misses       1051     1054       +3     
Files Coverage Δ
src/interpreter.rs 98.81% <100.00%> (-0.03%) :arrow_down:
src/jit.rs 91.49% <100.00%> (-0.49%) :arrow_down:
src/vm.rs 85.90% <100.00%> (+0.06%) :arrow_up:
src/program.rs 80.58% <90.90%> (+2.50%) :arrow_up:

... and 1 file with indirect coverage changes