-
Notifications
You must be signed in to change notification settings - Fork 70
fix(nodes): update validator clang requirements #2158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -42,7 +42,7 @@ This guide explains how to run a validator TON node with MyTonCtrl from scratch. | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| - Ubuntu 22.04 LTS or 24.04 LTS | ||||||||||||||||||||||
| - Python 3.10 or higher | ||||||||||||||||||||||
| - Clang 16.0.0 or higher | ||||||||||||||||||||||
| - Clang 21.0.0 or higher | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| # Check Ubuntu version | ||||||||||||||||||||||
|
|
@@ -71,22 +71,24 @@ clang --version | |||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| # Check Clang version | ||||||||||||||||||||||
| clang --version | ||||||||||||||||||||||
| # If version 16, skip the steps below. | ||||||||||||||||||||||
| # If version 21, skip the steps below. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Required for Ubuntu 22.04. Update current Clang to clang-16 | ||||||||||||||||||||||
| sudo apt update | ||||||||||||||||||||||
| sudo apt install -y lsb-release wget software-properties-common gnupg | ||||||||||||||||||||||
| sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | ||||||||||||||||||||||
| # Ubuntu 22.04 | ||||||||||||||||||||||
| sudo apt install lsb-release wget software-properties-common gnupg | ||||||||||||||||||||||
| wget https://apt.llvm.org/llvm.sh | ||||||||||||||||||||||
| chmod +x llvm.sh | ||||||||||||||||||||||
| sudo ./llvm.sh 16 clang | ||||||||||||||||||||||
| sudo ./llvm.sh 21 clang | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Change default Clang | ||||||||||||||||||||||
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100 | ||||||||||||||||||||||
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100 | ||||||||||||||||||||||
| # Ubuntu 24.04 | ||||||||||||||||||||||
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | ||||||||||||||||||||||
| echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list | ||||||||||||||||||||||
| sudo apt -y update | ||||||||||||||||||||||
| sudo apt install -y clang-21 | ||||||||||||||||||||||
|
Comment on lines
+82
to
+86
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace deprecated The 🔒 Proposed fix using modern GPG key management # Ubuntu 24.04
- wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
+ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc
+ echo "deb [signed-by=/etc/apt/trusted.gpg.d/llvm-snapshot.asc] http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt -y update
sudo apt install -y clang-21📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # optionally, change default clang | ||||||||||||||||||||||
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 200 | ||||||||||||||||||||||
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 200 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Required for Ubuntu 24.04. Install clang-16 | ||||||||||||||||||||||
| sudo apt install -y clang-16 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
| </Accordion> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[HIGH] Non-copy-pasteable
aptcommand with unsafeapt-keyusageThe Ubuntu 24.04 instructions use
sudo apt-key add -, which is deprecated and discouraged in modern Debian/Ubuntu tooling. This conflicts with the style requirement that commands be safe and copy‑pasteable on supported systems, and can fail on newer Ubuntu releases. The same block also hardcodes a repository without using a keyring-basedsigned-byconfiguration, which is now the recommended pattern. These issues reduce reliability of the installation instructions and may force readers to troubleshoot outside the guide.Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!