From bfc5e376c8e2ef7b5f17dc41a548aea50ad7b13d Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 13 Nov 2024 15:53:45 +0100 Subject: [PATCH 01/12] fix: `p2p_libp2p_client` connection drop handling --- packages/packages.json | 4 +-- .../p2p_libp2p_client/connection.py | 25 +++++++++++++++---- .../p2p_libp2p_client/connection.yaml | 3 ++- .../connections/test_libp2p/connection.yaml | 2 +- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 1ca693b94f..0bbf06af33 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -17,11 +17,11 @@ "connection/valory/ledger/0.19.0": "bafybeigntoericenpzvwejqfuc3kqzo2pscs76qoygg5dbj6f4zxusru5e", "connection/valory/http_server/0.22.0": "bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m", "connection/valory/p2p_libp2p/0.1.0": "bafybeic2u7azbwjny2nhaltqnbohlvysx3x6ectzbege7sxwrbzcz4lcma", - "connection/valory/p2p_libp2p_client/0.1.0": "bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e", + "connection/valory/p2p_libp2p_client/0.1.0": "bafybeicg7eu5m3r646ab5mlqplyysi4mlbqug6hwk2qnnetgf3oubsgena", "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeid4uexpzjgb3m6npbekohqayn2oukf3fershneha2dptmwtkayxza", + "connection/valory/test_libp2p/0.1.0": "bafybeicaiwtrutc5hcpn6elswdy5oonfj5e6gv4yzgrgpp5hkot3n2et3a", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/p2p_libp2p_client/connection.py b/packages/valory/connections/p2p_libp2p_client/connection.py index be999f719b..fe53f696d1 100644 --- a/packages/valory/connections/p2p_libp2p_client/connection.py +++ b/packages/valory/connections/p2p_libp2p_client/connection.py @@ -279,6 +279,7 @@ class P2PLibp2pClientConnection(Connection): connection_id = PUBLIC_ID DEFAULT_CONNECT_RETRIES = 3 + DEFAULT_RESEND_ENVELOPE_RETRY = 1 DEFAULT_TLS_CONNECTION_SIGNATURE_TIMEOUT = 5.0 def __init__(self, **kwargs: Any) -> None: @@ -292,6 +293,9 @@ def __init__(self, **kwargs: Any) -> None: self.connect_retries = self.configuration.config.get( "connect_retries", self.DEFAULT_CONNECT_RETRIES ) + self.resend_envelope_retry = self.configuration.config.get( + "resend_envelope_retry", self.DEFAULT_RESEND_ENVELOPE_RETRY + ) ledger_id = self.configuration.config.get("ledger_id", DEFAULT_LEDGER) if ledger_id not in SUPPORTED_LEDGER_IDS: raise ValueError( # pragma: nocover @@ -386,11 +390,17 @@ async def _send_loop(self) -> None: ) await asyncio.shield(self.disconnect()) - async def _send_envelope_with_node_client(self, envelope: Envelope) -> None: + async def _send_envelope_with_node_client( + self, envelope: Envelope, retry_counter: int = 0 + ) -> None: """Send envelope with node client, reconnect and retry on fail.""" if not self._node_client: # pragma: nocover raise ValueError("Connection not connected to node!") - + if retry_counter > self.resend_envelope_retry: + self.logger.warning( + f"Dropping envelope {envelope}. It failed after retry. " + ) + return self._ensure_valid_envelope_for_external_comms(envelope) try: await self._node_client.send_envelope(envelope) @@ -399,7 +409,7 @@ async def _send_envelope_with_node_client(self, envelope: Envelope) -> None: "Exception raised on message send. Try reconnect and send again." ) await self._perform_connection_to_node() - await self._node_client.send_envelope(envelope) + await self._send_envelope_with_node_client(envelope, retry_counter + 1) async def connect(self) -> None: """Set up the connection.""" @@ -584,9 +594,14 @@ async def _process_messages(self) -> None: envelope = await self._read_envelope_from_node() if self._in_queue is None: raise ValueError("Input queue not initialized.") # pragma: nocover - self._in_queue.put_nowait(envelope) + self.logger.debug(f"Received envelope: {envelope}") if envelope is None: - break # pragma: no cover + # give it time to recover + # twice the amount what we wait for ACK timeouts + timeout = NodeClient.ACN_ACK_TIMEOUT * 2 + await asyncio.sleep(timeout) + continue # pragma: no cover + self._in_queue.put_nowait(envelope) class TCPSocketChannelClientTLS(TCPSocketChannelClient): diff --git a/packages/valory/connections/p2p_libp2p_client/connection.yaml b/packages/valory/connections/p2p_libp2p_client/connection.yaml index 53576dcdc1..587115ef9e 100644 --- a/packages/valory/connections/p2p_libp2p_client/connection.yaml +++ b/packages/valory/connections/p2p_libp2p_client/connection.yaml @@ -10,7 +10,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeiaf5kdnfdc2jifojgniib76zl2c4utnx7ofewc3szqkrxsby62ulu __init__.py: bafybeid2azroxglu6fl7bxdfcsv3j77vyzgpikjnfwpxg73zeb5orez6ju - connection.py: bafybeiauso3ectgdvbhkt5j6wstfev5mnxiuj6hrkczyqgxurnvva3loqm + connection.py: bafybeifone3a3mnmovffgiqa754pkpmj7utq2mgmuvtzo3trsshcbc2ote fingerprint_ignore_patterns: [] connections: [] protocols: @@ -18,6 +18,7 @@ protocols: class_name: P2PLibp2pClientConnection config: connect_retries: 3 + resend_envelope_retry: 1 ledger_id: cosmos nodes: - uri: acn.staging.autonolas.tech:9005 diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index 295f95d540..f04dc72846 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -35,7 +35,7 @@ fingerprint: fingerprint_ignore_patterns: [] connections: - valory/p2p_libp2p:0.1.0:bafybeic2u7azbwjny2nhaltqnbohlvysx3x6ectzbege7sxwrbzcz4lcma -- valory/p2p_libp2p_client:0.1.0:bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e +- valory/p2p_libp2p_client:0.1.0:bafybeicg7eu5m3r646ab5mlqplyysi4mlbqug6hwk2qnnetgf3oubsgena - valory/p2p_libp2p_mailbox:0.1.0:bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq protocols: - fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 From c658a1c7c5c9444ccbe60a667254e03a40bd1d65 Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 13 Nov 2024 16:05:49 +0100 Subject: [PATCH 02/12] chore: generators --- docs/package_list.md | 4 ++-- packages/packages.json | 4 ++-- packages/valory/connections/p2p_libp2p_client/connection.py | 2 +- packages/valory/connections/p2p_libp2p_client/connection.yaml | 2 +- packages/valory/connections/test_libp2p/connection.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/package_list.md b/docs/package_list.md index 0fdc463aff..1d6d6ae132 100644 --- a/docs/package_list.md +++ b/docs/package_list.md @@ -17,11 +17,11 @@ | connection/valory/ledger/0.19.0 | `bafybeigntoericenpzvwejqfuc3kqzo2pscs76qoygg5dbj6f4zxusru5e` | | connection/valory/http_server/0.22.0 | `bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m` | | connection/valory/p2p_libp2p/0.1.0 | `bafybeic2u7azbwjny2nhaltqnbohlvysx3x6ectzbege7sxwrbzcz4lcma` | -| connection/valory/p2p_libp2p_client/0.1.0 | `bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e` | +| connection/valory/p2p_libp2p_client/0.1.0 | `bafybeihs5zlwa5wlozct3rjlxsirm3ve3e4buse5nfehiky6ymnnfrobne` | | connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq` | | connection/fetchai/local/0.20.0 | `bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi` | | connection/valory/http_client/0.23.0 | `bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u` | -| connection/valory/test_libp2p/0.1.0 | `bafybeid4uexpzjgb3m6npbekohqayn2oukf3fershneha2dptmwtkayxza` | +| connection/valory/test_libp2p/0.1.0 | `bafybeigskets2ccvgbuea46omcjmxqcikypqkkio2lb7xfo7l5j5pkhevq` | | skill/fetchai/echo/0.19.0 | `bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya` | | skill/fetchai/error_test_skill/0.1.0 | `bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu` | | skill/fetchai/gym/0.20.0 | `bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4` | diff --git a/packages/packages.json b/packages/packages.json index 0bbf06af33..090175c5b9 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -17,11 +17,11 @@ "connection/valory/ledger/0.19.0": "bafybeigntoericenpzvwejqfuc3kqzo2pscs76qoygg5dbj6f4zxusru5e", "connection/valory/http_server/0.22.0": "bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m", "connection/valory/p2p_libp2p/0.1.0": "bafybeic2u7azbwjny2nhaltqnbohlvysx3x6ectzbege7sxwrbzcz4lcma", - "connection/valory/p2p_libp2p_client/0.1.0": "bafybeicg7eu5m3r646ab5mlqplyysi4mlbqug6hwk2qnnetgf3oubsgena", + "connection/valory/p2p_libp2p_client/0.1.0": "bafybeihs5zlwa5wlozct3rjlxsirm3ve3e4buse5nfehiky6ymnnfrobne", "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeicaiwtrutc5hcpn6elswdy5oonfj5e6gv4yzgrgpp5hkot3n2et3a", + "connection/valory/test_libp2p/0.1.0": "bafybeigskets2ccvgbuea46omcjmxqcikypqkkio2lb7xfo7l5j5pkhevq", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/p2p_libp2p_client/connection.py b/packages/valory/connections/p2p_libp2p_client/connection.py index fe53f696d1..76d5956d5f 100644 --- a/packages/valory/connections/p2p_libp2p_client/connection.py +++ b/packages/valory/connections/p2p_libp2p_client/connection.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022-2023 Valory AG +# Copyright 2022-2024 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/packages/valory/connections/p2p_libp2p_client/connection.yaml b/packages/valory/connections/p2p_libp2p_client/connection.yaml index 587115ef9e..5058f5969e 100644 --- a/packages/valory/connections/p2p_libp2p_client/connection.yaml +++ b/packages/valory/connections/p2p_libp2p_client/connection.yaml @@ -10,7 +10,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: README.md: bafybeiaf5kdnfdc2jifojgniib76zl2c4utnx7ofewc3szqkrxsby62ulu __init__.py: bafybeid2azroxglu6fl7bxdfcsv3j77vyzgpikjnfwpxg73zeb5orez6ju - connection.py: bafybeifone3a3mnmovffgiqa754pkpmj7utq2mgmuvtzo3trsshcbc2ote + connection.py: bafybeihcwyo5nhxmsjxw7qrrvkvp7qu6izbgzgipmmnrpdvc6jtwmw7vgy fingerprint_ignore_patterns: [] connections: [] protocols: diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index f04dc72846..ffbd42a8f1 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -35,7 +35,7 @@ fingerprint: fingerprint_ignore_patterns: [] connections: - valory/p2p_libp2p:0.1.0:bafybeic2u7azbwjny2nhaltqnbohlvysx3x6ectzbege7sxwrbzcz4lcma -- valory/p2p_libp2p_client:0.1.0:bafybeicg7eu5m3r646ab5mlqplyysi4mlbqug6hwk2qnnetgf3oubsgena +- valory/p2p_libp2p_client:0.1.0:bafybeihs5zlwa5wlozct3rjlxsirm3ve3e4buse5nfehiky6ymnnfrobne - valory/p2p_libp2p_mailbox:0.1.0:bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq protocols: - fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 From 678138321177dee91f5697a411ca708d20a58dc9 Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 13 Nov 2024 18:49:36 +0100 Subject: [PATCH 03/12] test: fix acn tests --- packages/packages.json | 2 +- packages/valory/connections/test_libp2p/connection.yaml | 2 +- .../test_libp2p/tests/test_p2p_libp2p_client/test_errors.py | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 090175c5b9..d641028a79 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -21,7 +21,7 @@ "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeigskets2ccvgbuea46omcjmxqcikypqkkio2lb7xfo7l5j5pkhevq", + "connection/valory/test_libp2p/0.1.0": "bafybeihu2eyslz6kjfvvr3tf4ipokgolafo3tzyg2ayvxohiavlw3suxzq", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index ffbd42a8f1..a5b6d5f27f 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -26,7 +26,7 @@ fingerprint: tests/test_p2p_libp2p_client/__init__.py: bafybeihjzl7ireo5rbnxcdbghbncykgcgcbh26m4mjjofsseeflauuf6sy tests/test_p2p_libp2p_client/test_aea_cli.py: bafybeie5yaezltj4xydnqghltt7f2t4vicdts5rm6bz4fdpt4kkkd42cyu tests/test_p2p_libp2p_client/test_communication.py: bafybeiceec5zsd2u37t56oiajijgwx7frpo3wzu4qdfd3lcq3lcldyqszq - tests/test_p2p_libp2p_client/test_errors.py: bafybeiakajzr6jtecwnlzcrrx7paydz3obmleqzv7am5xbadu6wjtzabmm + tests/test_p2p_libp2p_client/test_errors.py: bafybeiaii43vpcfov7iq5dlsuhvhzjszbpyb7arbkltcho3cdce3ojr6hq tests/test_p2p_libp2p_mailbox/__init__.py: bafybeiad64wftnugaahubhqc6bcqzg7om4435dzojdv7oeq4zdmn7kxzui tests/test_p2p_libp2p_mailbox/test_aea_cli.py: bafybeievjaiacpvcpabemtrmmeejbf4cbkrqzhu2ekxzyfyeg42ityxn5q tests/test_p2p_libp2p_mailbox/test_communication.py: bafybeiaiwlqxuzp34nu33s5pz6sudvwmdi3h2ckfa4mmwyvd6wqn2elo4m diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py index f94db2854c..868447faf0 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py @@ -111,9 +111,8 @@ async def test_reconnect_on_send_fail(self): ) as connect_mock, patch.object( self.connection, "_ensure_valid_envelope_for_external_comms" ): - with pytest.raises(Exception, match="oops"): - await self.connection._send_envelope_with_node_client(Mock()) - connect_mock.assert_called() + await self.connection._send_envelope_with_node_client(Mock()) + assert connect_mock.call_count == 2 @pytest.mark.asyncio From e7acebd2deee93b02bac8bb864de1d6048d23806 Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 13 Nov 2024 18:56:46 +0100 Subject: [PATCH 04/12] chore: generators --- docs/development-setup.md | 2 +- docs/package_list.md | 2 +- docs/quickstart.md | 2 +- packages/packages.json | 2 +- packages/valory/connections/test_libp2p/connection.yaml | 2 +- .../test_libp2p/tests/test_p2p_libp2p_client/test_errors.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/development-setup.md b/docs/development-setup.md index 48fcf3c8f6..abb6271fd0 100644 --- a/docs/development-setup.md +++ b/docs/development-setup.md @@ -1,6 +1,6 @@ -An AEA consists of packages . When developing, it helps to be able to save packages in a local package registry, rather than pushing them to remote registry. This guide helps you set up a local package registry and configure the working directory for development. +An AEA consists of packages . When developing, it helps to be able to save packages in a local package registry, rather than pushing them to remote registry. This guide helps you set up a local package registry and configure the working directory for development. There are two ways to write code for an AEA: diff --git a/docs/package_list.md b/docs/package_list.md index 1d6d6ae132..8f4278bc35 100644 --- a/docs/package_list.md +++ b/docs/package_list.md @@ -21,7 +21,7 @@ | connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq` | | connection/fetchai/local/0.20.0 | `bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi` | | connection/valory/http_client/0.23.0 | `bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u` | -| connection/valory/test_libp2p/0.1.0 | `bafybeigskets2ccvgbuea46omcjmxqcikypqkkio2lb7xfo7l5j5pkhevq` | +| connection/valory/test_libp2p/0.1.0 | `bafybeial7uzniyiuwpe4h2emzipaheuqzpsyr5hnwthpk7m4rb267wzwpa` | | skill/fetchai/echo/0.19.0 | `bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya` | | skill/fetchai/error_test_skill/0.1.0 | `bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu` | | skill/fetchai/gym/0.20.0 | `bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4` | diff --git a/docs/quickstart.md b/docs/quickstart.md index 0cae172889..d3e641b0ba 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -283,7 +283,7 @@ This copies the fetchai/echo:0.19.0 skill code containing the "beha Just like humans, AEAs can have _skills_ to achieve their tasks. As an agent developer, you can create skills to add to your own AEAs. You can also choose to publish your skills so others add them to their AEAs. More details on skills can be found on this page . -The above agent has an echo skill, fetched from the registry, which simply echoes any messages it receives back to its sender. +The above agent has an echo skill, fetched from the registry, which simply echoes any messages it receives back to its sender. ### Communication via envelopes and messages diff --git a/packages/packages.json b/packages/packages.json index d641028a79..ae7abf1d8b 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -21,7 +21,7 @@ "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeihu2eyslz6kjfvvr3tf4ipokgolafo3tzyg2ayvxohiavlw3suxzq", + "connection/valory/test_libp2p/0.1.0": "bafybeial7uzniyiuwpe4h2emzipaheuqzpsyr5hnwthpk7m4rb267wzwpa", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index a5b6d5f27f..cc5cf49f18 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -26,7 +26,7 @@ fingerprint: tests/test_p2p_libp2p_client/__init__.py: bafybeihjzl7ireo5rbnxcdbghbncykgcgcbh26m4mjjofsseeflauuf6sy tests/test_p2p_libp2p_client/test_aea_cli.py: bafybeie5yaezltj4xydnqghltt7f2t4vicdts5rm6bz4fdpt4kkkd42cyu tests/test_p2p_libp2p_client/test_communication.py: bafybeiceec5zsd2u37t56oiajijgwx7frpo3wzu4qdfd3lcq3lcldyqszq - tests/test_p2p_libp2p_client/test_errors.py: bafybeiaii43vpcfov7iq5dlsuhvhzjszbpyb7arbkltcho3cdce3ojr6hq + tests/test_p2p_libp2p_client/test_errors.py: bafybeigwdaohjgjrpoq6ngxfxebaegzetgmqs2qm6wyqmwwn66sf6pjqhy tests/test_p2p_libp2p_mailbox/__init__.py: bafybeiad64wftnugaahubhqc6bcqzg7om4435dzojdv7oeq4zdmn7kxzui tests/test_p2p_libp2p_mailbox/test_aea_cli.py: bafybeievjaiacpvcpabemtrmmeejbf4cbkrqzhu2ekxzyfyeg42ityxn5q tests/test_p2p_libp2p_mailbox/test_communication.py: bafybeiaiwlqxuzp34nu33s5pz6sudvwmdi3h2ckfa4mmwyvd6wqn2elo4m diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py index 868447faf0..3d581abe50 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2024 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); From bf5bd8fe2737f6993dbd0acd6745e1c330928e8f Mon Sep 17 00:00:00 2001 From: Ardian Date: Wed, 13 Nov 2024 19:16:53 +0100 Subject: [PATCH 05/12] chore: remove bad link --- docs/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/quickstart.md b/docs/quickstart.md index d3e641b0ba..c072537004 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -283,7 +283,7 @@ This copies the fetchai/echo:0.19.0 skill code containing the "beha Just like humans, AEAs can have _skills_ to achieve their tasks. As an agent developer, you can create skills to add to your own AEAs. You can also choose to publish your skills so others add them to their AEAs. More details on skills can be found on this page . -The above agent has an echo skill, fetched from the registry, which simply echoes any messages it receives back to its sender. +The above agent has an echo skill, fetched from the registry, which simply echoes any messages it receives back to its sender. ### Communication via envelopes and messages From 937c0c1c7e101f246d753fff1e19aee4fc3f9156 Mon Sep 17 00:00:00 2001 From: Ardian Date: Thu, 14 Nov 2024 12:19:00 +0100 Subject: [PATCH 06/12] test: fix exception on libp2p test --- packages/packages.json | 2 +- packages/valory/connections/test_libp2p/connection.yaml | 2 +- .../tests/test_p2p_libp2p_client/test_errors.py | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index ae7abf1d8b..6d48448ae6 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -21,7 +21,7 @@ "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeial7uzniyiuwpe4h2emzipaheuqzpsyr5hnwthpk7m4rb267wzwpa", + "connection/valory/test_libp2p/0.1.0": "bafybeiefuha46oyekz255vjq2szjxv563hfjiner44v7u3g55yatuqzcly", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index cc5cf49f18..077c7c772e 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -26,7 +26,7 @@ fingerprint: tests/test_p2p_libp2p_client/__init__.py: bafybeihjzl7ireo5rbnxcdbghbncykgcgcbh26m4mjjofsseeflauuf6sy tests/test_p2p_libp2p_client/test_aea_cli.py: bafybeie5yaezltj4xydnqghltt7f2t4vicdts5rm6bz4fdpt4kkkd42cyu tests/test_p2p_libp2p_client/test_communication.py: bafybeiceec5zsd2u37t56oiajijgwx7frpo3wzu4qdfd3lcq3lcldyqszq - tests/test_p2p_libp2p_client/test_errors.py: bafybeigwdaohjgjrpoq6ngxfxebaegzetgmqs2qm6wyqmwwn66sf6pjqhy + tests/test_p2p_libp2p_client/test_errors.py: bafybeidk7g4tucudqfafwgio7hpdgsz4gexh5lwvdrnpttnd6lt3ak4t7u tests/test_p2p_libp2p_mailbox/__init__.py: bafybeiad64wftnugaahubhqc6bcqzg7om4435dzojdv7oeq4zdmn7kxzui tests/test_p2p_libp2p_mailbox/test_aea_cli.py: bafybeievjaiacpvcpabemtrmmeejbf4cbkrqzhu2ekxzyfyeg42ityxn5q tests/test_p2p_libp2p_mailbox/test_communication.py: bafybeiaiwlqxuzp34nu33s5pz6sudvwmdi3h2ckfa4mmwyvd6wqn2elo4m diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py index 3d581abe50..6b8f1340b4 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py @@ -103,16 +103,15 @@ async def test_reconnect_on_send_fail(self): """Test reconnect on send fails.""" self.connection._node_client = Mock() - f = Future() - f.set_exception(Exception("oops")) self.connection._node_client.send_envelope.side_effect = Exception("oops") with patch.object( self.connection, "_perform_connection_to_node", return_value=DONE_FUTURE ) as connect_mock, patch.object( self.connection, "_ensure_valid_envelope_for_external_comms" ): - await self.connection._send_envelope_with_node_client(Mock()) - assert connect_mock.call_count == 2 + with pytest.raises(Exception, match="oops"): + await self.connection._send_envelope_with_node_client(Mock()) + connect_mock.assert_called() @pytest.mark.asyncio From 46ff747cc952a5216657252bc10b489ee163483d Mon Sep 17 00:00:00 2001 From: Ardian Date: Thu, 14 Nov 2024 16:23:01 +0100 Subject: [PATCH 07/12] test: fix exception on libp2p_mailbox test --- docs/package_list.md | 2 +- packages/packages.json | 2 +- .../connections/test_libp2p/connection.yaml | 4 ++-- .../test_p2p_libp2p_client/test_errors.py | 5 ++-- .../test_p2p_libp2p_mailbox/test_errors.py | 24 +++++++++++++++++-- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/docs/package_list.md b/docs/package_list.md index 8f4278bc35..16d55d764c 100644 --- a/docs/package_list.md +++ b/docs/package_list.md @@ -21,7 +21,7 @@ | connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq` | | connection/fetchai/local/0.20.0 | `bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi` | | connection/valory/http_client/0.23.0 | `bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u` | -| connection/valory/test_libp2p/0.1.0 | `bafybeial7uzniyiuwpe4h2emzipaheuqzpsyr5hnwthpk7m4rb267wzwpa` | +| connection/valory/test_libp2p/0.1.0 | `bafybeigoeurcepbax7jju6def3ebshctelivsc7fwjevnwpi2hlmqxxn3u` | | skill/fetchai/echo/0.19.0 | `bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya` | | skill/fetchai/error_test_skill/0.1.0 | `bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu` | | skill/fetchai/gym/0.20.0 | `bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4` | diff --git a/packages/packages.json b/packages/packages.json index 6d48448ae6..91768d33db 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -21,7 +21,7 @@ "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeiefuha46oyekz255vjq2szjxv563hfjiner44v7u3g55yatuqzcly", + "connection/valory/test_libp2p/0.1.0": "bafybeigoeurcepbax7jju6def3ebshctelivsc7fwjevnwpi2hlmqxxn3u", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index 077c7c772e..be1dd16b33 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -26,11 +26,11 @@ fingerprint: tests/test_p2p_libp2p_client/__init__.py: bafybeihjzl7ireo5rbnxcdbghbncykgcgcbh26m4mjjofsseeflauuf6sy tests/test_p2p_libp2p_client/test_aea_cli.py: bafybeie5yaezltj4xydnqghltt7f2t4vicdts5rm6bz4fdpt4kkkd42cyu tests/test_p2p_libp2p_client/test_communication.py: bafybeiceec5zsd2u37t56oiajijgwx7frpo3wzu4qdfd3lcq3lcldyqszq - tests/test_p2p_libp2p_client/test_errors.py: bafybeidk7g4tucudqfafwgio7hpdgsz4gexh5lwvdrnpttnd6lt3ak4t7u + tests/test_p2p_libp2p_client/test_errors.py: bafybeihopjaixftexdru35rxf75tr45itr6ygoao2ajxax3jvq6mcopw6m tests/test_p2p_libp2p_mailbox/__init__.py: bafybeiad64wftnugaahubhqc6bcqzg7om4435dzojdv7oeq4zdmn7kxzui tests/test_p2p_libp2p_mailbox/test_aea_cli.py: bafybeievjaiacpvcpabemtrmmeejbf4cbkrqzhu2ekxzyfyeg42ityxn5q tests/test_p2p_libp2p_mailbox/test_communication.py: bafybeiaiwlqxuzp34nu33s5pz6sudvwmdi3h2ckfa4mmwyvd6wqn2elo4m - tests/test_p2p_libp2p_mailbox/test_errors.py: bafybeiampgm6dxpo4tqiyhyhpwr5d3kdsq5x5vwl323oauhdzmsnprf4bi + tests/test_p2p_libp2p_mailbox/test_errors.py: bafybeie2t3zjjjjbyfd3lno2f6p4fa6jdttq2gluwfe5mmny5g6r5zp2oi tests/test_p2p_libp2p_mailbox/test_mailbox_service.py: bafybeibp3bkwkrw57qahvuysjdlumywtlk3te5gsvusgrvhsc75k7rrk4u fingerprint_ignore_patterns: [] connections: diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py index 6b8f1340b4..68b92f08f1 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_client/test_errors.py @@ -109,9 +109,8 @@ async def test_reconnect_on_send_fail(self): ) as connect_mock, patch.object( self.connection, "_ensure_valid_envelope_for_external_comms" ): - with pytest.raises(Exception, match="oops"): - await self.connection._send_envelope_with_node_client(Mock()) - connect_mock.assert_called() + await self.connection._send_envelope_with_node_client(Mock()) + connect_mock.assert_called() @pytest.mark.asyncio diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py index a15442b147..9c90e2b234 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py @@ -19,8 +19,7 @@ # ------------------------------------------------------------------------------ """This test module contains negative tests for Libp2p tcp client connection.""" - -# pylint: skip-file +from unittest.mock import Mock, patch import pytest @@ -31,6 +30,9 @@ BaseP2PLibp2pTest, _make_libp2p_mailbox_connection, ) +from packages.valory.connections.test_libp2p.tests.test_p2p_libp2p_client.test_errors import ( + DONE_FUTURE, +) from packages.valory.connections.test_libp2p.tests.test_p2p_libp2p_client.test_errors import ( TestLibp2pClientConnectionFailureConnectionSetup as BaseFailureConnectionSetup, ) @@ -39,6 +41,9 @@ ) +# pylint: skip-file + + @pytest.mark.asyncio class TestLibp2pMailboxConnectionFailureNodeNotConnected(BaseFailureNodeNotConnected): """Test that connection fails when node not running""" @@ -48,6 +53,21 @@ class TestLibp2pMailboxConnectionFailureNodeNotConnected(BaseFailureNodeNotConne # overwrite, no mailbox equivalent of P2PLibp2pClientConnection (TCPSocketChannelClient) test_connect_attempts = None + @pytest.mark.asyncio + async def test_reconnect_on_send_fail(self): + """Test reconnect on send fails.""" + + self.connection._node_client = Mock() + self.connection._node_client.send_envelope.side_effect = Exception("oops") + with patch.object( + self.connection, "_perform_connection_to_node", return_value=DONE_FUTURE + ) as connect_mock, patch.object( + self.connection, "_ensure_valid_envelope_for_external_comms" + ): + with pytest.raises(Exception, match="oops"): + await self.connection._send_envelope_with_node_client(Mock()) + connect_mock.assert_called() + class TestLibp2pMailboxConnectionFailureConnectionSetup(BaseFailureConnectionSetup): """Test that connection fails when setup incorrectly""" From d79bac70d0f76bdd8fe0c88dc10f82aa1d19ef04 Mon Sep 17 00:00:00 2001 From: Ardian Date: Thu, 14 Nov 2024 17:50:51 +0100 Subject: [PATCH 08/12] chore: copyright --- docs/package_list.md | 2 +- packages/packages.json | 2 +- packages/valory/connections/test_libp2p/connection.yaml | 2 +- .../test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package_list.md b/docs/package_list.md index 16d55d764c..ccfd4f30b5 100644 --- a/docs/package_list.md +++ b/docs/package_list.md @@ -21,7 +21,7 @@ | connection/valory/p2p_libp2p_mailbox/0.1.0 | `bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq` | | connection/fetchai/local/0.20.0 | `bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi` | | connection/valory/http_client/0.23.0 | `bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u` | -| connection/valory/test_libp2p/0.1.0 | `bafybeigoeurcepbax7jju6def3ebshctelivsc7fwjevnwpi2hlmqxxn3u` | +| connection/valory/test_libp2p/0.1.0 | `bafybeiasj7ppsmn24mes2yw3o72nlmcircscalpl3j5ujzxstknlassa3q` | | skill/fetchai/echo/0.19.0 | `bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya` | | skill/fetchai/error_test_skill/0.1.0 | `bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu` | | skill/fetchai/gym/0.20.0 | `bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4` | diff --git a/packages/packages.json b/packages/packages.json index 91768d33db..80e2f7747d 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -21,7 +21,7 @@ "connection/valory/p2p_libp2p_mailbox/0.1.0": "bafybeiecclc65ogngs3piaxpwhiyl77mlpqun5ejlyv4kamwzrrh746guq", "connection/fetchai/local/0.20.0": "bafybeiema4rnxi54luhzbrccb27pfrwlohemka45eqf4nidgmtkwwmxeyi", "connection/valory/http_client/0.23.0": "bafybeihi772xgzpqeipp3fhmvpct4y6e6tpjp4sogwqrnf3wqspgeilg4u", - "connection/valory/test_libp2p/0.1.0": "bafybeigoeurcepbax7jju6def3ebshctelivsc7fwjevnwpi2hlmqxxn3u", + "connection/valory/test_libp2p/0.1.0": "bafybeiasj7ppsmn24mes2yw3o72nlmcircscalpl3j5ujzxstknlassa3q", "skill/fetchai/echo/0.19.0": "bafybeicoawiackcbgqo3na3e56tpdc62atag4yxknur77py37caqq4mmya", "skill/fetchai/error_test_skill/0.1.0": "bafybeihsbtlpe7h6fsvoxban5rilkmwviwkokul5cqym6atoolirontiyu", "skill/fetchai/gym/0.20.0": "bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4", diff --git a/packages/valory/connections/test_libp2p/connection.yaml b/packages/valory/connections/test_libp2p/connection.yaml index be1dd16b33..e8df596ec9 100644 --- a/packages/valory/connections/test_libp2p/connection.yaml +++ b/packages/valory/connections/test_libp2p/connection.yaml @@ -30,7 +30,7 @@ fingerprint: tests/test_p2p_libp2p_mailbox/__init__.py: bafybeiad64wftnugaahubhqc6bcqzg7om4435dzojdv7oeq4zdmn7kxzui tests/test_p2p_libp2p_mailbox/test_aea_cli.py: bafybeievjaiacpvcpabemtrmmeejbf4cbkrqzhu2ekxzyfyeg42ityxn5q tests/test_p2p_libp2p_mailbox/test_communication.py: bafybeiaiwlqxuzp34nu33s5pz6sudvwmdi3h2ckfa4mmwyvd6wqn2elo4m - tests/test_p2p_libp2p_mailbox/test_errors.py: bafybeie2t3zjjjjbyfd3lno2f6p4fa6jdttq2gluwfe5mmny5g6r5zp2oi + tests/test_p2p_libp2p_mailbox/test_errors.py: bafybeia7lhpakt6tv3jaskm7edawleyw4oxm3qcife7n3zlvr56zeo5x4m tests/test_p2p_libp2p_mailbox/test_mailbox_service.py: bafybeibp3bkwkrw57qahvuysjdlumywtlk3te5gsvusgrvhsc75k7rrk4u fingerprint_ignore_patterns: [] connections: diff --git a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py index 9c90e2b234..9d7a327ecc 100644 --- a/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py +++ b/packages/valory/connections/test_libp2p/tests/test_p2p_libp2p_mailbox/test_errors.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2022 Valory AG +# Copyright 2022-2024 Valory AG # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); From 5d1597c85e17993cb8cb33d4467c47d89fef3397 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Fri, 15 Nov 2024 13:41:24 +0200 Subject: [PATCH 09/12] chore: bump to `v1.60.0` --- SECURITY.md | 6 +++--- aea/__version__.py | 2 +- deploy-image/Dockerfile | 2 +- deploy-image/README.md | 2 +- develop-image/docker-env.sh | 2 +- examples/tac_deploy/Dockerfile | 2 +- plugins/aea-cli-benchmark/setup.py | 2 +- plugins/aea-cli-ipfs/setup.py | 2 +- plugins/aea-ledger-cosmos/setup.py | 2 +- plugins/aea-ledger-ethereum-flashbots/setup.py | 4 ++-- plugins/aea-ledger-ethereum-hwi/setup.py | 4 ++-- plugins/aea-ledger-ethereum/setup.py | 2 +- plugins/aea-ledger-fetchai/setup.py | 4 ++-- plugins/aea-ledger-solana/setup.py | 2 +- scripts/install.ps1 | 2 +- scripts/install.sh | 2 +- skaffold.yaml | 4 ++-- user-image/Dockerfile | 2 +- user-image/docker-env.sh | 2 +- 19 files changed, 25 insertions(+), 25 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index e474fb8601..34e4373942 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,9 +7,9 @@ This document outlines security procedures and general policies for the `open-ae The following table shows which versions of `open-aea` are currently being supported with security updates. | Version | Supported | -|------------| ------------------ | -| `1.59.x` | :white_check_mark: | -| `< 1.59.0` | :x: | +|------------|--------------------| +| `1.60.x` | :white_check_mark: | +| `< 1.60.0` | :x: | ## Reporting a Vulnerability diff --git a/aea/__version__.py b/aea/__version__.py index 5a86d719b2..0c50b80dc9 100644 --- a/aea/__version__.py +++ b/aea/__version__.py @@ -23,7 +23,7 @@ __title__ = "open-aea" __description__ = "Open Autonomous Economic Agent framework (without vendor lock-in)" __url__ = "https://github.com/valory-xyz/open-aea.git" -__version__ = "1.59.0" +__version__ = "1.60.0" __author__ = "Valory AG" __license__ = "Apache-2.0" __copyright__ = "2021 Valory AG, 2019 Fetch.AI Limited" diff --git a/deploy-image/Dockerfile b/deploy-image/Dockerfile index c80721901d..974196f1dd 100644 --- a/deploy-image/Dockerfile +++ b/deploy-image/Dockerfile @@ -16,7 +16,7 @@ RUN apk add --no-cache go # aea installation RUN pip install --upgrade pip -RUN pip install --upgrade --force-reinstall open-aea[all]==1.59.0 "open-aea-cli-ipfs<2.0.0,>=1.59.0" +RUN pip install --upgrade --force-reinstall open-aea[all]==1.60.0 "open-aea-cli-ipfs<2.0.0,>=1.60.0" # directories and aea cli config WORKDIR /home/agents diff --git a/deploy-image/README.md b/deploy-image/README.md index d622aa8839..657c512246 100644 --- a/deploy-image/README.md +++ b/deploy-image/README.md @@ -11,7 +11,7 @@ The example uses the `fetchai/my_first_aea` project. You will likely want to mod Install subversion, then download the example directory to your local working directory ``` bash -svn checkout https://github.com/valory-xyz/open-aea/tags/v1.59.0/packages packages +svn checkout https://github.com/valory-xyz/open-aea/tags/v1.60.0/packages packages ``` ### Modify scripts diff --git a/develop-image/docker-env.sh b/develop-image/docker-env.sh index f81387c3e5..2ea8741ead 100755 --- a/develop-image/docker-env.sh +++ b/develop-image/docker-env.sh @@ -1,7 +1,7 @@ #!/bin/bash # Swap the following lines if you want to work with 'latest' -DOCKER_IMAGE_TAG=valory/open-aea-develop:1.59.0 +DOCKER_IMAGE_TAG=valory/open-aea-develop:1.60.0 # DOCKER_IMAGE_TAG=valory/open-aea-develop:latest DOCKER_BUILD_CONTEXT_DIR=.. diff --git a/examples/tac_deploy/Dockerfile b/examples/tac_deploy/Dockerfile index 24ed028fb2..4e9ab5229a 100644 --- a/examples/tac_deploy/Dockerfile +++ b/examples/tac_deploy/Dockerfile @@ -19,7 +19,7 @@ RUN apk add --no-cache go # aea installation RUN python -m pip install --upgrade pip -RUN pip install --upgrade --force-reinstall open-aea[all]==1.59.0 +RUN pip install --upgrade --force-reinstall open-aea[all]==1.60.0 # directories and aea cli config COPY /.aea /home/.aea diff --git a/plugins/aea-cli-benchmark/setup.py b/plugins/aea-cli-benchmark/setup.py index 8d43e3e261..cd7f12f032 100755 --- a/plugins/aea-cli-benchmark/setup.py +++ b/plugins/aea-cli-benchmark/setup.py @@ -26,7 +26,7 @@ setup( name="open-aea-cli-benchmark", - version="1.59.0", + version="1.60.0", author="Valory AG", license="Apache-2.0", description="CLI extension for AEA framework benchmarking.", diff --git a/plugins/aea-cli-ipfs/setup.py b/plugins/aea-cli-ipfs/setup.py index 0abd869e63..fab013548b 100755 --- a/plugins/aea-cli-ipfs/setup.py +++ b/plugins/aea-cli-ipfs/setup.py @@ -28,7 +28,7 @@ setup( name="open-aea-cli-ipfs", - version="1.59.0", + version="1.60.0", author="Valory AG", license="Apache-2.0", description="CLI extension for open AEA framework wrapping IPFS functionality.", diff --git a/plugins/aea-ledger-cosmos/setup.py b/plugins/aea-ledger-cosmos/setup.py index e0d4291c2f..9f91f22bd6 100644 --- a/plugins/aea-ledger-cosmos/setup.py +++ b/plugins/aea-ledger-cosmos/setup.py @@ -26,7 +26,7 @@ setup( name="open-aea-ledger-cosmos", - version="1.59.0", + version="1.60.0", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger api of Cosmos.", diff --git a/plugins/aea-ledger-ethereum-flashbots/setup.py b/plugins/aea-ledger-ethereum-flashbots/setup.py index 3d8ecd8b39..00861b20fb 100644 --- a/plugins/aea-ledger-ethereum-flashbots/setup.py +++ b/plugins/aea-ledger-ethereum-flashbots/setup.py @@ -25,7 +25,7 @@ setup( name="open-aea-ledger-ethereum-flashbots", - version="1.59.0", + version="1.60.0", author="Valory AG", license="Apache-2.0", description="Python package extending the default open-aea ethereum ledger plugin to add support for flashbots.", @@ -41,7 +41,7 @@ }, python_requires=">=3.9,<4.0", install_requires=[ - "open-aea-ledger-ethereum~=1.59.0", + "open-aea-ledger-ethereum~=1.60.0", "open-aea-flashbots==1.4.0", ], tests_require=["pytest"], diff --git a/plugins/aea-ledger-ethereum-hwi/setup.py b/plugins/aea-ledger-ethereum-hwi/setup.py index 5459c3def9..ccbd91223d 100644 --- a/plugins/aea-ledger-ethereum-hwi/setup.py +++ b/plugins/aea-ledger-ethereum-hwi/setup.py @@ -25,7 +25,7 @@ setup( name="open-aea-ledger-ethereum-hwi", - version="1.59.0", + version="1.60.0", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and support for hardware wallet interactions.", @@ -42,7 +42,7 @@ "web3>=6.0.0,<7", "ipfshttpclient==0.8.0a2", "eth-account>=0.8.0,<0.9.0", - "open-aea-ledger-ethereum~=1.59.0", + "open-aea-ledger-ethereum~=1.60.0", "ledgerwallet==0.1.3", "protobuf<4.25.0,>=4.21.6", "construct<=2.10.61", diff --git a/plugins/aea-ledger-ethereum/setup.py b/plugins/aea-ledger-ethereum/setup.py index 3c5a5109e0..ea3f0f51c1 100644 --- a/plugins/aea-ledger-ethereum/setup.py +++ b/plugins/aea-ledger-ethereum/setup.py @@ -26,7 +26,7 @@ setup( name="open-aea-ledger-ethereum", - version="1.59.0", + version="1.60.0", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger api of Ethereum.", diff --git a/plugins/aea-ledger-fetchai/setup.py b/plugins/aea-ledger-fetchai/setup.py index 6f976101db..c756bf037c 100644 --- a/plugins/aea-ledger-fetchai/setup.py +++ b/plugins/aea-ledger-fetchai/setup.py @@ -31,7 +31,7 @@ setup( name="open-aea-ledger-fetchai", - version="1.59.0", + version="1.60.0", author="Valory AG", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger API of Fetch.AI.", @@ -44,7 +44,7 @@ "test_tools/data/*", ] }, - install_requires=["open-aea-ledger-cosmos~=1.59.0"], + install_requires=["open-aea-ledger-cosmos~=1.60.0"], tests_require=["pytest"], entry_points={ "aea.cryptos": ["fetchai = aea_ledger_fetchai:FetchAICrypto"], diff --git a/plugins/aea-ledger-solana/setup.py b/plugins/aea-ledger-solana/setup.py index 52db654db2..b00cbd524b 100644 --- a/plugins/aea-ledger-solana/setup.py +++ b/plugins/aea-ledger-solana/setup.py @@ -25,7 +25,7 @@ setup( name="open-aea-ledger-solana", - version="1.59.0", + version="1.60.0", author="dassy23", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger api of solana.", diff --git a/scripts/install.ps1 b/scripts/install.ps1 index ef6bf1cc7d..aa95b23d5d 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -34,7 +34,7 @@ function instal_choco_golang_gcc { } function install_aea { echo "Install aea" - $output=pip install open-aea[all]==1.59.0 --force --no-cache-dir 2>&1 |out-string; + $output=pip install open-aea[all]==1.60.0 --force --no-cache-dir 2>&1 |out-string; if ($LastExitCode -ne 0) { echo $output echo "AEA install failed!" diff --git a/scripts/install.sh b/scripts/install.sh index 5824b8c879..45dd080fa4 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -42,7 +42,7 @@ function is_python_version_ok() { function install_aea (){ echo "Install AEA" - output=$(pip3 install --user open-aea[all]==1.59.0 --force --no-cache-dir) + output=$(pip3 install --user open-aea[all]==1.60.0 --force --no-cache-dir) if [[ $? -ne 0 ]]; then echo "$output" diff --git a/skaffold.yaml b/skaffold.yaml index f2780f0390..2fc3da856b 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -5,7 +5,7 @@ metadata: build: tagPolicy: envTemplate: - template: "1.59.0" + template: "1.60.0" artifacts: - image: valory/open-aea-develop docker: @@ -24,7 +24,7 @@ profiles: build: tagPolicy: envTemplate: - template: "1.59.0" + template: "1.60.0" artifacts: - image: valory/open-aea-docs docker: diff --git a/user-image/Dockerfile b/user-image/Dockerfile index 585ea71aff..e664a69995 100644 --- a/user-image/Dockerfile +++ b/user-image/Dockerfile @@ -7,7 +7,7 @@ ENV LANG C.UTF-8 RUN apt update && apt install -y python3.11-dev python3-pip -y && apt autoremove && apt autoclean RUN pip3 install --upgrade pip -RUN pip3 install "open-aea[all]==1.59.0" open-aea-cli-ipfs==1.59.0 +RUN pip3 install "open-aea[all]==1.60.0" open-aea-cli-ipfs==1.60.0 COPY user-image/openssl.cnf /etc/ssl diff --git a/user-image/docker-env.sh b/user-image/docker-env.sh index 506fdb273b..aef9c5a374 100644 --- a/user-image/docker-env.sh +++ b/user-image/docker-env.sh @@ -1,7 +1,7 @@ #!/bin/bash # Swap the following lines if you want to work with 'latest' -DOCKER_IMAGE_TAG=valory/open-aea-user:1.59.0 +DOCKER_IMAGE_TAG=valory/open-aea-user:1.60.0 # DOCKER_IMAGE_TAG=valory/open-aea-user:latest DOCKER_BUILD_CONTEXT_DIR=.. From 10ed7259e3576c258f4b9f5f9d770b70b9864ee3 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Fri, 15 Nov 2024 13:43:45 +0200 Subject: [PATCH 10/12] chore: update the release history --- HISTORY.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 794c6e0d11..be47ef156a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,10 @@ # Release History - open AEA +## 1.60.0 (2024-11-15) + +Plugins: +- Fixes an edge case in the gas estimation #770 + ## 1.59.0 (2024-10-29) Plugins: From ae889bfab7b88d9647bc231580f5985ae553cbbe Mon Sep 17 00:00:00 2001 From: Adamantios Date: Fri, 15 Nov 2024 13:43:49 +0200 Subject: [PATCH 11/12] chore: update the upgrading guide --- docs/upgrading.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/upgrading.md b/docs/upgrading.md index 286ccca675..79dbc5ea91 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -9,6 +9,10 @@ Below we describe the additional manual steps required to upgrade between differ ### Upgrade guide +## `v1.59.0` to `v1.60.0` + +- No backwards incompatible changes + ## `v1.58.0` to `v1.59.0` - No backwards incompatible changes From 4c4f35ee15f58aa3d04b6f419380eea55257fcf5 Mon Sep 17 00:00:00 2001 From: Adamantios Date: Fri, 15 Nov 2024 17:12:13 +0200 Subject: [PATCH 12/12] chore: update the release history [no ci] --- HISTORY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.md b/HISTORY.md index be47ef156a..4a1fcab163 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,7 @@ ## 1.60.0 (2024-11-15) Plugins: +- Fixes the handling of dropped ACN node connection #769 - Fixes an edge case in the gas estimation #770 ## 1.59.0 (2024-10-29)