1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-23 14:50:45 +01:00
Commit graph

975 commits

Author SHA1 Message Date
Roman Zeyde
0a04888673 Implement 'blockchain.scripthash.listunspent' RPC
Following #475
2021-09-17 14:01:15 +03:00
Roman Zeyde
e99906ff83 Refactor 'blockchain.scripthash.get_balance'
Move common code into a helper struct.
2021-09-17 14:00:06 +03:00
Roman Zeyde
b916c2802b Add a few comments to p2p.rs 2021-09-16 10:50:29 +03:00
Roman Zeyde
1fa77aefa6 Fix RPC results sort in history.py
Traceback (most recent call last):
  File "history.py", line 148, in <module>
    main()
  File "history.py", line 70, in main
    for balance, addr in sorted(zip(balances, args.address)):
TypeError: '<' not supported between instances of 'dict' and 'dict'
2021-09-16 10:30:02 +03:00
Roman Zeyde
844723f5f4 Simplify 'blockchain.scripthash.get_balance' implementation 2021-09-15 20:50:57 +03:00
Roman Zeyde
538d460f25 Log unconfirmed balance at history.py 2021-09-15 20:50:57 +03:00
Roman Zeyde
fb7e9c576c Cache amounts in status::TxEntry 2021-09-15 20:50:57 +03:00
Roman Zeyde
66b7b8bad8 Deny warnings in clippy 2021-09-15 19:23:49 +03:00
Roman Zeyde
ea4d9b4476 Add a build job to GitHub Actions 2021-09-15 18:18:10 +03:00
Roman Zeyde
9e77534e33 Use docker only for integration tests
Run clippy/fmt/unittests separately.
2021-09-15 18:03:23 +03:00
Roman Zeyde
3f41cdaa55 Add snappy to RocksDB features
It would be useful to detect old DBs:
https://github.com/romanz/electrs/pull/477#discussion_r707600255

RocksDB compilation time increases 1m03s -> 1m07s (+6%).
Total electrs build time is 2m05s.
2021-09-15 17:26:45 +03:00
Roman Zeyde
89bca4900d Use latest Bitcoin Core release (22.0) in CI 2021-09-14 08:52:04 +03:00
Roman Zeyde
382d71787a Update documentation for the upcoming 0.9 version 2021-09-13 11:09:51 +03:00
Roman Zeyde
96be60e890 Update Cargo dependencies
Keep the following (otherwise the build breaks):

    cargo update -p clang-sys --precise 1.2.1
    cargo update -p bitflags --precise 1.2.1
2021-09-12 23:27:48 +03:00
Roman Zeyde
8d12df353c Use try_from for explicit type conversion (instead of try_into) 2021-09-12 16:22:32 +03:00
Roman Zeyde
1423031931 Merge branch 'p2p-rocksdb-6.11.4' into p2p 2021-09-11 20:01:39 +03:00
Roman Zeyde
f5df00f631 Allow single-sync invocation using --sync-once commandline flag 2021-09-11 11:01:05 +03:00
Roman Zeyde
2f24d0774a Downgrade librocksdb-sys to 6.11.4 2021-09-10 21:04:29 +03:00
Roman Zeyde
269e756383 Next release will be 0.9.0-rc1 2021-09-09 13:39:04 +03:00
Roman Zeyde
5332cc677f Refactor and document status.rs 2021-09-08 21:04:30 +03:00
Roman Zeyde
3090866fdd Drop helper binaries and some APIs 2021-09-08 19:14:44 +03:00
Roman Zeyde
2e5ba9b401 Add docs to chain.rs 2021-09-05 22:09:50 +03:00
Roman Zeyde
75e0da7168 Simplify txid min/max handling 2021-09-05 19:14:17 +03:00
Roman Zeyde
3ad89fb96e
Merge pull request #468 from romanz/p2p-concurrent
Run p2p block parsing and processing concurrently
2021-09-02 21:25:46 +03:00
Roman Zeyde
e1ec17c5b1 Run p2p block parsing and processing concurrently 2021-09-01 21:25:53 +03:00
Roman Zeyde
fb88bccb0a Propagate Electrum JSON RPC error 2021-08-28 20:05:39 +03:00
Roman Zeyde
fe1bfe3bc1 Probe metrics endpoint in CI 2021-08-27 22:28:54 +03:00
Roman Zeyde
f9346d2a1d Drop hyper dependency
https://rustsec.org/advisories/RUSTSEC-2021-0078

