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

feat: reliable integrations [part 2] #90

Merged
merged 75 commits into from
Nov 27, 2023
Merged

Conversation

andreabadesso
Copy link
Collaborator

@andreabadesso andreabadesso commented Sep 25, 2023

Acceptance Criteria

  • We should include the services and all dependencies (db, types and utils methods)
  • We should include the websocket actor

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso changed the base branch from master to feat/realiable-integrations September 25, 2023 18:28
@andreabadesso andreabadesso self-assigned this Sep 25, 2023
@andreabadesso andreabadesso added the enhancement New feature or request label Sep 25, 2023
@andreabadesso andreabadesso changed the title feat: reliable integrations [part 2 - services] feat: reliable integrations [part 2 - services and db] Sep 26, 2023
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations2 branch 2 times, most recently from b3623b1 to dc34690 Compare October 2, 2023 00:51
@andreabadesso andreabadesso changed the title feat: reliable integrations [part 2 - services and db] feat: reliable integrations [part 1] Oct 2, 2023
@andreabadesso andreabadesso changed the base branch from feat/realiable-integrations to dev October 2, 2023 00:54
@andreabadesso andreabadesso requested review from glevco and r4mmer October 2, 2023 15:58
@andreabadesso andreabadesso changed the base branch from dev to feat/reliable-integrations-part1 October 2, 2023 17:14
@andreabadesso andreabadesso changed the title feat: reliable integrations [part 1] feat: reliable integrations [part 2] Oct 2, 2023
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations2 branch from 59a7bc4 to e0aedb1 Compare October 2, 2023 17:20
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations-part1 branch from 59ebb44 to 599cd17 Compare October 3, 2023 14:41
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations2 branch 2 times, most recently from 9e38da9 to aa88328 Compare October 3, 2023 16:02
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations2 branch 4 times, most recently from 5fe9a36 to 07232e2 Compare October 16, 2023 01:10
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations2 branch 2 times, most recently from 1c080c9 to 3a062e6 Compare November 13, 2023 14:12
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations2 branch 4 times, most recently from 37b0091 to 23d9ec9 Compare November 20, 2023 17:37
@andreabadesso andreabadesso requested a review from glevco November 20, 2023 18:28
@andreabadesso andreabadesso force-pushed the feat/reliable-integrations2 branch from 58b21fa to 1b6cd1d Compare November 22, 2023 12:18
@andreabadesso andreabadesso merged commit 6347482 into dev Nov 27, 2023
andreabadesso added a commit that referenced this pull request Dec 11, 2023
* chore: removed old service files

* chore: moved dev dependencies to devDependencies

* chore: initial project structure

* chore: improved readme

* feat: added sync machine to the project with mocked services

* feat: added services

* feat: improved logging on service

* feat: added services, utils and types

* feat: added websocket actor

* feat: added LRU cache and md5hash

* chore: updated nodejs matrix to only v18.x

* chore: basic eslintrc

* chore: github actions

* fix: added voided guard to check if a transaction is already voided before processing it

* tests: added multiple tests for db methods

* feat: improved error handling on initializing state

* chore: added database migrations

* chore: removed tests from tslint and added sequelize to dependencies

* refactor: moved guards and actions to separate files and improved readability

* tests: 100% coverage on guards

* tests: machine tests

* chore: added sequelizerc

* chore: added eslintignore to gitignore

* feat: throw if storing event lower than current

* chore: removed seeders as they're no longer needed

* fix: start stream failing on reconnections

* feat: added more assertions to check if we're trying to store an event lower than the current

* fix: logging lastDbSyncedEvent as a string

* chore: updated dockerfile to install production dependencies on second stage

* chore: updated lodash types version

* fix: handling unvoided transactions

* chore: added dirs to dockerignore

* fix: invalid env variables on db config

* refactor: updating LRU cache using an action instead of a global cache

* feat: added debug logs on machine transitions and events

* fix: added missing handleUnvoidedTx service

* tests: refactored tests to reflect the new tx cache in context

* tests: fixed failing mock on tests

* chore: fix lint

* docs: added docstrings to guards

* refactor: using constant on RECONNECTING target

* refactor: using a module to export all env variables instead of using them directly

* refactor: removed unused export

* fix: ACK issue on unvoided txs

* docs: added docstrings to utils

* fix: throwing error if input has no decoded input

* refactor: well-defined types for websocket send event

* refactor: typed event in context and removed useless ts-ignore

* refactor: throwing error if transaction is already on database on handleVertexAccepted

