Skip to main content
Version: Current

Mithril signer node

info

Mithril signer is responsible for producing individual signatures that are collected and aggregated by the Mithril aggregator.

tip
info

The Mithril network configurations are available in the Network configurations section of the user manual.

Resources

NodeSource repositoryRust documentationDocker packagesNetwork configurations
Mithril signer↗️↗️↗️↗️

Prerequisites

  • Install the latest stable version of the correctly configured Rust toolchain

  • Install build tools build-essential and m4; for example, on Ubuntu/Debian/Mint, run sudo apt install build-essential m4

  • Install OpenSSL development libraries; for example, on Ubuntu/Debian/Mint, run apt install libssl-dev.

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

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-signer

Development testing and building

Run tests:

make test

Create the help menu:

make help

Generate the Rust documentation:

make doc

Run in debug mode with the default configuration:

make debug

Release the build and run the binary

To build and run in release mode with the default configuration:

make run

Or, you can build only in release mode:

make build

Display the help menu:

./mithril-signer --help

You should see:

An implementation of a Mithril signer

Usage: mithril-signer [OPTIONS]

Options:
-r, --run-mode <RUN_MODE>
Run Mode

[env: RUN_MODE=]
[default: dev]

-v, --verbose...
Verbosity level, add more v to increase

-c, --configuration-dir <CONFIGURATION_DIR>
Directory where the configuration file is located

[default: ./config]

--disable-digests-cache
Disable immutables digests cache

--reset-digests-cache
If set the existing immutables digests cache will be reset.

Will be ignored if set in conjunction with `--disable-digests-cache`.

--enable-metrics-server
Enable metrics HTTP server (Prometheus endpoint on /metrics)

[env: ENABLE_METRICS_SERVER=]

--metrics-server-ip <METRICS_SERVER_IP>
Metrics HTTP server IP

[env: METRICS_SERVER_IP=]
[default: 0.0.0.0]

--metrics-server-port <METRICS_SERVER_PORT>
Metrics HTTP server listening port

[env: METRICS_SERVER_PORT=]
[default: 9090]

--allow-unparsable-block
If set no error is returned in case of unparsable block and an error log is written instead.

Will be ignored on (pre)production networks.

-h, --help
Print help (see a summary with '-h')

-V, --version
Print version

Run in release mode with the default configuration:

./mithril-signer

Run in release mode using a specific mode:

./mithril-signer -r preview

Run in release mode with a custom configuration using environment variables:

NETWORK=**YOUR_CARDANO_NETWORK** AGGREGATOR_ENDPOINT=**YOUR_AGGREGATOR_ENDPOINT** ./mithril-signer
tip

If you wish to delve deeper and access several levels of logs from the Mithril signer, 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).

Download the pre-built binary

You can install a the latest released binary of the mithril-signer by running this one line command (replace YOUR_PATH with your installation path):

curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/input-output-hk/mithril/refs/heads/main/mithril-install.sh | sh -s -- -c mithril-signer -d latest -p YOUR_PATH

tip

You can also install the mithril-signer binary for other distributions:

  • use -d unstable for the unstable version
  • use -d **DISTRIBUTION_VERSION** for a specific distribution (e.g. -d 2445.0)
info

The Linux binaries target glibc, and have a minimum requirement of glibc 2.31 (compatible with Ubuntu 20.04 or Debian Bullseye).

Build and run a Docker container

Build a local Docker image:

make docker-build

Run a local Docker container:

make docker-run

Configuration parameters

The configuration parameters can be set in either of the following ways:

  1. In a configuration file, depending on the --run-mode parameter. If the runtime mode is testnet, the file is located in ./conf/testnet.json.
  2. The value can be overridden by an environment variable with the parameter name in uppercase.

Here is a list of the available parameters:

