ethereum / ethereum/py_ecc

[EXPERIMENT] Fields as subclass of int

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
231
Forks
88
PR merge metrics
No merged PRs in 30d

Description

### What is wrong?

Currently, the `FQ` and `FQP` fields have a lot of `isinstance` checks. This can be eradicated by making the classes subclasses of `int`.

Reference Comment - https://github.com/ethereum/py_ecc/pull/41#discussion_r262129838

### How can it be fixed

Fill this in if you know how to fix it.

Contributor guide

Open the contributing guide

Research direction

Start by locating the FQ and FQP class definitions and the isinstance checks they currently require. Read the linked pull-request discussion for the proposed direction; done means the classes can subclass int and the unnecessary checks are removed without breaking the existing curve operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cryptography
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.