Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mithril in container and docs (#1707)
## Description - The Mithril binaries and scripts were added to the container build process. - Changed `chown` commands to recursively make guild the owner of `/opt/cardano/cnode`. - Required for succes of the **mithril-client.sh** `rmdir ${CNODE_HOME}/db` and the subsequent **mithril-client** binary `mkdir ${CNODE_HOME}/db` operation. - Combined multiple ADD steps into a single ADD per destination, resulting in fewer individual 4KB layers. - Updated documentation - **docker.md** - Added mithril-client and mithril signer to the **Built-in Cardano software** list. - Added Ogmios, Cardano Hardware CLI, and Cardano Signer to the **Built-in tools** - Changed the multistage building and `prereqs.sh` to the single stage currently used and `guild-depoy.sh`. - **run.md** - Added a note describing how to set the **MITHRIL_DOWNLOAD** environment variable causing mithril-client to automatically sync the latest snapshot. ## Where should the reviewer start? Build the container locally. Start the container with `--env MITHRIL_DOWNLOAD=Y`. Observe in the logs: ``` NETWORK: mainnet NODE: 3ca9aa9b33b1 - Port:6000 - cardano-node 8.1.2 - linux-x86_64 - ghc-8.10 git rev d2d90b48c5577b4412d5c9c9968b55f8ab4b9767 INFO: Mithril environment file not found, creating environment file.. INFO: Mithril environment file created successfully!! INFO: The db directory is empty.. INFO: Removing empty db directory to prepare for snapshot download.. INFO: Downloading latest mithril snapshot.. ``` ## Motivation and context Provides container users similar functionality for startup of new nodes relying on mithril-client instead of full chain synchronization via FetchBlock. ## How has this been tested? 1. Locally building the container 2. Starting container without any additional environment variables to observe normal chain synchronization. 3. Starting container with `--env MITHRIL_DOWNLOAD=Y` and observing the directory gets removed (as required by mithril-client), recreated (by mithril-client) and the snapshot synchronization occurs as expected.
- Loading branch information