CW-1193: Refactoring code by implementing batching#2897
Draft
CW-1193: Refactoring code by implementing batching#2897
Conversation
This commit creates a batchGetData function for retrieving data from Electrum servers using batching instead of multiple socket writes
…tead of always-incrementing id)
Electrum.dart (for some reason) was causing issues related to when it connected to Bitcoin Electrum servers, and where it received whitespace that needed a special RegExp to filter
…llet.dart getIsolateBatch
implements substantial (but not noticeable throttling - we limit our batches to once every two seconds This is finally a point where it appears we're getting data back without servers nuking our connection
This splits certain queries off to other connections. One day we could make it an isolate, but for now, this is sufficient
It seems as though we are hitting a connect / disconnect loop that causes the server to ban us now. While the balance seems to be loaded properly, the sync status needs to still change
This lowers batch size for balance queries, and tweaks parameters to make getting the balance more stable
The idea behind focusing on unspents is that when we start, I want to have those unspents ready and waiting as soon as possible for sending
Going for MVP, will check if scenario covered the way I expect it is
This function replaces older code and checks for multiple vout indexes when getting unspent coins - cherry-pick if mvp not used
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Number (if Applicable): Fixes #cw-1193
Description
This PR adds batching to the wallet for all but transaction history right now. The goal of the PR is to improve the speed at which we synchronise our Electrum wallets
Pull Request - Checklist