Skip to content

Commit

Permalink
Merge pull request #2688 from w3f/will-filtered
Browse files Browse the repository at this point in the history
bump version to v3.1.2
  • Loading branch information
wpank committed Mar 2, 2024
2 parents 655fc39 + 3443e5d commit 33450db
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 98 deletions.
2 changes: 1 addition & 1 deletion apps/1kv-backend/templates/kusama-otv-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
source:
repoURL: https://w3f.github.io/helm-charts/
chart: otv-backend
targetRevision: v3.1.1
targetRevision: v3.1.2
plugin:
env:
- name: HELM_VALUES
Expand Down
2 changes: 1 addition & 1 deletion apps/1kv-backend/templates/polkadot-otv-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
source:
repoURL: https://w3f.github.io/helm-charts/
chart: otv-backend
targetRevision: v3.1.1
targetRevision: v3.1.2
plugin:
env:
- name: HELM_VALUES
Expand Down
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.1.1
appVersion: v3.1.1
version: v3.1.2
appVersion: v3.1.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.1.1",
"version": "3.1.2",
"description": "Services for running the Thousand Validator Program.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
25 changes: 17 additions & 8 deletions packages/common/src/nominator/nominator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export default class Nominator extends EventEmitter {
const stash = await this.stash();
const isBonded = await this.chaindata.isBonded(stash);
const [bonded, err] = await this.chaindata.getDenomBondedAmount(stash);
const currentBlock = await this.chaindata.getLatestBlock();

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

const score = await queries.getLatestValidatorScore(target);
const scoreResult = await queries.getLatestValidatorScore(target);
const score =
scoreResult && scoreResult.total ? scoreResult.total : 0;

return {
stash: target,
name: name,
kyc: kyc,
score: score && score[0] && score[0].total ? score[0].total : 0,
score: score,
};
}),
);
Expand All @@ -193,23 +196,29 @@ export default class Nominator extends EventEmitter {
let name = await queries.getIdentityName(target);

if (!name) {
name = (await this.chaindata.getFormattedIdentity(target))
?.name;
const formattedIdentity =
await this.chaindata.getFormattedIdentity(target);
name = formattedIdentity?.name;
}

const score = await queries.getLatestValidatorScore(target);
const scoreResult = await queries.getLatestValidatorScore(target);
const score =
scoreResult && scoreResult.total ? scoreResult.total : 0;

return {
stash: target,
name: name,
kyc: kyc,
score: score && score.total ? score.total : 0,
score: score,
};
}),
);

const executionMsTime =
(this._proxyDelay + currentBlock - announcement.number) * 6 * 1000;
return {
namedTargets,
...announcement,
targets: namedTargets,
executionTime: executionMsTime,
};
}),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/scorekeeper/Round.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const startRound = async (
);
for (const nom of filteredNominators) {
const nominatorStatus: NominatorStatus = {
status: `[${index}/${allCandidates.length}] Checked Candidate ${candidate.name} ${isValid ? "✅ " : "❌"}`,
status: `[${index}/${allCandidates.length}] ${candidate.name} ${isValid ? "✅ " : "❌"}`,
updated: Date.now(),
stale: false,
};
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.1.1",
"version": "3.1.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.1.1",
"version": "3.1.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.1.1",
"version": "3.1.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
Loading

0 comments on commit 33450db

Please sign in to comment.