revive: Bump PolkaVM and add static code validation (#5939)
This PR adds **static** validation that prevents upload of code that:
1) Contains basic blocks larger than the specified limit (currently
`200`)
2) Contains invalid instructions
3) Uses the `sbrk` instruction
Doing that statically at upload time (instead of at runtime) allows us
to change the basic block limit or add instructions later without
worrying about breaking old code. This is well worth the linear scan of
the whole blob on deployment in my opinion. Please note that those
checks are not applied when existing code is just run (hot path).
Also some drive by fixes:
- Remove superflous `publish = true`
- Abort fixture build on warning and fix existing warnings
- Re-enable optimizations in fixture builds (should be fixed now in
PolkaVM)
- Disable stripping for fixture builds (maybe we can get some line
information on trap via `RUST_LOG`)
---------
Co-authored-by: command-bot <>
Co-authored-by: PG Herveou <[email protected]>