Skip to content

Commit

Permalink
Merge pull request #2147 from valory-xyz/chore/bump
Browse files Browse the repository at this point in the history
Bump open-aea@1.45.0
  • Loading branch information
angrybayblade committed Jan 23, 2024
2 parents cb017f7 + ca1529a commit afc375e
Show file tree
Hide file tree
Showing 57 changed files with 287 additions and 276 deletions.
9 changes: 9 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release History - `open-autonomy`

# 0.14.1 (2024-01-23)

Autonomy:
- Pins `aiohttp<4.0.0,>=3.8.5`
- Updates the deployment builder to use ledger identifier property in the `keys.json` to write the private key files in a deployment setup

Packages:
- Ports multi-ledger support on termination skill from `IEKIT`

# 0.14.0 (2024-01-19)

Autonomy:
Expand Down
12 changes: 6 additions & 6 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ name = "pypi"
aiohttp = "<4.0.0,>=3.8.5"
docker = "==6.1.2"
Flask = "==2.0.2"
open-aea = {version = "==1.45.0", extras = ["all"]}
open-aea-ledger-ethereum = "==1.45.0"
open-aea-ledger-ethereum-hwi = "==1.45.0"
open-aea-cli-ipfs = "==1.45.0"
open-aea = {version = "==1.46.0", extras = ["all"]}
open-aea-ledger-ethereum = "==1.46.0"
open-aea-ledger-ethereum-hwi = "==1.46.0"
open-aea-cli-ipfs = "==1.46.0"
ipfshttpclient = "==0.8.0a2"
Werkzeug= "==2.0.3"
watchdog = ">=2.1.6"
Expand All @@ -32,7 +32,7 @@ typing_extensions = ">=3.10.0.2"
hexbytes = "*"
packaging = "*"
pytest-asyncio = "*"
open-aea-ledger-cosmos = "==1.45.0"
open-aea-ledger-cosmos = "==1.46.0"
# we pin this as the range specified in open-aea-ledger-cosmos is wide
open-aea-cosmpy = "==0.6.7"
grpcio = "==1.53.0"
Expand All @@ -41,7 +41,7 @@ hypothesis = "==6.21.6"
protobuf = "<4.25.0,>=4.21.6"
pytz = "==2022.2.1"
py-ecc = "==6.0.0"
python-dotenv = ">=0.14.0,<0.18.0"
python-dotenv = ">=0.14.1,<0.18.0"
requests = "==2.28.1"
### tests deps
tomte = {version = "==0.2.15", extras = ["tests", "cli"]}
Expand Down
2 changes: 1 addition & 1 deletion autonomy/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
__title__ = "open-autonomy"
__description__ = "A framework for the creation of autonomous agent services."
__url__ = "https://github.com/valory-xyz/open-autonomy.git"
__version__ = "0.14.0"
__version__ = "0.14.1"
__author__ = "Valory AG"
__license__ = "Apache-2.0"
__copyright__ = "2021-2022 Valory AG"
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:bafybeidjaatj5k2ejme33ybzhycmmcemnlpzysuur5tqc2pfqqlafoxmm4"
ABSTRACT_ROUND_ABCI_SKILL_WITH_HASH = "valory/abstract_round_abci:0.1.0:bafybeiad6hgkxhvwnxiwwlwlwvrw4h7cjatmjnga3okeg6omuzsccitome"
18 changes: 6 additions & 12 deletions autonomy/deploy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,15 @@
ProtocolConfig,
SkillConfig,
)
from aea.configurations.constants import SKILL
from aea.configurations.constants import ADDRESS, LEDGER, PRIVATE_KEY, SKILL
from aea.configurations.data_types import PackageType, PublicId
from aea.helpers.env_vars import apply_env_variables

from autonomy.analyse.service import ABCI
from autonomy.configurations.base import Service
from autonomy.configurations.loader import load_service_config
from autonomy.constants import DEFAULT_DOCKER_IMAGE_AUTHOR
from autonomy.deploy.constants import (
DEFAULT_ENCODING,
INFO,
KEY_SCHEMA_ADDRESS,
KEY_SCHEMA_PRIVATE_KEY,
KEY_SCHEMA_TYPE,
)
from autonomy.deploy.constants import DEFAULT_ENCODING, INFO


