Skip to content

Commit

Permalink
FIX: Gas Options and Prysm External Ports Options
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoPlays committed Feb 5, 2025
1 parent aafff88 commit 3522697
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 41 deletions.
31 changes: 0 additions & 31 deletions launcher/src/components/UI/node-page/sections/ExpertWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,6 @@ export default {
async readService() {
this.item.yaml = await ControlService.getServiceYAML(this.item.config.serviceID);
let tekuGasLimit = "";
if (this.item.service === "TekuValidatorService") {
tekuGasLimit = await ControlService.readGasConfigFile(this.item.config.volumes[0].destinationPath);
}
if (this.item.service === "SSVNetworkService") {
this.item.ssvConfig = await ControlService.readSSVNetworkConfig(this.item.config.serviceID);
}
Expand All @@ -397,12 +392,6 @@ export default {
if (this.item.yaml.includes(command)) {
let match = this.item.yaml.match(new RegExp(`${command}[:=]?([\\S*]*)`));
option.changeValue = match ? match[match.length - 1] : "";
} else if (this.item.service === "TekuValidatorService" && command == "--gas-limit") {
if (tekuGasLimit != null) {
tekuGasLimit = tekuGasLimit.replace(/"/g, "");
}
option.changeValue = tekuGasLimit;
this.somethingIsChanged(option);
} else {
option.changeValue = "";
}
Expand Down Expand Up @@ -621,26 +610,6 @@ export default {
config: this.item.prometheusConfig,
});
}
if (this.item.service === "TekuValidatorService") {
if (this.item.yaml.includes("--gas-limit")) {
await ControlService.createGasConfigFile({
gasLimit: this.item.yaml.match(/^.*--gas-limit.*$/gm)[0].split("=")[1],
feeRecipient: this.item.yaml.match(/^.*fee-recipient.*$/gm)[0].split("=")[1],
configPath: this.item.config.volumes[0].destinationPath,
});
if (!this.item.yaml.includes("validators-proposer-config")) {
this.item.yaml = this.item.yaml.replace(
/^.*--gas-limit.*$/gm,
" - --validators-proposer-config=" + this.item.config.volumes[0].servicePath + "/gas_config.json"
);
} else {
this.item.yaml = this.item.yaml.replace(/\n^.*--gas-limit.*$/gm, "");
}
} else if (!this.item.yaml.includes("--gas-limit") && this.item.yaml.includes("validators-proposer-config")) {
await ControlService.removeGasConfigFile(this.item.config.volumes[0].destinationPath);
this.item.yaml = this.item.yaml.replace(new RegExp(/\n^.*validators-proposer-config.*$/gm), "");
}
}
if (this.item.service === "LighthouseBeaconService") {
if (!this.item.yaml.includes("--slasher\n") && this.item.yaml.includes("/opt/app/slasher")) {
this.item.yaml = this.item.yaml.replace(/\n^.*--slasher-dir.*$/gm, "");
Expand Down
40 changes: 30 additions & 10 deletions launcher/src/store/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,21 @@ export const useServices = defineStore("services", {
commands: ["--p2p-host-ip"],
},
{
title: "External TCP/UDP port",
title: "External TCP port",
type: "text",
changeValue: null,
icon: "/img/icon/service-setting-icons/tcp_udp_port.png",
pattern: [
"(--p2p-tcp-port=)(.*)(\\n)",
"(--p2p-udp-port=)(.*)(\\n)",
"(^ {2}- (\\d{1,3}\\.){3}\\d{1,3}):([0-9]\\d{0,4}):([0-9]\\d{0,4})/tcp",
"(^ {2}- (\\d{1,3}\\.){3}\\d{1,3}):([0-9]\\d{0,4}):([0-9]\\d{0,4})/udp",
],
commands: ["--p2p-tcp-port", "--p2p-udp-port"],
pattern: ["(--p2p-tcp-port=)(.*)(\\n)", "(^ {2}- (\\d{1,3}\\.){3}\\d{1,3}):([0-9]\\d{0,4}):([0-9]\\d{0,4})/tcp"],
commands: ["--p2p-tcp-port"],
needsPortForwarding: true,
},
{
title: "External UDP port",
type: "text",
changeValue: null,
icon: "/img/icon/service-setting-icons/tcp_udp_port.png",
pattern: ["(--p2p-udp-port=)(.*)(\\n)", "(^ {2}- (\\d{1,3}\\.){3}\\d{1,3}):([0-9]\\d{0,4}):([0-9]\\d{0,4})/udp"],
commands: ["--p2p-udp-port"],
needsPortForwarding: true,
},
{
Expand Down Expand Up @@ -416,6 +420,14 @@ export const useServices = defineStore("services", {
commands: ["--nat:extip:"],
noEqualSign: true,
},
{
title: "Gas Limit",
type: "text",
changeValue: null,
icon: "/img/icon/service-setting-icons/GasLimitIcon.png",
pattern: ["(- --suggested-gas-limit=)(.*)(\\n)"],
commands: ["--suggested-gas-limit"],
},
{
title: "ENR auto update",
type: "toggle",
Expand Down Expand Up @@ -624,6 +636,14 @@ export const useServices = defineStore("services", {
commands: ["--p2p-port", "--p2p-advertised-port"],
needsPortForwarding: true,
},
{
title: "Gas Limit",
type: "text",
changeValue: null,
icon: "/img/icon/service-setting-icons/GasLimitIcon.png",
pattern: ["(- --validators-builder-registration-default-gas-limit=)(.*)(\\n)"],
commands: ["--validators-builder-registration-default-gas-limit"],
},
{
title: "Metrics Interface Address",
type: "text",
Expand Down Expand Up @@ -720,8 +740,8 @@ export const useServices = defineStore("services", {
type: "text",
changeValue: null,
icon: "/img/icon/service-setting-icons/GasLimitIcon.png",
pattern: ["(- --gas-limit=)(.*)(\\n)"],
commands: ["--gas-limit"],
pattern: ["(- --validators-builder-registration-default-gas-limit=)(.*)(\\n)"],
commands: ["--validators-builder-registration-default-gas-limit"],
},
{
title: "Metrics Interface Address",
Expand Down

0 comments on commit 3522697

Please sign in to comment.