From 01870b9f9e6355c90cff5d05a9e4b08310a0d2c6 Mon Sep 17 00:00:00 2001 From: POPPIN-FUMI Date: Tue, 23 Jul 2024 19:40:52 +0200 Subject: [PATCH] Update Solana Version for Testnet v2.0.3 --- .changeset/late-crews-fly.md | 46 +++++++++++++++++++++++++++ packages/solv/src/cli/update/index.ts | 13 +++----- packages/solv/src/config/config.ts | 4 +-- 3 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 .changeset/late-crews-fly.md diff --git a/.changeset/late-crews-fly.md b/.changeset/late-crews-fly.md new file mode 100644 index 00000000..3667e404 --- /dev/null +++ b/.changeset/late-crews-fly.md @@ -0,0 +1,46 @@ +--- +'@epics-dao/solv': patch +--- + +Update Solana Version for Testnet v2.0.3 + +If you are using solv MEV mode, ignore this step, It will be automatically updated. + +If you are NOT using solv MEV mode, you need to update the Agave CLI with the following command: + +```bash +$ solv update && solv update -b +``` + +## How to use solv mev mode? + +Run the following command: + +```bash +$ solv mev +? Do you want to enable solv MEV Mode?(You can change it again) (y/N) +? Do you want to enable AUTO UPDATE? (Recommended) (y/N) +? Do you want to enable AUTO RESTART? (Recommended) (y/N) +※ Please turn off if you are using no-downtime migration. +? Enter your Discord Webhook URL (https://discord.com/api/webhooks/1234) +``` + +1. Enable solv MEV Mode. +2. Enable AUTO UPDATE. +3. Enable AUTO RESTART. + ※ Please turn off if you are using no-downtime migration. + ※ No-downtime migration requires spare server and manual restart. +4. Enter your Discord Webhook URL. + ※ You can receive notifications about the Solana/solv version update. +5. Enter RPC URL (Mainnet Only) +6. Enter Harvest Account (Mainnet Only) + +## How to disable solv mev mode? + +Run the following command: + +```bash +$ solv mev +? Do you want to enable solv MEV Mode?(You can change it again) (y/N) n +✅ Cron Job successfully removed. +``` diff --git a/packages/solv/src/cli/update/index.ts b/packages/solv/src/cli/update/index.ts index 434d2f05..f7cce90f 100644 --- a/packages/solv/src/cli/update/index.ts +++ b/packages/solv/src/cli/update/index.ts @@ -22,9 +22,6 @@ import updateOpenSSH from './checkSSH/updateOpenSSH' import isRequiredUpdateOpenSSH from './checkSSH/isRequiredUpdateOpenSSH' import autoUpdate from './autoUpdate' import getSolvVersion from '../epochTimer/getSolvVersion' -import { startTestnetAgaveValidatorScript } from '@/template/startupScripts/startTestnetAgaveValidatorScript' -import { writeFileSync } from 'fs' -import { STARTUP_SCRIPT } from '@/config/constants' export * from './update' @@ -118,6 +115,10 @@ export const updateCommands = (solvConfig: ConfigParams) => { } version = CONFIG.MAINNET_SOLANA_VERSION updateVersion(version) + updateSolvConfig({ + SOLANA_VERSION: version, + MAINNET_SOLANA_VERSION: version, + }) monitorUpdate(deliquentStake, true) return } else { @@ -128,12 +129,6 @@ export const updateCommands = (solvConfig: ConfigParams) => { TESTNET_SOLANA_VERSION: version, }) Logger.normal(`✔️ Update to Solana Version ${chalk.green(version)}`) - // Update Startup Script to Agave - const script = startTestnetAgaveValidatorScript() - writeFileSync(STARTUP_SCRIPT, script, 'utf-8') - const cmd = `chmod +x ${STARTUP_SCRIPT}` - spawnSync(cmd, { shell: true, stdio: 'inherit' }) - console.log(chalk.green('✔️ Startup Script Updated to Agave CLI!')) monitorUpdate(deliquentStake, true) return } diff --git a/packages/solv/src/config/config.ts b/packages/solv/src/config/config.ts index 98c0a4d5..eb9c2420 100644 --- a/packages/solv/src/config/config.ts +++ b/packages/solv/src/config/config.ts @@ -54,7 +54,7 @@ export enum MAINNET_TYPES { // ⚠️ Please DO NOT forget to turn this to false if restart is not needed export const NODE_RESTART_REQUIRED_MAINNET = false -export const NODE_RESTART_REQUIRED_TESTNET = false +export const NODE_RESTART_REQUIRED_TESTNET = true export type CONFIG_TYPE = { ID: string @@ -93,7 +93,7 @@ export const CONFIG: CONFIG_TYPE = { LANG: LANGS.EN, USERNAME: 'solv', SOLANA_VERSION: '1.18.18', - TESTNET_SOLANA_VERSION: '2.0.2', + TESTNET_SOLANA_VERSION: '2.0.3', MAINNET_SOLANA_VERSION: '1.18.18', NODE_VERSION: '20.15.1', TESTNET_DELINQUENT_STAKE: 7,