Add ElectrumProxy app#293
Open
webwarrior-ws wants to merge 13 commits into
Open
Conversation
Created project and solution for ElectrumProxy.
Start implementing ElectrumProxy server. Implement "server.version" and "server.ping" methods.
Add ElectrumProxy to excludes for printf check, as it uses .NET 6.
Implement blockchain.block.header method both in Backend and in ElectrumProxy.
Refactoring of JSON RPC server - made it into a class.
Implement blockchain.headers.subscribe method and subscription. Implement "blockchain.block.headers", "blockchain.scripthash.get_history", and "blockchain.transaction.get" methods.
In ElectrumProxy only save server stats when exiting the application to decrease load on CPU.
Instead of chceking for duplicates in server stats when saving, keep the collection duplicate-free at all times by checking for existing record when updating or insterting new server stat. This way we can avoid running de-duplication procedure each time the stats are updated.
Implement blockchain.transaction.broadcast method in ElectrumProxy.
Implement BitCoreNode client and use Bitcore node server in addition to Electrum for serving "blockchain.scripthash.get_history" requests. Had to restrict request rate to Bitcore to be 1 at a time with 0.1 secs interval. Otherwise the server would complain about too many requests and fail.
Cache results of "blockchain.scripthash.get_history" requests. This will drastically reduce average rescan time since Liana tries to rescan every 30 seconds or so but new block is added every ~10 min.
Made timeouts an argument that is passed to server's retrieval function. When a full round of failures has happened, timeouts are doubled. Reduced default timeouts because now we don't need such large margins and smaller timeouts mean unresponsive servers will be discarded quicker.
Add client for Blockbook (API used by Trezor). Extract RestAPIClient abstract base class that with common functionality fo REST API clients like BlockbookClient and BitcoreNodeClient.
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.
Add ElectrumProxy - application that acts as Electrum server redirecting requests to other servers using fault-tolerant parallel client.
Implemented Electrum API methods: