Skip to content

Commit

Permalink
Merge pull request #2905 from w3f/optimize-check-candidate
Browse files Browse the repository at this point in the history
Optimize check candidate
  • Loading branch information
ironoa committed Apr 26, 2024
2 parents 6f59566 + 628c1d3 commit 0e8cda5
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions charts/otv-backend/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
description: 1K Validators Backend
name: otv-backend
version: v3.2.1
appVersion: v3.2.1
version: v3.2.2
appVersion: v3.2.2
apiVersion: v2
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1kv/common",
"version": "3.2.1",
"version": "3.2.2",
"description": "Services for running the Thousand Validator Program.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
6 changes: 4 additions & 2 deletions packages/common/src/constraints/CheckCandidates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const checkCandidate = async (

const validateValid = await checkValidateIntention(
constraints.config,
constraints.chaindata,
candidate,
validators,
);
Expand Down Expand Up @@ -64,7 +63,10 @@ export const checkCandidate = async (
);
}

const identityValid = await checkIdentity(constraints.chaindata, candidate);
const identityValid =
constraints.config?.constraints?.skipIdentity == true
? true
: (await checkIdentity(constraints.chaindata, candidate)) || false;
if (!identityValid) {
logger.info(`${candidate.name} identity not valid`, constraintsLabel);
}
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/constraints/ValidityChecks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const checkOnline = async (candidate: Candidate): Promise<boolean> => {
// Check the validate intention for a single validator
export const checkValidateIntention = async (
config: Config.ConfigSchema,
chaindata: ChainData,
candidate: Candidate,
validators: string[],
): Promise<boolean> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1kv/core",
"version": "3.2.1",
"version": "3.2.2",
"description": "Services for running the Thousand Validator Program.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gateway/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1kv/gateway",
"version": "3.2.1",
"version": "3.2.2",
"description": "Services for running the Thousand Validator Program.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/scorekeeper-status-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@1kv/scorekeeper-status-ui",
"private": true,
"version": "3.2.1",
"version": "3.2.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion packages/telemetry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1kv/telemetry",
"version": "3.2.1",
"version": "3.2.2",
"description": "Services for running the Thousand Validator Program.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/worker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1kv/worker",
"version": "3.2.1",
"version": "3.2.2",
"description": "Services for running the Thousand Validator Program.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down

0 comments on commit 0e8cda5

Please sign in to comment.