ApeWorX / ApeWorX/web3.py

Slow validation function blocking asyncio

Open
#2,928 1 comment 0 reactions 0 assignees View on GitHub
priority: p3 nice to have
Dominant language
Python
Stars
5.5k
Forks
1.7k
Avg merge
3d 10h
Merged PRs (30d)
2

Description

* Version: 6.2.0
* Python: 3.10

### What was wrong?

After profiling my asyncio application, 2.5% of the event loop blocking is coming from the `validate_address` function in web3py:
https://github.com/ethereum/web3.py/blob/v6.2.0/web3/_utils/validation.py#L160

Inside this function, `is_checksum_address()` is the slowest call.

### How can it be fixed?

Can the library provide flags to enable/disable expensive validation methods like this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.