diff --git a/.gitleaksignore b/.gitleaksignore index 7d7843efe..fba16c2d8 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -12,3 +12,4 @@ ce811dab0e95cdd63ea00e1ed8207801f464d773:packages/valory/contracts/service_staki 61e62bd62dcaae666f1bf25981d068e360d32322:packages/valory/skills/staking_abci/skill.yaml:generic-api-key:78 b520b0c67a9ae55ba501e1e9a99abfc0738e8d49:packages/valory/skills/staking_abci/skill.yaml:generic-api-key:78 61e62bd62dcaae666f1bf25981d068e360d32322:packages/valory/skills/staking_abci/skill.yaml:generic-api-key:78 +4063acab1bf2654eeaa6fca86bfbc3f6ab57e399:packages/valory/services/trader/service.yaml:generic-api-key:9 diff --git a/packages/packages.json b/packages/packages.json index 962a79690..cfd44dab6 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -1,13 +1,13 @@ { "dev": { "skill/valory/market_manager_abci/0.1.0": "bafybeibrjre5yka3sbvb6lsefgc5yutovb6h4ffzrpecplfkjwtl5i36te", - "skill/valory/decision_maker_abci/0.1.0": "bafybeiejunyhbfzk3tqn22xmyvpyn75xyjsbeg7grjrywhecak3phbwwem", - "skill/valory/trader_abci/0.1.0": "bafybeihjre2rppuyuxesevdmpgjvnvsvsgsevfzqi3f7l6yi6thq7xvl5a", + "skill/valory/decision_maker_abci/0.1.0": "bafybeighimm45dlkagx5uig2i4wa7ikmiajlcyqkpms64amm5osxrnzroi", + "skill/valory/trader_abci/0.1.0": "bafybeicp43s3irprp5qqn3qvf646voaqd2ffwbztwtchoyk6zue2rlli34", "contract/valory/market_maker/0.1.0": "bafybeif4mm2s3gxtvp227yypkcnna5ftec7vajcftvtbdmqddh7nprah5m", - "agent/valory/trader/0.1.0": "bafybeiccr6adm3ijuyp7so7js4qqnvkdrljylbjc4svc65xt75la6jykpm", - "service/valory/trader/0.1.0": "bafybeifeil57odcx6c22zmmfz4krqwci5gc6tttagiylwthfi34fwdahbq", + "agent/valory/trader/0.1.0": "bafybeignnn4urnckjui37jyrjk5336ccnqa7wgjnrevglnxruvoggi6af4", + "service/valory/trader/0.1.0": "bafybeigaja33j4ljnii6iogv2c3iuhq75sfe3luvjlflboguzkrumuyg2i", "contract/valory/erc20/0.1.0": "bafybeieqj7dea4tcv6z2yqkgtmhd23vbiycsr5trhwxdvlbwulpl6vhmam", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibtbginmn7tq2tluo7jyxpnlgqfwtpia5a2delxhjmsdejazvpsku", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeig5q4qy6potpciy2ja6hbo7qjebk66b5fvhg6ficyswwi3b6nzofy", "contract/valory/mech/0.1.0": "bafybeihvc6btuk3nvernzcx4qpezvuhiw2wwnagqj5nkeljvszghv7mq64", "contract/valory/realitio/0.1.0": "bafybeiamgkwwqhray4fs2hlipwxkq7mosmi7ev7jut4vneetaaycc4ruji", "contract/valory/realitio_proxy/0.1.0": "bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index 30597580e..1624189c4 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -43,10 +43,10 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeicpxn2khtaesuf4cq6ypwdmdmonlqroj2q2i6cxvpizc2y4cw66pe - valory/termination_abci:0.1.0:bafybeieqm46zuccaagnko3qlw6p3nvoohdrfgvpmw467r5lyil2dqrzjsy - valory/transaction_settlement_abci:0.1.0:bafybeia6cdxdlqrcwk2maw25fo7dafzd2p3rs7syropvufophk2pitzbwy -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibtbginmn7tq2tluo7jyxpnlgqfwtpia5a2delxhjmsdejazvpsku +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig5q4qy6potpciy2ja6hbo7qjebk66b5fvhg6ficyswwi3b6nzofy - valory/market_manager_abci:0.1.0:bafybeibrjre5yka3sbvb6lsefgc5yutovb6h4ffzrpecplfkjwtl5i36te -- valory/decision_maker_abci:0.1.0:bafybeiejunyhbfzk3tqn22xmyvpyn75xyjsbeg7grjrywhecak3phbwwem -- valory/trader_abci:0.1.0:bafybeihjre2rppuyuxesevdmpgjvnvsvsgsevfzqi3f7l6yi6thq7xvl5a +- valory/decision_maker_abci:0.1.0:bafybeighimm45dlkagx5uig2i4wa7ikmiajlcyqkpms64amm5osxrnzroi +- valory/trader_abci:0.1.0:bafybeicp43s3irprp5qqn3qvf646voaqd2ffwbztwtchoyk6zue2rlli34 - valory/staking_abci:0.1.0:bafybeifdxywwwtwgfmtufkvvjvepil6qwetbldftf5eab5v2r3b3zh574q default_ledger: ethereum required_ledgers: @@ -191,6 +191,8 @@ models: realitio_proxy_address: ${str:0xAB16D643bA051C11962DA645f74632d3130c81E2} realitio_address: ${str:0x79e32aE03fb27B07C89c0c568F80287C01ca2E57} event_filtering_batch_size: ${int:5000} + reduce_factor: ${float:0.25} + max_filtering_retries: ${int:6} redeeming_batch_size: ${int:5} slippage: ${float:0.01} policy_epsilon: ${float:0.1} @@ -200,6 +202,8 @@ models: "stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1"]} staking_contract_address: ${str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C} + agent_balance_threshold: ${int:10000000000000000} + refill_check_interval: ${int:10} --- public_id: valory/p2p_libp2p_client:0.1.0 type: connection diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index d758eb7a5..d14fcc4a2 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:bafybeiccr6adm3ijuyp7so7js4qqnvkdrljylbjc4svc65xt75la6jykpm +agent: valory/trader:0.1.0:bafybeignnn4urnckjui37jyrjk5336ccnqa7wgjnrevglnxruvoggi6af4 number_of_agents: 4 deployment: {} --- @@ -105,6 +105,8 @@ type: skill realitio_proxy_address: ${REALITIO_PROXY_ADDRESS:str:0xAB16D643bA051C11962DA645f74632d3130c81E2} realitio_address: ${REALITIO_ADDRESS:str:0x79e32aE03fb27B07C89c0c568F80287C01ca2E57} event_filtering_batch_size: ${EVENT_FILTERING_BATCH_SIZE:int:5000} + reduce_factor: ${REDUCE_FACTOR:float:0.25} + max_filtering_retries: ${MAX_FILTERING_RETRIES:int:6} redeeming_batch_size: ${REDEEMING_BATCH_SIZE:int:1} slippage: ${SLIPPAGE:float:0.01} policy_epsilon: ${POLICY_EPSILON:float:0.1} @@ -114,6 +116,8 @@ type: skill "stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1"]} staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C} + agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000} + refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10} benchmark_tool: &id005 args: log_dir: ${LOG_DIR:str:/benchmarks} @@ -179,6 +183,8 @@ type: skill realitio_proxy_address: ${REALITIO_PROXY_ADDRESS:str:0xAB16D643bA051C11962DA645f74632d3130c81E2} realitio_address: ${REALITIO_ADDRESS:str:0x79e32aE03fb27B07C89c0c568F80287C01ca2E57} event_filtering_batch_size: ${EVENT_FILTERING_BATCH_SIZE:int:5000} + reduce_factor: ${REDUCE_FACTOR:float:0.25} + max_filtering_retries: ${MAX_FILTERING_RETRIES:int:6} redeeming_batch_size: ${REDEEMING_BATCH_SIZE:int:1} slippage: ${SLIPPAGE:float:0.01} policy_epsilon: ${POLICY_EPSILON:float:0.1} @@ -188,6 +194,8 @@ type: skill "stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1"]} staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C} + agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000} + refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10} benchmark_tool: *id005 2: models: @@ -251,6 +259,8 @@ type: skill realitio_proxy_address: ${REALITIO_PROXY_ADDRESS:str:0xAB16D643bA051C11962DA645f74632d3130c81E2} realitio_address: ${REALITIO_ADDRESS:str:0x79e32aE03fb27B07C89c0c568F80287C01ca2E57} event_filtering_batch_size: ${EVENT_FILTERING_BATCH_SIZE:int:5000} + reduce_factor: ${REDUCE_FACTOR:float:0.25} + max_filtering_retries: ${MAX_FILTERING_RETRIES:int:6} redeeming_batch_size: ${REDEEMING_BATCH_SIZE:int:1} slippage: ${SLIPPAGE:float:0.01} policy_epsilon: ${POLICY_EPSILON:float:0.1} @@ -260,6 +270,8 @@ type: skill "stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1"]} staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C} + agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000} + refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10} benchmark_tool: *id005 3: models: @@ -323,6 +335,8 @@ type: skill realitio_proxy_address: ${REALITIO_PROXY_ADDRESS:str:0xAB16D643bA051C11962DA645f74632d3130c81E2} realitio_address: ${REALITIO_ADDRESS:str:0x79e32aE03fb27B07C89c0c568F80287C01ca2E57} event_filtering_batch_size: ${EVENT_FILTERING_BATCH_SIZE:int:5000} + reduce_factor: ${REDUCE_FACTOR:float:0.25} + max_filtering_retries: ${MAX_FILTERING_RETRIES:int:6} redeeming_batch_size: ${REDEEMING_BATCH_SIZE:int:1} slippage: ${SLIPPAGE:float:0.01} policy_epsilon: ${POLICY_EPSILON:float:0.1} @@ -332,6 +346,8 @@ type: skill "stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1"]} staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C} + agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000} + refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10} benchmark_tool: *id005 --- public_id: valory/ledger:0.19.0 diff --git a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py index e32c9a04e..c6572fcd1 100644 --- a/packages/valory/skills/decision_maker_abci/behaviours/reedem.py +++ b/packages/valory/skills/decision_maker_abci/behaviours/reedem.py @@ -411,12 +411,10 @@ def _check_already_redeemed(self) -> WaitableConditionType: self.redeeming_progress.check_to_block = self.latest_block_number self.redeeming_progress.check_started = True + n_retries = 0 + from_block = self.redeeming_progress.check_from_block batch_size = self.params.event_filtering_batch_size - for from_block in range( - self.redeeming_progress.check_from_block, - self.redeeming_progress.check_to_block, - batch_size, - ): + while from_block < self.redeeming_progress.check_to_block: max_to_block = from_block + batch_size to_block = min(max_to_block, self.redeeming_progress.check_to_block) result = yield from self._conditional_tokens_interact( @@ -428,16 +426,33 @@ def _check_already_redeemed(self) -> WaitableConditionType: to_block=to_block, **kwargs, ) - if not result: + + if not result and n_retries == self.params.max_filtering_retries: + err = "Skipping the redeeming round as the RPC is misbehaving." + self.context.logger.error(err) return False + + if not result: + n_retries += 1 + keep_fraction = (1 - self.params.reduce_factor) ** n_retries + step = int(batch_size * keep_fraction) + msg = f"Repeating this call with a decreased batch size of {step}." + self.context.logger.warning(msg) + from_block += step + continue + self.redeeming_progress.payouts.update(self.payouts_batch) self.redeeming_progress.check_from_block = to_block + from_block += batch_size return True - def _clean_redeem_info(self) -> Generator: + def _clean_redeem_info(self) -> WaitableConditionType: """Clean the redeeming information based on whether any positions have already been redeemed.""" - yield from self.wait_for_condition_with_sleep(self._check_already_redeemed) + success = yield from self._check_already_redeemed() + if not success: + return False + payout_so_far = sum(self.redeeming_progress.payouts.values()) if payout_so_far > 0: self.trades = { @@ -449,6 +464,8 @@ def _clean_redeem_info(self) -> Generator: msg = f"The total payout so far has been {self.wei_to_native(payout_so_far)} wxDAI." self.context.logger.info(msg) + return True + def _realitio_interact( self, contract_callable: str, data_key: str, placeholder: str, **kwargs: Any ) -> WaitableConditionType: @@ -528,12 +545,10 @@ def get_claim_params(self) -> WaitableConditionType: ) self.redeeming_progress.claim_started = True + n_retries = 0 + from_block = self.redeeming_progress.claim_from_block batch_size = self.params.event_filtering_batch_size - for from_block in range( - self.redeeming_progress.claim_from_block, - self.redeeming_progress.claim_to_block, - batch_size, - ): + while from_block < self.redeeming_progress.claim_to_block: max_to_block = from_block + batch_size to_block = min(max_to_block, self.redeeming_progress.claim_to_block) result = yield from self._realitio_interact( @@ -544,18 +559,29 @@ def get_claim_params(self) -> WaitableConditionType: to_block=to_block, question_id=self.current_question_id, ) - if not result: + + if not result and n_retries == self.params.max_filtering_retries: + err = "Skipping redeeming for the current position as the RPC is misbehaving." + self.context.logger.error(err) return False + + if not result: + n_retries += 1 + keep_fraction = (1 - self.params.reduce_factor) ** n_retries + step = int(batch_size * keep_fraction) + msg = f"Repeating this call with a decreased batch size of {step}." + self.context.logger.warning(msg) + from_block += step + continue + self.redeeming_progress.answered.extend(self.claim_params_batch) self.redeeming_progress.claim_from_block = to_block + from_block += batch_size return True def _build_claim_data(self) -> WaitableConditionType: """Prepare the safe tx to claim the winnings.""" - if not self.redeeming_progress.claim_finished: - yield from self.wait_for_condition_with_sleep(self.get_claim_params) - claim_params = self.redeeming_progress.claim_params if claim_params is None: self.context.logger.error( @@ -603,7 +629,7 @@ def _build_redeem_data(self) -> WaitableConditionType: self.multisend_batches.append(batch) return True - def _prepare_single_redeem(self) -> Generator: + def _prepare_single_redeem(self) -> WaitableConditionType: """Prepare a multisend transaction for a single redeeming action.""" yield from self.wait_for_condition_with_sleep(self._check_already_resolved) steps = [] @@ -614,6 +640,10 @@ def _prepare_single_redeem(self) -> Generator: yield from self.wait_for_condition_with_sleep(self._get_history_hash) if not self.is_history_hash_null: # 2. claim the winnings if claiming has not been done yet + if not self.redeeming_progress.claim_finished: + success = yield from self.get_claim_params() + if not success: + return False steps.append(self._build_claim_data) # 3. we always redeem the position @@ -621,6 +651,8 @@ def _prepare_single_redeem(self) -> Generator: for build_step in steps: yield from self.wait_for_condition_with_sleep(build_step) + return True + def _process_candidate( self, redeem_candidate: Trade ) -> Generator[None, None, bool]: @@ -646,7 +678,10 @@ def _process_candidate( self.context.logger.info("Position's redeeming amount is dust.") return False - yield from self._prepare_single_redeem() + success = yield from self._prepare_single_redeem() + if not success: + return False + self._expected_winnings += self.current_claimable_amount return True @@ -735,15 +770,17 @@ def async_act(self) -> Generator: self._load_progress() if not self.redeeming_progress.check_finished: - yield from self._clean_redeem_info() + success = yield from self._clean_redeem_info() agent = self.context.agent_address - redeem_tx_hex = yield from self._prepare_safe_tx() - tx_submitter = policy = utilized_tools = None - if redeem_tx_hex is not None: - tx_submitter = self.matching_round.auto_round_id() - policy = self.policy.serialize() - utilized_tools = json.dumps(self.utilized_tools) + tx_submitter = policy = utilized_tools = redeem_tx_hex = None + + if success: + redeem_tx_hex = yield from self._prepare_safe_tx() + if redeem_tx_hex is not None: + tx_submitter = self.matching_round.auto_round_id() + policy = self.policy.serialize() + utilized_tools = json.dumps(self.utilized_tools) payload = RedeemPayload( agent, tx_submitter, redeem_tx_hex, policy, utilized_tools diff --git a/packages/valory/skills/decision_maker_abci/models.py b/packages/valory/skills/decision_maker_abci/models.py index 3f032ba08..82bd646f2 100644 --- a/packages/valory/skills/decision_maker_abci/models.py +++ b/packages/valory/skills/decision_maker_abci/models.py @@ -197,26 +197,32 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: check_prompt_template(self.prompt_template) multisend_address = kwargs.get("multisend_address", None) enforce(multisend_address is not None, "Multisend address not specified!") - self.multisend_address = multisend_address - self.dust_threshold = self._ensure("dust_threshold", kwargs, int) - self.conditional_tokens_address = self._ensure( + self.multisend_address: str = multisend_address + self.dust_threshold: int = self._ensure("dust_threshold", kwargs, int) + self.conditional_tokens_address: str = self._ensure( "conditional_tokens_address", kwargs, str ) - self.realitio_proxy_address = self._ensure( + self.realitio_proxy_address: str = self._ensure( "realitio_proxy_address", kwargs, str ) - self.realitio_address = self._ensure("realitio_address", kwargs, str) + self.realitio_address: str = self._ensure("realitio_address", kwargs, str) # this is the maximum batch size that will be used when filtering blocks for events. # increasing this number allows for faster filtering operations, # but also increases the chances of getting a timeout error from the RPC - self.event_filtering_batch_size = self._ensure( + self.event_filtering_batch_size: int = self._ensure( "event_filtering_batch_size", kwargs, int ) + self.reduce_factor: float = self._ensure("reduce_factor", kwargs, float) + self.max_filtering_retries: int = self._ensure( + "max_filtering_retries", kwargs, int + ) # this is the max number of redeeming operations that will be batched on a single multisend transaction. # increasing this number equals fewer fees but more chances for the transaction to fail - self.redeeming_batch_size = self._ensure("redeeming_batch_size", kwargs, int) + self.redeeming_batch_size: int = self._ensure( + "redeeming_batch_size", kwargs, int + ) # a slippage in the range of [0, 1] to apply to the `minOutcomeTokensToBuy` when buying shares on a fpmm - self._slippage = 0.0 + self._slippage: float = 0.0 self.slippage: float = self._ensure("slippage", kwargs, float) self.epsilon: float = self._ensure("policy_epsilon", kwargs, float) self.agent_registry_address: str = self._ensure( diff --git a/packages/valory/skills/decision_maker_abci/skill.yaml b/packages/valory/skills/decision_maker_abci/skill.yaml index b29874dda..df01a10da 100644 --- a/packages/valory/skills/decision_maker_abci/skill.yaml +++ b/packages/valory/skills/decision_maker_abci/skill.yaml @@ -18,14 +18,14 @@ fingerprint: behaviours/decision_receive.py: bafybeifacce2ke7oltnwnpdjdqfd74eaaw5wxnjfzk6c5tqdsxsmbzjj3m behaviours/decision_request.py: bafybeievr7vae43e7jr4eqqhwe3emvgiih7ysa66jcb5g2oz5lbxua232q behaviours/handle_failed_tx.py: bafybeidxpc6u575ymct5tdwutvzov6zqfdoio5irgldn3fw7q3lg36mmxm - behaviours/reedem.py: bafybeiepr4sellesn37csr7tmd4yhdsnn6y2jmy6kaculty6pffjc6tawe + behaviours/reedem.py: bafybeifgsgp655ml4om4ko3j24hqzwjdqcnobiege4lpy5roen5omxtnby behaviours/round_behaviour.py: bafybeig4tdktyu6hapoqymnxh2bgpds547st6a44heue657wkctwe4gjvm behaviours/sampling.py: bafybeifzhm4sspdvt227ksl5hjn26offgqpwempgbcwbr6dq7gyi2a46sm behaviours/tool_selection.py: bafybeigfr2frkljrxyfxs5p3j42equzehgaqtkyuxk6eiujyudr6ajqakm dialogues.py: bafybeigpwuzku3we7axmxeamg7vn656maww6emuztau5pg3ebsoquyfdqm fsm_specification.yaml: bafybeifnob3ceim2mj7lqagtnpwqjqqxs5eg3oiwc73gwm6x5i2dvvlcya handlers.py: bafybeihj33szgrcxnpd73s4nvluyxwwsvhjum2cuq3ilhhe6vfola3k7vy - models.py: bafybeiauwt4y7m3c675zs2uavz2cn45agkx4fxpgpvry4npxsstvxppsy4 + models.py: bafybeifskab7b3nqalkenjgk745ky4h7bsqar73zzvrnygymhjl4qxl2ga payloads.py: bafybeifhq6stu4vp2ef4qvihxgpos3yc2zcuaja2safwt7efdidoejgvqa policy.py: bafybeidpmx4ek3qze63zpuwixyf6t7bdv62ewgkzt3ljrzadiwdw64cueq redeem_info.py: bafybeibddfxwp3577c3dl2utaowwltquu5fg6crezpumoebw563wxpbfrm @@ -188,6 +188,8 @@ models: realitio_proxy_address: '0xAB16D643bA051C11962DA645f74632d3130c81E2' realitio_address: '0x79e32aE03fb27B07C89c0c568F80287C01ca2E57' event_filtering_batch_size: 5000 + reduce_factor: 0.25 + max_filtering_retries: 6 redeeming_batch_size: 5 policy_store_path: /data/ slippage: 0.01 diff --git a/packages/valory/skills/trader_abci/composition.py b/packages/valory/skills/trader_abci/composition.py index dbc896105..53c6e8a20 100644 --- a/packages/valory/skills/trader_abci/composition.py +++ b/packages/valory/skills/trader_abci/composition.py @@ -76,11 +76,13 @@ TransactionSubmissionAbciApp, ) from packages.valory.skills.tx_settlement_multiplexer_abci.rounds import ( + ChecksPassedRound, FinishedBetPlacementTxRound, FinishedDecisionRequestTxRound, FinishedRedeemingTxRound, FinishedStakingTxRound, PostTxSettlementRound, + PreTxSettlementRound, TxSettlementMultiplexerAbciApp, ) @@ -89,7 +91,8 @@ FinishedRegistrationRound: UpdateBetsRound, FinishedMarketManagerRound: SamplingRound, FailedMarketManagerRound: ResetAndPauseRound, - FinishedDecisionMakerRound: RandomnessTransactionSubmissionRound, + FinishedDecisionMakerRound: PreTxSettlementRound, + ChecksPassedRound: RandomnessTransactionSubmissionRound, RefillRequiredRound: ResetAndPauseRound, FinishedTransactionSubmissionRound: PostTxSettlementRound, FailedTransactionSubmissionRound: HandleFailedTxRound, @@ -99,7 +102,7 @@ FinishedWithoutDecisionRound: RedeemRound, FinishedWithoutRedeemingRound: CallCheckpointRound, FinishedStakingRound: ResetAndPauseRound, - CheckpointCallPreparedRound: RandomnessTransactionSubmissionRound, + CheckpointCallPreparedRound: PreTxSettlementRound, FinishedStakingTxRound: ResetAndPauseRound, FinishedResetAndPauseRound: UpdateBetsRound, FinishedResetAndPauseErrorRound: RegistrationRound, diff --git a/packages/valory/skills/trader_abci/fsm_specification.yaml b/packages/valory/skills/trader_abci/fsm_specification.yaml index 43240bcaa..e47af2125 100644 --- a/packages/valory/skills/trader_abci/fsm_specification.yaml +++ b/packages/valory/skills/trader_abci/fsm_specification.yaml @@ -1,6 +1,7 @@ alphabet_in: - BET_PLACEMENT_DONE - BLACKLIST +- CHECKS_PASSED - CHECK_HISTORY - CHECK_LATE_ARRIVING_MESSAGE - CHECK_TIMEOUT @@ -20,6 +21,7 @@ alphabet_in: - NO_OP - NO_REDEEMING - REDEEMING_DONE +- REFILL_REQUIRED - RESET_AND_PAUSE_TIMEOUT - RESET_TIMEOUT - ROUND_TIMEOUT @@ -53,6 +55,7 @@ states: - HandleFailedTxRound - ImpossibleRound - PostTxSettlementRound +- PreTxSettlementRound - RandomnessTransactionSubmissionRound - RedeemRound - RegistrationRound @@ -68,7 +71,7 @@ states: - UpdateBetsRound - ValidateTransactionRound transition_func: - (BetPlacementRound, DONE): RandomnessTransactionSubmissionRound + (BetPlacementRound, DONE): PreTxSettlementRound (BetPlacementRound, INSUFFICIENT_BALANCE): ResetAndPauseRound (BetPlacementRound, NONE): ImpossibleRound (BetPlacementRound, NO_MAJORITY): BetPlacementRound @@ -78,7 +81,7 @@ transition_func: (BlacklistingRound, NONE): ImpossibleRound (BlacklistingRound, NO_MAJORITY): BlacklistingRound (BlacklistingRound, ROUND_TIMEOUT): BlacklistingRound - (CallCheckpointRound, DONE): RandomnessTransactionSubmissionRound + (CallCheckpointRound, DONE): PreTxSettlementRound (CallCheckpointRound, NEXT_CHECKPOINT_NOT_REACHED_YET): ResetAndPauseRound (CallCheckpointRound, NO_MAJORITY): CallCheckpointRound (CallCheckpointRound, ROUND_TIMEOUT): CallCheckpointRound @@ -104,7 +107,7 @@ transition_func: (DecisionReceiveRound, ROUND_TIMEOUT): DecisionReceiveRound (DecisionReceiveRound, TIE): BlacklistingRound (DecisionReceiveRound, UNPROFITABLE): BlacklistingRound - (DecisionRequestRound, DONE): RandomnessTransactionSubmissionRound + (DecisionRequestRound, DONE): PreTxSettlementRound (DecisionRequestRound, NONE): ImpossibleRound (DecisionRequestRound, NO_MAJORITY): DecisionRequestRound (DecisionRequestRound, ROUND_TIMEOUT): DecisionRequestRound @@ -124,10 +127,14 @@ transition_func: (PostTxSettlementRound, ROUND_TIMEOUT): PostTxSettlementRound (PostTxSettlementRound, STAKING_DONE): ResetAndPauseRound (PostTxSettlementRound, UNRECOGNIZED): FailedMultiplexerRound + (PreTxSettlementRound, CHECKS_PASSED): RandomnessTransactionSubmissionRound + (PreTxSettlementRound, NO_MAJORITY): PreTxSettlementRound + (PreTxSettlementRound, REFILL_REQUIRED): PreTxSettlementRound + (PreTxSettlementRound, ROUND_TIMEOUT): PreTxSettlementRound (RandomnessTransactionSubmissionRound, DONE): SelectKeeperTransactionSubmissionARound (RandomnessTransactionSubmissionRound, NO_MAJORITY): RandomnessTransactionSubmissionRound (RandomnessTransactionSubmissionRound, ROUND_TIMEOUT): RandomnessTransactionSubmissionRound - (RedeemRound, DONE): RandomnessTransactionSubmissionRound + (RedeemRound, DONE): PreTxSettlementRound (RedeemRound, NONE): ImpossibleRound (RedeemRound, NO_MAJORITY): RedeemRound (RedeemRound, NO_REDEEMING): CallCheckpointRound diff --git a/packages/valory/skills/trader_abci/models.py b/packages/valory/skills/trader_abci/models.py index e21b81033..343cb026b 100644 --- a/packages/valory/skills/trader_abci/models.py +++ b/packages/valory/skills/trader_abci/models.py @@ -53,6 +53,9 @@ from packages.valory.skills.termination_abci.models import TerminationParams from packages.valory.skills.trader_abci.composition import TraderAbciApp from packages.valory.skills.transaction_settlement_abci.rounds import Event as TSEvent +from packages.valory.skills.tx_settlement_multiplexer_abci.models import ( + TxSettlementMultiplexerParams, +) EventType = Union[ @@ -81,7 +84,9 @@ class RandomnessApi(ApiSpecs): """A model for randomness api specifications.""" -class TraderParams(DecisionMakerParams, TerminationParams, StakingParams): +class TraderParams( + DecisionMakerParams, TerminationParams, StakingParams, TxSettlementMultiplexerParams +): """A model to represent the trader params.""" diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 393204f99..0dd8883d4 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -9,11 +9,11 @@ fingerprint: README.md: bafybeiab4xgadptz4mhvno4p6xvkh7p4peg7iuhotabydriu74dmj6ljga __init__.py: bafybeido7wa33h4dtleap57vzgyb4fsofk4vindsqcekyfo5i56i2rll2a behaviours.py: bafybeieesrefrpo5c5upzztgm5fwfrmxeagilacuau5nacobhsfvgpbzby - composition.py: bafybeif4gsc2kfpsyy7rol74v3ir6ckgrm76jygy3rrcnjt3pen32pgcoi + composition.py: bafybeifakbd6n3lqvmxhb2svdst7wbagrplw23yf45zdexw34abtglxqke dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm - fsm_specification.yaml: bafybeihh7qkvge7srvrc25hvo6qwtezhewjcegbrqk5rukwpbrx4a2fq3m + fsm_specification.yaml: bafybeifduigketlvdwyhn47jfwf77otixljibl45firz5ijyhdgilhcyja handlers.py: bafybeicamc6vmozij5dwvkxmbxjazsgf3sacojhstbjtq7vfggszxugvey - models.py: bafybeifrz6dfncsxksvyh4jhbl4am2uzivfv6fyqs5mhw4qdpy5ruik7fm + models.py: bafybeifxiptjrnv4hbw5l3mfxvb7hksmxf726kvab5lcms5btuc3vaahem fingerprint_ignore_patterns: [] connections: [] contracts: [] @@ -25,8 +25,8 @@ skills: - valory/transaction_settlement_abci:0.1.0:bafybeia6cdxdlqrcwk2maw25fo7dafzd2p3rs7syropvufophk2pitzbwy - valory/termination_abci:0.1.0:bafybeieqm46zuccaagnko3qlw6p3nvoohdrfgvpmw467r5lyil2dqrzjsy - valory/market_manager_abci:0.1.0:bafybeibrjre5yka3sbvb6lsefgc5yutovb6h4ffzrpecplfkjwtl5i36te -- valory/decision_maker_abci:0.1.0:bafybeiejunyhbfzk3tqn22xmyvpyn75xyjsbeg7grjrywhecak3phbwwem -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibtbginmn7tq2tluo7jyxpnlgqfwtpia5a2delxhjmsdejazvpsku +- valory/decision_maker_abci:0.1.0:bafybeighimm45dlkagx5uig2i4wa7ikmiajlcyqkpms64amm5osxrnzroi +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeig5q4qy6potpciy2ja6hbo7qjebk66b5fvhg6ficyswwi3b6nzofy - valory/staking_abci:0.1.0:bafybeifdxywwwtwgfmtufkvvjvepil6qwetbldftf5eab5v2r3b3zh574q behaviours: main: @@ -171,6 +171,8 @@ models: realitio_proxy_address: '0xAB16D643bA051C11962DA645f74632d3130c81E2' realitio_address: '0x79e32aE03fb27B07C89c0c568F80287C01ca2E57' event_filtering_batch_size: 5000 + reduce_factor: 0.25 + max_filtering_retries: 6 redeeming_batch_size: 5 slippage: 0.01 policy_epsilon: 0.1 @@ -185,6 +187,8 @@ models: - stabilityai-stable-diffusion-512-v2-1 - stabilityai-stable-diffusion-768-v2-1 staking_contract_address: '0x5add592ce0a1B5DceCebB5Dcac086Cd9F9e3eA5C' + agent_balance_threshold: 10000000000000000 + refill_check_interval: 10 class_name: TraderParams network_subgraph: args: diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/behaviours.py b/packages/valory/skills/tx_settlement_multiplexer_abci/behaviours.py index 657f93a15..b2f94489c 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/behaviours.py +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/behaviours.py @@ -19,21 +19,102 @@ """This package contains the behaviours of the transaction settlement multiplexer.""" -from abc import ABC -from typing import Generator, Set, Type +from typing import Generator, Optional, Set, Type, cast +from aea.exceptions import AEAEnforceError + +from packages.valory.protocols.ledger_api import LedgerApiMessage from packages.valory.skills.abstract_round_abci.behaviours import ( AbstractRoundBehaviour, BaseBehaviour, ) +from packages.valory.skills.decision_maker_abci.payloads import VotingPayload +from packages.valory.skills.tx_settlement_multiplexer_abci.models import ( + TxSettlementMultiplexerParams, +) from packages.valory.skills.tx_settlement_multiplexer_abci.rounds import ( PostTxSettlementRound, + PreTxSettlementRound, SynchronizedData, TxSettlementMultiplexerAbciApp, ) -class PostTxSettlementBehaviour(BaseBehaviour, ABC): +class PreTxSettlementBehaviour(BaseBehaviour): + """ + The pre transaction settlement behaviour. + + This behaviour should be executed before a tx is sent via the transaction_settlement_abci. + """ + + matching_round = PreTxSettlementRound + + @property + def params(self) -> TxSettlementMultiplexerParams: + """Return the params.""" + return cast(TxSettlementMultiplexerParams, self.context.params) + + def _get_balance(self, agent: str) -> Generator[None, None, Optional[int]]: + """Get the given agent's balance.""" + self.context.logger.info(f"Checking balance for agent with address {agent}...") + ledger_api_response = yield from self.get_ledger_api_response( + performative=LedgerApiMessage.Performative.GET_STATE, # type: ignore + ledger_callable="get_balance", + account=agent, + ) + + try: + balance = int(ledger_api_response.state.body["get_balance_result"]) + except (AEAEnforceError, KeyError, ValueError, TypeError): + balance = None + + if balance is None: + log_msg = f"Failed to get the balance for agent with address {agent}." + self.context.logger.error(f"{log_msg}: {ledger_api_response}") + return None + + self.context.logger.info(f"The agent with address {agent} has {balance} WEI.") + return balance + + def _check_balance(self, agent: str) -> Generator[None, None, bool]: + """Check if the given agent's balance is sufficient.""" + balance = None + while balance is None: + balance = yield from self._get_balance(agent) + + threshold = self.params.agent_balance_threshold + refill_required = balance < threshold + if refill_required: + msg = f"Please refill agent with address {agent}. Balance is below {threshold}." + self.context.logger.warning(msg) + + return refill_required + + def _refill_required(self) -> Generator[None, None, bool]: + """Check whether a refill is required.""" + refill_required = False + for agent in self.synchronized_data.all_participants: + refill_required |= yield from self._check_balance(agent) + return refill_required + + def async_act(self) -> Generator: + """Check whether the agents' balances are sufficient.""" + with self.context.benchmark_tool.measure(self.behaviour_id).local(): + refill_required = yield from self._refill_required() + if refill_required: + # pause to give the user some time to refill before transitioning to the same round again + yield from self.sleep(self.params.refill_check_interval) + + payload = VotingPayload(self.context.agent_address, not refill_required) + + with self.context.benchmark_tool.measure(self.behaviour_id).consensus(): + yield from self.send_a2a_transaction(payload) + yield from self.wait_until_round_end() + + self.set_done() + + +class PostTxSettlementBehaviour(BaseBehaviour): """ The post transaction settlement behaviour. @@ -60,4 +141,7 @@ class PostTxSettlementFullBehaviour(AbstractRoundBehaviour): initial_behaviour_cls = PostTxSettlementBehaviour abci_app_cls = TxSettlementMultiplexerAbciApp - behaviours: Set[Type[BaseBehaviour]] = {PostTxSettlementBehaviour} # type: ignore + behaviours: Set[Type[BaseBehaviour]] = { + PreTxSettlementBehaviour, # type: ignore + PostTxSettlementBehaviour, # type: ignore + } diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/fsm_specification.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/fsm_specification.yaml index 996c9b650..28be80054 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/fsm_specification.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/fsm_specification.yaml @@ -1,12 +1,16 @@ alphabet_in: - BET_PLACEMENT_DONE +- CHECKS_PASSED - DECISION_REQUESTING_DONE +- NO_MAJORITY - REDEEMING_DONE +- REFILL_REQUIRED - ROUND_TIMEOUT - STAKING_DONE - UNRECOGNIZED -default_start_state: PostTxSettlementRound +default_start_state: PreTxSettlementRound final_states: +- ChecksPassedRound - FailedMultiplexerRound - FinishedBetPlacementTxRound - FinishedDecisionRequestTxRound @@ -15,13 +19,16 @@ final_states: label: TxSettlementMultiplexerAbciApp start_states: - PostTxSettlementRound +- PreTxSettlementRound states: +- ChecksPassedRound - FailedMultiplexerRound - FinishedBetPlacementTxRound - FinishedDecisionRequestTxRound - FinishedRedeemingTxRound - FinishedStakingTxRound - PostTxSettlementRound +- PreTxSettlementRound transition_func: (PostTxSettlementRound, BET_PLACEMENT_DONE): FinishedBetPlacementTxRound (PostTxSettlementRound, DECISION_REQUESTING_DONE): FinishedDecisionRequestTxRound @@ -29,3 +36,7 @@ transition_func: (PostTxSettlementRound, ROUND_TIMEOUT): PostTxSettlementRound (PostTxSettlementRound, STAKING_DONE): FinishedStakingTxRound (PostTxSettlementRound, UNRECOGNIZED): FailedMultiplexerRound + (PreTxSettlementRound, CHECKS_PASSED): ChecksPassedRound + (PreTxSettlementRound, NO_MAJORITY): PreTxSettlementRound + (PreTxSettlementRound, REFILL_REQUIRED): PreTxSettlementRound + (PreTxSettlementRound, ROUND_TIMEOUT): PreTxSettlementRound diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/models.py b/packages/valory/skills/tx_settlement_multiplexer_abci/models.py index 4dc9ca83a..49c0e5dbd 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/models.py +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/models.py @@ -20,6 +20,8 @@ """Custom objects for the TxSettlementMultiplexer ABCI application.""" +from typing import Any + from packages.valory.skills.abstract_round_abci.models import BaseParams from packages.valory.skills.abstract_round_abci.models import ( BenchmarkTool as BaseBenchmarkTool, @@ -35,7 +37,20 @@ Requests = BaseRequests BenchmarkTool = BaseBenchmarkTool -Params = BaseParams + + +class TxSettlementMultiplexerParams(BaseParams): + """Staking parameters.""" + + def __init__(self, *args: Any, **kwargs: Any) -> None: + """Initialize the parameters' object.""" + self.agent_balance_threshold: int = self._ensure( + "agent_balance_threshold", kwargs, int + ) + self.refill_check_interval: int = self._ensure( + "refill_check_interval", kwargs, int + ) + super().__init__(*args, **kwargs) class SharedState(BaseSharedState): diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/rounds.py b/packages/valory/skills/tx_settlement_multiplexer_abci/rounds.py index 1b407fda4..5d30f672e 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/rounds.py +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/rounds.py @@ -30,8 +30,10 @@ BaseSynchronizedData, CollectSameUntilThresholdRound, DegenerateRound, + VotingRound, get_name, ) +from packages.valory.skills.decision_maker_abci.payloads import VotingPayload from packages.valory.skills.decision_maker_abci.states.base import SynchronizedData from packages.valory.skills.decision_maker_abci.states.bet_placement import ( BetPlacementRound, @@ -46,12 +48,26 @@ class Event(Enum): """Multiplexing events.""" + CHECKS_PASSED = "checks_passed" + REFILL_REQUIRED = "refill_required" DECISION_REQUESTING_DONE = "decision_requesting_done" BET_PLACEMENT_DONE = "bet_placement_done" REDEEMING_DONE = "redeeming_done" STAKING_DONE = "staking_done" ROUND_TIMEOUT = "round_timeout" UNRECOGNIZED = "unrecognized" + NO_MAJORITY = "no_majority" + + +class PreTxSettlementRound(VotingRound): + """A round that will be called before the tx settlement.""" + + payload_class = VotingPayload + synchronized_data_class = SynchronizedData + done_event = Event.CHECKS_PASSED + negative_event = Event.REFILL_REQUIRED + no_majority_event = Event.NO_MAJORITY + collection_key = get_name(SynchronizedData.participant_to_votes) class PostTxSettlementRound(CollectSameUntilThresholdRound): @@ -89,6 +105,10 @@ def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]: return synced_data, event +class ChecksPassedRound(DegenerateRound): + """Round that represents all the pre tx settlement checks have passed.""" + + class FinishedDecisionRequestTxRound(DegenerateRound): """Finished decision requesting round.""" @@ -112,33 +132,45 @@ class FailedMultiplexerRound(DegenerateRound): class TxSettlementMultiplexerAbciApp(AbciApp[Event]): """TxSettlementMultiplexerAbciApp - Initial round: PostTxSettlementRound + Initial round: PreTxSettlementRound - Initial states: {PostTxSettlementRound} + Initial states: {PostTxSettlementRound, PreTxSettlementRound} Transition states: - 0. PostTxSettlementRound - - decision requesting done: 1. - - bet placement done: 2. - - redeeming done: 3. - - staking done: 4. + 0. PreTxSettlementRound + - checks passed: 2. + - refill required: 0. + - no majority: 0. - round timeout: 0. - - unrecognized: 5. - 1. FinishedDecisionRequestTxRound - 2. FinishedBetPlacementTxRound - 3. FinishedRedeemingTxRound - 4. FinishedStakingTxRound - 5. FailedMultiplexerRound - - Final states: {FailedMultiplexerRound, FinishedBetPlacementTxRound, FinishedDecisionRequestTxRound, FinishedRedeemingTxRound, FinishedStakingTxRound} + 1. PostTxSettlementRound + - decision requesting done: 3. + - bet placement done: 4. + - redeeming done: 5. + - staking done: 6. + - round timeout: 1. + - unrecognized: 7. + 2. ChecksPassedRound + 3. FinishedDecisionRequestTxRound + 4. FinishedBetPlacementTxRound + 5. FinishedRedeemingTxRound + 6. FinishedStakingTxRound + 7. FailedMultiplexerRound + + Final states: {ChecksPassedRound, FailedMultiplexerRound, FinishedBetPlacementTxRound, FinishedDecisionRequestTxRound, FinishedRedeemingTxRound, FinishedStakingTxRound} Timeouts: round timeout: 30.0 """ - initial_round_cls: AppState = PostTxSettlementRound - initial_states: Set[AppState] = {PostTxSettlementRound} + initial_round_cls: AppState = PreTxSettlementRound + initial_states: Set[AppState] = {PreTxSettlementRound, PostTxSettlementRound} transition_function: AbciAppTransitionFunction = { + PreTxSettlementRound: { + Event.CHECKS_PASSED: ChecksPassedRound, + Event.REFILL_REQUIRED: PreTxSettlementRound, + Event.NO_MAJORITY: PreTxSettlementRound, + Event.ROUND_TIMEOUT: PreTxSettlementRound, + }, PostTxSettlementRound: { Event.DECISION_REQUESTING_DONE: FinishedDecisionRequestTxRound, Event.BET_PLACEMENT_DONE: FinishedBetPlacementTxRound, @@ -147,6 +179,7 @@ class TxSettlementMultiplexerAbciApp(AbciApp[Event]): Event.ROUND_TIMEOUT: PostTxSettlementRound, Event.UNRECOGNIZED: FailedMultiplexerRound, }, + ChecksPassedRound: {}, FinishedDecisionRequestTxRound: {}, FinishedBetPlacementTxRound: {}, FinishedRedeemingTxRound: {}, @@ -157,6 +190,7 @@ class TxSettlementMultiplexerAbciApp(AbciApp[Event]): Event.ROUND_TIMEOUT: 30.0, } final_states: Set[AppState] = { + ChecksPassedRound, FinishedDecisionRequestTxRound, FinishedBetPlacementTxRound, FinishedRedeemingTxRound, @@ -164,9 +198,11 @@ class TxSettlementMultiplexerAbciApp(AbciApp[Event]): FailedMultiplexerRound, } db_pre_conditions: Dict[AppState, Set[str]] = { - PostTxSettlementRound: {get_name(SynchronizedData.tx_submitter)} + PreTxSettlementRound: {get_name(SynchronizedData.tx_submitter)}, + PostTxSettlementRound: {get_name(SynchronizedData.tx_submitter)}, } db_post_conditions: Dict[AppState, Set[str]] = { + ChecksPassedRound: set(), FinishedDecisionRequestTxRound: set(), FinishedBetPlacementTxRound: set(), FinishedRedeemingTxRound: set(), diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index eb9126eaa..1417847b1 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -8,19 +8,20 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeiegcjg2wjrsqhrmvyulioch3d67rnbzkx5af3ztkaw7kxathjreda __init__.py: bafybeide6k22zk4f3hyzhpapaoddsnxpw5elqcfvrxxj4nfvpzctv6jqhu - behaviours.py: bafybeiafrhq7vtj2nrhrcvwi4d4r6w4pn4yoq2ria7lfakn6x4p4dcne4m + behaviours.py: bafybeihmhpvorg4tgdhrhtv6ks6uxza4k5qxvnxanfhil75t54rfb5ykta dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm - fsm_specification.yaml: bafybeigv7xvetjboivqebq7wrfg3vp4kvhoxfadyvwyayphkh5g54x7rxe + fsm_specification.yaml: bafybeidwxjna36auqbtqlehx73kyb6o74suhzj5bothgtiapcj35b7gzve handlers.py: bafybeiafbqr7ojfcbwohvee7x4zzswad3ymfrrbjlfz7uuuttmn3qdfs6q - models.py: bafybeiahojnn52s762zitwx6k5s4ef5qw7hwjf3orlklqwuz3zi7k2o7bi - rounds.py: bafybeiezpvap43sl2acpym6cccdm3wh2mqb4ad2dwt34ij4nchy655wjma + models.py: bafybeigtmxoecoow663hgqnyinxarlrttyyt5ghpbdamdv4tc4kikcfx3a + rounds.py: bafybeihb3cnxd4zdlrrxkdzjmtgdozr6evkhvm7ndqry4lzkdisqanusie fingerprint_ignore_patterns: [] connections: [] contracts: [] -protocols: [] +protocols: +- valory/ledger_api:1.0.0:bafybeige5agrztgzfevyglf7mb4o7pzfttmq4f6zi765y4g2zvftbyowru skills: - valory/abstract_round_abci:0.1.0:bafybeid7neqpxxe4ualp23gxgrtpf6r5u3myr2mmc4uvwameyqshfdoydq -- valory/decision_maker_abci:0.1.0:bafybeiejunyhbfzk3tqn22xmyvpyn75xyjsbeg7grjrywhecak3phbwwem +- valory/decision_maker_abci:0.1.0:bafybeighimm45dlkagx5uig2i4wa7ikmiajlcyqkpms64amm5osxrnzroi - valory/staking_abci:0.1.0:bafybeifdxywwwtwgfmtufkvvjvepil6qwetbldftf5eab5v2r3b3zh574q behaviours: main: @@ -124,7 +125,9 @@ models: termination_sleep: 900 tx_timeout: 10.0 use_termination: false - class_name: Params + agent_balance_threshold: 10000000000000000 + refill_check_interval: 10 + class_name: TxSettlementMultiplexerParams requests: args: {} class_name: Requests