-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix(storage): Refactor improving performance and atomicity. #8
Conversation
Overview: This commit overhauls the Storage layer to set the foundation for a high-performance filtering system based on bitmap indexing. The refactoring introduces a more efficient data handling model and resolves critical issues that affected stability and performance. Key Changes: - Introduced the concept of 'WriteBatch' in the Storage interface to support efficient data operations. - Removed the DB interface to eliminate excessive abstraction, making difficult the implementation of database-specific optimizations. - Fixed the handling of byte arrays in Pebble's closer method to prevent data corruption. The Storage layer now ensures that data is parsed correctly before the Get operation is closed, eliminating the risk of random failures. - Implemented batching for data writting from remote nodes, enhancing data consistency and speed. - Restructured Mock objects into an internal package, restricting access to internals and eliminating the need for specific build tags. Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 💯
Thank you for adding these improvements 🙏
I've ran this on the test3
testnet, which at the moment had ~252 250 blocks. It synced and indexed the entire chain in ~3min:
2024-02-08T11:47:53.430+0100 # start
2024-02-08T11:50:50.378+0100 # end
Just to give perspective, it used to take ~30min to sync the entire chain (less blocks than this) before this PR, so a x10 improvement 👏
Signed-off-by: Antonio Navarro Perez <[email protected]>
Signed-off-by: Antonio Navarro Perez <[email protected]>
Overview:
This commit overhauls the Storage layer to set the foundation for a high-performance filtering system based on bitmap indexing. The refactoring introduces a more efficient data handling model and resolves critical issues that affect stability and performance.
Key Changes: