Skip to content

Commit

Permalink
Merge pull request #2616 from w3f/will-v3.0.21
Browse files Browse the repository at this point in the history
v3.0.22
  • Loading branch information
wpank authored Feb 28, 2024
2 parents 4bf25bf + fd41093 commit fb49294
Show file tree
Hide file tree
Showing 237 changed files with 279,594 additions and 9,434 deletions.
65 changes: 57 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
command: |
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/core test:candidates
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/common ci:checkCandidatesFile
checkESLint:
checkCoreESLint:
docker:
- image: node:18
resource_class: large
Expand All @@ -34,17 +34,54 @@ jobs:
command: |
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/core lint
testCore:
# checkCommonESLint:
# docker:
# - image: node:18
# resource_class: large
# steps:
# - checkout
# - run:
# environment:
# YARN_ENABLE_IMMUTABLE_INSTALLS: false
# command: |
# yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/common lint


testCommonUnit:
docker:
- image: node:18
resource_class: large
- image: node:bullseye
resource_class: xlarge
steps:
- checkout
- run:
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
command: |
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/common test:unit --testTimeout=60000
testCommonInt:
docker:
- image: node:bullseye
resource_class: xlarge
steps:
- checkout
- run:
environment:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
command: |
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/core test
yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/common test:int --testTimeout=60000
# testCore:
# docker:
# - image: node:18
# resource_class: large
# steps:
# - checkout
# - run:
# environment:
# YARN_ENABLE_IMMUTABLE_INSTALLS: false
# command: |
# yarn set version 3.2.2 && yarn install && yarn build && yarn workspace @1kv/core test

helmLint:
docker:
Expand Down Expand Up @@ -183,14 +220,26 @@ workflows:
filters:
tags:
ignore: /pull\/[0-9]+/
- checkESLint:
# - checkCommonESLint:
# filters:
# tags:
# only: /.*/
- checkCoreESLint:
filters:
tags:
only: /.*/
- testCommonUnit:
filters:
tags:
only: /.*/
- testCore:
- testCommonInt:
filters:
tags:
only: /.*/
# - testCore:
# filters:
# tags:
# only: /.*/
- helmLint:
filters:
tags:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ docs/.DS_Store
/packages/common/kusama-slots.json
/packages/common/polkadot-slots.json
/packages/core/coverage/
/packages/common/coverage/
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ RUN echo "building ${PACKAGE}... "; \
yarn install; \
echo "yarn install done. Building...." ; \
yarn build; \
echo "building ${PACKAGE} done."
CMD yarn run start:js:${PACKAGE}

