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

Commit 247feea

Browse files
committed
Merge branch 'staging' into candidate-code-duplication
2 parents b263ab9 + a52fa63 commit 247feea

File tree

20 files changed

+27
-62
lines changed

20 files changed

+27
-62
lines changed

apps/1kv-backend-staging/templates/kusama-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ spec:
130130
"Telemetry",
131131
"Location",
132132
"Block",
133-
"Gateway",
133+
"Gateway"
134134
]
135135
}
136136
}

apps/1kv-backend-staging/templates/polkadot-otv-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ spec:
129129
"Telemetry",
130130
"Location",
131131
"Block",
132-
"Gateway",
132+
"Gateway"
133133
]
134134
}
135135
}

apps/1kv-backend/templates/kusama-otv-backend.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.1.13
20+
targetRevision: v3.1.14
2121
plugin:
2222
env:
2323
- name: HELM_VALUES
@@ -128,7 +128,7 @@ spec:
128128
"Telemetry",
129129
"Location",
130130
"Block",
131-
"Gateway",
131+
"Gateway"
132132
]
133133
}
134134
}

apps/1kv-backend/templates/polkadot-otv-backend.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
repoURL: https://w3f.github.io/helm-charts/
1919
chart: otv-backend
20-
targetRevision: v3.1.13
20+
targetRevision: v3.1.14
2121
plugin:
2222
env:
2323
- name: HELM_VALUES
@@ -127,7 +127,7 @@ spec:
127127
"Telemetry",
128128
"Location",
129129
"Block",
130-
"Gateway",
130+
"Gateway"
131131
]
132132
}
133133
}

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.1.13
4-
appVersion: v3.1.13
3+
version: v3.1.14
4+
appVersion: v3.1.14
55
apiVersion: v2

charts/otv-backend/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ config: |
9393
"Telemetry",
9494
"Location",
9595
"Block",
96-
"Gateway",
96+
"Gateway"
9797
]
9898
}
9999
}

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.1.13",
3+
"version": "3.1.14",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

packages/common/src/constraints/ScoreCandidates.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ export const scoreCandidate = async (
9696

9797
const latestCandidateLocation = await queries.getCandidateLocation(
9898
candidate.slotId,
99-
candidate.name,
100-
candidate.stash,
10199
);
102100

103101
const provider = latestCandidateLocation?.provider || "No Provider";

packages/common/src/constraints/ValidityChecks.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,7 @@ export const checkProvider = async (
361361
candidate: Candidate,
362362
): Promise<boolean> => {
363363
try {
364-
const location = await queries.getCandidateLocation(
365-
candidate.slotId,
366-
candidate.name,
367-
candidate.stash,
368-
);
364+
const location = await queries.getCandidateLocation(candidate.slotId);
369365
if (location && location.provider) {
370366
const bannedProviders = config.telemetry?.blacklistedProviders;
371367
if (bannedProviders?.includes(location.provider)) {

packages/common/src/constraints/Values.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ export const getLocationValues = async (
117117
const locationMap = new Map<string, number>();
118118
const locationArr: { name: string; numberOfNodes: number }[] = [];
119119
for (const candidate of validCandidates) {
120-
const candidateLocation = await getCandidateLocation(
121-
candidate.slotId,
122-
candidate.name,
123-
candidate.stash,
124-
);
120+
const candidateLocation = await getCandidateLocation(candidate.slotId);
125121
const location = candidateLocation?.city || NoLocation.NoLocation;
126122

127123
const locationCount = locationMap.get(location);
@@ -155,11 +151,7 @@ export const getRegionValues = async (
155151
const regionMap = new Map<string, number>();
156152
const regionArr: { name: string; numberOfNodes: number }[] = [];
157153
for (const candidate of validCandidates) {
158-
const candidateLocation = await getCandidateLocation(
159-
candidate.slotId,
160-
candidate.name,
161-
candidate.stash,
162-
);
154+
const candidateLocation = await getCandidateLocation(candidate.slotId);
163155
const region =
164156
candidateLocation && candidateLocation.region
165157
? candidateLocation.region
@@ -196,11 +188,7 @@ export const getCountryValues = async (
196188
const countryMap = new Map<string, number>();
197189
const countryArr: { name: string; numberOfNodes: number }[] = [];
198190
for (const candidate of validCandidates) {
199-
const candidateLocation = await getCandidateLocation(
200-
candidate.slotId,
201-
candidate.name,
202-
candidate.stash,
203-
);
191+
const candidateLocation = await getCandidateLocation(candidate.slotId);
204192
const country =
205193
candidateLocation && candidateLocation.country
206194
? candidateLocation.country
@@ -235,11 +223,7 @@ export const getProviderValues = async (
235223
const providerMap = new Map<string, number>();
236224
const providerArr: { name: string; numberOfNodes: number }[] = [];
237225
for (const candidate of validCandidates) {
238-
const candidateLocation = await getCandidateLocation(
239-
candidate.slotId,
240-
candidate.name,
241-
candidate.stash,
242-
);
226+
const candidateLocation = await getCandidateLocation(candidate.slotId);
243227
const provider =
244228
candidateLocation && candidateLocation.provider
245229
? candidateLocation.provider

0 commit comments

Comments
 (0)