-
Notifications
You must be signed in to change notification settings - Fork 14
Description
-
Motivation: Currently, all blocks of the blockchain are being stored to the memory, we must add functionality to periodically dump the blocks into the database in order to not overload the system memory with blocks
-
Objectives: Periodically dump the most old unused blocks from memory to the database
-
Success Criteria: Safely dump old blocks to the database, not locking Storage for too long (more than one second) while dumping.
-
Dependencies: No external dependencies.
-
Risks and Mitigations: It is necessary to be aware of blocks being a shared_ptr’s, meaning that while it is being used by another thread, it should not be dealocated from memory, besides that, it should not lock the storage for too long where it would create a deadlock within the node, limiting it’s response for processing new blocks or requests from other nodes, besides that, priority should be given to the older blocks within the deque.
-
Resource Allocation: This milestone will deeply affect the Storage function