Use tiny_http for Prometheus instead.
2021-08-27 20:53:11 +03:00
Roman Zeyde
64230332cc Refactor thread spawning into a separate module 2021-08-27 20:53:11 +03:00
Roman Zeyde
7409142edf Bump crossbeam-deque to 0.8.1
Using `cargo update -p crossbeam-deque --precise "0.8.1"`
2021-08-27 20:49:34 +03:00
Roman Zeyde
0516aead2a Bump bitcoin dependency to 0.27
A bit hacky solution until https://github.com/rust-bitcoin/rust-bitcoincore-rpc/pull/196 is merged.
2021-08-27 19:46:56 +03:00
Roman Zeyde
e8fb55b888 Use './db' as default DB directory in server.sh 2021-08-27 14:47:48 +03:00
Roman Zeyde
6a7cd19946 Reuse scripthash subscription 2021-08-27 12:23:34 +03:00
Roman Zeyde
1008641838 Increase default index_lookup_limit to 200
Otherwise it fails when mining >100 regtest blocks to the same address.
2021-08-27 12:23:30 +03:00
Roman Zeyde
4b24e649d6 Move local-electrum.bash to contrib/ 2021-08-26 23:16:00 +03:00
Roman Zeyde
ffab4f4efa Fix incorrect JSON response for 'blockchain.transaction.get' RPC
Daemon::get_transaction_hex should return a string, not a dictionary.
2021-08-24 23:32:27 +03:00
Roman Zeyde
c7eb0ba56a Support regtest in contrib/history.py 2021-08-23 11:56:51 +03:00
Roman Zeyde
7baacab560 Fixup default logging 2021-08-22 22:33:09 +03:00
Roman Zeyde
9796a4433c Log RocksDB statistics after each flush 2021-08-22 22:02:53 +03:00
Roman Zeyde
c1c1b26333 Use INFO logging level by default from server.sh 2021-08-22 17:06:07 +03:00
Roman Zeyde
ab02d731b0
Merge pull request #426 from romanz/p2p-clippy
Disable 'clippy::identity_conversion' on generated configuration module + add clippy to CI
2021-08-21 22:15:34 +03:00
Roman Zeyde
79f38d8852 Add clippy check to Dockerfile build 2021-08-21 20:20:57 +03:00
Roman Zeyde
b43173881d Disable 'clippy::identity_conversion' on generated configuration handling code
Otherwise, clippy fails with:

warning: identical conversion
   --> /media/roman/3TB/roman/Code/electrs/target/debug/build/electrs-56b1e395b2bcf88c/out/configure_me_config.rs:339:25
    |
339 |                 db_dir: db_dir.into(),
    |                         ^^^^^^^^^^^^^ help: consider removing `.into()`: `db_dir`
    |
    = note: `#[warn(clippy::identity_conversion)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion

warning: identical conversion
   --> /media/roman/3TB/roman/Code/electrs/target/debug/build/electrs-56b1e395b2bcf88c/out/configure_me_config.rs:340:29
    |
340 |                 daemon_dir: daemon_dir.into(),
    |                             ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `daemon_dir`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion

warning: identical conversion
   --> /media/roman/3TB/roman/Code/electrs/target/debug/build/electrs-56b1e395b2bcf88c/out/configure_me_config.rs:349:37
    |
349 |                 wait_duration_secs: wait_duration_secs.into(),
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `wait_duration_secs`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion

warning: identical conversion
   --> /media/roman/3TB/roman/Code/electrs/target/debug/build/electrs-56b1e395b2bcf88c/out/configure_me_config.rs:350:35
    |
350 |                 index_batch_size: index_batch_size.into(),
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `index_batch_size`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion

warning: identical conversion
   --> /media/roman/3TB/roman/Code/electrs/target/debug/build/electrs-56b1e395b2bcf88c/out/configure_me_config.rs:351:29
    |
351 |                 txid_limit: txid_limit.into(),
    |                             ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `txid_limit`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion

warning: identical conversion
   --> /media/roman/3TB/roman/Code/electrs/target/debug/build/electrs-56b1e395b2bcf88c/out/configure_me_config.rs:352:32
    |
352 |                 server_banner: server_banner.into(),
    |                                ^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `server_banner`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion
2021-08-21 19:10:21 +03:00
Roman Zeyde
33e2c72923 Fixup a clippy nit 2021-08-21 19:05:22 +03:00
Roman Zeyde
31765e3e49 Limit index lookups to prevent DoS for "popular" addresses 2021-08-21 18:25:31 +03:00
Roman Zeyde
321dc23767 Fix crates.io badge 2021-08-18 17:35:04 +03:00
Roman Zeyde
95134a5157 Drop unused command-line parameters 2021-08-18 17:24:14 +03:00
Roman Zeyde
ee378e8168
Merge pull request #456 from Pantamis/p2p
Use the same log verbosity levels as master
2021-08-18 14:19:05 +03:00
Pantamis
fa53180846
Small fix 2021-08-16 13:08:49 +02:00
Pantamis
aa6c5b1578
Use the same log verbosity levels as master
Current verbosity level of master: https://docs.rs/stderrlog/0.5.1/src/stderrlog/lib.rs.html#377
2021-08-16 12:58:03 +02:00