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

Fix missing provider_uri #2626

Merged
merged 4 commits into from
Apr 13, 2021

Conversation

piotr-roslaniec
Copy link
Contributor

Type of PR:
Bugfix

Required reviews:
1

What this does:
Fixes ValueError: Provider URI is required to init a decentralized character. thrown on Bob() and Alice() constructors.

Copy link
Member

@cygnusv cygnusv left a comment

Choose a reason for hiding this comment

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

Good eye!
Thanks for noticing @piotr-roslaniec :D

Copy link
Contributor

@jMyles jMyles left a comment

Choose a reason for hiding this comment

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

Kickass. Two greens and two reds.

Welcome aboard.

Copy link
Member

@KPrasch KPrasch left a comment

Choose a reason for hiding this comment

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

First PR, Welcome! 👏🏻

@@ -69,7 +69,7 @@

# Then, there was bob. Bob learns about the
# rest of the network from the seednode.
bob = Bob(domain=TESTNET)
bob = Bob(domain=TESTNET, provider_uri=PROVIDER_URI)
Copy link
Member

@KPrasch KPrasch Apr 7, 2021

Choose a reason for hiding this comment

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

As a design goal, Bob can operate entirely offchain without an ethereum provider connection. If this is a required parameter, we'll need to take a deeper look and make it optional!

@@ -84,6 +84,7 @@ def __init__(self,
signer: Signer = None,
registry: BaseContractRegistry = None,
include_self_in_the_state: bool = False,
is_offchain: bool = False,
Copy link
Member

Choose a reason for hiding this comment

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

Hmm - this kwarg becomes a bit superfluous IMO since it doesn't affect any other character's construction. Alternately, I suggest relocating provider_uri into each Character subclass init.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But because Bob is the only character that works without provider_uri we still want to raise ValueError('Provider URI is required to init a decentralized character.') in the character's respective init, correct?

Copy link
Member

@KPrasch KPrasch Apr 12, 2021

Choose a reason for hiding this comment

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

Yes, I that's what I'm thinking! 👍🏻

Copy link
Member

@KPrasch KPrasch left a comment

Choose a reason for hiding this comment

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

@KPrasch KPrasch merged commit c6d0ade into nucypher:main Apr 13, 2021
@piotr-roslaniec piotr-roslaniec deleted the fix/finnegans-demo-testnet branch September 6, 2021 20:32
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.

4 participants