From b95ff4dac4e3702968526ff4c486de963e5e0528 Mon Sep 17 00:00:00 2001 From: "Andres D. Molins" Date: Thu, 9 Jan 2025 15:39:19 +0100 Subject: [PATCH 1/3] Fix: Update p2p protocol to use the patched version of the p2p python client library and to avoid waiting 2 seconds everytime that the consumer fails. --- pyproject.toml | 2 +- src/aleph/services/p2p/protocol.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c8b64cd20..81d082e94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "alembic==1.12.1", "aleph-message==0.6", "aleph-nuls2==0.1", - "aleph-p2p-client @ git+https://github.com/aleph-im/p2p-service-client-python@2c04af39c566217f629fd89505ffc3270fba8676", + "aleph-p2p-client @ git+https://github.com/aleph-im/p2p-service-client-python@andres-fix-p2p-client", "aleph-pytezos==3.13.4", "asyncpg==0.30", "base58>=1.0.3", diff --git a/src/aleph/services/p2p/protocol.py b/src/aleph/services/p2p/protocol.py index d087edf05..d52ac1692 100644 --- a/src/aleph/services/p2p/protocol.py +++ b/src/aleph/services/p2p/protocol.py @@ -71,4 +71,4 @@ async def incoming_channel( except Exception: LOGGER.exception("Exception in pubsub, reconnecting.") - await asyncio.sleep(2) + await asyncio.sleep(0.1) From 30172a1ac1e818e3d9ec7d5ac9b405195f901f5d Mon Sep 17 00:00:00 2001 From: "Andres D. Molins" Date: Thu, 9 Jan 2025 18:12:52 +0100 Subject: [PATCH 2/3] Fixed code quality issues --- pyproject.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 81d082e94..557e0f40a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,12 +43,12 @@ dependencies = [ "eth-typing~=4.0", "gunicorn==21.2", "hexbytes==0.2.2", - "msgpack==1.0.3", # required by aiocache - "multiaddr==0.0.9", # for libp2p-stubs - "orjson>=3.7.7", # Minimum version for Python 3.11 - "psycopg2-binary==2.9.5", # Note: psycopg3 is not yet supported by SQLAlchemy - "pycryptodome==3.17", # for libp2p-stubs - "pymultihash==0.8.2", # for libp2p-stubs + "msgpack==1.0.3", # required by aiocache + "multiaddr==0.0.9", # for libp2p-stubs + "orjson>=3.7.7", # Minimum version for Python 3.11 + "psycopg2-binary==2.9.5", # Note: psycopg3 is not yet supported by SQLAlchemy + "pycryptodome==3.17", # for libp2p-stubs + "pymultihash==0.8.2", # for libp2p-stubs "pynacl==1.5", "python-dateutil==2.8.2", "pytz==2023.3", @@ -62,7 +62,7 @@ dependencies = [ "sqlalchemy-utils==0.38.3", "substrate-interface==1.7.4", "types-aiofiles==23.2.0.20240403", - "ujson==5.4", # required by aiocache + "ujson==5.4", # required by aiocache "urllib3==2.2.2", "uvloop==0.21", "web3==6.11.2", From fe79bb2455ab8599e327581b17ae718b6c4c9c6e Mon Sep 17 00:00:00 2001 From: "Andres D. Molins" Date: Sat, 11 Jan 2025 10:29:23 +0100 Subject: [PATCH 3/3] Fix: Added version change preparing for the new release. --- .../samples/docker-compose/docker-compose.yml | 4 ++-- docs/conf.py | 2 +- pyproject.toml | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/deployment/samples/docker-compose/docker-compose.yml b/deployment/samples/docker-compose/docker-compose.yml index 69a898449..e835906ed 100644 --- a/deployment/samples/docker-compose/docker-compose.yml +++ b/deployment/samples/docker-compose/docker-compose.yml @@ -11,7 +11,7 @@ volumes: services: pyaleph: restart: always - image: alephim/pyaleph-node:0.5.7 + image: alephim/pyaleph-node:0.5.9 command: --config /opt/pyaleph/config.yml --key-dir /opt/pyaleph/keys -v volumes: - ./config.yml:/opt/pyaleph/config.yml @@ -30,7 +30,7 @@ services: pyaleph-api: restart: always - image: alephim/pyaleph-node:0.5.7 + image: alephim/pyaleph-node:0.5.9 command: --config /opt/pyaleph/config.yml --key-dir /opt/pyaleph/keys -v entrypoint: ["bash", "deployment/scripts/run_aleph_ccn_api.sh"] ports: diff --git a/docs/conf.py b/docs/conf.py index 83d04a0e0..95befd8ab 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -293,5 +293,5 @@ rst_epilog = """ -.. |pyaleph_version| replace:: 0.5.7 +.. |pyaleph_version| replace:: 0.5.9 """ diff --git a/pyproject.toml b/pyproject.toml index 557e0f40a..c4fba4613 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "alembic==1.12.1", "aleph-message==0.6", "aleph-nuls2==0.1", - "aleph-p2p-client @ git+https://github.com/aleph-im/p2p-service-client-python@andres-fix-p2p-client", + "aleph-p2p-client @ git+https://github.com/aleph-im/p2p-service-client-python@cbfebb871db94b2ca580e66104a67cd730c5020c", "aleph-pytezos==3.13.4", "asyncpg==0.30", "base58>=1.0.3", @@ -43,12 +43,12 @@ dependencies = [ "eth-typing~=4.0", "gunicorn==21.2", "hexbytes==0.2.2", - "msgpack==1.0.3", # required by aiocache - "multiaddr==0.0.9", # for libp2p-stubs - "orjson>=3.7.7", # Minimum version for Python 3.11 - "psycopg2-binary==2.9.5", # Note: psycopg3 is not yet supported by SQLAlchemy - "pycryptodome==3.17", # for libp2p-stubs - "pymultihash==0.8.2", # for libp2p-stubs + "msgpack==1.0.3", # required by aiocache + "multiaddr==0.0.9", # for libp2p-stubs + "orjson>=3.7.7", # Minimum version for Python 3.11 + "psycopg2-binary==2.9.5", # Note: psycopg3 is not yet supported by SQLAlchemy + "pycryptodome==3.17", # for libp2p-stubs + "pymultihash==0.8.2", # for libp2p-stubs "pynacl==1.5", "python-dateutil==2.8.2", "pytz==2023.3", @@ -62,7 +62,7 @@ dependencies = [ "sqlalchemy-utils==0.38.3", "substrate-interface==1.7.4", "types-aiofiles==23.2.0.20240403", - "ujson==5.4", # required by aiocache + "ujson==5.4", # required by aiocache "urllib3==2.2.2", "uvloop==0.21", "web3==6.11.2",