ton-blockchain / mytonctrl

A tool to run and maintain a TON node/validator
GNU General Public License v3.0
262 stars 146 forks source link

Feature/speed-up-archive-download 7x/8x #338

Closed enchanted-elephant1 closed 2 weeks ago

enchanted-elephant1 commented 1 month ago

Pull Request Description

Changes Made

  1. Added aria2 for Downloading: The dump download method was switched from using curl to aria2c. This change allows for downloading the file using multiple connections (8 connections), which increases the download speed and reliability.
  2. Updated apt Install Command: The apt install command was modified to include the aria2 package, which is necessary for the new download mechanism. The command now installs plzip, pv, aria2, and curl.
  3. Corrected Typo: Fixed a typo in the log message from "fuction" to "function".

Reason for Changes

  1. Improved Download Performance: By switching to aria2c, the download process can now utilize multiple connections, improving the speed and reliability of fetching large files. This is especially beneficial for environments with limited bandwidth or unstable network connections.
  2. Increased Flexibility: Including aria2 in the installation process ensures that all required packages are available for the new download method, enhancing the robustness of the script.
  3. Code Readability and Accuracy: The typo fix improves the clarity of the debug logs, making them easier to understand for developers and maintainers.

Impact on Deployment

Impact on the Codebase

Testing should confirm that the new download method works as expected in different network conditions, and that aria2 is successfully installed and used during the process.