@turtlepay/database v0.0.8
TurtlePay® Blockchain Database Abstraction Layer
Master Build Status
Development Build Status
Overview
Provides a mechanism and interface for storing the TurtleCoin® blockchain in a relational database.
Prerequisites
- TurtleCoin® >= 1.0.0
- node >= 12
- One of the following DBMS
- MariaDB/MySQL with InnoDB support
- Postgres or a Postgres compatible SQL interface
- SQLite (built-in)
Hardware Requirements
Requirements vary depending on what DBMS you use; however, generally speaking, for the best performance as of September 15, 2020, your DBMS must have the minimum of the following:
- 256GB RAM
- 224GB dedicated to MariaDB/MySQL
- 8 CPU Cores (16 Recommended)
- SSD Storage
Note: Its possible and advisable that in lieu of operating large systems that you utilize a DBMS that allows for sharding/clustering and load balancing connections to the system(s). Please refer to your DBMS documentation for more information.
Warning: Running the DB on system(s) with less than the minimum hardware requirements above will cause performance issues. If you are experiencing issues please verify that the system you are using meets the minimum requirements above. We cannot assist with performance issues with implementations that do not meet the above minimum requirements.
Recommended Reading
The help tune your selected DBMS, we recommend that you read the following documents, at a minimum, to tune your DBMS installation for the dataset this package manages.
This list is by no means comprehensive nor do we guarantee the information or suggestions provided in the articles below are accurate. These links are provided solely as a jumping off point to get you started.
- MySQL 5.7 Performance Tuning After Installation
- InnoDB Performance Optimization Basics
- Optimizing InnoDB Disk I/O
- Optimizing InnoDB Configuration Variables
- 15 Useful MySQL/MariaDB Performance Tuning and Optimization Tips
- InnoDB Performance Optimisation
Note: If using a DBMS other than MySQL/MariaDB, please refer to your DBMS documentation for performance tuning information.
Documentation
Full library documentation is available at https://database.turtlepay.io
Install
yarn install @turtlepay/database
Usage
MySQL/MariaDB
1) Set your environment variables and start the service up
export USE_MYSQL=true
export DB_HOST=localhost
export DB_PORT=3306
export DB_USER=yourdbusername
export DB_PASS=yourdbpassword
export DB_NAME=turtlecoin
export NODE_HOST=localhost
export NODE_PORT=11898
export NODE_SSL=0
yarn start
Postgres
1) Set your environment variables and start the service up
export USE_POSTGRES=true
export DB_HOST=localhost
export DB_PORT=3306
export DB_USER=yourdbusername
export DB_PASS=yourdbpassword
export DB_NAME=turtlecoin
export NODE_HOST=localhost
export NODE_PORT=11898
export NODE_SSL=0
yarn start
SQLite
1) Set your environment variables and start the service up
export USE_SQLITE=true
export SQLITE_PATH=turtlecoin.sqlite3
export NODE_HOST=localhost
export NODE_PORT=11898
export NODE_SSL=0
yarn start
Run tests
yarn test
Author
👤 TurtlePay® Development Team
- Twitter: @TurtlePay
- Github: @TurtlePay
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2018-2020 TurtlePay® Development Team.
This project is AGPL-3.0 licensed.