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

812 Commits

Author SHA1 Message Date
Dr. Maxim Orlovsky
0ccdf44181 Completed migration to new bitcoin::hash_types
This commits contains fixes to merklization function arguments
and return types. New hash type system from bitcoin crate does
not cover all cases for merkle values; and the same function
may be applied to different hash types. Thus, I have used generic
types to abstract the logic.

`Txid` merklization operates with TxMerkleNode type;
`BlockHash` merklization does not introduce a new type: the same
design decision was made in the original work on new bitcoin
crate type system since it is used in a single case, and there is
no point in introducing a special designated hash type.

Script hashes (used in RPC queries) are left of Sha256dHash type
since there is no corresponding type defined in bitcoin crate;
this type is specific to Electrum X protocol. Corresponding
new type can be implemented in the project later with `hash_newtype!`
macro in the same way it was done in bitcoin crate.
2020-04-20 00:28:23 +02:00
Dr. Maxim Orlovsky
969364af00 WIP on migrating to new bitcoin::hash_types
All types are replaced; only work on merkle types left,
which requires addition of the code
2020-04-20 00:28:23 +02:00
Roman Zeyde
0f3aaa6671
Merge branch 'wait_for_threads' 2020-04-15 22:30:36 +03:00
Roman Zeyde
9c2cbfaa3d
Add more logging to thread handling 2020-04-15 22:30:07 +03:00
Martin Habovstiak
669a4b829d
split_off channged to retain
This changes `split_off`, which does one allocation and copies `n` items
in the best case, `2 * n` items in the worst case to `retain`, which does
zero allocations and copies zero items in the best case and `3 * (n - 1)`
items in worst case (because swap is 3 copies and `retain` has to swap
due to possibility of panic).

I believe this should be net-benefit due to usually small `n`.
2020-04-14 17:32:14 +03:00
Luke Childs
d1c7c7fd9e
Pin Docker Rust base image to Debian Buster
https://github.com/docker-library/repo-info/blob/master/repos/rust/tag-details.md#rust1420-slim-buster
2020-04-14 17:24:37 +03:00
Martin Habovštiak
b1d0434d24 Added a note about broken toolchains on RPi4
I think that this information being visibly documented could save people a long debugging session or sad compile time.
2020-04-14 00:23:57 +03:00
Martin Habovstiak
bc45dbfe41 Actually wait for threads in RPC.
This change implements non-blocking cleanup of threads. It achieves it
by cleaning up periodically based on thread ID, that gets sent from dead
thread over a channel. Aside from internal locks in the channel, there
are no other locks. The cleanup also happens only after a new connection
is accepted, but hopefully won't be an issue, unless there are many
connections that die and then nothing connects for a long time. A final
cleanup happens when the thread is finishing.
2020-04-12 22:53:35 +02:00
Roman Zeyde
a3bfdda32a
Don't deadlock when shutting down 2020-04-12 22:26:11 +03:00
Roman Zeyde
7d23da5ffc
Update Docker to use 'rust:1.42.0-slim' 2020-04-12 21:12:17 +03:00
Roman Zeyde
a02d31eb06
Update contrib/ scripts to use latest PyCoin 2020-04-11 18:41:44 +03:00
Roman Zeyde
d4aa402e6b
Merge pull request #229 from lukechilds/patch-2
Fix typo in index.rs
2020-04-06 23:38:21 +03:00
Luke Childs
f16c1fba70
Fix typo in index.rs
lastest => latest
2020-04-05 17:42:17 +07:00
Roman Zeyde
830797d67f
Limit estimatefee using daemon's relayfee 2020-03-31 16:55:54 +03:00
Roman Zeyde
9ecf131e3d
Use daemon's relayfee instead of hardcoding 2020-03-07 17:40:06 +02:00
Roman Zeyde
cbc2214cd5
Bump version 2020-01-30 21:56:24 +02:00
Roman Zeyde
b122496358
Don't warn when PeriodicUpdate cannot be sent 2020-01-27 22:41:13 +02:00
Roman Zeyde
aa3aef8b64
Add link to configuration docs 2020-01-27 22:27:19 +02:00
Juan Pablo Civile
44adde467f Clean up RPC threads after the connection is closed
This was causing memory leaks when an RPC connection was closed for any
reason.
2019-12-16 21:04:55 +02:00
alex
2f4389e111 Correct --network arg values in the doc
After a recent switch to configure_me in ec049b9a, the 'mainnet'
arg value became 'bitcoin'. 2c50791d then updated db dir location
but the doc for the --network arg remained stale.

