Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working minimal version to master #16

Open
wants to merge 124 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
e17c919
Merge branch 'master' into develop
WoozChucky Mar 1, 2018
5133051
Started rewriting the p2p protocol
WoozChucky Mar 1, 2018
0aedf93
Blockchain is now saved locally on application exit
WoozChucky Mar 1, 2018
207268f
Added dockerfile and removed aws code deploy scripts
WoozChucky Mar 2, 2018
f4ebc77
Added better logging framework
WoozChucky Mar 2, 2018
c0dac2a
Added p2p and http server ports usage handling
WoozChucky Mar 2, 2018
ed0a6e4
Added method to generate genesis block & chain
WoozChucky Mar 2, 2018
81e2ec5
Started work on node discovery protocols
WoozChucky Mar 4, 2018
6c25baa
Rewrote unhandled promisses and improved address manager
WoozChucky Mar 5, 2018
aa4b1f7
Refractores promisses once again and improved local storage load/unload
WoozChucky Mar 5, 2018
155ec44
Added mechanism to ask for more peers from connected sockets
WoozChucky Mar 5, 2018
53ec327
Created a 10min timeout mechanism to ask for peers automatically
WoozChucky Mar 6, 2018
e1040d8
Started working on automatic peer sharing
WoozChucky Mar 6, 2018
b9ed0d5
Added better peer socket error handling
WoozChucky Mar 6, 2018
ea6219b
Rewrote block generation algorithm from scratch
WoozChucky Mar 6, 2018
ea6b73b
Added mechanism to automatically ajust blockchains between connected …
WoozChucky Mar 6, 2018
6973688
Added api route to generate new block
WoozChucky Mar 6, 2018
fd26f56
Refractored naming convetions using Google standards
WoozChucky Mar 6, 2018
adae61f
Changed the default README for sarcastic one
WoozChucky Mar 7, 2018
3d880d3
Updated README
WoozChucky Mar 7, 2018
de32476
Create LICENSE (#1)
WoozChucky Mar 7, 2018
5b37ab7
Updated package.json
WoozChucky Mar 7, 2018
86423b1
Feature/simple wallet implementation (#2)
WoozChucky Mar 8, 2018
63410f4
Removed unused library
WoozChucky Mar 8, 2018
8ac5420
Add block structure validation method do Block class
WoozChucky Mar 8, 2018
b6d6280
Add some JSDocs to wallet manager
WoozChucky Mar 8, 2018
58c200e
Fixed sync issues with p2p broadcasts and blockchain
WoozChucky Mar 8, 2018
7a99363
WIP: Abort connection of already conneted nodes
WoozChucky Mar 8, 2018
aae2c9d
Removed unused fle and updated TODO
WoozChucky Mar 9, 2018
742748b
fix: Dockerfile to reduce vulnerabilities (#3)
WoozChucky Oct 26, 2022
2e8f6ff
fix: Dockerfile to reduce vulnerabilities (#4)
WoozChucky Oct 26, 2022
1c3d839
fix: upgrade lodash from 4.17.5 to 4.17.21 (#5)
WoozChucky Oct 27, 2022
6a08e05
fix: upgrade express from 4.15.5 to 4.18.1 (#6)
WoozChucky Oct 27, 2022
38e507e
fix: upgrade prex from 0.3.0 to 0.4.9 (#7)
WoozChucky Oct 27, 2022
ac6291f
fix: upgrade elliptic from 6.4.0 to 6.5.4 (#8)
WoozChucky Oct 27, 2022
9007975
fix: upgrade winston from 2.4.0 to 2.4.6 (#9)
WoozChucky Oct 28, 2022
8482f83
fix: upgrade morgan from 1.9.0 to 1.10.0 (#14)
WoozChucky Nov 8, 2022
8cf9337
fix: upgrade body-parser from 1.18.2 to 1.20.1 (#10)
snyk-bot Nov 9, 2022
b599b04
fix: upgrade crypto-js from 3.1.9-1 to 3.3.0 (#11)
snyk-bot Nov 9, 2022
fe52ba8
fix: upgrade leveldown from 3.0.0 to 3.0.2 (#13)
snyk-bot Nov 9, 2022
42a76ce
fix: upgrade errorhandler from 1.5.0 to 1.5.1 (#15)
WoozChucky Nov 9, 2022
209f13a
fix: upgrade cookie-parser from 1.4.3 to 1.4.6 (#12)
snyk-bot Nov 9, 2022
65ad819
Updated code to be compatible with new versions of all dependencies
WoozChucky Nov 10, 2022
ecdba09
Create dependabot.yml
WoozChucky Nov 10, 2022
9c9ca80
Update dependabot.yml
WoozChucky Nov 10, 2022
4fc0264
Update dependabot.yml
WoozChucky Nov 10, 2022
4783a79
Create node.js.yml
WoozChucky Nov 10, 2022
d34af29
Create dependency-review.yml
WoozChucky Nov 10, 2022
9be9bba
Create codeql.yml
WoozChucky Nov 10, 2022
75b671d
Update README.md
WoozChucky Nov 10, 2022
316a3e2
Update README.md
WoozChucky Nov 10, 2022
e7374ec
Started working on http routing refactoring
WoozChucky Nov 10, 2022
8753ec2
Http routing refactoring #2
WoozChucky Nov 10, 2022
6451667
Fixed http routing module
WoozChucky Nov 10, 2022
8ac5494
Updated express routes => async
WoozChucky Nov 10, 2022
a836db8
Added better logging and linting rules
WoozChucky Nov 11, 2022
7e2bb67
Linting cleanups
WoozChucky Nov 11, 2022
c1039c7
Cleaned up Application.ts
WoozChucky Nov 11, 2022
1ae9231
Started working on bad singleton patterns
WoozChucky Nov 11, 2022
61561ba
Added EventBus to simplify in-app components messaging
WoozChucky Nov 11, 2022
65e957a
Removed EventEmitter from HttpServer
WoozChucky Nov 11, 2022
cec0529
Removed EventEmitter from P2PServer
WoozChucky Nov 11, 2022
ac278da
Added handlers for EventBus in Application
WoozChucky Nov 11, 2022
7c4e28d
AddressManager refactoring
WoozChucky Nov 11, 2022
d37ae43
Locking, singleton and events refactor
WoozChucky Nov 12, 2022
c769bd9
Added UUID package and changed eslint rules
WoozChucky Nov 12, 2022
b8751b8
P2P Server refactoring (#17)
WoozChucky Nov 13, 2022
e507c65
Reformulated socket server usage to support both http and websocket
WoozChucky Nov 14, 2022
927b316
Started fixing bugs on p2p server
WoozChucky Nov 14, 2022
9520708
Fixed connecting to same node bug via P2P
WoozChucky Nov 14, 2022
1ab4321
Added correct env variables load
WoozChucky Nov 14, 2022
9b5ba48
Bump actions/dependency-review-action from 2 to 3 (#18)
dependabot[bot] Nov 14, 2022
24ce892
Create docker-image.yml
WoozChucky Nov 15, 2022
2850b67
Update node.js.yml
WoozChucky Nov 15, 2022
ac840d6
Create CODE_OF_CONDUCT.md (#19)
WoozChucky Nov 15, 2022
4812e20
Update issue templates
WoozChucky Nov 15, 2022
88307e3
Bump @typescript-eslint/eslint-plugin from 5.42.1 to 5.43.0 (#22)
dependabot[bot] Nov 16, 2022
ee17b9b
Bump @types/lodash from 4.14.188 to 4.14.189 (#21)
dependabot[bot] Nov 16, 2022
b3b42a9
Update docker-image.yml
WoozChucky Nov 16, 2022
59e8597
Bump @typescript-eslint/parser from 5.42.1 to 5.43.0 (#20)
dependabot[bot] Nov 16, 2022
9ce2993
Update docker-image.yml
WoozChucky Nov 16, 2022
e3fde38
Update README.md
WoozChucky Nov 16, 2022
62284f6
Bump typescript from 4.8.4 to 4.9.3 (#23)
dependabot[bot] Nov 17, 2022
109a13f
Bump @typescript-eslint/parser from 5.43.0 to 5.44.0 (#24)
dependabot[bot] Nov 24, 2022
d8d9961
Bump eslint from 8.27.0 to 8.28.0 (#25)
dependabot[bot] Nov 24, 2022
0c9a083
Bump @typescript-eslint/eslint-plugin from 5.43.0 to 5.44.0 (#27)
dependabot[bot] Nov 24, 2022
6ddda0f
Bump @types/lodash from 4.14.189 to 4.14.190 (#28)
dependabot[bot] Nov 24, 2022
9cb34e3
Bump concurrently from 7.5.0 to 7.6.0 (#26)
dependabot[bot] Nov 24, 2022
1ffa9b1
Internal Blockchain Buffer implementation (#29)
WoozChucky Nov 24, 2022
e94e827
Started working on transaction class specification
WoozChucky Nov 24, 2022
4b4e3d9
Added ripemd160 dependency
WoozChucky Nov 25, 2022
2eda58b
Added more core blockchain implementation
WoozChucky Nov 26, 2022
98e7d71
Update node.js.yml
WoozChucky Nov 26, 2022
6b73946
Added first test file
WoozChucky Nov 26, 2022
b6ad90f
Merge remote-tracking branch 'origin/develop' into develop
WoozChucky Nov 26, 2022
961556e
Added Jest dependency
WoozChucky Nov 26, 2022
b979023
Update node.js.yml
WoozChucky Nov 26, 2022
c3cec38
Update README.md
WoozChucky Nov 26, 2022
975a821
Updated Docker base image version
WoozChucky Nov 26, 2022
2029a33
Bump @typescript-eslint/eslint-plugin from 5.44.0 to 5.45.0 (#30)
dependabot[bot] Dec 1, 2022
a0f9f5f
Bump @typescript-eslint/parser from 5.44.0 to 5.45.0 (#31)
dependabot[bot] Dec 1, 2022
df265d2
Bump helmet from 6.0.0 to 6.0.1 (#32)
dependabot[bot] Dec 1, 2022
3b7f8cc
Bump @types/uuid from 8.3.4 to 9.0.0 (#33)
dependabot[bot] Dec 1, 2022
3c5943a
Bump @types/node from 18.11.9 to 18.11.10 (#35)
dependabot[bot] Dec 3, 2022
6f3a125
Bump @types/lodash from 4.14.190 to 4.14.191 (#34)
dependabot[bot] Dec 3, 2022
c73ae54
fix: Dockerfile to reduce vulnerabilities (#41)
snyk-bot Jan 16, 2023
924e98c
Bump eslint from 8.28.0 to 8.31.0 (#52)
dependabot[bot] Jan 16, 2023
7d9be26
Bump @types/jest from 29.2.3 to 29.2.5 (#53)
dependabot[bot] Jan 16, 2023
b7c6eb5
fix: Dockerfile to reduce vulnerabilities (#46)
snyk-bot Jan 16, 2023
713066b
Bump json5 from 1.0.1 to 1.0.2 (#56)
dependabot[bot] Jan 16, 2023
6a7f245
Bump @typescript-eslint/parser from 5.45.0 to 5.48.1 (#57)
dependabot[bot] Jan 16, 2023
e8bb684
Bump @shopify/eslint-plugin from 42.0.1 to 42.0.3 (#59)
dependabot[bot] Jan 16, 2023
a744a51
Bump @typescript-eslint/eslint-plugin from 5.45.0 to 5.48.1 (#58)
dependabot[bot] Jan 16, 2023
3f92061
Bump actions/checkout from 3 to 4 (#60)
dependabot[bot] Jun 15, 2024
6ee0054
Bump actions/setup-node from 3 to 4 (#61)
dependabot[bot] Jun 15, 2024
2feda39
Updated gh workflow files
WoozChucky Jun 15, 2024
2ae38eb
fix: package.json & package-lock.json to reduce vulnerabilities (#63)
WoozChucky Jun 15, 2024
cf1e6eb
Removed swagger
WoozChucky Jun 15, 2024
c40ed52
Remove test controller spec
WoozChucky Jun 15, 2024
0509d22
Remove old tsoa references
WoozChucky Jun 15, 2024
7642909
fix: package.json & package-lock.json to reduce vulnerabilities
snyk-bot Jun 17, 2024
40b10dc
Merge pull request #72 from WoozChucky/snyk-fix-3f315f8719ad82bcd1d20…
WoozChucky Jun 30, 2024
eacda7a
fix: Dockerfile to reduce vulnerabilities
snyk-bot Jul 25, 2024
e560810
Merge pull request #86 from WoozChucky/snyk-fix-ca1170358a58601041060…
WoozChucky Jul 26, 2024
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
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true
[*]
end_of_line = crlf
insert_final_newline = true


[*.{js,ts}]
indent_style = space
indent_size = 2
max_line_length = 120

[*.json]
indent_style = space
indent_size = 4
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
coverage
29 changes: 29 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
extends: [
"plugin:@shopify/typescript",
"plugin:@shopify/prettier",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"],
parser: '@typescript-eslint/parser',
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['./tsconfig.json'], // Specify it only for TypeScript files
},
}
],
plugins: ['@typescript-eslint'],
rules: {
// 0 - disabled 1 - warning 2 - error
"no-console": 2,
"prettier/prettier": ['error', { singleQuote: true, }],
'max-len': [2, { code: 120, ignoreUrls: true }],
'quotes': [2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }]
},
root: true,
env: {
node: true
}
};
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
74 changes: 74 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "develop", "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
schedule:
- cron: '23 6 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
27 changes: 27 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docker Image CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: List contents
run: ls -la
- name: npm install
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- name: Build the Docker image
run: docker build . --file Dockerfile --tag pau:latest
33 changes: 33 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,18 @@ dist/
\.idea/

\.DS_Store

/logs/

/public/swagger.json

.env

/data/
/data1/
/data2/
/data3/
/data4/

data2 /logs/
/coverage/
Loading
Loading