From cf2a7923a32c2ccb0ac4f1458a633bc3d778102e Mon Sep 17 00:00:00 2001
From: Hugo Herter <git@hugoherter.com>
Date: Fri, 21 Jun 2024 15:06:11 +0200
Subject: [PATCH 1/3] This branch adds a dockerized environment to reproduce
 the issues that the CI faced with Ubuntu 24.04 and secp256k1.

Usage:
```sh
bash ./tests/test-ubuntu-24.04-docker.sh
```

Then use the upper arrow to run tests with `hatch`.
---
 tests/test-ubuntu-24.04-docker.sh |  6 ++++++
 tests/ubuntu-24.04.dockerfile     | 18 ++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 tests/test-ubuntu-24.04-docker.sh
 create mode 100644 tests/ubuntu-24.04.dockerfile

diff --git a/tests/test-ubuntu-24.04-docker.sh b/tests/test-ubuntu-24.04-docker.sh
new file mode 100644
index 00000000..cae05d27
--- /dev/null
+++ b/tests/test-ubuntu-24.04-docker.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+podman build -t aleph-sdk-ubuntu:24.04 -f tests/ubuntu-24.04.dockerfile .
+podman run -ti --rm -v $(pwd):/mnt aleph-sdk-ubuntu:24.04 bash
diff --git a/tests/ubuntu-24.04.dockerfile b/tests/ubuntu-24.04.dockerfile
new file mode 100644
index 00000000..d78c098c
--- /dev/null
+++ b/tests/ubuntu-24.04.dockerfile
@@ -0,0 +1,18 @@
+FROM ubuntu:24.04
+
+RUN apt-get update && apt-get install -y \
+    python3 \
+    python3-pip \
+    python3-venv \
+    libsecp256k1-dev \
+    && rm -rf /var/lib/apt/lists/*
+
+# Create a working virtual environment \
+RUN python3 -m venv /opt/venv
+RUN /opt/venv/bin/python -m pip install --upgrade pip hatch
+
+WORKDIR /mnt
+VOLUME /mnt
+
+# Make it easy to run the tests with the upper arrow
+RUN echo "/opt/venv/bin/hatch run testing:test" >> /root/.bash_history

From 7bdf1d0ceb591493f8d32b54336d79dfd1787ceb Mon Sep 17 00:00:00 2001
From: Hugo Herter <git@hugoherter.com>
Date: Fri, 21 Jun 2024 15:11:53 +0200
Subject: [PATCH 2/3] fixup! `git` was missing

---
 tests/ubuntu-24.04.dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/ubuntu-24.04.dockerfile b/tests/ubuntu-24.04.dockerfile
index d78c098c..f74c5c1e 100644
--- a/tests/ubuntu-24.04.dockerfile
+++ b/tests/ubuntu-24.04.dockerfile
@@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y \
     python3-pip \
     python3-venv \
     libsecp256k1-dev \
+    git \
     && rm -rf /var/lib/apt/lists/*
 
 # Create a working virtual environment \

From f03f40ebbdc52b3af7c3fe6403c1b70b81801794 Mon Sep 17 00:00:00 2001
From: Olivier Le Thanh Duong <olivier@lethanh.be>
Date: Fri, 21 Jun 2024 15:20:23 +0200
Subject: [PATCH 3/3] Update coincurve version

to see if it fix install issue
---
 pyproject.toml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index fbe94434..7ec88f35 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -25,7 +25,7 @@ dependencies = [
     "aiohttp>=3.8.3",
     "aleph-message>=0.4.8",
     "coincurve; python_version<\"3.11\"",
-    "coincurve>=19.0.0; python_version>=\"3.11\"",
+    "coincurve>=20.0.0; python_version>=\"3.11\"",
     "eth_abi>=4.0.0; python_version>=\"3.11\"",
     "eth_account>=0.4.0,<0.11.0",
     "jwcrypto==1.5.6",