An alternative is to accept both 'mainnet' and 'bitcoin' but
it would be confusing IMHO.
2019-12-15 13:51:13 +01:00
Roman Zeyde
ccf6967d73
Bump version 2019-12-06 13:17:00 +02:00
Roman Zeyde
108bf226a2 Use GitHub workflows badge 2019-12-02 10:40:56 +02:00
Roman Zeyde
7ee0b5b784 Remove --verbose from GitHub workflow 2019-12-02 10:20:11 +02:00
Roman Zeyde
5833a9a213 Downgrade rocksdb to 0.12.2 to support more x86 CPUs
https://github.com/romanz/electrs/issues/193
2019-12-02 10:15:05 +02:00
Roman Zeyde
1498eed6bb
Bump version 2019-11-20 22:21:49 +02:00
Roman Zeyde
d0be7ec670
Add PR build 2019-11-19 22:30:48 +02:00
Roman Zeyde
b4a2b9cf63
Fixup formatting 2019-11-19 22:27:57 +02:00
Roman Zeyde
d1182e20f7
Merge branch 'cache_metrics' 2019-11-19 22:24:29 +02:00
Roman Zeyde
23ce29f3bb Slightly refactor cache usage metrics' update 2019-11-19 22:22:05 +02:00
Roman Zeyde
48622f4bfb Update rocksdb to 0.13.0 2019-11-19 15:08:32 +02:00
Juan Pablo Civile
0b92c0cf32 Report cache usage metrics to prometheus 2019-11-15 11:26:24 -03:00
Roman Zeyde
cb81514a4d Create rust.yml 2019-11-15 09:22:40 +02:00
Martin Habovstiak
5549287ac6 Implemented custom cookie file
This change allows the user to specify a custom cookie file, which is then
used instead of `~/.bitcoin/.cookie`. This resolves situations when the
user wants to have the cookie file in non-standard path.

Aside from that, the code now pre-computes the default path, improving
the performance by avoiding allocation (and copying). Unfortunately, due
to limitations of Rust, the code doesn't print out cookie configuration
anymore. This however might be safer, since the cookie isn't printed,
and thus doesn't end up in some readable logs by accident.

Closes #176
Closes #189
2019-11-13 15:52:32 +02:00
Roman Zeyde
ef3c387189
Bump version 2019-10-28 22:25:59 +02:00
Roman Zeyde
0b988e3afc
Update Cargo.lock 2019-10-24 22:22:45 +03:00
Roman Zeyde
cd87a3aad5
Merge pull request #182 from Kixunil/update_configure_me
Update `configure_me` as well as other packages
2019-10-24 22:01:26 +03:00
Roman Zeyde
7532a54b48
Merge pull request #183 from MichelKansou/master
Update rust-bitcoin & bitcoin_hashes
2019-10-20 17:10:44 +03:00
Michel Kansou
71575de8a7 Update rust-bitcoin & bitcoin_hashes 2019-10-20 11:37:47 +02:00
Martin Habovstiak
5ac315ff3c Update configure_me as well as other packages
* This should resolve #180, not sure (couldn't get past rocksdb on 1.34)
* Uses new, cleaner way of specifying `config_spec.toml`
2019-10-18 17:14:53 +02:00
Roman Zeyde
1c39b1d561
Fix formatting 2019-10-15 10:48:58 +03:00
Roman Zeyde
a3c60c93ec
Revert "Test Travis CI on ARM"
This reverts commit ac122d8325.
2019-10-15 10:48:04 +03:00
Roman Zeyde
ac122d8325
Test Travis CI on ARM 2019-10-15 10:42:30 +03:00
Roman Zeyde
6afd4af403
Add more duration metrics to query.rs 2019-10-15 10:42:06 +03:00
Roman Zeyde
a347e6719f
Bump version 2019-10-05 12:42:16 +03:00
Roman Zeyde
56d69d1709
Merge branch 'sized_cache' 2019-10-05 12:29:43 +03:00
Roman Zeyde
b059513115
Update Cargo.lock 2019-10-01 20:19:38 +03:00
Martin Habovstiak
35b3cededc Support for user-specified onfiguration files/dirs
This commit upgrades `configure_me` and adds support for `--conf` and
`--conf-dir` parameters, which load the configuration from the specified
place.
2019-09-28 23:13:50 +02:00
Roman Zeyde
4c14b0d0cb
Update RELEASE-NOTES.md 2019-09-20 14:45:21 +03:00
Roman Zeyde
c41bc378df
Add byte-size limit to transaction & block txids' caches
Also, move TransactionCache into `cache` module.

Following https://github.com/romanz/electrs/pull/161 by @dagurval.

Co-authored-by: Dagur Valberg Johannsson <dagurval@pvv.ntnu.no>
2019-09-19 22:30:30 +03:00
Roman Zeyde
61a5af3a1b
Merge branch 'update_configure_me' of https://github.com/Kixunil/electrs into Kixunil/configure_me 2019-09-13 20:24:32 +03:00