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

Include ledger specifier when writing keys in a JSON file #711

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 1.45.0 (2024-01-11)

AEA:
- Updates the `generate-key` command to include ledger specifier when writing keys in a JSON file

## 1.45.0 (2024-01-11)

Plugins:
- Fixes transaction deserialisation for adding nonce on the solana ledger
- Increases the number of retries for fetching transaction receipt
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ The following table shows which versions of `open-aea` are currently being suppo

| Version | Supported |
| --------- | ------------------ |
| `1.45.x` | :white_check_mark: |
| `< 1.45.0` | :x: |
| `1.46.x` | :white_check_mark: |
| `< 1.46.0` | :x: |

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion aea/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.45.0"
__version__ = "1.46.0"
__author__ = "Valory AG"
__license__ = "Apache-2.0"
__copyright__ = "2021 Valory AG, 2019 Fetch.AI Limited"
7 changes: 5 additions & 2 deletions aea/cli/generate_key.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2021-2023 Valory AG
# Copyright 2021-2024 Valory AG
# Copyright 2018-2020 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -29,6 +29,7 @@
from aea.cli.utils.decorators import _check_aea_project
from aea.configurations.constants import (
ADDRESS,
LEDGER,
MULTIKEY_FILENAME,
PRIVATE_KEY,
PRIVATE_KEY_PATH_SCHEMA,
Expand Down Expand Up @@ -165,7 +166,9 @@ def _generate_multiple_keys(
if password is not None
else crypto.private_key
)
key_pairs.append({ADDRESS: crypto.address, PRIVATE_KEY: priv_key})
key_pairs.append(
{ADDRESS: crypto.address, PRIVATE_KEY: priv_key, LEDGER: type_}
)
Comment on lines +169 to +171
Copy link
Author

Choose a reason for hiding this comment

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

This ledger specifier will be used by the deployment builder to write keys for the agents. The solana deployments failed because the deployment builder was writing solana keys as ethereum keys since there was no specifier in the keys.json file.


file = file or MULTIKEY_FILENAME
if _can_write(file):
Expand Down
1 change: 1 addition & 0 deletions aea/configurations/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
MULTIKEY_FILENAME = "keys.json"
PRIVATE_KEY = "private_key"
ADDRESS = "address"
LEDGER = "ledger"
DEFAULT_PRIVATE_KEY_FILE = PRIVATE_KEY_PATH_SCHEMA.format(DEFAULT_LEDGER)
DEFAULT_LICENSE = "Apache-2.0"
DISTRIBUTED_PACKAGES: List[str] = []
Expand Down
2 changes: 1 addition & 1 deletion deploy-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.45.0 "open-aea-cli-ipfs<2.0.0,>=1.45.0"
RUN pip install --upgrade --force-reinstall open-aea[all]==1.46.0 "open-aea-cli-ipfs<2.0.0,>=1.46.0"

# directories and aea cli config
WORKDIR /home/agents
Expand Down
2 changes: 1 addition & 1 deletion deploy-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.45.0/packages packages
svn checkout https://github.com/valory-xyz/open-aea/tags/v1.46.0/packages packages
```

### Modify scripts
Expand Down
2 changes: 1 addition & 1 deletion develop-image/docker-env.sh
Original file line number Diff line number Diff line change
@@ -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.45.0
DOCKER_IMAGE_TAG=valory/open-aea-develop:1.46.0
# DOCKER_IMAGE_TAG=valory/open-aea-develop:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down
5 changes: 5 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ Below we describe the additional manual steps required to upgrade between differ

### Upgrade guide


## `v1.45.0` to `v1.46.0`

- No backwards incompatible changes

## `v1.44.0` to `v1.45.0`

- No backwards incompatible changes
Expand Down
2 changes: 1 addition & 1 deletion examples/tac_deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.45.0
RUN pip install --upgrade --force-reinstall open-aea[all]==1.46.0

# directories and aea cli config
COPY /.aea /home/.aea
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-cli-benchmark/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="open-aea-cli-benchmark",
version="1.45.0",
version="1.46.0",
author="Valory AG",
license="Apache-2.0",
description="CLI extension for AEA framework benchmarking.",
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-cli-ipfs/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

setup(
name="open-aea-cli-ipfs",
version="1.45.0",
version="1.46.0",
author="Valory AG",
license="Apache-2.0",
description="CLI extension for open AEA framework wrapping IPFS functionality.",
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-ledger-cosmos/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="open-aea-ledger-cosmos",
version="1.45.0",
version="1.46.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger api of Cosmos.",
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-ledger-ethereum-flashbots/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name="open-aea-ledger-ethereum-flashbots",
version="1.45.0",
version="1.46.0",
author="Valory AG",
license="Apache-2.0",
description="Python package extending the default open-aea ethereum ledger plugin to add support for flashbots.",
Expand All @@ -41,7 +41,7 @@
},
python_requires=">=3.9,<4.0",
install_requires=[
"open-aea-ledger-ethereum~=1.45.0",
"open-aea-ledger-ethereum~=1.46.0",
"open-aea-flashbots==1.4.0",
],
tests_require=["pytest"],
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-ledger-ethereum-hwi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name="open-aea-ledger-ethereum-hwi",
version="1.45.0",
version="1.46.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and support for hardware wallet interactions.",
Expand All @@ -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.45.0",
"open-aea-ledger-ethereum~=1.46.0",
"ledgerwallet==0.1.3",
"protobuf<4.25.0,>=4.21.6",
"construct<=2.10.61",
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-ledger-ethereum/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="open-aea-ledger-ethereum",
version="1.45.0",
version="1.46.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger api of Ethereum.",
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-ledger-fetchai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

setup(
name="open-aea-ledger-fetchai",
version="1.45.0",
version="1.46.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger API of Fetch.AI.",
Expand All @@ -44,7 +44,7 @@
"test_tools/data/*",
]
},
install_requires=["open-aea-ledger-cosmos~=1.45.0"],
install_requires=["open-aea-ledger-cosmos~=1.46.0"],
tests_require=["pytest"],
entry_points={
"aea.cryptos": ["fetchai = aea_ledger_fetchai:FetchAICrypto"],
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-ledger-solana/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name="open-aea-ledger-solana",
version="1.45.0",
version="1.46.0",
author="dassy23",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger api of solana.",
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function instal_choco_golang_gcc {
}
function install_aea {
echo "Install aea"
$output=pip install open-aea[all]==1.45.0 --force --no-cache-dir 2>&1 |out-string;
$output=pip install open-aea[all]==1.46.0 --force --no-cache-dir 2>&1 |out-string;
if ($LastExitCode -ne 0) {
echo $output
echo "AEA install failed!"
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function is_python_version_ok() {

function install_aea (){
echo "Install AEA"
output=$(pip3 install --user open-aea[all]==1.45.0 --force --no-cache-dir)
output=$(pip3 install --user open-aea[all]==1.46.0 --force --no-cache-dir)
if [[ $? -ne 0 ]];
then
echo "$output"
Expand Down
4 changes: 2 additions & 2 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
build:
tagPolicy:
envTemplate:
template: "1.45.0"
template: "1.46.0"
artifacts:
- image: valory/open-aea-develop
docker:
Expand All @@ -24,7 +24,7 @@ profiles:
build:
tagPolicy:
envTemplate:
template: "1.45.0"
template: "1.46.0"
artifacts:
- image: valory/open-aea-docs
docker:
Expand Down
2 changes: 1 addition & 1 deletion user-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.45.0" open-aea-cli-ipfs==1.45.0
RUN pip3 install "open-aea[all]==1.46.0" open-aea-cli-ipfs==1.46.0

COPY user-image/openssl.cnf /etc/ssl

Expand Down
2 changes: 1 addition & 1 deletion user-image/docker-env.sh
Original file line number Diff line number Diff line change
@@ -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.45.0
DOCKER_IMAGE_TAG=valory/open-aea-user:1.46.0
# DOCKER_IMAGE_TAG=valory/open-aea-user:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down
Loading