Commit Graph

1587 Commits

Author SHA1 Message Date
Neil Booth
4c7ab221a7 Allow per-class tx hash functions
Idea from erasmospunk; see #548
2018-08-01 12:08:01 +09:00
Neil Booth
aa1f43b6be Prepare 1.7.3 2018-08-01 10:49:42 +09:00
Vivek Teegalapally
d6c15d6ea2 Fix for FLO testnet
FLO testnet works on ElectrumX after this commit. The user will have to change the port where ElectrumX
will detect FLO testnet's full node. The change has to be done in electrumx.conf file
2018-08-01 03:07:14 +05:30
Neil Booth
6c3cce5705 Remove dead code 2018-07-31 06:48:05 +08:00
Neil Booth
c65f1214a9 Fix doc typos 2018-07-30 21:34:27 +08:00
Neil Booth
2c07939120 Temporarily remove one task group from peers.py
Fixes #538
2018-07-29 23:46:58 +08:00
Neil Booth
7b9cd944be Require aiorpcX 0.5.9 2018-07-29 05:58:44 +08:00
Neil Booth
0b4f6b3d6d Prepare 1.7.1 2018-07-28 17:13:54 +08:00
Neil Booth
d962c97ef1 Have one peer monitoring task per peer 2018-07-28 16:29:02 +08:00
Neil Booth
751f9917a4 Switch to curio primitives
Gives much clearer code
2018-07-28 14:35:54 +08:00
Neil Booth
55ef1ab157 Rework server_base to spawn a single task 2018-07-28 12:32:08 +08:00
Neil Booth
5ee5a54f5a Session manager owns peer manager 2018-07-28 09:22:19 +08:00
Neil Booth
010ef08320 Catch SOCKSError
Fixes #534
2018-07-27 09:08:05 +08:00
ghost43
5304080220 server list: add to btc testnet (#535) 2018-07-27 06:24:23 +08:00
cipig
3cdf453663 change BTX address format (#533) 2018-07-26 14:43:25 +08:00
Neil Booth
bef04750d7 Handle the case there are no blocks 2018-07-26 06:05:00 +08:00
Neil Booth
9b23fbc747 Prepare 1.7 2018-07-25 23:16:32 +08:00
Neil Booth
7a3938be23 Make mempool histogram refresh frequency coin-specific 2018-07-25 23:16:32 +08:00
Neil Booth
5e4586ce54 Create a task to start_servers()
That way we start waiting on the shutdown event no matter what
so we can always be shut down
2018-07-25 22:02:00 +08:00
Neil Booth
365c217031 header_mc might be None 2018-07-25 21:36:23 +08:00
Neil Booth
68dbf9fad2 Tweak task handling so all errors are logged 2018-07-25 21:35:05 +08:00
Neil Booth
3fbd4992ce Rework prefetch logic
This also fixes a recent reorg bug...
2018-07-25 20:40:25 +08:00
Neil Booth
d008707330 Fix bug recently introduced in reorgs
Fixes #532
2018-07-25 15:25:40 +08:00
Neil Booth
5a42f79bb8 Require an exact aiorpcX version
The interface is changing; best to target a single codebase
2018-07-25 11:07:14 +08:00
Neil Booth
ae143703ae Travis: test Python 3.7 2018-07-25 11:00:11 +08:00
Neil Booth
db8ee48c2e await on send_request directly 2018-07-25 10:40:50 +08:00
Neil Booth
8d3f98d3fd Don't check task exceptions ourselves 2018-07-25 10:40:50 +08:00
Neil Booth
fa84b0f54b Use asyncio.gather to propogate exceptions 2018-07-25 10:37:13 +08:00
Neil Booth
918592fbff Remove RequestError; clean up a bit 2018-07-25 09:47:07 +08:00
Neil Booth
e1309836ca Fix typo in prior 2018-07-24 21:38:50 +08:00
Neil Booth
eac214e508 Rework peer discovery
Make it more naturally async
2018-07-24 21:22:07 +08:00
Neil Booth
ba607544b9 Avoid callback in peer manager
Spawn separate tasks for each peer we test
2018-07-24 14:26:14 +08:00
Neil Booth
12c024f3ac Log proxy detection failure 2018-07-24 14:02:31 +08:00
Neil Booth
79b98b2b54 Distinguish private and public methods of peer mgr
Give private methods a leading _
Remove dead code
2018-07-24 13:52:40 +08:00
Neil Booth
92ddb52f63 Update various comments 2018-07-24 11:41:29 +08:00
joesixpack
83732af4fe Support for Minexcoin (#529) 2018-07-24 09:41:03 +08:00
Neil Booth
221f1222a6 Defer peer discovery 2018-07-24 09:20:45 +08:00
Neil Booth
316f642a08 Reduce memory footprint
- Use tuples in preference to lists
  They are always at least 11% smaller memory
  footprint, rising to 35% for short arrays
2018-07-24 09:15:35 +08:00
Neil Booth
7485d0aaf0 Retain the prevouts with each MemPoolTx 2018-07-24 08:21:58 +08:00
ghost43
45ccf8a64e fix mempool tx fee calculation typo (#531) 2018-07-23 20:31:52 +08:00
Neil Booth
7c01acdbf2 Remove comment 2018-07-23 17:26:51 +08:00
Neil Booth
b05cc4e78b Clean up fee histogram implementation
Much more efficient to just calculate it outright than try
and maintain datastructures
2018-07-23 17:26:42 +08:00
Neil Booth
3e535e47f4 Start peer discovery whilst syncing the mempool 2018-07-23 15:18:49 +08:00
Neil Booth
0963ce5230 Completely overhaul mempool sync logic
- highly concurrent and a lot more efficient than previously
- initial mempool sync should be much faster (feedback please)
- mempool processing no longer blocks client session handling
- uses less memory to store the mempool
- fixes an obscure bug where sometimes txs were dropped
- more robust, clean and easy to understand

Fixes #433
2018-07-23 15:18:04 +08:00
Neil Booth
21604cad15 Create a MemPoolTx object and use it 2018-07-22 23:19:35 +08:00
Neil Booth
4b3ceff0d2 Deserialize mempool txs in a thread 2018-07-22 22:18:54 +08:00
Neil Booth
9bd9476a54 Make mempool processing more properly asynchronous 2018-07-22 21:56:22 +08:00
Neil Booth
4da95dd853 Simplify refresh hashes loop 2018-07-22 16:57:30 +08:00
Neil Booth
821f907971 Put stats logging into its own task 2018-07-22 16:54:32 +08:00
Neil Booth
2c51b127de Clarify mempool's exported interface 2018-07-22 13:25:13 +08:00