Skip to main content

High-performance Rust patch for Python eth-account

Project description

Ferrite: Rust patch for eth-account

PyPI version License: MIT Python Versions Build Status

High-performance Rust patch for eth-account

Ferrite is a Python module that accelerates Ethereum cryptographic operations by replacing the core signing logic in eth-account with a Rust implementation.

Key Features

  • Blazing Fast: Up to 40x faster than the standard eth-account implementation.
  • Drop-in Replacement: Just import ferrite at the start of your application. No code refactoring is needed.
  • Zero-Overhead: The patch is applied once on import, with no performance penalty during runtime.
  • Reliable & Secure: Built on top of the same production-grade cryptographic libraries used in the wider Rust-Ethereum ecosystem.

Performance

Operation Standard (Python) Ferrite (Rust) Improvement
Sign Hash ~3.29ms ~0.11ms ~30x faster
Sign Typed Data (EIP-712) ~3.61ms ~0.14ms ~26x faster

Performance measured on a local development machine.

Installation

pip install ferrite

Quickstart

  1. Import ferrite.
  2. Run ferrite.install().

Development & Contribution

This project is built using maturin.

Prerequisites

  • Rust: Install via rustup
  • Python: Version 3.8 or higher
  • maturin: pip install maturin

Development Setup

  1. Clone the repository:

    git clone https://github.com/jhkrs/ferrite.git
    cd ferrite
    
  2. Development Installation:

    pip install -r requirements.txt
    
  3. Build:

    maturin develop
    
  4. Run Tests:

    pytest
    

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ferrite-0.2.5-cp312-abi3-win_amd64.whl (336.9 kB view details)

Uploaded CPython 3.12+Windows x86-64

ferrite-0.2.5-cp312-abi3-macosx_10_12_x86_64.whl (460.8 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

ferrite-0.2.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (554.6 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

File details

Details for the file ferrite-0.2.5-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: ferrite-0.2.5-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 336.9 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for ferrite-0.2.5-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 deab758aa9e87e501e7af2c1006430fa9bf72b435bcca8b0185e6f47538dec36
MD5 91e7e4bd302a49e7104967a80ba46946
BLAKE2b-256 8c775482d298b2e2ac73f3ec5dbe4874659aed0c6ff21832f44e7e0cce1521b9

See more details on using hashes here.

File details

Details for the file ferrite-0.2.5-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ferrite-0.2.5-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7f79d263c421abdf1ec7eef4de206974a99fd0e66ac2832357b617fe3ef6c41e
MD5 fc4ca96188f579fbae815c62225e5a04
BLAKE2b-256 14cba7654ac6f724f1ab963abebd153b9df1e4198c346b6877c83f8ed98eaed2

See more details on using hashes here.

File details

Details for the file ferrite-0.2.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ferrite-0.2.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a0e36ebaffb692c1641ebb927fa54fce2418af40587322f38384737090fd4ad6
MD5 3d3dfef20e1aeccfee70fb66139dcbda
BLAKE2b-256 1683800015c2fcc7bb0bb9b5d7dbc110007a46aed7f765e9b3fdc77637345a63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page