From 347aec88dd67933a26bfdadd495a2e5974484938 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 11:18:04 +0000 Subject: [PATCH 01/11] fix: formatting errors --- .../decision_maker_abci/behaviours/bet_placement.py | 9 ++++----- packages/valory/skills/decision_maker_abci/handlers.py | 3 ++- .../decision_maker_abci/states/decision_receive.py | 4 +++- 3 files changed, 9 insertions(+), 7 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..70c39408 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/bet_placement.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/bet_placement.py @@ -35,10 +35,7 @@ remove_fraction_wei, ) from packages.valory.skills.decision_maker_abci.models import MultisendBatch -from packages.valory.skills.decision_maker_abci.payloads import ( - BetPlacementPayload, - MultisigTxPayload, -) +from packages.valory.skills.decision_maker_abci.payloads import BetPlacementPayload from packages.valory.skills.decision_maker_abci.states.bet_placement import ( BetPlacementRound, ) @@ -212,7 +209,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/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: From f84fa9698badcc27275b1721720a93e2f606e298 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 11:19:15 +0000 Subject: [PATCH 02/11] chore: 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 | 6 +++--- packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 41797ca7..8a93eb38 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": "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/decision_maker_abci/0.1.0": "bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi", + "skill/valory/trader_abci/0.1.0": "bafybeidf56x6hjpv7gogkw546onk6qjzfgagvdkhj4pjkuj24prjqrzthu", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibdcyskwdir6vegmnrvktdpqjajj2xb4xz52ojkaa7t447c2umxg4", "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" + "agent/valory/trader/0.1.0": "bafybeifppcguzxnswhz3sxcxbxjxsgmivqeu5ruapc2zk6fyeme2ssyto4", + "service/valory/trader/0.1.0": "bafybeif3wy4g767x6ykt4padbtvuwfsnh5rowgbpm4lzaa77efgru3zrxm", + "service/valory/trader_pearl/0.1.0": "bafybeigxflazpj3s2zccrr3b3ou6336meshnqdfmlcu6jypnu3kmbelj7u" }, "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..7533aa4d 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:bafybeif23c7z5kfuarlu2ivcw3nbbchrnze3y2nemznnsynghis7w3scky +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibdcyskwdir6vegmnrvktdpqjajj2xb4xz52ojkaa7t447c2umxg4 - valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicvz65mfxtxbqizsvd3r3sy7fwyutjfj5a2xu2d5uz7b2fq7xdpp4 -- valory/trader_abci:0.1.0:bafybeieop75gnpbriiltwvvbwi4p6q242xhnlts7yjur5sgrk5jvi6sr74 +- valory/decision_maker_abci:0.1.0:bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi +- valory/trader_abci:0.1.0:bafybeidf56x6hjpv7gogkw546onk6qjzfgagvdkhj4pjkuj24prjqrzthu - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 03900683..1bc2d894 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:bafybeifppcguzxnswhz3sxcxbxjxsgmivqeu5ruapc2zk6fyeme2ssyto4 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..aeae4303 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:bafybeifppcguzxnswhz3sxcxbxjxsgmivqeu5ruapc2zk6fyeme2ssyto4 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 18754959..b3ffee60 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -13,7 +13,7 @@ fingerprint: __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky behaviours/base.py: bafybeifjgxzhwzxiky3okgtv4ojumm7fj7bom6qe3ysdvs3cpu32w446g4 - behaviours/bet_placement.py: bafybeif3blpj45w4y2ppw5lxkxndsc5crhghevagifuh4fcoofej36bq34 + behaviours/bet_placement.py: bafybeia4listbfzsk4n4wkc4ycaftxgywjnl3mmpcqhuo3nwwia4n3oufu behaviours/blacklisting.py: bafybeifitqx2omj5qdwokizhqjkxvybtsyxo22dxkucbtxaocafzgbseku behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e @@ -29,7 +29,7 @@ fingerprint: behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm fsm_specification.yaml: bafybeigwlvvi6fav72wg4wz22xjekegenzjnub5efwz5xu6qsrjnxluspq - handlers.py: bafybeiafuc7vtyhrv2phep56maadpd4lubipdzw2sszv62r2tz7hzjmsdi + handlers.py: bafybeibf42562x3d5i66yf5p3vi6a2oolhwwxr32pjqtuxz5w4gmg3r4oa io_/__init__.py: bafybeifxgmmwjqzezzn3e6keh2bfo4cyo7y5dq2ept3stfmgglbrzfl5rq io_/loader.py: bafybeih3sdsx5dhe4kzhtoafexjgkutsujwqy3zcdrlrkhtdks45bc7exa models.py: bafybeiemk4xiphf6sn7ei7rukn2veebeu2pg3j2xy5nqxcizelnkpvivqm @@ -43,7 +43,7 @@ fingerprint: states/blacklisting.py: bafybeiapelgjhbjjn4uq4z5gspyirqzwzgccg5anktrp5kxdwamfnfw5mi states/check_benchmarking.py: bafybeiabv6pq7q45jd3nkor5afmlycqgec5ctuwcfbdukkjjm4imesv4ni states/claim_subscription.py: bafybeiampifhdoztggwj6gthl2hfzecmjcwnm6nic2o47q4je7j4x3ujne - states/decision_receive.py: bafybeicnqp4uf47btdkow7ivcozqxfue7u3p7efti3wggxf5iwc2uura3i + states/decision_receive.py: bafybeib3eahaehvmcrdojnlrz34q2crdb3ao6qun2wohokdf3t3ywwfa4y states/decision_request.py: bafybeiarv3r5j7cfvxmudki2llbdl2pvf24p5mvsva6bdgrylnwdyag5xy states/final_states.py: bafybeicjrrojo3gmfaxzicwloyorlnqgzl6a2avevo4nvhoh424zwzmbti states/handle_failed_tx.py: bafybeihewm2vernvhktuorljdupjqcg2p5vs6wvsira2d62wkoyo5xlzjm diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index edd9e72f..01f6d077 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:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeicvz65mfxtxbqizsvd3r3sy7fwyutjfj5a2xu2d5uz7b2fq7xdpp4 -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif23c7z5kfuarlu2ivcw3nbbchrnze3y2nemznnsynghis7w3scky +- valory/decision_maker_abci:0.1.0:bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibdcyskwdir6vegmnrvktdpqjajj2xb4xz52ojkaa7t447c2umxg4 - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 de3d8846..cf470563 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:bafybeicvz65mfxtxbqizsvd3r3sy7fwyutjfj5a2xu2d5uz7b2fq7xdpp4 +- valory/decision_maker_abci:0.1.0:bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From f7d5c70b3611a2b5223cdf8f93f3e91f0cb2db68 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 11:40:19 +0000 Subject: [PATCH 03/11] fix: add decision received timestamp to get payloads test --- .../decision_maker_abci/tests/states/test_decision_receive.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/valory/skills/decision_maker_abci/tests/states/test_decision_receive.py b/packages/valory/skills/decision_maker_abci/tests/states/test_decision_receive.py index 82c3a447..064c891a 100644 --- a/packages/valory/skills/decision_maker_abci/tests/states/test_decision_receive.py +++ b/packages/valory/skills/decision_maker_abci/tests/states/test_decision_receive.py @@ -18,7 +18,7 @@ # ------------------------------------------------------------------------------ """This package contains the tests for Decision Maker""" - +import datetime import json from dataclasses import dataclass, field from typing import Any, Callable, Dict, FrozenSet, Hashable, List, Mapping, Optional @@ -74,6 +74,7 @@ def get_payloads( next_mock_data_row=next_mock_data_row, is_profitable=is_profitable, bets_hash=bets_hash, # Added bets_hash parameter + decision_received_timestamp=int(datetime.datetime.utcnow().timestamp()), ) for participant in get_participants() } From 68bb496389c5bdb5ce3420a0f915fd1e7d663849 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 11:40:49 +0000 Subject: [PATCH 04/11] chore: 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 | 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 8a93eb38..8f93f2b8 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": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi", - "skill/valory/trader_abci/0.1.0": "bafybeidf56x6hjpv7gogkw546onk6qjzfgagvdkhj4pjkuj24prjqrzthu", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibdcyskwdir6vegmnrvktdpqjajj2xb4xz52ojkaa7t447c2umxg4", + "skill/valory/decision_maker_abci/0.1.0": "bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru", + "skill/valory/trader_abci/0.1.0": "bafybeifnwjci6btwhpwy5e6zigy44eye5iy4gk6pdpqtz2flfxtrwjf624", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihyhogkx7ctx5bagu7tjhwocr4fqh66dwxsjcoo6tpppb55w25v7y", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54", - "agent/valory/trader/0.1.0": "bafybeifppcguzxnswhz3sxcxbxjxsgmivqeu5ruapc2zk6fyeme2ssyto4", - "service/valory/trader/0.1.0": "bafybeif3wy4g767x6ykt4padbtvuwfsnh5rowgbpm4lzaa77efgru3zrxm", - "service/valory/trader_pearl/0.1.0": "bafybeigxflazpj3s2zccrr3b3ou6336meshnqdfmlcu6jypnu3kmbelj7u" + "agent/valory/trader/0.1.0": "bafybeihz2gexanrkuh5kjrrpcbvi2bar544d3wemalgysvhezh2h3fqisa", + "service/valory/trader/0.1.0": "bafybeibuhmrj7ish3kva5hsuxncujaccogx76u52hy26oondkgxh6uhxq4", + "service/valory/trader_pearl/0.1.0": "bafybeidpetdim4l2ckuipmnehhbqab4mxgwkqdeywm6jxuxxfpmmwqq6ke" }, "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 7533aa4d..cac0dc86 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:bafybeibdcyskwdir6vegmnrvktdpqjajj2xb4xz52ojkaa7t447c2umxg4 +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihyhogkx7ctx5bagu7tjhwocr4fqh66dwxsjcoo6tpppb55w25v7y - valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi -- valory/trader_abci:0.1.0:bafybeidf56x6hjpv7gogkw546onk6qjzfgagvdkhj4pjkuj24prjqrzthu +- valory/decision_maker_abci:0.1.0:bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru +- valory/trader_abci:0.1.0:bafybeifnwjci6btwhpwy5e6zigy44eye5iy4gk6pdpqtz2flfxtrwjf624 - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 1bc2d894..d48d709e 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:bafybeifppcguzxnswhz3sxcxbxjxsgmivqeu5ruapc2zk6fyeme2ssyto4 +agent: valory/trader:0.1.0:bafybeihz2gexanrkuh5kjrrpcbvi2bar544d3wemalgysvhezh2h3fqisa 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 aeae4303..19dd7fea 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:bafybeifppcguzxnswhz3sxcxbxjxsgmivqeu5ruapc2zk6fyeme2ssyto4 +agent: valory/trader:0.1.0:bafybeihz2gexanrkuh5kjrrpcbvi2bar544d3wemalgysvhezh2h3fqisa 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 b3ffee60..c79ca912 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -64,7 +64,7 @@ fingerprint: tests/states/test_blacklising.py: bafybeihm2ex6l7fhorgi3mjj2epztu2r7bqbg56unpgpzfzymghshchqzy tests/states/test_check_benchmarking.py: bafybeifwpi5f4fhreqptfxdsnyv3nptkqytkwbukfuqkrjo4eww7cv3sxy tests/states/test_claim_subscription.py: bafybeiclkxjhceb3ehgmg6klt4uywew5drk5b3w6no7mwxetpubxqrejfy - tests/states/test_decision_receive.py: bafybeifj7rwqyzfcvnqqhbo25pl2jppgjqnqldadwku5wl2tpskfj2zwxq + tests/states/test_decision_receive.py: bafybeiddj42tdkghvga574qxvixh7nmf6bpdjitlk3eliimnq2r4n6qlrm tests/states/test_decision_request.py: bafybeigqbakm2olkwvcngertjplhnmu6on6tp6hxn7lxygi2gf5a5eurbe tests/states/test_final_states.py: bafybeiftfd3ovaqpfe7t5ry7maiziavk74wl66d6zo6ikhgodznormd2nm tests/states/test_handle_failed_tx.py: bafybeibuepj6fko7ba3bef6nybzetilni2iwgkxd5xeazqskadbad3l2zq diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 01f6d077..4813c0af 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:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibdcyskwdir6vegmnrvktdpqjajj2xb4xz52ojkaa7t447c2umxg4 +- valory/decision_maker_abci:0.1.0:bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihyhogkx7ctx5bagu7tjhwocr4fqh66dwxsjcoo6tpppb55w25v7y - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 cf470563..ffb08eb2 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:bafybeigsx4n23xiwmboglqnk5uobjlqaf4ogvyhcgaq63wdc7ygdynihyi +- valory/decision_maker_abci:0.1.0:bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 6c12cd940195eaf9a43d326f83efa16a54a784e4 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 12:38:31 +0000 Subject: [PATCH 05/11] add expected mech response time to pearl config --- packages/packages.json | 2 +- packages/valory/services/trader_pearl/service.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/packages.json b/packages/packages.json index 8f93f2b8..cfebe813 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -23,7 +23,7 @@ "skill/valory/check_stop_trading_abci/0.1.0": "bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54", "agent/valory/trader/0.1.0": "bafybeihz2gexanrkuh5kjrrpcbvi2bar544d3wemalgysvhezh2h3fqisa", "service/valory/trader/0.1.0": "bafybeibuhmrj7ish3kva5hsuxncujaccogx76u52hy26oondkgxh6uhxq4", - "service/valory/trader_pearl/0.1.0": "bafybeidpetdim4l2ckuipmnehhbqab4mxgwkqdeywm6jxuxxfpmmwqq6ke" + "service/valory/trader_pearl/0.1.0": "bafybeiccj7netlsoqi4gns2c66ggpojkfmxjs3rrzk2kduphaexz6xtnha" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/services/trader_pearl/service.yaml b/packages/valory/services/trader_pearl/service.yaml index 19dd7fea..f09b41f7 100644 --- a/packages/valory/services/trader_pearl/service.yaml +++ b/packages/valory/services/trader_pearl/service.yaml @@ -103,6 +103,7 @@ models: requester_staking_instance_address: ${REQUESTER_STAKING_INSTANCE_ADDRESS:str:0x0000000000000000000000000000000000000000} response_timeout: ${RESPONSE_TIMEOUT:int:300} policy_store_update_offset: ${POLICY_STORE_UPDATE_OFFSET:int:259200} + expected_mech_response_time: ${EXPECTED_MECH_RESPONSE_TIME:int:300} benchmark_tool: args: log_dir: /benchmarks From 7cffb22ac272800fa0acf9b6229a5783b2b23441 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 13:32:42 +0000 Subject: [PATCH 06/11] fix: make config overridable --- packages/packages.json | 6 +++--- packages/valory/agents/trader/aea-config.yaml | 2 +- packages/valory/services/trader/service.yaml | 2 +- packages/valory/services/trader_pearl/service.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index cfebe813..db03fa72 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -21,9 +21,9 @@ "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihyhogkx7ctx5bagu7tjhwocr4fqh66dwxsjcoo6tpppb55w25v7y", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54", - "agent/valory/trader/0.1.0": "bafybeihz2gexanrkuh5kjrrpcbvi2bar544d3wemalgysvhezh2h3fqisa", - "service/valory/trader/0.1.0": "bafybeibuhmrj7ish3kva5hsuxncujaccogx76u52hy26oondkgxh6uhxq4", - "service/valory/trader_pearl/0.1.0": "bafybeiccj7netlsoqi4gns2c66ggpojkfmxjs3rrzk2kduphaexz6xtnha" + "agent/valory/trader/0.1.0": "bafybeigdvpsreuelx7bvkvgqnzvubso6kjsfbivqhezf75y5hpbbrbegbm", + "service/valory/trader/0.1.0": "bafybeibyppfmlviuskno2fcj7d356z4tembbtkubp3i2vq5kv5x3qkdkvm", + "service/valory/trader_pearl/0.1.0": "bafybeifoz7ofkkczpdidrwov5mwm4n4lbfsf346edbwf7c2w3olf6ttzvy" }, "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 cac0dc86..7bb6a8d2 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -245,7 +245,7 @@ models: priority_mech_service_id: ${int:0} requester_staking_instance_address: ${str:0x0000000000000000000000000000000000000000} response_timeout: ${int:300} - expected_mech_response_time: 300 + expected_mech_response_time: ${int:300} benchmarking_mode: args: enabled: ${bool:false} diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index d48d709e..ad961082 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:bafybeihz2gexanrkuh5kjrrpcbvi2bar544d3wemalgysvhezh2h3fqisa +agent: valory/trader:0.1.0:bafybeigdvpsreuelx7bvkvgqnzvubso6kjsfbivqhezf75y5hpbbrbegbm 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 f09b41f7..2cde821e 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:bafybeihz2gexanrkuh5kjrrpcbvi2bar544d3wemalgysvhezh2h3fqisa +agent: valory/trader:0.1.0:bafybeigdvpsreuelx7bvkvgqnzvubso6kjsfbivqhezf75y5hpbbrbegbm number_of_agents: 1 deployment: agent: From f2094831067d826e35b3b6f87100df95ecd304fc Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 13:45:10 +0000 Subject: [PATCH 07/11] fix: payload test --- 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 +- .../decision_maker_abci/tests/test_payloads.py | 3 +++ packages/valory/skills/trader_abci/skill.yaml | 4 ++-- .../skills/tx_settlement_multiplexer_abci/skill.yaml | 2 +- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index db03fa72..bea035e6 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": "bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa", - "skill/valory/decision_maker_abci/0.1.0": "bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru", - "skill/valory/trader_abci/0.1.0": "bafybeifnwjci6btwhpwy5e6zigy44eye5iy4gk6pdpqtz2flfxtrwjf624", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeihyhogkx7ctx5bagu7tjhwocr4fqh66dwxsjcoo6tpppb55w25v7y", + "skill/valory/decision_maker_abci/0.1.0": "bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa", + "skill/valory/trader_abci/0.1.0": "bafybeigdgggk3ghy46x65ky5c76fy7mci3iniq22dd6uutdunzqj6yazlq", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeigaunkiw3ek3xrmxt35v62o3mohwpq7gbx6mdybebta5rq65c7jju", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54", - "agent/valory/trader/0.1.0": "bafybeigdvpsreuelx7bvkvgqnzvubso6kjsfbivqhezf75y5hpbbrbegbm", - "service/valory/trader/0.1.0": "bafybeibyppfmlviuskno2fcj7d356z4tembbtkubp3i2vq5kv5x3qkdkvm", - "service/valory/trader_pearl/0.1.0": "bafybeifoz7ofkkczpdidrwov5mwm4n4lbfsf346edbwf7c2w3olf6ttzvy" + "agent/valory/trader/0.1.0": "bafybeibqjelcx6ls2ezwembpxzemgvths3ebbt6oqr32v4eln437ulwspq", + "service/valory/trader/0.1.0": "bafybeiexftzugkvbxq4iw26mp4ct72pwysodyym54sg3xqbttgs5yagiey", + "service/valory/trader_pearl/0.1.0": "bafybeiabzfl6duoy3rksaara6fjdly5eunxs3upbckuwdspn6etx5ju6eu" }, "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 7bb6a8d2..39aba900 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:bafybeihyhogkx7ctx5bagu7tjhwocr4fqh66dwxsjcoo6tpppb55w25v7y +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigaunkiw3ek3xrmxt35v62o3mohwpq7gbx6mdybebta5rq65c7jju - valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru -- valory/trader_abci:0.1.0:bafybeifnwjci6btwhpwy5e6zigy44eye5iy4gk6pdpqtz2flfxtrwjf624 +- valory/decision_maker_abci:0.1.0:bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa +- valory/trader_abci:0.1.0:bafybeigdgggk3ghy46x65ky5c76fy7mci3iniq22dd6uutdunzqj6yazlq - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 ad961082..c62de2b9 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:bafybeigdvpsreuelx7bvkvgqnzvubso6kjsfbivqhezf75y5hpbbrbegbm +agent: valory/trader:0.1.0:bafybeibqjelcx6ls2ezwembpxzemgvths3ebbt6oqr32v4eln437ulwspq 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 2cde821e..92c88eaf 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:bafybeigdvpsreuelx7bvkvgqnzvubso6kjsfbivqhezf75y5hpbbrbegbm +agent: valory/trader:0.1.0:bafybeibqjelcx6ls2ezwembpxzemgvths3ebbt6oqr32v4eln437ulwspq 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 c79ca912..f1c39fe5 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -75,7 +75,7 @@ fingerprint: tests/states/test_tool_selection.py: bafybeib7js3dj7647t33o5ybfqftwytxktwrvhbri5yuyymg6znj6y7xxa tests/test_dialogues.py: bafybeibulo64tgfrq4e5qbcqnmifrlehkqciwuavublints353zaj2mlpa tests/test_handlers.py: bafybeihpkgtjjm3uegpup6zkznpoaxqpu6kmp3ujiggrzbe73p5fzlq7im - tests/test_payloads.py: bafybeicqrk7f4gpn3snddjpebwgnzbj3uu4rl3pni2tuihc3db2y2jgfam + tests/test_payloads.py: bafybeifolgd3qvhxd5psrif4seo5a7ywzz6uumkgfisy7ipoxzeqsspzfu tests/test_rounds.py: bafybeigifftusd4ew42tyvyrr55o2uehhcik2gdq3atkpjwwlqdeskedty utils/__init__.py: bafybeiazrfg3kwfdl5q45azwz6b6mobqxngxpf4hazmrnkhinpk4qhbbf4 utils/nevermined.py: bafybeigallaqxhqopznhjhefr6bukh4ojkz5vdtqyzod5dksshrf24fjgi diff --git a/packages/valory/skills/decision_maker_abci/tests/test_payloads.py b/packages/valory/skills/decision_maker_abci/tests/test_payloads.py index 980b1082..0febf9c7 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_payloads.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_payloads.py @@ -17,6 +17,8 @@ # # ------------------------------------------------------------------------------ """This module contains the transaction payloads for the decision maker abci.""" + +from datetime import datetime from typing import Dict, Type import pytest @@ -48,6 +50,7 @@ "confidence": 0.90, "bet_amount": 1, "next_mock_data_row": 1, + "decision_received_timestamp": int(datetime.utcnow().timestamp()), }, ), ( diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 4813c0af..00578e4f 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:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeihyhogkx7ctx5bagu7tjhwocr4fqh66dwxsjcoo6tpppb55w25v7y +- valory/decision_maker_abci:0.1.0:bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigaunkiw3ek3xrmxt35v62o3mohwpq7gbx6mdybebta5rq65c7jju - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 ffb08eb2..c9209997 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:bafybeia327bcvh63ifmir2cktdpmqpqcgwmdimafkjzlc7hln43wc6xzru +- valory/decision_maker_abci:0.1.0:bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From 9c2d330ef8f9b786c6fe3b6d3673eb67df212996 Mon Sep 17 00:00:00 2001 From: Anna Sambrook Date: Mon, 2 Dec 2024 14:34:09 +0000 Subject: [PATCH 08/11] fix: test order subscription --- 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 | 7 ++++--- .../tests/states/test_order_subscription.py | 3 ++- .../decision_maker_abci/tests/test_payloads.py | 1 + .../valory/skills/market_manager_abci/skill.yaml | 1 + packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 10 files changed, 25 insertions(+), 21 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index bea035e6..405f9c19 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": "bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa", - "skill/valory/trader_abci/0.1.0": "bafybeigdgggk3ghy46x65ky5c76fy7mci3iniq22dd6uutdunzqj6yazlq", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeigaunkiw3ek3xrmxt35v62o3mohwpq7gbx6mdybebta5rq65c7jju", + "skill/valory/market_manager_abci/0.1.0": "bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i", + "skill/valory/decision_maker_abci/0.1.0": "bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii", + "skill/valory/trader_abci/0.1.0": "bafybeicnqymssye7iunnxdeodxv7frjgizlqxv65a32me5ms7hcq5vkhge", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeianqmo466ksztcqsw2hhxw3yl3afto6okfjyy2ot6a34krez6acwq", "skill/valory/staking_abci/0.1.0": "bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne", "skill/valory/check_stop_trading_abci/0.1.0": "bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54", - "agent/valory/trader/0.1.0": "bafybeibqjelcx6ls2ezwembpxzemgvths3ebbt6oqr32v4eln437ulwspq", - "service/valory/trader/0.1.0": "bafybeiexftzugkvbxq4iw26mp4ct72pwysodyym54sg3xqbttgs5yagiey", - "service/valory/trader_pearl/0.1.0": "bafybeiabzfl6duoy3rksaara6fjdly5eunxs3upbckuwdspn6etx5ju6eu" + "agent/valory/trader/0.1.0": "bafybeibxruliur6cpcgsepjw7o63pabbhmlezomjovjpd6tmnetwtxyt6u", + "service/valory/trader/0.1.0": "bafybeibl2vxhbzbwunwspiesx6hsgveeojxdscye36hscndx4zzb57xb6q", + "service/valory/trader_pearl/0.1.0": "bafybeiby7h7va27ycecfef6l3e2xsnzhsc7iemdn3v2trt456grk7dkupu" }, "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 39aba900..913e7005 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:bafybeigaunkiw3ek3xrmxt35v62o3mohwpq7gbx6mdybebta5rq65c7jju -- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa -- valory/decision_maker_abci:0.1.0:bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa -- valory/trader_abci:0.1.0:bafybeigdgggk3ghy46x65ky5c76fy7mci3iniq22dd6uutdunzqj6yazlq +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeianqmo466ksztcqsw2hhxw3yl3afto6okfjyy2ot6a34krez6acwq +- valory/market_manager_abci:0.1.0:bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i +- valory/decision_maker_abci:0.1.0:bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii +- valory/trader_abci:0.1.0:bafybeicnqymssye7iunnxdeodxv7frjgizlqxv65a32me5ms7hcq5vkhge - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 c62de2b9..fb0b1bbc 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:bafybeibqjelcx6ls2ezwembpxzemgvths3ebbt6oqr32v4eln437ulwspq +agent: valory/trader:0.1.0:bafybeibxruliur6cpcgsepjw7o63pabbhmlezomjovjpd6tmnetwtxyt6u 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 92c88eaf..dcc9885a 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:bafybeibqjelcx6ls2ezwembpxzemgvths3ebbt6oqr32v4eln437ulwspq +agent: valory/trader:0.1.0:bafybeibxruliur6cpcgsepjw7o63pabbhmlezomjovjpd6tmnetwtxyt6u 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 f1c39fe5..4cb0e45e 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -9,6 +9,7 @@ description: This skill is responsible for the decision making and placing the b license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: + .coverage: bafybeiamyhdetx6urx43npwxxsid2o26dt5akzyvtyvyeb33v4h4rhrqii README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky @@ -68,14 +69,14 @@ fingerprint: tests/states/test_decision_request.py: bafybeigqbakm2olkwvcngertjplhnmu6on6tp6hxn7lxygi2gf5a5eurbe tests/states/test_final_states.py: bafybeiftfd3ovaqpfe7t5ry7maiziavk74wl66d6zo6ikhgodznormd2nm tests/states/test_handle_failed_tx.py: bafybeibuepj6fko7ba3bef6nybzetilni2iwgkxd5xeazqskadbad3l2zq - tests/states/test_order_subscription.py: bafybeiag37uk5mitjm4yadcpr67icfmmzeucdlgvqoct4y4jeyhnebyyoi + tests/states/test_order_subscription.py: bafybeienk43nsbhekzndztykcwyt7rqisiesu7qzscrhqdqvsonkzbtteq tests/states/test_randomness.py: bafybeib3eqjv6mhlprzda7d4viddn5alrfqteq6juyg3ccejseoywcsbey tests/states/test_redeem.py: bafybeiezdnfrxukb2xpwffrr357g2anmdkwy7wo3nphvlggipq5xrdzr7a tests/states/test_sampling.py: bafybeifvbzikke6wtex2p5j7fsnpdbj4qqxl5vh2lm2m2apgvuqdonoyzm tests/states/test_tool_selection.py: bafybeib7js3dj7647t33o5ybfqftwytxktwrvhbri5yuyymg6znj6y7xxa tests/test_dialogues.py: bafybeibulo64tgfrq4e5qbcqnmifrlehkqciwuavublints353zaj2mlpa tests/test_handlers.py: bafybeihpkgtjjm3uegpup6zkznpoaxqpu6kmp3ujiggrzbe73p5fzlq7im - tests/test_payloads.py: bafybeifolgd3qvhxd5psrif4seo5a7ywzz6uumkgfisy7ipoxzeqsspzfu + tests/test_payloads.py: bafybeiez44b2dzcwfb5zbtwkv4stdb53twjllq5jkx4jm4iivguyytt6we tests/test_rounds.py: bafybeigifftusd4ew42tyvyrr55o2uehhcik2gdq3atkpjwwlqdeskedty utils/__init__.py: bafybeiazrfg3kwfdl5q45azwz6b6mobqxngxpf4hazmrnkhinpk4qhbbf4 utils/nevermined.py: bafybeigallaqxhqopznhjhefr6bukh4ojkz5vdtqyzod5dksshrf24fjgi @@ -101,7 +102,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:bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne diff --git a/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py b/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py index c3886605..c59be242 100644 --- a/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py +++ b/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py @@ -139,7 +139,7 @@ def test_end_block_updates_sync_data( with patch.object( SubscriptionRound, "most_voted_payload_values", - new_callable=MagicMock(return_value=[None, None, None, "new_agreement_id"]), + new_callable=MagicMock(return_value=[None, None, None, "new_agreement_id", 10000]), ): # Call the `end_block` method to trigger the update result = round_instance.end_block() @@ -148,6 +148,7 @@ def test_end_block_updates_sync_data( sync_data, event = result # Assert that the agreement_id was updated to the new_agreement_id assert getattr(sync_data, "agreement_id", None) == "new_agreement_id" + assert getattr(sync_data, "wallet_balance", None) == 10000 assert event is not None diff --git a/packages/valory/skills/decision_maker_abci/tests/test_payloads.py b/packages/valory/skills/decision_maker_abci/tests/test_payloads.py index 0febf9c7..acfea13c 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_payloads.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_payloads.py @@ -97,6 +97,7 @@ "tx_submitter": "dummy tx submitter", "tx_hash": "dummy tx hash", "mocking_mode": True, + "wallet_balance": 10000 }, ), ( diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 44e6f05a..11497961 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -6,6 +6,7 @@ description: This skill implements the MarketManager for an AEA. license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: + .coverage: bafybeiamyhdetx6urx43npwxxsid2o26dt5akzyvtyvyeb33v4h4rhrqii README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeifzt6vykvvgr5rtzmzdbo7bfsxi765xsljdfrktrq35ogf6cdhmna diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 00578e4f..69d6a41c 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:bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeigaunkiw3ek3xrmxt35v62o3mohwpq7gbx6mdybebta5rq65c7jju +- valory/market_manager_abci:0.1.0:bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i +- valory/decision_maker_abci:0.1.0:bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeianqmo466ksztcqsw2hhxw3yl3afto6okfjyy2ot6a34krez6acwq - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/check_stop_trading_abci:0.1.0:bafybeib75qrimmvensqmskdp5kzki5ijjwolqk2ojekeommakaf64mzn54 - 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 c9209997..80534d70 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:bafybeihnflr5sfvdcahviwb6jleevxlzuqrijwvs3abrguvbrn34rti4oa +- valory/decision_maker_abci:0.1.0:bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: From e58c8999bb71fba4b8e7543fc7f9f2dece4eac63 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Mon, 2 Dec 2024 16:54:46 +0200 Subject: [PATCH 09/11] fix: remove getter and setter conflicting with the attribute - The getter and setter use an attribute that is missing from the init. - The getter and setter have the same name as an already existing attribute in the init and this can cause issues: https://github.com/valory-xyz/trader/blob/6d1a7f53c9aec6df359a603d3df700de3ef68ded/packages/valory/skills/decision_maker_abci/models.py#L228 --- packages/valory/skills/decision_maker_abci/models.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/valory/skills/decision_maker_abci/models.py b/packages/valory/skills/decision_maker_abci/models.py index 201e17d3..4ecfaa23 100644 --- a/packages/valory/skills/decision_maker_abci/models.py +++ b/packages/valory/skills/decision_maker_abci/models.py @@ -266,16 +266,6 @@ def current_liquidity_amounts(self, value: List[int]) -> None: """Set the current liquidity amounts.""" self.liquidity_amounts[self.mock_question_id] = value - @property - def bet_id_row_manager(self) -> Dict[str, List[int]]: - """Get the next_mock_data_row.""" - return self._bet_id_row_manager - - @bet_id_row_manager.setter - def bet_id_row_manager(self, mapping: Dict[str, List[int]]) -> None: - """Set the next_mock_data_row.""" - self._bet_id_row_manager = mapping - def _initialize_simulated_now_timestamps( self, bets: List[Bet], safe_voting_range: int ) -> None: From 35acd55ede77a3dd9b0f2947622f5a931453c530 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Mon, 2 Dec 2024 17:13:24 +0200 Subject: [PATCH 10/11] refactor: remove the liquidity changed check Removed in order to increase the chances of meeting the KPIs. --- .../decision_maker_abci/behaviours/sampling.py | 14 +------------- 1 file changed, 1 insertion(+), 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 9ac80c4d..12d71ece 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/sampling.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/sampling.py @@ -59,11 +59,6 @@ def setup(self) -> None: rebetting_status = "enabled" if self.should_rebet else "disabled" self.context.logger.info(f"Rebetting {rebetting_status}.") - def has_liquidity_changed(self, bet: Bet) -> bool: - """Whether the liquidity of a specific market has changed since it was last selected.""" - previous_bet_liquidity = self.shared_state.liquidity_cache.get(bet.id, None) - return bet.scaledLiquidityMeasure != previous_bet_liquidity - def processable_bet(self, bet: Bet, now: int) -> bool: """Whether we can process the given bet.""" @@ -86,14 +81,7 @@ def processable_bet(self, bet: Bet, now: int) -> bool: # 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) + return within_ranges # create a filter based on whether we can rebet or not lifetime = bet.openingTimestamp - now From 882d36e73ed347f5ef6cf5d016fe571017c51039 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Mon, 2 Dec 2024 16:57:23 +0200 Subject: [PATCH 11/11] chore: run 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 | 11 +++++------ .../tests/states/test_order_subscription.py | 4 +++- .../decision_maker_abci/tests/test_payloads.py | 2 +- .../valory/skills/market_manager_abci/skill.yaml | 1 - packages/valory/skills/trader_abci/skill.yaml | 6 +++--- .../tx_settlement_multiplexer_abci/skill.yaml | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 405f9c19..20a41cbf 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": "bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i", - "skill/valory/decision_maker_abci/0.1.0": "bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii", - "skill/valory/trader_abci/0.1.0": "bafybeicnqymssye7iunnxdeodxv7frjgizlqxv65a32me5ms7hcq5vkhge", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeianqmo466ksztcqsw2hhxw3yl3afto6okfjyy2ot6a34krez6acwq", + "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": "bafybeibxruliur6cpcgsepjw7o63pabbhmlezomjovjpd6tmnetwtxyt6u", - "service/valory/trader/0.1.0": "bafybeibl2vxhbzbwunwspiesx6hsgveeojxdscye36hscndx4zzb57xb6q", - "service/valory/trader_pearl/0.1.0": "bafybeiby7h7va27ycecfef6l3e2xsnzhsc7iemdn3v2trt456grk7dkupu" + "agent/valory/trader/0.1.0": "bafybeifwqory3yuyhi6sxkoy3ihyzdbus444pkehyoxiibjqo5mjcawbhe", + "service/valory/trader/0.1.0": "bafybeiezli7klgpvdlvdkh7wxmulyosp7f3xzmkmdtzrgtcloqdng5qcea", + "service/valory/trader_pearl/0.1.0": "bafybeic52jtgilmipang6wcr3ogbfyskwzb7iaat3lur5pe7fjkpkqc7da" }, "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 913e7005..9b19512a 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:bafybeianqmo466ksztcqsw2hhxw3yl3afto6okfjyy2ot6a34krez6acwq -- valory/market_manager_abci:0.1.0:bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i -- valory/decision_maker_abci:0.1.0:bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii -- valory/trader_abci:0.1.0:bafybeicnqymssye7iunnxdeodxv7frjgizlqxv65a32me5ms7hcq5vkhge +- 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/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index fb0b1bbc..a1ea6c51 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:bafybeibxruliur6cpcgsepjw7o63pabbhmlezomjovjpd6tmnetwtxyt6u +agent: valory/trader:0.1.0:bafybeifwqory3yuyhi6sxkoy3ihyzdbus444pkehyoxiibjqo5mjcawbhe 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 dcc9885a..90e1c3d6 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:bafybeibxruliur6cpcgsepjw7o63pabbhmlezomjovjpd6tmnetwtxyt6u +agent: valory/trader:0.1.0:bafybeifwqory3yuyhi6sxkoy3ihyzdbus444pkehyoxiibjqo5mjcawbhe 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 4cb0e45e..fccbe682 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -9,7 +9,6 @@ description: This skill is responsible for the decision making and placing the b license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: - .coverage: bafybeiamyhdetx6urx43npwxxsid2o26dt5akzyvtyvyeb33v4h4rhrqii README.md: bafybeia367zzdwndvlhw27rvnwodytjo3ms7gbc3q7mhrrjqjgfasnk47i __init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky @@ -25,7 +24,7 @@ fingerprint: behaviours/randomness.py: bafybeiaoj3awyyg2onhpsdsn3dyczs23gr4smuzqcbw3e5ocljwxswjkce behaviours/reedem.py: bafybeiaxwp4lx62owcaqfp6xcqh6567f5yvwnl4rage2f5hmq4nltkzjjy behaviours/round_behaviour.py: bafybeih63hpia2bwwzu563hxs5yd3t5ycvxvkfnhvxbzghbyy3mw3xjl3i - behaviours/sampling.py: bafybeicimvm5ii26cjbmonznk5qi7jwyq7wbgkhbecfa44yi4rkfjnpdum + behaviours/sampling.py: bafybeihlpkinxgewpyazax2qlwzlo5iwpxcce6g5juybn6qinstzku27fi behaviours/storage_manager.py: bafybeiez6daaj2bufxdcsghtmqybyrzdh74z26cc4ajsqsiy5krgjo2tla behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm @@ -33,7 +32,7 @@ fingerprint: handlers.py: bafybeibf42562x3d5i66yf5p3vi6a2oolhwwxr32pjqtuxz5w4gmg3r4oa io_/__init__.py: bafybeifxgmmwjqzezzn3e6keh2bfo4cyo7y5dq2ept3stfmgglbrzfl5rq io_/loader.py: bafybeih3sdsx5dhe4kzhtoafexjgkutsujwqy3zcdrlrkhtdks45bc7exa - models.py: bafybeiemk4xiphf6sn7ei7rukn2veebeu2pg3j2xy5nqxcizelnkpvivqm + models.py: bafybeidhdqgwcgn4rrncufpdmkbcye7xfqd6ytow7zx3hbcpsgpjmxgfmm payloads.py: bafybeif3d4qgj635rbnp6a5lgwhgbyilta6mtytjcej2jccorckxbuaev4 policy.py: bafybeihlzs4o5e7yfmfzcvvrzkf4bhxfsg5gxnzsrpepwgfugh45gafye4 redeem_info.py: bafybeifiiix4gihfo4avraxt34sfw35v6dqq45do2drrssei2shbps63mm @@ -69,14 +68,14 @@ fingerprint: tests/states/test_decision_request.py: bafybeigqbakm2olkwvcngertjplhnmu6on6tp6hxn7lxygi2gf5a5eurbe tests/states/test_final_states.py: bafybeiftfd3ovaqpfe7t5ry7maiziavk74wl66d6zo6ikhgodznormd2nm tests/states/test_handle_failed_tx.py: bafybeibuepj6fko7ba3bef6nybzetilni2iwgkxd5xeazqskadbad3l2zq - tests/states/test_order_subscription.py: bafybeienk43nsbhekzndztykcwyt7rqisiesu7qzscrhqdqvsonkzbtteq + tests/states/test_order_subscription.py: bafybeidx2tzivsxhpr5xx5e5h2xmpjyewfogt2mujv4sq3hbaeksmcbvhy tests/states/test_randomness.py: bafybeib3eqjv6mhlprzda7d4viddn5alrfqteq6juyg3ccejseoywcsbey tests/states/test_redeem.py: bafybeiezdnfrxukb2xpwffrr357g2anmdkwy7wo3nphvlggipq5xrdzr7a tests/states/test_sampling.py: bafybeifvbzikke6wtex2p5j7fsnpdbj4qqxl5vh2lm2m2apgvuqdonoyzm tests/states/test_tool_selection.py: bafybeib7js3dj7647t33o5ybfqftwytxktwrvhbri5yuyymg6znj6y7xxa tests/test_dialogues.py: bafybeibulo64tgfrq4e5qbcqnmifrlehkqciwuavublints353zaj2mlpa tests/test_handlers.py: bafybeihpkgtjjm3uegpup6zkznpoaxqpu6kmp3ujiggrzbe73p5fzlq7im - tests/test_payloads.py: bafybeiez44b2dzcwfb5zbtwkv4stdb53twjllq5jkx4jm4iivguyytt6we + tests/test_payloads.py: bafybeic6h4jxlb6rxyx4fde753xvfdo5lszfcl2j6wlb266v3cxjrluqgi tests/test_rounds.py: bafybeigifftusd4ew42tyvyrr55o2uehhcik2gdq3atkpjwwlqdeskedty utils/__init__.py: bafybeiazrfg3kwfdl5q45azwz6b6mobqxngxpf4hazmrnkhinpk4qhbbf4 utils/nevermined.py: bafybeigallaqxhqopznhjhefr6bukh4ojkz5vdtqyzod5dksshrf24fjgi @@ -102,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:bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i +- valory/market_manager_abci:0.1.0:bafybeicztk62pslofv6ui3aw3giw2tnvlfwfmatqbyvvzv4ampneu6isqa - valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne diff --git a/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py b/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py index c59be242..82c026e6 100644 --- a/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py +++ b/packages/valory/skills/decision_maker_abci/tests/states/test_order_subscription.py @@ -139,7 +139,9 @@ def test_end_block_updates_sync_data( with patch.object( SubscriptionRound, "most_voted_payload_values", - new_callable=MagicMock(return_value=[None, None, None, "new_agreement_id", 10000]), + new_callable=MagicMock( + return_value=[None, None, None, "new_agreement_id", 10000] + ), ): # Call the `end_block` method to trigger the update result = round_instance.end_block() diff --git a/packages/valory/skills/decision_maker_abci/tests/test_payloads.py b/packages/valory/skills/decision_maker_abci/tests/test_payloads.py index acfea13c..a8197400 100644 --- a/packages/valory/skills/decision_maker_abci/tests/test_payloads.py +++ b/packages/valory/skills/decision_maker_abci/tests/test_payloads.py @@ -97,7 +97,7 @@ "tx_submitter": "dummy tx submitter", "tx_hash": "dummy tx hash", "mocking_mode": True, - "wallet_balance": 10000 + "wallet_balance": 10000, }, ), ( diff --git a/packages/valory/skills/market_manager_abci/skill.yaml b/packages/valory/skills/market_manager_abci/skill.yaml index 11497961..44e6f05a 100644 --- a/packages/valory/skills/market_manager_abci/skill.yaml +++ b/packages/valory/skills/market_manager_abci/skill.yaml @@ -6,7 +6,6 @@ description: This skill implements the MarketManager for an AEA. license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: - .coverage: bafybeiamyhdetx6urx43npwxxsid2o26dt5akzyvtyvyeb33v4h4rhrqii README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq __init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e behaviours.py: bafybeifzt6vykvvgr5rtzmzdbo7bfsxi765xsljdfrktrq35ogf6cdhmna diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 69d6a41c..2a005c7d 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:bafybeigmea7hrb42fj5v6pwjzww3vibvoov5qd7raiv5didzvrikxs242i -- valory/decision_maker_abci:0.1.0:bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeianqmo466ksztcqsw2hhxw3yl3afto6okfjyy2ot6a34krez6acwq +- 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/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 80534d70..3f2dfba7 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:bafybeigsrmbaalqtl3moyrpiv4sl2pse5cxmqy56rxco3x3gkdnt4d3gii +- valory/decision_maker_abci:0.1.0:bafybeig3sqaeqedobqdg7gynrxnbq2kgzh4gp5pe5gxo5kw4hczfjmj6e4 - valory/staking_abci:0.1.0:bafybeictd5pxhscuhqntvctb7l5lfjausxt2m22rg5mkaiuj4cwwcxpvne - valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm behaviours: