-
-
Notifications
You must be signed in to change notification settings - Fork 11
Enhance indexer transaction data analysis and storage #11
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
Enhance indexer transaction data analysis and storage #11
Conversation
BTW, each BP Node instance will work with a single chain; and if multiple chains are needed each one will take an independent instance with data being stored in different directories. Thus, we can keep |
…ure and error handling Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[email protected]>
a87a52d
to
1bcda1c
Compare
Signed-off-by: will-bitlightlabs <[email protected]>
…on at initialization Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[email protected]>
…essor Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[email protected]>
…on issues Signed-off-by: will-bitlightlabs <[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.
Did an initial review of everything except main logic in blocks
.
LGTM; just one question
I also have pushed few improvements and fixes on top |
Signed-off-by: will-bitlightlabs <[email protected]>
Thank you very much. I also have some small optimization ideas to apply simultaneously, which won't affect the overall main trunk |
Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[email protected]>
Signed-off-by: will-bitlightlabs <[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.
ACK ec2e560
Merged. Thank you very much for the excellent and huge work! |
It's a great honor. I look forward to having more opportunities to contribute in the future :) |
Blockchain Indexer Optimization: Enhancing Transaction Data Analysis and Storage
Overview
This PR implements important optimizations for the BP Node indexer, focusing on improving transaction data analysis and blockchain storage mechanisms. Following Dr. Orlovsky's feedback, we've adopted a single-chain design, integrated with the BloomFilter32 transaction tracking, and enhanced orphan block handling and chain reorganization functionalities.
Main Improvements
Single-Chain Design Implementation
TABLE_CHAIN
, now relying solely on block height tables to track chain stateTransaction Tracking Mechanism
BloomFilter32
type for efficient transaction matchingBlock Height and Block ID Handling
calculate_block_height
method to handle different block types:Database Structure Optimization
We've optimized the database table structure, categorizing tables by functionality:
Orphan Block Handling Mechanism
Chain Reorganization Handling
process_potential_fork
method for handling blocks that may cause forksError Handling and User Experience
Testing Progress
TestContext
structure providing a complete isolated testing environmentSpecial note: To avoid PR code bloat, this submission does not include the testing framework code. We will flexibly adjust the testing framework based on review suggestions and submit the complete testing framework through a separate PR once the code stabilizes.