diff --git a/launcher/src/backend/SSHService.js b/launcher/src/backend/SSHService.js index 73a2794cd..f82611cba 100644 --- a/launcher/src/backend/SSHService.js +++ b/launcher/src/backend/SSHService.js @@ -260,6 +260,7 @@ export class SSHService { } async generateSSHKeyPair(opts = {}) { + const path = require("path"); if (opts.pickPath.endsWith("/")) opts.pickPath = opts.pickPath.slice(0, -1, ""); //if path ends with '/' remove it try { @@ -296,8 +297,9 @@ export class SSHService { if (keyPair.public) { let allKeys = [...exitingKeys, keyPair.public] await this.writeSSHKeyFile(allKeys) - await writeFile(`${opts.pickPath}/${opts.keyType.toLowerCase()}`, keyPair.private) - await writeFile(`${opts.pickPath}/${opts.keyType.toLowerCase()}.pub`, keyPair.public) + const savePath = path.join(opts.pickPath, opts.keyType.toLowerCase()) + await writeFile(savePath, keyPair.private) + await writeFile(savePath + ".pub", keyPair.public) return allKeys } return exitingKeys @@ -306,7 +308,7 @@ export class SSHService { } } - async readSSHKeyFile(path = `/home/${this.connectionInfo.user}/.ssh`) { + async readSSHKeyFile(path = `~/.ssh`) { let authorizedKeys = [] try { if (path.endsWith("/")) path = path.slice(0, -1, ""); //if path ends with '/' remove it @@ -322,7 +324,7 @@ export class SSHService { return authorizedKeys; } - async writeSSHKeyFile(keys = [], path = `/home/${this.connectionInfo.user}/.ssh`) { + async writeSSHKeyFile(keys = [], path = `~/.ssh`) { try { if (path.endsWith("/")) path = path.slice(0, -1, ""); //if path ends with '/' remove it let newKeys = keys.join("\n") diff --git a/launcher/src/backend/ServiceManager.js b/launcher/src/backend/ServiceManager.js index 3d67a1b44..fbc46b003 100644 --- a/launcher/src/backend/ServiceManager.js +++ b/launcher/src/backend/ServiceManager.js @@ -1218,12 +1218,12 @@ export class ServiceManager { } if (service.service === "FlashbotsMevBoostService") { command = service.entrypoint; - let index = command.findIndex((c) => /^-(mainnet|prater|goerli$)/.test(c)); + let index = command.findIndex((c) => /^-(mainnet|prater|goerli|sepolia|holesky$)/.test(c)); command[index] = "-" + newNetwork; index = command.findIndex((c) => c === "-relays") + 1; command[index] = '""'; } else if (service.service === "PrysmBeaconService") { - let index = command.findIndex((c) => /--(mainnet|prater|goerli)/.test(c)); + let index = command.findIndex((c) => /--(mainnet|prater|goerli|sepolia|holesky)/.test(c)); command[index] = "--" + newNetwork; if (newNetwork === "mainnet" && command.includes("--genesis-state=/opt/app/genesis/prysm-prater-genesis.ssz")) { command.splice(command.indexOf("--genesis-state=/opt/app/genesis/prysm-prater-genesis.ssz"), 1); @@ -1235,8 +1235,8 @@ export class ServiceManager { } } else { command = command.map((c) => { - if (/mainnet|prater|goerli/.test(c)) { - c = c.replace(/mainnet|prater|goerli/, newNetwork); + if (/mainnet|prater|goerli|sepolia|holesky/.test(c)) { + c = c.replace(/mainnet|prater|goerli|sepolia|holesky/, newNetwork); } return c; }); diff --git a/launcher/src/backend/ValidatorAccountManager.js b/launcher/src/backend/ValidatorAccountManager.js index d3a7a0fd7..8a03ccf8e 100644 --- a/launcher/src/backend/ValidatorAccountManager.js +++ b/launcher/src/backend/ValidatorAccountManager.js @@ -649,7 +649,7 @@ export class ValidatorAccountManager { await this.nodeConnection.sshService.exec( `chown 2000:2000 ${validatorsDir}/${pubkey}/exit_password.txt && chmod 700 ${validatorsDir}/${pubkey}/exit_password.txt` ); - const exitNimbusCmd = `docker run -v ${validatorsDir}:/validators --network=stereum sigp/lighthouse:latest lighthouse account validator exit --keystore=/validators/${pubkey}/keystore.json --password-file=/validators/${pubkey}/exit_password.txt --network=goerli --beacon-node=${client.dependencies.consensusClients[0] ? client.dependencies.consensusClients[0].buildConsensusClientHttpEndpointUrl() : "http:stereum-" + client.id + ":5052"} --no-confirmation`; + const exitNimbusCmd = `docker run -v ${validatorsDir}:/validators --network=stereum sigp/lighthouse:latest lighthouse account validator exit --keystore=/validators/${pubkey}/keystore.json --password-file=/validators/${pubkey}/exit_password.txt --network=${client.network} --beacon-node=${client.dependencies.consensusClients[0] ? client.dependencies.consensusClients[0].buildConsensusClientHttpEndpointUrl() : "http:stereum-" + client.id + ":5052"} --no-confirmation`; result = await this.nodeConnection.sshService.exec(exitNimbusCmd); await this.nodeConnection.sshService.exec( `rm ${validatorsDir}/${pubkey}/exit_password.txt` diff --git a/launcher/src/backend/ethereum-services/NodeService.js b/launcher/src/backend/ethereum-services/NodeService.js index b786253b1..233a884fd 100644 --- a/launcher/src/backend/ethereum-services/NodeService.js +++ b/launcher/src/backend/ethereum-services/NodeService.js @@ -19,6 +19,10 @@ export const networks = { sepolia: { name: "sepolia", dataEndpoint: "https://sepolia.beaconcha.in/api/v1", + }, + holesky: { + name: "holesky", + dataEndpoint: "https://holesky.beaconcha.in/api/v1", } }; diff --git a/launcher/src/components/UI/node-manage/SidebarManage.vue b/launcher/src/components/UI/node-manage/SidebarManage.vue index 6e655ab3f..453c9b097 100644 --- a/launcher/src/components/UI/node-manage/SidebarManage.vue +++ b/launcher/src/components/UI/node-manage/SidebarManage.vue @@ -110,6 +110,7 @@ export default { case "goerli": return (item) => this.archFilter(item.service); case "sepolia": + case "holesky": return (item) => item.service != "SSVNetworkService" && this.archFilter(item.service); case "gnosis": return (item) => diff --git a/launcher/src/store/clickInstallation.js b/launcher/src/store/clickInstallation.js index dbec512f8..91d1868db 100644 --- a/launcher/src/store/clickInstallation.js +++ b/launcher/src/store/clickInstallation.js @@ -251,6 +251,7 @@ export const useClickInstall = defineStore("clickInstallation", { url: "https://checkpoint.gnosischain.com/", }, ], + holesky: [], }; }, actions: {}, diff --git a/launcher/src/store/nodeManage.js b/launcher/src/store/nodeManage.js index a895dfa63..6c786fd38 100644 --- a/launcher/src/store/nodeManage.js +++ b/launcher/src/store/nodeManage.js @@ -195,6 +195,15 @@ export const useNodeManage = defineStore("nodeManage", { dataEndpoint: "https://beacon.gnosischain.com/api/v1", support: ["staking", "stereum on arm"], }, + { + id: 5, + name: "Holesky Testnet", + network: "holesky", + icon: "/img/icon/click-installation/testnet-icon.png", + currencyIcon: "/img/icon/control/goETH_Currency_Symbol.png", + dataEndpoint: "https://holesky.beaconcha.in/api/v1", + support: ["staking", "stereum on arm", "mev boost"], + }, ], currentNetwork: {}, configNetwork: {},