ref-fvm
ref-fvm copied to clipboard
Actor upgrade workflow: the become syscall
Heavy WIP -- doesn't compile yet due to XXXs.
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>
@vyzo why is the tuple important here?
extensibility and API consistency with the other entry points.
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?
Codecov Report
Merging #654 (2170ef1) into master (e9657a7) will decrease coverage by
14.00%. The diff coverage is0.00%.
@@ 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 |