Skip to content

Commit be29a2a

Browse files
Merge pull request #2065 from valory-xyz/bump/oaea-1-40-0
Bump `[email protected]`
2 parents 91b15ba + 316e046 commit be29a2a

File tree

108 files changed

+1479
-12519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1479
-12519
lines changed

.github/workflows/main_workflow.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ jobs:
110110
pip install tomte[tox]==0.2.13
111111
pip install --user --upgrade setuptools
112112
# install Protobuf compiler
113-
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
114-
unzip protoc-3.19.4-linux-x86_64.zip -d protoc
113+
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
114+
unzip protoc-24.3-linux-x86_64.zip -d protoc
115115
sudo mv protoc/bin/protoc /usr/local/bin/protoc
116116
# install IPFS
117117
sudo apt-get install -y wget
@@ -204,8 +204,8 @@ jobs:
204204
pip install --user --upgrade setuptools
205205
206206
# install Protobuf compiler
207-
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
208-
unzip protoc-3.19.4-linux-x86_64.zip -d protoc
207+
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
208+
unzip protoc-24.3-linux-x86_64.zip -d protoc
209209
sudo mv protoc/bin/protoc /usr/local/bin/protoc
210210
211211
# install IPFS
@@ -258,8 +258,8 @@ jobs:
258258
brew install gcc
259259
# brew install protobuf
260260
# brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb
261-
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-osx-x86_64.zip
262-
unzip protoc-3.19.4-osx-x86_64.zip -d protoc
261+
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip
262+
unzip protoc-24.3-osx-x86_64.zip -d protoc
263263
sudo mv protoc/bin/protoc /usr/local/bin/protoc
264264
brew tap yoheimuta/protolint
265265
brew install protolint
@@ -302,14 +302,14 @@ jobs:
302302
python -m pip install -U pip
303303
echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64"
304304
choco install wget -y
305-
choco install protoc --version 3.19.4
305+
choco install protoc --version 24.3
306306
choco install mingw -y
307307
choco install make -y
308308
# to check make was installed
309309
make --version
310310
pip install tomte[tox]==0.2.13
311-
# wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip
312-
# unzip protoc-3.19.4-win64.zip -d protoc
311+
# wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-win64.zip
312+
# unzip protoc-24.3-win64.zip -d protoc
313313
# sudo mv protoc/bin/protoc /usr/local/bin/protoc
314314
315315
# TODO: install protolint
@@ -386,8 +386,8 @@ jobs:
386386
pip install --user --upgrade setuptools
387387
388388
# install Protobuf compiler
389-
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
390-
unzip protoc-3.19.4-linux-x86_64.zip -d protoc
389+
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
390+
unzip protoc-24.3-linux-x86_64.zip -d protoc
391391
sudo mv protoc/bin/protoc /usr/local/bin/protoc
392392
393393
# install IPFS

.pylintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ignore-patterns=.*_pb2.py,contract_dispatcher.py,test_abci_messages.py,test_tend
33
ignore=packages/valory/protocols/abci,packages/valory/connections/abci/gogoproto
44

55
[MESSAGES CONTROL]
6-
disable=C0103,R0801,C0301,C0201,C0204,C0209,W1203,C0302,R1735,R1729,W0511
6+
disable=C0103,R0801,C0301,C0201,C0204,C0209,W1203,C0302,R1735,R1729,W0511,E0611
77

88
# See here for more options: https://www.codeac.io/documentation/pylint-configuration.html
99
R1735: use-dict-literal
@@ -16,6 +16,7 @@ C0209: consider-using-f-string
1616
C0301: http://pylint-messages.wikidot.com/messages:c0301 > Line too long
1717
C0302: http://pylint-messages.wikidot.com/messages:c0302 > Too many lines in module
1818
R0801: similar lines
19+
E0611: no-name-in-module
1920

2021
[IMPORTS]
2122
ignored-modules=pandas,numpy,aea_cli_ipfs,compose,multidict

HISTORY.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
# Release History - `open-autonomy`
22

33

