depolymerization

wire gateway for Bitcoin/Ethereum
Log | Files | Refs | Submodules | README | LICENSE

commit 15b9fb417333b907629da2769af1b8322f0fb7f2
parent a29a24356438bdbb3d2e342c066d47e66eeb2c81
Author: Antoine A <>
Date:   Wed, 20 Jul 2022 20:22:25 +0200

Use latest nodes versions and improve documentation

Diffstat:
MREADME.md | 30++++--------------------------
Mbtc-wire/src/rpc.rs | 2+-
Minstrumentation/README.md | 32+++++++++++++++++++++++++-------
Mscript/prepare.sh | 12++++++------
4 files changed, 36 insertions(+), 40 deletions(-)

diff --git a/README.md b/README.md @@ -37,11 +37,11 @@ Depolymerizer require: #### Bitcoin -[Bitcoind](https://bitcoincore.org/) version >= 22.0 is required +[Bitcoind](https://bitcoincore.org/) version 23.0 is expected #### Ethereum -[Geth](https://geth.ethereum.org/) version >= 1.10.0 is required +[Geth](https://geth.ethereum.org/) version 1.10.20 is expected ### Initialization @@ -233,27 +233,4 @@ You can have an additional context: ## Test -Instrumentation test documentation can be founded in the [instrumentation](instrumentation/README.md) directory. - -### Local testing - -Local tests require additional binaries. The following binaries must be in the -local user PATH: - -- `pg_ctl` and `psql` from PostgreSQL -- `geth` from [go-ethereum](https://geth.ethereum.org/downloads/) -- `bitcoind` and `bitcoin-cli` from - [bitcoincore](https://bitcoincore.org/en/download/) -- `taler-config` and `taler-exchange-wire-gateway-client` from the - [Taler exchange ](https://git.taler.net/exchange.git/) - -You can use the [prepare](script/prepare.sh) script to download and extract -blockchain binaries and find the path of the local Postgres installation. -However, taler binaries need to be compiled from source for now. - -| Command | Run | -| ------------------- | ------------------ | -| `make test` | all tests | -| `make test_gateway` | wire-gateway tests | -| `make test_btc` | btc-wire tests | -| `make test_eth` | eth-wire tests | +Instrumentation test documentation can be founded in the [instrumentation](instrumentation/README.md) directory. +\ No newline at end of file diff --git a/btc-wire/src/rpc.rs b/btc-wire/src/rpc.rs @@ -23,7 +23,7 @@ //! We only parse the thing we actually use, this reduce memory usage and //! make our code more compatible with future deprecation //! -//! bitcoincore RPC documentation: <https://bitcoincore.org/en/doc/22.0.0/> +//! bitcoincore RPC documentation: <https://bitcoincore.org/en/doc/23.0.0/> use bitcoin::{hashes::hex::ToHex, Address, Amount, BlockHash, SignedAmount, Txid}; use common::{log::log::error, password, reconnect::AutoReconnect}; diff --git a/instrumentation/README.md b/instrumentation/README.md @@ -1,19 +1,37 @@ # Depolymerizer instrumentation test -Local tests running on a private development network are meant to test the good -behavior in case of extreme situations but do not attest our capacity to handle -real network behavior. - ## Install `cargo install --path instrumentation` -## Run +## Offline local tests + +Local tests require additional binaries. The following binaries must be in the +local user PATH: + +- `pg_ctl` and `psql` from PostgreSQL +- `geth` from [go-ethereum](https://geth.ethereum.org/downloads/) +- `bitcoind` and `bitcoin-cli` from + [bitcoincore](https://bitcoincore.org/en/download/) +- `taler-config` and `taler-exchange-wire-gateway-client` from the + [Taler exchange ](https://git.taler.net/exchange.git/) + +You can use the [prepare](script/prepare.sh) script to download and extract +blockchain binaries and find the path of the local Postgres installation. +However, taler binaries need to be compiled from source for now. + +Run `instrumentation --offline` to run all tests. + +## Online tests + +Local tests running on a private development network are meant to test the good +behavior in case of extreme situations but do not attest our capacity to handle +real network behavior. -First, follow a normal setup for the adapter and then run `instrumentation`. The +First, follow a normal setup for the adapter and then run `instrumentation --online`. The tested blockchain will be determined based on the taler configuration. -## Temporary database +### Temporary database If you do not want to use a persistent database for instrumentation tests, there is a [script](../script/tmp_db.sh) to generate a temporary database similar to diff --git a/script/prepare.sh b/script/prepare.sh @@ -20,21 +20,21 @@ echo "Ⅰ - Find installed postgres version" PG_VER=`pg_config --version | egrep -o '[0-9]{1,}' | head -1` echo "Found version $PG_VER" -echo "Ⅱ - Install bitcoind version 0.22" +echo "Ⅱ - Install bitcoind version 0.23" cd $DIR -curl -L https://bitcoincore.org/bin/bitcoin-core-22.0/bitcoin-22.0-x86_64-linux-gnu.tar.gz -o btc.tar.gz +curl -L https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-x86_64-linux-gnu.tar.gz -o btc.tar.gz rm -rfv ~/bitcoin mkdir -pv ~/bitcoin tar xvzf btc.tar.gz -mv -v bitcoin-22.0/* ~/bitcoin +mv -v bitcoin-23.0/* ~/bitcoin -echo "Ⅲ - Install Go Ethereum (Geth) v1.10.16" +echo "Ⅲ - Install Go Ethereum (Geth) v1.10.20" cd $DIR -curl -L https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.10.16-20356e57.tar.gz -o geth.tar.gz +curl -L https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.10.20-8f2416a8.tar.gz -o geth.tar.gz rm -rfv ~/geth mkdir -pv ~/geth tar xvzf geth.tar.gz -mv -v geth-alltools-linux-amd64-1.10.16-20356e57/* ~/geth +mv -v geth-alltools-linux-amd64-1.10.20-8f2416a8/* ~/geth echo "Ⅳ - PATH"