From 6c716dbde04744cfd76dba285de0b38b7e65dc66 Mon Sep 17 00:00:00 2001 From: Arjan Zijderveld <5286904+arjanz@users.noreply.github.com> Date: Mon, 18 Nov 2024 12:49:17 +0100 Subject: [PATCH] Updated Github action CI Upgraded schnorrkel version Upgraded Maturin version --- .github/workflows/CI.yml | 208 +++++++++++++++++++++++++ .github/workflows/build.yml | 181 ---------------------- .github/workflows/pypi.yml | 202 ------------------------- .github/workflows/test.yml | 45 ------ Cargo.lock | 293 ++++++++++++++++++++++++------------ Cargo.toml | 6 +- pyproject.toml | 2 +- requirements.txt | 2 +- 8 files changed, 409 insertions(+), 530 deletions(-) create mode 100644 .github/workflows/CI.yml delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/pypi.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..377eab9 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,208 @@ +# This file is autogenerated by maturin v1.7.4 +# To update, run +# +# maturin generate-ci github +# +name: CI + +on: + push: + branches: + - main + tags: + - '*' + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + name: Run Unit Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Build wheel + uses: PyO3/maturin-action@v1 + with: + command: build + args: -o dist -i python3.12 + - name: Install wheel + run: | + pip install dist/*.whl + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run tests + run: | + pip install pytest + pytest tests.py + linux: + runs-on: ${{ matrix.platform.runner }} + needs: test + strategy: + matrix: + platform: + - runner: ubuntu-latest + target: x86_64 + - runner: ubuntu-latest + target: x86 + - runner: ubuntu-latest + target: aarch64 + - runner: ubuntu-latest + target: armv7 + - runner: ubuntu-latest + target: ppc64le + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-linux-${{ matrix.platform.target }} + path: dist + + musllinux: + runs-on: ${{ matrix.platform.runner }} + needs: test + strategy: + matrix: + platform: + - runner: ubuntu-latest + target: x86_64 + - runner: ubuntu-latest + target: x86 + - runner: ubuntu-latest + target: aarch64 + - runner: ubuntu-latest + target: armv7 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + manylinux: musllinux_1_2 + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-musllinux-${{ matrix.platform.target }} + path: dist + + windows: + runs-on: ${{ matrix.platform.runner }} + needs: test + strategy: + matrix: + platform: + - runner: windows-latest + target: x64 + - runner: windows-latest + target: x86 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + architecture: ${{ matrix.platform.target }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-windows-${{ matrix.platform.target }} + path: dist + + macos: + runs-on: ${{ matrix.platform.runner }} + needs: test + strategy: + matrix: + platform: + - runner: macos-14 + target: x86_64 + - runner: macos-14 + target: aarch64 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: wheels-macos-${{ matrix.platform.target }} + path: dist + + sdist: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist + - name: Upload sdist + uses: actions/upload-artifact@v4 + with: + name: wheels-sdist + path: dist + + release: + name: Release + runs-on: ubuntu-latest + if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} + needs: [linux, musllinux, windows, macos, sdist] + permissions: + # Use to sign the release artifacts + id-token: write + # Used to upload release artifacts + contents: write + # Used to generate artifact attestation + attestations: write + steps: + - uses: actions/download-artifact@v4 + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-path: 'wheels-*/*' + - name: Publish to PyPI + if: "startsWith(github.ref, 'refs/tags/')" + uses: PyO3/maturin-action@v1 + env: + MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + with: + command: upload + args: --non-interactive --skip-existing wheels-*/* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index e4493ef..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,181 +0,0 @@ -name: Build wheels - -on: - push: - branches: - - master - -jobs: - macos: - runs-on: macos-latest - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-02-04 - target: aarch64-apple-darwin - profile: minimal - default: true - - name: Build wheels - universal2 - if: ${{ matrix.python-version != '3.7' }} - uses: messense/maturin-action@v1 - with: - args: -i python --release --universal2 --out dist - rust-toolchain: nightly-2024-02-04 - - name: Install built wheel - universal2 - if: ${{ matrix.python-version != '3.7' }} - run: | - pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-mac-${{ matrix.python-version }} - path: dist/*.whl - windows: - runs-on: windows-latest - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - target: [x64, x86] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.target }} - - name: Update rustup - run: rustup self update - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-02-04 - profile: minimal - default: true - - name: Build - if: matrix.target == 'x64' - run: cargo build --release - - name: Build wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: -i python --release --out dist - rust-toolchain: nightly-2024-02-04 - - name: Install built wheel - run: | - pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-win-${{ matrix.target }}-${{ matrix.python-version }} - path: dist/*.whl - - linux: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - target: [x86_64, i686] - steps: - - uses: actions/checkout@v4 - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-02-04 - profile: minimal - default: true - - name: Build - run: cargo build --release - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Build Wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - rust-toolchain: nightly-2024-02-04 - manylinux: auto - args: -i python${{ matrix.python-version }} --release --out dist - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-linux-${{ matrix.target }}-${{ matrix.python-version }} - path: dist/*.whl - - muslwheels_x86: - name: Build musllinux wheels for x86 - runs-on: ubuntu-latest - - env: - CIBW_BUILD_VERBOSITY: 1 - CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-04 -y" - CIBW_ARCHS_LINUX: "auto64" - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_BUILD: "*-musllinux_x86_64" - CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*" - - steps: - - uses: actions/checkout@v4 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.17.0 - with: - output-dir: dist - - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-musl - path: dist/*.whl - - aarch64_wheels: - name: Build wheels for aarch64 linux - runs-on: ubuntu-latest - - env: - CIBW_BUILD_VERBOSITY: 1 - CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-04 -y" - CIBW_ARCHS_LINUX: "aarch64" - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_BUILD: "*-musllinux_aarch64 *-manylinux_aarch64" - CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*" - - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.17.0 - with: - output-dir: dist - - - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-aarch64 - path: dist/*.whl - - build_sdist: - name: Build source distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Build sdist - run: pipx run build --sdist - - - uses: actions/upload-artifact@v4 - with: - name: dist-src - path: dist/*.tar.gz diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml deleted file mode 100644 index 02c4600..0000000 --- a/.github/workflows/pypi.yml +++ /dev/null @@ -1,202 +0,0 @@ -name: Deploy to PyPI - -on: - release: - types: [ created ] - -jobs: - macos: - runs-on: macos-latest - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-02-04 - target: aarch64-apple-darwin - profile: minimal - default: true - - name: Build wheels - universal2 - if: ${{ matrix.python-version != '3.7' }} - uses: messense/maturin-action@v1 - with: - args: -i python --release --universal2 --out dist - rust-toolchain: nightly-2024-02-04 - - name: Install built wheel - universal2 - if: ${{ matrix.python-version != '3.7' }} - run: | - pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-mac-${{ matrix.python-version }} - path: dist/*.whl - windows: - runs-on: windows-latest - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - target: [x64, x86] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.target }} - - name: Update rustup - run: rustup self update - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-02-04 - profile: minimal - default: true - - name: Build - if: matrix.target == 'x64' - run: cargo build --release - - name: Build wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: -i python --release --out dist - rust-toolchain: nightly-2024-02-04 - - name: Install built wheel - run: | - pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-win-${{ matrix.target }}-${{ matrix.python-version }} - path: dist/*.whl - - linux: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] - target: [x86_64, i686] - steps: - - uses: actions/checkout@v4 - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2024-02-04 - profile: minimal - default: true - - name: Build - run: cargo build --release - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Build Wheels - uses: messense/maturin-action@v1 - with: - target: ${{ matrix.target }} - rust-toolchain: nightly-2024-02-04 - manylinux: auto - args: -i python${{ matrix.python-version }} --release --out dist - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-linux-${{ matrix.target }}-${{ matrix.python-version }} - path: dist/*.whl - - muslwheels_x86: - name: Build musllinux wheels for x86 - runs-on: ubuntu-latest - - env: - CIBW_BUILD_VERBOSITY: 1 - CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-04 -y" - CIBW_ARCHS_LINUX: "auto64" - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_BUILD: "*-musllinux_x86_64" - CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*" - - steps: - - uses: actions/checkout@v4 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.17.0 - with: - output-dir: dist - - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-musl - path: dist/*.whl - - aarch64_wheels: - name: Build wheels for aarch64 linux - runs-on: ubuntu-latest - - env: - CIBW_BUILD_VERBOSITY: 1 - CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-04 -y" - CIBW_ARCHS_LINUX: "aarch64" - CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_BUILD: "*-musllinux_aarch64 *-manylinux_aarch64" - CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*" - - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - name: Build wheels - uses: pypa/cibuildwheel@v2.17.0 - with: - output-dir: dist - - - - name: Upload wheels - uses: actions/upload-artifact@v4 - with: - name: dist-wheels-aarch64 - path: dist/*.whl - - build_sdist: - name: Build source distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Build sdist - run: pipx run build --sdist - - - uses: actions/upload-artifact@v4 - with: - name: dist-src - path: dist/*.tar.gz - - release: - name: Release - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - needs: [macos, windows, linux, muslwheels_x86, build_sdist] - steps: - - uses: actions/download-artifact@v4 - with: - pattern: dist-* - path: dist - merge-multiple: true - - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Publish to PyPi - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - pip install --upgrade twine - twine upload --skip-existing dist/* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d7e34a8..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Run units tests - -on: - push: - branches: - - master - - develop - pull_request: - -jobs: - test: - name: Test - strategy: - fail-fast: false - matrix: - os: [ ubuntu-latest, macos-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install cffi and virtualenv - run: pip install cffi virtualenv - - name: Install RUST toolchain - uses: actions-rs/toolchain@v1 - id: rustup - with: - profile: minimal - toolchain: nightly - override: true - - name: Build bindings - run: | - pip install maturin - maturin build -i python3.8 - - name: Install requirements - run: | - pip install -r requirements.txt - - name: Install bindings - run: | - pip install target/wheels/*.whl - - name: Test with pytest - run: | - pip install pytest - pytest tests.py diff --git a/Cargo.lock b/Cargo.lock index 7f94a02..ba22754 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,24 +1,34 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -28,18 +38,18 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" -version = "0.9.0" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cfg-if" @@ -49,40 +59,72 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" dependencies = [ "libc", ] [[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "byteorder", - "digest", + "generic-array", "rand_core", - "subtle-ng", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" -version = "0.9.0" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "generic-array", + "block-buffer", + "crypto-common", ] +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -90,15 +132,25 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", "wasi", ] +[[package]] +name = "getrandom_or_panic" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" +dependencies = [ + "rand", + "rand_core", +] + [[package]] name = "heck" version = "0.4.1" @@ -107,9 +159,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "indoc" @@ -119,15 +171,18 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] [[package]] name = "libc" -version = "0.2.137" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "lock_api" @@ -162,15 +217,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" - -[[package]] -name = "opaque-debug" -version = "0.3.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "parking_lot" @@ -201,6 +250,15 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + [[package]] name = "proc-macro2" version = "1.0.89" @@ -212,7 +270,7 @@ dependencies = [ [[package]] name = "py-sr25519-bindings" -version = "0.2.0" +version = "0.2.1" dependencies = [ "hex-literal", "pyo3", @@ -266,7 +324,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -279,7 +337,7 @@ dependencies = [ "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.87", + "syn", ] [[package]] @@ -291,6 +349,27 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + [[package]] name = "rand_core" version = "0.6.4" @@ -309,20 +388,31 @@ dependencies = [ "bitflags", ] +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "schnorrkel" -version = "0.10.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ + "aead", "arrayref", "arrayvec", - "curve25519-dalek-ng", + "curve25519-dalek", + "getrandom_or_panic", "merlin", "rand_core", "serde_bytes", "sha2", - "subtle-ng", + "subtle", "zeroize", ] @@ -332,32 +422,50 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + [[package]] name = "serde" -version = "1.0.147" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +dependencies = [ + "serde_derive", +] [[package]] name = "serde_bytes" -version = "0.11.7" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] +[[package]] +name = "serde_derive" +version = "1.0.215" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sha2" -version = "0.9.9" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "block-buffer", "cfg-if", "cpufeatures", "digest", - "opaque-debug", ] [[package]] @@ -367,21 +475,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] -name = "subtle-ng" -version = "2.5.0" +name = "subtle" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" - -[[package]] -name = "syn" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -394,18 +491,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.82", - "unicode-xid", -] - [[package]] name = "target-lexicon" version = "0.12.16" @@ -414,9 +499,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "typenum" -version = "1.14.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" @@ -424,12 +509,6 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - [[package]] name = "unindent" version = "0.2.3" @@ -438,9 +517,9 @@ checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -512,23 +591,43 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zeroize" -version = "1.4.3" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.2.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.82", - "synstructure", + "syn", ] diff --git a/Cargo.toml b/Cargo.toml index ac2c122..f540c5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,15 +10,15 @@ readme = "README.md" edition = "2018" [dependencies] -schnorrkel = "0.10.2" +schnorrkel = "0.11.4" [dev-dependencies] -hex-literal = "0.3.4" +hex-literal = "0.4.1" [lib] name = "sr25519" crate-type = ["cdylib"] [dependencies.pyo3] -version = "0.20.0" +version = "0.20.3" features = ["extension-module"] diff --git a/pyproject.toml b/pyproject.toml index 09cfaa3..a120ce1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin>=0.14,<0.15"] +requires = ["maturin>=1.7.0,<1.8.0"] build-backend = "maturin" [project] diff --git a/requirements.txt b/requirements.txt index 5c87ea3..f359ad7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Rust->Python build process -maturin>=0.14,<0.15 +maturin~=1.7 toml # Dev-only bumpversion