4+
# 0.13.0 (2023-09-27)
5+
6+
Autonomy:
7+
- Replaces `open-aea-web3` with `web3py<7,>=6.0.0`
8+
- Bumps `protobuf<5.0.0,>=4.21.6`
9+
- Fixes `protobuf` incompatibility issue when importing hardware wallet plugin
10+
- Refactors autonomy and agent images to
11+
- Include install and build scripts in the base image
12+
- Remove unwanted layers
13+
- Remove unwanted data files
14+
15+
Packages:
16+
- Generates protocols using the latest compatible `protobuf` compiler
17+
- Compiles the tendermint connection protocol buffers using the latest compatible `protobuf` compiler
18+
19+
Chores:
20+
- Bumps `protobuf` compiler to `24.3`
21+
422
# 0.12.1.post4 (2023-09-25)
523

624
Autonomy:

Makefile

+16
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,19 @@ fix-abci-app-specs:
236236

237237
release-images:
238238
skaffold build -p release --cache-artifacts=false && skaffold build -p release-latest
239+
240+
241+
# Usage: INCLUDE=PATH_TO_PROTOC_INCLUDE_DIRECTORY make build-proto
242+
.PHONY: build-proto
243+
build-proto:
244+
@protoc -I $$INCLUDE \
245+
--proto_path=packages/valory/connections/abci/protos/ \
246+
--python_out=packages/valory/connections/abci/ \
247+
packages/valory/connections/abci/protos/gogoproto/gogo.proto \
248+
packages/valory/connections/abci/protos/tendermint/crypto/proof.proto \
249+
packages/valory/connections/abci/protos/tendermint/crypto/keys.proto \
250+
packages/valory/connections/abci/protos/tendermint/abci/types.proto \
251+
packages/valory/connections/abci/protos/tendermint/types/types.proto \
252+
packages/valory/connections/abci/protos/tendermint/types/validator.proto \
253+
packages/valory/connections/abci/protos/tendermint/types/params.proto \
254+
packages/valory/connections/abci/protos/tendermint/version/types.proto

Pipfile

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ name = "pypi"
77
aiohttp = "<3.8,>=3.7.4"
88
docker = "==6.1.2"
99
Flask = "==2.0.2"
10-
open-aea = {version = "==1.39.0.post1", extras = ["all"]}
11-
open-aea-ledger-ethereum = "==1.39.0.post1"
12-
open-aea-ledger-ethereum-hwi = "==1.39.0.post1"
13-
open-aea-cli-ipfs = "==1.39.0.post1"
10+
open-aea = {version = "==1.40.0", extras = ["all"]}
11+
open-aea-ledger-ethereum = "==1.40.0"
12+
open-aea-ledger-ethereum-hwi = "==1.40.0"
13+
open-aea-cli-ipfs = "==1.40.0"
1414
ipfshttpclient = "==0.8.0a2"
1515
Werkzeug= "==2.0.3"
1616
watchdog = ">=2.1.6"
@@ -23,7 +23,7 @@ valory-docker-compose = "==1.29.3"
2323
aiohttp = "<3.8,>=3.7.4"
2424
asn1crypto = "<1.5.0,>=1.4.0"
2525
ecdsa = ">=0.15"
26-
open-aea-web3 = "==6.0.1"
26+
web3 = "<7,>=6.0.0"
2727
certifi = "*"
2828
multidict = "*"
2929
eth_typing ="*"
@@ -32,13 +32,13 @@ typing_extensions = ">=3.10.0.2"
3232
hexbytes = "*"
3333
packaging = "*"
3434
pytest-asyncio = "*"
35-
open-aea-ledger-cosmos = "==1.39.0.post1"
35+
open-aea-ledger-cosmos = "==1.40.0"
3636
# we pin this as the range specified in open-aea-ledger-cosmos is wide
37-
open-aea-cosmpy = "==0.6.5"
37+
open-aea-cosmpy = "==0.6.6"
3838
grpcio = "==1.53.0"
3939
hypothesis = "==6.21.6"
4040
# latest supported for Python 3.7
41-
protobuf = "<=3.20.1,>=3.19"
41+
protobuf = "<5.0.0,>=4.21.6"
4242
pytz = "==2022.2.1"
4343
py-ecc = "==6.0.0"
4444
python-dotenv = ">=0.14.0,<0.18.0"

SECURITY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ The following table shows which versions of `open-autonomy` are currently being
88

99
| Version | Supported |
1010
| --------- | ------------------ |
11-
| `0.12.1.post4` | :white_check_mark: |
12-
| `< 0.12.x` | :x: |
11+
| `0.13.0` | :white_check_mark: |
12+
| `< 0.13.x` | :x: |
1313

