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

835 Commits

Author SHA1 Message Date
David Parrish
4f46919f35
Update rust version for Dockerfile to 1.44.1 2020-07-06 16:16:34 -04:00
David Parrish
0980b44c6f
Apply hadolint recommendations 2020-07-06 16:16:01 -04:00
Roman Zeyde
840da895ce
Bump version 2020-07-01 22:50:32 +03:00
Antoine Poinsot
f1d611fe19
Add a 'blocks_dir' option analogous to bitcoind's '-blocksdir'
The '-blocksdir' startup option allows one to store blk*.dat on an
external disk, while keeping the index (blocks/index/) on the same disk.

This makes electrs aware of such an option, while still keeping the same
default behaviour (blk*.dat in '<config_dir>/blocks/').

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-06-30 14:46:25 +02:00
Roman Zeyde
fac73dc1bf
Merge branch 'fix-subscriptions' 2020-06-28 12:32:12 +03:00
Roman Zeyde
e55381fa66
Return fee for unconfirmed transactions history
Following https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-methods.html#blockchain.scripthash.get_mempool

Otherwise, the client will disconnect:
https://github.com/spesmilo/electrum/issues/6289
2020-06-28 09:21:31 +03:00
Roman Zeyde
e3cc93ff4d
Update # of subscriptions correctly 2020-06-27 22:11:37 +03:00
Roman Zeyde
536e920c1f
use Vec::truncate() in HeaderList::apply() 2020-06-23 15:07:18 +03:00
Roman Zeyde
ba12177404
Update configure_me
Following https://github.com/romanz/electrs/issues/247.
2020-06-18 18:33:25 +03:00
Roman Zeyde
7925babdd6
Revert "Update configure_me and other dependencies"
This reverts commit 687ae6c65b.
2020-06-18 18:28:17 +03:00
Roman Zeyde
7125eba95e
Merge branch 'handle-sigusr1' 2020-06-17 08:41:35 +03:00
Roman Zeyde
5ae93db59e
Allow configuring wait duration 2020-06-13 18:15:03 +03:00
Roman Zeyde
ce3be37679
Handle SIGUSR1 for external notifications 2020-06-13 18:14:05 +03:00
Roman Zeyde
2f2b1c9ef1
Ignore .env 2020-06-12 17:06:13 +03:00
Roman Zeyde
1ca25531b7
Bump version 2020-06-03 18:37:01 +03:00
Roman Zeyde
687ae6c65b
Update configure_me and other dependencies 2020-06-03 17:32:50 +03:00
Roman Zeyde
366dfa020f
Use correct daemon_dir for cookie getter 2020-05-23 20:58:33 +03:00
Roman Zeyde
f776473f3c
Merge pull request #245 from Kixunil/patch-1
Make documentation more clear, add recommendations
2020-05-03 00:23:53 +03:00
Martin Habovštiak
825b788159
Typo fixes 2020-05-02 22:22:20 +02:00
Martin Habovštiak
233d2aa277
Make documentation more clear, add recommendations
This change makes many improvements to the documentation aimed at higher clarity and robustness. Aside from rewording and reordering various parts, it makes sure the documentation is up to date with the reality and best (security and cleanness) practices.

The list of changes:

* Changes the title of "Installation" section to make it clear it's manual and from source
* Points at more convenient options right on top
* Adds "Build dependencies" subtitle
* Makes "Build" a subtitle as it belongs under "Manual installation from source" section
* Recommends using Debain native packaging, which is more secure than `rustup`
* Suggests installation and use of `cfg_me`
* Moves Docker-based installation higher to be better visible
* Informs that native, stable packages are not available yet.
* Adds information about the experimental repository. While it can't be recommended for production use yet, the hope is to attract more contributors and deliver stable, secure and user-friendly experience sooner.
* Makes it clear that the documented configuration is manual, so that users using automated systems won't attempt to configure it manually
* Makes "Bitcoind configuration", "Usage" and "Configuration files" into subtitles
* Mentions the no-prune requirement upfront
* Makes it clear that `txindex` is not necessary, but also allowed.
* Recommends using cookie file
* Instead of telling people to wait for IBD before running `electrs` it accurately describes the behavior.
* Moves the section about `electrs` configuration before usage to be more visible. It's also the ordering of steps a user should take.
* Changes title of "configuration files and environment variables" to "Electrs configuration" to be consistent with "Bitcoind configuration"
* Recommends configuration files - they are clearer and saved across executions
* Clarifies the behavior of overriding files/arguments
* Documents `--conf` and `--conf-dir` arguments
* Explains the difference between `cookie` and `cookie_file`
* Renames "Usage" to "Electrs usage" to be more obvious
* Points out extra configuration suggestions, so they won't get lost after "Electrum client" section
* Notifies users of Debian repository to skip messing with Electrum configuration.
* Makes it clear that the script is provided in the repository (was not immediately obvious to me, LOL; providing `.desktop` file would be nicer, though)
* Added missing title "Extra configuration suggestions"
* Suggests to use more clear path in Tor configuration
* Hints at `tor-hs-config-patch`
* Warns users using the experimental Debian repository to not mess with systemd files
2020-05-02 20:59:30 +02:00
Roman Zeyde
d3ec1942f0
Log progress while waiting for IBD 2020-05-01 22:49:53 +03:00
Roman Zeyde
f0a7a325af
Fix some format issues 2020-05-01 22:49:01 +03:00
Roman Zeyde
2133120234
Merge branch 'fix-hashtypes' 2020-04-24 22:05:06 +03:00
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