ENV_VAR_ID = "ID"
Expand Down Expand Up @@ -266,10 +260,10 @@ def read_keys(self, keys_file: Path) -> None:
) from e

for key in keys:
if {KEY_SCHEMA_ADDRESS, KEY_SCHEMA_PRIVATE_KEY} != set(key.keys()) and {
KEY_SCHEMA_ADDRESS,
KEY_SCHEMA_PRIVATE_KEY,
KEY_SCHEMA_TYPE,
if {ADDRESS, PRIVATE_KEY} != set(key.keys()) and {
ADDRESS,
PRIVATE_KEY,
LEDGER,
} != set(key.keys()):
raise NotValidKeysFile("Key file incorrectly formatted.")

Expand Down
4 changes: 0 additions & 4 deletions autonomy/deploy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@

DEFAULT_ENCODING = "utf-8"

KEY_SCHEMA_ADDRESS = "address"
KEY_SCHEMA_PRIVATE_KEY = "private_key"
KEY_SCHEMA_TYPE = "key_type"

PERSISTENT_DATA_DIR = "persistent_data"
LOG_DIR = "logs"
TM_STATE_DIR = "tm_state"
Expand Down
13 changes: 8 additions & 5 deletions autonomy/deploy/generators/docker_compose/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
from pathlib import Path
from typing import Dict, Optional, cast

from aea.configurations.constants import DEFAULT_LEDGER, PRIVATE_KEY_PATH_SCHEMA
from aea.configurations.constants import (
DEFAULT_LEDGER,
LEDGER,
PRIVATE_KEY,
PRIVATE_KEY_PATH_SCHEMA,
)
from docker import from_env

from autonomy.constants import (
Expand All @@ -41,8 +46,6 @@
DEPLOYMENT_AGENT_KEY_DIRECTORY_SCHEMA,
DEPLOYMENT_KEY_DIRECTORY,
INFO,
KEY_SCHEMA_PRIVATE_KEY,
KEY_SCHEMA_TYPE,
)
from autonomy.deploy.generators.docker_compose.templates import (
ABCI_NODE_TEMPLATE,
Expand Down Expand Up @@ -338,8 +341,8 @@ def populate_private_keys(
keys_dir = self.build_dir / DEPLOYMENT_KEY_DIRECTORY
for x in range(self.service_builder.service.number_of_agents):
path = keys_dir / DEPLOYMENT_AGENT_KEY_DIRECTORY_SCHEMA.format(agent_n=x)
ledger = self.service_builder.keys[x].get(KEY_SCHEMA_TYPE, DEFAULT_LEDGER)
key = self.service_builder.keys[x][KEY_SCHEMA_PRIVATE_KEY]
ledger = self.service_builder.keys[x].get(LEDGER, DEFAULT_LEDGER)
key = self.service_builder.keys[x][PRIVATE_KEY]
keys_file = path / PRIVATE_KEY_PATH_SCHEMA.format(ledger)
path.mkdir()
with keys_file.open(mode="w", encoding=DEFAULT_ENCODING) as f:
Expand Down
19 changes: 6 additions & 13 deletions autonomy/deploy/generators/kubernetes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from typing import Any, Dict, List, Optional, cast

import yaml
from aea.configurations.constants import DEFAULT_LEDGER
from aea.configurations.constants import DEFAULT_LEDGER, LEDGER, PRIVATE_KEY

from autonomy.constants import (
HARDHAT_IMAGE_NAME,
Expand All @@ -37,12 +37,7 @@
ServiceBuilder,
tm_write_to_log,
)
from autonomy.deploy.constants import (
DEFAULT_ENCODING,
KEY_SCHEMA_PRIVATE_KEY,
KEY_SCHEMA_TYPE,
KUBERNETES_AGENT_KEY_NAME,
)
from autonomy.deploy.constants import DEFAULT_ENCODING, KUBERNETES_AGENT_KEY_NAME
from autonomy.deploy.generators.kubernetes.templates import (
AGENT_NODE_TEMPLATE,
AGENT_SECRET_TEMPLATE,
Expand Down Expand Up @@ -110,16 +105,14 @@ def build_agent_deployment(
agent_deployment = AGENT_NODE_TEMPLATE.format(
runtime_image=runtime_image,
validator_ix=agent_ix,
aea_key=self.service_builder.keys[agent_ix][KEY_SCHEMA_PRIVATE_KEY],
aea_key=self.service_builder.keys[agent_ix][PRIVATE_KEY],
number_of_validators=number_of_agents,
host_names=host_names,
tendermint_image_name=TENDERMINT_IMAGE_NAME,
tendermint_image_version=TENDERMINT_IMAGE_VERSION,
log_level=self.service_builder.log_level,
agent_ports_deployment=agent_ports_deployment,
ledger=self.service_builder.keys[agent_ix].get(
KEY_SCHEMA_TYPE, DEFAULT_LEDGER
),
ledger=self.service_builder.keys[agent_ix].get(LEDGER, DEFAULT_LEDGER),
write_to_log=str(tm_write_to_log()).lower(),
)
agent_deployment_yaml = yaml.load_all(agent_deployment, Loader=yaml.FullLoader) # type: ignore
Expand Down Expand Up @@ -227,8 +220,8 @@ def populate_private_keys(self) -> "BaseDeploymentGenerator":
"""Populates private keys into a config map for the kubernetes deployment."""
path = self.build_dir / "agent_keys"
for x in range(self.service_builder.service.number_of_agents):
ledger = self.service_builder.keys[x].get(KEY_SCHEMA_TYPE, DEFAULT_LEDGER)
key = self.service_builder.keys[x][KEY_SCHEMA_PRIVATE_KEY]
ledger = self.service_builder.keys[x].get(LEDGER, DEFAULT_LEDGER)
key = self.service_builder.keys[x][PRIVATE_KEY]
secret = AGENT_SECRET_TEMPLATE.format(
private_key=key, validator_ix=x, ledger=ledger
)
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.14.0
open-aea[all]==1.45.0
open-aea-cli-ipfs==1.45.0
open-aea-ledger-ethereum==1.45.0
open-autonomy[all]==0.14.1
open-aea[all]==1.46.0
open-aea-cli-ipfs==1.46.0
open-aea-ledger-ethereum==1.46.0
protobuf>=4.21.6,<5.0.0
4 changes: 1 addition & 3 deletions deployments/Dockerfiles/autonomy/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ function checkKey() {
fi
fi
addKey $1

}

function handleFlashbotsKey() {
Expand Down Expand Up @@ -70,7 +69,6 @@ function runAgent() {
else
aea run
fi

}

function addKey() {
Expand All @@ -87,6 +85,7 @@ function addKey() {

function main() {
echo "Running the aea with $(aea --version)"

echo "Checking keys"
checkKey ethereum
checkKey cosmos
Expand All @@ -98,7 +97,6 @@ function main() {

echo "Running the aea"
runAgent

}

cd agent
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_reference/commands/autonomy_build-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ autonomy build-image [OPTIONS] [AGENT_PUBLIC_ID]
* Include extra python packages:

```bash
autonomy build-image ... -e open-aea-ledger-flashbots==1.45.0
autonomy build-image ... -e open-aea-ledger-flashbots==1.46.0
```

This will tag the image as `<author>/oar-<agent_package>:<version>`.
14 changes: 14 additions & 0 deletions docs/advanced_reference/commands/autonomy_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,20 @@ autonomy deploy build keys.json -ltm

Builds a service deployment using the keys stored in the file `keys.json` and applying environment variables to the service configuration file. The deployment will be generated by default for as many agents as keys are stored in `keys.json`. By default, the command searches for the file `keys.json`, if no file name is provided.

If you are manually defining `keys.json` make sure to include `ledger` property for a key object. This will be used when writing key files to the deployment environment. If you don't specify the property `ethereum` will be used as default ledger identifier, so if you're running an agent against a different ledger (eg. `solana`) you'll have to specify this property manually like this

```json
[
{
"address": "Solanaaddress",
"private_key": "Solanaprivatekey",
"ledger": "solana"
}
]
```

If the keys are generated using `autonomy generate-key` command the `ledger` property will be included automatically.

### Private key security

When building deployments, you can use password protected privates keys (eg. generated using `autonomy generate-key LEDGER --password PASSWORD`) to avoid exposing them.
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:bafybeihsdgsrhdd2vkiwswqztt653wczwegs4umibi45jdrmc4gdssvlg4 --remote --service
autonomy fetch valory/counter:0.1.0:bafybeihm2qdmpijd5qmqnn4gb7hur54i46tmcqscj47ydi7x3vntwpjhxa --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:bafybeibupvzr4ctz6p2wyf6ll62k2bb2a3fyphqrg4bdoihc2wrpttjqia --remote
autonomy fetch valory/counter_client:0.1.0:bafybeibbkqmoihxh52kohj43riwqpgkijtbzw7vz56muopurqymz6t7v4q --remote
```
This will copy the agent project in the `counter_client` directory.
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.45.0
version: ==1.46.0
open-aea-test-autonomy:
version: ==0.12.1.post1
default_connection: null
Expand Down
10 changes: 5 additions & 5 deletions docs/guides/set_up.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ If you plan to follow the guides in the next sections, you need to populate the
"third_party": {
"service/valory/hello_world/0.1.0": "bafybeicehljk5ahlsy62t6a5by46uz3nguuxuh653mzoz4hfme22s6eodi",
"agent/valory/hello_world/0.1.0": "bafybeib5grnum25svkpozqqnvpd7nmwoaypnc3l7lbnoj335nwgczsiyca",
"connection/valory/abci/0.1.0": "bafybeicmkbwcorbnv2aqf545anmbx6ouumh3kiqngqa7yue4vug7njzzpe",
"connection/valory/abci/0.1.0": "bafybeicw37smsrrnsns2fu3ddr5scgrleefyfsbeiv5rs6xnlfust6am4u",
"connection/valory/http_client/0.23.0": "bafybeih5vzo22p2umhqo52nzluaanxx7kejvvpcpdsrdymckkyvmsim6gm",
"connection/valory/ipfs/0.1.0": "bafybeih6vb5dep45yap6zocu2h6fzhne62tmwnfc2qxhx55tvwijew6cae",
"connection/valory/ipfs/0.1.0": "bafybeibsjllc2l62jvc4gdyv73irldlvbqlslytm4gw6xjvugcp5oylx44",
"connection/valory/ledger/0.19.0": "bafybeic3ft7l7ca3qgnderm4xupsfmyoihgi27ukotnz7b5hdczla2enya",
"contract/valory/service_registry/0.1.0": "bafybeib23iqc474dbwih3teor3odjgoww4jtstpfz4dd7zkg6r5ejlvxry",
"contract/valory/service_registry/0.1.0": "bafybeigjllqk44fwib4gjgjetgfih2dnpdujf4uyywgceeautdozedf3vm",
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
"protocol/valory/abci/0.1.0": "bafybeiaqmp7kocbfdboksayeqhkbrynvlfzsx4uy4x6nohywnmaig4an7u",
"protocol/valory/acn/1.1.0": "bafybeidluaoeakae3exseupaea4i3yvvk5vivyt227xshjlffywwxzcxqe",
Expand All @@ -125,8 +125,8 @@ If you plan to follow the guides in the next sections, you need to populate the
"protocol/valory/ipfs/0.1.0": "bafybeiftxi2qhreewgsc5wevogi7yc5g6hbcbo4uiuaibauhv3nhfcdtvm",
"protocol/valory/ledger_api/1.0.0": "bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni",
"protocol/valory/tendermint/0.1.0": "bafybeig4mi3vmlv5zpbjbfuzcgida6j5f2nhrpedxicmrrfjweqc5r7cra",
"skill/valory/abstract_abci/0.1.0": "bafybeibqqfgtjdfbvexjw6v4zasz5l6ssnw6joqgookfgpia2qqhvkt33e",
"skill/valory/abstract_round_abci/0.1.0": "bafybeidjaatj5k2ejme33ybzhycmmcemnlpzysuur5tqc2pfqqlafoxmm4",
"skill/valory/abstract_abci/0.1.0": "bafybeifbvhohn26uyezzf26d6zeldg4gyjg74jrialquaafuz2flpt7zna",
"skill/valory/abstract_round_abci/0.1.0": "bafybeiad6hgkxhvwnxiwwlwlwvrw4h7cjatmjnga3okeg6omuzsccitome",
"skill/valory/hello_world_abci/0.1.0": "bafybeiabaamrsmq3ysbdk4gxym7in5urwyyfmegto3v5hgqc6etn7g6ubi",
"connection/valory/p2p_libp2p_client/0.1.0": "bafybeid3xg5k2ol5adflqloy75ibgljmol6xsvzvezebsg7oudxeeolz7e"
}
Expand Down
Loading

0 comments on commit afc375e

Please sign in to comment.