Skip to content

Commit

Permalink
Merge branch 'master' into kubaw3f-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ironoa authored Feb 28, 2024
2 parents 6df68fc + 5803d82 commit ca2a423
Show file tree
Hide file tree
Showing 242 changed files with 279,681 additions and 9,478 deletions.
96 changes: 76 additions & 20 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/core test
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/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 @@ -120,6 +157,16 @@ jobs:
command: |
/scripts/publish-image.sh web3f/otv-backend
publishCoreImageStaging:
docker:
- image: web3f/ci-commons:v3.2.3
steps:
- checkout
- setup_remote_docker
- run:
command: |
/scripts/publish-image.sh web3f/otv-backend staging
publishGatewayImage:
docker:
- image: web3f/ci-commons:v3.2.3
Expand Down Expand Up @@ -183,14 +230,26 @@ workflows:
filters:
tags:
ignore: /pull\/[0-9]+/
- checkESLint:
# - checkCommonESLint:
# filters:
# tags:
# only: /.*/
- checkCoreESLint:
filters:
tags:
only: /.*/
- testCore:
- testCommonUnit:
filters:
tags:
only: /.*/
- testCommonInt:
filters:
tags:
only: /.*/
# - testCore:
# filters:
# tags:
# only: /.*/
- helmLint:
filters:
tags:
Expand Down Expand Up @@ -223,6 +282,8 @@ workflows:
- helmLint
- buildCoreImage
- buildGatewayImage
- testCommonUnit
- testCommonInt
- publishCoreImage:
context: dockerhub-bot
filters:
Expand All @@ -232,6 +293,13 @@ workflows:
only: /v[0-9]+(\.[0-9]+)*/
requires:
- integrationTests
- publishCoreImageStaging:
context: dockerhub-bot
filters:
branches:
only: staging
requires:
- integrationTests
- publishGatewayImage:
context: dockerhub-bot
filters:
Expand Down Expand Up @@ -268,17 +336,5 @@ workflows:
only: /v[0-9]+(\.[0-9]+)*/
requires:
- integrationTests
# - deploy:
# context:
# - digital_ocean_access
# - vault_community
# filters:
# branches:
# ignore: /.*/
# tags:
# only: /v[0-9]+(\.[0-9]+)*/
# requires:
# - publishCoreImage
# - publishChart


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
39 changes: 32 additions & 7 deletions apps/1kv-backend-staging/templates/kusama-otv-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ spec:
# prune: true
# selfHeal: true
source:
repoURL: https://w3f.github.io/helm-charts/
chart: otv-backend
targetRevision: v3.0.20
repoURL: 'https://github.com/w3f/1k-validators-be.git'
path: charts/otv-backend
targetRevision: staging
plugin:
env:
- name: HELM_VALUES
value: |
# image:
# tag: "latest"
image:
imagePullPolicy: Always
tag: staging
environment: {{ .Values.environment }}
dataPath: "/data"
backendPort: 3300
Expand All @@ -43,7 +44,12 @@ spec:
"global": {
"networkPrefix": 2,
"apiEndpoints": [
"wss://kusama-rpc.polkadot.io"
"wss://kusama-rpc-tn.dwellir.com",
"wss://kusama-rpc.dwellir.com",
"wss://kusama.public.curie.radiumblock.xyz/ws",
"wss://rpc.ibp.network/kusama",
"wss://rpc.dotters.network/kusama",
"wss://ksm-rpc.stakeworld.io"
],
"candidatesUrl": "https://raw.githubusercontent.com/w3f/1k-validators-be/master/candidates/kusama.json"
},
Expand All @@ -58,7 +64,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
43 changes: 33 additions & 10 deletions apps/1kv-backend-staging/templates/polkadot-otv-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ spec:
# prune: true
# selfHeal: true
source:
repoURL: https://w3f.github.io/helm-charts/
chart: otv-backend
targetRevision: v3.0.20
repoURL: 'https://github.com/w3f/1k-validators-be.git'
path: charts/otv-backend
targetRevision: staging
plugin:
env:
- name: HELM_VALUES
value: |
# image:
# tag: "latest"
image:
imagePullPolicy: Always
tag: staging
environment: {{ .Values.environment }}
dataPath: "/data"
backendPort: 3300
Expand All @@ -43,10 +44,13 @@ spec:
"global": {
"networkPrefix": 0,
"apiEndpoints": [
"wss://rpc.polkadot.io",
"wss://polkadot-rpc.dwellir.com"
],
"candidatesUrl": "https://raw.githubusercontent.com/w3f/1k-validators-be/master/candidates/polkadot.json"
"wss://rpc.dotters.network/polkadot",
"wss://dot-rpc.stakeworld.io",
"wss://polkadot.public.curie.radiumblock.co/ws",
"wss://rpc.ibp.network/polkadot",
"wss://polkadot-rpc-tn.dwellir.com"
],
"candidatesUrl": "https://raw.githubusercontent.com/w3f/1k-validators-be/master/candidates/polkadot.json"
},
"constraints": {
"skipConnectionTime": false,
Expand All @@ -59,7 +63,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
27 changes: 24 additions & 3 deletions 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.0.19
targetRevision: v3.0.21
plugin:
env:
- name: HELM_VALUES
Expand All @@ -41,9 +41,12 @@ spec:
"global": {
"networkPrefix": 2,
"apiEndpoints": [
"wss://kusama-rpc.polkadot.io",
"wss://kusama-rpc-tn.dwellir.com",
"wss://kusama-rpc.dwellir.com",
"wss://kusama.public.curie.radiumblock.xyz/ws"
"wss://kusama.public.curie.radiumblock.xyz/ws",
"wss://rpc.ibp.network/kusama",
"wss://rpc.dotters.network/kusama",
"wss://ksm-rpc.stakeworld.io"
],
"candidatesUrl": "https://raw.githubusercontent.com/w3f/1k-validators-be/master/candidates/kusama.json"
},
Expand All @@ -60,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
Loading

0 comments on commit ca2a423

Please sign in to comment.