Skip to content

PVF host: Specialize on Linux, support macOS #881

@pepyakin

Description

@pepyakin

(This is not an actionable issue, just a platform for discussion and linking from other issues)

To my knowledge, we do not support Windows explicitly. Maybe mingw may work, but MSVC almost surely won't work. That's fine since Windows has WSL for those who need to run Polkadot there.

There is quite a bunch of people who are using macOS for development either of Polkadot or parachains. While running Polkadot is possible inside a docker container, it comes with many inconveniences:

  • polkadot-launch does not support docker,
  • macOS does not support docker natively so it spins up a virtual machine, which can eat a decent amount of memory and CPU, and then on top of that the host and the guest do not share the resources.
  • profiling inside of a docker is not the best experience on macOS either

So therefore we probably want to keep supporting polkadot directly on macOS.

However, PVF host or other parts of wasm execution may want to use special features of Linux for performance, security or other reasons. To name a few:

  1. Linux supports uffd which is useful for low-latency instantiation in wasmtime. Maybe macOS' mach layer supports for something like that, but it would be take additional effort to implement that.
  2. we are interested in security hardening of the worker processes PVF host: sandbox/harden worker process #882. Even if macOS supports something of that sort, it would take us to reimplement the same for it.
  3. we may need to constrain the workers with amount of resources they can take. The best we can hope on macOS is probably rlimit (and the last time I looked I wanted to use cgroups, Linux only feature). And again if there are required facilities, we would have to reimplement everything for macOS again.

Thus, it may make sense to specialize our implementation efforts on Linux for production deployments. We can implement good enough fallbacks that would allow deploying simple localnets, but running validators on macOS will be discouraged.

Metadata

Metadata

Assignees

Labels

T0-nodeThis PR/Issue is related to the topic “node”.

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions