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

1105 Commits

Author SHA1 Message Date
Roman Zeyde
205b33ade9
Merge pull request #492 from romanz/disable-process-collector
Don't use prometheus::process_collector::ProcessCollector by default
2021-09-19 17:44:59 +03:00
Roman Zeyde
d085b60fb0 Don't use TRACE verbosity in contrib/electrs.service 2021-09-19 14:15:52 +03:00
Roman Zeyde
2ded459d0c Don't use prometheus::process_collector::ProcessCollector by default
Following #491.

It can be re-enabled by:

```
cargo build --release --features prometheus/process
```
2021-09-19 14:10:49 +03:00
Roman Zeyde
a53048f2ef Fixup schema.md table formatting 2021-09-18 20:19:58 +03:00
Roman Zeyde
2237e45a55 Delete old sync.sh script 2021-09-18 20:16:26 +03:00
Roman Zeyde
77b47ec351 Document the reasons for using custom RocksDB release 2021-09-18 09:45:18 +03:00
Roman Zeyde
357bfe896d Use a custom release of rocksdb 2021-09-18 09:01:29 +03:00
Roman Zeyde
3c4e616901 Add p2p daemon address to config_example.toml 2021-09-18 00:28:55 +03:00
Roman Zeyde
32b6340cc1 Use core-rpc instead of bitcoincore-rpc
https://github.com/RCasatta/rust-bitcoincore-rpc
2021-09-17 23:42:57 +03:00
Roman Zeyde
62e404848b Update 0.9.0-rc1 release date and notes 2021-09-17 20:01:10 +03:00
Roman Zeyde
2152ac9cca Merge branch 'p2p' 2021-09-17 16:08:19 +03:00
Martin Habovštiak
c1ce81112f Reference auto reindex PR in release notes
Co-authored-by: Roman Zeyde <git@romanzey.de>
2021-09-17 15:28:24 +03:00
Martin Habovštiak
c11ee11395 JSON spelling
Co-authored-by: Roman Zeyde <git@romanzey.de>
2021-09-17 15:28:24 +03:00
Martin Habovstiak
ce96481522 Improve documentation of 0.8.x -> 0.9.0 upgrade
This should hopefully make the major changes more visible and avoid
surprises.
2021-09-17 15:28:24 +03:00
Martin Habovstiak
577f54195b Auto reindex when old database is detected
This implements automatic reindexing of old database, turned on by
default. When an old database is detected and `auto_reindex` is turned
on the database will be destroyed so that `electrs` can re-sync. The
user can still turn this off to check db format.

The help message says "or inconsistent" - this is not implemented but we
could in the future and it seems reasonable to explicitly state that
this option will control that thing as well.

Note: 0.8.x versions of `electrs` didn't contain format information -
so we check if the database is empty and assuming it's legacy if it's
not empty but without format information.

The code is also restructured a bit and a few tests are added.
2021-09-17 15:20:54 +03:00
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
1997ddc051 Bump version 2021-09-14 21:26:08 +03:00
Roman Zeyde
cfcff051fb Fail if cookie is specified
Following https://github.com/romanz/electrs/issues/371#issuecomment-918217030
2021-09-14 12:34:52 +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