From 0054f06948bde5bc0e0152a672d0010e243eaafc Mon Sep 17 00:00:00 2001 From: Max Behzadi <69126271+MaxTheGeeek@users.noreply.github.com> Date: Wed, 3 Jan 2024 18:08:29 +0100 Subject: [PATCH] ADD: doppelganger key check mechanism for diff services (#1620) * ADD: export btn to remove modal * ADD: export exit msg backend * ADD: export message button * small fix * ADD: save fn * ADD: export validator exit message * ADD: doppelganger preview key * FIX: doppelganger preview keys * FIX: updating doppelganger keys * REMOVE: logs * REFACTOR: updating dp key * FIX: some fixes --------- Co-authored-by: gbayasgalan --- .../public/img/icon/the-staking/export.png | Bin 0 -> 12025 bytes launcher/public/output.css | 91 +++++++++++- launcher/src/backend/Monitoring.js | 41 ++++-- .../src/backend/ValidatorAccountManager.js | 4 +- launcher/src/background.js | 4 + .../UI/node-page/components/logs/LogBody.vue | 20 +-- .../node-page/components/logs/LogFooter.vue | 12 +- .../node-page/components/logs/LogHeader.vue | 8 +- .../UI/staking-page/StakingScreen.vue | 65 ++++++++- .../staking-page/components/list/ListBody.vue | 137 +++++++++++++----- .../components/list/ListPanels.vue | 4 +- .../components/list/panels/InsertPanel.vue | 14 +- .../components/list/rows/DoppelGCheckRow.vue | 58 ++++++++ .../components/modals/ImportValidator.vue | 21 +-- .../components/modals/RemoveValidators.vue | 2 +- .../components/modals/StakingCustomModal.vue | 21 ++- .../components/modals/WithdrawMultiple.vue | 8 +- launcher/src/store/ControlService.js | 7 + launcher/src/store/theStaking.js | 5 +- 19 files changed, 426 insertions(+), 96 deletions(-) create mode 100755 launcher/public/img/icon/the-staking/export.png create mode 100644 launcher/src/components/UI/staking-page/components/list/rows/DoppelGCheckRow.vue diff --git a/launcher/public/img/icon/the-staking/export.png b/launcher/public/img/icon/the-staking/export.png new file mode 100755 index 0000000000000000000000000000000000000000..23133e7ec9248c6edf5cde26f65c493868eeff40 GIT binary patch literal 12025 zcmeIYc|6o#|2KYSY>8}H5~8dnge)~;Dzb$($zCBlgKXJGDP$+vqqLHJ#*%H??1soT z#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x&_Wo3X1Qq1@sKpDl8EYOZk}omBIRv8gmo-kW!D_4acPk!nWIR=C1 { return { ...data, total_rewards: parseInt(data.head) + parseInt(data.source) + parseInt(data.target) + parseInt(data.inactivity) } }); + const attestationResult = await this.queryBeaconApi( + baseURL, + "/eth/v1/beacon/rewards/attestations/" + finalizedEpoch, + validators, + "POST" + ); + const rewardsPerValidator = attestationResult.data.api_reponse.data.total_rewards.map((data) => { + return { + ...data, + total_rewards: + parseInt(data.head) + parseInt(data.source) + parseInt(data.target) + parseInt(data.inactivity), + }; + }); return { finalized_epoch: finalizedEpoch, rewards: rewardsPerValidator }; } catch (error) { @@ -1788,7 +1798,7 @@ export class Monitoring { const baseURL = `http://127.0.0.1:${beaconResult.data.port}`; // Get attestation rewards for given validators - const blockResult = await this.queryBeaconApi(baseURL, "/eth/v1/beacon/rewards/blocks/" + slot) + const blockResult = await this.queryBeaconApi(baseURL, "/eth/v1/beacon/rewards/blocks/" + slot); return blockResult.data.api_reponse.data; } catch (error) { log.error("Getting Block Rewards Failed:\n" + error); @@ -1811,7 +1821,12 @@ export class Monitoring { const baseURL = `http://127.0.0.1:${beaconResult.data.port}`; // Get attestation rewards for given validators - const blockResult = await this.queryBeaconApi(baseURL, "/eth/v1/beacon/rewards/sync_committee/" + slot, validators, "POST") + const blockResult = await this.queryBeaconApi( + baseURL, + "/eth/v1/beacon/rewards/sync_committee/" + slot, + validators, + "POST" + ); return blockResult.data.api_httpcode == 200 ? blockResult.data.api_reponse.data : []; } catch (error) { log.error("Getting Block Rewards Failed:\n" + error); @@ -2590,8 +2605,8 @@ export class Monitoring { const addr_type = Array.isArray(addr) ? "arr" : typeof addr === "string" && ["public", "local"].includes(addr) - ? "str" - : "invalid"; + ? "str" + : "invalid"; addr = addr_type == "str" ? addr.toLowerCase().trim() : addr; if (addr_type == "invalid") { return { @@ -2679,7 +2694,7 @@ export class Monitoring { for (let i = 0; i < serviceInfos.length; i++) { const hashDependencies = serviceInfos[i].config.dependencies.consensusClients.length || - serviceInfos[i].config.dependencies.executionClients.length + serviceInfos[i].config.dependencies.executionClients.length ? "yes" : "no"; easyInfos.push({ diff --git a/launcher/src/backend/ValidatorAccountManager.js b/launcher/src/backend/ValidatorAccountManager.js index 5290ee84e..3e6e391c7 100755 --- a/launcher/src/backend/ValidatorAccountManager.js +++ b/launcher/src/backend/ValidatorAccountManager.js @@ -61,7 +61,6 @@ export class ValidatorAccountManager { ); if (latestEpochsResponse.status === 200 && latestEpochsResponse.data.data.length > 0) { - for (let i = 0; i < 2; i++) { if (latestEpochsResponse.data.data[i].status === 1 && isActiveRunning.indexOf(pubkey) === -1) { isActiveRunning.push(pubkey); @@ -632,7 +631,7 @@ export class ValidatorAccountManager { async getExitValidatorMessage(pubkey, serviceID) { const ref = StringUtils.createRandomString(); //Create a random string to identify the task - this.nodeConnection.taskManager.otherTasksHandler(ref, `Exit msg for ${pubkey.substring(0, 6)}..`); + this.nodeConnection.taskManager.otherTasksHandler(ref, `Exit msg for ${pubkey?.substring(0, 6)}..`); try { let service = await this.nodeConnection.readServiceConfiguration(serviceID); const result = await this.keymanagerAPI(service, "POST", `/eth/v1/validator/${pubkey}/voluntary_exit`, []); @@ -650,7 +649,6 @@ export class ValidatorAccountManager { //Push successful task this.nodeConnection.taskManager.otherTasksHandler(ref, `Get signed voluntary exit message`, true, data); this.nodeConnection.taskManager.otherTasksHandler(ref); - return data; } catch (error) { this.nodeConnection.taskManager.otherTasksHandler( diff --git a/launcher/src/background.js b/launcher/src/background.js index ac57684c2..5832e0f21 100755 --- a/launcher/src/background.js +++ b/launcher/src/background.js @@ -426,6 +426,10 @@ ipcMain.handle("exitValidatorAccount", async (event, args) => { return await monitoring.exitValidatorAccount(args.pubkey, args.serviceID); }); +ipcMain.handle("getExitValidatorMessage", async (event, args) => { + return await validatorAccountManager.getExitValidatorMessage(args.pubkey, args.serviceID); +}); + ipcMain.handle("exportConfig", async () => { return await serviceManager.exportConfig(); }); diff --git a/launcher/src/components/UI/node-page/components/logs/LogBody.vue b/launcher/src/components/UI/node-page/components/logs/LogBody.vue index ecd2d36d5..a842045e5 100644 --- a/launcher/src/components/UI/node-page/components/logs/LogBody.vue +++ b/launcher/src/components/UI/node-page/components/logs/LogBody.vue @@ -1,23 +1,23 @@