Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Gas Options and Prysm External Ports Options #2182

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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