P# StorageHub
Important
🏗️ This repo is very much work in progress!
StorageHub is a storage-optimized parachain codebase, designed to work with other Polkadot & Kusama parachains. It focuses on storing data efficiently and in a decentralized manner, while also enabling data to be accessed, used, and managed by other parachains. It will be possible for users to directly interact with StorageHub and their files stored there, but StorageHub mainly seeks to natively interoperate with existing parachains via XCM.
This repo contains various components related to StorageHub, including clients, runtime, tools and test apparatus. It is organized:
.
├── .github <---- GitHub Actions and related files
├── client <---- storage-hub substrate client-side modules
├── node <---- storage-hub node implementation
├── pallets <---- storage-hub pallets
├── primitives <---- storage-hub primitives
├── resources
├── runtime <---- storage-hub runtime
├── support <---- Traits and implementations used by storage-hub
├── test <---- Testing module for storage-hub, including Zombienet and TypeScript tests
├── .gitignore
├── biome.json
├── Cargo.lock
├── Cargo.toml
├── Containerfile
├── LICENSE
├── package.json
├── README.md
├── rust-toolchain
└── tsconfig.json
A Cumulus-based runtime implementation for StorageHub, designed to enhance storage capabilities within the Polkadot network. For a more detailed explanation, please refer to the StorageHub design document presented for the grant application of this project.
Main Storage Providers (MSPs) are responsible for offering data retrieval services with unique value propositions in an open market. They ensure high-quality data accessibility and are directly selected by users, enabling competitive service offerings that cater to specific user needs.
Backup Storage Providers (BSPs) enhance the reliability and unstoppability of data storage. They operate in a decentralized network to provide redundancy and data backup services, ensuring that user data remains accessible even if primary providers face issues.
Full instructions can be found here.
For details on how to conduct tests on StorageHub, please see the testing README.md.
I've just updated a RuntimeApi or RPC call, how do I update the fn signatures in polkadot{.js} API/App?
Navigate to the /types-bundle
package and make your changes to /src/rpc.ts
and /src/runtime.ts
.
Any new Structs or ErrorEnums can be defined at /src/types.ts
, using existing examples for guidance, and any new branded types as well.
Now, navigate to the /test
directory and run:
pnpm typegen
From there you should be able to see the new RPC in your tests for the EnrichedBspApi
object.
Tip
If the TS is still yelling at you with red squiggles, use command pallete to restart language server.