If one wants to get cryptocurrency integrated with embeded devices and actually do something more useful than relaying transactions (like Blockstream’s satellite), at least a light client is needed. In one part, the light client uses Merkle proofs for querying to avoid storing the full “world state” locally. In another part, the light client also needs to be able to execute transactions and get the result locally. This posts talk about the later.

Usually in embedded devices, resources and computations are limited. There might only be a really lightweight microkernel, or even no kernel running. That means, many features you would expect to be immediately available once a program is started will not be there. This may even include memory management. And a program that wants to run on an embedded device will need to deal with them.

The above restrictions make Rux a good test ground. Rux is a microkernel that I started to develop around last year. With a lot of ideas borrowed from seL4, it features a capability-based system. One particular thing about Rux is that it only deals with the bare-minimal amount of resource management, and delegate the actual memory management to userspace. (In the mean time, Rux handles task scheduling, which is currently a Robin-round scheduler, because in the general microkernel research field, there has not been a good solution for an userspace scheduler.)

SputnikVM itself can be considered a pure function – it recieves all the inputs it needs in the beginning, does some computations, and then generates all the outputs in the end. In the middle, no interaction is required. This makes it so that the VM can be ported to require only a minimal set of functionalities from the kernel:

Basic task scheduling, or in the case of running bare metal, no task scheduling is needed.

Memory resources management, to tell the program which physical memory areas are available for use.

After that, SputnikVM can use a self allocator and do its own memory management, paging and heap allocation in userspace.