gear icon indicating copy to clipboard operation
gear copied to clipboard

Create pre-allocated resources in programs from `wasm-gen`

Open techraed opened this issue 2 years ago • 2 comments

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]) for create_program

techraed avatar Sep 18 '23 13:09 techraed

This is actually a solution for #3274.

techraed avatar Oct 28 '23 15:10 techraed

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 to gr_send_commit*, which receives handles for which gr_send_init wasn't called. We need more cases > when gr_send_commit*, gr_send_push, gr_send_push_input work correctly for > Loose sys-calls

techraed avatar Oct 28 '23 15:10 techraed