Commit Graph

95 Commits

Author SHA1 Message Date
Neil Booth
bab0d162de Merge ServerManager and BlockServer 2016-11-23 17:52:08 +09:00
Neil Booth
640360c809 Add feature to simulate reorgs for debugging 2016-11-23 09:52:30 +09:00
Neil Booth
8970205e6c Remove obsolete debugging feature 2016-11-23 09:16:41 +09:00
Neil Booth
2df5aa746f Pop one from tx_counts for each block we back up.
Fixes #40
2016-11-23 09:11:49 +09:00
Neil Booth
26221e751e Remove dead code 2016-11-23 09:02:01 +09:00
Neil Booth
d1ba4b1a76 Reset fs_height when backing up 2016-11-22 08:09:43 +09:00
Neil Booth
67bb01bf2c Fix reorgs with unspendable TXOs 2016-11-22 07:50:01 +09:00
Neil Booth
87cdd2709d Implement daemon failover
Daemon URLs can be comma-separated in the DAEMON_URL env var.
Surrounding whitespace is stripped.
http:// is preprended if missing.
The coin's default port is supplied if missing.
A trailing / is supplied if missing.
Closes #33
2016-11-20 20:52:54 +09:00
Neil Booth
98fd178c62 Make mempool truly asynchronous
Mempool updates happen in parallel asynchronously to processing of
new blocks once caught up.  This means that, e.g., during the initial
slow mempool download incoming blocks can be processed and communicated
to clients without waiting for the downloaded mempool transaction
analysis to complete.  From a client's point of view the server won't
be seen as lagging.
2016-11-20 18:17:55 +09:00
Neil Booth
8617c82ec2 Floor disk_count at zero. 2016-11-19 20:56:08 +09:00
Neil Booth
52116539d4 Clean shutdown: wait for transports to close
We give 10 seconds for everything to be cleaned up, then close forcibly.
Fixes #30
2016-11-19 17:05:47 +09:00
Neil Booth
3d87e299ea Move formatted_time to library 2016-11-19 15:42:06 +09:00
Neil Booth
942d5d6b00 Fix import 2016-11-19 08:07:37 +09:00
Neil Booth
063a5469cc Move mempool to be with BlockServer
BlockProcessor doesn't really need a mempool; mempools are
only useful for servers.
Set first_sync before flushing, so it goes into DB state.
Start servers immediately on catchup; mempool fills asynchronously.

Fixes #31
2016-11-19 08:02:13 +09:00
Neil Booth
d6fa4a1564 More logging improvements
- log software and DB version at startup
- log more DB info at startup
- log software and DB version when first synced

Fixes #29
2016-11-19 07:29:17 +09:00
Neil Booth
88185b0daa Bump log threshold up; tweak log 2016-11-18 22:20:48 +09:00
Neil Booth
24d9e5a95e Tweak flush logic
Aim to not check cache size if caught up; also reduces logs
2016-11-18 22:17:34 +09:00
Neil Booth
e6058c3fd3 hex_hash is already hex 2016-11-18 21:16:34 +09:00
Neil Booth
d2c575a24b Better, more concise logs, particularly when caught up. 2016-11-18 20:08:43 +09:00
Neil Booth
3f8b26291a At startup only log some things during initial sync 2016-11-18 19:21:45 +09:00
Neil Booth
f4651c0ca4 Store tx_num in 'h' table key so keys are unique 2016-11-17 07:59:40 +09:00
Neil Booth
3c98053f5d Remove some dead code 2016-11-17 07:44:42 +09:00
Neil Booth
d85034353f Remove useless re-raise of cancellation 2016-11-15 20:13:50 +09:00
Neil Booth
db187540d5 Have task coros handle cancelled exceptions 2016-11-15 20:09:38 +09:00
Neil Booth
a2280bbc93 Clean up futures handling 2016-11-15 20:09:38 +09:00
Neil Booth
8671e57183 Move fs flushes to same time as history flushes 2016-11-15 06:28:52 +09:00
Neil Booth
95cc979465 Yield more during mempool load 2016-11-14 23:12:50 +09:00
Neil Booth
451f9d026a Merge branch 'save_all_utxos' into develop 2016-11-13 20:42:43 +09:00
Neil Booth
85786b87a2 Save all UTXOs
Change the DB version
2016-11-13 20:35:03 +09:00
Neil Booth
4dac728984 Ignore the unspendable genesis coinbase
Fixes #17
2016-11-13 20:15:54 +09:00
Neil Booth
41ff6e5b11 Prepare 0.4.3 2016-11-13 17:55:50 +09:00
Neil Booth
c93f6cb920 Final cleanup 2016-11-12 21:48:34 +09:00
Neil Booth
501807bf1a Implement IRC support and related queries from clients 2016-11-12 21:06:51 +09:00
Neil Booth
80fe427c89 Improve logging 2016-11-12 20:50:44 +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
56098e0c52 Show up to 3 missing UTXOs
Fixes #15
2016-11-10 23:51:44 +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
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
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
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