#worker #host #validation #pvf #execution #responsible #polkadot


Polkadot crate that implements the PVF validation host. Responsible for coordinating preparation and execution of PVFs. (polkadot v1.10.0)

11 major breaking releases

new 11.0.0 Apr 9, 2024
10.0.0 Mar 19, 2024
9.0.0 Feb 27, 2024
8.0.0 Feb 13, 2024
0.0.0 Nov 21, 2022

#425 in Magic Beans

Download history 100/week @ 2023-12-18 18/week @ 2023-12-25 154/week @ 2024-01-01 164/week @ 2024-01-08 102/week @ 2024-01-15 186/week @ 2024-01-22 126/week @ 2024-01-29 310/week @ 2024-02-05 382/week @ 2024-02-12 402/week @ 2024-02-19 982/week @ 2024-02-26 469/week @ 2024-03-04 406/week @ 2024-03-11 851/week @ 2024-03-18 796/week @ 2024-03-25 988/week @ 2024-04-01

3,073 downloads per month
Used in 5 crates (4 directly)


4.5K SLoC

PVF Host

This is the PVF host, responsible for responding to requests from Candidate Validation and spawning worker tasks to fulfill those requests.

See also:

Running basic tests

Running cargo test in the pvf/ directory will run unit and integration tests.

Note: some tests run only under Linux, x86-64, and/or with the ci-only-tests feature enabled.

See the general Testing instructions for more information on running tests and observing logs.

Running a test-network with zombienet

Since this crate is consensus-critical, for major changes it is highly recommended to run a test-network. See the "Behavior tests" section of the Testing docs for full instructions.

To run the PVF-specific zombienet test:

RUST_LOG=parachain::pvf=trace zombienet --provider=native spawn zombienet_tests/functional/0001-parachains-pvf.toml

Testing on Linux

Some of the PVF functionality, especially related to security, is Linux-only, and some is x86-64-only. If you touch anything security-related, make sure to test on Linux x86-64! If you're on a Mac, you can either run a VM or you can hire a VPS and use the open-source tool EternalTerminal to connect to it.[^et]

[^et]: Unlike ssh, ET preserves your session across disconnects, and unlike another popular persistent shell, mosh, it allows scrollback.


~2M SLoC