Installing Madara
In this section, we will guide you through the build and run process so that you can run your own Madara client, and query the Starknet blockchain as smoothly as possible.
We want anyone to be able to launch a Madara full node, which is why we've divided this section into 3 difficulty levels:
- Low-level (from source directly building the rust binary locally)
- Mid-level (from Docker recomanded via the available docker images)
- High-level (from an high-level interactive menu)
This installation process will help you build the binary directly from the source code locally on your machine.
Install dependencies
We first need to make sure you have everything needed to complete this tutorial.
Dependency | Version | Installation |
---|---|---|
Rust | rustc 1.78 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs sh |
Clang | Latest | sudo apt-get install clang |
Scarb | v2.8.2 | curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh |
Get code
Fetch the code from the Official Madara (opens in a new tab) repository in the folder of your choice.
cd <your-destination-path>
git clone https://github.com/madara-alliance/madara .
Build program
Then let's build the dependencies. You can choose between 3 differents build modes:
- Debug (fastest build mode, but lower performances, for testing purpose only)
cargo build
- Release (the recomanded build mode)
cargo build --release
- Production (the recomanded build mode for production performances)
cargo build --profile=production
Run Madara
This command will start the Madara client with a basic set arguments which will begin the basic deployment depending on your choosed mode:
cargo run --release -- \
--name Madara \
--full
--base-path /var/lib/madara \
--network mainnet \
--l1-endpoint ${ETHEREUM_API_URL}
We recomand you to head up to the Configuration section to custom your node parameters
If you don't have an L1 endpoint url we recomand you to head up to the Verification section to get one
Now that you know how to launch a Madara client, you might want to set some parameters in order to customize it. Therefore, you can go to the following Configuration (opens in a new tab) section.