Skip to content

Commit

Permalink
Update Solana Testnet Version v2.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
POPPIN-FUMI committed Oct 21, 2024
1 parent 1a45195 commit bd9c764
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 32 deletions.
44 changes: 44 additions & 0 deletions .changeset/mighty-seahorses-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
'@epics-dao/solv': patch
---

Update Solana Testnet Version v2.0.14

- For users who are not using solv Auto Operation Mode: Please follow the instructions below.

```bash
$ solv update && solv update -b
```

## How to use solv Auto Operation Mode?

Run the following command:

```bash
$ solv auto
? Do you want to enable solv Auto Operation 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 Auto Operation 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 Auto Operation Mode?
Run the following command:
```bash
$ solv auto
? Do you want to enable solv Auto Operation Mode?(You can change it again) (y/N) n
✅ Cron Job successfully removed.
```
37 changes: 9 additions & 28 deletions packages/solv/src/cli/update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
ValidatorType,
} from '@/config/enums'
import {
DELINQUENT_STAKE_MAINNET,
DELINQUENT_STAKE_TESTNET,
VERSION_JITO_MAINNET,
VERSION_JITO_RPC,
VERSION_JITO_TESTNET,
Expand All @@ -27,12 +29,6 @@ import {
} from '@/config/versionConfig'
import { readOrCreateDefaultConfig } from '@/lib/readOrCreateDefaultConfig'
import { MAINNET_TYPES, NETWORK_TYPES, SOLV_TYPES } from '@/config/config'
import { rmSnapshot } from '../setup/rmSnapshot'
import createSnapshot from '../get/createSnapshot'
import { startTestnetAgaveValidatorScript } from '@/template/startupScripts/startTestnetAgaveValidatorScript'
import { writeFile } from 'fs/promises'
import { spawnSync } from 'node:child_process'
import { STARTUP_SCRIPT } from '@/config/constants'

export * from './update'

Expand Down Expand Up @@ -169,28 +165,13 @@ export const updateCommands = (config: DefaultConfigType) => {
await monitorUpdate(deliquentStake, true)
return
}
if (isTestnet) {
// Restart Instruction
// https://github.com/anza-xyz/agave/wiki/2024-10-16-Testnet-Rollback-and-Restart
spawnSync(`solv stop`, { shell: true, stdio: 'inherit' })
spawnSync(`agave-install init v1.18.26`, {
shell: true,
stdio: 'inherit',
})
try {
createSnapshot()
} catch (error) {
rmSnapshot()
}
const script = startTestnetAgaveValidatorScript()
await writeFile(STARTUP_SCRIPT, script, { mode: 0o755 })
spawnSync(`solv start`, { shell: true, stdio: 'inherit' })
console.log(chalk.white(`Successfully Updated!`))
} else {
await updateVersion(version)
await monitorUpdate(deliquentStake, true)
return
}

await updateVersion(version)
const deliquentStakeNum = isTestnet
? DELINQUENT_STAKE_TESTNET
: DELINQUENT_STAKE_MAINNET
await monitorUpdate(deliquentStakeNum, true)
return
} else if (options.commission) {
const ansewr = await updateCommissionAsk()
updateCommission(ansewr.commission, isTestnet)
Expand Down
9 changes: 5 additions & 4 deletions packages/solv/src/config/versionConfig.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
export const VERSION_TESTNET = '1.18.26'
export const VERSION_TESTNET = '2.0.14'
export const VERSION_MAINNET = '1.18.25'
export const VERSION_JITO_TESTNET = '2.0.10'
export const VERSION_JITO_TESTNET = '2.0.14'
export const VERSION_JITO_MAINNET = '1.18.25'
export const VERSION_JITO_RPC = '2.0.10'
export const VERSION_SOLANA_RPC = '2.0.13'
export const DELINQUENT_STAKE_TESTNET = 5
export const VERSION_SOLANA_RPC = '2.0.14'
export const DELINQUENT_STAKE_TESTNET = 15
export const DELINQUENT_STAKE_MAINNET = 5
export const COMMISSION = 5
export const VERSION_NODE = '20.17.0'
export const VERSION_FIREDANCER_MAINNET = '0.114.20013'
export const VERSION_FIREDANCER = '0.114.20013'

0 comments on commit bd9c764

Please sign in to comment.