Skip to content

Commit

Permalink
Merge pull request #236 from EpicsDAO/update
Browse files Browse the repository at this point in the history
Update Solana Version for Testnet v2.0.3
  • Loading branch information
POPPIN-FUMI authored Jul 23, 2024
2 parents 95ac2bc + 01870b9 commit b9bf5c6
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 11 deletions.
46 changes: 46 additions & 0 deletions .changeset/late-crews-fly.md
Original file line number Diff line number Diff line change
@@ -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.
```
13 changes: 4 additions & 9 deletions packages/solv/src/cli/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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 {
Expand All @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions packages/solv/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b9bf5c6

Please sign in to comment.