Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to turn off ABI validation #3536

Open
kclowes opened this issue Nov 22, 2024 · 1 comment · May be fixed by #3538
Open

Add flag to turn off ABI validation #3536

kclowes opened this issue Nov 22, 2024 · 1 comment · May be fixed by #3538

Comments

@kclowes
Copy link
Collaborator

kclowes commented Nov 22, 2024

What feature should we add?

ABI Validation here: https://github.com/ethereum/web3.py/blob/main/web3/utils/abi.py#L605 takes a long time (90s) for lots (~800) of contracts that get loaded in up front. See conversation in the Discord that starts here It would be nice to be able to turn that off for advanced use cases. One API proposed is something like w3.eth.contract(address=addr, abi=abi, validate_abi=False). Extra credit for beefing up benchmarking at the same time.

@alb2001
Copy link

alb2001 commented Nov 22, 2024

On doing the same operation, 7.5.0 is faster. In my example:

7.5.0: 4.154691696166992 seconds

7.6.0: 48.58938956260681 seconds
7.6.0 with validate_abi commented out: 7.506614685058594 seconds

7.5.0 is pretty much faster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants