Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes test_full_coinjoin #1230

Merged
merged 1 commit into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Then copy the `regtest_joinmarket.cfg` file from the `test/` directory to the `j

Run the test suite via pytest:

(jmvenv)$ pytest --btcconf=/path/to/bitcoin.conf --btcroot=/path/to/bitcoin/bin/ --btcpwd=123456abcdef --nirc=2 --ignore test/test_full_coinjoin.py -p no:warnings
(jmvenv)$ pytest --btcconf=/path/to/bitcoin.conf --btcroot=/path/to/bitcoin/bin/ --btcpwd=123456abcdef --nirc=2 -p no:warnings

#### Running tests of sendpayment and tumbler (including with malicious makers)

Expand Down
3 changes: 1 addition & 2 deletions test/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ run_jm_tests ()
--btcroot=$btcroot \
--btcuser=$btcuser \
--nirc=$nirc \
-p no:warnings \
--ignore test/test_full_coinjoin.py
-p no:warnings
local success="$?"
[[ -f ./joinmarket.cfg ]] && unlink ./joinmarket.cfg
if [ -f "${jm_test_datadir}/bitcoind.pid" ] && read bitcoind_pid <"${jm_test_datadir}/bitcoind.pid"; then
Expand Down
21 changes: 8 additions & 13 deletions test/e2e-coinjoin-test.py → test/test_e2e_coinjoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,11 @@
from jmclient import (YieldGeneratorBasic, load_test_config, jm_single,
JMClientProtocolFactory, start_reactor, SegwitWallet, get_mchannels,
SegwitLegacyWallet, JMWalletDaemon)
import jmclient
from jmclient.wallet_rpc import api_version_string

log = get_log()

# For quicker testing, restrict the range of timelock
# addresses to avoid slow load of multiple bots.
# Note: no need to revert this change as test runs
# in isolation.
from jmclient import FidelityBondMixin
FidelityBondMixin.TIMELOCK_ERA_YEARS = 2
FidelityBondMixin.TIMELOCK_EPOCH_YEAR = datetime.now().year
FidelityBondMixin.TIMENUMBERS_PER_PUBKEY = 12

wallet_name = "test-onion-yg-runner.jmdat"

mean_amt = 2.0
Expand Down Expand Up @@ -196,8 +188,7 @@ def test_start_yg_and_taker_setup(setup_onion_ygrunner):
wallet_service = wallet_services[end_bot_num - 1]['wallet']
jmprint("\n\nTaker wallet seed : " + wallet_services[end_bot_num - 1]['seed'])
# for manual audit if necessary, show the maker's wallet seeds
# also (note this audit should be automated in future, see
# test_full_coinjoin.py in this directory)
# also (note this audit should be automated in future)
jmprint("\n\nMaker wallet seeds: ")
for i in range(start_bot_num, end_bot_num):
jmprint("Maker seed: " + wallet_services[i - 1]['seed'])
Expand Down Expand Up @@ -331,8 +322,12 @@ def process_coinjoin_response(response):
json_body = json.loads(response.decode("utf-8"))
print("coinjoin response: {}".format(json_body))

@pytest.fixture(scope="module")
def setup_onion_ygrunner():
@pytest.fixture
def setup_onion_ygrunner(monkeypatch):
# For quicker testing, restrict the range of timelock
# addresses to avoid slow load of multiple bots.
monkeypatch.setattr(jmclient.FidelityBondMixin, 'TIMELOCK_ERA_YEARS', 2)
monkeypatch.setattr(jmclient.FidelityBondMixin, 'TIMELOCK_EPOCH_YEAR', datetime.now().year)
load_test_config()
jm_single().bc_interface.tick_forward_chain_interval = 10
jm_single().bc_interface.simulate_blocks()
147 changes: 0 additions & 147 deletions test/test_full_coinjoin.py

This file was deleted.

3 changes: 1 addition & 2 deletions test/ygrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ def test_start_ygs(setup_ygrunner, num_ygs, wallet_structures, fb_indices,
wallet_service = wallet_services[num_ygs]['wallet']
jmprint("\n\nTaker wallet seed : " + wallet_services[num_ygs]['seed'])
# for manual audit if necessary, show the maker's wallet seeds
# also (note this audit should be automated in future, see
# test_full_coinjoin.py in this directory)
# also (note this audit should be automated in future)
jmprint("\n\nMaker wallet seeds: ")
for i in range(num_ygs):
jmprint("Maker seed: " + wallet_services[i]['seed'])
Expand Down