Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e1f1ec2
initial commit
bonustrack May 30, 2023
747a490
feat: add rpc route
bonustrack May 30, 2023
b71aab0
feat: add multiple nodes with algorithm
bonustrack May 30, 2023
976717e
chore: remove logs
bonustrack May 30, 2023
63b8626
fix: build script
bonustrack May 30, 2023
051ae5a
fix: move to mysql2 with v8
bonustrack May 30, 2023
ce5fd22
fix: move to bayesian-bandit
bonustrack May 31, 2023
823e09a
fix: update config var name
bonustrack May 31, 2023
9e163af
feat: add archive and network check
bonustrack Jun 1, 2023
384f6df
chore: move up home route
bonustrack Jun 1, 2023
6328dc1
feat: handle eth_chainId calls
bonustrack Jun 3, 2023
de0333d
Fix eth_chainId
ChaituVR Jun 6, 2023
ea50b48
feat: cache request with redis
bonustrack Jun 6, 2023
4c4b109
feat(debug): initial debug implementation (#228)
Todmy Aug 7, 2023
980cf28
refactor(mysql): moved queries to separate file (#235)
Todmy Aug 18, 2023
c04bd07
feat(sentry): add sentry support (#236)
Todmy Aug 18, 2023
ad5dcfb
feat(redis): improve caching (#238)
Todmy Aug 23, 2023
6efc908
feat(bayesian bandit): improvements (#253)
Todmy Aug 23, 2023
6685111
feat(node monitoring): monitor node health each 20 minutes (#254)
Todmy Aug 23, 2023
2485ccd
refactor(bayesian algo): simplified the usage (#256)
Todmy Aug 23, 2023
c6abb73
feat(ui): ui app (#257)
Todmy Oct 1, 2023
83e2713
Todmy/load tests (#279)
Todmy Oct 6, 2023
d78d6a0
refactor(sentry): change direct sentry usage to internal package (#296)
Todmy Oct 12, 2023
b0c4128
feat(metrics): add metrics to the server (#297)
Todmy Oct 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DATABASE_URL=
REDIS_DATABASE_URL=

SENTRY_DSN=
SENTRY_TRACE_SAMPLE_RATE=
23 changes: 0 additions & 23 deletions .eslintrc

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/updateRPC.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ node_modules
dist
build
.env
.clinic
coverage

# Remove some common IDE working directories
.idea
.vscode
*.log
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Running load tests with Artillery

You can run load tests on the API using Artillery. To do so, follow these steps:

1. Clone the repository and `cd` into it.
2. Copy the `.env.example` file to `.env` and set necessary values.
3. Run `npm install` to install dependencies.
4. Install Artillery globally by running `npm install -g artillery`.
5. Run your server using `npm start`. (or other method)
6. Run `artillery run -t <your server url> ./test/load/<test-file>.yml` to run the load test. Example: `artillery run -t http://localhost:3000 ./test/load/1k.yml`
9 changes: 9 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
apps: [
{
script: './dist/src/index.js',
instances: 'max',
exec_mode: 'cluster'
}
]
};
20 changes: 20 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/

export default {
clearMocks: true,
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',

// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/dist/', '<rootDir>/test/fixtures/'],

preset: 'ts-jest',
testEnvironment: 'node',
setupFiles: ['dotenv/config'],
//setupFilesAfterEnv: ['<rootDir>src/setupTests.ts'],
moduleFileExtensions: ['js', 'ts']
};
57 changes: 37 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
{
"name": "brovider",
"version": "0.1.0",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"lint": "eslint . --ext .ts --fix",
"build": "tsc",
"lint": "eslint src/ --ext .ts --fix",
"build": "tsc -p tsconfig.json",
"dev": "nodemon src/index.ts",
"start": "node dist/src/index.js"
"start": "node dist/src/index.js",
"start:pm2": "pm2 start --name brovider --no-daemon ecosystem.config.js",
"test": "jest"
},
"eslintConfig": {
"extends": "@snapshot-labs"
},
"prettier": "@snapshot-labs/prettier-config",
"dependencies": {
"@ethersproject/providers": "^5.7.1",
"body-parser": "^1.20.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@snapshot-labs/snapshot-metrics": "^1.3.1",
"@snapshot-labs/snapshot-sentry": "^1.5.1",
"@types/express": "^4.17.11",
"@types/jest": "^27.5.0",
"@types/mysql": "^2.15.21",
"@types/node": "^18.11.6",
"bayesian-bandit": "^0.10.0",
"connection-string": "^4.4.0",
"cors": "^2.8.5",
"croner": "^6.0.6",
"cross-fetch": "^3.1.5",
"dotenv": "^16.0.1",
"eslint": "^6.7.2",
"express": "^4.18.1",
"express-http-proxy": "^1.6.3",
"nodemon": "^2.0.16",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"request": "^2.88.2",
"ts-node": "^10.9.1",
"typescript": "^4.8.3"
"http-proxy-middleware": "^2.0.6",
"lodash.groupby": "^4.6.0",
"mysql2": "^3.3.3",
"nodemon": "^2.0.19",
"redis": "^4.6.7",
"ts-node": "^10.8.1",
"typescript": "^4.9.3"
},
"devDependencies": {
"@types/express": "^4.17.14",
"@types/node": "^18.7.23",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"eslint-plugin-prettier": "^3.1.3",
"prettier": "^2.7.1"
"@snapshot-labs/eslint-config": "^0.1.0-beta.7",
"@snapshot-labs/prettier-config": "^0.1.0-beta.7",
"eslint": "^8.28.0",
"jest": "^27.5.1",
"jest-mock-extended": "^2.0.6",
"pm2": "^5.3.0",
"prettier": "^2.8.0",
"ts-jest": "^27.1.4"
}
}
47 changes: 0 additions & 47 deletions patches/express-http-proxy+1.6.3.patch

This file was deleted.

42 changes: 0 additions & 42 deletions scripts/updateRPC.ts

This file was deleted.

Loading