ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

Actor upgrade workflow: the become syscall

Open vyzo opened this issue 3 years ago • 5 comments

Heavy WIP -- doesn't compile yet due to XXXs.

vyzo avatar Jun 29 '22 17:06 vyzo

so the syscall itself (from wasm perspective) would look like fn become_actor(from: (CID)) -> ! where ! is important inside WASM to trigger the trap code in wasmtime

from the FVM side of things, it would look more like fn become_actor(context: Context<'_, impl Kernel>, from: (CID)) -> Result<Never, Abort>

mriise avatar Jun 29 '22 18:06 mriise

@vyzo why is the tuple important here?

mriise avatar Jun 29 '22 18:06 mriise

extensibility and API consistency with the other entry points.

vyzo avatar Jun 29 '22 18:06 vyzo

as per rustc `extern` block uses type `(*const u8,)`, which is not FFI-safe `#[warn(improper_ctypes)]` on by default consider using a struct instead tuples have unspecified layoutrustc(improper_ctypes)

what is better, additional arguments or modifying a Struct?

mriise avatar Jun 29 '22 20:06 mriise

Codecov Report

Merging #654 (2170ef1) into master (e9657a7) will decrease coverage by 14.00%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #654       +/-   ##
===========================================
- Coverage   51.06%   37.06%   -14.01%     
===========================================
  Files         120      120               
  Lines        9694     9703        +9     
===========================================
- Hits         4950     3596     -1354     
- Misses       4744     6107     +1363     
Impacted Files Coverage Δ
fvm/src/call_manager/default.rs 0.00% <0.00%> (ø)
fvm/src/call_manager/mod.rs 0.00% <ø> (-20.00%) :arrow_down:
fvm/src/executor/default.rs 0.00% <0.00%> (-1.00%) :arrow_down:
fvm/src/kernel/blocks.rs 0.00% <0.00%> (-91.57%) :arrow_down:
fvm/src/kernel/default.rs 0.00% <0.00%> (-15.82%) :arrow_down:
fvm/src/kernel/error.rs 0.00% <ø> (-44.93%) :arrow_down:
fvm/src/syscalls/actor.rs 0.00% <ø> (ø)
fvm/src/syscalls/bind.rs 0.00% <ø> (ø)
fvm/src/syscalls/context.rs 0.00% <ø> (-60.38%) :arrow_down:
fvm/src/syscalls/error.rs 0.00% <0.00%> (ø)
... and 30 more

codecov-commenter avatar Jun 30 '22 18:06 codecov-commenter