Skip to content

Commit 272c17e

Browse files
authored
Merge pull request #296 from credebl/develop
merge: develop to qa
2 parents 8f40640 + 81cf411 commit 272c17e

62 files changed

Lines changed: 10361 additions & 13370 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.demo

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ RPC_URL=https://polygon-rpc.com
2323
SERVER_URL=https://schema.credebl.id
2424
FILE_SERVER_TOKEN=
2525

26+
OTEL_SERVICE_NAME='CREDEBL-CREDO-CONTROLLER-SERVICE'
27+
OTEL_SERVICE_VERSION='1.0.0'
28+
OTEL_TRACES_OTLP_ENDPOINT='http://localhost:4318/v1/traces'
29+
OTEL_LOGS_OTLP_ENDPOINT='http://localhost:4318/v1/logs'
30+
OTEL_HEADERS_KEY='88caXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
31+
OTEL_LOGGER_NAME='credo-controller-logger'
32+
2633
BCOVRIN_TEST_GENESIS='{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"138.197.138.255","client_port":9702,"node_ip":"138.197.138.255","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}
2734
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"138.197.138.255","client_port":9704,"node_ip":"138.197.138.255","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}
2835
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node3","blskey":"3WFpdbg7C5cnLYZwFZevJqhubkFALBfCBBok15GdrKMUhUjGsk3jV6QKj6MZgEubF7oqCafxNdkm7eswgA4sdKTRc82tLGzZBd6vNqU8dupzup6uYUf32KTHTPQbuUM8Yk4QFXjEf2Usu2TJcNkdgpyeUSX42u5LqdDDpNSWUK5deC5","blskey_pop":"QwDeb2CkNSx6r8QC8vGQK3GRv7Yndn84TGNijX8YXHPiagXajyfTjoR87rXUu4G4QLk2cF8NNyqWiYMus1623dELWwx57rLCFqGh7N4ZRbGDRP4fnVcaKg1BcUxQ866Ven4gw8y4N56S5HzxXNBZtLYmhGHvDtk6PFkFwCvxYrNYjh","client_ip":"138.197.138.255","client_port":9706,"node_ip":"138.197.138.255","node_port":9705,"services":["VALIDATOR"]},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya"},"metadata":{"from":"4cU41vWW82ArfxJxHkzXPG"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4"},"ver":"1"}

.eslintrc.js

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/dco.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
allowRemediationCommits:
2+
individual: true
3+
thirdParty: true

.github/workflows/continuous-delivery.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
id: get_tag
2727
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
2828

29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
2935
- name: Log in to GitHub Container Registry
3036
uses: docker/login-action@v3
3137
with:
@@ -39,8 +45,7 @@ jobs:
3945
context: .
4046
file: Dockerfile
4147
push: true
48+
platforms: linux/amd64,linux/arm64
4249
tags: |
4350
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:${{ env.TAG }}
4451
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVICE }}:latest
45-
46-

.github/workflows/continuous-integration.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ name: Continuous Integration
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches: [main, develop]
66
push:
7-
branches: [main]
7+
branches: [main, develop]
88

99
concurrency:
1010
# Cancel previous runs that are not completed yet
11-
group: afj-controller-${{ github.ref }}-${{ github.repository }}-${{ github.event_name }}
11+
group: credo-controller-${{ github.ref }}-${{ github.repository }}-${{ github.event_name }}
1212
cancel-in-progress: true
1313

1414
jobs:
1515
validate:
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-24.04
1717
name: Validate
1818
steps:
19-
- name: Checkout afj-controller
19+
- name: Checkout credo-controller
2020
uses: actions/checkout@v4
2121

22-
- name: Setup NodeJS
23-
uses: actions/setup-node@v3
22+
- name: Setup node v20
23+
uses: actions/setup-node@v4
2424
with:
25-
node-version: 18.19.0
25+
node-version: 20
2626
cache: 'yarn'
2727

2828
- name: Install dependencies

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COPY . .
1111

