1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-25 07:17:41 +01:00
Commit graph

909 commits

Author SHA1 Message Date
k3tan172
32c5fd3a61
Update usage.md
For compilation of electrs to work in Ubuntu 20.04 build-essential package needs to be installed.
2020-10-14 20:03:19 +11:00
Franck Royer
3c4cf72960 Set Rust toolchain to 1.41.1
The project does not compile on 1.34.0 because it uses
the lockfile format introduced in 1.38.0.

Do note that Debian stable at this time uses Rust 1.41.1.

Setting a specific toolchain version is good practice for
binary project and remove potential issues of incompatible
toolchain for users trying to build the project.
2020-09-28 13:27:15 +03:00
Franck Royer
5d8f104cce Remove Circle CI config.yml
As it is not used and hence is misleading.
2020-09-28 13:26:18 +03:00
Roman Zeyde
aef1347859 Fix support for Rust 1.41.1
As it is the current Rust version at Debian stable:
https://packages.debian.org/stable/rustc
2020-09-28 11:13:00 +03:00
Roman Zeyde
d01b3c6f6e Merge remote-tracking branch 'kixunil/transaction_get_blockhash' 2020-09-18 21:47:54 +03:00
Roman Zeyde
004b2f860e Update Cargo.lock 2020-09-18 21:07:07 +03:00
Dr. Maxim Orlovsky
af6ff09a27 Removing BitcoinHash trait to adopt new bitcoin crate API 2020-09-18 18:36:04 +02:00
Roman Zeyde
f9d8cabc13
Merge pull request #299 from jamesob/master
docker: account for host/container permission differences
2020-09-18 17:11:27 +03:00
James O'Beirne
15ba15a69e
docker: account for host/container permission differences 2020-09-18 08:50:04 -04:00
Roman Zeyde
c5eac91b36
Remove 'cargo build' from Dockerfile 2020-08-14 15:23:22 +03:00
Martin Habovstiak
a0a3d4f939 Add blockchain.transaction.get_confirmed_blockhash
This adds a new RPC method that enables users to fetch the block hash
for given txid. It can thus be used to emulate `txindex=1` as explained
in the related issue.

Closes #287
2020-08-04 13:21:30 +02:00
Roman Zeyde
39111665d0
Reduce log verbosity for missing mempool transactions 2020-07-31 20:12:24 +03:00
Roman Zeyde
33aaf7ddc6
A few small fixes 2020-07-31 14:13:17 +03:00
Martin Habovstiak
4764dccbbe Drop receiver in handle_replies
When `Message::Done` was received before the cleanup loop executed it
led to a deadlock since the loop didn't see the receiving end being
disconnected and it also had strong reference via `Arc` preventing it
from dropping.

This change solves the problem by splitting the channel and only keeping
the sender in `Connection`. The reciver is passed to `handle_replies` as
an extra argument, making sure it will be used exactly once.

The main advantage of this method over trying to keep the receiver
inside `Connection` is that it hanles cases when the thread panicks and
possibly forgetting explicit close in future refactors. Another
advantage is being able to remove one `Arc::clone` and I have an idea
for removing locking on `senders` in the future too.

Closes #283
2020-07-28 18:43:08 +02:00
Roman Zeyde
3f750cf8ce
Don't wait for IBD on regtest 2020-07-25 21:14:26 +03:00
Roman Zeyde
521914a853
Fix clippy warnings 2020-07-25 20:52:07 +03:00
Roman Zeyde
d4f542b5e1
Reformat 2020-07-25 20:28:54 +03:00
Roman Zeyde
25aaa6b89d
No need to spawn a thread for writing during bulk indexing 2020-07-25 20:28:10 +03:00
Roman Zeyde
cfa578286c
Add RPC usage example 2020-07-25 12:35:57 +03:00
Roman Zeyde
9c0d69af6c
Fix type in metrics' description 2020-07-19 10:03:19 +03:00
Roman Zeyde
3e25d260be
Merge pull request #276 from CandleHater/patch-1
Typo fix
2020-07-18 21:13:28 +03:00
Candle
ca81f753f1
Typo fix
"bitcoind" was misspelled
2020-07-17 11:38:14 +00:00
Roman Zeyde
fb27cf772f
Fix README.md 2020-07-17 11:21:17 +03:00
Roman Zeyde
e3847ebd1b
Ignore more patterns 2020-07-13 08:38:46 +03:00
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