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

Commit 9255d0f

Browse files
authored
Merge pull request #2845 from w3f/staging
Staging
2 parents 8b4e895 + dbb51eb commit 9255d0f

28 files changed

+280
-240
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.11
20+
targetRevision: v3.1.12
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.11
20+
targetRevision: v3.1.12
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.11
4-
appVersion: v3.1.11
3+
version: v3.1.12
4+
appVersion: v3.1.12
55
apiVersion: v2

charts/otv-backend/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,14 @@ config: |
8686
],
8787
"host": "wss://telemetry-backend.w3f.community/feed",
8888
"ipinfoToken": "token=xxx"
89+
},
90+
"logger": {
91+
"level": "info",
92+
"excludedLabels": [
93+
"Telemetry",
94+
"Location",
95+
"Block",
96+
"Gateway",
97+
]
8998
}
9099
}

helmfile.d/config/kusama/otv-backend-ci.yaml.gotmpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ config: |
1919
"test": false,
2020
"retroactive": false,
2121
"historicalNominations": false,
22-
"apiEndpoints": [],
22+
"apiEndpoints": [
23+
"wss://kusama-rpc-tn.dwellir.com",
24+
"wss://kusama-rpc.dwellir.com",
25+
"wss://kusama.public.curie.radiumblock.xyz/ws",
26+
"wss://rpc.ibp.network/kusama",
27+
"wss://rpc.dotters.network/kusama",
28+
"wss://ksm-rpc.stakeworld.io"
29+
],
2330
"candidatesUrl": "https://raw.githubusercontent.com/w3f/1k-validators-be/master/candidates/kusama.json"
2431
},
2532
"constraints": {

helmfile.d/config/polkadot/otv-backend-ci.yaml.gotmpl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ config: |
1919
"test": false,
2020
"retroactive": false,
2121
"historicalNominations": false,
22-
"apiEndpoints": [],
22+
"apiEndpoints": [
23+
"wss://rpc.dotters.network/polkadot",
24+
"wss://dot-rpc.stakeworld.io",
25+
"wss://polkadot.public.curie.radiumblock.co/ws",
26+
"wss://rpc.ibp.network/polkadot",
27+
"wss://polkadot-rpc-tn.dwellir.com"
28+
],
2329
"candidatesUrl": "https://raw.githubusercontent.com/w3f/1k-validators-be/master/candidates/polkadot.json"
2430
},
2531
"constraints": {

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

packages/common/src/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ export type ConfigSchema = {
162162
host: string;
163163
ipinfoToken: string;
164164
};
165+
logger: {
166+
level: string;
167+
excludedLabels: string[];
168+
};
165169
};
166170

167171
export const loadConfig = (configPath: string): ConfigSchema => {

packages/common/src/constraints/ValidityChecks.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ import logger from "../logger";
2323
import { constraintsLabel } from "./constraints";
2424
import { getLatestTaggedRelease } from "../scorekeeper/jobs/specificJobs";
2525

26-
export const checkOnline = async (candidate: any): Promise<boolean> => {
26+
export const checkOnline = async (candidate: Candidate): Promise<boolean> => {
2727
try {
28-
if (candidate && Number(candidate.onlineSince) === 0) {
29-
await setOnlineValidity(candidate.stash, false);
28+
const now = new Date().getTime();
29+
if (now - candidate.onlineSince > Constants.SIXTEEN_HOURS) {
30+
//TODO: reduce it after a first test
31+
await setOnlineValidity(candidate.slotId, false);
3032
return false;
3133
} else {
32-
await setOnlineValidity(candidate.stash, true);
34+
await setOnlineValidity(candidate.slotId, true);
3335
return true;
3436
}
35-
return true;
3637
} catch (e) {
3738
logger.error(`Error checking online status: ${e}`, constraintsLabel);
3839
throw new Error("could not make validity check");

packages/common/src/db/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ export const CandidateSchema = new Schema({
332332
offlineSince: { type: Number, default: 0 },
333333
// The cumulative duration of offline time (in ms).
334334
offlineAccumulated: { type: Number, default: 0 },
335-
// The timestamp for the most recent time the node has come online.
335+
// The timestamp for the most recent time the node has come online. TOFIX: wrong name, SINCE is misleading -> lastSeenOnline
336336
onlineSince: { type: Number, default: 0 },
337337
// Whether it is running the latest client code.
338338
updated: { type: Boolean, default: false },

0 commit comments

Comments
 (0)