1414
## Reporting a Vulnerability
1515

autonomy/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
__title__ = "open-autonomy"
2323
__description__ = "A framework for the creation of autonomous agent services."
2424
__url__ = "https://github.com/valory-xyz/open-autonomy.git"
25-
__version__ = "0.12.1.post4"
25+
__version__ = "0.13.0"
2626
__author__ = "Valory AG"
2727
__license__ = "Apache-2.0"
2828
__copyright__ = "2021-2022 Valory AG"

autonomy/cli/helpers/chain.py

+25-17
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"""On-chain interaction helpers."""
2121

2222
from pathlib import Path
23-
from typing import Any, Dict, List, Optional, Tuple, cast
23+
from typing import Any, Dict, List, Optional, Tuple, Type, cast
2424

2525
import click
2626
from aea.configurations.base import PackageConfiguration
@@ -90,14 +90,6 @@
9090
except ImportError: # pragma: nocover
9191
ETHEREUM_PLUGIN_INSTALLED = False
9292

93-
try:
94-
from aea_ledger_ethereum_hwi.exceptions import HWIError
95-
from aea_ledger_ethereum_hwi.hwi import EthereumHWIApi
96-
97-
HWI_PLUGIN_INSTALLED = True
98-
except ImportError: # pragma: nocover
99-
HWI_PLUGIN_INSTALLED = False
100-
10193

10294
class OnChainHelper: # pylint: disable=too-few-public-methods
10395
"""On-chain interaction helper."""
@@ -124,7 +116,28 @@ def __init__(
124116
)
125117

