Roman Zeyde
f8a577b396
Allow specifying DB directory
2018-06-11 12:39:24 +03:00
Roman Zeyde
c0a4f7a520
Log indexing statistics (blocks, txns, vsize)
2018-06-11 12:27:54 +03:00
Roman Zeyde
49afcc658f
Refactor common JSONRPC reply parsing code
2018-06-11 00:05:45 +03:00
Roman Zeyde
3fff933923
Log periodic status updates' timing
2018-06-10 23:16:23 +03:00
Roman Zeyde
6f0d9ba989
Log mempool size in (virtual) bytes
2018-06-10 23:13:55 +03:00
Roman Zeyde
a47337c2c3
Make mempool::Stats struct private
2018-06-10 23:10:39 +03:00
Roman Zeyde
b4b05909d5
Return mempool entries as a HashSet
2018-06-10 22:58:20 +03:00
Roman Zeyde
f480e4f6c5
Cache loaded transaction (by txid) for faster periodic polling
2018-06-10 19:33:56 +03:00
Roman Zeyde
f787a897bf
No need for keeping acceptor thread handle (for now)
2018-06-10 18:31:51 +03:00
Roman Zeyde
2ac61d84f0
Move logging into library
2018-06-10 18:29:34 +03:00
Roman Zeyde
fbcb3855c8
Schedule periodic RPC updates from main thread polling
2018-06-10 18:15:37 +03:00
Roman Zeyde
8351329846
Add sled TODO
2018-06-10 09:40:53 +03:00
Roman Zeyde
74ab7eafdc
Mark sync-related TODOs as done
2018-06-10 09:08:56 +03:00
Roman Zeyde
da489d53b0
No need to specify default values
2018-06-10 08:59:48 +03:00
Roman Zeyde
0a3df920cf
Flush DB after the last index update
2018-06-10 08:51:07 +03:00
Roman Zeyde
1d5d75c2ac
Support new blockchain.block.headers
API
2018-06-10 08:48:10 +03:00
Roman Zeyde
8306215350
Batch blocks' download during indexing
2018-06-10 00:10:15 +03:00
Roman Zeyde
5dcee078be
Add a message for download progress
2018-06-09 18:22:57 +03:00
Roman Zeyde
946bff4c0e
Remove logging from index benchmark
2018-06-09 18:22:30 +03:00
Roman Zeyde
32768b128b
Use faster headers' download during initialization
2018-06-09 18:13:20 +03:00
Roman Zeyde
b9b7babf79
Show progress for headers' download
2018-06-09 18:12:25 +03:00
Roman Zeyde
f3b9b83538
Separate RPC call invocation from results' parsing
2018-06-09 18:11:39 +03:00
Roman Zeyde
45af47d4e9
Encapsulate connection (tx, rx) streams into mutex-protected struct
2018-06-08 23:00:24 +03:00
Roman Zeyde
e6fc68000d
Reorder Daemon and Mempool struct definitions
2018-06-08 17:51:09 +03:00
Roman Zeyde
935b9c8039
Add vectorized Daemon::getblocks() method
2018-06-08 17:33:48 +03:00
Roman Zeyde
a3f23e421e
Refactor progress bar creation to util.rs
2018-06-08 17:33:48 +03:00
Roman Zeyde
0a7a5f00b4
Refactor common code for getblock{,s}
2018-06-08 17:33:48 +03:00
Roman Zeyde
bd13af5091
Move results from JSON RPC (instead of copying)
2018-06-08 17:33:48 +03:00
Roman Zeyde
64a4e096ce
Don't use Rust-based P2P block download
...
It seems to be limited to ~2 block/second - not sure why...
2018-06-07 22:46:31 +03:00
Roman Zeyde
ee49da71f4
Use "vectorized" RPC for faster blockheaders' retrieval
2018-06-07 22:44:22 +03:00
Roman Zeyde
86191ef465
Refactor common code for getblockheader{,s}
2018-06-07 22:38:00 +03:00
Roman Zeyde
1e62f5a331
Fix wrong return type
2018-06-07 11:08:35 +03:00
Roman Zeyde
46e2d84024
Fix RPC to return raw headers
...
(following Electrum 1.2 protocol spec)
2018-06-06 22:27:31 +03:00
Roman Zeyde
ca82a585e6
Remove sled
dependency
2018-06-05 23:35:38 +03:00
Roman Zeyde
a80c322442
Order new headers outside downloading method
2018-06-05 23:34:13 +03:00
Roman Zeyde
3f4784dd57
Replace HeaderList::height() by len() method
2018-06-05 23:12:12 +03:00
Roman Zeyde
8574e6dc96
Add benchmarking tool for initial block download and indexing
...
(without DB writes)
2018-06-05 13:41:32 +03:00
Roman Zeyde
4a8b8fe9a1
Move server-specific code into main.rs
2018-06-05 13:40:36 +03:00
Roman Zeyde
f6e74a225a
Fix small typo in TODOs
2018-06-03 23:28:18 +03:00
Roman Zeyde
374bcbdb58
Incrementally update mempool index
...
This should significantly improve resource usage when the
mempool has thousands of pending transactions.
2018-06-03 23:21:36 +03:00
Roman Zeyde
aa862679c7
Log also # of indexed transactions
2018-06-03 21:46:26 +03:00
Roman Zeyde
3334dd5bcc
Update TODOs
2018-06-03 21:13:29 +03:00
Roman Zeyde
1f8b6df531
Re-format several files
2018-06-03 20:42:37 +03:00
Roman Zeyde
e7ec19408b
Improve timing metrics' collection and formatting
2018-06-03 16:52:50 +03:00
Roman Zeyde
4b70f3664e
Do not require txindex over the full node
...
Lookup confirmed transactions only at their blocks (using
the `blockhash` parameter of `getrawtransaction` RPC).
Note that seeking inside a block (on a HDD) doesn't take
too much time when compare to reading the whole block and
finding the transaction (even without a client-side cache).
Note: txindex takes ~16GB today (over Bitcoin mainnet).
2018-06-02 10:14:59 +03:00
Roman Zeyde
4189931020
Handle multiple RPC clients in parallel
2018-06-02 10:11:48 +03:00
Roman Zeyde
2fee6ea070
Measure initial headers' load time
2018-06-02 09:58:29 +03:00
Roman Zeyde
fe39718587
Look up transaction height in index if not specified
2018-06-02 09:17:08 +03:00
Roman Zeyde
9f8f1adf3c
Allow single transaction lookup by full TXID
2018-06-02 09:04:25 +03:00
Roman Zeyde
3cc7625608
Allow specifying blockheader during transaction lookup via daemon
...
This would allow to work without daemon's txindex.
Note that seeking inside a block (on a HDD) doesn't take
too much time when compare to reading the whole block and
finding the transaction (even without client-side cache).
Next commit should add support for looking up confirmation
height for a given transaction ID (currently assumes txindex).
2018-06-02 00:43:24 +03:00