stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
59 stars 40 forks source link

Module cache followup #1375

Closed graydon closed 4 months ago

graydon commented 4 months ago

This is a set of followups to #1359 to cover missing testing and wiring around the module cache. It includes calibration of the VmCachedInstantiation cost type, a shift to using a single shared linker when using a module cache (this turns out to be critical -- the existing code deadlocks on cross-contract calls) and some fairly subtle wiring to patch up costs in recording mode, along with some tests to check that it's mostly working.

Several tests remain broken with --feature=next, so I wouldn't say it's quite ready yet. I tried, but am out of time for tonight.

dmkozh commented 4 months ago

There is seemingly one more deadlock that has to be fixed before merging this

I've actually accidentally picked up the old revision of this PR. I've double-checked that in the current state it doesn't deadlock. Sorry for confusion.