Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Steem Account Data Updater: Configuration, Error Handling, a…
…nd Performance Improvements (#14) * Update README.md * Optimize Block Fetching for Faster Blockchain Sync Modified code to fetch historical blocks in batches of 50 and, once reaching the head block, switch to fetching one block every 3 seconds with retry logic on RPC failure. This approach significantly speeds up the blockchain synchronization process, achieving up to 60% faster sync times in test scenarios. Changes include: - Implemented batch fetching of historical blocks, processing up to 50 blocks per batch. - Added logic to switch to single block fetching mode with a 3-second interval once the head block is reached. - Introduced retry mechanism on RPC failures to ensure robustness and continuous operation. These enhancements provide a more efficient and reliable syncing process, allowing for quicker catching up with the latest blocks. * Batching Operations Batching Operations and change Dockerfile * Update history.py Import re module: Added the import statement for the re module. Fixed logger.error call: Corrected the logger.error call to ensure proper formatting of the error message. Fixed the TypeError: Updated the get_batch_account_details function to use next(rpc.nodes) to get the current node from the cycle instead of using indexing. * Update history script to support configuration via both config.json and environment variables - Modified Dockerfile to install necessary dependencies and Python packages. - Updated history.py to load configuration from config.json if present, otherwise fallback to environment variables. - Added detailed README.md to document the setup, configuration, and usage of the Steem account data updater. * Renamed config.jsot to config.jsob.example Renamed config.json to config.jsob.example . Developers can Decide to use config.json or directly pass env variables --------- Co-authored-by: BottoSteem <>
- Loading branch information