| Crates.io | polkadot-du |
| lib.rs | polkadot-du |
| version | 0.4.0 |
| created_at | 2024-09-18 11:50:57.579369+00 |
| updated_at | 2025-02-05 19:36:48.272398+00 |
| description | PDU - Polkadot runtime storage analyzer |
| homepage | |
| repository | https://github.com/ggwpez/pdu |
| max_upload_size | |
| id | 1379142 |
| size | 580,881 |
Investigate storage size of Substrate chains.
Install with:
cargo install polkadot-du --locked
pdu --help
First acquire a state snapshot. We are going to use the People Rococo chain, since it is rather small. You will need the try-runtime-cli for this and a full or archive node to download the state from:
try-runtime create-snapshot --uri wss://sys.ibp.network:443/statemint ah-polkadot.snap
Then run the analysis:
cargo run -r -- info --snap ah-polkadot.snap --rpc wss://sys.ibp.network:443/statemint
The results will be a bit boring for such a small network, but for a larger one - eg Kusama - it
could look like this. The results will also be written into a JSON file named kusama_storage.json.
You can download this snapshot to try it.

You can also zoom in on a specific pallet:
cargo run -r -- info --snap ah-polkadot.snap --rpc wss://sys.ibp.network:443/statemint --pallet System
Again for Kusama:

Search for an SS58 account address across the storage snapshot:
pdu grep --snap ../runtimes/polkadot.snap --rpc wss://sys.ibp.network:443/statemint address "15kr2dkeJQuCAfBQqZjnPeqmoMTWarRMxAGWPnfSmWdaVcbi"
Search for the sovereign account of parachain 2034 (Hydration) in a Relay chain snapshot:
pdu grep --snap polkadot.snap --rpc wss://try-runtime.polkadot.io:443 para-account child 2034
GPLv3 ONLY, see LICENSE file for details.
License: GPL-3.0