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

Commit 33450db

Browse files
authored
Merge pull request #2688 from w3f/will-filtered
bump version to v3.1.2
2 parents 655fc39 + 3443e5d commit 33450db

File tree

13 files changed

+158
-98
lines changed

13 files changed

+158
-98
lines changed

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

Lines changed: 1 addition & 1 deletion
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.1
20+
targetRevision: v3.1.2
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

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

Lines changed: 1 addition & 1 deletion
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.1
20+
targetRevision: v3.1.2
2121
plugin:
2222
env:
2323
- name: HELM_VALUES

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.1
4-
appVersion: v3.1.1
3+
version: v3.1.2
4+
appVersion: v3.1.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.1.1",
3+
"version": "3.1.2",
44
"description": "Services for running the Thousand Validator Program.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

packages/common/src/nominator/nominator.ts

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export default class Nominator extends EventEmitter {
155155
const stash = await this.stash();
156156
const isBonded = await this.chaindata.isBonded(stash);
157157
const [bonded, err] = await this.chaindata.getDenomBondedAmount(stash);
158+
const currentBlock = await this.chaindata.getLatestBlock();
158159

159160
const currentEra = (await this.chaindata.getCurrentEra()) || 0;
160161
const lastNominationEra =
@@ -170,13 +171,15 @@ export default class Nominator extends EventEmitter {
170171
name = (await this.chaindata.getFormattedIdentity(target))?.name;
171172
}
172173

173-
const score = await queries.getLatestValidatorScore(target);
174+
const scoreResult = await queries.getLatestValidatorScore(target);
175+
const score =
176+
scoreResult && scoreResult.total ? scoreResult.total : 0;
174177

175178
return {
176179
stash: target,
177180
name: name,
178181
kyc: kyc,
179-
score: score && score[0] && score[0].total ? score[0].total : 0,
182+
score: score,
180183
};
181184
}),
182185
);
@@ -193,23 +196,29 @@ export default class Nominator extends EventEmitter {
193196
let name = await queries.getIdentityName(target);
194197

195198
if (!name) {
196-
name = (await this.chaindata.getFormattedIdentity(target))
197-
?.name;
199+
const formattedIdentity =
200+
await this.chaindata.getFormattedIdentity(target);
201+
name = formattedIdentity?.name;
198202
}
199203

200-
const score = await queries.getLatestValidatorScore(target);
204+
const scoreResult = await queries.getLatestValidatorScore(target);
205+
const score =
206+
scoreResult && scoreResult.total ? scoreResult.total : 0;
201207

202208
return {
203209
stash: target,
204210
name: name,
205211
kyc: kyc,
206-
score: score && score.total ? score.total : 0,
212+
score: score,
207213
};
208214
}),
209215
);
210-
216+
const executionMsTime =
217+
(this._proxyDelay + currentBlock - announcement.number) * 6 * 1000;
211218
return {
212-
namedTargets,
219+
...announcement,
220+
targets: namedTargets,
221+
executionTime: executionMsTime,
213222
};
214223
}),
215224
);

packages/common/src/scorekeeper/Round.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const startRound = async (
9999
);
100100
for (const nom of filteredNominators) {
101101
const nominatorStatus: NominatorStatus = {
102-
status: `[${index}/${allCandidates.length}] Checked Candidate ${candidate.name} ${isValid ? "✅ " : "❌"}`,
102+
status: `[${index}/${allCandidates.length}] ${candidate.name} ${isValid ? "✅ " : "❌"}`,
103103
updated: Date.now(),
104104
stale: false,
105105
};

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.1.1",
3+
"version": "3.1.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.1.1",
3+
"version": "3.1.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.1.1",
4+
"version": "3.1.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

0 commit comments

Comments
 (0)