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

1280 Commits

Author SHA1 Message Date
Roman Zeyde
0e2766c264 Disable setting TRACE verbosity by '-vvvv'
Should fix https://github.com/romanz/electrs/issues/355#issuecomment-926903119.

It still can be set using:
```
RUST_LOG=electrs=TRACE target/release/electrs <args>
```

See https://docs.rs/env_logger for more usage examples.
2021-09-26 12:46:12 +03:00
Roman Zeyde
a10c3244da Add gauge metric to export latest block height 2021-09-26 12:05:13 +03:00
Roman Zeyde
94de4345b4 Update indexing duration histogram metrics 2021-09-26 12:04:12 +03:00
Roman Zeyde
7b52eadf82 Drop unused metrics 2021-09-26 11:53:10 +03:00
Roman Zeyde
f0e9549650
Merge pull request #501 from romanz/simpler-index
Use blocks' height iterator (instead of a map)
2021-09-26 09:42:34 +03:00
Roman Zeyde
9b2d40966d Use blocks' height iterator (instead of a map)
We already assume that blocks are processed in ascending order.
2021-09-26 00:02:57 +03:00
Roman Zeyde
c902e4e545
Merge pull request #504 from Kixunil/patch-4
Warn about log level
2021-09-25 22:34:35 +03:00
Martin Habovštiak
c299183289
Explain verbose level in usage 2021-09-25 19:46:01 +02:00
Martin Habovštiak
cb53ec2938
Warn about log level
Some people still incorrectly use trace log level and get burned by this update.
2021-09-25 19:39:39 +02:00
Roman Zeyde
f420188650 Add a release note about db/mainnet -> db/bitcoin rename
https://github.com/romanz/electrs/issues/502
2021-09-25 18:07:17 +03:00
Roman Zeyde
74b94d80e1 Fix a few clippy lints 2021-09-23 23:20:25 +03:00
Roman Zeyde
7c55c784c3 Use bitcoincore-rpc 0.14.0 release
Since it now uses `bitcoin` 0.27
2021-09-23 18:37:02 +03:00
Roman Zeyde
5ae3d6526e Update 0.9.0-rc2 release notes 2021-09-23 18:09:58 +03:00
Roman Zeyde
a8a4ba280e Use latest cargo-audit 2021-09-23 17:53:20 +03:00
Roman Zeyde
f5bd245569 Close index DB if interrupted during initial sync
It should allow resuming initial sync (fixing #494).
2021-09-23 17:40:14 +03:00
Roman Zeyde
c7133dd9e7 Refactor index_batch_size usage 2021-09-23 17:40:14 +03:00
Roman Zeyde
8285cf3fc7 Allow configuration of JSON-RPC timeout
Following https://github.com/romanz/electrs/issues/495.

Also, fix https://github.com/romanz/electrs/issues/443.
2021-09-23 17:21:57 +03:00
Roman Zeyde
492d6aa275 Don't fail if wait_for_new_block RPC timeouts
Following #495.
2021-09-21 13:11:56 +03:00
Roman Zeyde
3041e89cd2 Bump bitcoin crate to 0.27.1
Fixes #490.
Also, reverts 52dd59c117.
2021-09-20 17:46:30 +03:00
Roman Zeyde
2887359883
Merge pull request #493 from romanz/cargo-audit
Run 'cargo audit' in CI
2021-09-19 23:23:33 +03:00
Roman Zeyde
048d038aaf Run CI also once a day 2021-09-19 22:38:46 +03:00
Roman Zeyde
e29483318e Run 'cargo audit' in CI 2021-09-19 22:30:42 +03:00
Roman Zeyde
29c81f61a2 Build with 'prometheus/process' in server.sh 2021-09-19 21:21:51 +03:00
Roman Zeyde
8252518ff4 Add #490 to release notes 2021-09-19 19:10:32 +03:00
Roman Zeyde
52dd59c117 Don't apply debug formatting to NetworkMessages in p2p.rs
Otherwise, it may panic on tx ebc9fa1196a59e192352d76c0f6e73167046b9d37b8302b6bb6968dfd279b767 with curent rust-bitcoin.

See https://github.com/romanz/electrs/issues/490#issuecomment-922470120 for more details.
2021-09-19 18:55:56 +03:00
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