Create pre-allocated resources in programs from `wasm-gen`
Problem to Solve
The idea originally belongs to @StackOverflowExcept1on.
The suggestion is to create a bunch of handles (from send_init), reservation ids and define somehow message ids in init function so that these resources will be used by loose sys-calls during execution. This can increase rate of successful executions of loose sys-calls which require additional runtime resources (existing handle or reservation id in runtime).
Possible resources:
ReservationId([u8; 32])MessageHandle(u32)CodeId([u8; 32])forcreate_program
This is actually a solution for #3274.
3274 was:
Problem to Solve
Almost all
gr_send_commit*executions were unsuccessful in accordance to coverage report. That's because of inconsistency of calls togr_send_commit*, which receives handles for whichgr_send_initwasn't called. We need more cases > whengr_send_commit*,gr_send_push,gr_send_push_inputwork correctly for >Loosesys-calls