diff --git a/Cargo.lock b/Cargo.lock index 40b6287013e..b3cfece1b82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3586,7 +3586,7 @@ dependencies = [ [[package]] name = "mithril-aggregator" -version = "0.6.2" +version = "0.6.3" dependencies = [ "anyhow", "async-trait", diff --git a/docs/runbook/recompute-certificates-hash/README.md b/docs/runbook/recompute-certificates-hash/README.md index 41ac18026e4..8c430b75613 100644 --- a/docs/runbook/recompute-certificates-hash/README.md +++ b/docs/runbook/recompute-certificates-hash/README.md @@ -7,7 +7,7 @@ Export the environment variables: ```bash export MITHRIL_VM=**MITHRIL_VM** export CARDANO_NETWORK=**CARDANO_NETWORK** -export MITHRIL_DISTRIBUTION_LINUX_PKG=**MITHRIL_DISTRIBUTION_LINUX_PKG** +export MITHRIL_DISTRIBUTION=**MITHRIL_DISTRIBUTION** ``` Here is an example for the `release-mainnet` network: @@ -15,10 +15,10 @@ Here is an example for the `release-mainnet` network: ```bash export MITHRIL_VM=aggregator.release-mainnet.api.mithril.network export CARDANO_NETWORK=mainnet -export MITHRIL_DISTRIBUTION_LINUX_PKG=https://github.com/input-output-hk/mithril/releases/download/2342.0/mithril-2342.0-linux-x64.tar.gz +export MITHRIL_DISTRIBUTION=latest ``` -## Make a backup of the aggregator database +## Connect to the VM Connect to the aggregator VM: @@ -26,11 +26,27 @@ Connect to the aggregator VM: ssh curry@$MITHRIL_VM ``` -Once connected to the aggregator VM, export the environment variables: +## Stop the aggregator + +Stop the aggregator container: + +```bash +docker stop mithril-aggregator +``` + +## Make a backup of the aggregator database + +Export the environment variables: ```bash export CARDANO_NETWORK=**CARDANO_NETWORK** -export MITHRIL_DISTRIBUTION_LINUX_PKG=**MITHRIL_DISTRIBUTION_LINUX_PKG** +export MITHRIL_DISTRIBUTION=**MITHRIL_DISTRIBUTION** +``` + +Truncate WAL and SHM files: + +```bash +sqlite3 /home/curry/data/$CARDANO_NETWORK/mithril-aggregator/mithril/stores/aggregator.sqlite3 "PRAGMA wal_checkpoint(TRUNCATE);" ``` And copy the SQLite database file `aggregator.sqlite3`: @@ -60,19 +76,7 @@ wget https://raw.githubusercontent.com/input-output-hk/mithril/main/docs/runbook Download the mithril pre-compiled binaries package: ```bash -wget $MITHRIL_DISTRIBUTION_LINUX_PKG -O mithril-bin.tar.gz -``` - -Unpack the mithril aggregator binary: - -```bash -tar xzf mithril-bin.tar.gz mithril-aggregator -``` - -Make mithril aggregator binary executable: - -```bash -chmod u+x mithril-aggregator +curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/input-output-hk/mithril/refs/heads/main/mithril-install.sh | sh -s -- -c mithril-aggregator -d $MITHRIL_DISTRIBUTION -p $(pwd) ``` Make sure you are running the expected version of the aggregator: @@ -81,14 +85,6 @@ Make sure you are running the expected version of the aggregator: ./mithril-aggregator --version ``` -## Stop the aggregator - -Stop the aggregator container: - -```bash -docker stop mithril-aggregator -``` - ## Run the migration Once connected to the aggregator container, recompute the certificates hashes: diff --git a/mithril-aggregator/Cargo.toml b/mithril-aggregator/Cargo.toml index 48de3f7bc84..ecd4d10b6be 100644 --- a/mithril-aggregator/Cargo.toml +++ b/mithril-aggregator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mithril-aggregator" -version = "0.6.2" +version = "0.6.3" description = "A Mithril Aggregator server" authors = { workspace = true } edition = { workspace = true } diff --git a/mithril-aggregator/src/tools/certificates_hash_migrator.rs b/mithril-aggregator/src/tools/certificates_hash_migrator.rs index fbfccbdbf7b..58ee56b442d 100644 --- a/mithril-aggregator/src/tools/certificates_hash_migrator.rs +++ b/mithril-aggregator/src/tools/certificates_hash_migrator.rs @@ -149,7 +149,7 @@ impl CertificatesHashMigrator { debug!( self.logger, - "Updating signed entities certificate_ids to new computed hash and migrated signed entities in the database" + "Updating signed entities certificate hash in the database" ); let old_hashes_chunk_size = 250; for old_hashes_chunk in old_hashes.chunks(old_hashes_chunk_size) {