#numbers #block-hash #polkadot #ancestor #weight #blockchain #provides-access

polkadot-node-core-chain-api

The Chain API subsystem provides access to chain related utility functions like block number to hash conversions

26 major breaking releases

new 28.0.0 Dec 19, 2025
27.0.0 Dec 8, 2025
26.0.0 Oct 3, 2025
25.0.0 Aug 2, 2025
0.0.0 Nov 21, 2022

#7 in #block-hash

Download history 1358/week @ 2025-08-26 896/week @ 2025-09-02 899/week @ 2025-09-09 1072/week @ 2025-09-16 1072/week @ 2025-09-23 1389/week @ 2025-09-30 1413/week @ 2025-10-07 1564/week @ 2025-10-14 1322/week @ 2025-10-21 899/week @ 2025-10-28 1170/week @ 2025-11-04 1395/week @ 2025-11-11 1345/week @ 2025-11-18 1033/week @ 2025-11-25 1115/week @ 2025-12-02 880/week @ 2025-12-09

4,501 downloads per month
Used in 4 crates (2 directly)

GPL-3.0-only

590KB
8K SLoC

Implements the Chain API Subsystem

Provides access to the chain data. Every request may return an error. At the moment, the implementation requires Client to implement HeaderBackend, we may add more bounds in the future if we will need e.g. block bodies.

Supported requests:

  • Block hash to number
  • Block hash to header
  • Block weight (cumulative)
  • Finalized block number to hash
  • Last finalized block number
  • Ancestors

Dependencies

~110–155MB
~2.5M SLoC