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

Load infura url manually #149

Merged
merged 1 commit into from
Mar 22, 2019
Merged

Conversation

njgheorghita
Copy link
Contributor

What was wrong?

#148

How was it fixed?

  • removed automatically created infura w3 instance in favor of manually generated w3 endpoint using infura token

Cute Animal Picture

image

@njgheorghita
Copy link
Contributor Author

@kclowes Let me know if this is a good solution that you had in mind. If so, i'll merge and cut a new release today

@@ -2,7 +2,8 @@
from urllib import parse

from eth_utils import to_bytes
from web3.auto.infura import w3
from web3 import Web3
from web3.providers.auto import load_provider_from_uri

from ethpm.backends.base import BaseURIBackend
from ethpm.constants import INFURA_API_KEY
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a tracking issue for this? We should probably plan to be rid of it within a month or two at the very most.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in terms of removing the INFURA_API_KEY from constants.py and requiring users to provide their own?

Copy link
Member

@pipermerriam pipermerriam Mar 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing it from constants and coming up with the mechanism that 1) doesn't require users to use infura since it effectively leaks privacy information and we shouldn't have a hard dependency on a centralized solution but 2) still preserves as much ease of usability as possible.

I recognize moving away from infura probably goes opposite of conversations you and I had about it being a fine solution, but with this stuff moving into production I think it's now time to address that particular piece of debt.

This probably really means leaving the ethpm library such that it require more manual configuration and addressing the usability component in the web3.py codebase.

@kclowes
Copy link

kclowes commented Mar 22, 2019

I think this should work @njgheorghita. Thank you!

@njgheorghita njgheorghita merged commit 7cacf78 into ethpm:master Mar 22, 2019
@njgheorghita njgheorghita deleted the remove-auto-infura branch March 22, 2019 16:40
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 this pull request may close these issues.

3 participants