Ajuna Network Creator Hub

Logo

Hey there 👋 Welcome to Ajuna Network, the ecosystem for gamers and creators. This site is the entry point for all creators building or integrating on top of Ajuna Network!

View My GitHub Profile

Substrate Development

The best resources in Substrate development are the official docs:

Crate Naming Convention

Follow the convention mentioned in Rust Development with exception for runtime modules (or pallets).

For pallets, prefixing with ajuna-pallet-* is appropriate.

Managing Substrate Dependencies

Recommended is to peg our upstream dependencies at monthly snapshot releases with a dedicated time slot each month for upgrading.

Versioned, monthly or latest releases - which one to use

Versioned released are infrequent in Substrate which often leads to a simple upgrade task requiring lots of effort. Other options include:

A nice trade-off between maintainability vs. latest tech is provided via monthly snapshot releases, where we can dedicate a time slot for upgrading every month. A changelog for each monthly release is also provided to help us understand its associated changes.

Runtime Development

Our nodes can be thought of as distributed state machines with shared resources. These resources are tied to knowing how busy our network is and contribute to increasing or decreasing transaction fees. Hence pallets must be developed with optimization in mind towards:

Disk I/O

Generally we aim to minimize the amount of storage a pallet uses by storing consensus critical information only. If we don’t have logic to read a particular data, it probably means we don’t need to store it on chain.

Substrate is coupled with a variant of Merkle Patricia tree and key-value DB (e.g, RocksDB), which means we don’t have to optimize the underlying storage operations.

We suggest the following to optimize storage items:

See Storage for more info.

Memory Usage

Related to Disk I/O, we should consider using the smallest data types required for the job.

Computation

See microbenchmarks for measuring a piece of code.

Further Considerations