From 32c5b87bcb4ad4e420967f11d03762f4159f0976 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 09:21:01 -0500 Subject: [PATCH 1/8] GH-815 Add a test that kills ship clients and make sure nodeos is unaffected --- tests/CMakeLists.txt | 3 + tests/ship_kill_client_test.py | 134 +++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) create mode 100755 tests/ship_kill_client_test.py diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index be8d73d774..a5ae9f0aa6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -55,6 +55,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cli_test.py ${CMAKE_CURRENT_BINARY_DI configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ship_reqs_across_svnn_test.py ${CMAKE_CURRENT_BINARY_DIR}/ship_reqs_across_svnn_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ship_test.py ${CMAKE_CURRENT_BINARY_DIR}/ship_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ship_streamer_test.py ${CMAKE_CURRENT_BINARY_DIR}/ship_streamer_test.py COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ship_kill_client_test.py ${CMAKE_CURRENT_BINARY_DIR}/ship_kill_client_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bridge_for_fork_test_shape.json ${CMAKE_CURRENT_BINARY_DIR}/bridge_for_fork_test_shape.json COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lib_advance_test.py ${CMAKE_CURRENT_BINARY_DIR}/lib_advance_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/http_plugin_test.py ${CMAKE_CURRENT_BINARY_DIR}/http_plugin_test.py COPYONLY) @@ -187,6 +188,8 @@ add_test(NAME ship_streamer_if_test COMMAND tests/ship_streamer_test.py -v --num set_property(TEST ship_streamer_if_test PROPERTY LABELS long_running_tests) add_test(NAME ship_streamer_if_fetch_finality_data_test COMMAND tests/ship_streamer_test.py -v --num-clients 10 --activate-if --finality-data-history ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST ship_streamer_if_fetch_finality_data_test PROPERTY LABELS long_running_tests) +add_test(NAME ship_kill_client_test COMMAND tests/ship_kill_client_test.py -v --num-clients 10 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +set_property(TEST ship_kill_client_test PROPERTY LABELS nonparallelizable_tests) add_test(NAME p2p_dawn515_test COMMAND tests/p2p_tests/dawn_515/test.sh WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST p2p_dawn515_test PROPERTY LABELS nonparallelizable_tests) diff --git a/tests/ship_kill_client_test.py b/tests/ship_kill_client_test.py new file mode 100755 index 0000000000..9a28718900 --- /dev/null +++ b/tests/ship_kill_client_test.py @@ -0,0 +1,134 @@ +#!/usr/bin/env python3 + +import time +import json +import os +import shutil +import signal +import sys + +from TestHarness import Account, Cluster, TestHelper, Utils, WalletMgr +from TestHarness.TestHelper import AppArgs + +############################################################### +# ship_kill_client_test +# +# Setup a nodeos with SHiP (state_history_plugin). +# Connect a number of clients and then kill the clients and shutdown nodoes. +# nodeos should exit cleanly and not hang or SEGfAULT. +# +############################################################### + +Print=Utils.Print + +appArgs = AppArgs() +extraArgs = appArgs.add(flag="--num-clients", type=int, help="How many ship_streamers should be started", default=1) +args = TestHelper.parse_args({"--activate-if","--dump-error-details","--keep-logs","-v","--leave-running","--unshared"}, applicationSpecificArgs=appArgs) + +Utils.Debug=args.v +cluster=Cluster(unshared=args.unshared, keepRunning=args.leave_running, keepLogs=args.keep_logs) +activateIF=args.activate_if +dumpErrorDetails=args.dump_error_details +walletPort=TestHelper.DEFAULT_WALLET_PORT + +totalProducerNodes=2 +totalNonProducerNodes=1 +totalNodes=totalProducerNodes+totalNonProducerNodes + +walletMgr=WalletMgr(True, port=walletPort) +testSuccessful=False + +WalletdName=Utils.EosWalletName +shipTempDir=None + +try: + TestHelper.printSystemInfo("BEGIN") + + cluster.setWalletMgr(walletMgr) + Print("Stand up cluster") + + shipNodeNum = 2 + specificExtraNodeosArgs={} + specificExtraNodeosArgs[shipNodeNum]="--plugin eosio::state_history_plugin --trace-history --chain-state-history --finality-data-history --state-history-stride 200 --plugin eosio::net_api_plugin --plugin eosio::producer_api_plugin " + + if cluster.launch(pnodes=totalProducerNodes, loadSystemContract=False, + totalNodes=totalNodes, totalProducers=totalProducerNodes, activateIF=activateIF, biosFinalizer=False, + specificExtraNodeosArgs=specificExtraNodeosArgs) is False: + Utils.cmdError("launcher") + Utils.errorExit("Failed to stand up cluster.") + + # verify nodes are in sync and advancing + cluster.waitOnClusterSync(blockAdvancing=5) + Print("Cluster in Sync") + + prodNode0 = cluster.getNode(0) + nonprodNode = cluster.getNode(1) + shipNode = cluster.getNode(shipNodeNum) + + # cluster.waitOnClusterSync(blockAdvancing=3) + start_block_num = shipNode.getBlockNum() + + #verify nodes are in sync and advancing + cluster.waitOnClusterSync(blockAdvancing=3) + Print("Shutdown unneeded bios node") + cluster.biosNode.kill(signal.SIGTERM) + + Print("Configure and launch txn generators") + targetTpsPerGenerator = 10 + testTrxGenDurationSec=60*60 + numTrxGenerators=2 + cluster.launchTrxGenerators(contractOwnerAcctName=cluster.eosioAccount.name, acctNamesList=[cluster.defproduceraAccount.name, cluster.defproducerbAccount.name], + acctPrivKeysList=[cluster.defproduceraAccount.activePrivateKey,cluster.defproducerbAccount.activePrivateKey], nodeId=nonprodNode.nodeId, + tpsPerGenerator=targetTpsPerGenerator, numGenerators=numTrxGenerators, durationSec=testTrxGenDurationSec, + waitToComplete=False) + + status = cluster.waitForTrxGeneratorsSpinup(nodeId=nonprodNode.nodeId, numGenerators=numTrxGenerators) + assert status is not None and status is not False, "ERROR: Failed to spinup Transaction Generators" + + nonprodNode.waitForProducer("defproducera") + + block_range = 100000 # we are going to kill the client, so just make this a huge number + end_block_num = start_block_num + block_range + + shipClient = "tests/ship_streamer" + cmd = f"{shipClient} --start-block-num {start_block_num} --end-block-num {end_block_num} --fetch-block --fetch-traces --fetch-deltas --fetch-finality-data" + if Utils.Debug: Utils.Print(f"cmd: {cmd}") + clients = [] + files = [] + shipTempDir = os.path.join(Utils.DataDir, "ship") + os.makedirs(shipTempDir, exist_ok = True) + shipClientFilePrefix = os.path.join(shipTempDir, "client") + + starts = [] + for i in range(0, args.num_clients): + start = time.perf_counter() + outFile = open(f"{shipClientFilePrefix}{i}.out", "w") + errFile = open(f"{shipClientFilePrefix}{i}.err", "w") + Print(f"Start client {i}") + popen=Utils.delayedCheckOutput(cmd, stdout=outFile, stderr=errFile) + starts.append(time.perf_counter()) + clients.append((popen, cmd)) + files.append((outFile, errFile)) + Print(f"Client {i} started, Ship node head is: {shipNode.getBlockNum()}") + + + # allow time for all clients to connect + shipNode.waitForHeadToAdvance(5) + shipNode.waitForLibToAdvance() + + Print(f"Kill all {args.num_clients} clients") + for index, (popen, _), (out, err), start in zip(range(len(clients)), clients, files, starts): + popen.kill() + + shipNode.kill(signal.SIGTERM) + assert not shipNode.verifyAlive(), "ship node did not shutdown" + + testSuccessful = True +finally: + TestHelper.shutdown(cluster, walletMgr, testSuccessful=testSuccessful, dumpErrorDetails=dumpErrorDetails) + if shipTempDir is not None: + if testSuccessful and not args.keep_logs: + shutil.rmtree(shipTempDir, ignore_errors=True) + +errorCode = 0 if testSuccessful else 1 +exit(errorCode) From c09ec2a7a3881221ce7fae677bce93f14ba950ce Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 09:50:08 -0500 Subject: [PATCH 2/8] GH-815 Attempt to make test fail more often by increasing number of clients --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a5ae9f0aa6..0f5c17d10d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -188,7 +188,7 @@ add_test(NAME ship_streamer_if_test COMMAND tests/ship_streamer_test.py -v --num set_property(TEST ship_streamer_if_test PROPERTY LABELS long_running_tests) add_test(NAME ship_streamer_if_fetch_finality_data_test COMMAND tests/ship_streamer_test.py -v --num-clients 10 --activate-if --finality-data-history ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST ship_streamer_if_fetch_finality_data_test PROPERTY LABELS long_running_tests) -add_test(NAME ship_kill_client_test COMMAND tests/ship_kill_client_test.py -v --num-clients 10 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME ship_kill_client_test COMMAND tests/ship_kill_client_test.py -v --activate-if --num-clients 20 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST ship_kill_client_test PROPERTY LABELS nonparallelizable_tests) add_test(NAME p2p_dawn515_test COMMAND tests/p2p_tests/dawn_515/test.sh WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) From 6350739b577f5bbcab03189c94779a6646ab4526 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 10:43:14 -0500 Subject: [PATCH 3/8] GH-815 shutdown nodeos during shutdown of clients --- tests/ship_kill_client_test.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/ship_kill_client_test.py b/tests/ship_kill_client_test.py index 9a28718900..039d3dd46a 100755 --- a/tests/ship_kill_client_test.py +++ b/tests/ship_kill_client_test.py @@ -99,14 +99,12 @@ os.makedirs(shipTempDir, exist_ok = True) shipClientFilePrefix = os.path.join(shipTempDir, "client") - starts = [] for i in range(0, args.num_clients): start = time.perf_counter() outFile = open(f"{shipClientFilePrefix}{i}.out", "w") errFile = open(f"{shipClientFilePrefix}{i}.err", "w") Print(f"Start client {i}") popen=Utils.delayedCheckOutput(cmd, stdout=outFile, stderr=errFile) - starts.append(time.perf_counter()) clients.append((popen, cmd)) files.append((outFile, errFile)) Print(f"Client {i} started, Ship node head is: {shipNode.getBlockNum()}") @@ -116,12 +114,12 @@ shipNode.waitForHeadToAdvance(5) shipNode.waitForLibToAdvance() - Print(f"Kill all {args.num_clients} clients") - for index, (popen, _), (out, err), start in zip(range(len(clients)), clients, files, starts): + Print(f"Kill all {args.num_clients} clients and ship node") + for index, (popen, _) in zip(range(len(clients)), clients): popen.kill() - - shipNode.kill(signal.SIGTERM) - assert not shipNode.verifyAlive(), "ship node did not shutdown" + if index == len(clients)/2: + shipNode.kill(signal.SIGTERM) + assert not shipNode.verifyAlive(), "ship node did not shutdown" testSuccessful = True finally: From 80d5aef183faf51d8cedfc43c38b8804e4f33e99 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 11:16:39 -0500 Subject: [PATCH 4/8] GH-815 Use state_history_plugin thread for socket --- plugins/state_history_plugin/state_history_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/state_history_plugin/state_history_plugin.cpp b/plugins/state_history_plugin/state_history_plugin.cpp index 89eb78b9d6..f8f3e6b484 100644 --- a/plugins/state_history_plugin/state_history_plugin.cpp +++ b/plugins/state_history_plugin/state_history_plugin.cpp @@ -101,7 +101,7 @@ struct state_history_plugin_impl { void create_listener(const std::string& address) { const boost::posix_time::milliseconds accept_timeout(200); // connections set must only be modified by main thread; run listener on main thread to avoid needing another post() - fc::create_listener(app().get_io_service(), _log, accept_timeout, address, "", [this](Protocol::socket&& socket) { + fc::create_listener(thread_pool.get_executor(), _log, accept_timeout, address, "", [this](Protocol::socket&& socket) { catch_and_log([this, &socket]() { connections.emplace(new session(std::move(socket), boost::asio::make_strand(thread_pool.get_executor()), chain_plug->chain(), trace_log, chain_state_log, finality_data_log, From 49492dced540eb14def5926535166360f87796de Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 12:49:02 -0500 Subject: [PATCH 5/8] GH-815 Modify connections on the main thread. Use explicit strand for ship thread. --- .../eosio/state_history_plugin/session.hpp | 2 +- .../state_history_plugin.cpp | 33 ++++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp b/plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp index 572c2d3ec6..324c5db818 100644 --- a/plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp +++ b/plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp @@ -327,7 +327,7 @@ class session final : public session_base { std::optional& chain_state_log; std::optional& finality_data_log; - GetBlockID get_block_id; + GetBlockID get_block_id; // call from main app thread GetBlock get_block; ///these items might be used on either the strand or main thread diff --git a/plugins/state_history_plugin/state_history_plugin.cpp b/plugins/state_history_plugin/state_history_plugin.cpp index f8f3e6b484..a64d29ff6b 100644 --- a/plugins/state_history_plugin/state_history_plugin.cpp +++ b/plugins/state_history_plugin/state_history_plugin.cpp @@ -101,21 +101,24 @@ struct state_history_plugin_impl { void create_listener(const std::string& address) { const boost::posix_time::milliseconds accept_timeout(200); // connections set must only be modified by main thread; run listener on main thread to avoid needing another post() - fc::create_listener(thread_pool.get_executor(), _log, accept_timeout, address, "", [this](Protocol::socket&& socket) { - catch_and_log([this, &socket]() { - connections.emplace(new session(std::move(socket), boost::asio::make_strand(thread_pool.get_executor()), chain_plug->chain(), - trace_log, chain_state_log, finality_data_log, - [this](const chain::block_num_type block_num) { - return get_block_id(block_num); - }, - [this](const chain::block_id_type& block_id) { - return chain_plug->chain().fetch_block_by_id(block_id); - }, - [this](session_base* conn) { - boost::asio::post(app().get_io_service(), [conn, this]() { - connections.erase(connections.find(conn)); - }); - }, _log)); + auto strand = boost::asio::make_strand(thread_pool.get_executor()); + fc::create_listener(strand, _log, accept_timeout, address, "", [this, strand](Protocol::socket&& socket) { + boost::asio::post(app().get_io_service(), [this, strand, socket{std::move(socket)}]() mutable { + catch_and_log([this, &socket, &strand]() { + connections.emplace(new session(std::move(socket), std::move(strand), chain_plug->chain(), + trace_log, chain_state_log, finality_data_log, + [this](const chain::block_num_type block_num) { + return get_block_id(block_num); + }, + [this](const chain::block_id_type& block_id) { + return chain_plug->chain().fetch_block_by_id(block_id); + }, + [this](session_base* conn) { + boost::asio::post(app().get_io_service(), [conn, this]() { + connections.erase(connections.find(conn)); + }); + }, _log)); + }); }); }); } From 9736f6f06b2da7d78c17ca9fd24bfc463cdadb23 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 12:58:17 -0500 Subject: [PATCH 6/8] GH-815 Make the test always run in Savanna mode --- tests/CMakeLists.txt | 2 +- tests/ship_kill_client_test.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0f5c17d10d..a99d2b7d96 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -188,7 +188,7 @@ add_test(NAME ship_streamer_if_test COMMAND tests/ship_streamer_test.py -v --num set_property(TEST ship_streamer_if_test PROPERTY LABELS long_running_tests) add_test(NAME ship_streamer_if_fetch_finality_data_test COMMAND tests/ship_streamer_test.py -v --num-clients 10 --activate-if --finality-data-history ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST ship_streamer_if_fetch_finality_data_test PROPERTY LABELS long_running_tests) -add_test(NAME ship_kill_client_test COMMAND tests/ship_kill_client_test.py -v --activate-if --num-clients 20 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME ship_kill_client_test COMMAND tests/ship_kill_client_test.py -v --num-clients 20 ${UNSHARE} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) set_property(TEST ship_kill_client_test PROPERTY LABELS nonparallelizable_tests) add_test(NAME p2p_dawn515_test COMMAND tests/p2p_tests/dawn_515/test.sh WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/tests/ship_kill_client_test.py b/tests/ship_kill_client_test.py index 039d3dd46a..a04932fee5 100755 --- a/tests/ship_kill_client_test.py +++ b/tests/ship_kill_client_test.py @@ -23,11 +23,10 @@ appArgs = AppArgs() extraArgs = appArgs.add(flag="--num-clients", type=int, help="How many ship_streamers should be started", default=1) -args = TestHelper.parse_args({"--activate-if","--dump-error-details","--keep-logs","-v","--leave-running","--unshared"}, applicationSpecificArgs=appArgs) +args = TestHelper.parse_args({"--dump-error-details","--keep-logs","-v","--leave-running","--unshared"}, applicationSpecificArgs=appArgs) Utils.Debug=args.v cluster=Cluster(unshared=args.unshared, keepRunning=args.leave_running, keepLogs=args.keep_logs) -activateIF=args.activate_if dumpErrorDetails=args.dump_error_details walletPort=TestHelper.DEFAULT_WALLET_PORT @@ -52,7 +51,7 @@ specificExtraNodeosArgs[shipNodeNum]="--plugin eosio::state_history_plugin --trace-history --chain-state-history --finality-data-history --state-history-stride 200 --plugin eosio::net_api_plugin --plugin eosio::producer_api_plugin " if cluster.launch(pnodes=totalProducerNodes, loadSystemContract=False, - totalNodes=totalNodes, totalProducers=totalProducerNodes, activateIF=activateIF, biosFinalizer=False, + totalNodes=totalNodes, totalProducers=totalProducerNodes, activateIF=True, biosFinalizer=False, specificExtraNodeosArgs=specificExtraNodeosArgs) is False: Utils.cmdError("launcher") Utils.errorExit("Failed to stand up cluster.") From 264151513fd0d03a47273a26a918350a2798f7c1 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 13:19:25 -0500 Subject: [PATCH 7/8] GH-815 Revert usage of strand. Needs to be done in fc::create_listener --- plugins/state_history_plugin/state_history_plugin.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugins/state_history_plugin/state_history_plugin.cpp b/plugins/state_history_plugin/state_history_plugin.cpp index a64d29ff6b..df6b839a31 100644 --- a/plugins/state_history_plugin/state_history_plugin.cpp +++ b/plugins/state_history_plugin/state_history_plugin.cpp @@ -100,12 +100,11 @@ struct state_history_plugin_impl { template void create_listener(const std::string& address) { const boost::posix_time::milliseconds accept_timeout(200); - // connections set must only be modified by main thread; run listener on main thread to avoid needing another post() - auto strand = boost::asio::make_strand(thread_pool.get_executor()); - fc::create_listener(strand, _log, accept_timeout, address, "", [this, strand](Protocol::socket&& socket) { - boost::asio::post(app().get_io_service(), [this, strand, socket{std::move(socket)}]() mutable { - catch_and_log([this, &socket, &strand]() { - connections.emplace(new session(std::move(socket), std::move(strand), chain_plug->chain(), + // connections set must only be modified by main thread; run listener on ship thread so sockets use default executor of the ship thread + fc::create_listener(thread_pool.get_executor(), _log, accept_timeout, address, "", [this](Protocol::socket&& socket) { + boost::asio::post(app().get_io_service(), [this, socket{std::move(socket)}]() mutable { + catch_and_log([this, &socket]() { + connections.emplace(new session(std::move(socket), boost::asio::make_strand(thread_pool.get_executor()), chain_plug->chain(), trace_log, chain_state_log, finality_data_log, [this](const chain::block_num_type block_num) { return get_block_id(block_num); From 6df1c1182f23303f85524ad520e4b49572ec6155 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 24 Sep 2024 14:02:46 -0500 Subject: [PATCH 8/8] GH-815 Cleanup test --- tests/ship_kill_client_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ship_kill_client_test.py b/tests/ship_kill_client_test.py index a04932fee5..a050271063 100755 --- a/tests/ship_kill_client_test.py +++ b/tests/ship_kill_client_test.py @@ -30,6 +30,7 @@ dumpErrorDetails=args.dump_error_details walletPort=TestHelper.DEFAULT_WALLET_PORT +# simpler to have two producer nodes then setup different accounts for trx generator totalProducerNodes=2 totalNonProducerNodes=1 totalNodes=totalProducerNodes+totalNonProducerNodes @@ -61,7 +62,7 @@ Print("Cluster in Sync") prodNode0 = cluster.getNode(0) - nonprodNode = cluster.getNode(1) + prodNode1 = cluster.getNode(1) shipNode = cluster.getNode(shipNodeNum) # cluster.waitOnClusterSync(blockAdvancing=3) @@ -77,14 +78,14 @@ testTrxGenDurationSec=60*60 numTrxGenerators=2 cluster.launchTrxGenerators(contractOwnerAcctName=cluster.eosioAccount.name, acctNamesList=[cluster.defproduceraAccount.name, cluster.defproducerbAccount.name], - acctPrivKeysList=[cluster.defproduceraAccount.activePrivateKey,cluster.defproducerbAccount.activePrivateKey], nodeId=nonprodNode.nodeId, + acctPrivKeysList=[cluster.defproduceraAccount.activePrivateKey,cluster.defproducerbAccount.activePrivateKey], nodeId=prodNode1.nodeId, tpsPerGenerator=targetTpsPerGenerator, numGenerators=numTrxGenerators, durationSec=testTrxGenDurationSec, waitToComplete=False) - status = cluster.waitForTrxGeneratorsSpinup(nodeId=nonprodNode.nodeId, numGenerators=numTrxGenerators) + status = cluster.waitForTrxGeneratorsSpinup(nodeId=prodNode1.nodeId, numGenerators=numTrxGenerators) assert status is not None and status is not False, "ERROR: Failed to spinup Transaction Generators" - nonprodNode.waitForProducer("defproducera") + prodNode1.waitForProducer("defproducera") block_range = 100000 # we are going to kill the client, so just make this a huge number end_block_num = start_block_num + block_range @@ -99,7 +100,6 @@ shipClientFilePrefix = os.path.join(shipTempDir, "client") for i in range(0, args.num_clients): - start = time.perf_counter() outFile = open(f"{shipClientFilePrefix}{i}.out", "w") errFile = open(f"{shipClientFilePrefix}{i}.err", "w") Print(f"Start client {i}")