Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 0e8cda5

Browse files
authored
Merge pull request #2905 from w3f/optimize-check-candidate
Optimize check candidate
2 parents 6f59566 + 628c1d3 commit 0e8cda5

File tree

9 files changed

+12
-11
lines changed

9 files changed

+12
-11
lines changed

charts/otv-backend/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
description: 1K Validators Backend
22
name: otv-backend
3-
version: v3.2.1
4-
appVersion: v3.2.1
3+
version: v3.2.2
4+
appVersion: v3.2.2
55
apiVersion: v2

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/common",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

packages/common/src/constraints/CheckCandidates.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const checkCandidate = async (
3434

3535
const validateValid = await checkValidateIntention(
3636
constraints.config,
37-
constraints.chaindata,
3837
candidate,
3938
validators,
4039
);
@@ -64,7 +63,10 @@ export const checkCandidate = async (
6463
);
6564
}
6665

67-
const identityValid = await checkIdentity(constraints.chaindata, candidate);
66+
const identityValid =
67+
constraints.config?.constraints?.skipIdentity == true
68+
? true
69+
: (await checkIdentity(constraints.chaindata, candidate)) || false;
6870
if (!identityValid) {
6971
logger.info(`${candidate.name} identity not valid`, constraintsLabel);
7072
}

packages/common/src/constraints/ValidityChecks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export const checkOnline = async (candidate: Candidate): Promise<boolean> => {
4444
// Check the validate intention for a single validator
4545
export const checkValidateIntention = async (
4646
config: Config.ConfigSchema,
47-
chaindata: ChainData,
4847
candidate: Candidate,
4948
validators: string[],
5049
): Promise<boolean> => {

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/core",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "index.js",
66
"scripts": {

packages/gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/gateway",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

packages/scorekeeper-status-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@1kv/scorekeeper-status-ui",
33
"private": true,
4-
"version": "3.2.1",
4+
"version": "3.2.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

packages/telemetry/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/telemetry",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

packages/worker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@1kv/worker",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

0 commit comments

Comments
 (0)