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

Enhance TPS value #121

Open
2 of 4 tasks
vekexasia opened this issue Mar 11, 2018 · 0 comments
Open
2 of 4 tasks

Enhance TPS value #121

vekexasia opened this issue Mar 11, 2018 · 0 comments

Comments

@vekexasia
Copy link
Contributor

vekexasia commented Mar 11, 2018

Right now a medium-end CPU can roughly handle 7tps. While this is more than enough right now, the situation can rapidly change and a solution should be already in place.

Current Implementation:
The node is so slow to process the transactions caus of different implementation pitfalls:

  1. txs and blocks are not saved atomically in one single DB transaction.
  2. pending txs are undo + block txs are unconfirmed and then confirmed (3 steps)
  3. Every action hits the Database to ensure data consistency
  4. The txs checks cannot be parallelize due to the way the core is written

Ways to improve

  • Moving the data consistency checks to a faster db (Redis?)
  • Avoid undoing all unconfirmed transactions before applying blocks txs.
  • Use redis as single source of through (all writes and reads are there) and sync to postgres later (asynchronously)
  • horizontal scaling through multi-core
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant