This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 14 files changed +55
-27
lines changed
1kv-backend-staging/templates Expand file tree Collapse file tree 14 files changed +55
-27
lines changed Original file line number Diff line number Diff line change @@ -123,5 +123,14 @@ spec:
123123 "Contabo GmbH"
124124 ],
125125 "host": "wss://telemetry-backend.w3f.community/feed"
126+ },
127+ "logger": {
128+ "level": "info",
129+ "excludedLabels": [
130+ "Telemetry",
131+ "Location",
132+ "Block",
133+ "Gateway",
134+ ]
126135 }
127136 }
Original file line number Diff line number Diff line change @@ -122,5 +122,14 @@ spec:
122122 "Contabo GmbH"
123123 ],
124124 "host": "wss://telemetry-backend.w3f.community/feed"
125+ },
126+ "logger": {
127+ "level": "info",
128+ "excludedLabels": [
129+ "Telemetry",
130+ "Location",
131+ "Block",
132+ "Gateway",
133+ ]
125134 }
126135 }
Original file line number Diff line number Diff line change 1717 source :
1818 repoURL : https://w3f.github.io/helm-charts/
1919 chart : otv-backend
20- targetRevision : v3.1.12
20+ targetRevision : v3.1.13
2121 plugin :
2222 env :
2323 - name : HELM_VALUES
@@ -121,5 +121,14 @@ spec:
121121 ],
122122 "host": "wss://telemetry-backend.w3f.community/feed",
123123 "ipinfoToken": "token=<path:vaults/k8s-community-secrets/items/otv-kusama#ipinfo-token>"
124+ },
125+ "logger": {
126+ "level": "info",
127+ "excludedLabels": [
128+ "Telemetry",
129+ "Location",
130+ "Block",
131+ "Gateway",
132+ ]
124133 }
125134 }
Original file line number Diff line number Diff line change 1717 source :
1818 repoURL : https://w3f.github.io/helm-charts/
1919 chart : otv-backend
20- targetRevision : v3.1.12
20+ targetRevision : v3.1.13
2121 plugin :
2222 env :
2323 - name : HELM_VALUES
@@ -120,5 +120,14 @@ spec:
120120 ],
121121 "host": "wss://telemetry-backend.w3f.community/feed",
122122 "ipinfoToken": "token=<path:vaults/k8s-community-secrets/items/otv-polkadot#ipinfo-token>"
123+ },
124+ "logger": {
125+ "level": "info",
126+ "excludedLabels": [
127+ "Telemetry",
128+ "Location",
129+ "Block",
130+ "Gateway",
131+ ]
123132 }
124133 }
Original file line number Diff line number Diff line change 11description : 1K Validators Backend
22name : otv-backend
3- version : v3.1.12
4- appVersion : v3.1.12
3+ version : v3.1.13
4+ appVersion : v3.1.13
55apiVersion : v2
Original file line number Diff line number Diff line change 11{
22 "name" : " @1kv/common" ,
3- "version" : " 3.1.12 " ,
3+ "version" : " 3.1.13 " ,
44 "description" : " Services for running the Thousand Validator Program." ,
55 "main" : " build/index.js" ,
66 "types" : " build/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ export const reportOnline = async (
505505 await mergeTelemetryNodeToCandidate ( candidate ) ;
506506
507507 // Try and update or make a new Location record
508- await fetchAndSetCandidateLocation ( telemetryNodeDetails ) ;
508+ await fetchAndSetCandidateLocation ( candidate , telemetryNodeDetails ) ;
509509
510510 // Update the candidate online validity
511511 await setCandidateOnlineValid ( candidate ) ;
Original file line number Diff line number Diff line change @@ -9,18 +9,11 @@ export const filterCandidateInvalidityFields = (
99 candidate : Candidate ,
1010 filter : InvalidityReasonType ,
1111) : InvalidityReason [ ] => {
12- if ( ! candidate || ! candidate ?. invalidity )
13- throw new Error (
14- `NO CANDIDATE DATA FOUND FOR CANDIDATE with slotId ${ candidate . slotId } ` ,
15- ) ;
16-
17- const invalidityReasons = candidate ?. invalidity ?. filter (
18- ( invalidityReason ) => {
19- return invalidityReason . type !== filter ;
20- } ,
12+ return (
13+ candidate ?. invalidity ?. filter (
14+ ( invalidityReason ) => invalidityReason . type !== filter ,
15+ ) || [ ]
2116 ) ;
22-
23- return invalidityReasons ;
2417} ;
2518
2619export const setCandidateInvalidity = async (
Original file line number Diff line number Diff line change 11import {
2+ Candidate ,
23 getCandidateByName ,
4+ getCandidateLocation ,
35 getIIT ,
4- getLocation ,
56 removeIIT ,
67 setIIT ,
78 setLocation ,
@@ -101,13 +102,11 @@ export const nodeDetailsFromTelemetryMessage = (
101102} ;
102103
103104export const fetchAndSetCandidateLocation = async (
105+ candidate : Candidate ,
104106 telemetryNodeDetails : TelemetryNodeDetails ,
105107) => {
106108 // See if there's an existing location for the given telemetry data
107- const existingLocation = await getLocation (
108- telemetryNodeDetails . name ,
109- telemetryNodeDetails . ipAddress ,
110- ) ;
109+ const existingLocation = await getCandidateLocation ( candidate . slotId ) ;
111110
112111 // Fetch and set a new location if:
113112 // - There's no existing location
Original file line number Diff line number Diff line change 11{
22 "name" : " @1kv/core" ,
3- "version" : " 3.1.12 " ,
3+ "version" : " 3.1.13 " ,
44 "description" : " Services for running the Thousand Validator Program." ,
55 "main" : " index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments