From dc02d628c3a67448f37e2a2f290d65b52a21af30 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 07:40:36 +0530 Subject: [PATCH 01/98] add: invested amount variable to Bets class Bets class objects will now also tracking the amount being invested. --- packages/valory/skills/market_manager_abci/bets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 92a8170d..06f0531e 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -95,6 +95,7 @@ class Bet: prediction_response: PredictionResponse = dataclasses.field( default_factory=get_default_prediction_response ) + investedAmount: float = 0.0 position_liquidity: int = 0 potential_net_profit: int = 0 processed_timestamp: int = 0 @@ -208,6 +209,7 @@ def update_market_info(self, bet: "Bet") -> None: self.outcomeTokenAmounts = bet.outcomeTokenAmounts.copy() self.outcomeTokenMarginalPrices = bet.outcomeTokenMarginalPrices.copy() self.scaledLiquidityMeasure = bet.scaledLiquidityMeasure + self.investedAmount = bet.investedAmount def rebet_allowed( self, From 49661aac9a1f000b61b829d3bb0e80c958b4724a Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 08:00:36 +0530 Subject: [PATCH 02/98] fix: invested amount update fix invested amount during update should be added instead of updating the new value --- packages/valory/skills/market_manager_abci/bets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 06f0531e..b95e60d5 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -209,7 +209,7 @@ def update_market_info(self, bet: "Bet") -> None: self.outcomeTokenAmounts = bet.outcomeTokenAmounts.copy() self.outcomeTokenMarginalPrices = bet.outcomeTokenMarginalPrices.copy() self.scaledLiquidityMeasure = bet.scaledLiquidityMeasure - self.investedAmount = bet.investedAmount + self.investedAmount += bet.investedAmount def rebet_allowed( self, From 650451820061156a0b2294ae410525124a81a27b Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 08:05:13 +0530 Subject: [PATCH 03/98] edit: change invested amount variable name the new variable name signifies that it is an internal calculated value --- packages/valory/skills/market_manager_abci/bets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index b95e60d5..22ad072a 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -95,7 +95,7 @@ class Bet: prediction_response: PredictionResponse = dataclasses.field( default_factory=get_default_prediction_response ) - investedAmount: float = 0.0 + invested_amount: float = 0.0 position_liquidity: int = 0 potential_net_profit: int = 0 processed_timestamp: int = 0 @@ -209,7 +209,7 @@ def update_market_info(self, bet: "Bet") -> None: self.outcomeTokenAmounts = bet.outcomeTokenAmounts.copy() self.outcomeTokenMarginalPrices = bet.outcomeTokenMarginalPrices.copy() self.scaledLiquidityMeasure = bet.scaledLiquidityMeasure - self.investedAmount += bet.investedAmount + self.invested_amount += bet.invested_amount def rebet_allowed( self, From d547c8251e25410100fbb9855ebf2d8a2727964e Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 08:51:04 +0530 Subject: [PATCH 04/98] update: bet sampling functionality The sampling logic follows the specified priority logic: 1. Filter out all the bets that have a processed_timestamp != 0 to get a list of new bets. 2. If the list of new bets is not empty: 2.1 Order the list in decreasing order of liquidity (highest liquidity first). 2.2 For bets with the same liquidity, order them in decreasing order of market closing time (openingTimestamp). 3. If the list of new bets is empty: 3.1 Order the bets in decreasing order of invested_amount. 3.2 For bets with the same invested_amount, order them in increasing order of processed_timestamp (least recently processed first). 3.3 For bets with the same invested_amount and processed_timestamp, order them in decreasing order of liquidity. 3.4 For bets with the same invested_amount, processed_timestamp, and liquidity, order them in decreasing order of market closing time (openingTimestamp). --- .../behaviours/sampling.py | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index b6fd79ba..88421e23 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -99,15 +99,44 @@ def processable_bet(self, bet: Bet) -> bool: def _sampled_bet_idx(self, bets: List[Bet]) -> int: """ - Sample a bet and return its id. - - The sampling logic is relatively simple at the moment. - It simply selects the unprocessed bet with the largest liquidity. + Sample a bet and return its index. + + The sampling logic follows the specified priority logic: + 1. Filter out all the bets that have a processed_timestamp != 0 to get a list of new bets. + 2. If the list of new bets is not empty: + 2.1 Order the list in decreasing order of liquidity (highest liquidity first). + 2.2 For bets with the same liquidity, order them in decreasing order of market closing time (openingTimestamp). + 3. If the list of new bets is empty: + 3.1 Order the bets in decreasing order of invested_amount. + 3.2 For bets with the same invested_amount, order them in increasing order of processed_timestamp (least recently processed first). + 3.3 For bets with the same invested_amount and processed_timestamp, order them in decreasing order of liquidity. + 3.4 For bets with the same invested_amount, processed_timestamp, and liquidity, order them in decreasing order of market closing time (openingTimestamp). :param bets: the bets' values to compare for the sampling. - :return: the id of the sampled bet, out of all the available bets, not only the given ones. + :return: the index of the sampled bet, out of all the available bets, not only the given ones. """ - return self.bets.index(max(bets)) + # Filter out all the bets that have a processed_timestamp != 0 + new_bets = [bet for bet in bets if bet.processed_timestamp == 0] + + if new_bets: + # Order the list in Decreasing order of liquidity + new_bets.sort( + key=lambda bet: (bet.scaledLiquidityMeasure, bet.openingTimestamp), + reverse=True, + ) + return self.bets.index(new_bets[0]) + else: + # Order first in Decreasing order of invested_amount + bets.sort( + key=lambda bet: ( + bet.invested_amount, + -bet.processed_timestamp, # Increasing order of processed_timestamp + bet.scaledLiquidityMeasure, + bet.openingTimestamp, + ), + reverse=True, + ) + return self.bets.index(bets[0]) def _sample(self) -> Optional[int]: """Sample a bet, mark it as processed, and return its index.""" From 530f52c969aca2fb767b67638bc7c4a4521fd1c5 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 08:56:08 +0530 Subject: [PATCH 05/98] add: invested amount updation functionality --- packages/valory/skills/market_manager_abci/bets.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 22ad072a..7e297e9b 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -198,6 +198,10 @@ def no(self) -> str: """Return the "no" outcome.""" return self._get_binary_outcome(True) + def update_invested_amount(self, new_investment) -> None: + """Update the invested amount.""" + self.invested_amount += new_investment + def update_market_info(self, bet: "Bet") -> None: """Update the bet's market information.""" if ( @@ -209,7 +213,6 @@ def update_market_info(self, bet: "Bet") -> None: self.outcomeTokenAmounts = bet.outcomeTokenAmounts.copy() self.outcomeTokenMarginalPrices = bet.outcomeTokenMarginalPrices.copy() self.scaledLiquidityMeasure = bet.scaledLiquidityMeasure - self.invested_amount += bet.invested_amount def rebet_allowed( self, From a9f44ed103c6dda132477de82ec399dca044c02e Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 14:02:46 +0530 Subject: [PATCH 06/98] update(bets.py): encapsulate invested amount attribute --- packages/valory/skills/market_manager_abci/bets.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 7e297e9b..a24b71a3 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -95,7 +95,7 @@ class Bet: prediction_response: PredictionResponse = dataclasses.field( default_factory=get_default_prediction_response ) - invested_amount: float = 0.0 + _invested_amount: float = 0.0 position_liquidity: int = 0 potential_net_profit: int = 0 processed_timestamp: int = 0 @@ -198,9 +198,15 @@ def no(self) -> str: """Return the "no" outcome.""" return self._get_binary_outcome(True) - def update_invested_amount(self, new_investment) -> None: - """Update the invested amount.""" - self.invested_amount += new_investment + @property + def invested_amount(self) -> float: + """Return the invested amount.""" + return self._invested_amount + + @invested_amount.setter + def invested_amount(self, new_investment: float) -> None: + """Set the invested amount.""" + self._invested_amount += new_investment def update_market_info(self, bet: "Bet") -> None: """Update the bet's market information.""" From 583e8ee01eebef55ff6ced709af1fd211d113557 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 16:12:44 +0530 Subject: [PATCH 07/98] add: queue number attribute to Bet class --- packages/valory/skills/market_manager_abci/bets.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index a24b71a3..b7a6dd6c 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -100,6 +100,7 @@ class Bet: potential_net_profit: int = 0 processed_timestamp: int = 0 n_bets: int = 0 + _queue_no: int = 0 def __post_init__(self) -> None: """Post initialization to adjust the values.""" @@ -208,6 +209,16 @@ def invested_amount(self, new_investment: float) -> None: """Set the invested amount.""" self._invested_amount += new_investment + @property + def queue_no(self) -> int: + """Return the queue number.""" + return self._queue_no + + @queue_no.setter + def queue_no(self, new_queue_no: int) -> None: + """Set the queue number.""" + self._queue_no = new_queue_no + def update_market_info(self, bet: "Bet") -> None: """Update the bet's market information.""" if ( From c9aa1afe79e3b3827ea70b6eda6e92ff6a2fc8c9 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 16:26:58 +0530 Subject: [PATCH 08/98] add: functionality to give priority to older queue --- .../behaviours/sampling.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 88421e23..93010a61 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -115,19 +115,24 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: :param bets: the bets' values to compare for the sampling. :return: the index of the sampled bet, out of all the available bets, not only the given ones. """ - # Filter out all the bets that have a processed_timestamp != 0 - new_bets = [bet for bet in bets if bet.processed_timestamp == 0] - if new_bets: + # Filter out all the best with the smallest queue number + least_queue_number = min([bet.queue_no for bet in bets]) + priority_bets = [bet for bet in bets if bet.queue_no == least_queue_number] + + # Filter out all the bets that have a processed_timestamp == 0 + new_in_priority_bets = [bet for bet in bets if bet.processed_timestamp == 0] + + if new_in_priority_bets: # Order the list in Decreasing order of liquidity - new_bets.sort( + new_in_priority_bets.sort( key=lambda bet: (bet.scaledLiquidityMeasure, bet.openingTimestamp), reverse=True, ) - return self.bets.index(new_bets[0]) + return self.bets.index(new_in_priority_bets[0]) else: # Order first in Decreasing order of invested_amount - bets.sort( + priority_bets.sort( key=lambda bet: ( bet.invested_amount, -bet.processed_timestamp, # Increasing order of processed_timestamp @@ -136,7 +141,7 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: ), reverse=True, ) - return self.bets.index(bets[0]) + return self.bets.index(priority_bets[0]) def _sample(self) -> Optional[int]: """Sample a bet, mark it as processed, and return its index.""" From f5ead30502e2804fedb21668d097a0c9c8de93a8 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 21 Nov 2024 16:29:16 +0530 Subject: [PATCH 09/98] add: queue number update method --- .../valory/skills/market_manager_abci/behaviours.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 04c26cba..148d0627 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -58,6 +58,7 @@ def __init__(self, **kwargs: Any) -> None: """Initialize `BetsManagerBehaviour`.""" super().__init__(**kwargs) self.bets: List[Bet] = [] + self.current_queue_number: int = 0 self.bets_filepath: str = self.params.store_path / BETS_FILENAME def store_bets(self) -> None: @@ -93,6 +94,14 @@ def read_bets(self) -> None: with open(self.bets_filepath, READ_MODE) as bets_file: try: self.bets = json.load(bets_file, cls=BetsDecoder) + + # Extract the last queue number from the bets + # This is used to determine the next queue number + if self.bets: + self.current_queue_number = ( + max(bet.queue_no for bet in self.bets) + 1 + ) + return except (JSONDecodeError, TypeError): err = ( @@ -130,7 +139,9 @@ def _process_chunk(self, chunk: Optional[List[Dict[str, Any]]]) -> None: bet = Bet(**raw_bet, market=self._current_market) index = self.get_bet_idx(bet.id) if index is None: - self.bets.append(bet) + if self.bets: + bet.queue_no = self.current_queue_number + self.bets.append(bet) else: self.bets[index].update_market_info(bet) From 262a36111de1f890c76a81afe2ebee3ca9cc097a Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 01:20:53 +0530 Subject: [PATCH 10/98] add: transaction processed timestamp attribute --- packages/valory/skills/market_manager_abci/bets.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index b7a6dd6c..0220aee7 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -99,6 +99,7 @@ class Bet: position_liquidity: int = 0 potential_net_profit: int = 0 processed_timestamp: int = 0 + _transaction_processed_timestamp: int = 0 n_bets: int = 0 _queue_no: int = 0 @@ -204,11 +205,20 @@ def invested_amount(self) -> float: """Return the invested amount.""" return self._invested_amount - @invested_amount.setter - def invested_amount(self, new_investment: float) -> None: + def add_investment(self, new_investment: float) -> None: """Set the invested amount.""" self._invested_amount += new_investment + @property + def transaction_processed_timestamp(self) -> int: + """Return the transaction processed timestamp.""" + return self._transaction_processed_timestamp + + @transaction_processed_timestamp.setter + def transaction_processed_timestamp(self, new_timestamp: int) -> None: + """Set the transaction processed timestamp.""" + self._transaction_processed_timestamp = new_timestamp + @property def queue_no(self) -> int: """Return the queue number.""" From fa76565a3106ae7dbd5593697da208f7f616e494 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 01:22:37 +0530 Subject: [PATCH 11/98] add: bet transaction infromation updation Updates the investment amount and transaction timestamp if reedeem round is reached from post_tx_round --- .../skills/decision_maker_abci/behaviours/base.py | 14 ++++++++++++++ .../decision_maker_abci/behaviours/reedem.py | 3 +++ 2 files changed, 17 insertions(+) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index ee2bb2ca..79144d17 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -340,6 +340,20 @@ def check_balance(self) -> WaitableConditionType: self._report_balance() return True + def update_bet_transaction_information(self) -> None: + """Get whether the bet's invested amount should be updated.""" + self.read_bets() + # Update the bet's invested amount, the new bet amount is added to previous invested amount + self.bets[self.synchronized_data.sampled_bet_index].add_investment( + self.synchronized_data.bet_amount + ) + # Update bet transaction timestamp + self.bets[ + self.synchronized_data.sampled_bet_index + ].transaction_processed_timestamp = self.synced_timestamp + self.store_bets() + return + def send_message( self, msg: Message, dialogue: Dialogue, callback: Callable ) -> None: diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index a00c5b60..4bc25fa3 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -966,6 +966,9 @@ def async_act(self) -> Generator: if not success: return None + if self.synchronized_data.tx_submitter == "bet_placement_round": + self.update_bet_transaction_information() + payload: Optional[RedeemPayload] if self.benchmarking_mode.enabled: payload = self._benchmarking_act() From fb81156f3f1865100b9dd07c470bedd20df0f5fd Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 01:34:39 +0530 Subject: [PATCH 12/98] fix: current queue number update methodology --- .../skills/market_manager_abci/behaviours.py | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 148d0627..5aa75674 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -95,13 +95,6 @@ def read_bets(self) -> None: try: self.bets = json.load(bets_file, cls=BetsDecoder) - # Extract the last queue number from the bets - # This is used to determine the next queue number - if self.bets: - self.current_queue_number = ( - max(bet.queue_no for bet in self.bets) + 1 - ) - return except (JSONDecodeError, TypeError): err = ( @@ -139,9 +132,8 @@ def _process_chunk(self, chunk: Optional[List[Dict[str, Any]]]) -> None: bet = Bet(**raw_bet, market=self._current_market) index = self.get_bet_idx(bet.id) if index is None: - if self.bets: - bet.queue_no = self.current_queue_number - self.bets.append(bet) + bet.queue_no = self.current_queue_number + self.bets.append(bet) else: self.bets[index].update_market_info(bet) @@ -149,6 +141,12 @@ def _update_bets( self, ) -> Generator: """Fetch the questions from all the prediction markets and update the local copy of the bets.""" + + # Extract the last queue number from the bets + # This is used to determine the next queue number + if self.bets: + self.current_queue_number = max(bet.queue_no for bet in self.bets) + 1 + while True: can_proceed = self._prepare_fetching() if not can_proceed: @@ -165,6 +163,11 @@ def _update_bets( if self.synced_time >= bet.openingTimestamp - self.params.opening_margin: bet.blacklist_forever() + # Extract the last queue number from the bets + # This is used to determine the next queue number + if self.bets: + self.current_queue_number = max(bet.queue_no for bet in self.bets) + # truncate the bets, otherwise logs get too big bets_str = str(self.bets)[:MAX_LOG_SIZE] self.context.logger.info(f"Updated bets: {bets_str}") From dffd5dfaf42f47b326769e349d9808427f6d1862 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 16:06:26 +0530 Subject: [PATCH 13/98] edit: make private variables public for easy access --- .../valory/skills/market_manager_abci/bets.py | 35 ++----------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 0220aee7..57eb8717 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -95,13 +95,13 @@ class Bet: prediction_response: PredictionResponse = dataclasses.field( default_factory=get_default_prediction_response ) - _invested_amount: float = 0.0 + invested_amount: float = 0.0 position_liquidity: int = 0 potential_net_profit: int = 0 processed_timestamp: int = 0 - _transaction_processed_timestamp: int = 0 + transaction_processed_timestamp: int = 0 n_bets: int = 0 - _queue_no: int = 0 + queue_no: int = 0 def __post_init__(self) -> None: """Post initialization to adjust the values.""" @@ -200,35 +200,6 @@ def no(self) -> str: """Return the "no" outcome.""" return self._get_binary_outcome(True) - @property - def invested_amount(self) -> float: - """Return the invested amount.""" - return self._invested_amount - - def add_investment(self, new_investment: float) -> None: - """Set the invested amount.""" - self._invested_amount += new_investment - - @property - def transaction_processed_timestamp(self) -> int: - """Return the transaction processed timestamp.""" - return self._transaction_processed_timestamp - - @transaction_processed_timestamp.setter - def transaction_processed_timestamp(self, new_timestamp: int) -> None: - """Set the transaction processed timestamp.""" - self._transaction_processed_timestamp = new_timestamp - - @property - def queue_no(self) -> int: - """Return the queue number.""" - return self._queue_no - - @queue_no.setter - def queue_no(self, new_queue_no: int) -> None: - """Set the queue number.""" - self._queue_no = new_queue_no - def update_market_info(self, bet: "Bet") -> None: """Update the bet's market information.""" if ( From 76c4ae07836bdf15735e663dfe83637255d8e73c Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 16:06:44 +0530 Subject: [PATCH 14/98] edit: investment amount update functionality --- .../valory/skills/decision_maker_abci/behaviours/base.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index 79144d17..7ddf268c 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -344,9 +344,10 @@ def update_bet_transaction_information(self) -> None: """Get whether the bet's invested amount should be updated.""" self.read_bets() # Update the bet's invested amount, the new bet amount is added to previous invested amount - self.bets[self.synchronized_data.sampled_bet_index].add_investment( - self.synchronized_data.bet_amount - ) + self.bets[ + self.synchronized_data.sampled_bet_index + ].invested_amount += self.synchronized_data.bet_amount + # Update bet transaction timestamp self.bets[ self.synchronized_data.sampled_bet_index From 54d19632e7aac6f0a455efb0208d01ae12669806 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 16:10:34 +0530 Subject: [PATCH 15/98] edit: extract betplacement round name from variable --- .../valory/skills/decision_maker_abci/behaviours/reedem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index 4bc25fa3..4419fb0e 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -53,6 +53,9 @@ Trade, ) from packages.valory.skills.decision_maker_abci.states.redeem import RedeemRound +from packages.valory.skills.decision_maker_abci.states.bet_placement import ( + BetPlacementRound, +) from packages.valory.skills.market_manager_abci.graph_tooling.requests import ( FetchStatus, MAX_LOG_SIZE, @@ -966,7 +969,7 @@ def async_act(self) -> Generator: if not success: return None - if self.synchronized_data.tx_submitter == "bet_placement_round": + if self.synchronized_data.tx_submitter == BetPlacementRound.auto_round_id(): self.update_bet_transaction_information() payload: Optional[RedeemPayload] From 97d436b6c0193c38ace7527a0ebc1423fe071e57 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 19:27:23 +0530 Subject: [PATCH 16/98] fix: typo in samplinhg Co-authored-by: Anna Sambrook <83281726+annasambrook@users.noreply.github.com> --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 93010a61..f9324d17 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -116,7 +116,7 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: :return: the index of the sampled bet, out of all the available bets, not only the given ones. """ - # Filter out all the best with the smallest queue number + # Filter out all the bets with the smallest queue number least_queue_number = min([bet.queue_no for bet in bets]) priority_bets = [bet for bet in bets if bet.queue_no == least_queue_number] From cfe3169a6e00e8a4c1dea01adaaf576120d451e5 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 22 Nov 2024 14:05:18 +0000 Subject: [PATCH 17/98] fix: typo --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 93010a61..f9324d17 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -116,7 +116,7 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: :return: the index of the sampled bet, out of all the available bets, not only the given ones. """ - # Filter out all the best with the smallest queue number + # Filter out all the bets with the smallest queue number least_queue_number = min([bet.queue_no for bet in bets]) priority_bets = [bet for bet in bets if bet.queue_no == least_queue_number] From fefba9955418f0a53f6447fd5a20744838cdc2b1 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 22 Nov 2024 14:09:17 +0000 Subject: [PATCH 18/98] fix: sampled_bet on update_bet_transaction_information --- .../skills/decision_maker_abci/behaviours/base.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index 7ddf268c..b30a50cd 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -342,16 +342,11 @@ def check_balance(self) -> WaitableConditionType: def update_bet_transaction_information(self) -> None: """Get whether the bet's invested amount should be updated.""" - self.read_bets() - # Update the bet's invested amount, the new bet amount is added to previous invested amount - self.bets[ - self.synchronized_data.sampled_bet_index - ].invested_amount += self.synchronized_data.bet_amount - + sampled_bet = self.sampled_bet + # Update the bet's invested amount, the new bet amount is added to previously invested amount + sampled_bet.invested_amount += self.synchronized_data.bet_amount # Update bet transaction timestamp - self.bets[ - self.synchronized_data.sampled_bet_index - ].transaction_processed_timestamp = self.synced_timestamp + sampled_bet.transaction_processed_timestamp = self.synced_timestamp self.store_bets() return From dd52873bb04b7c4d39c0cf1d7ceb2a2f2ff2f07e Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 22 Nov 2024 14:10:15 +0000 Subject: [PATCH 19/98] fix: remove return from update_bet_transaction_information --- packages/valory/skills/decision_maker_abci/behaviours/base.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index b30a50cd..3816d8c0 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -348,7 +348,6 @@ def update_bet_transaction_information(self) -> None: # Update bet transaction timestamp sampled_bet.transaction_processed_timestamp = self.synced_timestamp self.store_bets() - return def send_message( self, msg: Message, dialogue: Dialogue, callback: Callable From 627f5d5b37d7ea3f5b27c16a02085940c4cf79ed Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 22 Nov 2024 14:14:47 +0000 Subject: [PATCH 20/98] comment: add comment for update_bet_transaction_information --- packages/valory/skills/decision_maker_abci/behaviours/reedem.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index 4419fb0e..f9d7b529 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -969,6 +969,8 @@ def async_act(self) -> Generator: if not success: return None + # If a bet has been placed then update the bets.json file with the investment_amount and + # transaction_processed_timestamp if self.synchronized_data.tx_submitter == BetPlacementRound.auto_round_id(): self.update_bet_transaction_information() From e046f7ce4c4120a12ca44d0db3fd5e87c214de65 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 22 Nov 2024 19:55:50 +0530 Subject: [PATCH 21/98] fix: imports ordering --- packages/valory/skills/decision_maker_abci/behaviours/reedem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index 4419fb0e..e1a192b2 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -52,10 +52,10 @@ FPMM, Trade, ) -from packages.valory.skills.decision_maker_abci.states.redeem import RedeemRound from packages.valory.skills.decision_maker_abci.states.bet_placement import ( BetPlacementRound, ) +from packages.valory.skills.decision_maker_abci.states.redeem import RedeemRound from packages.valory.skills.market_manager_abci.graph_tooling.requests import ( FetchStatus, MAX_LOG_SIZE, From 8d3b9afd0c888ca23701145ffcb8a06361278791 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 22 Nov 2024 15:07:40 +0000 Subject: [PATCH 22/98] fix: only increase current queue number if the queue has been exhausted. --- .../valory/skills/market_manager_abci/behaviours.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 5aa75674..8789ac91 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -94,7 +94,6 @@ def read_bets(self) -> None: with open(self.bets_filepath, READ_MODE) as bets_file: try: self.bets = json.load(bets_file, cls=BetsDecoder) - return except (JSONDecodeError, TypeError): err = ( @@ -145,7 +144,14 @@ def _update_bets( # Extract the last queue number from the bets # This is used to determine the next queue number if self.bets: - self.current_queue_number = max(bet.queue_no for bet in self.bets) + 1 + max_queue_no = max(bet.queue_no for bet in self.bets) + min_queue_no = min(bet.queue_no for bet in self.bets) + + self.current_queue_number = max_queue_no + + # If the current queue has been exhausted then increase the current queue number by 1 + if max_queue_no == min_queue_no: + self.current_queue_number += 1 while True: can_proceed = self._prepare_fetching() From 6e580904e713aebd0f3aece152c8bccd89d8663e Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 22 Nov 2024 16:01:35 +0000 Subject: [PATCH 23/98] Revert "fix: only increase current queue number if the queue has been exhausted." This reverts commit 8d3b9afd0c888ca23701145ffcb8a06361278791. --- .../valory/skills/market_manager_abci/behaviours.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 8789ac91..5aa75674 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -94,6 +94,7 @@ def read_bets(self) -> None: with open(self.bets_filepath, READ_MODE) as bets_file: try: self.bets = json.load(bets_file, cls=BetsDecoder) + return except (JSONDecodeError, TypeError): err = ( @@ -144,14 +145,7 @@ def _update_bets( # Extract the last queue number from the bets # This is used to determine the next queue number if self.bets: - max_queue_no = max(bet.queue_no for bet in self.bets) - min_queue_no = min(bet.queue_no for bet in self.bets) - - self.current_queue_number = max_queue_no - - # If the current queue has been exhausted then increase the current queue number by 1 - if max_queue_no == min_queue_no: - self.current_queue_number += 1 + self.current_queue_number = max(bet.queue_no for bet in self.bets) + 1 while True: can_proceed = self._prepare_fetching() From c949ae2f70de12f43a2ec1045eab37b551cfbc46 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Fri, 22 Nov 2024 16:05:26 +0000 Subject: [PATCH 24/98] chore: generators --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 8 ++++---- .../valory/skills/market_manager_abci/skill.yaml | 4 ++-- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 287c3e9e..9bd66a0f 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeicngtrfoad3yqbrdslmgngpfiqipqac5t4jv3rc22yyboiimp7kjq", - "skill/valory/trader_abci/0.1.0": "bafybeie57hhm6j5jfo43oq4hu2zfrteqh67zb4eatqyvrinsbc4qg4v2ma", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibevivb6pfty5ghtzjwwn2sgnn4ij263wbiziv373yfd5m4cyotpq", + "skill/valory/market_manager_abci/0.1.0": "bafybeieywounbmfkgzgskuv7hjdu4pybtdmekiroolvsnjnfkke3mnhfqy", + "skill/valory/decision_maker_abci/0.1.0": "bafybeib3vivs5lnfzk446iofma5ootkiabtadwtjc53jt4tbmbltfeaxxy", + "skill/valory/trader_abci/0.1.0": "bafybeidt7j5m53fo3u37lgf5rjko6gur3kuquqqzmyf5nuv4dw4ptkbadu", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiduqneptewxghxhcknygxb4vvufnb6teiogrjekcvlltqvnm7pqmm", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini", - "agent/valory/trader/0.1.0": "bafybeicc6jkakg6dhvqpb6esidgnffl5ses2bnk67eqs3falrkbw4aa47q", - "service/valory/trader/0.1.0": "bafybeih6cbruabwq5z2jl22pcrhzamzw4pz5yhvld4nmee3k7jkjvhmohu", - "service/valory/trader_pearl/0.1.0": "bafybeibvcu6rnngqw4i6mzqukwwn4gxc2v7hn6cydyha6ouqeyen54vcla" + "agent/valory/trader/0.1.0": "bafybeifcid54fyx7pgxoqa6xgwjisqmtd6j6ba4tgqzzynclpic7cvd4oy", + "service/valory/trader/0.1.0": "bafybeif6hjpqzkplvpt2c2pbdw4dk5rq5axqwh4dtzbgxnnvr3fbmgq2vq", + "service/valory/trader_pearl/0.1.0": "bafybeiftqu2sqhl222dvsduvplzfxkn5ydw5zjzn6ctvk324k4jddoaqlu" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index e614375c..dcac7e3f 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibevivb6pfty5ghtzjwwn2sgnn4ij263wbiziv373yfd5m4cyotpq -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicngtrfoad3yqbrdslmgngpfiqipqac5t4jv3rc22yyboiimp7kjq -- valory/trader_abci:0.1.0:bafybeie57hhm6j5jfo43oq4hu2zfrteqh67zb4eatqyvrinsbc4qg4v2ma +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiduqneptewxghxhcknygxb4vvufnb6teiogrjekcvlltqvnm7pqmm +- valory/market_manager_abci:0.1.0:bafybeieywounbmfkgzgskuv7hjdu4pybtdmekiroolvsnjnfkke3mnhfqy +- valory/decision_maker_abci:0.1.0:bafybeib3vivs5lnfzk446iofma5ootkiabtadwtjc53jt4tbmbltfeaxxy +- valory/trader_abci:0.1.0:bafybeidt7j5m53fo3u37lgf5rjko6gur3kuquqqzmyf5nuv4dw4ptkbadu - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 8473fa8e..735ee21d 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeicc6jkakg6dhvqpb6esidgnffl5ses2bnk67eqs3falrkbw4aa47q +agent: valory/trader:0.1.0:bafybeifcid54fyx7pgxoqa6xgwjisqmtd6j6ba4tgqzzynclpic7cvd4oy number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index c920a0a8..9aa86fe3 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeicc6jkakg6dhvqpb6esidgnffl5ses2bnk67eqs3falrkbw4aa47q +agent: valory/trader:0.1.0:bafybeifcid54fyx7pgxoqa6xgwjisqmtd6j6ba4tgqzzynclpic7cvd4oy number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 060d4fa0..257e9026 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -12,7 +12,7 @@ fingerprint: README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky - behaviours/base.py: bafybeidjmsljdaw7y5chzzkub63mzf5ydpauch5ugojds5jwpeyvovkq3y + behaviours/base.py: bafybeicn7q6tezi6essqfwnreld3shjjno3eaxbygpjsp6qktghog4pip4 behaviours/bet_placement.py: bafybeihmia64t2payxfqcnfdqg675ui2yp3hnyfwb2xhj2hn7wl237b4re behaviours/blacklisting.py: bafybeicqwj7o4l7qcym5xjqwq45jngqkhyf44mn6qise2ysyfnlnwz7pdy behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci @@ -22,9 +22,9 @@ fingerprint: behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeicrmdvhci5prfldvuf3bclbbqi6j7lpv6hmphw3qwgmkmwat3od44 behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce - behaviours/reedem.py: bafybeiaxwp4lx62owcaqfp6xcqh6567f5yvwnl4rage2f5hmq4nltkzjjy + behaviours/reedem.py: bafybeibb2idce6r7gkyp5hpdc35frzcqcmnmbdhzxbdv2usdavrb7kjyba behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeie6ab5pdwal5glhg75am2637lijz5kwqx4ctk2lgqjyllmnw335ca + behaviours/sampling.py: bafybeif3klrii7qqx4c3voekmrqcwjo7e6npexe6jmtdd2du6ctgfc5rbm behaviours/storage_manager.py: bafybeignur4cwwkdmoj33ll3pmylnddbaqd6gpn6m2n7idieyyti7m3jg4 behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa +- valory/market_manager_abci:0.1.0:bafybeieywounbmfkgzgskuv7hjdu4pybtdmekiroolvsnjnfkke3mnhfqy - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 44e6f05a..48702abd 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -8,8 +8,8 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e - behaviours.py: bafybeifzt6vykvvgr5rtzmzdbo7bfsxi765xsljdfrktrq35ogf6cdhmna - bets.py: bafybeif25efeykh4lcw36dxzb35bcoaqtays6o2pmtqhgxske3mf2lkku4 + behaviours.py: bafybeihj5zfo7dlhz2sv7izjeabd7pmdv73anriufhbaq7jtftng6ftaie + bets.py: bafybeibdgxrtokg2cpmvnsljbvyhrgmj3o7fo452r3v2xzira7xm45bc44 dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 06fa4538..cba128b3 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicngtrfoad3yqbrdslmgngpfiqipqac5t4jv3rc22yyboiimp7kjq -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibevivb6pfty5ghtzjwwn2sgnn4ij263wbiziv373yfd5m4cyotpq +- valory/market_manager_abci:0.1.0:bafybeieywounbmfkgzgskuv7hjdu4pybtdmekiroolvsnjnfkke3mnhfqy +- valory/decision_maker_abci:0.1.0:bafybeib3vivs5lnfzk446iofma5ootkiabtadwtjc53jt4tbmbltfeaxxy +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiduqneptewxghxhcknygxb4vvufnb6teiogrjekcvlltqvnm7pqmm - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 1c410677..9a4aa910 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeicngtrfoad3yqbrdslmgngpfiqipqac5t4jv3rc22yyboiimp7kjq +- valory/decision_maker_abci:0.1.0:bafybeib3vivs5lnfzk446iofma5ootkiabtadwtjc53jt4tbmbltfeaxxy - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From b0d63ab0848bb172dd4a83b79f47521476ff961c Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 28 Nov 2024 16:15:05 +0530 Subject: [PATCH 25/98] add: comments for logic of bet transaction update The tx-submiter check for betplacement round assures that, PostTxSettlementRound was successful after bet placement round and transaction settlement skill was over with "DONE" event. --- .../valory/skills/decision_maker_abci/behaviours/reedem.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index 9ebf0e3a..cb93b9ea 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -969,8 +969,10 @@ def async_act(self) -> Generator: if not success: return None - # If a bet has been placed then update the bets.json file with the investment_amount and - # transaction_processed_timestamp + # Checking if the last round that submitted the transaction was the bet placement round + # If so, we need to update the bet transaction information, because the transaction was successful + # tx settlement multiplexer assures transitions from Post transaction to Redeem round + # only if the transaction was successful if self.synchronized_data.tx_submitter == BetPlacementRound.auto_round_id(): self.update_bet_transaction_information() From 4a188891426456663c2b0759233e14531826b049 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 28 Nov 2024 21:30:02 +0530 Subject: [PATCH 26/98] update: queue no to -1 for blacklisted bets --- packages/valory/skills/market_manager_abci/bets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 57eb8717..f8340bd9 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -117,6 +117,7 @@ def blacklist_forever(self) -> None: """Blacklist a bet forever. Should only be used in cases where it is impossible to bet.""" self.outcomes = None self.processed_timestamp = sys.maxsize + self.queue_no = -1 def _validate(self) -> None: """Validate the values of the instance.""" From 423a08209dcce9ac256206c2d060a7b129bdc7fe Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 00:20:45 +0530 Subject: [PATCH 27/98] update: bet queue process - Only three level of queues exist -1, 0, 1 - blacklisted bets are set to -1 --- .../skills/market_manager_abci/behaviours.py | 64 +++++++++++++++---- 1 file changed, 50 insertions(+), 14 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 5aa75674..04204427 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -59,6 +59,7 @@ def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) self.bets: List[Bet] = [] self.current_queue_number: int = 0 + self.queue_organisation_required: bool = False self.bets_filepath: str = self.params.store_path / BETS_FILENAME def store_bets(self) -> None: @@ -94,7 +95,7 @@ def read_bets(self) -> None: with open(self.bets_filepath, READ_MODE) as bets_file: try: self.bets = json.load(bets_file, cls=BetsDecoder) - + self.queue_organisation_required = True return except (JSONDecodeError, TypeError): err = ( @@ -118,6 +119,7 @@ class UpdateBetsBehaviour(BetsManagerBehaviour, QueryingBehaviour): def __init__(self, **kwargs: Any) -> None: """Initialize `UpdateBetsBehaviour`.""" super().__init__(**kwargs) + self.max_queue_number: int = -1 def get_bet_idx(self, bet_id: str) -> Optional[int]: """Get the index of the bet with the given id, if it exists, otherwise `None`.""" @@ -137,16 +139,41 @@ def _process_chunk(self, chunk: Optional[List[Dict[str, Any]]]) -> None: else: self.bets[index].update_market_info(bet) + def _set_current_queue_number(self) -> None: + """Set the current queue number.""" + + # Extract the last queue number from the bets + # This is used to determine the next queue number + if self.bets: + # find max queue number in current list of bets + self.max_queue_number = max([bet.queue_no for bet in self.bets]) + + if self.max_queue_number == 0: + # check if all bets that have queue no not -1 + # have not been processed + all_bets_not_processed = all( + bet.transaction_processed_timestamp == 0 + for bet in self.bets + if bet.queue_no != -1 + ) + + # if none of the bets have been processed + # then there is no chance of investment amount priority + if not all_bets_not_processed: + # If even one bet has been processed in queue 0 + # then if any new bets are being added they should be added to queue 1 + # Because 10 new bets are added every new epoch + self.current_queue_number = 1 + def _update_bets( self, ) -> Generator: """Fetch the questions from all the prediction markets and update the local copy of the bets.""" - # Extract the last queue number from the bets - # This is used to determine the next queue number - if self.bets: - self.current_queue_number = max(bet.queue_no for bet in self.bets) + 1 + # Set the current queue number + self._set_current_queue_number() + # Fetching bets from the prediction markets while True: can_proceed = self._prepare_fetching() if not can_proceed: @@ -159,25 +186,34 @@ def _update_bets( # this won't wipe the bets as the `store_bets` of the `BetsManagerBehaviour` takes this into consideration self.bets = [] - for bet in self.bets: - if self.synced_time >= bet.openingTimestamp - self.params.opening_margin: - bet.blacklist_forever() - - # Extract the last queue number from the bets - # This is used to determine the next queue number - if self.bets: - self.current_queue_number = max(bet.queue_no for bet in self.bets) - # truncate the bets, otherwise logs get too big bets_str = str(self.bets)[:MAX_LOG_SIZE] self.context.logger.info(f"Updated bets: {bets_str}") + def _blacklist_expired_bets(self) -> None: + """Blacklist bets that are older than the opening margin.""" + for bet in self.bets: + if self.synced_time >= bet.openingTimestamp - self.params.opening_margin: + bet.blacklist_forever() + def async_act(self) -> Generator: """Do the action.""" with self.context.benchmark_tool.measure(self.behaviour_id).local(): + # Read the bets from the agent's data dir as JSON, if they exist self.read_bets() + + # blacklist bets that are older than the opening margin + # if trader ran after a long time + # helps in resetting the queue number to 0 + if self.bets: + self._blacklist_expired_bets() + + # Update the bets list with new bets or update existing ones yield from self._update_bets() + + # Store the bets to the agent's data dir as JSON self.store_bets() + bets_hash = self.hash_stored_bets() if self.bets else None payload = UpdateBetsPayload(self.context.agent_address, bets_hash) From 5090305a9c5d2307641f742cc5b30246ad4ce5a5 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 00:21:32 +0530 Subject: [PATCH 28/98] update: bet sampling process --- .../behaviours/sampling.py | 73 ++++++++++++------- 1 file changed, 48 insertions(+), 25 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 0f72b123..c5ad2239 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -120,32 +120,55 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: :return: the index of the sampled bet, out of all the available bets, not only the given ones. """ - # Filter out all the bets with the smallest queue number - least_queue_number = min([bet.queue_no for bet in bets]) - priority_bets = [bet for bet in bets if bet.queue_no == least_queue_number] - - # Filter out all the bets that have a processed_timestamp == 0 - new_in_priority_bets = [bet for bet in bets if bet.processed_timestamp == 0] - - if new_in_priority_bets: - # Order the list in Decreasing order of liquidity - new_in_priority_bets.sort( - key=lambda bet: (bet.scaledLiquidityMeasure, bet.openingTimestamp), - reverse=True, - ) - return self.bets.index(new_in_priority_bets[0]) + max_queue_number = max([bet.queue_no for bet in bets]) + + if max_queue_number == 0: + # Search if any bet is unprocessed + new_in_priority_bets = [bet for bet in bets if bet.processed_timestamp == 0] + + if new_in_priority_bets: + # Order the list in Decreasing order of liquidity + new_in_priority_bets.sort( + key=lambda bet: (bet.scaledLiquidityMeasure, bet.openingTimestamp), + reverse=True, + ) + return self.bets.index(new_in_priority_bets[0]) + else: + # All bets have been processed once, bets can be sampled based on the priority logic + bets.sort( + key=lambda bet: ( + bet.invested_amount, + -bet.processed_timestamp, # Increasing order of processed_timestamp + bet.scaledLiquidityMeasure, + bet.openingTimestamp, + ), + reverse=True, + ) + return self.bets.index(bets[0]) else: - # Order first in Decreasing order of invested_amount - priority_bets.sort( - key=lambda bet: ( - bet.invested_amount, - -bet.processed_timestamp, # Increasing order of processed_timestamp - bet.scaledLiquidityMeasure, - bet.openingTimestamp, - ), - reverse=True, - ) - return self.bets.index(priority_bets[0]) + # Check if all bets have processed_timestamp == 0 + all_bets_not_processed = all(bet.processed_timestamp == 0 for bet in bets) + + if all_bets_not_processed: + # Current processable list of bets have not been processed yet + # Order the list in Decreasing order of liquidity + bets.sort( + key=lambda bet: (bet.scaledLiquidityMeasure, bet.openingTimestamp), + reverse=True, + ) + return self.bets.index(bets[0]) + else: + # Bets available for rebetting and can be prioritized based on the priority logic + bets.sort( + key=lambda bet: ( + bet.invested_amount, + -bet.processed_timestamp, # Increasing order of processed_timestamp + bet.scaledLiquidityMeasure, + bet.openingTimestamp, + ), + reverse=True, + ) + return self.bets.index(bets[0]) def _sample(self) -> Optional[int]: """Sample a bet, mark it as processed, and return its index.""" From f5732a1d9ab8e35084d51288b0f4e3032c901584 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 00:43:12 +0530 Subject: [PATCH 29/98] update: change transaction variable to previous --- packages/valory/skills/decision_maker_abci/behaviours/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index 9e3bb49e..832462d7 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -357,7 +357,7 @@ def update_bet_transaction_information(self) -> None: # Update the bet's invested amount, the new bet amount is added to previously invested amount sampled_bet.invested_amount += self.synchronized_data.bet_amount # Update bet transaction timestamp - sampled_bet.transaction_processed_timestamp = self.synced_timestamp + sampled_bet.processed_timestamp = self.synced_timestamp self.store_bets() def send_message( From bbded758ecca542e88f8411cfd416654b536f037 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 00:44:37 +0530 Subject: [PATCH 30/98] remove: transaction timestamp updation --- .../behaviours/decision_receive.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py index bd427331..94951e19 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py @@ -316,9 +316,9 @@ def _update_market_liquidity(self) -> None: self.shared_state.current_liquidity_prices = ( active_sampled_bet.outcomeTokenMarginalPrices ) - self.shared_state.liquidity_cache[ - question_id - ] = active_sampled_bet.scaledLiquidityMeasure + self.shared_state.liquidity_cache[question_id] = ( + active_sampled_bet.scaledLiquidityMeasure + ) def _calculate_new_liquidity(self, net_bet_amount: int, vote: int) -> LiquidityInfo: """Calculate and return the new liquidity information.""" @@ -385,11 +385,11 @@ def _update_liquidity_info(self, net_bet_amount: int, vote: int) -> LiquidityInf self.context.logger.info(log_message) # update the scaled liquidity Measure - self.shared_state.liquidity_cache[ - market_id - ] = self._compute_scaled_liquidity_measure( - self.shared_state.current_liquidity_amounts, - self.shared_state.current_liquidity_prices, + self.shared_state.liquidity_cache[market_id] = ( + self._compute_scaled_liquidity_measure( + self.shared_state.current_liquidity_amounts, + self.shared_state.current_liquidity_prices, + ) ) return liquidity_info @@ -526,7 +526,6 @@ def _update_selected_bet( # update the bet's timestamp of processing and its number of bets for the given sampled_bet = self.sampled_bet sampled_bet.n_bets += 1 - sampled_bet.processed_timestamp = self.synced_timestamp self.store_bets() From 14283a0cdd14448ca31e2744d56f6fc1c6d9afd0 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 00:45:35 +0530 Subject: [PATCH 31/98] edit: configure txn processed time variable --- packages/valory/skills/market_manager_abci/behaviours.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 04204427..5a1b8edf 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -152,7 +152,7 @@ def _set_current_queue_number(self) -> None: # check if all bets that have queue no not -1 # have not been processed all_bets_not_processed = all( - bet.transaction_processed_timestamp == 0 + bet.processed_timestamp == 0 for bet in self.bets if bet.queue_no != -1 ) From b9429638c012a9a0fc048dee1843678af859d690 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 00:46:05 +0530 Subject: [PATCH 32/98] revert: additon of txn timestamp attribute --- packages/valory/skills/market_manager_abci/bets.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index f8340bd9..f7f873e1 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -99,7 +99,6 @@ class Bet: position_liquidity: int = 0 potential_net_profit: int = 0 processed_timestamp: int = 0 - transaction_processed_timestamp: int = 0 n_bets: int = 0 queue_no: int = 0 From f5b6cfeb1290aaf602f0767639e4a240c8993005 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 00:49:59 +0530 Subject: [PATCH 33/98] revert: queue organisation process --- packages/valory/skills/market_manager_abci/behaviours.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 5a1b8edf..9eadcbac 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -59,7 +59,6 @@ def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) self.bets: List[Bet] = [] self.current_queue_number: int = 0 - self.queue_organisation_required: bool = False self.bets_filepath: str = self.params.store_path / BETS_FILENAME def store_bets(self) -> None: @@ -95,7 +94,6 @@ def read_bets(self) -> None: with open(self.bets_filepath, READ_MODE) as bets_file: try: self.bets = json.load(bets_file, cls=BetsDecoder) - self.queue_organisation_required = True return except (JSONDecodeError, TypeError): err = ( From 6e03c80a0f7410b6f8155129840132aec914393c Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 11:32:18 +0530 Subject: [PATCH 34/98] add: other max queue number possibilities --- packages/valory/skills/market_manager_abci/behaviours.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 9eadcbac..8f8f2715 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -162,6 +162,12 @@ def _set_current_queue_number(self) -> None: # then if any new bets are being added they should be added to queue 1 # Because 10 new bets are added every new epoch self.current_queue_number = 1 + elif self.max_queue_number == 1: + # If the max queue number is 1 then bets will be added to this queue only + self.current_queue_number = 1 + else: + # max queue number is -1, i.e. all bets are blacklisted + self.current_queue_number = 0 def _update_bets( self, From c2999c97c8dabd623f71979150d8a62ebd983c10 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 11:37:39 +0530 Subject: [PATCH 35/98] add: edge case for non processed bets --- .../decision_maker_abci/behaviours/sampling.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index c5ad2239..87bc78e3 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -147,9 +147,19 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: return self.bets.index(bets[0]) else: # Check if all bets have processed_timestamp == 0 - all_bets_not_processed = all(bet.processed_timestamp == 0 for bet in bets) + all_bets_not_processed = all( + bet.processed_timestamp == 0 for bet in bets if bet.queue_no != -1 + ) if all_bets_not_processed: + # if none of the bets have been processed, then we should set the current_queue_number to 0 + # for all none blacklisted bets + for bet in self.bets: + if bet.queue_no != -1: + bet.queue_no = 0 + + self.store_bets() + # Current processable list of bets have not been processed yet # Order the list in Decreasing order of liquidity bets.sort( From bc15710679f87ddb0f3a78eee3aef06bef929fc7 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 12:04:49 +0530 Subject: [PATCH 36/98] update: package hashes --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 10 +++++----- .../valory/skills/market_manager_abci/skill.yaml | 4 ++-- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 225b6344..8c5383f5 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeicx3vjswhjzgfa2ddl7zxqzncuqbvej3m2unseje5lsajdhio7mji", - "skill/valory/trader_abci/0.1.0": "bafybeiapf3qng7wczem3t7s5cysdlhzc3xign4sqkhyopro3p7x33hdugu", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeic7wcls7yvvnpqrl7vfrab3dt37vyoytu2hef7emmc5556puqjpri", + "skill/valory/market_manager_abci/0.1.0": "bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa", + "skill/valory/decision_maker_abci/0.1.0": "bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq", + "skill/valory/trader_abci/0.1.0": "bafybeic5wlvtmtbfrordhsnvi3p3u56hbznvjfxcatksmi4xasb4ptb764", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeieonerjearqrgjn23xex2b2uoncl2aq7xvbgmwxqwajq4n75hnzoy", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini", - "agent/valory/trader/0.1.0": "bafybeieoklf7wjrnupyv4egny5hfn6mbxtrjwwtrqyznjoxodiy72cj3na", - "service/valory/trader/0.1.0": "bafybeidzaf6gytftigur646mo4fw2p5urq4cpvbf5t2gbw3fz5v6sseppq", - "service/valory/trader_pearl/0.1.0": "bafybeieqyhrucksqrxxhy2ad4blgsjd3iwhg4m6q3lgm2wlj2wlhz52xjq" + "agent/valory/trader/0.1.0": "bafybeie64g44oxbsfz5vcsqsclmzm6j5rdpuys7ifrzqtqmbcg7cozul3i", + "service/valory/trader/0.1.0": "bafybeihm37zn3iosfjcfalxlcrce72d5g6irbljvjel2r7q46vfrj73vti", + "service/valory/trader_pearl/0.1.0": "bafybeidz6qi6vrkcvyplxlhawei47anbaumcih47krcrfdkjlo26m7w7ca" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 97ed8ecb..ce0133f3 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeic7wcls7yvvnpqrl7vfrab3dt37vyoytu2hef7emmc5556puqjpri -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicx3vjswhjzgfa2ddl7zxqzncuqbvej3m2unseje5lsajdhio7mji -- valory/trader_abci:0.1.0:bafybeiapf3qng7wczem3t7s5cysdlhzc3xign4sqkhyopro3p7x33hdugu +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieonerjearqrgjn23xex2b2uoncl2aq7xvbgmwxqwajq4n75hnzoy +- valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa +- valory/decision_maker_abci:0.1.0:bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq +- valory/trader_abci:0.1.0:bafybeic5wlvtmtbfrordhsnvi3p3u56hbznvjfxcatksmi4xasb4ptb764 - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 883a9506..6c781c02 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeieoklf7wjrnupyv4egny5hfn6mbxtrjwwtrqyznjoxodiy72cj3na +agent: valory/trader:0.1.0:bafybeie64g44oxbsfz5vcsqsclmzm6j5rdpuys7ifrzqtqmbcg7cozul3i number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index de5cc215..1cd40135 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeieoklf7wjrnupyv4egny5hfn6mbxtrjwwtrqyznjoxodiy72cj3na +agent: valory/trader:0.1.0:bafybeie64g44oxbsfz5vcsqsclmzm6j5rdpuys7ifrzqtqmbcg7cozul3i number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index d9aff705..56c858fb 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -12,19 +12,19 @@ fingerprint: README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky - behaviours/base.py: bafybeifjgxzhwzxiky3okgtv4ojumm7fj7bom6qe3ysdvs3cpu32w446g4 + behaviours/base.py: bafybeibzasclhztbfm2vsfjwm62ado4ggidj6hyrr6y2uje2vexbxisn2i behaviours/bet_placement.py: bafybeihmia64t2payxfqcnfdqg675ui2yp3hnyfwb2xhj2hn7wl237b4re behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e - behaviours/decision_receive.py: bafybeiga2eddrkbwnqcvzonbens4kj3i3fvfkdngoml5neoob23jgxtcpy + behaviours/decision_receive.py: bafybeib3eeo7gisu4iy6mfvnsswpipp27dlop3ssablu5zy3phj4yfekmy behaviours/decision_request.py: bafybeia22omb7tvocyfe3z2ucn5au5mcas7dg37ha42u7znefzrewjpk7y behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeicrmdvhci5prfldvuf3bclbbqi6j7lpv6hmphw3qwgmkmwat3od44 behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce - behaviours/reedem.py: bafybeibb2idce6r7gkyp5hpdc35frzcqcmnmbdhzxbdv2usdavrb7kjyba + behaviours/reedem.py: bafybeia4tma526hkxnf7yww3lrkzkfkon7gutbvxzwfueek5rivq3lekf4 behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeidrcyeecrh2wzw3n56iwyon56rommc7nyjnlcdzhldpvoh25sfeoe + behaviours/sampling.py: bafybeihccnciathffc4fvvnnrbibeckw6mbs25h3ydfuoceim25zgvpzzq behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeieywounbmfkgzgskuv7hjdu4pybtdmekiroolvsnjnfkke3mnhfqy +- valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 48702abd..299b2803 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -8,8 +8,8 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e - behaviours.py: bafybeihj5zfo7dlhz2sv7izjeabd7pmdv73anriufhbaq7jtftng6ftaie - bets.py: bafybeibdgxrtokg2cpmvnsljbvyhrgmj3o7fo452r3v2xzira7xm45bc44 + behaviours.py: bafybeidytq2hfqvmlp7uddtfuf6y622guj6vjifipask5lmurrwbzugd24 + bets.py: bafybeihnf4te7wwf72favpdumlvodecr3vmad6t32h47oilh5f26rvmrpm dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 20f14a29..ec84652e 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicx3vjswhjzgfa2ddl7zxqzncuqbvej3m2unseje5lsajdhio7mji -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeic7wcls7yvvnpqrl7vfrab3dt37vyoytu2hef7emmc5556puqjpri +- valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa +- valory/decision_maker_abci:0.1.0:bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieonerjearqrgjn23xex2b2uoncl2aq7xvbgmwxqwajq4n75hnzoy - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index dbe1730b..f63954ac 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeicx3vjswhjzgfa2ddl7zxqzncuqbvej3m2unseje5lsajdhio7mji +- valory/decision_maker_abci:0.1.0:bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 51ddcc1ab07afc2d2c85b807c60a2568e8a1b257 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 12:06:34 +0530 Subject: [PATCH 37/98] update: tox changes --- .../behaviours/decision_receive.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py index 94951e19..437f2fe1 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py @@ -316,9 +316,9 @@ def _update_market_liquidity(self) -> None: self.shared_state.current_liquidity_prices = ( active_sampled_bet.outcomeTokenMarginalPrices ) - self.shared_state.liquidity_cache[question_id] = ( - active_sampled_bet.scaledLiquidityMeasure - ) + self.shared_state.liquidity_cache[ + question_id + ] = active_sampled_bet.scaledLiquidityMeasure def _calculate_new_liquidity(self, net_bet_amount: int, vote: int) -> LiquidityInfo: """Calculate and return the new liquidity information.""" @@ -385,11 +385,11 @@ def _update_liquidity_info(self, net_bet_amount: int, vote: int) -> LiquidityInf self.context.logger.info(log_message) # update the scaled liquidity Measure - self.shared_state.liquidity_cache[market_id] = ( - self._compute_scaled_liquidity_measure( - self.shared_state.current_liquidity_amounts, - self.shared_state.current_liquidity_prices, - ) + self.shared_state.liquidity_cache[ + market_id + ] = self._compute_scaled_liquidity_measure( + self.shared_state.current_liquidity_amounts, + self.shared_state.current_liquidity_prices, ) return liquidity_info From 22fb5e6d70816a0ff7d275857b3ae4e8cffa6588 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 12:07:07 +0530 Subject: [PATCH 38/98] update: packahe hases post tox changes --- packages/packages.json | 12 ++++++------ packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 8c5383f5..e38a8a19 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", "skill/valory/market_manager_abci/0.1.0": "bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq", - "skill/valory/trader_abci/0.1.0": "bafybeic5wlvtmtbfrordhsnvi3p3u56hbznvjfxcatksmi4xasb4ptb764", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeieonerjearqrgjn23xex2b2uoncl2aq7xvbgmwxqwajq4n75hnzoy", + "skill/valory/decision_maker_abci/0.1.0": "bafybeibgysbpd72d3bgeea4mskmbrvgxm3scb7pu2vmflyijfl5gpebtkm", + "skill/valory/trader_abci/0.1.0": "bafybeigs332pdlqupzth35qfhd6xdu7huk7n4454gecz3xfzobpfvpayri", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeif4ahb62gt3zxswco5q72tlwn34hcwrbs4jvj6fhxp6q62yatoeme", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini", - "agent/valory/trader/0.1.0": "bafybeie64g44oxbsfz5vcsqsclmzm6j5rdpuys7ifrzqtqmbcg7cozul3i", - "service/valory/trader/0.1.0": "bafybeihm37zn3iosfjcfalxlcrce72d5g6irbljvjel2r7q46vfrj73vti", - "service/valory/trader_pearl/0.1.0": "bafybeidz6qi6vrkcvyplxlhawei47anbaumcih47krcrfdkjlo26m7w7ca" + "agent/valory/trader/0.1.0": "bafybeiayei3jfzuypqi4cv2hlp3wlsd5kfzxrggppbpn6hsims33wymy5e", + "service/valory/trader/0.1.0": "bafybeifp4p2362jw273ondzs4gtfb43cm7faulurruwa4ojpj6375phuaq", + "service/valory/trader_pearl/0.1.0": "bafybeifi3ywsmilz4eskppkn36eotofhceufp2owzueefjlxupmocsmmcu" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index ce0133f3..cc3eec2b 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieonerjearqrgjn23xex2b2uoncl2aq7xvbgmwxqwajq4n75hnzoy +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif4ahb62gt3zxswco5q72tlwn34hcwrbs4jvj6fhxp6q62yatoeme - valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa -- valory/decision_maker_abci:0.1.0:bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq -- valory/trader_abci:0.1.0:bafybeic5wlvtmtbfrordhsnvi3p3u56hbznvjfxcatksmi4xasb4ptb764 +- valory/decision_maker_abci:0.1.0:bafybeibgysbpd72d3bgeea4mskmbrvgxm3scb7pu2vmflyijfl5gpebtkm +- valory/trader_abci:0.1.0:bafybeigs332pdlqupzth35qfhd6xdu7huk7n4454gecz3xfzobpfvpayri - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 6c781c02..e345ba74 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeie64g44oxbsfz5vcsqsclmzm6j5rdpuys7ifrzqtqmbcg7cozul3i +agent: valory/trader:0.1.0:bafybeiayei3jfzuypqi4cv2hlp3wlsd5kfzxrggppbpn6hsims33wymy5e number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 1cd40135..89f872ed 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeie64g44oxbsfz5vcsqsclmzm6j5rdpuys7ifrzqtqmbcg7cozul3i +agent: valory/trader:0.1.0:bafybeiayei3jfzuypqi4cv2hlp3wlsd5kfzxrggppbpn6hsims33wymy5e number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 56c858fb..39182234 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -17,7 +17,7 @@ fingerprint: behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e - behaviours/decision_receive.py: bafybeib3eeo7gisu4iy6mfvnsswpipp27dlop3ssablu5zy3phj4yfekmy + behaviours/decision_receive.py: bafybeiawhofnyxoyofjqn7pbwkqne7aqa2qvsxzbiukh4fg5e24iyug3gq behaviours/decision_request.py: bafybeia22omb7tvocyfe3z2ucn5au5mcas7dg37ha42u7znefzrewjpk7y behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeicrmdvhci5prfldvuf3bclbbqi6j7lpv6hmphw3qwgmkmwat3od44 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index ec84652e..c44eaaac 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,8 +27,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa -- valory/decision_maker_abci:0.1.0:bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeieonerjearqrgjn23xex2b2uoncl2aq7xvbgmwxqwajq4n75hnzoy +- valory/decision_maker_abci:0.1.0:bafybeibgysbpd72d3bgeea4mskmbrvgxm3scb7pu2vmflyijfl5gpebtkm +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif4ahb62gt3zxswco5q72tlwn34hcwrbs4jvj6fhxp6q62yatoeme - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index f63954ac..ab2b8707 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeicli2jhypee3ksk33gnj3hyosz5nzhn74pagrlbdkyus7ghzvg3bq +- valory/decision_maker_abci:0.1.0:bafybeibgysbpd72d3bgeea4mskmbrvgxm3scb7pu2vmflyijfl5gpebtkm - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 0285b22e38810a329fb7ac2b547105a210b976ed Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 29 Nov 2024 18:10:35 +0530 Subject: [PATCH 39/98] update: hases post main sync --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 4 ++-- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 0c86d5c7..d8220e56 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeigef5xufpkcrwxpekw35zqtxcsliudhagg3bybcnfpgb3hcucwaxm", - "skill/valory/trader_abci/0.1.0": "bafybeihdwrcx5c4k57g64jm47cmuug5igynm5tn6ic4k6usx4g2v2uqf5e", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicex6xclnh3tduca2wydokodintbtfxx735fnuckmvtsns6xuyixy", + "skill/valory/market_manager_abci/0.1.0": "bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa", + "skill/valory/decision_maker_abci/0.1.0": "bafybeic7axlhcnuoctw4lndr6g6sphgmtu7hov56la4vasmwtyltkhushu", + "skill/valory/trader_abci/0.1.0": "bafybeihjxj5j2bxy2uc3p475hnu3xu6jjsr4lamrs7jcno3rl3wdjz3x2u", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeigjxo6hknr3iby66olwd5u6p7sgue3eh2yyxyfa6idoajixzugi74", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini", - "agent/valory/trader/0.1.0": "bafybeiandy3tuazyv5rzqzku3aic2ye7nuhily2gnch27omjfmo4rq5o4i", - "service/valory/trader/0.1.0": "bafybeidv5ovi6avyzz5vemgk6d3vz4d6n7pq276qgtuq3dyfry3hzzn32i", - "service/valory/trader_pearl/0.1.0": "bafybeigee5p7yryn6kfcozmymf7vvjraaz3htq44pbmhc5pdsswa7yay64" + "agent/valory/trader/0.1.0": "bafybeihze7azyuj5wdvhiil55zeoyoiah34vygnmya5v22qn2frl6vwuoy", + "service/valory/trader/0.1.0": "bafybeid74fwejwhgixvmga76pr2tiwrrdeeh3yavwp576nesuvu4phzlvu", + "service/valory/trader_pearl/0.1.0": "bafybeicgxmlsag5khcnfg4sdpydxlqqocmhextf6ydm4syw2jurxby7ye4" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index a71ef219..e5e2d86a 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicex6xclnh3tduca2wydokodintbtfxx735fnuckmvtsns6xuyixy -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeigef5xufpkcrwxpekw35zqtxcsliudhagg3bybcnfpgb3hcucwaxm -- valory/trader_abci:0.1.0:bafybeihdwrcx5c4k57g64jm47cmuug5igynm5tn6ic4k6usx4g2v2uqf5e +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigjxo6hknr3iby66olwd5u6p7sgue3eh2yyxyfa6idoajixzugi74 +- valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa +- valory/decision_maker_abci:0.1.0:bafybeic7axlhcnuoctw4lndr6g6sphgmtu7hov56la4vasmwtyltkhushu +- valory/trader_abci:0.1.0:bafybeihjxj5j2bxy2uc3p475hnu3xu6jjsr4lamrs7jcno3rl3wdjz3x2u - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 4de2e8e4..0583b0f4 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeiandy3tuazyv5rzqzku3aic2ye7nuhily2gnch27omjfmo4rq5o4i +agent: valory/trader:0.1.0:bafybeihze7azyuj5wdvhiil55zeoyoiah34vygnmya5v22qn2frl6vwuoy number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 093ca3e0..dfbb71c3 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeiandy3tuazyv5rzqzku3aic2ye7nuhily2gnch27omjfmo4rq5o4i +agent: valory/trader:0.1.0:bafybeihze7azyuj5wdvhiil55zeoyoiah34vygnmya5v22qn2frl6vwuoy number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index e1d429cd..6920d517 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -17,14 +17,14 @@ fingerprint: behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e - behaviours/decision_receive.py: bafybeiempl2rdkxxkup7ibtvdx5kleeucfij2upglzwqlgqysifwxareom + behaviours/decision_receive.py: bafybeigdapivimfq4wwwypjti3z323ur5wo3vlyljsdeiy5vjlto2rniqu behaviours/decision_request.py: bafybeia22omb7tvocyfe3z2ucn5au5mcas7dg37ha42u7znefzrewjpk7y behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeicrmdvhci5prfldvuf3bclbbqi6j7lpv6hmphw3qwgmkmwat3od44 behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeia4tma526hkxnf7yww3lrkzkfkon7gutbvxzwfueek5rivq3lekf4 behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeicimvm5ii26cjbmonznk5qi7jwyq7wbgkhbecfa44yi4rkfjnpdum + behaviours/sampling.py: bafybeibwm7rxpaaroqrf2ts4ntvoovjqdz2j3xftnduesgqemy2g4zrnta behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index bb4acb16..98e8dd73 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeigef5xufpkcrwxpekw35zqtxcsliudhagg3bybcnfpgb3hcucwaxm -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicex6xclnh3tduca2wydokodintbtfxx735fnuckmvtsns6xuyixy +- valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa +- valory/decision_maker_abci:0.1.0:bafybeic7axlhcnuoctw4lndr6g6sphgmtu7hov56la4vasmwtyltkhushu +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigjxo6hknr3iby66olwd5u6p7sgue3eh2yyxyfa6idoajixzugi74 - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeifmi64g4ki6zwbcncb35ovhd4sllw4xrszrkturpeqdhgf5bkiini - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index e62dd609..2cac46f1 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeigef5xufpkcrwxpekw35zqtxcsliudhagg3bybcnfpgb3hcucwaxm +- valory/decision_maker_abci:0.1.0:bafybeic7axlhcnuoctw4lndr6g6sphgmtu7hov56la4vasmwtyltkhushu - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 09ab75d302e6a6f3d9e0274eaaf9d741523f59fe Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sat, 30 Nov 2024 13:20:36 +0530 Subject: [PATCH 40/98] refactor: optimise and streamline act of sampling - Removed stre bets call in _sample method - seprateed day inc simulation in act method --- .../behaviours/sampling.py | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index e6f949f7..13c21be5 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -21,7 +21,7 @@ import random from datetime import datetime -from typing import Any, Generator, List, Optional +from typing import Any, Generator, List, Optional, Tuple from packages.valory.skills.decision_maker_abci.behaviours.base import ( DecisionMakerBaseBehaviour, @@ -158,8 +158,6 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: if bet.queue_no != -1: bet.queue_no = 0 - self.store_bets() - # Current processable list of bets have not been processed yet # Order the list in Decreasing order of liquidity bets.sort( @@ -214,28 +212,38 @@ def _sample(self) -> Optional[int]: self.context.logger.info(msg) return idx + def _benchmarking_inc_day(self) -> Tuple[bool, bool]: + """Increase the simulated day in benchmarking mode.""" + self.context.logger.info( + "No more markets to bet in the simulated day. Increasing simulated day." + ) + self.shared_state.increase_one_day_simulation() + benchmarking_finished = self.shared_state.check_benchmarking_finished() + if benchmarking_finished: + self.context.logger.info("No more days to simulate in benchmarking mode.") + + day_increased = True + + return benchmarking_finished, day_increased + def async_act(self) -> Generator: """Do the action.""" with self.context.benchmark_tool.measure(self.behaviour_id).local(): idx = self._sample() benchmarking_finished = None day_increased = None + + # day increase simulation and benchmarking finished check if idx is None and self.benchmarking_mode.enabled: - self.context.logger.info( - "No more markets to bet in the simulated day. Increasing simulated day." - ) - self.shared_state.increase_one_day_simulation() - benchmarking_finished = self.shared_state.check_benchmarking_finished() - if benchmarking_finished: - self.context.logger.info( - "No more days to simulate in benchmarking mode." - ) - day_increased = True + benchmarking_finished, day_increased = self._benchmarking_inc_day() + self.store_bets() + if idx is None: bets_hash = None else: bets_hash = self.hash_stored_bets() + payload = SamplingPayload( self.context.agent_address, bets_hash, From b1b7ef68c72116150673769350e2c8477a0eae56 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sat, 30 Nov 2024 13:46:36 +0530 Subject: [PATCH 41/98] edit: sampled bet updation process - bet processed timestamp and n_bets is aonly updated if we are benchamrking mode, as during benchmarking mode we don't go into transaction settlement round. - remove bet update process for production trader, as it is happening in redeem round --- .../behaviours/decision_receive.py | 49 +++++++++---------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py index 50c11a73..1d142cc0 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py @@ -316,9 +316,9 @@ def _update_market_liquidity(self) -> None: self.shared_state.current_liquidity_prices = ( active_sampled_bet.outcomeTokenMarginalPrices ) - self.shared_state.liquidity_cache[ - question_id - ] = active_sampled_bet.scaledLiquidityMeasure + self.shared_state.liquidity_cache[question_id] = ( + active_sampled_bet.scaledLiquidityMeasure + ) def _calculate_new_liquidity(self, net_bet_amount: int, vote: int) -> LiquidityInfo: """Calculate and return the new liquidity information.""" @@ -385,11 +385,11 @@ def _update_liquidity_info(self, net_bet_amount: int, vote: int) -> LiquidityInf self.context.logger.info(log_message) # update the scaled liquidity Measure - self.shared_state.liquidity_cache[ - market_id - ] = self._compute_scaled_liquidity_measure( - self.shared_state.current_liquidity_amounts, - self.shared_state.current_liquidity_prices, + self.shared_state.liquidity_cache[market_id] = ( + self._compute_scaled_liquidity_measure( + self.shared_state.current_liquidity_amounts, + self.shared_state.current_liquidity_prices, + ) ) return liquidity_info @@ -508,24 +508,18 @@ def _update_selected_bet( ) -> None: """Update the selected bet.""" # update the bet's timestamp of processing and its number of bets for the given id - if self.benchmarking_mode.enabled: - active_sampled_bet = self.get_active_sampled_bet() - active_sampled_bet.processed_timestamp = ( - self.shared_state.get_simulated_now_timestamp( - self.bets, self.params.safe_voting_range - ) - ) - self.context.logger.info(f"Updating bet id: {active_sampled_bet.id}") - self.context.logger.info( - f"with the timestamp:{datetime.fromtimestamp(active_sampled_bet.processed_timestamp)}" + active_sampled_bet = self.get_active_sampled_bet() + active_sampled_bet.processed_timestamp = ( + self.shared_state.get_simulated_now_timestamp( + self.bets, self.params.safe_voting_range ) - if prediction_response is not None: - active_sampled_bet.n_bets += 1 - - else: - # update the bet's timestamp of processing and its number of bets for the given - sampled_bet = self.sampled_bet - sampled_bet.n_bets += 1 + ) + self.context.logger.info(f"Updating bet id: {active_sampled_bet.id}") + self.context.logger.info( + f"with the timestamp:{datetime.fromtimestamp(active_sampled_bet.processed_timestamp)}" + ) + if prediction_response is not None: + active_sampled_bet.n_bets += 1 self.store_bets() @@ -538,6 +532,7 @@ def async_act(self) -> Generator: bet_amount = None next_mock_data_row = None bets_hash = None + if prediction_response is not None and prediction_response.vote is not None: is_profitable, bet_amount = yield from self._is_profitable( prediction_response @@ -555,6 +550,7 @@ def async_act(self) -> Generator: prediction_response, bet_amount, ) + # always remove the processed trade from the benchmarking input file # now there is one reader pointer per market if self.benchmarking_mode.enabled: @@ -565,7 +561,8 @@ def async_act(self) -> Generator: if rows_queue: rows_queue.pop(0) - self._update_selected_bet(prediction_response) + self._update_selected_bet(prediction_response) + payload = DecisionReceivePayload( self.context.agent_address, bets_hash, From 9c64adda4dc0039a1bd090f80aba80de753fdfcb Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sat, 30 Nov 2024 13:49:27 +0530 Subject: [PATCH 42/98] add: n_bets increment for sampled bet --- packages/valory/skills/decision_maker_abci/behaviours/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index 832462d7..c0dd3986 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -358,6 +358,8 @@ def update_bet_transaction_information(self) -> None: sampled_bet.invested_amount += self.synchronized_data.bet_amount # Update bet transaction timestamp sampled_bet.processed_timestamp = self.synced_timestamp + # update no of bets made + sampled_bet.n_bets += 1 self.store_bets() def send_message( From 70e146d3d05b774f04053fcb1be51d53ebad0a93 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sat, 30 Nov 2024 14:12:45 +0530 Subject: [PATCH 43/98] fix: update bet txn info call placement - 'update_bet_transaction_information' will now be only called if we are not in benchmarking mode - The reason being bet info are updated in decision receive round for benchmarking mode --- .../decision_maker_abci/behaviours/reedem.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index cb93b9ea..5c35f84f 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -969,17 +969,20 @@ def async_act(self) -> Generator: if not success: return None - # Checking if the last round that submitted the transaction was the bet placement round - # If so, we need to update the bet transaction information, because the transaction was successful - # tx settlement multiplexer assures transitions from Post transaction to Redeem round - # only if the transaction was successful - if self.synchronized_data.tx_submitter == BetPlacementRound.auto_round_id(): - self.update_bet_transaction_information() - payload: Optional[RedeemPayload] if self.benchmarking_mode.enabled: payload = self._benchmarking_act() else: + # Checking if the last round that submitted the transaction was the bet placement round + # If so, we need to update the bet transaction information, because the transaction was successful + # tx settlement multiplexer assures transitions from Post transaction to Redeem round + # only if the transaction was successful + if ( + self.synchronized_data.tx_submitter + == BetPlacementRound.auto_round_id() + ): + self.update_bet_transaction_information() + payload = yield from self._normal_act() if payload is None: return From ea96f2cc27afdaef77ceac580533b436ba898f93 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 07:02:11 +0530 Subject: [PATCH 44/98] update: blacklisting behaviour logic - Instead of reducing of number of bets by 1, we mark the bet with a queue no -2. - This signifies that this bet is either unprofitable or has tie during decision making. - This prevents trader from sampling these type of bets - if there is any update in these bets during update bets round they will be given queue 0 again --- .../skills/decision_maker_abci/behaviours/blacklisting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py index ae50fcab..a004ec62 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py @@ -47,7 +47,7 @@ def _blacklist(self) -> None: sampled_bet = self.bets[sampled_bet_index] # the question is blacklisted, i.e., we did not place a bet on it, # therefore, we decrease the number of bets which was increased on sampling - sampled_bet.n_bets -= 1 + sampled_bet.queue_no = -2 def setup(self) -> None: """Setup the behaviour""" From f70e8848b78d39999398f95cb963d771c45ec7b7 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 07:22:43 +0530 Subject: [PATCH 45/98] update: bet filtering process for sampling - Only those bets that have queue no greater or equal to 0 will be picked - this prevents the sampling round from picking unprofitable or permanently blacklisted bets - improved code readability with comments --- .../decision_maker_abci/behaviours/sampling.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 13c21be5..2a886420 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -147,9 +147,7 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: return self.bets.index(bets[0]) else: # Check if all bets have processed_timestamp == 0 - all_bets_not_processed = all( - bet.processed_timestamp == 0 for bet in bets if bet.queue_no != -1 - ) + all_bets_not_processed = all(bet.processed_timestamp == 0 for bet in bets) if all_bets_not_processed: # if none of the bets have been processed, then we should set the current_queue_number to 0 @@ -191,16 +189,24 @@ def _sample(self) -> Optional[int]: self.context.logger.info(f"Simulating date: {datetime.fromtimestamp(now)}") else: now = self.synced_timestamp + + # filter out only the bets that are processable and have a queue_no >= 0 available_bets = list( - filter(lambda bet: self.processable_bet(bet, now=now), self.bets) + filter( + lambda bet: self.processable_bet(bet, now=now) and bet.queue_no >= 0, + self.bets, + ) ) if len(available_bets) == 0: msg = "There were no unprocessed bets available to sample from!" self.context.logger.warning(msg) return None + # sample a bet using the priority logic idx = self._sampled_bet_idx(available_bets) sampled_bet = self.bets[idx] + + # fetch the liquidity of the sampled bet and cache it liquidity = sampled_bet.scaledLiquidityMeasure if liquidity == 0: msg = "There were no unprocessed bets with non-zero liquidity!" From 3dec7872398b23f3d964e2daaa5300d25719571d Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 08:00:19 +0530 Subject: [PATCH 46/98] add: queue no processing during update bets - If token amounts, price and liquidity measure has changed for an old bet during updating bets, then if the queue no is -2 which signifies that the bet was unprofitable last time should be reconsidered in betting pool --- packages/valory/skills/market_manager_abci/bets.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index f7f873e1..7180e08b 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -208,6 +208,11 @@ def update_market_info(self, bet: "Bet") -> None: ): # do not update the bet if it has been blacklisted forever return + + # update bet queue number if it was unprofitable or tied during decison + if self.queue_no == -2: + self.queue_no = 0 + self.outcomeTokenAmounts = bet.outcomeTokenAmounts.copy() self.outcomeTokenMarginalPrices = bet.outcomeTokenMarginalPrices.copy() self.scaledLiquidityMeasure = bet.scaledLiquidityMeasure From b371f2e8ea203707a65db797e2e7c2e55b123b45 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 08:03:03 +0530 Subject: [PATCH 47/98] edit: simplify sorting logic - Now only a single sorting method is used to sort any list of bets. - As when invested amount and processed timestamp is 0 then sorting on the basis of liquidity measure and openingtimestamp is similar to using the whole priority logic, as the the top sorting variables will always be 0 --- .../behaviours/sampling.py | 68 +++++++++---------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 2a886420..dfef273c 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -101,6 +101,24 @@ def processable_bet(self, bet: Bet, now: int) -> bool: can_rebet = now >= bet.processed_timestamp + t_rebetting return within_ranges and can_rebet + def _sort_by_priority_logic(self, bets: List[Bet]) -> List[Bet]: + """ + Sort bets based on the priority logic. + + :param bets: the bets to sort. + :return: the sorted list of bets. + """ + return sorted( + bets, + key=lambda bet: ( + bet.invested_amount, + -bet.processed_timestamp, # Increasing order of processed_timestamp + bet.scaledLiquidityMeasure, + bet.openingTimestamp, + ), + reverse=True, + ) + def _sampled_bet_idx(self, bets: List[Bet]) -> int: """ Sample a bet and return its index. @@ -128,53 +146,29 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: if new_in_priority_bets: # Order the list in Decreasing order of liquidity - new_in_priority_bets.sort( - key=lambda bet: (bet.scaledLiquidityMeasure, bet.openingTimestamp), - reverse=True, - ) - return self.bets.index(new_in_priority_bets[0]) + sorted_bets = self._sort_by_priority_logic(new_in_priority_bets) + return self.bets.index(sorted_bets[0]) else: # All bets have been processed once, bets can be sampled based on the priority logic - bets.sort( - key=lambda bet: ( - bet.invested_amount, - -bet.processed_timestamp, # Increasing order of processed_timestamp - bet.scaledLiquidityMeasure, - bet.openingTimestamp, - ), - reverse=True, - ) - return self.bets.index(bets[0]) + sorted_bets = self._sort_by_priority_logic(bets) + return self.bets.index(sorted_bets[0]) else: # Check if all bets have processed_timestamp == 0 - all_bets_not_processed = all(bet.processed_timestamp == 0 for bet in bets) + all_bets_not_processed = all( + bet.processed_timestamp == 0 and bet.invested_amount == 0 + for bet in bets + ) if all_bets_not_processed: # if none of the bets have been processed, then we should set the current_queue_number to 0 # for all none blacklisted bets - for bet in self.bets: - if bet.queue_no != -1: + for bet in bets: + if bet.queue_no > 0: bet.queue_no = 0 - # Current processable list of bets have not been processed yet - # Order the list in Decreasing order of liquidity - bets.sort( - key=lambda bet: (bet.scaledLiquidityMeasure, bet.openingTimestamp), - reverse=True, - ) - return self.bets.index(bets[0]) - else: - # Bets available for rebetting and can be prioritized based on the priority logic - bets.sort( - key=lambda bet: ( - bet.invested_amount, - -bet.processed_timestamp, # Increasing order of processed_timestamp - bet.scaledLiquidityMeasure, - bet.openingTimestamp, - ), - reverse=True, - ) - return self.bets.index(bets[0]) + # Bets available for rebetting and can be prioritized based on the priority logic + sorted_bets = self._sort_by_priority_logic(bets) + return self.bets.index(sorted_bets[0]) def _sample(self) -> Optional[int]: """Sample a bet, mark it as processed, and return its index.""" From 7a7ce6c57322ab219c2bb4533f4200d036522cee Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 08:10:58 +0530 Subject: [PATCH 48/98] remove: older method of sampling using randomness - Older method used to create processable bets based on the factor of randomness in some periods rebetting was performed while in some it wasn't. - setup function is now empty --- .../behaviours/sampling.py | 27 +------------------ 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index dfef273c..45cdaec0 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -48,16 +48,7 @@ def __init__(self, **kwargs: Any) -> None: def setup(self) -> None: """Setup the behaviour.""" - self.read_bets() - has_bet_in_the_past = any(bet.n_bets > 0 for bet in self.bets) - if has_bet_in_the_past: - if self.benchmarking_mode.enabled: - random.seed(self.benchmarking_mode.randomness) - else: - random.seed(self.synchronized_data.most_voted_randomness) - self.should_rebet = random.random() <= self.params.rebet_chance # nosec - rebetting_status = "enabled" if self.should_rebet else "disabled" - self.context.logger.info(f"Rebetting {rebetting_status}.") + pass def has_liquidity_changed(self, bet: Bet) -> bool: """Whether the liquidity of a specific market has changed since it was last selected.""" @@ -79,22 +70,6 @@ def processable_bet(self, bet: Bet, now: int) -> bool: within_ranges = within_opening_range and within_safe_range - # rebetting is allowed only if we have already placed at least one bet in this market. - # conversely, if we should not rebet, no bets should have been placed in this market. - if self.should_rebet ^ bool(bet.n_bets): - return False - - # if we should not rebet, we have all the information we need - if not self.should_rebet: - # the `has_liquidity_changed` check is dangerous; this can result in a bet never being processed - # e.g.: - # 1. a market is selected - # 2. the mech is uncertain - # 3. a bet is not placed - # 4. the market's liquidity never changes - # 5. the market is never selected again, and therefore a bet is never placed on it - return within_ranges and self.has_liquidity_changed(bet) - # create a filter based on whether we can rebet or not lifetime = bet.openingTimestamp - now t_rebetting = (lifetime // UNIX_WEEK) + UNIX_DAY From 2b8393ed0a07a9831ccd4991674cd62c235f683d Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 08:14:10 +0530 Subject: [PATCH 49/98] remove: unused import - random import is no longer valid, as we are no longer sampling using randomness --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 45cdaec0..e7b6c928 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -19,7 +19,6 @@ """This module contains the behaviour for sampling a bet.""" -import random from datetime import datetime from typing import Any, Generator, List, Optional, Tuple From 6d3422c5ec3b87715b830022515704f08dea98fa Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 14:40:49 +0530 Subject: [PATCH 50/98] fix: Ensure _compute_stop_trading always behaves as a generator - Added `yield` statements in the branches where `False` or `True` is returned directly. - This ensures that `_compute_stop_trading` always returns a generator object, resolving the type mismatch warning from Pyright. - Updated the function to maintain consistent generator behavior, aligning with the expected return type of `Generator[None, None, bool]` --- packages/valory/skills/check_stop_trading_abci/behaviours.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/check_stop_trading_abci/behaviours.py b/packages/valory/skills/check_stop_trading_abci/behaviours.py index cbc0191e..69c22305 100644 --- a/packages/valory/skills/check_stop_trading_abci/behaviours.py +++ b/packages/valory/skills/check_stop_trading_abci/behaviours.py @@ -140,17 +140,19 @@ def is_staking_kpi_met(self) -> Generator[None, None, bool]: return True return False - def _compute_stop_trading(self) -> Generator: + def _compute_stop_trading(self) -> Generator[None, None, bool]: # This is a "hacky" way of getting required data initialized on # the Trader: On first period, the FSM needs to initialize some # data on the trading branch so that it is available in the # cross-period persistent keys. if self.is_first_period: self.context.logger.debug(f"{self.is_first_period=}") + yield # ensures this is a generator return False self.context.logger.debug(f"{self.params.disable_trading=}") if self.params.disable_trading: + yield # ensures this is a generator return True stop_trading_conditions = [] From 5333fac8d5c24177ef2cf708e277fad872116644 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Sun, 1 Dec 2024 14:54:50 +0530 Subject: [PATCH 51/98] refactor: Simplify _compute_stop_trading by removing unnecessary list - Removed the `stop_trading_conditions` list and directly returned the boolean result of the condition checks. - Ensured that `_compute_stop_trading` always behaves as a generator by adding `yield` statements where necessary. - Retained the use of `yield from` to delegate to the `is_staking_kpi_met` generator, maintaining modularity and separation of concerns. - Updated the function to maintain consistent generator behavior, aligning with the expected return type of `Generator[None, None, bool]`. --- .../valory/skills/check_stop_trading_abci/behaviours.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/valory/skills/check_stop_trading_abci/behaviours.py b/packages/valory/skills/check_stop_trading_abci/behaviours.py index 69c22305..b0b17d2d 100644 --- a/packages/valory/skills/check_stop_trading_abci/behaviours.py +++ b/packages/valory/skills/check_stop_trading_abci/behaviours.py @@ -155,14 +155,15 @@ def _compute_stop_trading(self) -> Generator[None, None, bool]: yield # ensures this is a generator return True - stop_trading_conditions = [] self.context.logger.debug(f"{self.params.stop_trading_if_staking_kpi_met=}") if self.params.stop_trading_if_staking_kpi_met: staking_kpi_met = yield from self.is_staking_kpi_met() self.context.logger.debug(f"{staking_kpi_met=}") - stop_trading_conditions.append(staking_kpi_met) - return any(stop_trading_conditions) + return staking_kpi_met + + yield + return False def async_act(self) -> Generator: """Do the action.""" From f5d55678f12fc3773e23053aabdc316be5e8e88a Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 17:34:23 +0530 Subject: [PATCH 52/98] refactor: sampling process with two queues - The sanpling mechanism has been simplified a lot, it does't need to take care of day 0 flags and just has to process queues based on priority. --- .../behaviours/sampling.py | 85 +++++++++++-------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index e7b6c928..bac98c1f 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -27,7 +27,7 @@ ) from packages.valory.skills.decision_maker_abci.payloads import SamplingPayload from packages.valory.skills.decision_maker_abci.states.sampling import SamplingRound -from packages.valory.skills.market_manager_abci.bets import Bet +from packages.valory.skills.market_manager_abci.bets import Bet, QueueStatus WEEKDAYS = 7 @@ -73,7 +73,16 @@ def processable_bet(self, bet: Bet, now: int) -> bool: lifetime = bet.openingTimestamp - now t_rebetting = (lifetime // UNIX_WEEK) + UNIX_DAY can_rebet = now >= bet.processed_timestamp + t_rebetting - return within_ranges and can_rebet + + # check if bet queue number is processable + processable_statuses = { + QueueStatus.TO_PROCESS, + QueueStatus.PROCESSED, + QueueStatus.REPROCESSED, + } + bet_queue_processable = bet.queue_status in processable_statuses + + return within_ranges and can_rebet and bet_queue_processable def _sort_by_priority_logic(self, bets: List[Bet]) -> List[Bet]: """ @@ -93,7 +102,7 @@ def _sort_by_priority_logic(self, bets: List[Bet]) -> List[Bet]: reverse=True, ) - def _sampled_bet_idx(self, bets: List[Bet]) -> int: + def _sampled_bet_idx(self, bets: List[Bet]) -> Optional[int]: """ Sample a bet and return its index. @@ -112,37 +121,42 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: :return: the index of the sampled bet, out of all the available bets, not only the given ones. """ - max_queue_number = max([bet.queue_no for bet in bets]) - - if max_queue_number == 0: - # Search if any bet is unprocessed - new_in_priority_bets = [bet for bet in bets if bet.processed_timestamp == 0] - - if new_in_priority_bets: - # Order the list in Decreasing order of liquidity - sorted_bets = self._sort_by_priority_logic(new_in_priority_bets) - return self.bets.index(sorted_bets[0]) - else: - # All bets have been processed once, bets can be sampled based on the priority logic - sorted_bets = self._sort_by_priority_logic(bets) - return self.bets.index(sorted_bets[0]) + sorted_bets: List = [] + + bets_by_status = { + status: list(filter(lambda bet: bet.queue_status == status, bets)) + for status in [ + QueueStatus.TO_PROCESS, + QueueStatus.PROCESSED, + QueueStatus.REPROCESSED, + ] + } + + to_process_bets = bets_by_status.get(QueueStatus.TO_PROCESS, []) + processed_bets = bets_by_status.get(QueueStatus.PROCESSED, []) + + for bet in bets: + if bet.queue_status == QueueStatus.TO_PROCESS: + to_process_bets.append(bet) + elif bet.queue_status == QueueStatus.PROCESSED: + processed_bets.append(bet) + + if to_process_bets: + # apply the sorting priority logic to the to process bets + sorted_bets = self._sort_by_priority_logic(to_process_bets) + elif processed_bets: + # Bets available for rebetting and can be prioritized based on the priority logic + sorted_bets = self._sort_by_priority_logic(processed_bets) else: - # Check if all bets have processed_timestamp == 0 - all_bets_not_processed = all( - bet.processed_timestamp == 0 and bet.invested_amount == 0 - for bet in bets - ) + # This case is highly unlikely as we will reach staking kpi before this happens + reprocessed_bets = bets_by_status.get(QueueStatus.REPROCESSED, []) + if reprocessed_bets: + sorted_bets = self._sort_by_priority_logic(reprocessed_bets) - if all_bets_not_processed: - # if none of the bets have been processed, then we should set the current_queue_number to 0 - # for all none blacklisted bets - for bet in bets: - if bet.queue_no > 0: - bet.queue_no = 0 - - # Bets available for rebetting and can be prioritized based on the priority logic - sorted_bets = self._sort_by_priority_logic(bets) + if sorted_bets: return self.bets.index(sorted_bets[0]) + else: + return None def _sample(self) -> Optional[int]: """Sample a bet, mark it as processed, and return its index.""" @@ -158,10 +172,10 @@ def _sample(self) -> Optional[int]: else: now = self.synced_timestamp - # filter out only the bets that are processable and have a queue_no >= 0 + # filter out only the bets that are processable and have a queue_status that allows them to be sampled available_bets = list( filter( - lambda bet: self.processable_bet(bet, now=now) and bet.queue_no >= 0, + lambda bet: self.processable_bet(bet, now=now), self.bets, ) ) @@ -172,7 +186,10 @@ def _sample(self) -> Optional[int]: # sample a bet using the priority logic idx = self._sampled_bet_idx(available_bets) - sampled_bet = self.bets[idx] + if idx: + sampled_bet = self.bets[idx] + else: + return None # fetch the liquidity of the sampled bet and cache it liquidity = sampled_bet.scaledLiquidityMeasure From dcc702e992b46b429a93d521630dbb9e399d5f99 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 17:34:52 +0530 Subject: [PATCH 53/98] add: queue transitions for sampled bets --- .../skills/decision_maker_abci/behaviours/base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index c0dd3986..d64b8d79 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -71,6 +71,7 @@ P_NO_FIELD, P_YES_FIELD, PredictionResponse, + QueueStatus, ) from packages.valory.skills.transaction_settlement_abci.payload_tools import ( hash_payload_to_hex, @@ -360,6 +361,15 @@ def update_bet_transaction_information(self) -> None: sampled_bet.processed_timestamp = self.synced_timestamp # update no of bets made sampled_bet.n_bets += 1 + # Update Queue number for priority logic + if sampled_bet.queue_status == QueueStatus.TO_PROCESS: + sampled_bet.queue_status = QueueStatus.PROCESSED + elif sampled_bet.queue_status == QueueStatus.PROCESSED: + sampled_bet.queue_status = QueueStatus.REPROCESSED + else: + raise ValueError( + f"Invalid queue number {sampled_bet.queue_status} detected. This bet should not have been sampled" + ) self.store_bets() def send_message( From c4c3adfec78625d270ba9a71bb761ca6adc118ab Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 17:36:23 +0530 Subject: [PATCH 54/98] update: blacklisting mechanishm using queue transitions - blacklisting mechanism now instead of reducing n bets by 11, which was wrong, moves bet in between queues --- .../skills/decision_maker_abci/behaviours/blacklisting.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py index a004ec62..b5a22cb1 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py @@ -28,6 +28,7 @@ from packages.valory.skills.decision_maker_abci.states.blacklisting import ( BlacklistingRound, ) +from packages.valory.skills.market_manager_abci.bets import QueueStatus class BlacklistingBehaviour(DecisionMakerBaseBehaviour): @@ -45,9 +46,14 @@ def _blacklist(self) -> None: """Blacklist the sampled bet.""" sampled_bet_index = self.synchronized_data.sampled_bet_index sampled_bet = self.bets[sampled_bet_index] + # the question is blacklisted, i.e., we did not place a bet on it, # therefore, we decrease the number of bets which was increased on sampling - sampled_bet.queue_no = -2 + if sampled_bet.queue_status == QueueStatus.TO_PROCESS: + sampled_bet.queue_status = QueueStatus.PROCESSED + + if sampled_bet.queue_status == QueueStatus.PROCESSED: + sampled_bet.queue_status = QueueStatus.REPROCESSED def setup(self) -> None: """Setup the behaviour""" From aac3e7c8524daaec6abb8b6aa384d8024a0773e7 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 17:46:03 +0530 Subject: [PATCH 55/98] refactor: queueing behaviour - queue is now simplified to TO_PROCESS and PROCESSED - if all bets are fresh then they are moved to to_process queue - bets can only be fresh when the trader has just started running as all bets are new or we reached checkpoint --- .../skills/market_manager_abci/behaviours.py | 68 ++++++++----------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 8f8f2715..c3325ba3 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -32,6 +32,7 @@ from packages.valory.skills.market_manager_abci.bets import ( Bet, BetsDecoder, + QueueStatus, serialize_bets, ) from packages.valory.skills.market_manager_abci.graph_tooling.requests import ( @@ -58,7 +59,6 @@ def __init__(self, **kwargs: Any) -> None: """Initialize `BetsManagerBehaviour`.""" super().__init__(**kwargs) self.bets: List[Bet] = [] - self.current_queue_number: int = 0 self.bets_filepath: str = self.params.store_path / BETS_FILENAME def store_bets(self) -> None: @@ -117,7 +117,6 @@ class UpdateBetsBehaviour(BetsManagerBehaviour, QueryingBehaviour): def __init__(self, **kwargs: Any) -> None: """Initialize `UpdateBetsBehaviour`.""" super().__init__(**kwargs) - self.max_queue_number: int = -1 def get_bet_idx(self, bet_id: str) -> Optional[int]: """Get the index of the bet with the given id, if it exists, otherwise `None`.""" @@ -132,51 +131,15 @@ def _process_chunk(self, chunk: Optional[List[Dict[str, Any]]]) -> None: bet = Bet(**raw_bet, market=self._current_market) index = self.get_bet_idx(bet.id) if index is None: - bet.queue_no = self.current_queue_number self.bets.append(bet) else: self.bets[index].update_market_info(bet) - def _set_current_queue_number(self) -> None: - """Set the current queue number.""" - - # Extract the last queue number from the bets - # This is used to determine the next queue number - if self.bets: - # find max queue number in current list of bets - self.max_queue_number = max([bet.queue_no for bet in self.bets]) - - if self.max_queue_number == 0: - # check if all bets that have queue no not -1 - # have not been processed - all_bets_not_processed = all( - bet.processed_timestamp == 0 - for bet in self.bets - if bet.queue_no != -1 - ) - - # if none of the bets have been processed - # then there is no chance of investment amount priority - if not all_bets_not_processed: - # If even one bet has been processed in queue 0 - # then if any new bets are being added they should be added to queue 1 - # Because 10 new bets are added every new epoch - self.current_queue_number = 1 - elif self.max_queue_number == 1: - # If the max queue number is 1 then bets will be added to this queue only - self.current_queue_number = 1 - else: - # max queue number is -1, i.e. all bets are blacklisted - self.current_queue_number = 0 - def _update_bets( self, ) -> Generator: """Fetch the questions from all the prediction markets and update the local copy of the bets.""" - # Set the current queue number - self._set_current_queue_number() - # Fetching bets from the prediction markets while True: can_proceed = self._prepare_fetching() @@ -194,18 +157,42 @@ def _update_bets( bets_str = str(self.bets)[:MAX_LOG_SIZE] self.context.logger.info(f"Updated bets: {bets_str}") + def _requeue_all_bets(self) -> None: + """Requeue all bets.""" + for bet in self.bets: + if bet.queue_status != QueueStatus.EXPIRED: + bet.queue_status = QueueStatus.FRESH + def _blacklist_expired_bets(self) -> None: """Blacklist bets that are older than the opening margin.""" for bet in self.bets: if self.synced_time >= bet.openingTimestamp - self.params.opening_margin: bet.blacklist_forever() + def _bet_freshness_check_and_update(self) -> None: + """Check the freshness of the bets.""" + fresh_statuses = {QueueStatus.FRESH} + all_bets_fresh = all( + bet.queue_status in fresh_statuses + for bet in self.bets + if bet.queue_status is not QueueStatus.EXPIRED + ) + + if all_bets_fresh: + for bet in self.bets: + if bet.queue_status is not QueueStatus.EXPIRED: + bet.queue_status = QueueStatus.TO_PROCESS + def async_act(self) -> Generator: """Do the action.""" with self.context.benchmark_tool.measure(self.behaviour_id).local(): # Read the bets from the agent's data dir as JSON, if they exist self.read_bets() + # fetch checkpoint status and if reached requeue all bets + if self.synchronized_data.is_checkpoint_reached: + self._requeue_all_bets() + # blacklist bets that are older than the opening margin # if trader ran after a long time # helps in resetting the queue number to 0 @@ -215,6 +202,11 @@ def async_act(self) -> Generator: # Update the bets list with new bets or update existing ones yield from self._update_bets() + # if trader is run after a long time, there is a possibility that + # all bets are fresh and this should be updated to DAY_0_FRESH + if self.bets: + self._bet_freshness_check_and_update() + # Store the bets to the agent's data dir as JSON self.store_bets() From 9905b4afcdbf63391c32d56f49c5c6e9197e8506 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 17:53:19 +0530 Subject: [PATCH 56/98] add: check point reach flag - Will be used to determine if new epoch has started or not. --- packages/valory/skills/staking_abci/rounds.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/valory/skills/staking_abci/rounds.py b/packages/valory/skills/staking_abci/rounds.py index 9485cb9c..dde23ce4 100644 --- a/packages/valory/skills/staking_abci/rounds.py +++ b/packages/valory/skills/staking_abci/rounds.py @@ -86,6 +86,11 @@ def participant_to_checkpoint(self) -> DeserializedCollection: """Get the participants to the checkpoint round.""" return self._get_deserialized("participant_to_checkpoint") + @property + def is_checkpoint_reached(self) -> bool: + """Check if the checkpoint is reached.""" + return bool(self.db.get("is_checkpoint_reached", False)) + class CallCheckpointRound(CollectSameUntilThresholdRound): """A round for the checkpoint call preparation.""" @@ -121,6 +126,9 @@ def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]: if synced_data.most_voted_tx_hash is None: return synced_data, Event.NEXT_CHECKPOINT_NOT_REACHED_YET + # service is staked and checkpoint is reached + self.synchronized_data.update(is_checkpoint_reached=True) + return res From 67a27976046aaa80d2fb1954c00d86441f4c4638 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 17:54:19 +0530 Subject: [PATCH 57/98] add: checkpoint check to market synced data - This flag will be used to determine if we have to requeue bets or not --- packages/valory/skills/market_manager_abci/rounds.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/valory/skills/market_manager_abci/rounds.py b/packages/valory/skills/market_manager_abci/rounds.py index ba8a16e4..1ac5dc8b 100644 --- a/packages/valory/skills/market_manager_abci/rounds.py +++ b/packages/valory/skills/market_manager_abci/rounds.py @@ -68,6 +68,11 @@ def participant_to_bets_hash(self) -> DeserializedCollection: """Get the participants to bets' hash.""" return self._get_deserialized("participant_to_bets_hash") + @property + def is_checkpoint_reached(self) -> bool: + """Check if the checkpoint is reached.""" + return bool(self.db.get("is_checkpoint_reached", False)) + class MarketManagerAbstractRound(AbstractRound[Event], ABC): """Abstract round for the MarketManager skill.""" From d5c8b4a43c210924302de58ff290bb0f31c5758a Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 17:55:46 +0530 Subject: [PATCH 58/98] add: Queue status enum class - helps in understanding the queueing mechanism --- .../valory/skills/market_manager_abci/bets.py | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 7180e08b..7f28c7ad 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -22,6 +22,7 @@ import builtins import dataclasses +from enum import Enum import json import sys from typing import Any, Dict, List, Optional, Union @@ -34,6 +35,15 @@ BINARY_N_SLOTS = 2 +class QueueStatus(Enum): + # Common statuses + EXPIRED = -1 # Bets that have expired, i.e., the market is not live anymore + FRESH = 0 # Fresh bets that have just been added + TO_PROCESS = 1 # Bets that are ready to be processed + PROCESSED = 2 # Bets that have been processed + REPROCESSED = 3 # Bets that have been reprocessed + + @dataclasses.dataclass(init=False) class PredictionResponse: """A response of a prediction.""" @@ -100,7 +110,7 @@ class Bet: potential_net_profit: int = 0 processed_timestamp: int = 0 n_bets: int = 0 - queue_no: int = 0 + queue_status: QueueStatus = QueueStatus.FRESH def __post_init__(self) -> None: """Post initialization to adjust the values.""" @@ -116,7 +126,7 @@ def blacklist_forever(self) -> None: """Blacklist a bet forever. Should only be used in cases where it is impossible to bet.""" self.outcomes = None self.processed_timestamp = sys.maxsize - self.queue_no = -1 + self.queue_status = QueueStatus.EXPIRED def _validate(self) -> None: """Validate the values of the instance.""" @@ -209,10 +219,6 @@ def update_market_info(self, bet: "Bet") -> None: # do not update the bet if it has been blacklisted forever return - # update bet queue number if it was unprofitable or tied during decison - if self.queue_no == -2: - self.queue_no = 0 - self.outcomeTokenAmounts = bet.outcomeTokenAmounts.copy() self.outcomeTokenMarginalPrices = bet.outcomeTokenMarginalPrices.copy() self.scaledLiquidityMeasure = bet.scaledLiquidityMeasure @@ -245,8 +251,10 @@ class BetsEncoder(json.JSONEncoder): def default(self, o: Any) -> Any: """The default encoder.""" - if dataclasses.is_dataclass(o): + if dataclasses.is_dataclass(o) and not isinstance(o, type): return dataclasses.asdict(o) + if isinstance(o, QueueStatus): + return o.value return super().default(o) @@ -269,6 +277,7 @@ def hook(data: Dict[str, Any]) -> Union[Bet, PredictionResponse, Dict[str, Bet]] # if this is a `Bet` bet_annotations = sorted(Bet.__annotations__.keys()) if bet_annotations == data_attributes: + data["queue_status"] = QueueStatus(data["queue_status"]) return Bet(**data) return data From 9dc6228fde04c2dd6f6d5eacf074cee26ea328b3 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 2 Dec 2024 18:17:29 +0530 Subject: [PATCH 59/98] update: package hashes --- packages/packages.json | 18 +++++++++--------- packages/valory/agents/trader/aea-config.yaml | 12 ++++++------ packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../skills/check_stop_trading_abci/skill.yaml | 4 ++-- .../skills/decision_maker_abci/skill.yaml | 14 +++++++------- .../skills/market_manager_abci/skill.yaml | 6 +++--- packages/valory/skills/staking_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 10 +++++----- .../tx_settlement_multiplexer_abci/skill.yaml | 4 ++-- 10 files changed, 37 insertions(+), 37 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 41797ca7..367dbedb 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeicvz65mfxtxbqizsvd3r3sy7fwyutjfj5a2xu2d5uz7b2fq7xdpp4", - "skill/valory/trader_abci/0.1.0": "bafybeieop75gnpbriiltwvvbwi4p6q242xhnlts7yjur5sgrk5jvi6sr74", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeif23c7z5kfuarlu2ivcw3nbbchrnze3y2nemznnsynghis7w3scky", - "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", - "skill/valory/check_stop_trading_abci/0.1.0": "bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54", - "agent/valory/trader/0.1.0": "bafybeibrpyaz6l4rdcfkdmngh54kmqkxxfkb35clukyccvhupvqs5qcixq", - "service/valory/trader/0.1.0": "bafybeibmmbkop2wroton4tsmhxuxh7uzj6rjcksfowwpl5yuxws7fjl6xy", - "service/valory/trader_pearl/0.1.0": "bafybeidzq7nqxvdvkyjamxrvohrmu7ll2l5ptzo3lgpcnxsiickb2v2gv4" + "skill/valory/market_manager_abci/0.1.0": "bafybeig57zx2epr3anadnzwfgppjuf3y7wkv7nb5y2fsa7mfc25gaayqy4", + "skill/valory/decision_maker_abci/0.1.0": "bafybeif5ujgq6xosx4bqz2vcr63ndvsrztsvzxv2yp4yhpy5ncq5iscwry", + "skill/valory/trader_abci/0.1.0": "bafybeibaiycmpfdzjzpfnj743wzvmolhg22447qiu75z2ix6sw7ybld7su", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeif2dacj5etd52raax7konvlvs5mtmnomj5w5m6wkz7rpe73q2z6ym", + "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", + "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", + "agent/valory/trader/0.1.0": "bafybeihkok7pm7dg55ywkidggzasz64ht4zpnfywth3bluloq6zwhv5nyy", + "service/valory/trader/0.1.0": "bafybeia6hfrbctzena4nl67w7ejpahbrlvvcujmx6de76budnqjpdn6y4q", + "service/valory/trader_pearl/0.1.0": "bafybeiaxw4cfmy3a5feesrvd2ltf5yaro5db2d4jaxu4v52alubitsqnzm" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 15c023a1..ae446ce9 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,12 +45,12 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif23c7z5kfuarlu2ivcw3nbbchrnze3y2nemznnsynghis7w3scky -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicvz65mfxtxbqizsvd3r3sy7fwyutjfj5a2xu2d5uz7b2fq7xdpp4 -- valory/trader_abci:0.1.0:bafybeieop75gnpbriiltwvvbwi4p6q242xhnlts7yjur5sgrk5jvi6sr74 -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne -- valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif2dacj5etd52raax7konvlvs5mtmnomj5w5m6wkz7rpe73q2z6ym +- valory/market_manager_abci:0.1.0:bafybeig57zx2epr3anadnzwfgppjuf3y7wkv7nb5y2fsa7mfc25gaayqy4 +- valory/decision_maker_abci:0.1.0:bafybeif5ujgq6xosx4bqz2vcr63ndvsrztsvzxv2yp4yhpy5ncq5iscwry +- valory/trader_abci:0.1.0:bafybeibaiycmpfdzjzpfnj743wzvmolhg22447qiu75z2ix6sw7ybld7su +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i +- valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm customs: - valory/mike_strat:0.1.0:bafybeihjiol7f4ch4piwfikurdtfwzsh6qydkbsztpbwbwb2yrqdqf726m diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 03900683..fbf1fcdd 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeibrpyaz6l4rdcfkdmngh54kmqkxxfkb35clukyccvhupvqs5qcixq +agent: valory/trader:0.1.0:bafybeihkok7pm7dg55ywkidggzasz64ht4zpnfywth3bluloq6zwhv5nyy number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 8174168c..deb1ec6e 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeibrpyaz6l4rdcfkdmngh54kmqkxxfkb35clukyccvhupvqs5qcixq +agent: valory/trader:0.1.0:bafybeihkok7pm7dg55ywkidggzasz64ht4zpnfywth3bluloq6zwhv5nyy number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/check_stop_trading_abci/skill.yaml b/packages/valory/skills/check_stop_trading_abci/skill.yaml index 45c3db5e..4ac6d752 100644 --- a/packages/valory/skills/check_stop_trading_abci/skill.yaml +++ b/packages/valory/skills/check_stop_trading_abci/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeif2pq7fg5upl6vmfgfzpiwsh4nbk4zaeyz6upyucqi5tasrxgq4ee __init__.py: bafybeifc23rlw2hzhplp3wfceixnmwq5ztnixhh7jp4dd5av3crwp3x22a - behaviours.py: bafybeifdfqkczchnbfzzb4q2gwe3qqrn5ci2tk4mq65bunivjkw4scuzse + behaviours.py: bafybeicair2lh5wx7sjzied2z755nhlcwa3jznt7mayvsjkky43jz7lh5u dialogues.py: bafybeictrrnwcijiejczy23dfvbx5kujgef3dulzqhs3etl2juvz5spm2e fsm_specification.yaml: bafybeihhau35a5xclncjpxh5lg7qiw34xs4d5qlez7dnjpkf45d3gc57ai handlers.py: bafybeiard64fwxib3rtyp67ymhf222uongcyqhfhdyttpsyqkmyh5ajipu @@ -27,7 +27,7 @@ contracts: protocols: [] skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i behaviours: main: args: {} diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 43047cbc..ec0bd2b6 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -12,19 +12,19 @@ fingerprint: README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky - behaviours/base.py: bafybeifjgxzhwzxiky3okgtv4ojumm7fj7bom6qe3ysdvs3cpu32w446g4 + behaviours/base.py: bafybeic2fxlidmklpfkv4fxs7rusxd3vyddo6bsxqh4z32hz2v4segikue behaviours/bet_placement.py: bafybeif3blpj45w4y2ppw5lxkxndsc5crhghevagifuh4fcoofej36bq34 - behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku + behaviours/blacklisting.py: bafybeihhze4fgm4hklscl4jvvtc65z4lor2pn7kivnwvjm5ciccuerr6ou behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e - behaviours/decision_receive.py: bafybeiaph3ft4j3br4k7bddymzv5ffcexmlup2l4prk5rvhqlilxtq57oa + behaviours/decision_receive.py: bafybeigzvldeggit3aqhiw5ldat5xgeov37lsafixn3cnz55e4ztwpav34 behaviours/decision_request.py: bafybeia22omb7tvocyfe3z2ucn5au5mcas7dg37ha42u7znefzrewjpk7y behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeib3maqohhx35wzryy4otdcjp5thkr4sbp27ksvwidy3pwm444itra behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce - behaviours/reedem.py: bafybeia4tma526hkxnf7yww3lrkzkfkon7gutbvxzwfueek5rivq3lekf4 + behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeibwm7rxpaaroqrf2ts4ntvoovjqdz2j3xftnduesgqemy2g4zrnta + behaviours/sampling.py: bafybeicjhkwe2c2tla32nlrbhoyqsism4lpobbkjnzysr7b6ba5dygpgfq behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -101,10 +101,10 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeifbfmuaou3muw6wpdow37mp5zyrw7767au75xehmav5iedz3r2qoa +- valory/market_manager_abci:0.1.0:bafybeig57zx2epr3anadnzwfgppjuf3y7wkv7nb5y2fsa7mfc25gaayqy4 - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i behaviours: main: args: {} diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 299b2803..d8e85e63 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -8,8 +8,8 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e - behaviours.py: bafybeidytq2hfqvmlp7uddtfuf6y622guj6vjifipask5lmurrwbzugd24 - bets.py: bafybeihnf4te7wwf72favpdumlvodecr3vmad6t32h47oilh5f26rvmrpm + behaviours.py: bafybeibppnnn5qmzc25lqna4taegwfrt7meipvmzytkjtui2tnjudc6q34 + bets.py: bafybeibizb6rbuarwfzfy5lefxh5jgzf3dmswy3yl3wnngxdt7c27xuu5u dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 @@ -24,7 +24,7 @@ fingerprint: handlers.py: bafybeihot2i2yvfkz2gcowvt66wdu6tkjbmv7hsmc4jzt4reqeaiuphbtu models.py: bafybeibjttnga54y4auz6f33ecfrngyw53b2xzpompm72drjsr4xoytmiy payloads.py: bafybeicfymvvtdpkcgmkvthfzmb7dqakepkzslqrz6rcs7nxkz7qq3mrzy - rounds.py: bafybeiflb2k6ritv5tlexlfxyg2okadtviijprqnc7sa7zxdlhr7nnqxfy + rounds.py: bafybeibqqq3vjotaasc67olhlqthka6e6refodguntkmpksgdbqlzme73a tests/__init__.py: bafybeigaewntxawezvygss345kytjijo56bfwddjtfm6egzxfajsgojam4 tests/test_dialogues.py: bafybeiet646su5nsjmvruahuwg6un4uvwzyj2lnn2jvkye6cxooz22f3ja tests/test_handlers.py: bafybeiaz3idwevvlplcyieaqo5oeikuthlte6e2gi4ajw452ylvimwgiki diff --git a/packages/valory/skills/staking_abci/skill.yaml b/packages/valory/skills/staking_abci/skill.yaml index 43e2dcc2..15c3c0f1 100644 --- a/packages/valory/skills/staking_abci/skill.yaml +++ b/packages/valory/skills/staking_abci/skill.yaml @@ -14,7 +14,7 @@ fingerprint: handlers.py: bafybeichsi2y5zvzffupj2vhgagocwvnm7cbzr6jmavp656mfrzsdvkfnu models.py: bafybeidc6aghkskpy5ze62xpjbinwgsyvtzvyrlsfckrygcnj4cts54zpa payloads.py: bafybeibnub5ehb2mvpcoan3x23pp5oz4azpofwrtcl32abswcfl4cmjlwq - rounds.py: bafybeic7kre4hriounn6at63fjzttw45zoivxatg23cmojok4ah6fca7ca + rounds.py: bafybeib74ue2ajr5t3qlisro3yzbm5b7cojxt7syo4hb2y6nw2hnlpr3km tests/__init__.py: bafybeid7m6ynosqeb4mvsss2hqg75aly5o2d47r7yfg2xtgwzkkilv2d2m tests/test_dialogues.py: bafybeidwjk52mufwvkj4cr3xgqycbdzxc6gvosmqyuqdjarnrgwth6wcai tests/test_handers.py: bafybeibnxlwznx3tsdpjpzh62bnp6lq7zdpolyjxfvxeumzz52ljxfzpme diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index edd9e72f..0892517a 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,11 +26,11 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicvz65mfxtxbqizsvd3r3sy7fwyutjfj5a2xu2d5uz7b2fq7xdpp4 -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif23c7z5kfuarlu2ivcw3nbbchrnze3y2nemznnsynghis7w3scky -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne -- valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 +- valory/market_manager_abci:0.1.0:bafybeig57zx2epr3anadnzwfgppjuf3y7wkv7nb5y2fsa7mfc25gaayqy4 +- valory/decision_maker_abci:0.1.0:bafybeif5ujgq6xosx4bqz2vcr63ndvsrztsvzxv2yp4yhpy5ncq5iscwry +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif2dacj5etd52raax7konvlvs5mtmnomj5w5m6wkz7rpe73q2z6ym +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i +- valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: main: diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index de3d8846..664b0455 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,8 +23,8 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeicvz65mfxtxbqizsvd3r3sy7fwyutjfj5a2xu2d5uz7b2fq7xdpp4 -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne +- valory/decision_maker_abci:0.1.0:bafybeif5ujgq6xosx4bqz2vcr63ndvsrztsvzxv2yp4yhpy5ncq5iscwry +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: main: From ad60caa7cb35d2c6e35e08e4248cc16ab1ac52bc Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Tue, 3 Dec 2024 14:02:15 +0530 Subject: [PATCH 60/98] add: changes introduces by tox run --- .../behaviours/bet_placement.py | 4 +++- .../behaviours/decision_receive.py | 16 ++++++++-------- .../skills/decision_maker_abci/handlers.py | 3 ++- .../states/decision_receive.py | 4 +++- .../valory/skills/market_manager_abci/bets.py | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/bet_placement.py b/packages/valory/skills/decision_maker_abci/behaviours/bet_placement.py index 0d9e0e0d..fbda0a59 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/bet_placement.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/bet_placement.py @@ -212,7 +212,9 @@ def async_act(self) -> Generator: if self.benchmarking_mode.enabled: # simulate the bet placement with self.context.benchmark_tool.measure(self.behaviour_id).local(): - payload = BetPlacementPayload(agent, None, None, True, self.wallet_balance) + payload = BetPlacementPayload( + agent, None, None, True, self.wallet_balance + ) yield from self.finish_behaviour(payload) with self.context.benchmark_tool.measure(self.behaviour_id).local(): diff --git a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py index d305ccb3..5ad86dec 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/decision_receive.py @@ -316,9 +316,9 @@ def _update_market_liquidity(self) -> None: self.shared_state.current_liquidity_prices = ( active_sampled_bet.outcomeTokenMarginalPrices ) - self.shared_state.liquidity_cache[question_id] = ( - active_sampled_bet.scaledLiquidityMeasure - ) + self.shared_state.liquidity_cache[ + question_id + ] = active_sampled_bet.scaledLiquidityMeasure def _calculate_new_liquidity(self, net_bet_amount: int, vote: int) -> LiquidityInfo: """Calculate and return the new liquidity information.""" @@ -385,11 +385,11 @@ def _update_liquidity_info(self, net_bet_amount: int, vote: int) -> LiquidityInf self.context.logger.info(log_message) # update the scaled liquidity Measure - self.shared_state.liquidity_cache[market_id] = ( - self._compute_scaled_liquidity_measure( - self.shared_state.current_liquidity_amounts, - self.shared_state.current_liquidity_prices, - ) + self.shared_state.liquidity_cache[ + market_id + ] = self._compute_scaled_liquidity_measure( + self.shared_state.current_liquidity_amounts, + self.shared_state.current_liquidity_prices, ) return liquidity_info diff --git a/packages/valory/skills/decision_maker_abci/handlers.py b/packages/valory/skills/decision_maker_abci/handlers.py index c46644e5..b0f6ad16 100644 --- a/packages/valory/skills/decision_maker_abci/handlers.py +++ b/packages/valory/skills/decision_maker_abci/handlers.py @@ -361,5 +361,6 @@ def _check_is_receiving_mech_responses(self) -> bool: # (an on chain transaction) return ( self.synchronized_data.decision_receive_timestamp - < int(datetime.utcnow().timestamp()) - self.context.params.expected_mech_response_time + < int(datetime.utcnow().timestamp()) + - self.context.params.expected_mech_response_time ) diff --git a/packages/valory/skills/decision_maker_abci/states/decision_receive.py b/packages/valory/skills/decision_maker_abci/states/decision_receive.py index 254f9685..678b6b2d 100644 --- a/packages/valory/skills/decision_maker_abci/states/decision_receive.py +++ b/packages/valory/skills/decision_maker_abci/states/decision_receive.py @@ -65,7 +65,9 @@ def end_block(self) -> Optional[Tuple[SynchronizedData, Enum]]: synced_data = cast( SynchronizedData, - synced_data.update(decision_receive_timestamp=decision_receive_timestamp), + synced_data.update( + decision_receive_timestamp=decision_receive_timestamp + ), ) if event == Event.DONE and synced_data.vote is None: diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 7f28c7ad..dc53774d 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -22,9 +22,9 @@ import builtins import dataclasses -from enum import Enum import json import sys +from enum import Enum from typing import Any, Dict, List, Optional, Union From a432519ecb67688ec02c68c4da601c15ca01dc3e Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Tue, 3 Dec 2024 14:20:53 +0530 Subject: [PATCH 61/98] fix: setup introduced by merging --- .../skills/decision_maker_abci/behaviours/sampling.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 51d11697..c4ca6b0d 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -47,16 +47,7 @@ def __init__(self, **kwargs: Any) -> None: def setup(self) -> None: """Setup the behaviour.""" - self.read_bets() - has_bet_in_the_past = any(bet.n_bets > 0 for bet in self.bets) - if has_bet_in_the_past: - if self.benchmarking_mode.enabled: - random.seed(self.benchmarking_mode.randomness) - else: - random.seed(self.synchronized_data.most_voted_randomness) - self.should_rebet = random.random() <= self.params.rebet_chance # nosec - rebetting_status = "enabled" if self.should_rebet else "disabled" - self.context.logger.info(f"Rebetting {rebetting_status}.") + pass def processable_bet(self, bet: Bet, now: int) -> bool: """Whether we can process the given bet.""" From 4ef03c0f9c08906e4ace7b65722f158feaf935f9 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Tue, 3 Dec 2024 14:41:03 +0530 Subject: [PATCH 62/98] update: hashes --- packages/packages.json | 18 +++++++++--------- packages/valory/agents/trader/aea-config.yaml | 12 ++++++------ packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../skills/decision_maker_abci/skill.yaml | 14 +++++++------- .../skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 10 +++++----- .../tx_settlement_multiplexer_abci/skill.yaml | 4 ++-- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 20a41cbf..de1751ff 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeig3sqaeqedobqdg7gynrxnbq2kgzh4gp5pe5gxo5kw4hczfjmj6e4", - "skill/valory/trader_abci/0.1.0": "bafybeigm2oqol7yvbspdapdrq3hxugybwmaazom773ncsyz6mlgps7y3pi", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibx63ico4nlp6etvtzgvlcrl3jdy6rx7zodwmxhvvb4phizd732l4", - "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", - "skill/valory/check_stop_trading_abci/0.1.0": "bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54", - "agent/valory/trader/0.1.0": "bafybeifwqory3yuyhi6sxkoy3ihyzdbus444pkehyoxiibjqo5mjcawbhe", - "service/valory/trader/0.1.0": "bafybeiezli7klgpvdlvdkh7wxmulyosp7f3xzmkmdtzrgtcloqdng5qcea", - "service/valory/trader_pearl/0.1.0": "bafybeic52jtgilmipang6wcr3ogbfyskwzb7iaat3lur5pe7fjkpkqc7da" + "skill/valory/market_manager_abci/0.1.0": "bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm", + "skill/valory/decision_maker_abci/0.1.0": "bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm", + "skill/valory/trader_abci/0.1.0": "bafybeifikegsy3vpf4p6ukk5w35eqmwl2zbiijqfcnhpaowr47sy7gygbu", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeig2saqhbt4p2fpqquionsrfvz42g3xexrhqjhyv3ez7e2b6s7ktsq", + "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", + "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", + "agent/valory/trader/0.1.0": "bafybeieu6xma7t3cmxrjbu2yseb3epjkrs6fuos64lkbpgbye4hjdvqmva", + "service/valory/trader/0.1.0": "bafybeidfq4w2peqhbztr5r7qegm57m7upmjzrgagzsfwpscmth24xga2eq", + "service/valory/trader_pearl/0.1.0": "bafybeifccrybn3i72akb4u5dvhqgaauwxbsgpagzm2nmzcjjtxi36lze7q" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 9b19512a..a3c8e87c 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,12 +45,12 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibx63ico4nlp6etvtzgvlcrl3jdy6rx7zodwmxhvvb4phizd732l4 -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeig3sqaeqedobqdg7gynrxnbq2kgzh4gp5pe5gxo5kw4hczfjmj6e4 -- valory/trader_abci:0.1.0:bafybeigm2oqol7yvbspdapdrq3hxugybwmaazom773ncsyz6mlgps7y3pi -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne -- valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig2saqhbt4p2fpqquionsrfvz42g3xexrhqjhyv3ez7e2b6s7ktsq +- valory/market_manager_abci:0.1.0:bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm +- valory/decision_maker_abci:0.1.0:bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm +- valory/trader_abci:0.1.0:bafybeifikegsy3vpf4p6ukk5w35eqmwl2zbiijqfcnhpaowr47sy7gygbu +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i +- valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm customs: - valory/mike_strat:0.1.0:bafybeihjiol7f4ch4piwfikurdtfwzsh6qydkbsztpbwbwb2yrqdqf726m diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index a1ea6c51..0da37d0c 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeifwqory3yuyhi6sxkoy3ihyzdbus444pkehyoxiibjqo5mjcawbhe +agent: valory/trader:0.1.0:bafybeieu6xma7t3cmxrjbu2yseb3epjkrs6fuos64lkbpgbye4hjdvqmva number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 90e1c3d6..48cb5a36 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeifwqory3yuyhi6sxkoy3ihyzdbus444pkehyoxiibjqo5mjcawbhe +agent: valory/trader:0.1.0:bafybeieu6xma7t3cmxrjbu2yseb3epjkrs6fuos64lkbpgbye4hjdvqmva number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index fccbe682..67861f6d 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -12,19 +12,19 @@ fingerprint: README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky - behaviours/base.py: bafybeifjgxzhwzxiky3okgtv4ojumm7fj7bom6qe3ysdvs3cpu32w446g4 + behaviours/base.py: bafybeic2fxlidmklpfkv4fxs7rusxd3vyddo6bsxqh4z32hz2v4segikue behaviours/bet_placement.py: bafybeia4listbfzsk4n4wkc4ycaftxgywjnl3mmpcqhuo3nwwia4n3oufu - behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku + behaviours/blacklisting.py: bafybeihhze4fgm4hklscl4jvvtc65z4lor2pn7kivnwvjm5ciccuerr6ou behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e - behaviours/decision_receive.py: bafybeiaph3ft4j3br4k7bddymzv5ffcexmlup2l4prk5rvhqlilxtq57oa + behaviours/decision_receive.py: bafybeifrsnxref7yyl4hq4nmh4xa4rden4wygv5y5ugvqb5ji7zgj7mv5m behaviours/decision_request.py: bafybeia22omb7tvocyfe3z2ucn5au5mcas7dg37ha42u7znefzrewjpk7y behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeib3maqohhx35wzryy4otdcjp5thkr4sbp27ksvwidy3pwm444itra behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce - behaviours/reedem.py: bafybeiaxwp4lx62owcaqfp6xcqh6567f5yvwnl4rage2f5hmq4nltkzjjy + behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeihlpkinxgewpyazax2qlwzlo5iwpxcce6g5juybn6qinstzku27fi + behaviours/sampling.py: bafybeih2idypsn42tjdhopumouk57ab3rdtiyarrxig4vro4kjxocs7cou behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -101,10 +101,10 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa +- valory/market_manager_abci:0.1.0:bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i behaviours: main: args: {} diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index d8e85e63..c1bff1e6 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -9,7 +9,7 @@ fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeibppnnn5qmzc25lqna4taegwfrt7meipvmzytkjtui2tnjudc6q34 - bets.py: bafybeibizb6rbuarwfzfy5lefxh5jgzf3dmswy3yl3wnngxdt7c27xuu5u + bets.py: bafybeicgll53j3vqjfhzxs4p2e7yeoy3jthpvqc2nneaeyyjaaxirtb7k4 dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 2a005c7d..82339165 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,11 +26,11 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeig3sqaeqedobqdg7gynrxnbq2kgzh4gp5pe5gxo5kw4hczfjmj6e4 -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibx63ico4nlp6etvtzgvlcrl3jdy6rx7zodwmxhvvb4phizd732l4 -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne -- valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 +- valory/market_manager_abci:0.1.0:bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm +- valory/decision_maker_abci:0.1.0:bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig2saqhbt4p2fpqquionsrfvz42g3xexrhqjhyv3ez7e2b6s7ktsq +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i +- valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: main: diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 3f2dfba7..2a66e1b2 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,8 +23,8 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeig3sqaeqedobqdg7gynrxnbq2kgzh4gp5pe5gxo5kw4hczfjmj6e4 -- valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne +- valory/decision_maker_abci:0.1.0:bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm +- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: main: From 2f08b74f2577f935193c2933b94fdf5cec776498 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Tue, 3 Dec 2024 14:54:29 +0530 Subject: [PATCH 63/98] add: docstring to queue status --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- packages/valory/skills/market_manager_abci/bets.py | 2 ++ .../valory/skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 9 files changed, 21 insertions(+), 19 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index de1751ff..6df04f4d 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm", - "skill/valory/decision_maker_abci/0.1.0": "bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm", - "skill/valory/trader_abci/0.1.0": "bafybeifikegsy3vpf4p6ukk5w35eqmwl2zbiijqfcnhpaowr47sy7gygbu", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeig2saqhbt4p2fpqquionsrfvz42g3xexrhqjhyv3ez7e2b6s7ktsq", + "skill/valory/market_manager_abci/0.1.0": "bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4", + "skill/valory/decision_maker_abci/0.1.0": "bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e", + "skill/valory/trader_abci/0.1.0": "bafybeiciix4usccavwdfjrxx6ke5t6ugk6xkylokkhxvt5qevqtqzodolm", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicqibu63i7b6vz6qwilrewe45hyzfcsrna227cqfw7auzckdhz4pu", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeieu6xma7t3cmxrjbu2yseb3epjkrs6fuos64lkbpgbye4hjdvqmva", - "service/valory/trader/0.1.0": "bafybeidfq4w2peqhbztr5r7qegm57m7upmjzrgagzsfwpscmth24xga2eq", - "service/valory/trader_pearl/0.1.0": "bafybeifccrybn3i72akb4u5dvhqgaauwxbsgpagzm2nmzcjjtxi36lze7q" + "agent/valory/trader/0.1.0": "bafybeic7zzntvxsbisoppff3rtqtjl2lpmyofxpzaucoxdm2vntwkylhb4", + "service/valory/trader/0.1.0": "bafybeieiwqipfcjq3zkr23iwewshsxz5qjxmukav6f6mycflhdgls2mb6q", + "service/valory/trader_pearl/0.1.0": "bafybeigmwe3iao6zvowtjzucm2efcd5hdbkwuuw2qcfj5pljnp2rvshuvi" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index a3c8e87c..6f8b83c9 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig2saqhbt4p2fpqquionsrfvz42g3xexrhqjhyv3ez7e2b6s7ktsq -- valory/market_manager_abci:0.1.0:bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm -- valory/decision_maker_abci:0.1.0:bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm -- valory/trader_abci:0.1.0:bafybeifikegsy3vpf4p6ukk5w35eqmwl2zbiijqfcnhpaowr47sy7gygbu +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicqibu63i7b6vz6qwilrewe45hyzfcsrna227cqfw7auzckdhz4pu +- valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 +- valory/decision_maker_abci:0.1.0:bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e +- valory/trader_abci:0.1.0:bafybeiciix4usccavwdfjrxx6ke5t6ugk6xkylokkhxvt5qevqtqzodolm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 0da37d0c..3159bb3f 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeieu6xma7t3cmxrjbu2yseb3epjkrs6fuos64lkbpgbye4hjdvqmva +agent: valory/trader:0.1.0:bafybeic7zzntvxsbisoppff3rtqtjl2lpmyofxpzaucoxdm2vntwkylhb4 number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 48cb5a36..a1ab0b1e 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeieu6xma7t3cmxrjbu2yseb3epjkrs6fuos64lkbpgbye4hjdvqmva +agent: valory/trader:0.1.0:bafybeic7zzntvxsbisoppff3rtqtjl2lpmyofxpzaucoxdm2vntwkylhb4 number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 67861f6d..110c214a 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm +- valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index dc53774d..379470a7 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -36,6 +36,8 @@ class QueueStatus(Enum): + """The status of a bet in the queue.""" + # Common statuses EXPIRED = -1 # Bets that have expired, i.e., the market is not live anymore FRESH = 0 # Fresh bets that have just been added diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index c1bff1e6..55957c40 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -9,7 +9,7 @@ fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeibppnnn5qmzc25lqna4taegwfrt7meipvmzytkjtui2tnjudc6q34 - bets.py: bafybeicgll53j3vqjfhzxs4p2e7yeoy3jthpvqc2nneaeyyjaaxirtb7k4 + bets.py: bafybeiehjifg77e3xecfy2y3bj4zcxhvdgrqiilhc6sjrnfl2gz5pddz5a dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 82339165..02b98174 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeiewnh5e353xmj753nqlxf4z3jjw3cycwmtya7tozwtxs7ja2554gm -- valory/decision_maker_abci:0.1.0:bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig2saqhbt4p2fpqquionsrfvz42g3xexrhqjhyv3ez7e2b6s7ktsq +- valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 +- valory/decision_maker_abci:0.1.0:bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicqibu63i7b6vz6qwilrewe45hyzfcsrna227cqfw7auzckdhz4pu - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 2a66e1b2..61ab6243 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeignwmarppf4gv4ag4vtfuf2jw4gbjshjbvwtdqap4co6e4s36z4wm +- valory/decision_maker_abci:0.1.0:bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From f6eef5d940ea473da4793b1fdc84fcf9e3651de8 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 5 Dec 2024 03:24:10 +0530 Subject: [PATCH 64/98] refactor: sampling behaviour for understandibilty - Fix, read bets action not happening. - divide queue extraction process and sampling process --- .../behaviours/sampling.py | 68 ++++++++----------- 1 file changed, 29 insertions(+), 39 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index c4ca6b0d..4f3f1aad 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -21,6 +21,7 @@ from datetime import datetime from typing import Any, Generator, List, Optional, Tuple +from typing_extensions import Dict from packages.valory.skills.decision_maker_abci.behaviours.base import ( DecisionMakerBaseBehaviour, @@ -47,7 +48,7 @@ def __init__(self, **kwargs: Any) -> None: def setup(self) -> None: """Setup the behaviour.""" - pass + self.read_bets() def processable_bet(self, bet: Bet, now: int) -> bool: """Whether we can process the given bet.""" @@ -64,11 +65,6 @@ def processable_bet(self, bet: Bet, now: int) -> bool: within_ranges = within_opening_range and within_safe_range - # create a filter based on whether we can rebet or not - lifetime = bet.openingTimestamp - now - t_rebetting = (lifetime // UNIX_WEEK) + UNIX_DAY - can_rebet = now >= bet.processed_timestamp + t_rebetting - # check if bet queue number is processable processable_statuses = { QueueStatus.TO_PROCESS, @@ -77,7 +73,7 @@ def processable_bet(self, bet: Bet, now: int) -> bool: } bet_queue_processable = bet.queue_status in processable_statuses - return within_ranges and can_rebet and bet_queue_processable + return within_ranges and bet_queue_processable def _sort_by_priority_logic(self, bets: List[Bet]) -> List[Bet]: """ @@ -97,6 +93,25 @@ def _sort_by_priority_logic(self, bets: List[Bet]) -> List[Bet]: reverse=True, ) + def _get_bets_queue_wise( + self, bets: List[Bet] + ) -> Tuple[List[Bet], List[Bet], List[Bet]]: + """Return a dictionary of bets with queue status as key.""" + + to_process_bets: List[Bet] = [] + processed_bets: List[Bet] = [] + reprocessed_bets: List[Bet] = [] + + for bet in bets: + if bet.queue_status == QueueStatus.TO_PROCESS: + to_process_bets.append(bet) + elif bet.queue_status == QueueStatus.PROCESSED: + processed_bets.append(bet) + elif bet.queue_status == QueueStatus.REPROCESSED: + reprocessed_bets.append(bet) + + return to_process_bets, processed_bets, reprocessed_bets + def _sampled_bet_idx(self, bets: List[Bet]) -> Optional[int]: """ Sample a bet and return its index. @@ -118,40 +133,15 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> Optional[int]: sorted_bets: List = [] - bets_by_status = { - status: list(filter(lambda bet: bet.queue_status == status, bets)) - for status in [ - QueueStatus.TO_PROCESS, - QueueStatus.PROCESSED, - QueueStatus.REPROCESSED, - ] - } - - to_process_bets = bets_by_status.get(QueueStatus.TO_PROCESS, []) - processed_bets = bets_by_status.get(QueueStatus.PROCESSED, []) - - for bet in bets: - if bet.queue_status == QueueStatus.TO_PROCESS: - to_process_bets.append(bet) - elif bet.queue_status == QueueStatus.PROCESSED: - processed_bets.append(bet) + to_process_bets, processed_bets, reprocessed_bets = self._get_bets_queue_wise( + bets + ) + # pick the first queue status that has bets in it + bets_to_sort: List[Bet] = to_process_bets or processed_bets or reprocessed_bets - if to_process_bets: - # apply the sorting priority logic to the to process bets - sorted_bets = self._sort_by_priority_logic(to_process_bets) - elif processed_bets: - # Bets available for rebetting and can be prioritized based on the priority logic - sorted_bets = self._sort_by_priority_logic(processed_bets) - else: - # This case is highly unlikely as we will reach staking kpi before this happens - reprocessed_bets = bets_by_status.get(QueueStatus.REPROCESSED, []) - if reprocessed_bets: - sorted_bets = self._sort_by_priority_logic(reprocessed_bets) + sorted_bets = self._sort_by_priority_logic(bets_to_sort) - if sorted_bets: - return self.bets.index(sorted_bets[0]) - else: - return None + return self.bets.index(sorted_bets[0]) def _sample(self) -> Optional[int]: """Sample a bet, mark it as processed, and return its index.""" From 038e87a1534943c07cfc97bfe45bf73da737882c Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 5 Dec 2024 03:26:23 +0530 Subject: [PATCH 65/98] fix: queue transition for blacklisting - multiple if lead to queue status moving from processed and to processed --- .../skills/decision_maker_abci/behaviours/blacklisting.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py index b5a22cb1..3eb9fd76 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py @@ -51,8 +51,7 @@ def _blacklist(self) -> None: # therefore, we decrease the number of bets which was increased on sampling if sampled_bet.queue_status == QueueStatus.TO_PROCESS: sampled_bet.queue_status = QueueStatus.PROCESSED - - if sampled_bet.queue_status == QueueStatus.PROCESSED: + elif sampled_bet.queue_status == QueueStatus.PROCESSED: sampled_bet.queue_status = QueueStatus.REPROCESSED def setup(self) -> None: From 30a4c110ba90b167284467f4ccb24b82414f642a Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 5 Dec 2024 03:31:48 +0530 Subject: [PATCH 66/98] remove: unused imports --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 4f3f1aad..fa03e710 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -21,7 +21,6 @@ from datetime import datetime from typing import Any, Generator, List, Optional, Tuple -from typing_extensions import Dict from packages.valory.skills.decision_maker_abci.behaviours.base import ( DecisionMakerBaseBehaviour, @@ -30,7 +29,6 @@ from packages.valory.skills.decision_maker_abci.states.sampling import SamplingRound from packages.valory.skills.market_manager_abci.bets import Bet, QueueStatus - WEEKDAYS = 7 UNIX_DAY = 60 * 60 * 24 UNIX_WEEK = WEEKDAYS * UNIX_DAY From 6b9afe5c87dcd81cf1eb391e31cd5861fb22b11e Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 5 Dec 2024 03:33:25 +0530 Subject: [PATCH 67/98] lock: package hashes --- packages/packages.json | 12 ++++++------ packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../decision_maker_abci/behaviours/sampling.py | 1 + .../valory/skills/decision_maker_abci/skill.yaml | 4 ++-- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 6df04f4d..3fc01f01 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", "skill/valory/market_manager_abci/0.1.0": "bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4", - "skill/valory/decision_maker_abci/0.1.0": "bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e", - "skill/valory/trader_abci/0.1.0": "bafybeiciix4usccavwdfjrxx6ke5t6ugk6xkylokkhxvt5qevqtqzodolm", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicqibu63i7b6vz6qwilrewe45hyzfcsrna227cqfw7auzckdhz4pu", + "skill/valory/decision_maker_abci/0.1.0": "bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4", + "skill/valory/trader_abci/0.1.0": "bafybeibds5q4irdyn3vdv56fhfszjcg2tm76l52myy5bo7ucamenrh7ur4", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihgxbbtj2tfghmaoe7xfpusw75htxojekcdcfrch655fputozs5zi", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeic7zzntvxsbisoppff3rtqtjl2lpmyofxpzaucoxdm2vntwkylhb4", - "service/valory/trader/0.1.0": "bafybeieiwqipfcjq3zkr23iwewshsxz5qjxmukav6f6mycflhdgls2mb6q", - "service/valory/trader_pearl/0.1.0": "bafybeigmwe3iao6zvowtjzucm2efcd5hdbkwuuw2qcfj5pljnp2rvshuvi" + "agent/valory/trader/0.1.0": "bafybeidtuapiitk4txu3gpzf3hxdojucwgjkagpcmhbwsfdvkfhucrx3da", + "service/valory/trader/0.1.0": "bafybeicxav7t6yoeoin66wzs2ru5uoz5mmmxsfmr64g6w77nqgmczpjc7m", + "service/valory/trader_pearl/0.1.0": "bafybeic37ganlrp5lkcm273uz44qvh4ropou4piazqidqzve7kptmz5dka" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 6f8b83c9..f420cf11 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicqibu63i7b6vz6qwilrewe45hyzfcsrna227cqfw7auzckdhz4pu +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihgxbbtj2tfghmaoe7xfpusw75htxojekcdcfrch655fputozs5zi - valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 -- valory/decision_maker_abci:0.1.0:bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e -- valory/trader_abci:0.1.0:bafybeiciix4usccavwdfjrxx6ke5t6ugk6xkylokkhxvt5qevqtqzodolm +- valory/decision_maker_abci:0.1.0:bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4 +- valory/trader_abci:0.1.0:bafybeibds5q4irdyn3vdv56fhfszjcg2tm76l52myy5bo7ucamenrh7ur4 - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 3159bb3f..98b9d088 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeic7zzntvxsbisoppff3rtqtjl2lpmyofxpzaucoxdm2vntwkylhb4 +agent: valory/trader:0.1.0:bafybeidtuapiitk4txu3gpzf3hxdojucwgjkagpcmhbwsfdvkfhucrx3da number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index a1ab0b1e..4ab9d0e5 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeic7zzntvxsbisoppff3rtqtjl2lpmyofxpzaucoxdm2vntwkylhb4 +agent: valory/trader:0.1.0:bafybeidtuapiitk4txu3gpzf3hxdojucwgjkagpcmhbwsfdvkfhucrx3da number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index fa03e710..adb68552 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -29,6 +29,7 @@ from packages.valory.skills.decision_maker_abci.states.sampling import SamplingRound from packages.valory.skills.market_manager_abci.bets import Bet, QueueStatus + WEEKDAYS = 7 UNIX_DAY = 60 * 60 * 24 UNIX_WEEK = WEEKDAYS * UNIX_DAY diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 110c214a..d4a25dd9 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -14,7 +14,7 @@ fingerprint: behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky behaviours/base.py: bafybeic2fxlidmklpfkv4fxs7rusxd3vyddo6bsxqh4z32hz2v4segikue behaviours/bet_placement.py: bafybeia4listbfzsk4n4wkc4ycaftxgywjnl3mmpcqhuo3nwwia4n3oufu - behaviours/blacklisting.py: bafybeihhze4fgm4hklscl4jvvtc65z4lor2pn7kivnwvjm5ciccuerr6ou + behaviours/blacklisting.py: bafybeif7gtifpsiqvnpbzyegzsqndhf4yqcqedkfy24q32v4bdyjeihyem behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e behaviours/decision_receive.py: bafybeifrsnxref7yyl4hq4nmh4xa4rden4wygv5y5ugvqb5ji7zgj7mv5m @@ -24,7 +24,7 @@ fingerprint: behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeih2idypsn42tjdhopumouk57ab3rdtiyarrxig4vro4kjxocs7cou + behaviours/sampling.py: bafybeigdj5kwwvzguvwdylckpwmgfa3ovp3hx6ju565jxukc3n5bzwzjwe behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 02b98174..7b19e5c3 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,8 +27,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 -- valory/decision_maker_abci:0.1.0:bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicqibu63i7b6vz6qwilrewe45hyzfcsrna227cqfw7auzckdhz4pu +- valory/decision_maker_abci:0.1.0:bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihgxbbtj2tfghmaoe7xfpusw75htxojekcdcfrch655fputozs5zi - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 61ab6243..35d283be 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeict5hgfyunlrlro7a75gzwnybe7a36bpj26u63oqf6tn7yhi3nu2e +- valory/decision_maker_abci:0.1.0:bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4 - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 3aa2568368673fbae87da8cf0f2433b9c09676e7 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Thu, 5 Dec 2024 03:38:09 +0530 Subject: [PATCH 68/98] relock: packages hasehs --- packages/packages.json | 12 ++++++------ packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 3fc01f01..bc5bd71d 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", "skill/valory/market_manager_abci/0.1.0": "bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4", - "skill/valory/decision_maker_abci/0.1.0": "bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4", - "skill/valory/trader_abci/0.1.0": "bafybeibds5q4irdyn3vdv56fhfszjcg2tm76l52myy5bo7ucamenrh7ur4", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihgxbbtj2tfghmaoe7xfpusw75htxojekcdcfrch655fputozs5zi", + "skill/valory/decision_maker_abci/0.1.0": "bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie", + "skill/valory/trader_abci/0.1.0": "bafybeidikyhe4ole3nedmfqmgmxd63zmgnojviyjdv4jf2q7rv7kdqcifi", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeienjc2l65c7o77vkuoxogaduvgohs7c2xhuonmrj5vbvaaag6kjai", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeidtuapiitk4txu3gpzf3hxdojucwgjkagpcmhbwsfdvkfhucrx3da", - "service/valory/trader/0.1.0": "bafybeicxav7t6yoeoin66wzs2ru5uoz5mmmxsfmr64g6w77nqgmczpjc7m", - "service/valory/trader_pearl/0.1.0": "bafybeic37ganlrp5lkcm273uz44qvh4ropou4piazqidqzve7kptmz5dka" + "agent/valory/trader/0.1.0": "bafybeibg76o3eq6egkk3vp7yrtbp65vorczlwz657tml7ujnkvw4w3iuci", + "service/valory/trader/0.1.0": "bafybeib5vbdfambusgtfn2b5spvn554yphyokeka6ayysflma4zxhyywve", + "service/valory/trader_pearl/0.1.0": "bafybeiedff4y5r3taeps5tim4cggefanqgdrxz3bjaxcjedfevnwaf5i5u" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index f420cf11..9c8bb585 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihgxbbtj2tfghmaoe7xfpusw75htxojekcdcfrch655fputozs5zi +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeienjc2l65c7o77vkuoxogaduvgohs7c2xhuonmrj5vbvaaag6kjai - valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 -- valory/decision_maker_abci:0.1.0:bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4 -- valory/trader_abci:0.1.0:bafybeibds5q4irdyn3vdv56fhfszjcg2tm76l52myy5bo7ucamenrh7ur4 +- valory/decision_maker_abci:0.1.0:bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie +- valory/trader_abci:0.1.0:bafybeidikyhe4ole3nedmfqmgmxd63zmgnojviyjdv4jf2q7rv7kdqcifi - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 98b9d088..a74982e3 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeidtuapiitk4txu3gpzf3hxdojucwgjkagpcmhbwsfdvkfhucrx3da +agent: valory/trader:0.1.0:bafybeibg76o3eq6egkk3vp7yrtbp65vorczlwz657tml7ujnkvw4w3iuci number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 4ab9d0e5..a160b9e5 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeidtuapiitk4txu3gpzf3hxdojucwgjkagpcmhbwsfdvkfhucrx3da +agent: valory/trader:0.1.0:bafybeibg76o3eq6egkk3vp7yrtbp65vorczlwz657tml7ujnkvw4w3iuci number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index d4a25dd9..9315422f 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -24,7 +24,7 @@ fingerprint: behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeigdj5kwwvzguvwdylckpwmgfa3ovp3hx6ju565jxukc3n5bzwzjwe + behaviours/sampling.py: bafybeid5ehttobzqsx4hxdjbu7iwhd472xqgurug6eitcrp75jtthiyxv4 behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 7b19e5c3..81dd2cfe 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,8 +27,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 -- valory/decision_maker_abci:0.1.0:bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4 -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihgxbbtj2tfghmaoe7xfpusw75htxojekcdcfrch655fputozs5zi +- valory/decision_maker_abci:0.1.0:bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeienjc2l65c7o77vkuoxogaduvgohs7c2xhuonmrj5vbvaaag6kjai - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 35d283be..71f47812 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeiaxyt6rxwgn6nsb6rw4umnd2chruyjzwtddgi4jlmqisyb23viwr4 +- valory/decision_maker_abci:0.1.0:bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From a0260cda9266df037b5fd338d95f51f358126c42 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 14:49:04 +0530 Subject: [PATCH 69/98] update: stramline bet queue status transition - added next status transition information in QueueStatus class itself --- .../skills/decision_maker_abci/behaviours/base.py | 9 +-------- .../decision_maker_abci/behaviours/blacklisting.py | 7 ++----- packages/valory/skills/market_manager_abci/bets.py | 13 +++++++++++++ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index d64b8d79..1ee46c11 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -362,14 +362,7 @@ def update_bet_transaction_information(self) -> None: # update no of bets made sampled_bet.n_bets += 1 # Update Queue number for priority logic - if sampled_bet.queue_status == QueueStatus.TO_PROCESS: - sampled_bet.queue_status = QueueStatus.PROCESSED - elif sampled_bet.queue_status == QueueStatus.PROCESSED: - sampled_bet.queue_status = QueueStatus.REPROCESSED - else: - raise ValueError( - f"Invalid queue number {sampled_bet.queue_status} detected. This bet should not have been sampled" - ) + sampled_bet.queue_status = sampled_bet.queue_status.next_status() self.store_bets() def send_message( diff --git a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py index 3eb9fd76..104c7b7b 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py @@ -48,11 +48,8 @@ def _blacklist(self) -> None: sampled_bet = self.bets[sampled_bet_index] # the question is blacklisted, i.e., we did not place a bet on it, - # therefore, we decrease the number of bets which was increased on sampling - if sampled_bet.queue_status == QueueStatus.TO_PROCESS: - sampled_bet.queue_status = QueueStatus.PROCESSED - elif sampled_bet.queue_status == QueueStatus.PROCESSED: - sampled_bet.queue_status = QueueStatus.REPROCESSED + # therefore, we bump to the queue status to next status + sampled_bet.queue_status = sampled_bet.queue_status.next_status() def setup(self) -> None: """Setup the behaviour""" diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 379470a7..87bb351e 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -45,6 +45,19 @@ class QueueStatus(Enum): PROCESSED = 2 # Bets that have been processed REPROCESSED = 3 # Bets that have been reprocessed + def next_status(self) -> "QueueStatus": + """Get the next status in the queue.""" + if self == QueueStatus.TO_PROCESS: + return QueueStatus.PROCESSED + elif self == QueueStatus.PROCESSED: + return QueueStatus.REPROCESSED + elif self == QueueStatus.REPROCESSED: + return QueueStatus.FRESH + else: + raise ValueError( + f"Invalid queue status {self} detected. This bet should not have been sampled" + ) + @dataclasses.dataclass(init=False) class PredictionResponse: From 5a92650481ed4e1325ccd622124ea8f3a77168b6 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 14:51:55 +0530 Subject: [PATCH 70/98] add: comment for missing functionality # the bets are stored here, but we do not update the hash in the synced db in the redeeming round # this will need to change if this sovereign agent is ever converted to a multi-agent service Co-Authored-By: Adamantios Zaras <14055874+Adamantios@users.noreply.github.com> --- packages/valory/skills/decision_maker_abci/behaviours/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index 1ee46c11..f410ae1d 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -363,6 +363,9 @@ def update_bet_transaction_information(self) -> None: sampled_bet.n_bets += 1 # Update Queue number for priority logic sampled_bet.queue_status = sampled_bet.queue_status.next_status() + + # the bets are stored here, but we do not update the hash in the synced db in the redeeming round + # this will need to change if this sovereign agent is ever converted to a multi-agent service self.store_bets() def send_message( From 24df90111c60fc965dadeab5ee5f69c80e9d1522 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 15:11:09 +0530 Subject: [PATCH 71/98] remove: unused imports - QueueStatus class import is not required anymore as we have added the functionalities in the class itself --- packages/valory/skills/decision_maker_abci/behaviours/base.py | 1 - .../valory/skills/decision_maker_abci/behaviours/blacklisting.py | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/base.py b/packages/valory/skills/decision_maker_abci/behaviours/base.py index f410ae1d..805518b7 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/base.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/base.py @@ -71,7 +71,6 @@ P_NO_FIELD, P_YES_FIELD, PredictionResponse, - QueueStatus, ) from packages.valory.skills.transaction_settlement_abci.payload_tools import ( hash_payload_to_hex, diff --git a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py index 104c7b7b..4aba1476 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/blacklisting.py @@ -28,7 +28,6 @@ from packages.valory.skills.decision_maker_abci.states.blacklisting import ( BlacklistingRound, ) -from packages.valory.skills.market_manager_abci.bets import QueueStatus class BlacklistingBehaviour(DecisionMakerBaseBehaviour): From 8f4677c6c37c7c8829afa659c7de7be684546062 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 15:18:48 +0530 Subject: [PATCH 72/98] update: streamline queuestatus operation - all the queue status transition and checks are moved to the main class itself --- .../skills/market_manager_abci/behaviours.py | 12 ++++------- .../valory/skills/market_manager_abci/bets.py | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index c3325ba3..ee6d3bd5 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -32,7 +32,6 @@ from packages.valory.skills.market_manager_abci.bets import ( Bet, BetsDecoder, - QueueStatus, serialize_bets, ) from packages.valory.skills.market_manager_abci.graph_tooling.requests import ( @@ -160,8 +159,7 @@ def _update_bets( def _requeue_all_bets(self) -> None: """Requeue all bets.""" for bet in self.bets: - if bet.queue_status != QueueStatus.EXPIRED: - bet.queue_status = QueueStatus.FRESH + bet.queue_status = bet.queue_status.move_to_fresh() def _blacklist_expired_bets(self) -> None: """Blacklist bets that are older than the opening margin.""" @@ -171,17 +169,15 @@ def _blacklist_expired_bets(self) -> None: def _bet_freshness_check_and_update(self) -> None: """Check the freshness of the bets.""" - fresh_statuses = {QueueStatus.FRESH} all_bets_fresh = all( - bet.queue_status in fresh_statuses + bet.queue_status.is_fresh() for bet in self.bets - if bet.queue_status is not QueueStatus.EXPIRED + if not bet.queue_status.is_expired() ) if all_bets_fresh: for bet in self.bets: - if bet.queue_status is not QueueStatus.EXPIRED: - bet.queue_status = QueueStatus.TO_PROCESS + bet.queue_status = bet.queue_status.move_to_process() def async_act(self) -> Generator: """Do the action.""" diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 87bb351e..c5ac2c0d 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -45,6 +45,26 @@ class QueueStatus(Enum): PROCESSED = 2 # Bets that have been processed REPROCESSED = 3 # Bets that have been reprocessed + def is_fresh(self) -> bool: + """Check if the bet is fresh.""" + return self == QueueStatus.FRESH + + def is_expired(self) -> bool: + """Check if the bet is expired.""" + return self == QueueStatus.EXPIRED + + def move_to_process(self) -> "QueueStatus": + """Move the bet to the process status.""" + if self == QueueStatus.FRESH: + return QueueStatus.TO_PROCESS + return self + + def move_to_fresh(self) -> "QueueStatus": + """Move the bet to the fresh status.""" + if self != QueueStatus.EXPIRED: + return QueueStatus.FRESH + return self + def next_status(self) -> "QueueStatus": """Get the next status in the queue.""" if self == QueueStatus.TO_PROCESS: From 328deea9d04b39750485551cfb8e580d4f35c14f Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 15:36:26 +0530 Subject: [PATCH 73/98] add: setup method to Update bets behaviour - moved from just reading the bets to checking for epoch end and blacklisting checks to update queue statuses and thus needs a setup method --- .../skills/market_manager_abci/behaviours.py | 54 +++++++++++-------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index ee6d3bd5..29fa1187 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -117,6 +117,33 @@ def __init__(self, **kwargs: Any) -> None: """Initialize `UpdateBetsBehaviour`.""" super().__init__(**kwargs) + def _requeue_all_bets(self) -> None: + """Requeue all bets.""" + for bet in self.bets: + bet.queue_status = bet.queue_status.move_to_fresh() + + def _blacklist_expired_bets(self) -> None: + """Blacklist bets that are older than the opening margin.""" + for bet in self.bets: + if self.synced_time >= bet.openingTimestamp - self.params.opening_margin: + bet.blacklist_forever() + + def setup(self) -> None: + """Set up the behaviour.""" + + # Read the bets from the agent's data dir as JSON, if they exist + self.read_bets() + + # fetch checkpoint status and if reached requeue all bets + if self.synchronized_data.is_checkpoint_reached: + self._requeue_all_bets() + + # blacklist bets that are older than the opening margin + # if trader ran after a long time + # helps in resetting the queue number to 0 + if self.bets: + self._blacklist_expired_bets() + def get_bet_idx(self, bet_id: str) -> Optional[int]: """Get the index of the bet with the given id, if it exists, otherwise `None`.""" return next((i for i, bet in enumerate(self.bets) if bet.id == bet_id), None) @@ -156,17 +183,6 @@ def _update_bets( bets_str = str(self.bets)[:MAX_LOG_SIZE] self.context.logger.info(f"Updated bets: {bets_str}") - def _requeue_all_bets(self) -> None: - """Requeue all bets.""" - for bet in self.bets: - bet.queue_status = bet.queue_status.move_to_fresh() - - def _blacklist_expired_bets(self) -> None: - """Blacklist bets that are older than the opening margin.""" - for bet in self.bets: - if self.synced_time >= bet.openingTimestamp - self.params.opening_margin: - bet.blacklist_forever() - def _bet_freshness_check_and_update(self) -> None: """Check the freshness of the bets.""" all_bets_fresh = all( @@ -178,22 +194,14 @@ def _bet_freshness_check_and_update(self) -> None: if all_bets_fresh: for bet in self.bets: bet.queue_status = bet.queue_status.move_to_process() + else: + return def async_act(self) -> Generator: """Do the action.""" with self.context.benchmark_tool.measure(self.behaviour_id).local(): - # Read the bets from the agent's data dir as JSON, if they exist - self.read_bets() - - # fetch checkpoint status and if reached requeue all bets - if self.synchronized_data.is_checkpoint_reached: - self._requeue_all_bets() - - # blacklist bets that are older than the opening margin - # if trader ran after a long time - # helps in resetting the queue number to 0 - if self.bets: - self._blacklist_expired_bets() + # Setup the behaviour + self.setup() # Update the bets list with new bets or update existing ones yield from self._update_bets() From d2755f3193774e7c5b33b48148b5ee0f50e5027d Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 15:44:33 +0530 Subject: [PATCH 74/98] update: improve bet sorting by queues status --- .../behaviours/sampling.py | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index adb68552..187c74e2 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -19,8 +19,10 @@ """This module contains the behaviour for sampling a bet.""" +from collections import defaultdict from datetime import datetime from typing import Any, Generator, List, Optional, Tuple +from typing_extensions import Dict from packages.valory.skills.decision_maker_abci.behaviours.base import ( DecisionMakerBaseBehaviour, @@ -97,19 +99,16 @@ def _get_bets_queue_wise( ) -> Tuple[List[Bet], List[Bet], List[Bet]]: """Return a dictionary of bets with queue status as key.""" - to_process_bets: List[Bet] = [] - processed_bets: List[Bet] = [] - reprocessed_bets: List[Bet] = [] + bets_by_status: Dict[QueueStatus, List[Bet]] = defaultdict(list) for bet in bets: - if bet.queue_status == QueueStatus.TO_PROCESS: - to_process_bets.append(bet) - elif bet.queue_status == QueueStatus.PROCESSED: - processed_bets.append(bet) - elif bet.queue_status == QueueStatus.REPROCESSED: - reprocessed_bets.append(bet) - - return to_process_bets, processed_bets, reprocessed_bets + bets_by_status[bet.queue_status].append(bet) + + return ( + bets_by_status[QueueStatus.TO_PROCESS], + bets_by_status[QueueStatus.PROCESSED], + bets_by_status[QueueStatus.REPROCESSED], + ) def _sampled_bet_idx(self, bets: List[Bet]) -> Optional[int]: """ From ae60986248f59e299ea4d24c52c776d90b458f1c Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 16:57:15 +0530 Subject: [PATCH 75/98] update: sampled bet idx return type --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 187c74e2..58f8a735 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -110,7 +110,7 @@ def _get_bets_queue_wise( bets_by_status[QueueStatus.REPROCESSED], ) - def _sampled_bet_idx(self, bets: List[Bet]) -> Optional[int]: + def _sampled_bet_idx(self, bets: List[Bet]) -> int: """ Sample a bet and return its index. From bd1afd073ace9019088f851ddb74e0b1269b9dec Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 17:02:12 +0530 Subject: [PATCH 76/98] fix: bets decoder for bet format - adding new attribute for trader that were working on older bet logic --- packages/valory/skills/market_manager_abci/bets.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index c5ac2c0d..ba4dd0d8 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -312,8 +312,15 @@ def hook(data: Dict[str, Any]) -> Union[Bet, PredictionResponse, Dict[str, Bet]] # if this is a `Bet` bet_annotations = sorted(Bet.__annotations__.keys()) if bet_annotations == data_attributes: - data["queue_status"] = QueueStatus(data["queue_status"]) return Bet(**data) + else: + # fetch missing attributes from the data + missing_attributes = set(bet_annotations) - set(data_attributes) + new_attributes = {"queue_status", "invested_amount"} + if missing_attributes == new_attributes: + data["queue_status"] = QueueStatus(0) + data["invested_amount"] = 0 + return Bet(**data) return data From 2ff375dd0d7a1d4248d23db3f88be4ddb73b012b Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 17:03:50 +0530 Subject: [PATCH 77/98] bump: hashes for packages --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 8 ++++---- .../valory/skills/market_manager_abci/skill.yaml | 4 ++-- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index bc5bd71d..258649af 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4", - "skill/valory/decision_maker_abci/0.1.0": "bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie", - "skill/valory/trader_abci/0.1.0": "bafybeidikyhe4ole3nedmfqmgmxd63zmgnojviyjdv4jf2q7rv7kdqcifi", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeienjc2l65c7o77vkuoxogaduvgohs7c2xhuonmrj5vbvaaag6kjai", + "skill/valory/market_manager_abci/0.1.0": "bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q", + "skill/valory/decision_maker_abci/0.1.0": "bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy", + "skill/valory/trader_abci/0.1.0": "bafybeigtwfwpsg6bvts3anrwj34tt64ms5mvjbh4nyx5eilr7rqg7xrfey", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeifqfwx6j6k7vzyoptvshglrrgjt6foeo2zob7mlv2vlnsvhiupssa", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeibg76o3eq6egkk3vp7yrtbp65vorczlwz657tml7ujnkvw4w3iuci", - "service/valory/trader/0.1.0": "bafybeib5vbdfambusgtfn2b5spvn554yphyokeka6ayysflma4zxhyywve", - "service/valory/trader_pearl/0.1.0": "bafybeiedff4y5r3taeps5tim4cggefanqgdrxz3bjaxcjedfevnwaf5i5u" + "agent/valory/trader/0.1.0": "bafybeie5itcq2gf2vg2qlqavs4acveroco6z6qem5vq7ekexvtnjzyox5i", + "service/valory/trader/0.1.0": "bafybeiaj7emxzeakczkmy6kqeueocykzxdwls5aewxh2qktgyj234lgsna", + "service/valory/trader_pearl/0.1.0": "bafybeia7l7kxkxi2lhodywnuq26nmlvrrezxr5xyg6lauxkhdlir6ip2yq" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 9c8bb585..c1fcb9e7 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeienjc2l65c7o77vkuoxogaduvgohs7c2xhuonmrj5vbvaaag6kjai -- valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 -- valory/decision_maker_abci:0.1.0:bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie -- valory/trader_abci:0.1.0:bafybeidikyhe4ole3nedmfqmgmxd63zmgnojviyjdv4jf2q7rv7kdqcifi +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifqfwx6j6k7vzyoptvshglrrgjt6foeo2zob7mlv2vlnsvhiupssa +- valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q +- valory/decision_maker_abci:0.1.0:bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy +- valory/trader_abci:0.1.0:bafybeigtwfwpsg6bvts3anrwj34tt64ms5mvjbh4nyx5eilr7rqg7xrfey - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index a74982e3..4b0802eb 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeibg76o3eq6egkk3vp7yrtbp65vorczlwz657tml7ujnkvw4w3iuci +agent: valory/trader:0.1.0:bafybeie5itcq2gf2vg2qlqavs4acveroco6z6qem5vq7ekexvtnjzyox5i number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index a160b9e5..949c1a2d 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeibg76o3eq6egkk3vp7yrtbp65vorczlwz657tml7ujnkvw4w3iuci +agent: valory/trader:0.1.0:bafybeie5itcq2gf2vg2qlqavs4acveroco6z6qem5vq7ekexvtnjzyox5i number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 9315422f..e9e90213 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -12,9 +12,9 @@ fingerprint: README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky - behaviours/base.py: bafybeic2fxlidmklpfkv4fxs7rusxd3vyddo6bsxqh4z32hz2v4segikue + behaviours/base.py: bafybeieqvxpzjnwjgq4ffhjojle2q7onif44nefrlza6pxriewisqcm324 behaviours/bet_placement.py: bafybeia4listbfzsk4n4wkc4ycaftxgywjnl3mmpcqhuo3nwwia4n3oufu - behaviours/blacklisting.py: bafybeif7gtifpsiqvnpbzyegzsqndhf4yqcqedkfy24q32v4bdyjeihyem + behaviours/blacklisting.py: bafybeicah7vcruhbakrhpsxdmw3ftq72o5e3plfhhqsnvhk3vk6iud6og4 behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e behaviours/decision_receive.py: bafybeifrsnxref7yyl4hq4nmh4xa4rden4wygv5y5ugvqb5ji7zgj7mv5m @@ -24,7 +24,7 @@ fingerprint: behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeid5ehttobzqsx4hxdjbu7iwhd472xqgurug6eitcrp75jtthiyxv4 + behaviours/sampling.py: bafybeifrhpixcgp2q22mh2xz4j4mqv64vx4hmmsokweeubehpogxsbpwjm behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 +- valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 55957c40..03e70542 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -8,8 +8,8 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e - behaviours.py: bafybeibppnnn5qmzc25lqna4taegwfrt7meipvmzytkjtui2tnjudc6q34 - bets.py: bafybeiehjifg77e3xecfy2y3bj4zcxhvdgrqiilhc6sjrnfl2gz5pddz5a + behaviours.py: bafybeiangnlzwclgs672dowuwjvjfzlyez7nqmnvongidfkq4xxmks4nju + bets.py: bafybeiehjsx3caibmcwozj6j7at4uswdrnlvh67bkgljwtog5l6mvmu3q4 dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 81dd2cfe..b20a0b75 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeie2dby7d5rh7lqapqazlpa37ryehl335bgnkoym7kkxcpt2fyjgw4 -- valory/decision_maker_abci:0.1.0:bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeienjc2l65c7o77vkuoxogaduvgohs7c2xhuonmrj5vbvaaag6kjai +- valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q +- valory/decision_maker_abci:0.1.0:bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifqfwx6j6k7vzyoptvshglrrgjt6foeo2zob7mlv2vlnsvhiupssa - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 71f47812..e3156e4f 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeif2crsr4ga655mngnq2eu7itmshvrlom726aouwxrgrwy4wymvpie +- valory/decision_maker_abci:0.1.0:bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 98c50c57341e26d1d314f9bf777dfd3b76a337e0 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 17:07:04 +0530 Subject: [PATCH 78/98] fix: wrong Dict import --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 58f8a735..f33b5545 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -21,8 +21,7 @@ from collections import defaultdict from datetime import datetime -from typing import Any, Generator, List, Optional, Tuple -from typing_extensions import Dict +from typing import Any, Dict, Generator, List, Optional, Tuple from packages.valory.skills.decision_maker_abci.behaviours.base import ( DecisionMakerBaseBehaviour, From ad354de802ba12a0e18b0de746e6f6eb3522f1c1 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 17:12:33 +0530 Subject: [PATCH 79/98] bump: package hashes --- packages/packages.json | 12 ++++++------ packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 258649af..3051fb44 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", "skill/valory/market_manager_abci/0.1.0": "bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q", - "skill/valory/decision_maker_abci/0.1.0": "bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy", - "skill/valory/trader_abci/0.1.0": "bafybeigtwfwpsg6bvts3anrwj34tt64ms5mvjbh4nyx5eilr7rqg7xrfey", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeifqfwx6j6k7vzyoptvshglrrgjt6foeo2zob7mlv2vlnsvhiupssa", + "skill/valory/decision_maker_abci/0.1.0": "bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy", + "skill/valory/trader_abci/0.1.0": "bafybeifkuvcvuqq5jubezmlcyqa3rm5kyzxu46t6gtrswc47ad44bus3ra", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiaafw6warjxwt42cxjdpxri73nftpg73bqcighccozzdrnpko4rre", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeie5itcq2gf2vg2qlqavs4acveroco6z6qem5vq7ekexvtnjzyox5i", - "service/valory/trader/0.1.0": "bafybeiaj7emxzeakczkmy6kqeueocykzxdwls5aewxh2qktgyj234lgsna", - "service/valory/trader_pearl/0.1.0": "bafybeia7l7kxkxi2lhodywnuq26nmlvrrezxr5xyg6lauxkhdlir6ip2yq" + "agent/valory/trader/0.1.0": "bafybeieah2cqykw37xdhatsmchgrbyxsilof4aoi2bbtb2aytglxpev3jq", + "service/valory/trader/0.1.0": "bafybeieipt5kv3m7prvlh3nkve36vmdrokbzpyg457umyfrlmxhxod4uta", + "service/valory/trader_pearl/0.1.0": "bafybeiae6nrhdzzvphzbp7sq3qs3drvuga6xi34tl2eb7n7gfg5ensizj4" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index c1fcb9e7..862882f1 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifqfwx6j6k7vzyoptvshglrrgjt6foeo2zob7mlv2vlnsvhiupssa +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaafw6warjxwt42cxjdpxri73nftpg73bqcighccozzdrnpko4rre - valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q -- valory/decision_maker_abci:0.1.0:bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy -- valory/trader_abci:0.1.0:bafybeigtwfwpsg6bvts3anrwj34tt64ms5mvjbh4nyx5eilr7rqg7xrfey +- valory/decision_maker_abci:0.1.0:bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy +- valory/trader_abci:0.1.0:bafybeifkuvcvuqq5jubezmlcyqa3rm5kyzxu46t6gtrswc47ad44bus3ra - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 4b0802eb..164708a0 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeie5itcq2gf2vg2qlqavs4acveroco6z6qem5vq7ekexvtnjzyox5i +agent: valory/trader:0.1.0:bafybeieah2cqykw37xdhatsmchgrbyxsilof4aoi2bbtb2aytglxpev3jq number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 949c1a2d..f1f5fea4 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeie5itcq2gf2vg2qlqavs4acveroco6z6qem5vq7ekexvtnjzyox5i +agent: valory/trader:0.1.0:bafybeieah2cqykw37xdhatsmchgrbyxsilof4aoi2bbtb2aytglxpev3jq number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index e9e90213..a853fcbc 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -24,7 +24,7 @@ fingerprint: behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeifrhpixcgp2q22mh2xz4j4mqv64vx4hmmsokweeubehpogxsbpwjm + behaviours/sampling.py: bafybeihkyy5s347ym25g7wf3tfz6jbosqdayfio5erxvpekyhvlsrokikm behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index b20a0b75..64f95966 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,8 +27,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q -- valory/decision_maker_abci:0.1.0:bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifqfwx6j6k7vzyoptvshglrrgjt6foeo2zob7mlv2vlnsvhiupssa +- valory/decision_maker_abci:0.1.0:bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaafw6warjxwt42cxjdpxri73nftpg73bqcighccozzdrnpko4rre - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index e3156e4f..9d19a216 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeihax7bpydnecls7nhovhli5bn35rxmqqxf6o4s7hfd5o7tc5krxiy +- valory/decision_maker_abci:0.1.0:bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 110d60f5d376657eef8b73ae42d7e42957411d44 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 18:51:24 +0530 Subject: [PATCH 80/98] fix: queustatus fetching during read --- packages/valory/skills/market_manager_abci/bets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index ba4dd0d8..47fa332b 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -312,6 +312,7 @@ def hook(data: Dict[str, Any]) -> Union[Bet, PredictionResponse, Dict[str, Bet]] # if this is a `Bet` bet_annotations = sorted(Bet.__annotations__.keys()) if bet_annotations == data_attributes: + data["queue_status"] = QueueStatus(data["queue_status"]) return Bet(**data) else: # fetch missing attributes from the data From cf4167926cd863557c49d73ccc88e2d13df23918 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 18:53:22 +0530 Subject: [PATCH 81/98] bump: update package hashes --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- .../valory/skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 3051fb44..1823dfb6 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q", - "skill/valory/decision_maker_abci/0.1.0": "bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy", - "skill/valory/trader_abci/0.1.0": "bafybeifkuvcvuqq5jubezmlcyqa3rm5kyzxu46t6gtrswc47ad44bus3ra", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiaafw6warjxwt42cxjdpxri73nftpg73bqcighccozzdrnpko4rre", + "skill/valory/market_manager_abci/0.1.0": "bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y", + "skill/valory/decision_maker_abci/0.1.0": "bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe", + "skill/valory/trader_abci/0.1.0": "bafybeihdkqrzl6mh5loqyjmzdqkyse6ajzrh4vbejzvc4vb66bcxjg4lvq", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihiayd57of5jmfuouovzqxafint5hdz6gpisb667hzxmcblcdhmmu", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeieah2cqykw37xdhatsmchgrbyxsilof4aoi2bbtb2aytglxpev3jq", - "service/valory/trader/0.1.0": "bafybeieipt5kv3m7prvlh3nkve36vmdrokbzpyg457umyfrlmxhxod4uta", - "service/valory/trader_pearl/0.1.0": "bafybeiae6nrhdzzvphzbp7sq3qs3drvuga6xi34tl2eb7n7gfg5ensizj4" + "agent/valory/trader/0.1.0": "bafybeicuqz5dsyet3axftzx3qnz24dhxxl6ckahngrpdcrsvzfsd3agsga", + "service/valory/trader/0.1.0": "bafybeidk36yrloeifslmtlkixk7y3twrvnhqz2r6wvkukg5mwe6exawyvi", + "service/valory/trader_pearl/0.1.0": "bafybeibtggywfegq5d5fffvtk5gnbyx6lzzwxpbd3q454k3trghxk472tm" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 862882f1..fd04de28 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaafw6warjxwt42cxjdpxri73nftpg73bqcighccozzdrnpko4rre -- valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q -- valory/decision_maker_abci:0.1.0:bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy -- valory/trader_abci:0.1.0:bafybeifkuvcvuqq5jubezmlcyqa3rm5kyzxu46t6gtrswc47ad44bus3ra +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihiayd57of5jmfuouovzqxafint5hdz6gpisb667hzxmcblcdhmmu +- valory/market_manager_abci:0.1.0:bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y +- valory/decision_maker_abci:0.1.0:bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe +- valory/trader_abci:0.1.0:bafybeihdkqrzl6mh5loqyjmzdqkyse6ajzrh4vbejzvc4vb66bcxjg4lvq - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 164708a0..28f40ac6 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeieah2cqykw37xdhatsmchgrbyxsilof4aoi2bbtb2aytglxpev3jq +agent: valory/trader:0.1.0:bafybeicuqz5dsyet3axftzx3qnz24dhxxl6ckahngrpdcrsvzfsd3agsga number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index f1f5fea4..c147920d 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeieah2cqykw37xdhatsmchgrbyxsilof4aoi2bbtb2aytglxpev3jq +agent: valory/trader:0.1.0:bafybeicuqz5dsyet3axftzx3qnz24dhxxl6ckahngrpdcrsvzfsd3agsga number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index a853fcbc..0db969d8 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q +- valory/market_manager_abci:0.1.0:bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 03e70542..11e98a78 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -9,7 +9,7 @@ fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeiangnlzwclgs672dowuwjvjfzlyez7nqmnvongidfkq4xxmks4nju - bets.py: bafybeiehjsx3caibmcwozj6j7at4uswdrnlvh67bkgljwtog5l6mvmu3q4 + bets.py: bafybeig3gfx767q5qxbpipqtiwuzqcg7chud44mytmg3hxyddisuyptxhm dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 64f95966..cdfd490f 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeifusbfvt6eaopmsl6rr3hupl4o6opsencnb7w4tnmxqyuu2bksh6q -- valory/decision_maker_abci:0.1.0:bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaafw6warjxwt42cxjdpxri73nftpg73bqcighccozzdrnpko4rre +- valory/market_manager_abci:0.1.0:bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y +- valory/decision_maker_abci:0.1.0:bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihiayd57of5jmfuouovzqxafint5hdz6gpisb667hzxmcblcdhmmu - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 9d19a216..8774951b 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeibio4bjgo4r4d2wx6vlio77xk3ccum5tqy2phg6pjqinff7xe4vxy +- valory/decision_maker_abci:0.1.0:bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From cc08251253f09f94aa4e35b695e7689e65635922 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 21:07:32 +0530 Subject: [PATCH 82/98] update: setup call not required - frameworks makes the setup call automatically. Co-Authored-By: Adamantios Zaras <14055874+Adamantios@users.noreply.github.com> --- packages/valory/skills/market_manager_abci/behaviours.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index 29fa1187..a4e29fde 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -194,15 +194,12 @@ def _bet_freshness_check_and_update(self) -> None: if all_bets_fresh: for bet in self.bets: bet.queue_status = bet.queue_status.move_to_process() - else: - return + + return def async_act(self) -> Generator: """Do the action.""" with self.context.benchmark_tool.measure(self.behaviour_id).local(): - # Setup the behaviour - self.setup() - # Update the bets list with new bets or update existing ones yield from self._update_bets() From 769e7a7db1476b15f06fd76f57e9685a2bcb001a Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 21:08:20 +0530 Subject: [PATCH 83/98] fix: none return from sampling Co-Authored-By: Adamantios Zaras <14055874+Adamantios@users.noreply.github.com> --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index f33b5545..2708f812 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -168,10 +168,7 @@ def _sample(self) -> Optional[int]: # sample a bet using the priority logic idx = self._sampled_bet_idx(available_bets) - if idx: - sampled_bet = self.bets[idx] - else: - return None + sampled_bet = self.bets[idx] # fetch the liquidity of the sampled bet and cache it liquidity = sampled_bet.scaledLiquidityMeasure From 851eb5d9192841491a24f70280238decc829f161 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 21:13:08 +0530 Subject: [PATCH 84/98] bump: update hashes --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 4 ++-- .../valory/skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 1823dfb6..877c94bf 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y", - "skill/valory/decision_maker_abci/0.1.0": "bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe", - "skill/valory/trader_abci/0.1.0": "bafybeihdkqrzl6mh5loqyjmzdqkyse6ajzrh4vbejzvc4vb66bcxjg4lvq", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihiayd57of5jmfuouovzqxafint5hdz6gpisb667hzxmcblcdhmmu", + "skill/valory/market_manager_abci/0.1.0": "bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm", + "skill/valory/decision_maker_abci/0.1.0": "bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy", + "skill/valory/trader_abci/0.1.0": "bafybeiatoulr7ixa5unl5xjfumeu5eqofmxhd7pz76cgqj3ukheiplkdba", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiftifg2cv6eq2t6ddkar4gyk4hft2lfmgarviazg6maiml27de5a4", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeicuqz5dsyet3axftzx3qnz24dhxxl6ckahngrpdcrsvzfsd3agsga", - "service/valory/trader/0.1.0": "bafybeidk36yrloeifslmtlkixk7y3twrvnhqz2r6wvkukg5mwe6exawyvi", - "service/valory/trader_pearl/0.1.0": "bafybeibtggywfegq5d5fffvtk5gnbyx6lzzwxpbd3q454k3trghxk472tm" + "agent/valory/trader/0.1.0": "bafybeibfr3fvbovc26dnthqcqhz5jf6e4net2shikj4pdd3fxfudtzs5ru", + "service/valory/trader/0.1.0": "bafybeiapojfle3hjd3m32tzmwmwig3mttqmy4tdaqxtexv2dugvvv6y4fi", + "service/valory/trader_pearl/0.1.0": "bafybeiaxag3hzd5xkuwmnz5f3wndsju2vvrkzq2dztwi23kcfueqdt26jy" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index fd04de28..81a05486 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihiayd57of5jmfuouovzqxafint5hdz6gpisb667hzxmcblcdhmmu -- valory/market_manager_abci:0.1.0:bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y -- valory/decision_maker_abci:0.1.0:bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe -- valory/trader_abci:0.1.0:bafybeihdkqrzl6mh5loqyjmzdqkyse6ajzrh4vbejzvc4vb66bcxjg4lvq +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiftifg2cv6eq2t6ddkar4gyk4hft2lfmgarviazg6maiml27de5a4 +- valory/market_manager_abci:0.1.0:bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm +- valory/decision_maker_abci:0.1.0:bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy +- valory/trader_abci:0.1.0:bafybeiatoulr7ixa5unl5xjfumeu5eqofmxhd7pz76cgqj3ukheiplkdba - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 28f40ac6..3e67c93f 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeicuqz5dsyet3axftzx3qnz24dhxxl6ckahngrpdcrsvzfsd3agsga +agent: valory/trader:0.1.0:bafybeibfr3fvbovc26dnthqcqhz5jf6e4net2shikj4pdd3fxfudtzs5ru number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index c147920d..92aeb92f 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeicuqz5dsyet3axftzx3qnz24dhxxl6ckahngrpdcrsvzfsd3agsga +agent: valory/trader:0.1.0:bafybeibfr3fvbovc26dnthqcqhz5jf6e4net2shikj4pdd3fxfudtzs5ru number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 0db969d8..7970ee24 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -24,7 +24,7 @@ fingerprint: behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeihkyy5s347ym25g7wf3tfz6jbosqdayfio5erxvpekyhvlsrokikm + behaviours/sampling.py: bafybeihe2waj53xrhonw4mgipagsgl3xoorcwzuqzyxwhn3mw7mjyeewfa behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y +- valory/market_manager_abci:0.1.0:bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 11e98a78..20e9d701 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e - behaviours.py: bafybeiangnlzwclgs672dowuwjvjfzlyez7nqmnvongidfkq4xxmks4nju + behaviours.py: bafybeigizqjq6t7pxbqno2lvubjjdvqajkcpgh6powei5v6hyjguldxbmq bets.py: bafybeig3gfx767q5qxbpipqtiwuzqcg7chud44mytmg3hxyddisuyptxhm dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index cdfd490f..bb55bf6b 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeidry7jjv6ksntjnlk4dwmbmmvshtiadsb3dkvjrpyahzemmkqdb7y -- valory/decision_maker_abci:0.1.0:bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihiayd57of5jmfuouovzqxafint5hdz6gpisb667hzxmcblcdhmmu +- valory/market_manager_abci:0.1.0:bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm +- valory/decision_maker_abci:0.1.0:bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiftifg2cv6eq2t6ddkar4gyk4hft2lfmgarviazg6maiml27de5a4 - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 8774951b..3a7c1289 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeihjvmiajnxgqmkicsaewzmlyvsdvvbhy2a42cchugz3qf7z6d6vfe +- valory/decision_maker_abci:0.1.0:bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From de956ada336447fe7a05167fb64d840850f64ebd Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 22:17:23 +0530 Subject: [PATCH 85/98] update: bets file path for multi bets --- .../skills/market_manager_abci/behaviours.py | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index a4e29fde..c895a1b9 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -47,6 +47,7 @@ BETS_FILENAME = "bets.json" +MULTI_BETS_FILENAME = "multi_bets.json" READ_MODE = "r" WRITE_MODE = "w" @@ -58,6 +59,7 @@ def __init__(self, **kwargs: Any) -> None: """Initialize `BetsManagerBehaviour`.""" super().__init__(**kwargs) self.bets: List[Bet] = [] + self.multi_bets_filepath: str = self.params.store_path / MULTI_BETS_FILENAME self.bets_filepath: str = self.params.store_path / BETS_FILENAME def store_bets(self) -> None: @@ -68,14 +70,14 @@ def store_bets(self) -> None: return try: - with open(self.bets_filepath, WRITE_MODE) as bets_file: + with open(self.multi_bets_filepath, WRITE_MODE) as bets_file: try: bets_file.write(serialized) return except (IOError, OSError): - err = f"Error writing to file {self.bets_filepath!r}!" + err = f"Error writing to file {self.multi_bets_filepath!r}!" except (FileNotFoundError, PermissionError, OSError): - err = f"Error opening file {self.bets_filepath!r} in write mode!" + err = f"Error opening file {self.multi_bets_filepath!r} in write mode!" self.context.logger.error(err) @@ -83,29 +85,33 @@ def read_bets(self) -> None: """Read the bets from the agent's data dir as JSON.""" self.bets = [] - if not os.path.isfile(self.bets_filepath): + _read_path = self.multi_bets_filepath + if not os.path.isfile(_read_path): self.context.logger.warning( - f"No stored bets file was detected in {self.bets_filepath}. Assuming bets are empty." + f"No stored bets file was detected in {self.multi_bets_filepath}. Assuming trader is being run for the first time in multi-bets mode." + ) + _read_path = self.bets_filepath + elif not os.path.isfile(_read_path): + self.context.logger.warning( + f"No stored bets file was detected in {self.bets_filepath}. Assuming bets are empty" ) return try: - with open(self.bets_filepath, READ_MODE) as bets_file: + with open(_read_path, READ_MODE) as bets_file: try: self.bets = json.load(bets_file, cls=BetsDecoder) return except (JSONDecodeError, TypeError): - err = ( - f"Error decoding file {self.bets_filepath!r} to a list of bets!" - ) + err = f"Error decoding file {_read_path!r} to a list of bets!" except (FileNotFoundError, PermissionError, OSError): - err = f"Error opening file {self.bets_filepath!r} in read mode!" + err = f"Error opening file {_read_path!r} in read mode!" self.context.logger.error(err) def hash_stored_bets(self) -> str: """Get the hash of the stored bets' file.""" - return IPFSHashOnly.hash_file(self.bets_filepath) + return IPFSHashOnly.hash_file(self.multi_bets_filepath) class UpdateBetsBehaviour(BetsManagerBehaviour, QueryingBehaviour): From c9154596b8c2b549f591b60906d9b683b991b739 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 22:18:54 +0530 Subject: [PATCH 86/98] update: streamline bets read path --- packages/valory/skills/market_manager_abci/behaviours.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/behaviours.py b/packages/valory/skills/market_manager_abci/behaviours.py index c895a1b9..99952313 100644 --- a/packages/valory/skills/market_manager_abci/behaviours.py +++ b/packages/valory/skills/market_manager_abci/behaviours.py @@ -84,16 +84,16 @@ def store_bets(self) -> None: def read_bets(self) -> None: """Read the bets from the agent's data dir as JSON.""" self.bets = [] - _read_path = self.multi_bets_filepath + if not os.path.isfile(_read_path): self.context.logger.warning( - f"No stored bets file was detected in {self.multi_bets_filepath}. Assuming trader is being run for the first time in multi-bets mode." + f"No stored bets file was detected in {_read_path}. Assuming trader is being run for the first time in multi-bets mode." ) _read_path = self.bets_filepath elif not os.path.isfile(_read_path): self.context.logger.warning( - f"No stored bets file was detected in {self.bets_filepath}. Assuming bets are empty" + f"No stored bets file was detected in {_read_path}. Assuming bets are empty" ) return From 35610f2dc47d786ce04ffb0d4f6dc7260f4b55ad Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 22:23:40 +0530 Subject: [PATCH 87/98] bump: update hashes with read changes --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- .../valory/skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 877c94bf..951c5076 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm", - "skill/valory/decision_maker_abci/0.1.0": "bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy", - "skill/valory/trader_abci/0.1.0": "bafybeiatoulr7ixa5unl5xjfumeu5eqofmxhd7pz76cgqj3ukheiplkdba", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiftifg2cv6eq2t6ddkar4gyk4hft2lfmgarviazg6maiml27de5a4", + "skill/valory/market_manager_abci/0.1.0": "bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu", + "skill/valory/decision_maker_abci/0.1.0": "bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4", + "skill/valory/trader_abci/0.1.0": "bafybeicugmzsmgymq22qqnbta57pxh3hfb5yhuwzebkrwoyhrgjuw6kgkm", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeid7rfdqy4d6qemyeew2hjf4rxwa7jddc6vizl3rks43m6p6unif6u", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeibfr3fvbovc26dnthqcqhz5jf6e4net2shikj4pdd3fxfudtzs5ru", - "service/valory/trader/0.1.0": "bafybeiapojfle3hjd3m32tzmwmwig3mttqmy4tdaqxtexv2dugvvv6y4fi", - "service/valory/trader_pearl/0.1.0": "bafybeiaxag3hzd5xkuwmnz5f3wndsju2vvrkzq2dztwi23kcfueqdt26jy" + "agent/valory/trader/0.1.0": "bafybeihrar7sobb4ipbgqklzj2fcofcgmncutqxpnnqirzytoiowquwtaa", + "service/valory/trader/0.1.0": "bafybeibhqg4lawv2o2wbx3ndjepv3d5r5fmlqhq4dmfxj3rlea7zokabxe", + "service/valory/trader_pearl/0.1.0": "bafybeid7olv66kfcv6itby346xihn4cd7ftyz4xx33njdj6xno6my6hxe4" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 81a05486..e5fd5540 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiftifg2cv6eq2t6ddkar4gyk4hft2lfmgarviazg6maiml27de5a4 -- valory/market_manager_abci:0.1.0:bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm -- valory/decision_maker_abci:0.1.0:bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy -- valory/trader_abci:0.1.0:bafybeiatoulr7ixa5unl5xjfumeu5eqofmxhd7pz76cgqj3ukheiplkdba +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid7rfdqy4d6qemyeew2hjf4rxwa7jddc6vizl3rks43m6p6unif6u +- valory/market_manager_abci:0.1.0:bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu +- valory/decision_maker_abci:0.1.0:bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4 +- valory/trader_abci:0.1.0:bafybeicugmzsmgymq22qqnbta57pxh3hfb5yhuwzebkrwoyhrgjuw6kgkm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 3e67c93f..8704f34f 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeibfr3fvbovc26dnthqcqhz5jf6e4net2shikj4pdd3fxfudtzs5ru +agent: valory/trader:0.1.0:bafybeihrar7sobb4ipbgqklzj2fcofcgmncutqxpnnqirzytoiowquwtaa number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 92aeb92f..279a3c6c 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeibfr3fvbovc26dnthqcqhz5jf6e4net2shikj4pdd3fxfudtzs5ru +agent: valory/trader:0.1.0:bafybeihrar7sobb4ipbgqklzj2fcofcgmncutqxpnnqirzytoiowquwtaa number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 7970ee24..ddf9fdb2 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm +- valory/market_manager_abci:0.1.0:bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 20e9d701..9078ebdd 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e - behaviours.py: bafybeigizqjq6t7pxbqno2lvubjjdvqajkcpgh6powei5v6hyjguldxbmq + behaviours.py: bafybeicfoszavcyrzahe6qaydlaf27mpbwui7a6wgdbstydbzxmdisxhju bets.py: bafybeig3gfx767q5qxbpipqtiwuzqcg7chud44mytmg3hxyddisuyptxhm dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index bb55bf6b..cb8f6dcc 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeibkxfy4htyhdigqpzkm462haq64dnhke4os5n2mcgwcxgs5kinrrm -- valory/decision_maker_abci:0.1.0:bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiftifg2cv6eq2t6ddkar4gyk4hft2lfmgarviazg6maiml27de5a4 +- valory/market_manager_abci:0.1.0:bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu +- valory/decision_maker_abci:0.1.0:bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid7rfdqy4d6qemyeew2hjf4rxwa7jddc6vizl3rks43m6p6unif6u - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index 3a7c1289..bdce2747 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeih4vtttuiow5itny5kytgwr2krprhdij6exkusxpljyfx7sw3upoy +- valory/decision_maker_abci:0.1.0:bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4 - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 40e2c4c2e2d88d98f81de5115115ec92adf23628 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 22:33:13 +0530 Subject: [PATCH 88/98] fix: error raise on transition - anyother cicrcumstane of bet instance is not possible --- packages/valory/skills/market_manager_abci/bets.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 47fa332b..2a4d8c95 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -73,10 +73,6 @@ def next_status(self) -> "QueueStatus": return QueueStatus.REPROCESSED elif self == QueueStatus.REPROCESSED: return QueueStatus.FRESH - else: - raise ValueError( - f"Invalid queue status {self} detected. This bet should not have been sampled" - ) @dataclasses.dataclass(init=False) From c05a71779059bdc678e96412a5268a3fd880f6a3 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 22:35:50 +0530 Subject: [PATCH 89/98] update: next status transition --- packages/valory/skills/market_manager_abci/bets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 2a4d8c95..704217e0 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -71,7 +71,7 @@ def next_status(self) -> "QueueStatus": return QueueStatus.PROCESSED elif self == QueueStatus.PROCESSED: return QueueStatus.REPROCESSED - elif self == QueueStatus.REPROCESSED: + else: return QueueStatus.FRESH From fd35046ac5b8f7b7daeac5b4e97b704c22dd519a Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 6 Dec 2024 22:37:20 +0530 Subject: [PATCH 90/98] bump: update hashes --- packages/packages.json | 14 +++++++------- packages/valory/agents/trader/aea-config.yaml | 8 ++++---- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 2 +- .../valory/skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 951c5076..0a929d34 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu", - "skill/valory/decision_maker_abci/0.1.0": "bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4", - "skill/valory/trader_abci/0.1.0": "bafybeicugmzsmgymq22qqnbta57pxh3hfb5yhuwzebkrwoyhrgjuw6kgkm", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeid7rfdqy4d6qemyeew2hjf4rxwa7jddc6vizl3rks43m6p6unif6u", + "skill/valory/market_manager_abci/0.1.0": "bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi", + "skill/valory/decision_maker_abci/0.1.0": "bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e", + "skill/valory/trader_abci/0.1.0": "bafybeieauih4nqotqjiamd2mrehjvxxbq7astbt2ypnltokhkvdjqzrkkm", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeie433saaj7gn6ronam3eaaneqnr6fjcjnpchkswqjye2jfv5rntfi", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeihrar7sobb4ipbgqklzj2fcofcgmncutqxpnnqirzytoiowquwtaa", - "service/valory/trader/0.1.0": "bafybeibhqg4lawv2o2wbx3ndjepv3d5r5fmlqhq4dmfxj3rlea7zokabxe", - "service/valory/trader_pearl/0.1.0": "bafybeid7olv66kfcv6itby346xihn4cd7ftyz4xx33njdj6xno6my6hxe4" + "agent/valory/trader/0.1.0": "bafybeidedkcb7vbbu5stg5rpajlwq4h5wtuhdygvmfgtbvgpwttrs6frve", + "service/valory/trader/0.1.0": "bafybeigmu3xk233huyc7i7on7fqrkke2piijnd5ijwvsstt45vez4tno5a", + "service/valory/trader_pearl/0.1.0": "bafybeifxmmnkpg6d7ka7tlurzm5vuzaxiurdoxgoqydr7ksjkzpngpn7cy" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index e5fd5540..d9c7e12b 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid7rfdqy4d6qemyeew2hjf4rxwa7jddc6vizl3rks43m6p6unif6u -- valory/market_manager_abci:0.1.0:bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu -- valory/decision_maker_abci:0.1.0:bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4 -- valory/trader_abci:0.1.0:bafybeicugmzsmgymq22qqnbta57pxh3hfb5yhuwzebkrwoyhrgjuw6kgkm +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeie433saaj7gn6ronam3eaaneqnr6fjcjnpchkswqjye2jfv5rntfi +- valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi +- valory/decision_maker_abci:0.1.0:bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e +- valory/trader_abci:0.1.0:bafybeieauih4nqotqjiamd2mrehjvxxbq7astbt2ypnltokhkvdjqzrkkm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 8704f34f..487932fa 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeihrar7sobb4ipbgqklzj2fcofcgmncutqxpnnqirzytoiowquwtaa +agent: valory/trader:0.1.0:bafybeidedkcb7vbbu5stg5rpajlwq4h5wtuhdygvmfgtbvgpwttrs6frve number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 279a3c6c..05d55a4e 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeihrar7sobb4ipbgqklzj2fcofcgmncutqxpnnqirzytoiowquwtaa +agent: valory/trader:0.1.0:bafybeidedkcb7vbbu5stg5rpajlwq4h5wtuhdygvmfgtbvgpwttrs6frve number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index ddf9fdb2..052000be 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -101,7 +101,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu +- valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 9078ebdd..0da138f1 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -9,7 +9,7 @@ fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeicfoszavcyrzahe6qaydlaf27mpbwui7a6wgdbstydbzxmdisxhju - bets.py: bafybeig3gfx767q5qxbpipqtiwuzqcg7chud44mytmg3hxyddisuyptxhm + bets.py: bafybeiajcbn6wx76guw76htahep6rvndlj4rlofjo2g3bsiegcwv5syv3a dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index cb8f6dcc..558dfd78 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,9 +26,9 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeigalfk4u7koep26eyeholfaqomut54dztn52olicndghz3udcsmiu -- valory/decision_maker_abci:0.1.0:bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4 -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid7rfdqy4d6qemyeew2hjf4rxwa7jddc6vizl3rks43m6p6unif6u +- valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi +- valory/decision_maker_abci:0.1.0:bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeie433saaj7gn6ronam3eaaneqnr6fjcjnpchkswqjye2jfv5rntfi - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index bdce2747..c80d5388 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeihb5dbpgdoc7xiswkv6p4joniw7vt6z44pqu47zqltt5uewmh6ac4 +- valory/decision_maker_abci:0.1.0:bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 15c4100380c2a729e30fb26fdc8719e69d83d139 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Mon, 9 Dec 2024 16:05:15 +0200 Subject: [PATCH 91/98] fix: check whether the service has transacted first Otherwise, the `tx_submitter` will not be available in the db for the current period, and either way it would not make sense to update the transaction information for a past period's decision. --- .../valory/skills/decision_maker_abci/behaviours/reedem.py | 3 ++- packages/valory/skills/decision_maker_abci/states/base.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index 5c35f84f..e6019516 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -978,7 +978,8 @@ def async_act(self) -> Generator: # tx settlement multiplexer assures transitions from Post transaction to Redeem round # only if the transaction was successful if ( - self.synchronized_data.tx_submitter + self.synchronized_data.did_transact + and self.synchronized_data.tx_submitter == BetPlacementRound.auto_round_id() ): self.update_bet_transaction_information() diff --git a/packages/valory/skills/decision_maker_abci/states/base.py b/packages/valory/skills/decision_maker_abci/states/base.py index 33bdc463..76dd9a67 100644 --- a/packages/valory/skills/decision_maker_abci/states/base.py +++ b/packages/valory/skills/decision_maker_abci/states/base.py @@ -178,6 +178,11 @@ def is_profitable(self) -> bool: """Get whether the current vote is profitable or not.""" return bool(self.db.get_strict("is_profitable")) + @property + def did_transact(self) -> bool: + """Get whether the service performed any transactions in the current period.""" + return bool(self.db.get("tx_submitter", None)) + @property def tx_submitter(self) -> str: """Get the round that submitted a tx to transaction_settlement_abci.""" From e0a0fad965101c853ecfcc2bde5e26f099ab464a Mon Sep 17 00:00:00 2001 From: Adamantios Date: Mon, 9 Dec 2024 16:20:07 +0200 Subject: [PATCH 92/98] chore: run generators --- packages/packages.json | 12 ++++++------ packages/valory/agents/trader/aea-config.yaml | 6 +++--- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- .../valory/skills/decision_maker_abci/skill.yaml | 4 ++-- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 0a929d34..1722fb49 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -16,14 +16,14 @@ "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", "skill/valory/market_manager_abci/0.1.0": "bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi", - "skill/valory/decision_maker_abci/0.1.0": "bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e", - "skill/valory/trader_abci/0.1.0": "bafybeieauih4nqotqjiamd2mrehjvxxbq7astbt2ypnltokhkvdjqzrkkm", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeie433saaj7gn6ronam3eaaneqnr6fjcjnpchkswqjye2jfv5rntfi", + "skill/valory/decision_maker_abci/0.1.0": "bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm", + "skill/valory/trader_abci/0.1.0": "bafybeiahjgvfeq3b6c5fq3hkvooermantgqv5tbpn5we5fumsnsyipe5jy", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeid6nvwb4e2tllkft252vaqtf24xmrfgd4inf44vzzounp4ms4xn4m", "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeidedkcb7vbbu5stg5rpajlwq4h5wtuhdygvmfgtbvgpwttrs6frve", - "service/valory/trader/0.1.0": "bafybeigmu3xk233huyc7i7on7fqrkke2piijnd5ijwvsstt45vez4tno5a", - "service/valory/trader_pearl/0.1.0": "bafybeifxmmnkpg6d7ka7tlurzm5vuzaxiurdoxgoqydr7ksjkzpngpn7cy" + "agent/valory/trader/0.1.0": "bafybeihwgq4znzidrzin3fq2bgyk7avn43z67cuxqunnev7vayfhilotdi", + "service/valory/trader/0.1.0": "bafybeibvzb24iz34faipmhvmux65vav6xfvh7ytydc2oxo3yupjxlam7ce", + "service/valory/trader_pearl/0.1.0": "bafybeiexnbofsonvfsuftx5jzrcdgp475yd4nnrvtlqs6utqdeq4scwwpu" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index d9c7e12b..4fa1e7b5 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,10 +45,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeie433saaj7gn6ronam3eaaneqnr6fjcjnpchkswqjye2jfv5rntfi +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid6nvwb4e2tllkft252vaqtf24xmrfgd4inf44vzzounp4ms4xn4m - valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi -- valory/decision_maker_abci:0.1.0:bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e -- valory/trader_abci:0.1.0:bafybeieauih4nqotqjiamd2mrehjvxxbq7astbt2ypnltokhkvdjqzrkkm +- valory/decision_maker_abci:0.1.0:bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm +- valory/trader_abci:0.1.0:bafybeiahjgvfeq3b6c5fq3hkvooermantgqv5tbpn5we5fumsnsyipe5jy - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index 487932fa..cc32ec18 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeidedkcb7vbbu5stg5rpajlwq4h5wtuhdygvmfgtbvgpwttrs6frve +agent: valory/trader:0.1.0:bafybeihwgq4znzidrzin3fq2bgyk7avn43z67cuxqunnev7vayfhilotdi number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 05d55a4e..36d6d6d5 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeidedkcb7vbbu5stg5rpajlwq4h5wtuhdygvmfgtbvgpwttrs6frve +agent: valory/trader:0.1.0:bafybeihwgq4znzidrzin3fq2bgyk7avn43z67cuxqunnev7vayfhilotdi number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index 052000be..dac0ec1d 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -22,7 +22,7 @@ fingerprint: behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm behaviours/order_subscription.py: bafybeib3maqohhx35wzryy4otdcjp5thkr4sbp27ksvwidy3pwm444itra behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce - behaviours/reedem.py: bafybeiga4dmqeftkkrt6cvbtr2eciiykm2b54bjk2pc5eilm6ftdri4lxu + behaviours/reedem.py: bafybeidjmhh6c6shbg25d7exmc4nnp4heqbqselwuxj7rp2ss665lrytxe behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i behaviours/sampling.py: bafybeihe2waj53xrhonw4mgipagsgl3xoorcwzuqzyxwhn3mw7mjyeewfa behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla @@ -38,7 +38,7 @@ fingerprint: redeem_info.py: bafybeifiiix4gihfo4avraxt34sfw35v6dqq45do2drrssei2shbps63mm rounds.py: bafybeiazjcsukgefair52aw37hhvxzlopnzqqmi4ntqrinakljlcm4kt4a states/__init__.py: bafybeid23llnyp6j257dluxmrnztugo5llsrog7kua53hllyktz4dqhqoy - states/base.py: bafybeifkip6bw3oacpnyhko7fi3i72nv2fc33ld6bkr2myaay4qa2ybcie + states/base.py: bafybeiatr6cqa3juxkhm6p4h7dhol7tfmxh2fo6nr2gtc6wuwyrtu3k3xm states/bet_placement.py: bafybeih5eopyxubczys5u5t3bdxbxpc7mmfdyqrpqsbm2uha5jc2phza4i states/blacklisting.py: bafybeiapelgjhbjjn4uq4z5gspyirqzwzgccg5anktrp5kxdwamfnfw5mi states/check_benchmarking.py: bafybeiabv6pq7q45jd3nkor5afmlycqgec5ctuwcfbdukkjjm4imesv4ni diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 558dfd78..95ba76b7 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -27,8 +27,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi -- valory/decision_maker_abci:0.1.0:bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeie433saaj7gn6ronam3eaaneqnr6fjcjnpchkswqjye2jfv5rntfi +- valory/decision_maker_abci:0.1.0:bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid6nvwb4e2tllkft252vaqtf24xmrfgd4inf44vzzounp4ms4xn4m - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index c80d5388..a884fb93 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,7 +23,7 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeifineeaqixdqafihy5ch2gmuq2pyb7xdcxychfbypfpz344nc3j4e +- valory/decision_maker_abci:0.1.0:bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm - valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 584b4ab9749612a77721a9e0068b5d3988570453 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 11 Dec 2024 16:27:23 +0200 Subject: [PATCH 93/98] fix: correctly determine whether a new epoch is reached Previously, we were only aware of a new epoch if our own agent was the one to call the checkpoint. If any other agent had called it, then we would never be aware of this event. Instead, we are now tracking changes to the ts checkpoint of the contract which only and always gets updated after a new epoch is triggered. --- .../valory/skills/staking_abci/behaviours.py | 79 +++++++++++++++++++ packages/valory/skills/staking_abci/models.py | 22 ++++++ .../valory/skills/staking_abci/payloads.py | 2 + packages/valory/skills/staking_abci/rounds.py | 21 ++++- .../valory/skills/staking_abci/skill.yaml | 1 + 5 files changed, 121 insertions(+), 4 deletions(-) diff --git a/packages/valory/skills/staking_abci/behaviours.py b/packages/valory/skills/staking_abci/behaviours.py index 011705c6..74df6e50 100644 --- a/packages/valory/skills/staking_abci/behaviours.py +++ b/packages/valory/skills/staking_abci/behaviours.py @@ -21,6 +21,7 @@ from abc import ABC from datetime import datetime, timedelta +from pathlib import Path from typing import Any, Callable, Generator, Optional, Set, Tuple, Type, Union, cast from aea.configurations.data_types import PublicId @@ -64,6 +65,9 @@ NULL_ADDRESS = "0x0000000000000000000000000000000000000000" +CHECKPOINT_FILENAME = "checkpoint.txt" +READ_MODE = "r" +WRITE_MODE = "w" class StakingInteractBaseBehaviour(BaseBehaviour, ABC): @@ -73,6 +77,7 @@ def __init__(self, **kwargs: Any) -> None: """Initialize the behaviour.""" super().__init__(**kwargs) self._service_staking_state: StakingState = StakingState.UNSTAKED + self._checkpoint_ts = 0 @property def params(self) -> StakingParams: @@ -364,6 +369,7 @@ def __init__(self, **kwargs: Any) -> None: self._next_checkpoint: int = 0 self._checkpoint_data: bytes = b"" self._safe_tx_hash: str = "" + self._checkpoint_filepath: Path = self.params.store_path / CHECKPOINT_FILENAME @property def params(self) -> StakingParams: @@ -375,6 +381,17 @@ def synchronized_data(self) -> SynchronizedData: """Return the synchronized data.""" return SynchronizedData(super().synchronized_data.db) + @property + def is_first_period(self) -> bool: + """Return whether it is the first period of the service.""" + return self.synchronized_data.period_count == 0 + + @property + def new_checkpoint_detected(self) -> bool: + """Whether a new checkpoint has been detected.""" + previous_checkpoint = self.synchronized_data.previous_checkpoint + return bool(previous_checkpoint) and previous_checkpoint != self.ts_checkpoint + @property def checkpoint_data(self) -> bytes: """Get the checkpoint data.""" @@ -401,6 +418,38 @@ def safe_tx_hash(self, safe_hash: str) -> None: ) self._safe_tx_hash = safe_hash[2:] + def read_stored_timestamp(self) -> Optional[int]: + """Read the timestamp from the agent's data dir.""" + try: + with open(self._checkpoint_filepath, READ_MODE) as checkpoint_file: + try: + return int(checkpoint_file.readline()) + except (ValueError, TypeError, StopIteration): + err = f"Stored checkpoint timestamp could not be parsed from {self._checkpoint_filepath!r}!" + except (FileNotFoundError, PermissionError, OSError): + err = f"Error opening file {self._checkpoint_filepath!r} in {READ_MODE!r} mode!" + + self.context.logger.error(err) + return None + + def store_timestamp(self) -> int: + """Store the timestamp to the agent's data dir.""" + if self.ts_checkpoint == 0: + self.context.logger.warning("No checkpoint timestamp to store!") + return 0 + + try: + with open(self._checkpoint_filepath, WRITE_MODE) as checkpoint_file: + try: + return checkpoint_file.write(str(self.ts_checkpoint)) + except (IOError, OSError): + err = f"Error writing to file {self._checkpoint_filepath!r}!" + except (FileNotFoundError, PermissionError, OSError): + err = f"Error opening file {self._checkpoint_filepath!r} in {WRITE_MODE!r} mode!" + + self.context.logger.error(err) + return 0 + def _build_checkpoint_tx(self) -> WaitableConditionType: """Get the request tx data encoded.""" result = yield from self._staking_contract_interact( @@ -436,6 +485,33 @@ def _prepare_safe_tx(self) -> Generator[None, None, str]: self.checkpoint_data, ) + def check_new_epoch(self) -> Generator[None, None, bool]: + """Check if a new epoch has been reached.""" + yield from self.wait_for_condition_with_sleep(self._get_ts_checkpoint) + stored_timestamp_invalidated = False + + # if it is the first period of the service, + # 1. check if the stored timestamp is the same as the current checkpoint + # 2. if not, update the corresponding flag + # That way, we protect from the case in which the user stops their service + # before the next checkpoint is reached and restarts it afterward. + if self.is_first_period: + stored_timestamp = self.read_stored_timestamp() + stored_timestamp_invalidated = stored_timestamp != self.ts_checkpoint + + is_checkpoint_reached = ( + stored_timestamp_invalidated or self.new_checkpoint_detected + ) + if is_checkpoint_reached: + self.context.logger.info("An epoch change has been detected.") + status = self.store_timestamp() + if status: + self.context.logger.info( + "Successfully updated the stored checkpoint timestamp." + ) + + return is_checkpoint_reached + def async_act(self) -> Generator: """Do the action.""" with self.context.benchmark_tool.measure(self.behaviour_id).local(): @@ -451,11 +527,14 @@ def async_act(self) -> Generator: self.context.logger.critical("Service has been evicted!") tx_submitter = self.matching_round.auto_round_id() + is_checkpoint_reached = yield from self.check_new_epoch() payload = CallCheckpointPayload( self.context.agent_address, tx_submitter, checkpoint_tx_hex, self.service_staking_state.value, + self.ts_checkpoint, + is_checkpoint_reached, ) with self.context.benchmark_tool.measure(self.behaviour_id).consensus(): diff --git a/packages/valory/skills/staking_abci/models.py b/packages/valory/skills/staking_abci/models.py index 460f4647..b9ee386a 100644 --- a/packages/valory/skills/staking_abci/models.py +++ b/packages/valory/skills/staking_abci/models.py @@ -20,6 +20,8 @@ """Models for the Staking ABCI application.""" +import os +from pathlib import Path from typing import Any from packages.valory.skills.abstract_round_abci.models import BaseParams @@ -37,6 +39,25 @@ BenchmarkTool = BaseBenchmarkTool +def get_store_path(kwargs: dict) -> Path: + """Get the path of the store.""" + path = kwargs.get("store_path", "") + if not path: + msg = "The path to the store must be provided as a keyword argument." + raise ValueError(msg) + + # check if the path exists, and we can write to it + if ( + not os.path.isdir(path) + or not os.access(path, os.W_OK) + or not os.access(path, os.R_OK) + ): + msg = f"The store path {path!r} is not a directory or is not writable." + raise ValueError(msg) + + return Path(path) + + class StakingParams(BaseParams): """Staking parameters.""" @@ -51,6 +72,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: self.mech_activity_checker_contract: str = self._ensure( "mech_activity_checker_contract", kwargs, str ) + self.store_path = get_store_path(kwargs) super().__init__(*args, **kwargs) diff --git a/packages/valory/skills/staking_abci/payloads.py b/packages/valory/skills/staking_abci/payloads.py index ade453f4..4b1f47e2 100644 --- a/packages/valory/skills/staking_abci/payloads.py +++ b/packages/valory/skills/staking_abci/payloads.py @@ -38,3 +38,5 @@ class CallCheckpointPayload(MultisigTxPayload): """A transaction payload for the checkpoint call.""" service_staking_state: int + ts_checkpoint: int + is_checkpoint_reached: bool diff --git a/packages/valory/skills/staking_abci/rounds.py b/packages/valory/skills/staking_abci/rounds.py index dde23ce4..c6de99b2 100644 --- a/packages/valory/skills/staking_abci/rounds.py +++ b/packages/valory/skills/staking_abci/rounds.py @@ -86,6 +86,14 @@ def participant_to_checkpoint(self) -> DeserializedCollection: """Get the participants to the checkpoint round.""" return self._get_deserialized("participant_to_checkpoint") + @property + def previous_checkpoint(self) -> Optional[int]: + """Get the previous checkpoint.""" + previous_checkpoint = self.db.get("previous_checkpoint", None) + if previous_checkpoint is None: + return None + return int(previous_checkpoint) + @property def is_checkpoint_reached(self) -> bool: """Check if the checkpoint is reached.""" @@ -102,6 +110,8 @@ class CallCheckpointRound(CollectSameUntilThresholdRound): get_name(SynchronizedData.tx_submitter), get_name(SynchronizedData.most_voted_tx_hash), get_name(SynchronizedData.service_staking_state), + get_name(SynchronizedData.previous_checkpoint), + get_name(SynchronizedData.is_checkpoint_reached), ) collection_key = get_name(SynchronizedData.participant_to_checkpoint) synchronized_data_class = SynchronizedData @@ -126,9 +136,6 @@ def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]: if synced_data.most_voted_tx_hash is None: return synced_data, Event.NEXT_CHECKPOINT_NOT_REACHED_YET - # service is staked and checkpoint is reached - self.synchronized_data.update(is_checkpoint_reached=True) - return res @@ -187,7 +194,11 @@ class StakingAbciApp(AbciApp[Event]): # pylint: disable=too-few-public-methods ServiceEvictedRound: {}, } cross_period_persisted_keys = frozenset( - {get_name(SynchronizedData.service_staking_state)} + { + get_name(SynchronizedData.service_staking_state), + get_name(SynchronizedData.previous_checkpoint), + get_name(SynchronizedData.is_checkpoint_reached), + } ) final_states: Set[AppState] = { CheckpointCallPreparedRound, @@ -203,6 +214,8 @@ class StakingAbciApp(AbciApp[Event]): # pylint: disable=too-few-public-methods get_name(SynchronizedData.tx_submitter), get_name(SynchronizedData.most_voted_tx_hash), get_name(SynchronizedData.service_staking_state), + get_name(SynchronizedData.previous_checkpoint), + get_name(SynchronizedData.is_checkpoint_reached), }, FinishedStakingRound: { get_name(SynchronizedData.service_staking_state), diff --git a/packages/valory/skills/staking_abci/skill.yaml b/packages/valory/skills/staking_abci/skill.yaml index 15c3c0f1..2e09c41a 100644 --- a/packages/valory/skills/staking_abci/skill.yaml +++ b/packages/valory/skills/staking_abci/skill.yaml @@ -137,6 +137,7 @@ models: mech_activity_checker_contract: '0x0000000000000000000000000000000000000000' staking_contract_address: '0x2Ef503950Be67a98746F484DA0bBAdA339DF3326' staking_interaction_sleep_time: 5 + store_path: data class_name: StakingParams requests: args: {} From 8af2865f9fc26e0241f81085e1f46eeee1390cf3 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 11 Dec 2024 16:29:34 +0200 Subject: [PATCH 94/98] fix: do not move bets from reprocessed during the same epoch --- packages/valory/skills/market_manager_abci/bets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/market_manager_abci/bets.py b/packages/valory/skills/market_manager_abci/bets.py index 704217e0..6380aae4 100644 --- a/packages/valory/skills/market_manager_abci/bets.py +++ b/packages/valory/skills/market_manager_abci/bets.py @@ -71,8 +71,9 @@ def next_status(self) -> "QueueStatus": return QueueStatus.PROCESSED elif self == QueueStatus.PROCESSED: return QueueStatus.REPROCESSED - else: + elif self != QueueStatus.REPROCESSED: return QueueStatus.FRESH + return self @dataclasses.dataclass(init=False) From a02629cfa1fa76f6eb60854cb2bad448ee86e839 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 11 Dec 2024 16:29:47 +0200 Subject: [PATCH 95/98] refactor: make methods static --- .../skills/decision_maker_abci/behaviours/sampling.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index 2708f812..f451044a 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -75,7 +75,8 @@ def processable_bet(self, bet: Bet, now: int) -> bool: return within_ranges and bet_queue_processable - def _sort_by_priority_logic(self, bets: List[Bet]) -> List[Bet]: + @staticmethod + def _sort_by_priority_logic(bets: List[Bet]) -> List[Bet]: """ Sort bets based on the priority logic. @@ -93,9 +94,8 @@ def _sort_by_priority_logic(self, bets: List[Bet]) -> List[Bet]: reverse=True, ) - def _get_bets_queue_wise( - self, bets: List[Bet] - ) -> Tuple[List[Bet], List[Bet], List[Bet]]: + @staticmethod + def _get_bets_queue_wise(bets: List[Bet]) -> Tuple[List[Bet], List[Bet], List[Bet]]: """Return a dictionary of bets with queue status as key.""" bets_by_status: Dict[QueueStatus, List[Bet]] = defaultdict(list) From c4b604afb99b378241bed8f3499e233b293a86f0 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 11 Dec 2024 16:30:23 +0200 Subject: [PATCH 96/98] refactor: remove unnecessary initialization --- .../valory/skills/decision_maker_abci/behaviours/sampling.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py index f451044a..944149a4 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -128,8 +128,6 @@ def _sampled_bet_idx(self, bets: List[Bet]) -> int: :return: the index of the sampled bet, out of all the available bets, not only the given ones. """ - sorted_bets: List = [] - to_process_bets, processed_bets, reprocessed_bets = self._get_bets_queue_wise( bets ) From e0d9f7a9823648c2857ed11a63318e429b7e337e Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 11 Dec 2024 18:04:09 +0200 Subject: [PATCH 97/98] test: update the cases for `CallCheckpointPayload` --- .../skills/staking_abci/tests/test_payloads.py | 2 ++ .../valory/skills/staking_abci/tests/test_rounds.py | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/packages/valory/skills/staking_abci/tests/test_payloads.py b/packages/valory/skills/staking_abci/tests/test_payloads.py index 5c00765e..f9a7b316 100644 --- a/packages/valory/skills/staking_abci/tests/test_payloads.py +++ b/packages/valory/skills/staking_abci/tests/test_payloads.py @@ -41,6 +41,8 @@ "service_staking_state": 1, "tx_submitter": "dummy tx submitter", "tx_hash": "dummy tx hash", + "ts_checkpoint": 1, + "is_checkpoint_reached": True, }, ), ], diff --git a/packages/valory/skills/staking_abci/tests/test_rounds.py b/packages/valory/skills/staking_abci/tests/test_rounds.py index 9703a46d..2a0564af 100644 --- a/packages/valory/skills/staking_abci/tests/test_rounds.py +++ b/packages/valory/skills/staking_abci/tests/test_rounds.py @@ -64,6 +64,8 @@ def abci_app() -> StakingAbciApp: "service_staking_state": StakingState.UNSTAKED.value, "tx_submitter": "dummy_submitter", "tx_hash": "dummy_tx_hash", + "ts_checkpoint": 0, + "is_checkpoint_reached": True, } @@ -148,12 +150,16 @@ class TestCallCheckpointRound(BaseStakingRoundTestClass): "service_staking_state": StakingState.STAKED.value, "tx_submitter": "dummy_submitter", "tx_hash": "dummy_tx_hash", + "ts_checkpoint": 0, + "is_checkpoint_reached": True, } ), final_data={ "service_staking_state": StakingState.STAKED.value, "tx_submitter": "dummy_submitter", "tx_hash": "dummy_tx_hash", + "ts_checkpoint": 0, + "is_checkpoint_reached": True, }, event=Event.DONE, most_voted_payload=DUMMY_SERVICE_STATE["tx_submitter"], @@ -184,6 +190,8 @@ class TestCallCheckpointRound(BaseStakingRoundTestClass): "service_staking_state": StakingState.EVICTED.value, "tx_submitter": "dummy_submitter", "tx_hash": "dummy_tx_hash", + "ts_checkpoint": 0, + "is_checkpoint_reached": True, } ), final_data={}, @@ -202,6 +210,8 @@ class TestCallCheckpointRound(BaseStakingRoundTestClass): "service_staking_state": StakingState.STAKED.value, "tx_submitter": "dummy_submitter", "tx_hash": None, + "ts_checkpoint": 0, + "is_checkpoint_reached": True, } ), final_data={}, @@ -279,6 +289,8 @@ def test_staking_abci_app_initialization(abci_app: StakingAbciApp) -> None: get_name(SynchronizedData.tx_submitter), get_name(SynchronizedData.most_voted_tx_hash), get_name(SynchronizedData.service_staking_state), + get_name(SynchronizedData.previous_checkpoint), + get_name(SynchronizedData.is_checkpoint_reached), }, FinishedStakingRound: { get_name(SynchronizedData.service_staking_state), From b8190fc57d0e634bdc2fb1139160fd4826bf8188 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Wed, 11 Dec 2024 18:07:12 +0200 Subject: [PATCH 98/98] chore: run generators --- packages/packages.json | 18 +++++++++--------- packages/valory/agents/trader/aea-config.yaml | 12 ++++++------ packages/valory/services/trader/service.yaml | 2 +- .../valory/services/trader_pearl/service.yaml | 2 +- .../check_stop_trading_abci/behaviours.py | 1 - .../skills/check_stop_trading_abci/skill.yaml | 4 ++-- .../skills/decision_maker_abci/skill.yaml | 6 +++--- .../skills/market_manager_abci/skill.yaml | 2 +- packages/valory/skills/staking_abci/skill.yaml | 12 ++++++------ packages/valory/skills/trader_abci/skill.yaml | 10 +++++----- .../tx_settlement_multiplexer_abci/skill.yaml | 4 ++-- 11 files changed, 36 insertions(+), 37 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 1722fb49..cb67b674 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,15 +15,15 @@ "contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4", "contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy", "contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4", - "skill/valory/market_manager_abci/0.1.0": "bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi", - "skill/valory/decision_maker_abci/0.1.0": "bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm", - "skill/valory/trader_abci/0.1.0": "bafybeiahjgvfeq3b6c5fq3hkvooermantgqv5tbpn5we5fumsnsyipe5jy", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeid6nvwb4e2tllkft252vaqtf24xmrfgd4inf44vzzounp4ms4xn4m", - "skill/valory/staking_abci/0.1.0": "bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i", - "skill/valory/check_stop_trading_abci/0.1.0": "bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni", - "agent/valory/trader/0.1.0": "bafybeihwgq4znzidrzin3fq2bgyk7avn43z67cuxqunnev7vayfhilotdi", - "service/valory/trader/0.1.0": "bafybeibvzb24iz34faipmhvmux65vav6xfvh7ytydc2oxo3yupjxlam7ce", - "service/valory/trader_pearl/0.1.0": "bafybeiexnbofsonvfsuftx5jzrcdgp475yd4nnrvtlqs6utqdeq4scwwpu" + "skill/valory/market_manager_abci/0.1.0": "bafybeiaru2d32wpmcgqs64eepxud4idgubc3vmsbdwbia7gygipql2mmqi", + "skill/valory/decision_maker_abci/0.1.0": "bafybeiddnmcquiuznts67ridhpnaqw2y3rrt4nfau5kjm74zhk5lhjxi2q", + "skill/valory/trader_abci/0.1.0": "bafybeiemjz3ca7la7jkeqdr7hxo7fa77xe2fkfadzb53gdkji7abpl2eiu", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeietwknem7iiood6pwkfup322ywwjmdrmdapllrcms6jpeev5w2qfe", + "skill/valory/staking_abci/0.1.0": "bafybeicupccurmrg7qesivonlyt3nryarsmk5qf5yh6auno64wn45bybvq", + "skill/valory/check_stop_trading_abci/0.1.0": "bafybeieduekpd4zbvjztyxyooppqnmjvup6jfp74uo6hhupvtvzzscdzkq", + "agent/valory/trader/0.1.0": "bafybeihq257kwjybsvrpzhjx4wbretrsurodpckjqdhv3idlnbu4mqvfnq", + "service/valory/trader/0.1.0": "bafybeihr6m4lec5r6kuf2zikusgyqilqwhwlpyehufyndjuziylr73dlqe", + "service/valory/trader_pearl/0.1.0": "bafybeibfqhsrtekx6nvwpz2nbbjyobljcahe6wz6jikyebt7opzxlal45u" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 4fa1e7b5..5471b02e 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -45,12 +45,12 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid6nvwb4e2tllkft252vaqtf24xmrfgd4inf44vzzounp4ms4xn4m -- valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi -- valory/decision_maker_abci:0.1.0:bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm -- valory/trader_abci:0.1.0:bafybeiahjgvfeq3b6c5fq3hkvooermantgqv5tbpn5we5fumsnsyipe5jy -- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i -- valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeietwknem7iiood6pwkfup322ywwjmdrmdapllrcms6jpeev5w2qfe +- valory/market_manager_abci:0.1.0:bafybeiaru2d32wpmcgqs64eepxud4idgubc3vmsbdwbia7gygipql2mmqi +- valory/decision_maker_abci:0.1.0:bafybeiddnmcquiuznts67ridhpnaqw2y3rrt4nfau5kjm74zhk5lhjxi2q +- valory/trader_abci:0.1.0:bafybeiemjz3ca7la7jkeqdr7hxo7fa77xe2fkfadzb53gdkji7abpl2eiu +- valory/staking_abci:0.1.0:bafybeicupccurmrg7qesivonlyt3nryarsmk5qf5yh6auno64wn45bybvq +- valory/check_stop_trading_abci:0.1.0:bafybeieduekpd4zbvjztyxyooppqnmjvup6jfp74uo6hhupvtvzzscdzkq - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm customs: - valory/mike_strat:0.1.0:bafybeihjiol7f4ch4piwfikurdtfwzsh6qydkbsztpbwbwb2yrqdqf726m diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index cc32ec18..3f33c0a3 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeihwgq4znzidrzin3fq2bgyk7avn43z67cuxqunnev7vayfhilotdi +agent: valory/trader:0.1.0:bafybeihq257kwjybsvrpzhjx4wbretrsurodpckjqdhv3idlnbu4mqvfnq number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 36d6d6d5..88e6cefe 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeihwgq4znzidrzin3fq2bgyk7avn43z67cuxqunnev7vayfhilotdi +agent: valory/trader:0.1.0:bafybeihq257kwjybsvrpzhjx4wbretrsurodpckjqdhv3idlnbu4mqvfnq number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/check_stop_trading_abci/behaviours.py b/packages/valory/skills/check_stop_trading_abci/behaviours.py index b0b17d2d..f1eac99e 100644 --- a/packages/valory/skills/check_stop_trading_abci/behaviours.py +++ b/packages/valory/skills/check_stop_trading_abci/behaviours.py @@ -159,7 +159,6 @@ def _compute_stop_trading(self) -> Generator[None, None, bool]: if self.params.stop_trading_if_staking_kpi_met: staking_kpi_met = yield from self.is_staking_kpi_met() self.context.logger.debug(f"{staking_kpi_met=}") - return staking_kpi_met yield diff --git a/packages/valory/skills/check_stop_trading_abci/skill.yaml b/packages/valory/skills/check_stop_trading_abci/skill.yaml index 4ac6d752..d37ff0de 100644 --- a/packages/valory/skills/check_stop_trading_abci/skill.yaml +++ b/packages/valory/skills/check_stop_trading_abci/skill.yaml @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeif2pq7fg5upl6vmfgfzpiwsh4nbk4zaeyz6upyucqi5tasrxgq4ee __init__.py: bafybeifc23rlw2hzhplp3wfceixnmwq5ztnixhh7jp4dd5av3crwp3x22a - behaviours.py: bafybeicair2lh5wx7sjzied2z755nhlcwa3jznt7mayvsjkky43jz7lh5u + behaviours.py: bafybeie5mkpxsd6z3vjsoacvswin6zz4q4um5gqp6jhwtn65fepx2kma3m dialogues.py: bafybeictrrnwcijiejczy23dfvbx5kujgef3dulzqhs3etl2juvz5spm2e fsm_specification.yaml: bafybeihhau35a5xclncjpxh5lg7qiw34xs4d5qlez7dnjpkf45d3gc57ai handlers.py: bafybeiard64fwxib3rtyp67ymhf222uongcyqhfhdyttpsyqkmyh5ajipu @@ -27,7 +27,7 @@ contracts: protocols: [] skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i +- valory/staking_abci:0.1.0:bafybeicupccurmrg7qesivonlyt3nryarsmk5qf5yh6auno64wn45bybvq behaviours: main: args: {} diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index dac0ec1d..cf113fe6 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -24,7 +24,7 @@ fingerprint: behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeidjmhh6c6shbg25d7exmc4nnp4heqbqselwuxj7rp2ss665lrytxe behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeihe2waj53xrhonw4mgipagsgl3xoorcwzuqzyxwhn3mw7mjyeewfa + behaviours/sampling.py: bafybeicvtxjv5rxlsdrmbtetqwzzau6is47guystvw245grd6s2qs5pxea behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -101,10 +101,10 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi +- valory/market_manager_abci:0.1.0:bafybeiaru2d32wpmcgqs64eepxud4idgubc3vmsbdwbia7gygipql2mmqi - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm -- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i +- valory/staking_abci:0.1.0:bafybeicupccurmrg7qesivonlyt3nryarsmk5qf5yh6auno64wn45bybvq behaviours: main: args: {} diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 0da138f1..0bff3c68 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -9,7 +9,7 @@ fingerprint: README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeicfoszavcyrzahe6qaydlaf27mpbwui7a6wgdbstydbzxmdisxhju - bets.py: bafybeiajcbn6wx76guw76htahep6rvndlj4rlofjo2g3bsiegcwv5syv3a + bets.py: bafybeibx3x5nasuj6loneeat2lb7fr7kgsmnz7on7f4gxfbpzerzdvawou dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4 diff --git a/packages/valory/skills/staking_abci/skill.yaml b/packages/valory/skills/staking_abci/skill.yaml index 2e09c41a..9d866d5c 100644 --- a/packages/valory/skills/staking_abci/skill.yaml +++ b/packages/valory/skills/staking_abci/skill.yaml @@ -8,18 +8,18 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeifrpl36fddmgvniwvghqtxdzc44ry6l2zvqy37vu3y2xvwyd23ugy __init__.py: bafybeiageyes36ujnvvodqd5vlnihgz44rupysrk2ebbhskjkueetj6dai - behaviours.py: bafybeib5rcg26usohcbf2suahk5jticruzzdl2hdakchwsf6bptksi32oy + behaviours.py: bafybeiels3us2s5sf2lrloekjky46o2owlo3awsocuxt67h76ap2k5qaqy dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm fsm_specification.yaml: bafybeicuoejmaks3ndwhbflp64kkfdkrdyn74a2fplarg4l3gxlonfmeoq handlers.py: bafybeichsi2y5zvzffupj2vhgagocwvnm7cbzr6jmavp656mfrzsdvkfnu - models.py: bafybeidc6aghkskpy5ze62xpjbinwgsyvtzvyrlsfckrygcnj4cts54zpa - payloads.py: bafybeibnub5ehb2mvpcoan3x23pp5oz4azpofwrtcl32abswcfl4cmjlwq - rounds.py: bafybeib74ue2ajr5t3qlisro3yzbm5b7cojxt7syo4hb2y6nw2hnlpr3km + models.py: bafybeibhzoi25wqpgxwn7ibgz3juax2aeqep7qdl6q7u3abdnb6jahc264 + payloads.py: bafybeib7hxsibtabb5vt6gjtco2x2s2yodhs24ojqecgrcexqsiv3pvmuy + rounds.py: bafybeiezsn42e2qqdpwgtkvrlgjzfwtg7fldfqglf5ofc36g7uyaobvuhq tests/__init__.py: bafybeid7m6ynosqeb4mvsss2hqg75aly5o2d47r7yfg2xtgwzkkilv2d2m tests/test_dialogues.py: bafybeidwjk52mufwvkj4cr3xgqycbdzxc6gvosmqyuqdjarnrgwth6wcai tests/test_handers.py: bafybeibnxlwznx3tsdpjpzh62bnp6lq7zdpolyjxfvxeumzz52ljxfzpme - tests/test_payloads.py: bafybeiaq2dxpbein6qhipalibi57x6niiydxi6kvbpeqripzlngcgpb3qq - tests/test_rounds.py: bafybeih27bkijv6vcqfdbrfxgbtajtqbquekknc77omkxsfgnboiduj7sm + tests/test_payloads.py: bafybeidtkbudsmrx77xs2oooji6cpj7kx7nembf77u32if2sb2kvkavvhq + tests/test_rounds.py: bafybeidge7sp3udobhvjpbdj5kirkukd6w5qycqkcuc6sy3qqiedco2q4i fingerprint_ignore_patterns: [] connections: [] contracts: diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 95ba76b7..96451c90 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,11 +26,11 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm -- valory/market_manager_abci:0.1.0:bafybeigmclk3pe3h2b57kcem4xlhkfgca5sosbstyqqoq6pnkt7uuhzvwi -- valory/decision_maker_abci:0.1.0:bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeid6nvwb4e2tllkft252vaqtf24xmrfgd4inf44vzzounp4ms4xn4m -- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i -- valory/check_stop_trading_abci:0.1.0:bafybeier2qz5xkiha5krgav7hfrxvb5666csxyko4drfgouj5htjmmvwni +- valory/market_manager_abci:0.1.0:bafybeiaru2d32wpmcgqs64eepxud4idgubc3vmsbdwbia7gygipql2mmqi +- valory/decision_maker_abci:0.1.0:bafybeiddnmcquiuznts67ridhpnaqw2y3rrt4nfau5kjm74zhk5lhjxi2q +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeietwknem7iiood6pwkfup322ywwjmdrmdapllrcms6jpeev5w2qfe +- valory/staking_abci:0.1.0:bafybeicupccurmrg7qesivonlyt3nryarsmk5qf5yh6auno64wn45bybvq +- valory/check_stop_trading_abci:0.1.0:bafybeieduekpd4zbvjztyxyooppqnmjvup6jfp74uo6hhupvtvzzscdzkq - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: main: diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index a884fb93..367792b9 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -23,8 +23,8 @@ protocols: - valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni skills: - valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u -- valory/decision_maker_abci:0.1.0:bafybeiczxtmesnkxtcm55bkjcsuyg7qllywdioonefr2fovripwv27yozm -- valory/staking_abci:0.1.0:bafybeibjgipzfle3b2gtuh42u2y6umgf47a5qrdtbvni46tox4lgv6wm4i +- valory/decision_maker_abci:0.1.0:bafybeiddnmcquiuznts67ridhpnaqw2y3rrt4nfau5kjm74zhk5lhjxi2q +- valory/staking_abci:0.1.0:bafybeicupccurmrg7qesivonlyt3nryarsmk5qf5yh6auno64wn45bybvq - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: main: