Commit Graph

641 Commits

Author SHA1 Message Date
Neil Booth
56274fb9ea Prefix internal methods with an underscore 2016-11-12 07:43:24 +09:00
Neil Booth
1b9a9b8927 Start saving DB version and checking it 2016-11-12 07:31:56 +09:00
Neil Booth
244a0f2fab Update release notes. 2016-11-11 21:18:51 +09:00
Neil Booth
15e052c728 Merge branch 'utxo_optimised' into develop 2016-11-11 21:04:39 +09:00
Neil Booth
f98dc9c351 Practise optimism like before 2016-11-11 21:03:09 +09:00
Neil Booth
5a2a8b4ec1 Prepare 0.2.3 release 2016-11-10 23:57:13 +09:00
Neil Booth
56098e0c52 Show up to 3 missing UTXOs
Fixes #15
2016-11-10 23:51:44 +09:00
Neil Booth
c6b5c577ab More robust daemon error handling
Fixes #6
2016-11-10 23:26:11 +09:00
Neil Booth
8188f7e909 Catch exceptions when trying to listen
Fixes #11
2016-11-10 22:49:20 +09:00
Neil Booth
311f7f9ffd Better optimised storage of UTXO set 2016-11-10 20:04:33 +09:00
Neil Booth
094fd44fc2 Merge UTXO cache into BlockProcessor 2016-11-10 07:49:01 +09:00
Neil Booth
bf6a8f58d5 Hotfixes for two issues in 0.2.2 2016-11-10 07:43:07 +09:00
Neil Booth
1737bb8354 Move some code back to correct place
Fixes #12
2016-11-10 07:41:56 +09:00
Neil Booth
06b6d695c2 Only attempt to flush if cancelled 2016-11-10 07:32:39 +09:00
Johann Bauer
1405057096 Fix getting the number of watched addresses
Resolves #13
2016-11-09 18:07:25 +01:00
Neil Booth
4e619c9f5e Prepare 0.2.2 2016-11-09 07:44:17 +09:00
Neil Booth
a07ed5876b Count missing UTXOs and log just once
They're a temporary phenomenon but it's handy to see how often
these things happen.  Fixes #10.
2016-11-09 07:30:48 +09:00
Neil Booth
55cc1d3d65 More regularly 2016-11-09 06:50:00 +09:00
Neil Booth
212d653b5b Yield during mempool updates 2016-11-09 06:45:24 +09:00
Neil Booth
c6a57daf6a Tweak daemon messages 2016-11-09 06:32:26 +09:00
Neil Booth
ed44c6ab73 Clean up startup procedure 2016-11-09 00:47:49 +09:00
Neil Booth
a510603b46 Better logging of initial mempool fill 2016-11-08 23:37:19 +09:00
Neil Booth
3972e18e98 Move the rest of fs_cache into BlockProcessor 2016-11-08 23:30:30 +09:00
Neil Booth
ad2dabf751 Remove the FS cache
Really belongs with BlockProcessor now
2016-11-08 20:06:06 +09:00
Neil Booth
5736e9cb70 Move utxo_cache to BlockProcessor where it belongs 2016-11-08 19:35:21 +09:00
Neil Booth
5c5e90d574 Move BlockServer to more appropriate location 2016-11-08 19:20:13 +09:00
Neil Booth
93d53bdd87 The controller is dead! 2016-11-08 08:29:56 +09:00
Neil Booth
2b028cc065 Create BlockServer
Controller now an empty shell
2016-11-08 08:09:59 +09:00
Neil Booth
c0a112f8ea Split out part of block processor into db.py
The part that doesn't actually do any block processing...
2016-11-08 07:38:16 +09:00
Neil Booth
1393f6a030 Move signal handling out of the controller 2016-11-08 00:04:10 +09:00
Neil Booth
9acd91615c Merge remote-tracking branch 'github/master' into release-0.2.1
Include's bauerj's storage.py improvements.
2016-11-07 23:11:34 +09:00
Neil Booth
e7912928c5 Prepare for release 2016-11-07 23:10:56 +09:00
Neil Booth
aaec784ef2 Merge branch 'daemon_throttle' into session_mgr 2016-11-07 22:48:12 +09:00
Neil Booth
782268cd3e Limit concurrent daemon requests
Fixes #7
2016-11-07 22:47:38 +09:00
Neil Booth
f05a5414c1 Make jobs truly asynchronous.
However we need to rate-limit the daemon...
2016-11-07 22:22:47 +09:00
Neil Booth
e452c0bca7 Fix read_headers 2016-11-07 19:59:49 +09:00
Neil Booth
7f03b0fa73 Move job handling out of the controller
Controller on its last legs...
2016-11-07 19:57:23 +09:00
Neil Booth
be975a3f7c Create docs directory 2016-11-07 05:35:00 +09:00
Johann Bauer
f6f674577f Fix RocksDB and LMDB 2016-11-06 18:16:43 +01:00
Neil Booth
f02acdfd46 A couple more tweaks. 2016-11-06 14:56:08 +09:00
Neil Booth
6deb05ab6f It was a mistake to use tuples 2016-11-06 14:42:12 +09:00
Neil Booth
3ab07c1fb6 Speed up script parsing for ~3% faster throughput
Also improves the coin abstraction
2016-11-06 14:32:27 +09:00
Neil Booth
3d41738a00 Allow daemon is None still 2016-11-06 12:09:41 +09:00
Neil Booth
e651530e5d Log immediately if mempool shrinks 2016-11-06 10:16:02 +09:00
Neil Booth
c2703c58a3 Better mempool log 2016-11-06 09:41:06 +09:00
Neil Booth
42b0e32f63 Prepare release 2016-11-06 09:27:25 +09:00
Neil Booth
c26bc43a00 Remove keys if value is empty 2016-11-06 08:54:56 +09:00
Neil Booth
48f0d5456c Release preparation 2016-11-06 08:48:38 +09:00
Neil Booth
db29121d58 Improved daemon logging 2016-11-06 08:41:16 +09:00
Neil Booth
18efa67f1d Various daemon improvements 2016-11-06 08:24:18 +09:00
Neil Booth
1b589d3d1f Remove old reorg forcing code 2016-11-06 06:53:34 +09:00
Neil Booth
00e9c5a31d Add daemon debugging caught-up facility 2016-11-05 21:37:02 +09:00
Neil Booth
312aaf4736 Attempt to improve the ETA 2016-11-05 18:38:11 +09:00
Neil Booth
26dc1021f6 Catch TimeoutError 2016-11-05 18:37:40 +09:00
Neil Booth
28e7b95412 Bump version, update RELEASE_NOTES 2016-11-05 18:05:46 +09:00
Neil Booth
f86d91862e Fix typos 2016-11-05 16:03:11 +09:00
Neil Booth
9fbbc8bfdb Clean up daemon interface. 2016-11-05 15:59:42 +09:00
Neil Booth
7019b29baf Release notes 2016-11-05 13:33:34 +09:00
Neil Booth
aa6e4ad922 Raise on chain reorgs
In 0.06 advance_block() returned None instead of True.
Cleaner to throw.
2016-11-05 13:31:33 +09:00
Neil Booth
0ccea80fc3 Prepare for release 2016-11-05 13:05:42 +09:00
Neil Booth
b5d1f401fd Fix bugs 2016-11-05 12:58:23 +09:00
Neil Booth
48b8b9332e Initial attempt at mempool 2016-11-05 12:27:37 +09:00
Neil Booth
5904b1dbdf Bump to 0.05 2016-11-04 20:09:59 +09:00
Neil Booth
d25e66cb2e Handle the nothing touched case. 2016-11-04 20:08:17 +09:00
Neil Booth
be0a5f246c Fix some typos. 2016-11-03 23:05:13 +09:00
Neil Booth
1711834fe8 Release preparation 2016-11-03 21:52:12 +09:00
Neil Booth
fb43712869 Controller clean up 2016-11-03 19:09:33 +09:00
Neil Booth
c0568daec3 Rework the DB API a bit 2016-11-03 19:09:21 +09:00
Neil Booth
892e9524e5 Fix bugs handling client UTXO requests
Allow strings for ints - Electrum command line doesn't convert
Don't blow away hash168s from the DB
2016-11-03 19:09:05 +09:00
Neil Booth
07515c6a0d Fix some of the DB interface 2016-11-03 19:08:41 +09:00
Neil Booth
be2475f617 Handle utxo.get_address 2016-11-03 19:08:25 +09:00
Neil Booth
a5b73560f3 Fix reorg assertion, I think 2016-11-03 19:07:51 +09:00
Neil Booth
51accf7dfe Update BlockProcessor for server changes 2016-11-03 19:05:10 +09:00
Neil Booth
e717e719c1 Prefetcher cleanup 2016-11-03 18:29:36 +09:00
Neil Booth
ceecdc54ac Server work
Avoid touching the block preprocessor hot loop for now
2016-11-03 17:26:50 +09:00
Neil Booth
2dd5b7ef1f Add ARCHITECTURE.rst 2016-11-03 16:57:24 +09:00
Neil Booth
c32b04d1a7 Add release blurb. 2016-11-03 16:56:59 +09:00
Neil Booth
f9fcdf2232 Merge branch 'master' into develop 2016-11-03 16:53:08 +09:00
Neil Booth
3d11afbda2 Enable servers 2016-11-03 16:48:10 +09:00
Neil Booth
d2ebb80fac Extend copyright notice; improve comments 2016-11-03 16:45:06 +09:00
Neil Booth
58a5e69fca Fix logging issues on sync without the perf hit 2016-11-03 16:40:29 +09:00
Neil Booth
c09182534f Update for release 2016-11-03 16:25:11 +09:00
Neil Booth
50a141fbf4 Update text 2016-10-29 15:49:09 +09:00
Neil Booth
d0088e474a Fix stats 2016-10-29 15:20:38 +09:00
Neil Booth
5c63cd40de Implement reorg logic 2016-10-29 14:38:54 +09:00
Neil Booth
76748d2673 Fix query.py 2016-10-28 21:41:36 +09:00
Neil Booth
2b45698962 Remove Outpoint as a separate object
Hopefully this is a little more efficient
2016-10-28 07:35:18 +09:00
Neil Booth
6957b59b19 Start work on handling block reorgs
Unfinished
2016-10-28 06:02:18 +09:00
Neil Booth
3e4db868e6 Don't start servers for now. 2016-10-28 05:47:34 +09:00
Neil Booth
b0d5c623b4 Set block_size to the default of 4K 2016-10-28 05:45:09 +09:00
Neil Booth
cdbb6b093a Fix fs_cache tx count 2016-10-27 19:26:47 +09:00
Neil Booth
2001d5c4f4 Merge the DB and BlockProcessor classes 2016-10-27 07:59:46 +09:00
Neil Booth
c0be9860d8 Restore get_tx_hash fix 2016-10-27 07:58:50 +09:00
Neil Booth
c008c04e43 Move caches to their own file.
Move the DB to the block_processor file.  It will merge with it soon.
2016-10-27 07:58:00 +09:00
Neil Booth
ace80c7b87 Split out the prefetcher. 2016-10-27 07:49:56 +09:00
Neil Booth
a813eaf5f5 Rename BlockCache and put in own file 2016-10-27 07:49:23 +09:00
Neil Booth
897e68d20c Move some daemon logic to daemon.py 2016-10-27 07:45:10 +09:00
Neil Booth
6711ed0ae8 Clean up initialization of controller 2016-10-27 07:44:26 +09:00
Neil Booth
8452d0c016 Split out daemon handler into separate file. 2016-10-27 07:43:48 +09:00
Neil Booth
30d1b7f77c Add proper block chaining check 2016-10-27 07:38:39 +09:00
Neil Booth
78d0acc95b Fix get_tx_hash 2016-10-27 07:33:21 +09:00
Neil Booth
28eb95edd3 Break out FS cache into its own class 2016-10-27 07:30:24 +09:00
Neil Booth
6ad8c16c47 Handle a couple more requests. 2016-10-27 07:25:34 +09:00
Neil Booth
1084060493 Clean up controller init, and sync on catch up 2016-10-27 07:23:52 +09:00
Neil Booth
208ed5d2b2 Don't start servers 2016-10-27 07:13:50 +09:00
Neil Booth
334ffdaa4f Begin work on proper server 2016-10-17 20:02:42 +09:00
Neil Booth
b06f2a7c1c Fix imports 2016-10-16 09:13:05 +09:00
Neil Booth
c8f3c79167 Memory views for blocks don't seem to help 2016-10-16 09:08:38 +09:00
Neil Booth
46654a19f4 Merge branch 'rpc' into develop 2016-10-16 08:59:50 +09:00
Neil Booth
0b01026b88 Add an RPC server
And associated electrumx_rpc command
2016-10-16 08:58:53 +09:00
Neil Booth
19cbb2d00d Fix ETA estimate 2016-10-15 12:43:23 +09:00
Neil Booth
282d46a46c Flush to disk when flushing history 2016-10-15 11:41:55 +09:00
Neil Booth
34096a02e9 Recovery from excess history flushes 2016-10-15 08:42:42 +09:00
Neil Booth
cbe1ef60ca Better logging 2016-10-14 20:26:10 +09:00
Neil Booth
46b9519ee0 Adjust sleeps. 2016-10-14 20:17:09 +09:00
Neil Booth
5f77ff4ef0 Flush history separately.
We do not yet remove excess history.
2016-10-14 20:09:47 +09:00
Neil Booth
6b513a91d0 CACHE_MB is now the environment var. 2016-10-14 07:56:25 +09:00
Neil Booth
370cceab83 Clean up RPC handling
Remove class
Handle exceptions properly by cancelling tasks
Log what is happening
Generalise send interface
2016-10-13 22:10:34 +09:00
Neil Booth
4b99ae4e11 Fix ETA calc 2016-10-13 07:16:42 +09:00
Neil Booth
3fce298835 Better time est. A couple of fixes. 2016-10-12 18:59:15 +09:00
Neil Booth
5653bf75f5 More robust init 2016-10-12 05:38:24 +09:00
Neil Booth
ba1662bbf7 Add ETA stats. Show daemon height again. 2016-10-11 21:45:48 +09:00
Neil Booth
c7f930a18a Clean up db initialization and state writing 2016-10-11 21:20:04 +09:00
Neil Booth
d8e9eb7796 Accurate cache accounting 2016-10-11 17:38:03 +09:00
Neil Booth
682cc8ff86 Better size est. 2016-10-11 06:49:50 +09:00
Neil Booth
d11c60f6ad Cache size logging 2016-10-11 06:43:59 +09:00
Neil Booth
14f4228af7 Add missing line 2016-10-11 00:11:10 +09:00
Neil Booth
4e777b5861 Let's try a smarter UTXO cache. 2016-10-11 00:04:13 +09:00
Neil Booth
df1a62b826 Only log if advanced 2016-10-10 11:50:49 +09:00
Neil Booth
6644102441 Use hash168 to distinguish address types in DB 2016-10-10 11:42:33 +09:00
Neil Booth
4879422e92 Improve the leveldb flush; it should be a lot faster now.
More useful logging and stats.
2016-10-10 07:23:19 +09:00
Neil Booth
329f411640 Fix percentages 2016-10-09 13:27:02 +09:00
Neil Booth
7b36a1431c Add instrumentation 2016-10-09 13:00:46 +09:00
Neil Booth
ca11710fdd Print balance in query tool 2016-10-09 09:14:59 +09:00
Neil Booth
6ccdce2c77 Print if nothing. Clean up loop. 2016-10-09 08:41:42 +09:00
Neil Booth
db2e1d43d8 Merge branch 'query' into develop 2016-10-09 08:28:29 +09:00
Neil Booth
1e97686c5f Add a simple query for debugging 2016-10-09 08:26:46 +09:00
Neil Booth
17034ac7a7 Make get_utxos() and get_history() generators
The also take a limit.
2016-10-08 23:42:01 +09:00
Neil Booth
b65e8cc9d0 Fix an incorrect comment, and a typo 2016-10-08 17:50:03 +09:00
Neil Booth
64b7554b73 Fix some typos 2016-10-08 17:34:12 +09:00
Neil Booth
a3dbc68614 Initial revision 2016-10-08 17:17:43 +09:00