echo "building ${PACKAGE} done."; \
apt-get update && \
apt-get install -y libssl-dev && \
apt-get clean
CMD yarn run start:js:${PACKAGE}
5 changes: 4 additions & 1 deletion Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ RUN echo "building ${PACKAGE}... "; \
yarn install; \
echo "yarn install done. Building...." ; \
yarn build; \
echo "building ${PACKAGE} done."
echo "building ${PACKAGE} done."; \
apt-get update && \
apt-get install -y libssl-dev && \
apt-get clean
CMD yarn run start:dev:${PACKAGE}
6 changes: 3 additions & 3 deletions apps/1kv-backend-staging/config/kusama-score.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"inclusion": "220",
"spanInclusion": "220",
"discovered": "5",
"nominated": "80",
"rank": "5",
"discovered": "30",
"nominated": "100",
"rank": "50",
"bonded": "50",
"faults": "5",
"offline": "2",
Expand Down
6 changes: 3 additions & 3 deletions apps/1kv-backend-staging/config/polkadot-score.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"inclusion": "220",
"spanInclusion": "220",
"discovered": "5",
"nominated": "80",
"rank": "5",
"discovered": "30",
"nominated": "100",
"rank": "50",
"bonded": "50",
"faults": "5",
"offline": "2",
Expand Down
23 changes: 21 additions & 2 deletions 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.21
targetRevision: v3.0.22
plugin:
env:
- name: HELM_VALUES
Expand Down Expand Up @@ -63,7 +63,26 @@ spec:
"unclaimedEraThreshold": 4
},
"cron": {
"monitor": "0 */15 * * * *"
"monitor": "0 */15 * * * *",
"monitorEnabled": true,
"clearOfflineEnabled": true,
"validityEnabled": true,
"scoreEnabled": true,
"executionEnabled": true,
"scorekeeperEnabled": true,
"rewardClaimingEnabled": true,
"cancelEnabled": true,
"staleEnabled": true,
"eraPointsEnabled": true,
"eraStatsEnabled": true,
"activeValidatorEnabled": true,
"inclusionEnabled": true,
"sessionKeyEnabled": true,
"unclaimedErasEnabled": true,
"validatorPrefEnabled": true,
"nominatorEnabled": true,
"locationStatsEnabled": true,
"blockEnabled": true
},
"db": {
"mongo": {
Expand Down
23 changes: 21 additions & 2 deletions apps/1kv-backend-staging/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.0.21
targetRevision: v3.0.22
plugin:
env:
- name: HELM_VALUES
Expand Down Expand Up @@ -62,7 +62,26 @@ spec:
"unclaimedEraThreshold": 1
},
"cron": {
"monitor": "0 */15 * * * *"
"monitor": "0 */15 * * * *",
"monitorEnabled": true,
"clearOfflineEnabled": true,
"validityEnabled": true,
"scoreEnabled": true,
"executionEnabled": true,
"scorekeeperEnabled": true,
"rewardClaimingEnabled": true,
"cancelEnabled": true,
"staleEnabled": true,
"eraPointsEnabled": true,
"eraStatsEnabled": true,
"activeValidatorEnabled": true,
"inclusionEnabled": true,
"sessionKeyEnabled": true,
"unclaimedErasEnabled": true,
"validatorPrefEnabled": true,
"nominatorEnabled": true,
"locationStatsEnabled": true,
"blockEnabled": true
},
"db": {
"mongo": {
Expand Down
18 changes: 18 additions & 0 deletions apps/1kv-backend/templates/kusama-otv-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ spec:
},
"cron": {
"monitor": "0 */15 * * * *",
"monitorEnabled": true,
"clearOfflineEnabled": true,
"validityEnabled": true,
"scoreEnabled": true,
"executionEnabled": true,
"scorekeeperEnabled": true,
"rewardClaimingEnabled": true,
"cancelEnabled": true,
"staleEnabled": true,
"eraPointsEnabled": true,
"eraStatsEnabled": true,
"activeValidatorEnabled": true,
"inclusionEnabled": true,
"sessionKeyEnabled": true,
"unclaimedErasEnabled": true,
"validatorPrefEnabled": true,
"nominatorEnabled": true,
"locationStatsEnabled": true,
"blockEnabled": false
},
"db": {
Expand Down
18 changes: 18 additions & 0 deletions apps/1kv-backend/templates/polkadot-otv-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ spec:
},
"cron": {
"monitor": "0 */15 * * * *",
"monitorEnabled": true,
"clearOfflineEnabled": true,
"validityEnabled": true,
"scoreEnabled": true,
"executionEnabled": true,
"scorekeeperEnabled": true,
"rewardClaimingEnabled": true,
"cancelEnabled": true,
"staleEnabled": true,
"eraPointsEnabled": true,
"eraStatsEnabled": true,
"activeValidatorEnabled": true,
"inclusionEnabled": true,
"sessionKeyEnabled": true,
"unclaimedErasEnabled": true,
"validatorPrefEnabled": true,
"nominatorEnabled": true,
"locationStatsEnabled": true,
"blockEnabled": false
},
"db": {
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.21
appVersion: v3.0.21
version: v3.0.22
appVersion: v3.0.22
apiVersion: v2
18 changes: 18 additions & 0 deletions jest.workspace.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
projects: [
"<rootDir>/packages/common/jest.unit.config.js",
"<rootDir>/packages/core/jest.unit.config.js",
"<rootDir>/packages/common/jest.int.config.js",
"<rootDir>/packages/core/jest.int.config.js",
],
collectCoverageFrom: [
"src/**/*.{ts,tsx}", // Adjust the pattern to match your project's file structure
"!src/**/*.test.{js,jsx,ts,tsx}", // Exclude test files
// Add more patterns to exclude or include files as needed
],
transform: {
"^.+\\.ts$": ["ts-jest", { tsconfig: "tsconfig.test.json" }],
},
setupFilesAfterEnv: ["<rootDir>/packages/common/test/jest.setup.js"],
testTimeout: 300000,
};
32 changes: 29 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"yarnPath": ".yarn/releases/yarn-3.2.2.cjs",
"private": true,
"workspaces": [
"packages/scorekeeper-status-ui",
"packages/common",
"packages/worker",
"packages/gateway",
Expand All @@ -12,6 +13,8 @@
],
"scripts": {
"docs": "cd docs && npm install && npm run build ",
"scorekeeper-status-ui:build": "cd packages/scorekeeper-status-ui && npm build",
"scorekeeper-status-ui:dev": "yarn workspace @1kv/scorekeeper-status-ui dev",
"open:polkadot-apps": "open-cli https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/staking",
"open:bull": "open-cli http://localhost:3301/bull",
"open:mongo-express: ": "open-cli http://localhost:8888",
Expand Down Expand Up @@ -40,7 +43,7 @@
"lint": "yarn workspaces foreach run lint",
"lint:fix": "yarn workspaces foreach run lint:fix",
"clean": "rm -rf redis/ && yarn workspaces foreach run clean",
"build": "yarn run docs && yarn workspaces foreach -t run build",
"build": "yarn run docs && yarn workspaces foreach -t run build",
"build:clean": "yarn workspaces foreach run clean:build",
"start:dev:gateway": "yarn workspace @1kv/gateway run start:dev",
"start:js:gateway": "NODE_OPTIONS='--max-old-space-size=10096' yarn workspace @1kv/gateway run js:start",
Expand All @@ -50,7 +53,12 @@
"start:js:telemetry": "NODE_OPTIONS='--max-old-space-size=10096' yarn workspace @1kv/telemetry run js:start",
"start:dev:worker": "yarn workspace @1kv/worker run start:dev",
"start:js:worker": "NODE_OPTIONS='--max-old-space-size=10096' yarn workspace @1kv/worker run js:start",
"test:core": "yarn workspace @1kv/core run test"
"test:core": "yarn workspace @1kv/core run test",
"test:common:int": "yarn workspace @1kv/common run test:int",
"test:common:unit": "yarn workspace @1kv/common run test:unit",
"test:all": "yarn workspaces foreach run test",
"test": "jest --config jest.workspace.config.js",
"test:watch": "jest --config jest.workspace.config.js --watch"
},
"devDependencies": {
"@types/coingecko-api": "^1.0.13",
Expand All @@ -66,22 +74,40 @@
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "5.0.0",
"prettier": "^3.2.4",
"ts-jest": "^29.1.2"
"ts-jest": "latest"
},
"dependencies": {
"@polkadot/api": "^10.11.2",
"@polkadot/rpc-provider": "^10.11.2",
"@types/ws": "^8.5.10",
"axios": "^1.6.7",
"chalk": "4.1.2",
"coingecko-api": "^1.0.10",
"coingecko-api-v3": "^0.0.29",
"date-fns": "^3.3.1",
"koa-mount": "^4.0.0",
"koa-send": "^5.0.1",
"koa-static": "^5.0.0",
"koa-swagger-decorator": "^1.8.7",
"lru-cache": "latest",
"mongodb-memory-server": "^9.1.6",
"node-fetch": "3.3.2",
"request": "^2.88.2",
"swagger-jsdoc": "^6.2.8",
"swagger2": "^4.0.3",
"swagger2-koa": "^4.0.0",
"ws": "^8.16.0",
"yamljs": "^0.3.0"
},
"jest": {
"projects": [
"<rootDir>/packages/*/jest.unit.config.js",
"<rootDir>/packages/*/jest.int.config.js"
],
"preset": "ts-jest",
"testEnvironment": "node",
"transform": {
"^.+\\.tsx?$": "ts-jest"
}
}
}
Loading

0 comments on commit fb49294

Please sign in to comment.