Skip to content

Commit 3e3cc2a

Browse files
authored
Merge pull request #405 from valory-xyz/develop
Release `v0.25.1`
2 parents 60d78fb + 291969f commit 3e3cc2a

File tree

14 files changed

+53
-36
lines changed

14 files changed

+53
-36
lines changed

packages/packages.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
"contract/valory/staking_token/0.1.0": "bafybeiabkkhjpybqpzdfc4vcbiz4vefctfpvwetbmo7pqpiuxprmpvnti4",
1717
"contract/valory/relayer/0.1.0": "bafybeibvqc3lwxtcnu6dgfkf7mzefdgtfyosyq2dow7ogyxsl25vkxjwea",
1818
"skill/valory/market_manager_abci/0.1.0": "bafybeihmyqkzl3bm5zvjnc4auj32qjf3pk73scyq7mntmpsudqnisb4gey",
19-
"skill/valory/decision_maker_abci/0.1.0": "bafybeigddrgyys4rqu3x6gwig7cpylesbpy6ioocmngremad373w54nlky",
20-
"skill/valory/trader_abci/0.1.0": "bafybeidvi2fa26sbs3ig56rzfsewzcr2htgwkpxcdxzauyoys27byynoze",
21-
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicffb2hc2efvr33tvbbd5dp5sbj25fkar4fhgmqfbpy4fzxnzolsy",
19+
"skill/valory/decision_maker_abci/0.1.0": "bafybeidlc7ed2lnrre3yyugqu35vlydbd6bzjgi7z6ormlguwjn5fpriku",
20+
"skill/valory/trader_abci/0.1.0": "bafybeienif666scmx4zyn55u27pupgex4xw4ifwhoctskeoxj72devyu54",
21+
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiaonsd6obcnmhhrmkbejna6xeohpmzpalrsiwkvtk7yxu5vetqqqu",
2222
"skill/valory/staking_abci/0.1.0": "bafybeial5xtgzf37e2khvdrc2q2wa2xhirjwioi2szwvcgtupidjxhg7tq",
2323
"skill/valory/check_stop_trading_abci/0.1.0": "bafybeid7l74lmjnkeerkbvwhoo2l4cawb7c545rhcx3mjpsjux4zwy5wpm",
24-
"agent/valory/trader/0.1.0": "bafybeif4vgpi37dspburfa4nltd6rzi7muqgqx3ojliutibwpahln3wxbe",
25-
"service/valory/trader/0.1.0": "bafybeigzal6ikcehpsitpi7g3qgv6vhigcp2uqwlqgs3askdzaknk5bcy4",
26-
"service/valory/trader_pearl/0.1.0": "bafybeihgmbbjtkrlu62bkm3e4j2ehqipv5huqpifjiyttvjrk4sikwsfzu"
24+
"agent/valory/trader/0.1.0": "bafybeic625e3kale47ug35txqmkue74edbnype6oc5uijydqfwoetc24fu",
25+
"service/valory/trader/0.1.0": "bafybeiffqhv2waa355pnbbpmhpkn3a35gho3ey5o5fbartvd535df62vai",
26+
"service/valory/trader_pearl/0.1.0": "bafybeif5dmcya5vimxqecypr6rndmdv7xa2tidnygieinajqci7s25yjc4"
2727
},
2828
"third_party": {
2929
"protocol/valory/acn_data_share/0.1.0": "bafybeih5ydonnvrwvy2ygfqgfabkr47s4yw3uqxztmwyfprulwfsoe7ipq",

packages/valory/agents/trader/aea-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ skills:
5050
- valory/reset_pause_abci:0.1.0:bafybeigebq46oqz2mx2iajupr6p5pgm6z5pvfye5w6zypsseuqtvta7b4a
5151
- valory/termination_abci:0.1.0:bafybeieurwmfernodqyczj5ertsgfbjtjnrlgvte7sli4sajnbopty7inu
5252
- valory/transaction_settlement_abci:0.1.0:bafybeifkftgkyzrxwxjdyqixpp7vk6aqmufikalmwx3kydtlg74tonu47u
53-
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicffb2hc2efvr33tvbbd5dp5sbj25fkar4fhgmqfbpy4fzxnzolsy
53+
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaonsd6obcnmhhrmkbejna6xeohpmzpalrsiwkvtk7yxu5vetqqqu
5454
- valory/market_manager_abci:0.1.0:bafybeihmyqkzl3bm5zvjnc4auj32qjf3pk73scyq7mntmpsudqnisb4gey
55-
- valory/decision_maker_abci:0.1.0:bafybeigddrgyys4rqu3x6gwig7cpylesbpy6ioocmngremad373w54nlky
56-
- valory/trader_abci:0.1.0:bafybeidvi2fa26sbs3ig56rzfsewzcr2htgwkpxcdxzauyoys27byynoze
55+
- valory/decision_maker_abci:0.1.0:bafybeidlc7ed2lnrre3yyugqu35vlydbd6bzjgi7z6ormlguwjn5fpriku
56+
- valory/trader_abci:0.1.0:bafybeienif666scmx4zyn55u27pupgex4xw4ifwhoctskeoxj72devyu54
5757
- valory/staking_abci:0.1.0:bafybeial5xtgzf37e2khvdrc2q2wa2xhirjwioi2szwvcgtupidjxhg7tq
5858
- valory/check_stop_trading_abci:0.1.0:bafybeid7l74lmjnkeerkbvwhoo2l4cawb7c545rhcx3mjpsjux4zwy5wpm
5959
- valory/mech_interact_abci:0.1.0:bafybeif2tpz2zet6p4z4vi3b254oxzyyzoe5tehj3me3znzt7h7otkpd54

packages/valory/services/trader/service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license: Apache-2.0
77
fingerprint:
88
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
99
fingerprint_ignore_patterns: []
10-
agent: valory/trader:0.1.0:bafybeif4vgpi37dspburfa4nltd6rzi7muqgqx3ojliutibwpahln3wxbe
10+
agent: valory/trader:0.1.0:bafybeic625e3kale47ug35txqmkue74edbnype6oc5uijydqfwoetc24fu
1111
number_of_agents: 4
1212
deployment:
1313
agent:

packages/valory/services/trader_pearl/service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license: Apache-2.0
88
fingerprint:
99
README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e
1010
fingerprint_ignore_patterns: []
11-
agent: valory/trader:0.1.0:bafybeif4vgpi37dspburfa4nltd6rzi7muqgqx3ojliutibwpahln3wxbe
11+
agent: valory/trader:0.1.0:bafybeic625e3kale47ug35txqmkue74edbnype6oc5uijydqfwoetc24fu
1212
number_of_agents: 1
1313
deployment:
1414
agent:

packages/valory/skills/decision_maker_abci/behaviours/bet_placement.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# ------------------------------------------------------------------------------
33
#
4-
# Copyright 2023-2024 Valory AG
4+
# Copyright 2023-2025 Valory AG
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -187,9 +187,15 @@ def _build_buy_tx(self) -> WaitableConditionType:
187187

188188
def _prepare_safe_tx(self) -> Generator[None, None, Optional[str]]:
189189
"""Prepare the safe transaction for placing a bet and return the hex for the tx settlement skill."""
190+
yield from self.wait_for_condition_with_sleep(self._build_approval_tx)
191+
192+
# based on past observations, the buy amount calculation usually fails because of the RPC misbehaving
193+
# if this happens, we do not want to retry as it won't get resolved soon. Instead, we exit this round.
194+
calculation_succeeded = yield from self._calc_buy_amount()
195+
if not calculation_succeeded:
196+
return None
197+
190198
for step in (
191-
self._build_approval_tx,
192-
self._calc_buy_amount,
193199
self._build_buy_tx,
194200
self._build_multisend_data,
195201
self._build_multisend_safe_tx_hash,

packages/valory/skills/decision_maker_abci/fsm_specification.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ alphabet_in:
33
- BENCHMARKING_ENABLED
44
- BENCHMARKING_FINISHED
55
- BLACKLIST
6+
- CALC_BUY_AMOUNT_FAILED
67
- DONE
78
- FETCH_ERROR
89
- INSUFFICIENT_BALANCE
@@ -68,6 +69,7 @@ transition_func:
6869
(BenchmarkingRandomnessRound, NONE): ImpossibleRound
6970
(BenchmarkingRandomnessRound, NO_MAJORITY): BenchmarkingRandomnessRound
7071
(BenchmarkingRandomnessRound, ROUND_TIMEOUT): BenchmarkingRandomnessRound
72+
(BetPlacementRound, CALC_BUY_AMOUNT_FAILED): HandleFailedTxRound
7173
(BetPlacementRound, DONE): FinishedDecisionMakerRound
7274
(BetPlacementRound, INSUFFICIENT_BALANCE): RefillRequiredRound
7375
(BetPlacementRound, MOCK_TX): RedeemRound

packages/valory/skills/decision_maker_abci/rounds.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# ------------------------------------------------------------------------------
33
#
4-
# Copyright 2023-2024 Valory AG
4+
# Copyright 2023-2025 Valory AG
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -157,6 +157,7 @@ class DecisionMakerAbciApp(AbciApp[Event]):
157157
- done: 13.
158158
- mock tx: 11.
159159
- insufficient balance: 19.
160+
- calc buy amount failed: 12.
160161
- no majority: 10.
161162
- round timeout: 10.
162163
- none: 20.
@@ -293,6 +294,7 @@ class DecisionMakerAbciApp(AbciApp[Event]):
293294
Event.MOCK_TX: RedeemRound,
294295
# degenerate round on purpose, owner must refill the safe
295296
Event.INSUFFICIENT_BALANCE: RefillRequiredRound,
297+
Event.CALC_BUY_AMOUNT_FAILED: HandleFailedTxRound,
296298
Event.NO_MAJORITY: BetPlacementRound,
297299
Event.ROUND_TIMEOUT: BetPlacementRound,
298300
# this is here because of `autonomy analyse fsm-specs`

packages/valory/skills/decision_maker_abci/skill.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fingerprint:
1313
__init__.py: bafybeih563ujnigeci2ldzh7hakbau6a222vsed7leg3b7lq32vcn3nm4a
1414
behaviours/__init__.py: bafybeih6ddz2ocvm6x6ytvlbcz6oi4snb5ee5xh5h65nq4w2qf7fd7zfky
1515
behaviours/base.py: bafybeifyuhycdirvw4k5np6spfmvinzvisb5rley5xjl7nodhxjtee34oa
16-
behaviours/bet_placement.py: bafybeibiezagww5dsbpptgvtzgch3yjrq3343gw5cyfpckegxkfzo67vru
16+
behaviours/bet_placement.py: bafybeibflvlyvmd7que4y6eb7egbixx3hvlwdu764zesi6dnwyusvryhba
1717
behaviours/blacklisting.py: bafybeieuqoup2vrmrtvjfqnr5mzrvkegc7afb2oeujzq2itsbhcsham2se
1818
behaviours/check_benchmarking.py: bafybeiao2lyj7apezkqrpgsyzb3dwvrdgsrgtprf6iuhsmlsufvxfl5bci
1919
behaviours/claim_subscription.py: bafybeigbqkhc6mb73rbwaks32tfiqx6u2xza43uiy6rvbtrnqd6m4fru3e
@@ -28,19 +28,19 @@ fingerprint:
2828
behaviours/storage_manager.py: bafybeic6wca37fkwonbsrwme55xnklfbqtheknroudayzfxdge4pxdbm7y
2929
behaviours/tool_selection.py: bafybeienlxcgjs3ogyofli3d7q3p5rst3mcxxcnwqf7qolqjeefjtixeke
3030
dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm
31-
fsm_specification.yaml: bafybeifvu7n6sjmrerogkzsftjrw2l6w5ppuq3f43ouj2rwbomdr5glp2e
31+
fsm_specification.yaml: bafybeib3oecxsixxzf3fsai5f7jlqpqqm23jcuvqn5fgp54shdj3temz2y
3232
handlers.py: bafybeiherm5a2kjmf46ffjoyvhh3tsja5au5i677oasiutdxdojwdtwqla
3333
io_/__init__.py: bafybeifxgmmwjqzezzn3e6keh2bfo4cyo7y5dq2ept3stfmgglbrzfl5rq
3434
io_/loader.py: bafybeih3sdsx5dhe4kzhtoafexjgkutsujwqy3zcdrlrkhtdks45bc7exa
3535
models.py: bafybeiasqxrhudkisjohjdgbkmmj6esyw52sh66xflwkatd5dyradxb37q
3636
payloads.py: bafybeieygushjlrzwzpnhagjgpbs3goot3pnfheh6yawuwctrk3uoeesfm
3737
policy.py: bafybeidofgwvk6sudz75tvuduskuphtn3amtib2irzw5hr3qcfn5pdwuc4
3838
redeem_info.py: bafybeifiiix4gihfo4avraxt34sfw35v6dqq45do2drrssei2shbps63mm
39-
rounds.py: bafybeiftrpaxyyly3d36kvfg2c2m5fmzchm6n4vv5losu3jr2b7s5ces6a
39+
rounds.py: bafybeiedbmmy7jnqvtcdfnd222yyr3r4d7m7bhhwccla4nsqautmavwgrq
4040
rounds_info.py: bafybeihg6i3h7a7ahfxzhow7gcuszcilq5krfpchze2szjdu7dtem2tnwa
4141
states/__init__.py: bafybeid23llnyp6j257dluxmrnztugo5llsrog7kua53hllyktz4dqhqoy
42-
states/base.py: bafybeiglqvym3ri6hurx4k7hrnykzbmslxe3vuj23djt6hai4czii4vbqq
43-
states/bet_placement.py: bafybeih5eopyxubczys5u5t3bdxbxpc7mmfdyqrpqsbm2uha5jc2phza4i
42+
states/base.py: bafybeictnvwzj2m7uk4n3uwuh5yhfx2uqn5klgs3afog2tet33mp5hnxmi
43+
states/bet_placement.py: bafybeidd3k6bbnjkznwbv43l44wexaci7k7axz6mfrgca76mjljp5o2344
4444
states/blacklisting.py: bafybeiapelgjhbjjn4uq4z5gspyirqzwzgccg5anktrp5kxdwamfnfw5mi
4545
states/check_benchmarking.py: bafybeiagrgeopuluwqkvoqbst2hjymte5rju2pecvkoeleklnqca5andeu
4646
states/claim_subscription.py: bafybeicjsjkvv2ftfv2gquvp7fyvuqia6acs44d3smwebgaic7lhkbaym4

packages/valory/skills/decision_maker_abci/states/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# ------------------------------------------------------------------------------
33
#
4-
# Copyright 2023-2024 Valory AG
4+
# Copyright 2023-2025 Valory AG
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -59,6 +59,7 @@ class Event(Enum):
5959
TIE = "tie"
6060
UNPROFITABLE = "unprofitable"
6161
INSUFFICIENT_BALANCE = "insufficient_balance"
62+
CALC_BUY_AMOUNT_FAILED = "calc_buy_amount_failed"
6263
NO_REDEEMING = "no_redeeming"
6364
BLACKLIST = "blacklist"
6465
NO_OP = "no_op"

packages/valory/skills/decision_maker_abci/states/bet_placement.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# ------------------------------------------------------------------------------
33
#
4-
# Copyright 2024 Valory AG
4+
# Copyright 2024-2025 Valory AG
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
1919

2020
"""This module contains the sampling state of the decision-making abci app."""
2121
from enum import Enum
22-
from typing import Optional, Tuple, Type
22+
from typing import Optional, Tuple, Type, cast
2323

2424
from packages.valory.skills.abstract_round_abci.base import BaseSynchronizedData
2525
from packages.valory.skills.decision_maker_abci.payloads import (
@@ -28,6 +28,7 @@
2828
)
2929
from packages.valory.skills.decision_maker_abci.states.base import (
3030
Event,
31+
SynchronizedData,
3132
TxPreparationRound,
3233
)
3334

@@ -36,16 +37,19 @@ class BetPlacementRound(TxPreparationRound):
3637
"""A round for placing a bet."""
3738

3839
payload_class: Type[MultisigTxPayload] = BetPlacementPayload
39-
4040
none_event = Event.INSUFFICIENT_BALANCE
4141

4242
def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]:
4343
"""Process the end of the block."""
44-
update = super().end_block()
45-
if update is None:
44+
res = super().end_block()
45+
if res is None:
4646
return None
4747

48-
sync_data, event = update
48+
synced_data, event = cast(Tuple[SynchronizedData, Enum], res)
4949
wallet_balance = self.most_voted_payload_values[-1]
50-
sync_data = sync_data.update(wallet_balance=wallet_balance)
51-
return sync_data, event
50+
synced_data.update(wallet_balance=wallet_balance)
51+
52+
if event == Event.DONE and not synced_data.most_voted_tx_hash:
53+
event = Event.CALC_BUY_AMOUNT_FAILED
54+
55+
return synced_data, event

packages/valory/skills/trader_abci/fsm_specification.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ alphabet_in:
44
- BENCHMARKING_FINISHED
55
- BET_PLACEMENT_DONE
66
- BLACKLIST
7+
- CALC_BUY_AMOUNT_FAILED
78
- CHECKS_PASSED
89
- CHECK_HISTORY
910
- CHECK_LATE_ARRIVING_MESSAGE
@@ -98,6 +99,7 @@ transition_func:
9899
(BenchmarkingRandomnessRound, NONE): ImpossibleRound
99100
(BenchmarkingRandomnessRound, NO_MAJORITY): BenchmarkingRandomnessRound
100101
(BenchmarkingRandomnessRound, ROUND_TIMEOUT): BenchmarkingRandomnessRound
102+
(BetPlacementRound, CALC_BUY_AMOUNT_FAILED): HandleFailedTxRound
101103
(BetPlacementRound, DONE): PreTxSettlementRound
102104
(BetPlacementRound, INSUFFICIENT_BALANCE): ResetAndPauseRound
103105
(BetPlacementRound, MOCK_TX): RedeemRound

packages/valory/skills/trader_abci/skill.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fingerprint:
1111
behaviours.py: bafybeigc6hszbu66ccajny5eh7thfgsrlr36je4mzziwp4mupgvtaeu6aa
1212
composition.py: bafybeievziz7cajszkw3ugfd3xn6ycktms463kefxjk2qlcyyh73couqg4
1313
dialogues.py: bafybeihouxm2nl2r6h3vlymmtrge43tcnwphtzhc2q3vludpgytigggguy
14-
fsm_specification.yaml: bafybeid6u6esbfsahu3xqcgkpbsfhffghc3jgizgmzqbc4ww7wtjbkhuay
14+
fsm_specification.yaml: bafybeia4bg3ws7xea2etcodkcgk6q5hgw4mtytrbovchfncul6h27jxnvm
1515
handlers.py: bafybeigrqsgqupy6kds2vqieacsymx3eucntwl52rlgi4cu4lrb6bglhti
1616
models.py: bafybeie342ympii4zkf6cp5n7tfnwql2ftdodfwlwzgiivi43iyqia37vy
1717
tests/__init__.py: bafybeiadatapyjh3e7ucg2ehz77oms3ihrbutwb2cs2tkjehy54utwvuyi
@@ -27,8 +27,8 @@ skills:
2727
- valory/transaction_settlement_abci:0.1.0:bafybeifkftgkyzrxwxjdyqixpp7vk6aqmufikalmwx3kydtlg74tonu47u
2828
- valory/termination_abci:0.1.0:bafybeieurwmfernodqyczj5ertsgfbjtjnrlgvte7sli4sajnbopty7inu
2929
- valory/market_manager_abci:0.1.0:bafybeihmyqkzl3bm5zvjnc4auj32qjf3pk73scyq7mntmpsudqnisb4gey
30-
- valory/decision_maker_abci:0.1.0:bafybeigddrgyys4rqu3x6gwig7cpylesbpy6ioocmngremad373w54nlky
31-
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicffb2hc2efvr33tvbbd5dp5sbj25fkar4fhgmqfbpy4fzxnzolsy
30+
- valory/decision_maker_abci:0.1.0:bafybeidlc7ed2lnrre3yyugqu35vlydbd6bzjgi7z6ormlguwjn5fpriku
31+
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaonsd6obcnmhhrmkbejna6xeohpmzpalrsiwkvtk7yxu5vetqqqu
3232
- valory/staking_abci:0.1.0:bafybeial5xtgzf37e2khvdrc2q2wa2xhirjwioi2szwvcgtupidjxhg7tq
3333
- valory/check_stop_trading_abci:0.1.0:bafybeid7l74lmjnkeerkbvwhoo2l4cawb7c545rhcx3mjpsjux4zwy5wpm
3434
- valory/mech_interact_abci:0.1.0:bafybeif2tpz2zet6p4z4vi3b254oxzyyzoe5tehj3me3znzt7h7otkpd54

packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protocols:
2323
- valory/ledger_api:1.0.0:bafybeihmqzcbj6t7vxz2aehd5726ofnzsfjs5cwlf42ro4tn6i34cbfrc4
2424
skills:
2525
- valory/abstract_round_abci:0.1.0:bafybeia27qmw6w5ds5fcrpj2475brnz742aampe3sgochloijs2l7jovai
26-
- valory/decision_maker_abci:0.1.0:bafybeigddrgyys4rqu3x6gwig7cpylesbpy6ioocmngremad373w54nlky
26+
- valory/decision_maker_abci:0.1.0:bafybeidlc7ed2lnrre3yyugqu35vlydbd6bzjgi7z6ormlguwjn5fpriku
2727
- valory/staking_abci:0.1.0:bafybeial5xtgzf37e2khvdrc2q2wa2xhirjwioi2szwvcgtupidjxhg7tq
2828
- valory/mech_interact_abci:0.1.0:bafybeif2tpz2zet6p4z4vi3b254oxzyyzoe5tehj3me3znzt7h7otkpd54
2929
behaviours:

poetry.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)