You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The currently proposed implementation stores miner addresses in memory, which is not secure or persistent. We need a more reliable storage solution to ensure data integrity and availability across sessions. Additionally, there is a need to support multiple addresses per miner.
Acceptance Criteria
Miner addresses are stored in a SQLite database.
The database is kept in sync with the Metagraph.
The system can handle database read/write errors gracefully.
Support for multiple addresses per miner is implemented.
Tests that cover this feature
Proposed Solution
Implement a SQLite database to store miner addresses. The validator will periodically update this database to reflect changes in the Metagraph. This will involve:
Creating a SQLite database schema to store miner addresses, supporting multiple addresses per miner.
Implementing functions to add, update, and delete records in the database.
Ensuring the validator process updates the database in a separate thread to avoid blocking operations.
Technical Details
Database Schema: Define a table with columns for miner ID, address, timestamp, and any other relevant metadata. Ensure the schema supports multiple addresses per miner.
Synchronization: Implement a mechanism to periodically fetch the latest list of nodes from the Metagraph and update the SQLite database accordingly.
Error Handling: Use try-except blocks to handle potential database errors and log them for debugging purposes.
Threading: Use Python's threading module to run the database update process in a separate thread.
Related Issues / Dependencies
This feature depends on the existing validator process and its ability to fetch nodes from the Metagraph.
Ensure compatibility with the fiber library used in the validator.
The text was updated successfully, but these errors were encountered:
Problem Statement
The currently proposed implementation stores miner addresses in memory, which is not secure or persistent. We need a more reliable storage solution to ensure data integrity and availability across sessions. Additionally, there is a need to support multiple addresses per miner.
Acceptance Criteria
Proposed Solution
Implement a SQLite database to store miner addresses. The validator will periodically update this database to reflect changes in the Metagraph. This will involve:
Technical Details
threading
module to run the database update process in a separate thread.Related Issues / Dependencies
The text was updated successfully, but these errors were encountered: