Bootstrap a Cardano node
With the Mithril client connected to a Mithril aggregator, you can restore a full Cardano node on the mainnet
in less than 20 minutes!
Set up the environment
Before proceeding with the installation, ensure that you have the following prerequisites in place:
-
Install a correctly configured Rust toolchain: make sure you have the latest stable version of Rust installed.
-
Install build tools
build-essential
andm4
: on Ubuntu/Debian/Mint, runsudo apt install build-essential m4
. -
Install OpenSSL development libraries: on Ubuntu/Debian/Mint, run the following command to install the required OpenSSL development libraries:
sudo apt install libssl-dev
- Install other requirements: make sure you have all the additional dependencies and requirements specified for the project:
sudo apt-get install make build-essential m4 docker jq
Download the source file
You can download the source file from GitHub (HTTPS):
git clone https://github.com/input-output-hk/mithril.git
Or (SSH):
git clone git@github.com:input-output-hk/mithril.git
Build the Mithril client binary
To build the Mithril client binary, switch to the desired branch/tag:
# Replace **YOUR_BUILD_BRANCH_OR_TAG** with the appropriate branch or tag name
# Please refer to the [**Network configurations**](http://mithril.network/manual/getting-started/network-configurations) section of the user manual
git checkout **YOUR_BUILD_BRANCH_OR_TAG**
Change the directory:
cd mithril/mithril-client-cli
Run tests (optional):
make test
Build the executable:
make build
Verify the binary
Verify the version
To check if the version of the Mithril signer binary is correct, use the following command:
./mithril-client -V
You should see something like:
mithril-client 0.7.6
⚠️ Verify that the version displayed corresponds to the version specified in the content of the release/pre-release notes (refer to the Build from column in the 'Mithril networks' section).
Verify the build
To verify that the Mithril client binary is functioning correctly, run the following command to display its help menu:
./mithril-client -h
You should see:
This program shows, downloads, and verifies certified blockchain artifacts.
Usage: mithril-client [OPTIONS] <COMMAND>
Commands:
cardano-db Cardano db management (alias: cdb)
mithril-stake-distribution Mithril stake distribution management (alias: msd)
cardano-transaction Cardano transactions management (alias: ctx)
cardano-stake-distribution Cardano stake distribution management (alias: csd)
help Print this message or the help of the given subcommand(s)
Options:
--run-mode <RUN_MODE>
Run Mode [env: RUN_MODE=] [default: dev]
-v, --verbose...
Verbosity level (-v=warning, -vv=info, -vvv=debug)
--config-directory <CONFIG_DIRECTORY>
Directory where the configuration file is located [default: ./config]
--aggregator-endpoint <AGGREGATOR_ENDPOINT>
Override configuration aggregator endpoint URL [env: AGGREGATOR_ENDPOINT=]
--log-format-json
Enable JSON output for logs displayed according to verbosity level
--log-output <LOG_OUTPUT>
Redirect the logs to a file
--unstable
Enable unstable commands
-h, --help
Print help
-V, --version
Print version
To display results in JSON format for the list
and show
commands of the Mithril client, you can use the --json
option:
./mithril-client cardano-db snapshot list --json
If you wish to delve deeper and access several levels of logs from the Mithril client, you can use the following:
- Add
-v
for some logs (WARN) - Add
-vv
for more logs (INFO) - Add
-vvv
for even more logs (DEBUG) - Add
-vvvv
for all logs (TRACE).