Skip to content

Commit

Permalink
Upgrading Python to version 3.12 (#184)
Browse files Browse the repository at this point in the history
- Updated docker images to use a Debian Bookworm based Python 3.12 base image
- Updated hidapi repository reference to a version compatible with the later Cython
- Updated Python libraries
- Unified dependencies in requirements.txt (except for hidapi)
- Added one-round keccak256 wrapper that uses pycryptodome, and corresponding unit tests
- Replaced uses of pysha3 with new keccak256 wrapper
- Removed pysha3 from Python libraries
- Fixed existing unit tests
- Replaced TCPSigner use of deprecated secp256k1_ec_privkey_tweak_add with the newer secp256k1_ec_seckey_tweak_add
- Fixed new Python linting findings
- Updated integration tests tag
  • Loading branch information
amendelzon authored Jun 27, 2024
1 parent 6b191e5 commit 3d93933
Show file tree
Hide file tree
Showing 21 changed files with 2,065 additions and 508 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: rootstock/hsm-integration-test
ref: 5.0.0.plus
ref: 5.1.0.plus
path: hsm-integration-test
ssh-key: ${{ secrets.HSM_INTEGRATION_TEST_SSH_KEY }}

Expand Down
2 changes: 1 addition & 1 deletion dist/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM debian:bookworm-slim

RUN apt-get update && \
apt-get install -y gnupg2
22 changes: 8 additions & 14 deletions docker/mware/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
FROM python:3.7.16-slim-bullseye
FROM python:3.12-slim-bookworm

WORKDIR /hsm2

RUN apt-get update && \
apt-get install -y apt-utils vim && \
apt-get install -y apt-utils vim procps && \
apt-get install -y build-essential=12.9 && \
apt-get install -y git && \
apt-get install -y lcov

# Python package prerequisites
RUN apt-get install -y \
libsecp256k1-dev=0.1~20210108-1 \
python3-pkgconfig=1.5.1-3 \
libusb-1.0-0-dev=2:1.0.24-3 \
libudev-dev=247.3-7+deb11u4 \
libffi-dev=3.3-6 #\
libjpeg-dev=1:2.0.6-4

COPY requirements-pre.txt /hsm2/requirements-pre.txt
RUN pip install -r requirements-pre.txt --require-hashes
RUN rm -f requirements-pre.txt
libsecp256k1-dev=0.2.0-2 \
libudev-dev=252.22-1~deb12u1 \
libusb-1.0-0-dev=2:1.0.26-1 \
libffi-dev=3.4.4-1 \
libjpeg-dev=1:2.1.5-2

COPY requirements.txt /hsm2/requirements.txt
RUN pip install -r requirements.txt --require-hashes
RUN rm -f requirements.txt

# Hidapi wrapper with hid_exit support
RUN pip install git+https://github.com/rsksmart/[email protected]

RUN pip install --use-pep517 git+https://github.com/rsksmart/[email protected]
42 changes: 0 additions & 42 deletions docker/mware/requirements-pre.txt

This file was deleted.

Loading

0 comments on commit 3d93933

Please sign in to comment.