diff --git a/packages/valory/skills/learning_abci/payloads.py b/packages/valory/skills/learning_abci/payloads.py index f79d5a3..a6b9d86 100644 --- a/packages/valory/skills/learning_abci/payloads.py +++ b/packages/valory/skills/learning_abci/payloads.py @@ -43,4 +43,5 @@ class DecisionMakingPayload(BaseTxPayload): class TxPreparationPayload(BaseTxPayload): """Represent a transaction payload for the TxPreparationRound.""" - tx_hash: str + tx_submitter: Optional[str] = None + tx_hash: Optional[str] = None diff --git a/packages/valory/skills/learning_abci/rounds.py b/packages/valory/skills/learning_abci/rounds.py index 96f666d..653c06d 100644 --- a/packages/valory/skills/learning_abci/rounds.py +++ b/packages/valory/skills/learning_abci/rounds.py @@ -83,6 +83,11 @@ def participant_to_tx_round(self) -> DeserializedCollection: """Get the participants to the tx round.""" return self._get_deserialized("participant_to_tx_round") + @property + def tx_submitter(self) -> str: + """Get the round that submitted a tx to transaction_settlement_abci.""" + return str(self.db.get_strict("tx_submitter")) + class APICheckRound(CollectSameUntilThresholdRound): """APICheckRound""" @@ -128,7 +133,10 @@ class TxPreparationRound(CollectSameUntilThresholdRound): done_event = Event.DONE no_majority_event = Event.NO_MAJORITY collection_key = get_name(SynchronizedData.participant_to_tx_round) - selection_key = get_name(SynchronizedData.most_voted_tx_hash) + selection_key = ( + get_name(SynchronizedData.tx_submitter), + get_name(SynchronizedData.most_voted_tx_hash), + ) # Event.ROUND_TIMEOUT # this needs to be referenced for static checkers