Updating Madara
In this section, we will guide you through the process of updating your Madara client to the latest version, ensuring you can continue to query your desired network smoothly.
Like the previous Installation section we divided the updating process into 3 difficulty levels.
This update process will help you pull the latest code from the repository and rebuild the binary locally on your machine.
Update dependencies (if needed)
First, ensure that your dependencies are up to date. It's recommended to check if there are any updates to the dependencies.
Dependency | Version | Update Command |
---|---|---|
Rust | rustc 1.78 or later | rustup update |
Clang | Latest | Depends on OS (e.g., sudo apt-get update && sudo apt-get upgrade clang ) |
Scarb | v2.8.2 | Re-run the installation script or check Scarb documentation (opens in a new tab) |
Fetch the latest code
Navigate to your Madara directory where you initially cloned the repository.
cd <your-madara-directory>
git pull origin main
If you are on a specific branch or tag, you may need to switch to the main branch or the desired release tag.
git checkout main
git pull origin main
Rebuild the program
After pulling the latest code, rebuild the Madara client. You can choose between 3 different build modes:
- Debug (fastest build mode, but lower performance, for testing purposes only)
cargo build
- Release (the recommended build mode)
cargo build --release
- Production (the recommended build mode for production performance)
cargo build --profile=production
Restart Madara
Stop your currently running Madara client if it's running.
# Find the process ID and kill it, or use your method of stopping the client
pkill madara
Then, start the updated Madara client with your desired arguments.
cargo run --release -- \
--name Madara \
--full \
--base-path /var/lib/madara \
--network mainnet \
--l1-endpoint ${ETHEREUM_API_URL}
We recommend you head over to the Configuration section to customize your node parameters.