1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 09:54:09 +01:00
Commit Graph

337 Commits

Author SHA1 Message Date
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
Roman Zeyde
cecaa538b5
Allow querying mempool directly for transactions
This would allow querying the daemon only for confirmed transactions.
2018-06-01 23:53:22 +03:00
Roman Zeyde
b2bb6b8c78
Improve error message in case of Query::status() failure 2018-06-01 23:51:34 +03:00
Roman Zeyde
82cdf65436
Rename Query::load_txns_by_prefix() 2018-06-01 23:49:44 +03:00
Roman Zeyde
679bc7a4de
Refactor timing logic into util::Timer 2018-06-01 22:06:34 +03:00
Roman Zeyde
7d9cbc74f1
Move configuration into a separate module 2018-06-01 19:22:35 +03:00
Roman Zeyde
98d1dabfff
Stop indexing after SIGINT 2018-06-01 19:08:22 +03:00
Roman Zeyde
48ec215050
Split {Read,Write}Store getter from App 2018-06-01 17:51:55 +03:00
Roman Zeyde
a8e32f6ce0
Remove unused DBStore method 2018-06-01 17:51:55 +03:00
Roman Zeyde
78f5203fe7
Simplify indexing main loop 2018-06-01 12:28:40 +03:00
Roman Zeyde
09c795ce37
Check downloaded block hash 2018-06-01 12:22:03 +03:00
Roman Zeyde
505914828a
Update README.md 2018-05-31 15:27:24 +03:00
Roman Zeyde
9ca064c320
Update crate name 2018-05-31 14:44:00 +03:00
Roman Zeyde
76a396968a
Update TODO.txt 2018-05-31 14:28:46 +03:00
Roman Zeyde
8c3382cea7
Refactor balance calculation 2018-05-31 12:55:50 +03:00
Roman Zeyde
2e84b05c28
Use commandline flag for log file specification 2018-05-31 11:31:41 +03:00
Roman Zeyde
a4f6ba8fa4
Simplify main loop 2018-05-31 10:50:28 +03:00
Roman Zeyde
629ef08d2b
Validate the new chain extension 2018-05-31 10:12:19 +03:00
Roman Zeyde
e8c358c961
Fix 'use' statements ordering 2018-05-31 09:53:42 +03:00
Roman Zeyde
6a68753f04
Use HeaderList::header_by_blockhash() to verify the header 2018-05-31 09:53:08 +03:00
Roman Zeyde
ade45b3336
Remove 'futures' and 'tokio' dependencies 2018-05-30 23:47:49 +03:00
Roman Zeyde
d08411109f
Use WriteStore trait object for Index::update() 2018-05-30 22:33:56 +03:00
Roman Zeyde
32226298e2
Remove fixed TODO 2018-05-30 22:21:35 +03:00
Roman Zeyde
43b952703f
Merge branch 'refactor' 2018-05-30 22:10:54 +03:00
Roman Zeyde
e499809d76
Remove unused code from util.rs 2018-05-30 21:43:21 +03:00
Roman Zeyde
5b7b7d0d10
Refactor Index::get_header() implementation 2018-05-30 21:42:45 +03:00