Skip to content

Commit

Permalink
fix: remove data request call and rename ACN protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybayblade committed Jun 13, 2023
1 parent a6dd84d commit affaf5f
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 38 deletions.
10 changes: 5 additions & 5 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"dev": {
"connection/valory/websocket_client/0.1.0": "bafybeibffszgha5w424ifiwovx5tsvccaylaj3vmfgpe44gettsqhlm6nu",
"skill/valory/contract_subscription/0.1.0": "bafybeihozkmtmfs3iqrreewvnixx6hod4rpcfdxqu4c6cfmubwwojc2dzu",
"agent/valory/mech/0.1.0": "bafybeietap2r7nzcmezyhx5rokrmr3bkyzkiukei7aj6dnkjl4zshv3hsu",
"agent/valory/mech/0.1.0": "bafybeia3saa5nr5rir645t3opxnmjuyvga25px4325wgyvl3awl76kcyh4",
"skill/valory/multiplexer_abci/0.1.0": "bafybeidyydry6axhrqeibmfvnjvbvm2nuxlieginygijcu5nqa3672iwsu",
"skill/valory/task_execution_abci/0.1.0": "bafybeic5bqckuc5lefz3bcqthon3xftelehbcobv54fiprsziv6eyub2fy",
"skill/valory/mech_abci/0.1.0": "bafybeigirnsco4dzqdfa7qi5tu2kkr3svc2nvrr37zjwvbpkkwubc33c7y",
"skill/valory/task_execution_abci/0.1.0": "bafybeia22rnntr4mityeeu6ra76xxxqyjpprshrilt6grtqdvqfmnxlsgu",
"skill/valory/mech_abci/0.1.0": "bafybeiht52tfyvkn2pbtbrr3pd5755uuagrracujwfozke3yorep5xhq5y",
"contract/valory/agent_mech/0.1.0": "bafybeib7v5fujyrio64trg5vmkuxpz42mc6fwjrmdyg3dr6ifudkn5rhle",
"service/valory/mech/0.1.0": "bafybeiau2et5tbsezp7nsfybveqokewae5ve5rgvfszq6g622yp76fvxny",
"protocol/valory/mech_acn/0.1.0": "bafybeiepwg7kp72m37v5keeebwvrhy555flvfwor2l36gow6gl5g676ja4"
"service/valory/mech/0.1.0": "bafybeignpj77t3b6ti6qjtithbfdbu5r3in7frb7cvyyqjjbovuzpmxskq",
"protocol/valory/acn_data_share/0.1.0": "bafybeic4swglw76p644ocpxtu7eozo5c7zxzkperh7hom36rufqaxle4sq"
},
"third_party": {
"protocol/fetchai/default/1.0.0": "bafybeieqqzgzuappi2ped42upgzad5gt3mxiyjhojwibxm4o367ffsian4",
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/agents/mech/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ protocols:
- valory/ipfs:0.1.0:bafybeic72ncgqbzoz2guj4p4yjqulid7mv6yroeh65hxznloamoveeg7hq
- valory/ledger_api:1.0.0:bafybeibo4bdtcrxi2suyzldwoetjar6pqfzm6vt5xal22ravkkcvdmtksi
- valory/tendermint:0.1.0:bafybeicusvezoqlmyt6iqomcbwaz3xkhk2qf3d56q5zprmj3xdxfy64k54
- valory/mech_acn:0.1.0:bafybeiepwg7kp72m37v5keeebwvrhy555flvfwor2l36gow6gl5g676ja4
- valory/acn_data_share:0.1.0:bafybeic4swglw76p644ocpxtu7eozo5c7zxzkperh7hom36rufqaxle4sq
skills:
- valory/abstract_abci:0.1.0:bafybeiet34ju7typtkqyfn572sacef5krrsb6d4vpfnviqi6kzunje3xny
- valory/abstract_round_abci:0.1.0:bafybeibdljcw2wchyderkonobpdpyb36yioagqcaoqldydw5bi6vvempma
- valory/contract_subscription:0.1.0:bafybeihozkmtmfs3iqrreewvnixx6hod4rpcfdxqu4c6cfmubwwojc2dzu
- valory/mech_abci:0.1.0:bafybeigirnsco4dzqdfa7qi5tu2kkr3svc2nvrr37zjwvbpkkwubc33c7y
- valory/mech_abci:0.1.0:bafybeiht52tfyvkn2pbtbrr3pd5755uuagrracujwfozke3yorep5xhq5y
- valory/multiplexer_abci:0.1.0:bafybeidyydry6axhrqeibmfvnjvbvm2nuxlieginygijcu5nqa3672iwsu
- valory/registration_abci:0.1.0:bafybeidqcszsitlmsofegmbprny22hqlent2o6luxng5a46gplytexrtbq
- valory/reset_pause_abci:0.1.0:bafybeidprdrxzbloz5imufkbpvetvkhywdvq3fopbhdzztfnud4onsdsce
- valory/task_execution_abci:0.1.0:bafybeic5bqckuc5lefz3bcqthon3xftelehbcobv54fiprsziv6eyub2fy
- valory/task_execution_abci:0.1.0:bafybeia22rnntr4mityeeu6ra76xxxqyjpprshrilt6grtqdvqfmnxlsgu
- valory/termination_abci:0.1.0:bafybeif33wyu6w7yrrhyacpt627i5g6nec2kiepsm5xx2b44zq657dch3a
- valory/transaction_settlement_abci:0.1.0:bafybeiaeu47qmeeqipn6jnz4ymbxwqb66axvx3ddzocnni4zehbhiupc54
default_ledger: ethereum
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/mech/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeif7ia4jdlazy6745ke2k2x5yoqlwsgwr6sbztbgqtwvs3ndm2p7ba
fingerprint_ignore_patterns: []
agent: valory/mech:0.1.0:bafybeietap2r7nzcmezyhx5rokrmr3bkyzkiukei7aj6dnkjl4zshv3hsu
agent: valory/mech:0.1.0:bafybeia3saa5nr5rir645t3opxnmjuyvga25px4325wgyvl3awl76kcyh4
number_of_agents: 4
deployment:
agent:
Expand Down
8 changes: 4 additions & 4 deletions packages/valory/skills/mech_abci/dialogues.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
TendermintDialogues as BaseTendermintDialogues,
)
from packages.valory.skills.task_execution_abci.dialogues import (
MechAcnDialogue as BaseMechAcnDialogue,
AcnDataShareDialogue as BaseAcnDataShareDialogue,
)
from packages.valory.skills.task_execution_abci.dialogues import (
MechAcnDialogues as BaseMechAcnDialogues,
AcnDataShareDialogues as BaseAcnDataShareDialogues,
)


