pin compiler version to fixed 1.93.1

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2026-09-13 11:14:21 +03:00
parent 6e1fd726f3
commit cc45fb5f9c
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
3 changed files with 12 additions and 22 deletions

View File

@ -346,7 +346,7 @@ sha256sum /etc/ghost/casper.json
You should see:
```
9da6045ed6d4fd844e3939573b31c013d0e564e542029330faa6d978cb4a915a
4645c7d39a64424d823f659d408070f8c90426117e7af147b0360697b2db7f4f /etc/ghost/casper.json
```
Create running `ghost-node` service that starts on system boot using `--unit-file` flag.

4
rust-toolchain.toml Normal file
View File

@ -0,0 +1,4 @@
[toolchain]
channel = "1.93.1"
components = ["rustfmt", "clippy", "rust-src"]
targets = ["wasm32-unknown-unknown"]

View File

@ -85,30 +85,16 @@ extract_seed() {
echo $seed
}
upgrade_compiler_if_needed() {
UPDATE_STATUS=$(rustup check 2>&1)
apply_patches_if_needed() {
local PATCH_STATUS=0
"$SCRIPT_FOLDER"/patch.sh || PATCH_STATUS=$?
if echo "$UPDATE_STATUS" | grep -q "Update available" || [ $PATCH_STATUS -eq 2 ]; then
if [ "$PATCH_STATUS" -eq 2 ]; then
echo "[+] clean all cache on the current system"
cargo install cargo-cache
cargo clean
cargo install cargo-cache
cargo cache --remove-dir all
echo "[+] upgrading rustc compiler version to latest"
rustup update
toolchain_name=$(rustup show | grep default | head -n 1 | cut -d' ' -f1)
if ! rustup target list --installed | grep -q "wasm32-unknown-unknown"; then
echo "[+] installing wasm32-unknown-unknown target"
rustup target add wasm32-unknown-unknown
fi
if ! rustup component list --installed | grep -q "rust-src"; then
echo "[+] installing rust-src component"
rustup component add rust-src
fi
echo "[+] fetching all dependencies"
cargo fetch
@ -240,7 +226,7 @@ if [[ $HARD_RESET = true ]]; then
exit 1
fi
upgrade_compiler_if_needed
apply_patches_if_needed
echo "[+] trying to stop current ghost-node"
sudo systemctl stop ghost-node
@ -349,12 +335,12 @@ if [[ $SET_ENVIRONMENT = true ]]; then
if prompt "[?] setup the rust environment (e.g. WASM support)?"; then
rustup default stable
upgrade_compiler_if_needed
apply_patches_if_needed
fi
fi
if [[ ! -z $RELEASE ]]; then
upgrade_compiler_if_needed
apply_patches_if_needed
if prompt "[?] 'cargo build $RELEASE $FEATURES' is what you want?"; then
cd $PROJECT_FOLDER
echo "[+] starting build in 3 seconds..."