Skip to content

Commit

Permalink
Experimental: updated electrs to 0.9
Browse files Browse the repository at this point in the history
This updates electrs to 0.9 dropping dynamic linking for the time being.
Dynamic linking will be re-enabled in Bullseye.
This also removes generating blocks from electrs test because that was
done on bitcoind test so it's not needed and it actually causesd tests
to fail.

Part of #175
  • Loading branch information
Kixunil committed Oct 9, 2021
1 parent a80a6cb commit 2f9807f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
4 changes: 2 additions & 2 deletions build_rules/electrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ git_tag: v$(ELECTRS_VERSION)
fingerprint: 15C8C3574AE4F1E25F3F35C587CAE5FA46917CBB
verify_tag: true
build_system: cargo
cargo_env: ROCKSDB_INCLUDE_DIR=/usr/include ROCKSDB_LIB_DIR=/usr/lib SNAPPY_LIB_DIR=/usr/lib LZ4_LIB_DIR=/usr/lib ZSTD_LIB_DIR=/usr/lib Z_LIB_DIR=/usr/lib BZ2_LIB_DIR=/usr/lib
cargo_args: --no-default-features
#cargo_env: ROCKSDB_INCLUDE_DIR=/usr/include ROCKSDB_LIB_DIR=/usr/lib SNAPPY_LIB_DIR=/usr/lib LZ4_LIB_DIR=/usr/lib ZSTD_LIB_DIR=/usr/lib Z_LIB_DIR=/usr/lib BZ2_LIB_DIR=/usr/lib
#cargo_args: --no-default-features
13 changes: 13 additions & 0 deletions pkg_specs/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ default = "/var/lib/electrs-{variant}"
priority = "low"
summary = "Database directory of electrs ({variant})"

[config."conf.d/behavior.toml".ivars.verbose]
type = "uint"
default = "2"
priority = "medium"
summary = "Logging verbosity of electrs ({variant})"

[config."conf.d/credentials.conf"]
format = "toml"

Expand All @@ -74,3 +80,10 @@ constant = "public:public"
[config."conf.d/credentials.conf".hvars.daemon_rpc_addr]
type = "string"
template = "127.0.0.1:{bitcoin-rpc-proxy-@variant/bind_port}"

[config."conf.d/credentials.conf".evars."bitcoin-@variant".p2p_bind_port]
store = false

[config."conf.d/credentials.conf".hvars."daemon_p2p_addr"]
type = "string"
template = "127.0.0.1:{bitcoin-@variant/p2p_bind_port}"
6 changes: 6 additions & 0 deletions pkg_specs/electrs.changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
electrs (0.9.0-1) buster; urgency=medium

* Experimental only: Updated upstream version

-- Martin Habovstiak <[email protected]> Thu, 30 Sep 2021 10:18:42 +0100

electrs (0.8.8-2) buster; urgency=medium

* Improved sandboxing of service
Expand Down
14 changes: 0 additions & 14 deletions tests/per-package/electrs-regtest/after_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,6 @@ done

bitcoin_network="`echo -n $0 | sed 's/^.*-\([^-\/]*\)\/after_install\.sh$/\1/'`"

bitcoind_port=`sudo grep '^rpcport=' "/etc/bitcoin-$bitcoin_network/bitcoin.conf"`
bitcoind_port=`echo "$bitcoind_port" | sed 's/^rpcport=//'`

if sudo test -e "/var/lib/bitcoin-regtest/regtest/wallets/test_wallet";
then
wget -O - --header "Authorization: Basic `sudo base64 -w 0 "/var/run/bitcoin-$bitcoin_network/cookie"`" --post-data='{"jsonrpc": "1.0", "id":"curltest", "method": "loadwallet", "params": ["test_wallet"] }' "http://127.0.0.1:$bitcoind_port/"
else
wget -O - --header "Authorization: Basic `sudo base64 -w 0 "/var/run/bitcoin-$bitcoin_network/cookie"`" --post-data='{"jsonrpc": "1.0", "id":"curltest", "method": "createwallet", "params": ["test_wallet"] }' "http://127.0.0.1:$bitcoind_port/"
fi

mining_addr="$(wget -O - --header "Authorization: Basic `sudo base64 -w 0 "/var/run/bitcoin-$bitcoin_network/cookie"`" --post-data='{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' "http://127.0.0.1:$bitcoind_port/" | grep '"result"' | sed 's/^.*"result" *: *"\([^"]*\)".*$/\1/')"

wget -O - --header "Authorization: Basic `sudo base64 -w 0 "/var/run/bitcoin-$bitcoin_network/cookie"`" --post-data='{"jsonrpc": "1.0", "id":"curltest", "method": "generatetoaddress", "params": [100, "'"$mining_addr"'"] }' "http://127.0.0.1:$bitcoind_port/" | grep '"result"' | sed 's/^.*"result" *: *"\([^"]*\)".*$/\1/'

sleep 10

electrs_port="`grep '^ *electrum_rpc_addr *= *' "/etc/electrs-$bitcoin_network/conf.d/interface.toml"`"
Expand Down

0 comments on commit 2f9807f

Please sign in to comment.