0.0.8 • Published 3 years ago

@turtlepay/database v0.0.8

Weekly downloads
3
License
AGPL-3.0
Repository
github
Last release
3 years ago

TurtlePay® Blockchain Database Abstraction Layer

Prerequisite Documentation Maintenance License: AGPL-3.0 Twitter: TurtlePay

NPM

Master Build Status

Build Status

Development Build Status

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.

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

🤝 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.