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

Maintain non-federated CLI #593

Merged
merged 14 commits into from
Dec 13, 2018
Merged

Maintain non-federated CLI #593

merged 14 commits into from
Dec 13, 2018

Conversation

KPrasch
Copy link
Member

@KPrasch KPrasch commented Dec 3, 2018

The recent work to build a federated network, left this code on the back-burner for a while. This PR updates reestablishes decentralisation as the primary and default operating mode.

@KPrasch KPrasch force-pushed the cli-blockchain branch 4 times, most recently from 3e221b3 to b4940ca Compare December 8, 2018 04:28
@KPrasch KPrasch changed the title [WIP] Maintain nucypher-deploy CLI [WIP] Maintain non-federated CLI Dec 8, 2018
@KPrasch KPrasch self-assigned this Dec 8, 2018
@KPrasch KPrasch added Bug 🐛 Broken functionality CLI This effects the nucypher CLI Configuration Node configuration labels Dec 8, 2018
@KPrasch KPrasch changed the title [WIP] Maintain non-federated CLI Maintain non-federated CLI Dec 10, 2018
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.

Looking pretty decent! I think I need to actually run it to see how things look; it's hard to assess how some of the strings are formatted without seeing the result in a terminal.

For now, just a few small changes needed.

nucypher/blockchain/eth/actors.py Show resolved Hide resolved
def __repr__(self):
r = '{name}({blockchain}, {deployer_address})'.format(name=self.__class__.__name__,
blockchain=self.blockchain,
deployer_address=self.deployer_address)
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this will raise if deployer_address is not set - and, unless I'm reading incorrectly - it's not guaranteed to be.

Copy link
Member Author

@KPrasch KPrasch Dec 13, 2018

Choose a reason for hiding this comment

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

There is a CS constant used as the default value of deployer_address: NO_DEPLOYER_ADDRESS - but it looks like there is a bit of an Issue since there is a reference to deployer_address both here on this object (Deployer) and also on BlockchainInterface, which may be different values.

nucypher/blockchain/eth/interfaces.py Show resolved Hide resolved
nucypher/cli/deploy.py Outdated Show resolved Hide resolved
nucypher/cli/main.py Show resolved Hide resolved
nucypher/config/node.py Outdated Show resolved Hide resolved
nucypher/config/node.py Outdated Show resolved Hide resolved
tests/network/test_node_storage.py Show resolved Hide resolved
nucypher/cli/deploy.py Outdated Show resolved Hide resolved
michwill
michwill previously approved these changes Dec 12, 2018
Copy link
Contributor

@michwill michwill left a comment

Choose a reason for hiding this comment

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

Looks pretty good

jMyles
jMyles previously approved these changes Dec 13, 2018
nucypher/cli/deploy.py Outdated Show resolved Hide resolved
nucypher/utilities/sandbox/constants.py Show resolved Hide resolved
Co-Authored-By: KPrasch <kieranprasch@gmail.com>
@KPrasch KPrasch dismissed stale reviews from jMyles via 854dcf1 December 13, 2018 20:53
tuxxy
tuxxy previously approved these changes Dec 13, 2018
Copy link
Contributor

@tuxxy tuxxy left a comment

Choose a reason for hiding this comment

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

🐧

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.

Just some minor comments and it's good to go.

@@ -2,6 +2,7 @@
__pycache__
*.pyc
/.venv
.eggs
Copy link
Member

Choose a reason for hiding this comment

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

Cool, we have green eggs. We just need some ham now.

Copy link
Member Author

Choose a reason for hiding this comment

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

✔️

nucypher/cli/deploy.py Show resolved Hide resolved
nucypher/cli/deploy.py Outdated Show resolved Hide resolved
@@ -89,7 +89,7 @@ def __generate_insecure_unlocked_accounts(self, quantity: int) -> List[str]:

umbral_priv_key = UmbralPrivateKey.gen_key()
address = self.interface.w3.personal.importRawKey(private_key=umbral_priv_key.to_bytes(),
password=insecure_password)
passphrase=insecure_password)
Copy link
Member

Choose a reason for hiding this comment

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

Not related to this PR, but do we still consider "passphrase" in Sentry scrubbers?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

@@ -19,7 +19,7 @@

import maya
import pytest
import pytest_twisted
import pytest_twisted as pt
Copy link
Member

Choose a reason for hiding this comment

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

Just curious...why?

Copy link
Member Author

Choose a reason for hiding this comment

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

https://pypi.org/project/pytest-twisted/

Beware that in situations such as a conftest.py file that the name pytest_twisted may be undesirably detected by pytest as an unknown hook. One alternative is to import pytest_twisted as pt.

Co-Authored-By: KPrasch <kieranprasch@gmail.com>
@KPrasch KPrasch merged commit 3a6f474 into nucypher:master Dec 13, 2018
@KPrasch KPrasch deleted the cli-blockchain branch July 21, 2020 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Broken functionality CLI This effects the nucypher CLI Configuration Node configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants