-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Features/headersv integration (#858)
* HeaderSV API Integration - Replaced ElectrumX header APIs with new ElectrumSV-Reference-Server APIs. - Reorgs are handled. - Uses binary header APIs wherever practical to do so. - Removed most dead code related to ElectrumX which helped reduce cognitive load. - The proxy tab of network_dialogue.py is deleted but the BlockchainTab and NodesListWidget code has been commented out to defer the work for later (to represent the HeaderSV chain tips instead of ElectrumX sessions). - Moved GeneralAPIError exceptions to their own file to resolve circular import issues. - UI correctly shows server status as either being behind x number of blocks, Connected or main server pending. PR review changes - Also note: aiohttp's testing APIs have breaking changes: 'test_client' was renamed to 'aiohttp_client' as per their documentation: https://docs.aiohttp.org/en/stable/testing.html And the types and input arguments have also changed. Review changes. Including: - Support multiple electrumsv reference server connections & an initial reorg check on startup - Move async db functions out of the AsynchronousFunctions class to the top level - Fixing bugs and testing Run `startup_reorg_check_async` as a background task awaiting initial synchronization of headers on the main server Move the concept of "main server" from Network daemon to each Wallet instance - BlockchainScanner uses the main server & master token for this main server - Each wallet's chain state will be relative to its main server even if it is not on the longest chain of all forks. Database migration - add TransactionProofs table - The pathways for insertion to this table are Wallet._obtain_merkle_proofs_worker_async, Wallet._obtain_transactions_worker_async and wait_for_merkle_proofs_and_double_spends (not yet in use) via mAPI callbacks - All proofs from all chains should be inserted here (i.e. including orphaned proofs). They can be pruned when the proof on the main server chain is buried by sufficient proof of work. Reorg handling updates taking into account pending mAPI callbacks Latest Header management integration work & Fixes * Remaining PR review changes * Minor updates after review (HeaderSV related changes)
- Loading branch information
Showing
29 changed files
with
1,369 additions
and
2,076 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.