126118
@staticmethod
119+
def load_hwi_plugin() -> Type[LedgerApi]: # pragma: nocover
120+
"""Load HWI Plugin."""
121+
try:
122+
from aea_ledger_ethereum_hwi.hwi import ( # pylint: disable=import-outside-toplevel
123+
EthereumHWIApi,
124+
)
125+
126+
return EthereumHWIApi
127+
except ImportError as e:
128+
raise click.ClickException(
129+
"Hardware wallet plugin not installed, "
130+
"Run `pip3 install open-aea-ledger-ethereum-hwi` to install the plugin"
131+
) from e
132+
except TypeError as e:
133+
raise click.ClickException(
134+
'Protobuf compatibility error; Please export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python" '
135+
"to use the hardware wallet without any issues"
136+
) from e
137+
138+
@classmethod
127139
def get_ledger_and_crypto_objects(
140+
cls,
128141
chain_type: ChainType,
129142
key: Optional[Path] = None,
130143
password: Optional[str] = None,
@@ -141,13 +154,8 @@ def get_ledger_and_crypto_objects(
141154
f"using `{ChainConfigs.get_rpc_env_var(chain_type)}` environment variable"
142155
)
143156

144-
if hwi and not HWI_PLUGIN_INSTALLED: # pragma: nocover
145-
raise click.ClickException(
146-
"Hardware wallet plugin not installed, "
147-
"Run `pip3 install open-aea-ledger-ethereum-hwi` to install the plugin"
148-
)
149-
150157
if hwi:
158+
EthereumHWIApi = cls.load_hwi_plugin()
151159
identifier = EthereumHWIApi.identifier
152160

153161
if not hwi and not ETHEREUM_PLUGIN_INSTALLED: # pragma: nocover
@@ -185,8 +193,8 @@ def get_ledger_and_crypto_objects(
185193

186194
try:
187195
ledger_api.api.eth.default_account = crypto.address
188-
except HWIError as e: # pragma: nocover
189-
raise click.ClickException(e.message)
196+
except Exception as e: # pragma: nocover
197+
raise click.ClickException(str(e))
190198

191199
return ledger_api, crypto
192200

autonomy/constants.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@
5858
ACN_IMAGE_NAME = os.environ.get("ACN_IMAGE_NAME", "valory/open-acn-node")
5959
DEFAULT_DOCKER_IMAGE_AUTHOR = "valory"
6060
OAR_IMAGE = "{image_author}/oar-{agent}:{version}"
61-
ABSTRACT_ROUND_ABCI_SKILL_WITH_HASH = "valory/abstract_round_abci:0.1.0:bafybeih2fyfb6kkf7r45pvdk7pyyebr5xloia4xiqxtb3qsrasnstqmepq"
61+
ABSTRACT_ROUND_ABCI_SKILL_WITH_HASH = "valory/abstract_round_abci:0.1.0:bafybeibrrgdzbpdqyirkfulg5bgkrdwlynezdheplm55xfhkrnlxgvluo4"

autonomy/data/Dockerfiles/agent/Dockerfile

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ FROM ${AUTONOMY_IMAGE_NAME}:${AUTONOMY_IMAGE_VERSION}
66
ARG AEA_AGENT
77
ARG AUTHOR
88

9-
COPY start.sh /home/ubuntu
10-
COPY install.sh /home/ubuntu
9+
RUN aea init --reset --remote --ipfs --author ${AUTHOR}
1110

12-
VOLUME /home/ubuntu/logs
13-
WORKDIR /home/ubuntu
11+
WORKDIR /root
1412

15-
RUN aea init --reset --remote --ipfs --author ${AUTHOR}
16-
RUN AEA_AGENT=${AEA_AGENT} bash install.sh
13+
RUN AEA_AGENT=${AEA_AGENT} bash /root/scripts/install.sh
1714

18-
CMD ["start.sh"]
15+
CMD ["/root/scripts/start.sh"]
1916

2017
HEALTHCHECK --interval=3s --timeout=600s --retries=600 CMD netstat -ltn | grep -c 26658 > /dev/null; if [ 0 != $? ]; then exit 1; fi;
+11-17
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
ARG AEA_VERSION=latest
2-
FROM valory/open-aea-user:${AEA_VERSION}
3-
ARG AUTHOR=default_author
42

5-
WORKDIR /home/ubuntu
6-
ENV PATH=$PATH:/home/ubuntu/.local/bin
3+
FROM valory/open-aea-user:${AEA_VERSION}
74

8-
RUN sudo apt-get update && sudo apt-get upgrade -y
9-
RUN cd /usr/bin && sudo rm python3 && sudo ln -s python3.10 python3 && sudo ln -s python3.10 python
10-
RUN sudo apt-get install wait-for-it net-tools -y
11-
RUN sudo apt remove --purge python3-virtualenv
5+
ARG AUTHOR=default_author
126

7+
RUN apt remove --purge python3-virtualenv
8+
RUN python -m pip uninstall -y setuptools
139
RUN python -m pip install --upgrade pip
1410
RUN python -m pip install --force-reinstall pipenv virtualenv --user
15-
RUN python -m pip uninstall -y setuptools
16-
WORKDIR /home/ubuntu
1711

18-
COPY openssl.cnf /etc/ssl
19-
COPY Pipfile /home/ubuntu/Pipfile
20-
COPY start_dev.sh /home/ubuntu/start_dev.sh
21-
COPY start.sh /home/ubuntu/start.sh
22-
COPY watcher.py /home/ubuntu/watcher.py
12+
WORKDIR /root
2313

24-
CMD ["./start_dev.sh"]
14+
COPY Pipfile /root/Pipfile
15+
COPY start_dev.sh /root/start_dev.sh
16+
COPY start.sh /root/start.sh
17+
COPY watcher.py /root/watcher.py
2518

26-
HEALTHCHECK --interval=3s --timeout=600s --retries=600 CMD netstat -ltn | grep -c 26658 > /dev/null; if [ 0 != $? ]; then exit 1; fi;
19+
CMD ["/root/start_dev.sh"]
2720

21+
HEALTHCHECK --interval=3s --timeout=600s --retries=600 CMD netstat -ltn | grep -c 26658 > /dev/null; if [ 0 != $? ]; then exit 1; fi;

autonomy/data/Dockerfiles/dev/Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ requests = {version = "==2.27.1"}
1010

1111
[dev-packages]
1212
asn1crypto = {version = "==1.4.0"}
13-
open-aea-cosmpy = {version = "==0.6.5"}
13+
open-aea-cosmpy = {version = "==0.6.6"}
1414
open-aea = {editable = true, extras=["all"], path = "/open-aea"}
1515
open-aea-cli-ipfs = {editable = true, path = "/open-aea/plugins/aea-cli-ipfs"}
1616
open-aea-ledger-cosmos = {editable = true, path = "/open-aea/plugins/aea-ledger-cosmos"}

0 commit comments

Comments
 (0)