#block-hash #numbers #chain #subsystem #api #polkadot #header

polkadot-node-core-chain-api

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

18 major breaking releases

new 20.0.0 Jan 14, 2025
18.0.0 Oct 1, 2024
17.0.0 Jul 19, 2024
15.0.0 Jul 13, 2024
0.0.0 Nov 21, 2022

#610 in Magic Beans

Download history 1105/week @ 2024-09-25 815/week @ 2024-10-02 776/week @ 2024-10-09 743/week @ 2024-10-16 837/week @ 2024-10-23 992/week @ 2024-10-30 804/week @ 2024-11-06 1101/week @ 2024-11-13 1295/week @ 2024-11-20 1033/week @ 2024-11-27 1370/week @ 2024-12-04 1483/week @ 2024-12-11 1334/week @ 2024-12-18 916/week @ 2024-12-25 923/week @ 2025-01-01 1288/week @ 2025-01-08

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

GPL-3.0-only

26KB
539 lines

Release

Polkadot SDK Stable 2412


lib.rs:

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

~95–130MB
~2.5M SLoC