* refactor: throwing error when token creation event but no token name and symbol

* docs: updated comment on genesis tx

* docs: removed misleading comment

* refactor: throwing error if no first block on metadata and handleTxFirstBlock state

* refactor: organized types into groups

* refactor: moved all types to types folder

* fix: test failing on tx already in db

* refactor: throwing error if error with undefined type is received

* refactor: throwing error if event type is not FULLNODE_EVENT on invalidNetwork and invalidStreamId guards

* refactor: invalidNetwork is now a guard

* refactor: moved event types to event.ts

* refactor: throwing error if invalid events on guards

* refactor: using an enum for event types

* refactor: using EventTypes enum on guards

* refactor: using enum on FullNodeEventTypes

* docs: added docstrings to actions

* refactor: improved event legibility

* refactor: split utils into multiple files

* refactor: using event types

* refactor: throw if decoded attribute on output

* refactor: using const on sync machine states

* fix: returning if event is received but no socket is ready

* fix: throwing error if event type is not metadata_decided in unwrap event

* refactor: using a model for ACK and START_STREAM messages

* fix: error when asserting a zero-transactions address balance

* refactor: ignoring already existing transactions in the new vertex accepted
andreabadesso added a commit that referenced this pull request Dec 11, 2023
* chore: removed old service files

* chore: moved dev dependencies to devDependencies

* chore: initial project structure

* chore: improved readme

* feat: added sync machine to the project with mocked services

* feat: added services

* feat: improved logging on service

* feat: added services, utils and types

* feat: added websocket actor

* feat: added LRU cache and md5hash

* chore: updated nodejs matrix to only v18.x

* chore: basic eslintrc

* chore: github actions

* fix: added voided guard to check if a transaction is already voided before processing it

* tests: added multiple tests for db methods

* feat: improved error handling on initializing state

* chore: added database migrations

* chore: removed tests from tslint and added sequelize to dependencies

* refactor: moved guards and actions to separate files and improved readability

* tests: 100% coverage on guards

* tests: machine tests

* chore: added sequelizerc

* chore: added eslintignore to gitignore

* feat: throw if storing event lower than current

* chore: removed seeders as they're no longer needed

* fix: start stream failing on reconnections

* feat: added more assertions to check if we're trying to store an event lower than the current

* fix: logging lastDbSyncedEvent as a string

* chore: updated dockerfile to install production dependencies on second stage

* chore: updated lodash types version

* fix: handling unvoided transactions

* chore: added dirs to dockerignore

* fix: invalid env variables on db config

* refactor: updating LRU cache using an action instead of a global cache

* feat: added debug logs on machine transitions and events

* fix: added missing handleUnvoidedTx service

* tests: refactored tests to reflect the new tx cache in context

* tests: fixed failing mock on tests

* chore: fix lint

* docs: added docstrings to guards

* refactor: using constant on RECONNECTING target

* refactor: using a module to export all env variables instead of using them directly

* refactor: removed unused export

* fix: ACK issue on unvoided txs

* docs: added docstrings to utils

* fix: throwing error if input has no decoded input

* refactor: well-defined types for websocket send event

* refactor: typed event in context and removed useless ts-ignore

* refactor: throwing error if transaction is already on database on handleVertexAccepted

* refactor: throwing error when token creation event but no token name and symbol

* docs: updated comment on genesis tx

* docs: removed misleading comment

* refactor: throwing error if no first block on metadata and handleTxFirstBlock state

* refactor: organized types into groups

* refactor: moved all types to types folder

* fix: test failing on tx already in db

* refactor: throwing error if error with undefined type is received

* refactor: throwing error if event type is not FULLNODE_EVENT on invalidNetwork and invalidStreamId guards

* refactor: invalidNetwork is now a guard

* refactor: moved event types to event.ts

* refactor: throwing error if invalid events on guards

* refactor: using an enum for event types

* refactor: using EventTypes enum on guards

* refactor: using enum on FullNodeEventTypes

* docs: added docstrings to actions

* refactor: improved event legibility

* refactor: split utils into multiple files

* refactor: using event types

* refactor: throw if decoded attribute on output

* refactor: using const on sync machine states

* fix: returning if event is received but no socket is ready

* fix: throwing error if event type is not metadata_decided in unwrap event

* refactor: using a model for ACK and START_STREAM messages

* fix: error when asserting a zero-transactions address balance

* refactor: ignoring already existing transactions in the new vertex accepted
@andreabadesso andreabadesso deleted the feat/reliable-integrations2 branch February 22, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants