stellar / rs-soroban-env

Rust environment for Soroban contracts.
Apache License 2.0
61 stars 42 forks source link

P22 with wasmi reverted to 031 #1460

Closed graydon closed 6 days ago

graydon commented 3 weeks ago

This reverts wasmi from 0.36 to 0.31 while retaining everything else that's happened in p22. In particular the host still only speaks p22 and refuses to emulate p21.

dmkozh commented 3 weeks ago

Anyway I'm still trying to decide how far to go in trying to "fix" this test. I think the fact that the host fails -- rejects the f32-using code -- is actually a good thing. So I kinda want to just change the test to not-do that, to upload some other actually legal contract. But I'm not sure.

I did a bit of research and figured out that this is fine. In p21 we didn't build module cache for create_contract operation because we didn't instantiate VM. In p22 we do that to support constructors, but the error has been avoided due to lazy Wasmi compilation mode used by the module cache (as opposed to the eager mode on upload). Thus the test failing is expected for the old Wasmi as it doesn't have a lazy mode.