Expand Down Expand Up @@ -96,5 +96,5 @@
IpfsDialogue = BaseIpfsDialogue
IpfsDialogues = BaseIpfsDialogues

MechAcnDialogue = BaseMechAcnDialogue
MechAcnDialogues = BaseMechAcnDialogues
AcnDataShareDialogue = BaseAcnDataShareDialogue
AcnDataShareDialogues = BaseAcnDataShareDialogues
8 changes: 4 additions & 4 deletions packages/valory/skills/mech_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fingerprint:
__init__.py: bafybeihscyr3poal6eyk6jeywtbdq552piwpbh2uo5h7bepjqdeivgiyem
behaviours.py: bafybeihgtg4l7qcu33ptyfn6cnohm3tcxlpkdqijyc5zjxmci6lqzxmogy
composition.py: bafybeiektjao3czojlipbcj2oglrk4hsch76d7ft3zw3vpcerewvvi6idy
dialogues.py: bafybeifoalla4kyqhaxhdwrhepq3v7eo7gdwkzypgkfegq3qqrtywjmwh4
dialogues.py: bafybeidhmgdnhxcgv35vahz3ycoiduug23kfyqvttqnywjp3eiuqal4bzy
fsm_specification.yaml: bafybeieeqdr76xgxqjdqalip7agguutwsn23n5xgop4ziach7l4hiqxvqm
handlers.py: bafybeiffuduhg433qsu6lbet5jsaub63bzv2l4x756aj2fbnu5bnfu4ble
models.py: bafybeic3miniq5lacarxspyxuvmlnwervwf2wmpnvw2gxpgk77fzyzcpvq
Expand All @@ -22,7 +22,7 @@ skills:
- valory/multiplexer_abci:0.1.0:bafybeidyydry6axhrqeibmfvnjvbvm2nuxlieginygijcu5nqa3672iwsu
- valory/registration_abci:0.1.0:bafybeidqcszsitlmsofegmbprny22hqlent2o6luxng5a46gplytexrtbq
- valory/reset_pause_abci:0.1.0:bafybeidprdrxzbloz5imufkbpvetvkhywdvq3fopbhdzztfnud4onsdsce
- valory/task_execution_abci:0.1.0:bafybeic5bqckuc5lefz3bcqthon3xftelehbcobv54fiprsziv6eyub2fy
- valory/task_execution_abci:0.1.0:bafybeia22rnntr4mityeeu6ra76xxxqyjpprshrilt6grtqdvqfmnxlsgu
- valory/termination_abci:0.1.0:bafybeif33wyu6w7yrrhyacpt627i5g6nec2kiepsm5xx2b44zq657dch3a
- valory/transaction_settlement_abci:0.1.0:bafybeiaeu47qmeeqipn6jnz4ymbxwqb66axvx3ddzocnni4zehbhiupc54
behaviours:
Expand Down Expand Up @@ -71,9 +71,9 @@ models:
ledger_api_dialogues:
args: {}
class_name: LedgerApiDialogues
mech_acn_requests_dialogues:
acn_data_share_dialogues:
args: {}
class_name: MechAcnDialogues
class_name: AcnDataShareDialogues
params:
args:
agent_mech_contract_address: '0xFf82123dFB52ab75C417195c5fDB87630145ae81'
Expand Down
15 changes: 7 additions & 8 deletions packages/valory/skills/task_execution_abci/behaviours.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
MultiSendContract,
MultiSendOperation,
)
from packages.valory.protocols.acn_data_share.dialogues import AcnDataShareDialogues
from packages.valory.protocols.acn_data_share.message import AcnDataShareMessage
from packages.valory.protocols.contract_api import ContractApiMessage
from packages.valory.protocols.mech_acn.dialogues import MechAcnDialogues
from packages.valory.protocols.mech_acn.message import MechAcnMessage
from packages.valory.skills.abstract_round_abci.base import AbstractRound
from packages.valory.skills.abstract_round_abci.behaviours import (
AbstractRoundBehaviour,
Expand Down Expand Up @@ -234,9 +234,6 @@ def get_task_result( # pylint: disable=R0914,R1710
# respond with no_op and no multisend transactions
deliver_msg = "no_op"
request_id = cast(str, self.request_id)
self.data_requests.set_data(
request_id=str(self.request_id), data=deliver_msg
)
self.send_data_to_acn(
sender_address=self.sender_address,
request_id=str(self.request_id),
Expand Down Expand Up @@ -306,12 +303,14 @@ def send_data_to_acn(
data: Any,
) -> None:
"""Handle callbacks."""
self.context.logger.info(f"Sending data to ACN for request ID {request_id}")
self.context.logger.info(
f"Sending data to {sender_address} via ACN for request ID {request_id}"
)
response, _ = cast(
MechAcnDialogues, self.context.mech_acn_requests_dialogues
AcnDataShareDialogues, self.context.acn_data_share_dialogues
).create(
counterparty=sender_address,
performative=MechAcnMessage.Performative.DATA,
performative=AcnDataShareMessage.Performative.DATA,
request_id=request_id,
content=data,
)
Expand Down
16 changes: 8 additions & 8 deletions packages/valory/skills/task_execution_abci/dialogues.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
from aea.protocols.dialogue.base import Dialogue as BaseDialogue
from aea.skills.base import Model

from packages.valory.protocols.mech_acn.dialogues import (
MechAcnDialogue as BaseMechAcnDialogue,
from packages.valory.protocols.acn_data_share.dialogues import (
AcnDataShareDialogue as BaseAcnDataShareDialogue,
)
from packages.valory.protocols.mech_acn.dialogues import (
MechAcnDialogues as BaseMechAcnDialogues,
from packages.valory.protocols.acn_data_share.dialogues import (
AcnDataShareDialogues as BaseAcnDataShareDialogues,
)
from packages.valory.skills.abstract_round_abci.dialogues import (
AbciDialogue as BaseAbciDialogue,
Expand Down Expand Up @@ -104,10 +104,10 @@
IpfsDialogues = BaseIpfsDialogues


MechAcnDialogue = BaseMechAcnDialogue
AcnDataShareDialogue = BaseAcnDataShareDialogue


class MechAcnDialogues(Model, BaseMechAcnDialogues):
class AcnDataShareDialogues(Model, BaseAcnDataShareDialogues):
"""The dialogues class keeps track of all dialogues."""

def __init__(self, **kwargs: Any) -> None:
Expand All @@ -127,9 +127,9 @@ def role_from_first_message( # pylint: disable=unused-argument
:param receiver_address: the address of the receiving agent
:return: The role of the agent
"""
return MechAcnDialogue.Role.AGENT
return AcnDataShareDialogue.Role.AGENT

BaseMechAcnDialogues.__init__(
BaseAcnDataShareDialogues.__init__(
self,
self_address=str(self.context.agent_address),
role_from_first_message=role_from_first_message,
Expand Down
10 changes: 5 additions & 5 deletions packages/valory/skills/task_execution_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeihrkpey6kxur2uoimrskq2wfpelqidxeapdxie6iuv2x7dk77ksvu
behaviours.py: bafybeicld7dc2g5lfxsuqh4jbgcu5keqist4hgmoims6sqq5zoyop7vkza
dialogues.py: bafybeidcnees5jaau5haflyvn2p52z7c4jc4kc457eruvwz65yas74pvbm
behaviours.py: bafybeifv6nafolbw2zbsvgoiio334fmafiwdsifpngusz3nk6fjcosc5eq
dialogues.py: bafybeibmac3m5u5h6ucoyjr4dazay72dyga656wvjl6z6saapluvjo54ne
fsm_specification.yaml: bafybeiggzywf6zpq2mb4ite6ptnb2zqcjjdhyu7jyb5npn7id4hcrm5tiy
handlers.py: bafybeibe5n7my2vd2wlwo73sbma65epjqc7kxgtittewlylcmvnmoxtxzq
io_/__init__.py: bafybeifxgmmwjqzezzn3e6keh2bfo4cyo7y5dq2ept3stfmgglbrzfl5rq
Expand All @@ -26,7 +26,7 @@ contracts:
- valory/multisend:0.1.0:bafybeigjywkl7hydjsrkogob3xebj2ifhqwmfhhxoeyrndzhhxi5u6amey
protocols:
- valory/contract_api:1.0.0:bafybeidv6wxpjyb2sdyibnmmum45et4zcla6tl63bnol6ztyoqvpl4spmy
- valory/mech_acn:0.1.0:bafybeiepwg7kp72m37v5keeebwvrhy555flvfwor2l36gow6gl5g676ja4
- valory/acn_data_share:0.1.0:bafybeic4swglw76p644ocpxtu7eozo5c7zxzkperh7hom36rufqaxle4sq
skills:
- valory/abstract_round_abci:0.1.0:bafybeibdljcw2wchyderkonobpdpyb36yioagqcaoqldydw5bi6vvempma
- valory/transaction_settlement_abci:0.1.0:bafybeiaeu47qmeeqipn6jnz4ymbxwqb66axvx3ddzocnni4zehbhiupc54
Expand Down Expand Up @@ -76,9 +76,9 @@ models:
ledger_api_dialogues:
args: {}
class_name: LedgerApiDialogues
mech_acn_requests_dialogues:
acn_data_share_dialogues:
args: {}
class_name: MechAcnDialogues
class_name: AcnDataShareDialogue
params:
args:
api_keys_json:
Expand Down

0 comments on commit affaf5f

Please sign in to comment.