Welcome to Madara, a modular stack designed for building app chains utilizing Cairo and Starknet technology. Starknet has powered applications like dYdX V3, Immutable, and Sorare with its StarkEx technology for scaling. Now, with Madara, these capabilities are open source and accessible to everyone.
Madara is constructed on the Substrate framework, known for its modularity and access to an extensive array of development tools, libraries, and a vibrant developer community. This framework is particularly advantageous for developers seeking greater control over their chain by owning more of the stack.
Madara's comprehensive documentation offers guidance on various aspects, from the project structure and architecture to benchmarking and operational instructions:
With Madara, many use cases do not require forking the repository to build an app chain. By using forking, you would need to periodically rebase and resolve conflicts to stay updated with the latest version. Madara provides:
For modifications like configuration parameters, DA layers, genesis state, off-chain workers, and new pallets, forking Madara isn't necessary. Instead, you can import the relevant code as crates/pallets. The app-chain-template demonstrates this approach.
For more complex use cases, such as adding new syscalls to the Cairo VM or altering runtime logic significantly, consider forking parts of Madara.
Madara's ecosystem includes several peripheral repositories:
Madara boasts several standout features:
To get started quickly, refer to the Getting Started Guide for instructions on building and running Madara on your local machine.
Benchmarking is crucial in Madara's development lifecycle, providing insights into transaction throughput and performance evolution. The Benchmark Page tracks these metrics. Note that these benchmarks, run on a self-hosted GitHub runner, are intended for tracking relative performance changes over time, not as definitive production numbers.
To identify performance bottlenecks, generate flamegraphs with flamegraph-rs: