Skip to content

Commit

Permalink
Merge pull request #2614 from w3f/will-v3.0.20
Browse files Browse the repository at this point in the history
v3.0.20
  • Loading branch information
wpank authored Feb 19, 2024
2 parents ce25b97 + 3341c41 commit 8a3cc83
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion apps/1kv-backend-staging/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.0.19
targetRevision: v3.0.20
plugin:
env:
- name: HELM_VALUES
Expand Down
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.0.19
targetRevision: v3.0.20
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.0.19
appVersion: v3.0.19
version: v3.0.20
appVersion: v3.0.20
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.0.19",
"version": "3.0.20",
"description": "Services for running the Thousand Validator Program.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions packages/common/src/db/queries/Nominator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export const addNominator = async (nominator: Nominator): Promise<boolean> => {
);
} catch (e) {
logger.info(JSON.stringify(e));
logger.error(`Could not add nominator: ${e}`);
logger.error(`Could not add nominator: ${JSON.stringify(nominator)}`);
}
};

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.0.19",
"version": "3.0.20",
"description": "Services for running the Thousand Validator Program.",
"main": "index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/nominator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default class Nominator {
return this._proxyDelay;
}

public async stash(): Promise<any> {
public async stash(): Promise<string> {
try {
const api = this.handler.getApi();
const ledger = await api.query.staking.ledger(this.bondedAddress);
Expand All @@ -100,7 +100,7 @@ export default class Nominator {
}
const { stash } = ledger.unwrap();

return stash;
return stash.toString();
} catch (e) {
logger.error(
`Error getting stash for ${this.bondedAddress}: ${e}`,
Expand All @@ -111,7 +111,7 @@ export default class Nominator {
}
}

public async payee(): Promise<any> {
public async payee(): Promise<string> {
const api = this.handler.getApi();
try {
const ledger = await api.query.staking.ledger(this.bondedAddress);
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/scorekeeper/Round.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ export const endRound = async (
// Gets adds candidates we nominated to the list
for (const nomGroup of nominatorGroups) {
for (const nominator of nomGroup) {
const current = await queries.getCurrentTargets(nominator.controller);
const current = await queries.getCurrentTargets(nominator.bondedAddress);

// If not nominating any... then return.
if (!current.length) {
logger.info(
`${nominator.controller} is not nominating any targets.`,
`${nominator.bondedAddress} is not nominating any targets.`,
scorekeeperLabel,
);
continue;
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/scorekeeper/scorekeeper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default class ScoreKeeper {
address: nom.bondedAddress,
stash: stash,
proxy: proxy,
bonded: bonded,
bonded: Number(bonded),
now: now,
proxyDelay: proxyDelay,
rewardDestination: payee,
Expand Down Expand Up @@ -138,7 +138,7 @@ export default class ScoreKeeper {
group.map(async (n) => {
const stash = await n.stash();
const proxy = (await n._isProxy) ? `/ ${n.address}` : "";
return `- ${n.controller} / ${stash} ${proxy}`;
return `- ${n.bondedAddress} / ${stash} ${proxy}`;
}),
)
).join("\n");
Expand All @@ -163,7 +163,7 @@ export default class ScoreKeeper {
)
).join("<br>");
logger.info(
`Nominator group added! Nominator addresses (Controller / Stash / Proxy):\n${nominatorGroupString}`,
`Nominator group added! Nominator addresses (Bonded Address / Stash / Proxy):\n${nominatorGroupString}`,
scorekeeperLabel,
);

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.0.19",
"version": "3.0.20",
"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/telemetry/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1kv/telemetry",
"version": "3.0.19",
"version": "3.0.20",
"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.0.19",
"version": "3.0.20",
"description": "Services for running the Thousand Validator Program.",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down

0 comments on commit 8a3cc83

Please sign in to comment.