ParameterCommand line (long)Command line (short)Environment variableDescriptionDefault valueExampleMandatory
verbose--verbose-vVERBOSEVerbosity level-Parsed from the number of occurrences: -v for Warning, -vv for Info, -vvv for Debug and -vvvv for Trace✔️
run_mode--run-mode-rRUN_MODERuntime modedev-✔️
cardano_cli_path--CARDANO_CLI_PATHCardano CLI tool path-cardano-cli✔️
cardano_node_socket_path--CARDANO_NODE_SOCKET_PATHPath of the socket used by the Cardano CLI tool to communicate with the Cardano node-/tmp/cardano.sock✔️
db_directory--db-directory-DB_DIRECTORYDirectory to snapshot from the Cardano node/db-✔️
network--NETWORKCardano network-testnet or mainnet or devnet✔️
network_magic--NETWORK_MAGICCardano network magic number (for testnet and devnet)-1097911063 or 42-
party_id--PARTY_IDParty Id of the signer, usually the Pool Id of the SPO-pool1pxaqe80sqpde7902er5kf6v0c7y0sv6d5g676766v2h829fvs3xMandatory in pool Id declaration mode where the owner is not verified (decommissioned, only available when built with allow_skip_signer_certification feature, for test only)
run_interval--RUN_INTERVALInterval between two runtime cycles in ms-60000✔️
aggregator_endpoint--AGGREGATOR_ENDPOINTAggregator node endpoint-https://aggregator.pre-release-preview.api.mithril.network/aggregator✔️
data_stores_directory--DATA_STORES_DIRECTORYDirectory to store signer data (stake, protocol initializers, ...)-./mithril-signer/stores✔️
store_retention_limit--STORE_RETENTION_LIMITMaximum number of records in stores. If not set, no limit is set.---
kes_secret_key_path--KES_SECRET_KEY_PATHPath to the Cardano KES secret key file. Mandatory in Pool Id certification mode where the owner is verified (experimental, soon to be stable & preferred mode)---
operational_certificate_path--OPERATIONAL_CERTIFICATE_PATHPath to the Cardano operational certificate file. Mandatory in Pool Id certification mode where the owner is verified (experimental, soon to be stable & preferred mode)---
era_reader_adapter_type--era-reader-adapter-type-ERA_READER_ADAPTER_TYPEEra reader adapter type that can be cardano-chain, file or bootstrap.bootstrap--
era_reader_adapter_params--era-reader-adapter-params-ERA_READER_ADAPTER_PARAMSEra reader adapter params that is an optional JSON encoded parameters structure that is expected depending on the era_reader_adapter_type parameter---
enable_metrics_server--enable-metrics-server-ENABLE_METRICS_SERVEREnable metrics HTTP server (Prometheus endpoint on /metrics)false--
metrics_server_ip--metrics-server-ip-METRICS_SERVER_IPMetrics HTTP server IP0.0.0.0--
metrics_server_port--metrics-server-port-METRICS_SERVER_PORTMetrics HTTP server listening port9090--
allow_unparsable_block--allow-unparsable-block-ALLOW_UNPARSABLE_BLOCKIf set no error is returned in case of unparsable block and an error log is written instead. Will be ignored on (pre)production networks.false--
enable_transaction_pruning--ENABLE_TRANSACTION_PRUNINGIf set, the signer will prune the cardano transactions in database older than the [network_security_parameter]
network_security_parameter--NETWORK_SECURITY_PARAMETERAlso known as k, it defines the number of blocks that are required for the blockchain to be considered final, preventing any further rollback [default: 2160].2160--
preload_security_parameter--PRELOAD_SECURITY_PARAMETERBlocks offset, from the tip of the chain, to exclude during the cardano transactions preload [default: 3000].3000--
transactions_import_block_chunk_size--TRANSACTIONS_IMPORT_BLOCK_CHUNK_SIZEChunk size for importing transactions, combined with transaction pruning it reduces the storage footprint of the signer by reducing the number of transactions stored on disk at any given time.1500--
cardano_transactions_block_streamer_max_roll_forwards_per_poll--CARDANO_TRANSACTIONS_BLOCK_STREAMER_MAX_ROLL_FORWARDS_PER_POLLThe maximum number of roll forwards during a poll of the block streamer when importing transactions.1000--
preloading_refresh_interval_in_seconds--preloading-refresh-interval-in-seconds-PRELOADING_REFRESH_INTERVAL_IN_SECONDSThe preloading refresh interval in seconds.7200--