The older version of `prometheus` depended on an old version of `spin`
which had a vulnerability related to locking. The new version of
prometheus doesn't use `spin` anymore so that the vulnerability is
fixed. Note that the vulnerability was unlikely on `x86_64` machines but
likely on ARM. `electrs` seems to be quite popular on various SBCs such
as Raspberry Pi, so fixing this is important.
More information: https://rustsec.org/advisories/RUSTSEC-2019-0013
Thankfully, `electrs` compiles with new `prometheus` without changes
despite it being semver breaking.
* The mentioned Debian repository is now considered beta, make the
wording much less scary.
* Documented how to link rocksdb dynamically and what are the pros/cons
* Documented how to cross compile
* Added `--locked` parameter to `cargo build` to prevent `cargo` from
updating lock file
* Use `./target/release/electrs` instead of `cargo run` to avoid
rebuilding footguns
* Added a link to in-depth explanation of cookie security
This makes the compression algorithms optional, but on by default to
keep the behavior. While one might think this just decreases the size a
bit, it has another advantage: when linking with system library it's not
needed to specify the paths of all these libraries because they are already
compiled in the system library.
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.
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
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
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>