From 3a5f15dfd730277927411a41cffce48b52bac75a Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Tue, 10 Oct 2023 10:33:24 +0530 Subject: [PATCH 1/4] feat: bump open-aea@1.40.0 --- aea/__version__.py | 2 +- deploy-image/Dockerfile | 2 +- deploy-image/README.md | 2 +- develop-image/docker-env.sh | 2 +- examples/tac_deploy/Dockerfile | 2 +- scripts/install.ps1 | 2 +- scripts/install.sh | 2 +- skaffold.yaml | 4 ++-- user-image/Dockerfile | 2 +- user-image/docker-env.sh | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/aea/__version__.py b/aea/__version__.py index 1e2c92210c..3a3c21eaf3 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.40.0" +__version__ = "1.41.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 40d3ba74b7..b736631032 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.40.0 "open-aea-cli-ipfs<2.0.0,>=1.40.0" +RUN pip install --upgrade --force-reinstall open-aea[all]==1.41.0 "open-aea-cli-ipfs<2.0.0,>=1.41.0" # directories and aea cli config WORKDIR /home/agents diff --git a/deploy-image/README.md b/deploy-image/README.md index 6ad2096b4c..2fc813793a 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.40.0/packages packages +svn checkout https://github.com/valory-xyz/open-aea/tags/v1.41.0/packages packages ``` ### Modify scripts diff --git a/develop-image/docker-env.sh b/develop-image/docker-env.sh index bd5b6b5341..37845f4ff3 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.40.0 +DOCKER_IMAGE_TAG=valory/open-aea-develop:1.41.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 56368b3737..3967ccd509 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.40.0 +RUN pip install --upgrade --force-reinstall open-aea[all]==1.41.0 # directories and aea cli config COPY /.aea /home/.aea diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 277626dffe..633e27df68 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.40.0 --force --no-cache-dir 2>&1 |out-string; + $output=pip install open-aea[all]==1.41.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 1a2d43a4ba..3caa5b09cd 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.40.0 --force --no-cache-dir) + output=$(pip3 install --user open-aea[all]==1.41.0 --force --no-cache-dir) if [[ $? -ne 0 ]]; then echo "$output" diff --git a/skaffold.yaml b/skaffold.yaml index c2ee0782f7..59e6b2d198 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -5,7 +5,7 @@ metadata: build: tagPolicy: envTemplate: - template: "1.40.0" + template: "1.41.0" artifacts: - image: valory/open-aea-develop docker: @@ -24,7 +24,7 @@ profiles: build: tagPolicy: envTemplate: - template: "1.40.0" + template: "1.41.0" artifacts: - image: valory/open-aea-docs docker: diff --git a/user-image/Dockerfile b/user-image/Dockerfile index ddaac650aa..1e0f8807a1 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.40.0" open-aea-cli-ipfs==1.40.0 +RUN pip3 install "open-aea[all]==1.41.0" open-aea-cli-ipfs==1.41.0 COPY user-image/openssl.cnf /etc/ssl diff --git a/user-image/docker-env.sh b/user-image/docker-env.sh index e6659286c8..f87e970a64 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.40.0 +DOCKER_IMAGE_TAG=valory/open-aea-user:1.41.0 # DOCKER_IMAGE_TAG=valory/open-aea-user:latest DOCKER_BUILD_CONTEXT_DIR=.. From 8c6a3a00552c810817631487d5d86417e7641aff Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Tue, 10 Oct 2023 10:33:57 +0530 Subject: [PATCH 2/4] feat: bump plugins --- 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 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/aea-cli-benchmark/setup.py b/plugins/aea-cli-benchmark/setup.py index f8a4a6d31c..620da3465d 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.40.0", + version="1.41.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 8f9277d2a9..18f98a6f54 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.40.0", + version="1.41.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 6d89491373..d00f714ffc 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.40.0", + version="1.41.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 f9fa8ca41b..ca8e861e65 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.40.0", + version="1.41.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.40.0", + "open-aea-ledger-ethereum~=1.41.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 7f729a8edf..aab0394348 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.40.0", + version="1.41.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.40.0", + "open-aea-ledger-ethereum~=1.41.0", "ledgerwallet==0.1.3", "protobuf>=4.21.6,<5.0.0", "construct<=2.10.61", diff --git a/plugins/aea-ledger-ethereum/setup.py b/plugins/aea-ledger-ethereum/setup.py index 4cc791d04c..a0a37b8c6b 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.40.0", + version="1.41.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 e9e598a739..6a8960cf6e 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.40.0", + version="1.41.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.40.0"], + install_requires=["open-aea-ledger-cosmos~=1.41.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 46374316e5..8f7fe8105c 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.40.0", + version="1.41.0", author="dassy23", license="Apache-2.0", description="Python package wrapping the public and private key cryptography and ledger api of solana.", From 267a65263a71c70ca1386f91f1cc613694b54c5f Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Tue, 10 Oct 2023 10:59:28 +0530 Subject: [PATCH 3/4] chore: release notes --- HISTORY.md | 16 ++++++++++++++++ SECURITY.md | 4 ++-- docs/upgrading.md | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 3d5fdefa8c..2743dacdd1 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,22 @@ # Release History - open AEA +## 1.40.0 (2023-09-26) + +AEA: +- Fixes the source repository validation regex +- Updates the `generate-key` command to prompt before overwriting the existing keys file +- Fixes the inconsistent hashing caused by the `CRLF` line endings +- Updates the component loader to ignore the test modules when loading the component +- Adds support for overriding dependencies +- Updates the `sync` command to download missing dependencies and update `packages.json` +- Updates the error messages for missing ledger plugins on `generate-key` command + +Plugins: +- Adds missing `py.typed` markers +- Backports the changes from the `agent-academy-2` repository on the ledger connection +- Ports `http_server` as a valory connection + ## 1.40.0 (2023-09-26) AEA: diff --git a/SECURITY.md b/SECURITY.md index 8c656b657f..612982f8c7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,8 +8,8 @@ The following table shows which versions of `open-aea` are currently being suppo | Version | Supported | | --------- | ------------------ | -| `1.40.x` | :white_check_mark: | -| `< 1.40.0` | :x: | +| `1.41.x` | :white_check_mark: | +| `< 1.41.0` | :x: | ## Reporting a Vulnerability diff --git a/docs/upgrading.md b/docs/upgrading.md index 1aa71850be..7b56eaf318 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -9,7 +9,7 @@ Below we describe the additional manual steps required to upgrade between differ ### Upgrade guide -## `v1.40.0` to `v1.40.1` +## `v1.40.0` to `v1.41.0` - The way the dependencies will be selected for installation when running `aea install` has changed. Before this version, the versions were being merging all of the versions for a python package and using the most compatible version specifier possible. With this release, this behaviour will be replaced by overriding the dependencies in the following order `extra dependencies provided by flag > agent > skill > connection > contract > protocol` what this means is, let's say you have 3 packages with a same python package as a dependency From ee2f998b984c0654aad7b4a07d84f2649a8eb3ca Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Tue, 10 Oct 2023 13:33:55 +0530 Subject: [PATCH 4/4] fix: hashing bug introduced in https://github.com/valory-xyz/open-aea/pull/674 --- aea/helpers/ipfs/base.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/aea/helpers/ipfs/base.py b/aea/helpers/ipfs/base.py index a3f0bc4ea0..df78e090df 100644 --- a/aea/helpers/ipfs/base.py +++ b/aea/helpers/ipfs/base.py @@ -22,12 +22,15 @@ import hashlib import io import os +import platform +import re from pathlib import Path from typing import Any, Dict, Generator, Optional, Sized, Tuple, cast import base58 from aea.helpers.cid import to_v1 +from aea.helpers.io import open_file from aea.helpers.ipfs.utils import _protobuf_python_implementation @@ -41,12 +44,34 @@ from aea.helpers.ipfs.pb.merkledag_pb2 import PBNode # type: ignore +def _is_text(file_path: str) -> bool: + """Check if a file can be read as text or not.""" + try: + with open_file(file_path, "r") as f: + f.readline() + return True + except UnicodeDecodeError: + return False + + +def _dos2unix(file_content: bytes) -> bytes: + """ + Replace occurrences of Windows line terminator CR/LF with only LF. + + :param file_content: the content of the file. + :return: the same content but with the line terminator + """ + return re.sub(b"\r\n", b"\n", file_content, flags=re.M) + + def _read(file_path: str) -> bytes: """Read and verify the file is not empty.""" with open(file_path, "rb") as file: data = file.read() if len(data) == 0: raise ValueError(f"File cannot be empty: {file_path}") + if platform.system() == "Windows" and _is_text(file_path=file_path): + data = _dos2unix(data) return data