From 10cc3ddf039a32084a8300bf534651d3dd069842 Mon Sep 17 00:00:00 2001 From: Charlie Date: Fri, 14 Jul 2023 15:58:22 +0100 Subject: [PATCH] fix: running against a network --- vega_sim/devops/run_scenario.py | 2 +- vega_sim/devops/scenario.py | 4 +++- vega_sim/network_service.py | 9 +++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/vega_sim/devops/run_scenario.py b/vega_sim/devops/run_scenario.py index 90a4b09c9..b6ee2f250 100644 --- a/vega_sim/devops/run_scenario.py +++ b/vega_sim/devops/run_scenario.py @@ -68,7 +68,7 @@ def main(): seconds_per_block=1, transactions_per_block=1000, retain_log_files=True, - use_full_vega_wallet=False, + use_full_vega_wallet=True, warn_on_raw_data_access=False, run_with_console=args.console, ) as vega: diff --git a/vega_sim/devops/scenario.py b/vega_sim/devops/scenario.py index 5f2ecf975..d7aaf8127 100644 --- a/vega_sim/devops/scenario.py +++ b/vega_sim/devops/scenario.py @@ -156,7 +156,9 @@ def configure_agents( market_maker = ExponentialShapedMarketMaker( wallet_name=MARKET_MAKER_AGENT.wallet_name, key_name=MARKET_MAKER_AGENT.key_name, - market_name=self.market_manager_args.market_name, + market_name=self.market_name + if self.market_name is not None + else self.market_manager_args.market_name, asset_name=self.market_manager_args.asset_name, initial_asset_mint=self.market_maker_args.initial_mint, commitment_amount=self.market_maker_args.commitment_amount, diff --git a/vega_sim/network_service.py b/vega_sim/network_service.py index a8d865fad..8dc5421b9 100644 --- a/vega_sim/network_service.py +++ b/vega_sim/network_service.py @@ -226,7 +226,7 @@ def __init__( wallet_url: Optional[bool] = None, faucet_url: Optional[bool] = None, vega_node_grpc_url: Optional[str] = None, - load_existing_keys: Optional[bool] = None, + load_existing_keys: bool = True, governance_symbol: Optional[str] = "VEGA", vegacapsule_bin_path: Optional[str] = "./vega_sim/bin/vegacapsule", network_on_host: Optional[bool] = False, @@ -303,7 +303,12 @@ def __init__( if wallet_home_path is not None else environ.get("WALLET_HOME") ) - self._passphrase_file_path = wallet_passphrase_path + + self._passphrase_file_path = ( + wallet_passphrase_path + if wallet_passphrase_path is not None + else environ.get("VEGA_WALLET_TOKENS_PASSPHRASE_FILE") + ) self._token_path = ( wallet_token_path