1212
# Install dependencies
1313
RUN rm -rf node_modules
14-
RUN yarn install --frozen-lockfile
14+
RUN yarn install --frozen-lockfile --network-timeout 600000
1515

1616
RUN yarn global add patch-package
1717

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const run = async () => {
131131
{
132132
// ... AFJ Config ... //
133133
},
134-
agentDependencies
134+
agentDependencies,
135135
)
136136
await startServer(agent, { port: 3000 })
137137
}

bin/afj-rest.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env node
2-
/* eslint-disable @typescript-eslint/no-var-requires, no-undef */
3-
4-
const { runCliServer } = require('../build/cli')
5-
6-
runCliServer()
2+
import('../build/cli.js')
3+
.then((module) => {
4+
module.runCliServer()
5+
})
6+
.catch((err) => {
7+
console.error('Error starting CLI server:', err)
8+
process.exit(1)
9+
})

eslint.config.mjs

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import { fileURLToPath } from 'url';
2+
import { dirname } from 'path';
3+
import eslintPluginImport from 'eslint-plugin-import';
4+
import eslintPluginPrettier from 'eslint-plugin-prettier';
5+
import eslintPluginTypescript from '@typescript-eslint/eslint-plugin';
6+
import parser from '@typescript-eslint/parser';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
11+
export default [
12+
{
13+
ignores: [
14+
'**/tests/*',
15+
'**/build/**',
16+
'**/*.js',
17+
'**/*.d.ts',
18+
],
19+
files: ['**/*.ts'],
20+
languageOptions: {
21+
parser,
22+
parserOptions: {
23+
tsconfigRootDir: __dirname,
24+
project: ['./tsconfig.eslint.json'],
25+
sourceType: 'module',
26+
},
27+
globals: {
28+
console: false, // no-console rule
29+
},
30+
},
31+
plugins: {
32+
'@typescript-eslint': eslintPluginTypescript,
33+
import: eslintPluginImport,
34+
prettier: eslintPluginPrettier,
35+
},
36+
rules: {
37+
'no-constant-condition': 'warn',
38+
'@typescript-eslint/no-explicit-any': 'warn',
39+
'@typescript-eslint/explicit-function-return-type': 'off',
40+
'@typescript-eslint/explicit-module-boundary-types': 'off',
41+
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
42+
'@typescript-eslint/explicit-member-accessibility': 'error',
43+
'no-console': 'error',
44+
'@typescript-eslint/ban-ts-comment': 'warn',
45+
'@typescript-eslint/consistent-type-imports': 'error',
46+
'import/no-cycle': 'error',
47+
'import/order': [
48+
'error',
49+
{
50+
groups: ['type', ['builtin', 'external'], 'parent', 'sibling', 'index'],
51+
alphabetize: {
52+
order: 'asc',
53+
},
54+
'newlines-between': 'always',
55+
},
56+
],
57+
'import/no-extraneous-dependencies': [
58+
'error',
59+
{
60+
devDependencies: false,
61+
},
62+
],
63+
'prettier/prettier': 'error',
64+
},
65+
},
66+
{
67+
files: ['jest.config.ts', 'eslint.config.js'],
68+
languageOptions: {
69+
parserOptions: {
70+
sourceType: 'commonjs',
71+
},
72+
globals: {
73+
require: true,
74+
module: true,
75+
__dirname: true,
76+
},
77+
},
78+
},
79+
{
80+
files: ['*.test.ts', '**/__tests__/**', '**/tests/**', 'jest.*.ts', '**/samples/**'],
81+
languageOptions: {
82+
globals: {
83+
describe: true,
84+
test: true,
85+
expect: true,
86+
jest: true,
87+
},
88+
},
89+
rules: {
90+
'import/no-extraneous-dependencies': [
91+
'error',
92+
{
93+
devDependencies: true,
94+
},
95+
],
96+
},
97+
},
98+
];

0 commit comments

Comments
 (0)