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

polkadot-node-core-chain-api

The Chain API subsystem provides access to chain related utility functions like block number to hash conversions. (polkadot v1.15.0)

16 major breaking releases

new 17.0.0 Jul 19, 2024
15.0.0 Jul 13, 2024
14.0.0 Jun 24, 2024
13.0.0 May 24, 2024
0.0.0 Nov 21, 2022

#112 in Magic Beans

Download history 955/week @ 2024-03-29 689/week @ 2024-04-05 465/week @ 2024-04-12 535/week @ 2024-04-19 647/week @ 2024-04-26 500/week @ 2024-05-03 530/week @ 2024-05-10 778/week @ 2024-05-17 842/week @ 2024-05-24 832/week @ 2024-05-31 1121/week @ 2024-06-07 531/week @ 2024-06-14 885/week @ 2024-06-21 729/week @ 2024-06-28 265/week @ 2024-07-05 379/week @ 2024-07-12

2,319 downloads per month
Used in 8 crates (3 directly)

GPL-3.0-only

25KB
539 lines

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

~91–130MB
~2.5M SLoC