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

polkadot-node-core-pvf

Polkadot crate that implements the PVF validation host. Responsible for coordinating preparation and execution of PVFs.

17 major breaking releases

18.0.0 Oct 1, 2024
17.0.0 Jul 19, 2024
15.0.0 Jul 13, 2024
14.0.0 Jun 24, 2024
0.0.0 Nov 21, 2022

#1 in #pvf

Download history 440/week @ 2024-08-26 451/week @ 2024-09-02 658/week @ 2024-09-09 605/week @ 2024-09-16 878/week @ 2024-09-23 1106/week @ 2024-09-30 718/week @ 2024-10-07 776/week @ 2024-10-14 896/week @ 2024-10-21 818/week @ 2024-10-28 983/week @ 2024-11-04 772/week @ 2024-11-11 1425/week @ 2024-11-18 1114/week @ 2024-11-25 1080/week @ 2024-12-02 1595/week @ 2024-12-09

5,299 downloads per month
Used in 6 crates (5 directly)

GPL-3.0-only

225KB
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.

Release

Polkadot SDK stable2409

Dependencies

~100–140MB
~2.5M SLoC