mirror of https://github.com/nucypher/nucypher.git
Shortens CLI flag names to --provider and --teacher.
parent
d1c5ecba25
commit
2dd3e92868
|
@ -4,7 +4,7 @@ Description="Run 'Moe', A NuCypher Network Monitor."
|
|||
[Service]
|
||||
User=ubuntu
|
||||
Type=simple
|
||||
ExecStart={{ virtualenv_path }}/bin/nucypher moe --network {{ nucypher_network_domain }} --teacher-uri {{ teacher_uri }}
|
||||
ExecStart={{ virtualenv_path }}/bin/nucypher moe --network {{ nucypher_network_domain }} --teacher {{ teacher_uri }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -5,7 +5,7 @@ Description="Run 'Ursula', A NuCypher Staking Node."
|
|||
User=ubuntu
|
||||
Type=simple
|
||||
Environment="NUCYPHER_KEYRING_PASSWORD={{ursula_password.stdout}}"
|
||||
ExecStart={{ virtualenv_path }}/bin/nucypher --debug ursula run --network {{ nucypher_network_domain }} --federated-only --teacher-uri {{ seed_node_metadata.checksum_address }}@https://{{ seed_node_metadata.rest_host }}:{{seed_node_metadata.rest_port}}
|
||||
ExecStart={{ virtualenv_path }}/bin/nucypher --debug ursula run --network {{ nucypher_network_domain }} --federated-only --teacher {{ seed_node_metadata.checksum_address }}@https://{{ seed_node_metadata.rest_host }}:{{seed_node_metadata.rest_port}}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -38,7 +38,7 @@ services:
|
|||
image: dev:nucypher
|
||||
depends_on:
|
||||
- ursula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.2 --rest-port 11500 --teacher-uri 172.28.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.2 --rest-port 11500 --teacher 172.28.1.1:11500
|
||||
networks:
|
||||
nucypher_net:
|
||||
ipv4_address: 172.28.1.2
|
||||
|
@ -51,7 +51,7 @@ services:
|
|||
image: dev:nucypher
|
||||
depends_on:
|
||||
- ursula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.3 --rest-port 11500 --teacher-uri 172.28.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.3 --rest-port 11500 --teacher 172.28.1.1:11500
|
||||
networks:
|
||||
nucypher_net:
|
||||
ipv4_address: 172.28.1.3
|
||||
|
@ -64,7 +64,7 @@ services:
|
|||
image: dev:nucypher
|
||||
depends_on:
|
||||
- ursula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.4 --rest-port 11500 --teacher-uri 172.28.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.4 --rest-port 11500 --teacher 172.28.1.1:11500
|
||||
networks:
|
||||
nucypher_net:
|
||||
ipv4_address: 172.28.1.4
|
||||
|
@ -77,7 +77,7 @@ services:
|
|||
image: dev:nucypher
|
||||
depends_on:
|
||||
- ursula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.5 --rest-port 11500 --teacher-uri 172.28.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.5 --rest-port 11500 --teacher 172.28.1.1:11500
|
||||
networks:
|
||||
nucypher_net:
|
||||
ipv4_address: 172.28.1.5
|
||||
|
@ -90,7 +90,7 @@ services:
|
|||
image: dev:nucypher
|
||||
depends_on:
|
||||
- ursula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.6 --rest-port 11500 --teacher-uri 172.28.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.6 --rest-port 11500 --teacher 172.28.1.1:11500
|
||||
networks:
|
||||
nucypher_net:
|
||||
ipv4_address: 172.28.1.6
|
||||
|
@ -103,7 +103,7 @@ services:
|
|||
image: dev:nucypher
|
||||
depends_on:
|
||||
- ursula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.7 --rest-port 11500 --teacher-uri 172.28.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.7 --rest-port 11500 --teacher 172.28.1.1:11500
|
||||
networks:
|
||||
nucypher_net:
|
||||
ipv4_address: 172.28.1.7
|
||||
|
@ -116,7 +116,7 @@ services:
|
|||
image: dev:nucypher
|
||||
depends_on:
|
||||
- ursula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.8 --rest-port 11500 --teacher-uri 172.28.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.28.1.8 --rest-port 11500 --teacher 172.28.1.1:11500
|
||||
networks:
|
||||
nucypher_net:
|
||||
ipv4_address: 172.28.1.8
|
||||
|
|
|
@ -83,7 +83,7 @@ Here is an example of connecting to a node in the local development fleet:
|
|||
|
||||
.. code::
|
||||
|
||||
nucypher ursula run --dev --teacher-uri localhost:11501
|
||||
nucypher ursula run --dev --teacher localhost:11501
|
||||
|
||||
|
||||
.. note::
|
||||
|
|
|
@ -17,7 +17,7 @@ to deploy a single-host network with the geth CLI.
|
|||
|
||||
.. code:: bash
|
||||
|
||||
(nucypher)$ nucypher-deploy contracts --provider-uri ipc:///tmp/geth.ipc --poa
|
||||
(nucypher)$ nucypher-deploy contracts --provider ipc:///tmp/geth.ipc --poa
|
||||
...
|
||||
|
||||
This will deploy the main NuCypher contracts, namely ``NuCypherToken``, ``MinerEscrow``, and ``PolicyManager``,
|
||||
|
|
|
@ -150,7 +150,7 @@ NuCypher is maintaining a purpose-built endpoint to initially connect to the tes
|
|||
|
||||
.. code:: bash
|
||||
|
||||
$(nucypher) nucypher ursula run --network <NETWORK_DOMAIN> --teacher-uri <SEEDNODE_URI>
|
||||
$(nucypher) nucypher ursula run --network <NETWORK_DOMAIN> --teacher <SEEDNODE_URI>
|
||||
...
|
||||
|
||||
2. Verify Connection
|
||||
|
@ -211,7 +211,7 @@ Use this template to create a file named ``ursula.service`` and place it in ``/e
|
|||
User=<YOUR USER>
|
||||
Type=simple
|
||||
Environment="NUCYPHER_KEYRING_PASSWORD=<YOUR PASSWORD>"
|
||||
ExecStart=<VIRTUALENV PATH>/bin/nucypher ursula run --network <NETWORK_DOMAIN> --teacher-uri <SEEDNODE_URI>
|
||||
ExecStart=<VIRTUALENV PATH>/bin/nucypher ursula run --network <NETWORK_DOMAIN> --teacher <SEEDNODE_URI>
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -173,7 +173,7 @@ $ ./scripts/installation/install_solc.sh
|
|||
User=<YOUR USER>
|
||||
Type=simple
|
||||
Environment="NUCYPHER_KEYRING_PASSWORD=<YOUR PASSWORD>"
|
||||
ExecStart=<VIRTUALENV PATH>/bin/nucypher ursula run --teacher-uri <SEEDNODE_URI>
|
||||
ExecStart=<VIRTUALENV PATH>/bin/nucypher ursula run --teacher <SEEDNODE_URI>
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -23,13 +23,13 @@ $ nucypher ursula init --federated-only
|
|||
### Run a Persistent Ursula
|
||||
|
||||
```bash
|
||||
$ nucypher ursula run --network <NETWORK_DOMAIN> --teacher-uri <SEEDNODE_URI> --federated-only
|
||||
$ nucypher ursula run --network <NETWORK_DOMAIN> --teacher <SEEDNODE_URI> --federated-only
|
||||
```
|
||||
|
||||
Replace `<NETWORK_DOMAIN>` with the network domain and `<SEEDNODE_URI>` with the URI of a node running on that network
|
||||
domain you want to connect to (for example `0.0.0.0:9151` or `0xdeadbeef@0.0.0.0:9151`).
|
||||
|
||||
If you're connecting to the `devnet`, you should use `--network devnet --teacher-uri 18.222.119.242:9151`.
|
||||
If you're connecting to the `devnet`, you should use `--network devnet --teacher 18.222.119.242:9151`.
|
||||
|
||||
### Run a Geth-Connected Development Ursula
|
||||
|
||||
|
@ -42,7 +42,7 @@ $ geth --dev
|
|||
Run a local development Ursula connected to the geth node
|
||||
|
||||
```bash
|
||||
$ nucypher ursula run --dev --provider-uri ipc:///tmp/geth.ipc --checksum-address <GETH_DEV_ADDRESS>
|
||||
$ nucypher ursula run --dev --provider ipc:///tmp/geth.ipc --checksum-address <GETH_DEV_ADDRESS>
|
||||
```
|
||||
|
||||
Replace `<GETH_DEV_ADDRESS>` with the geth node's public checksum address.
|
||||
|
|
|
@ -27,7 +27,7 @@ If your installation in non-functional, be sure you have the latest version inst
|
|||
|
||||
.. code:: bash
|
||||
|
||||
(nucypher)$ nucypher ursula init --provider-uri <YOUR PROVIDER URI> --network <NETWORK NAME>
|
||||
(nucypher)$ nucypher ursula init --provider <YOUR PROVIDER URI> --network <NETWORK NAME>
|
||||
|
||||
Replace ``<YOUR PROVIDER URI>`` with a valid node web3 node provider string, for example:
|
||||
|
||||
|
@ -69,7 +69,7 @@ Replace ``<YOUR PROVIDER URI>`` with a valid node web3 node provider string, for
|
|||
|
||||
.. code:: bash
|
||||
|
||||
(nucypher)$ nucypher ursula run --teacher-uri <SEEDNODE_URI>
|
||||
(nucypher)$ nucypher ursula run --teacher <SEEDNODE_URI>
|
||||
|
||||
|
||||
6. Verify Node Connection
|
||||
|
|
|
@ -17,7 +17,7 @@ from nucypher.crypto.powers import TransactingPower
|
|||
@click.option('--dev', '-d', help="Enable development mode", is_flag=True)
|
||||
@click.option('--force', help="Don't ask for confirmation", is_flag=True)
|
||||
@click.option('--dry-run', '-x', help="Execute normally without actually starting the node", is_flag=True)
|
||||
@click.option('--teacher-uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--teacher', 'teacher_uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--min-stake', help="The minimum stake the teacher must have to be a teacher", type=click.INT, default=0)
|
||||
@click.option('--discovery-port', help="The host port to run node discovery services on", type=NETWORK_PORT)
|
||||
@click.option('--controller-port', help="The host port to run Alice HTTP services on", type=NETWORK_PORT)
|
||||
|
@ -25,7 +25,7 @@ from nucypher.crypto.powers import TransactingPower
|
|||
@click.option('--network', help="Network Domain Name", type=click.STRING)
|
||||
@click.option('--config-root', help="Custom configuration directory", type=click.Path())
|
||||
@click.option('--config-file', help="Path to configuration file", type=EXISTING_READABLE_FILE)
|
||||
@click.option('--provider-uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--provider', 'provider_uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--sync/--no-sync', default=True)
|
||||
@click.option('--hw-wallet/--no-hw-wallet', default=False)
|
||||
@click.option('--geth', '-G', help="Run using the built-in geth node", is_flag=True)
|
||||
|
@ -117,6 +117,10 @@ def alice(click_config,
|
|||
if dev:
|
||||
raise click.BadArgumentUsage("Cannot create a persistent development character")
|
||||
|
||||
if not provider_uri and not federated_only:
|
||||
raise click.BadOptionUsage(option_name='--provider',
|
||||
message="--provider is required to create a new decentralized alice.")
|
||||
|
||||
if not config_root: # Flag
|
||||
config_root = click_config.config_file # Envvar
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ from nucypher.crypto.powers import DecryptingPower
|
|||
|
||||
@click.command()
|
||||
@click.argument('action')
|
||||
@click.option('--pay-with', help="Run with a specified account", type=EIP55_CHECKSUM_ADDRESS)
|
||||
@click.option('--teacher-uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--checksum-address', help="Run with a specified account", type=EIP55_CHECKSUM_ADDRESS)
|
||||
@click.option('--teacher', 'teacher_uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--min-stake', help="The minimum stake the teacher must have to be a teacher", type=click.INT, default=0)
|
||||
@click.option('--discovery-port', help="The host port to run node discovery services on", type=NETWORK_PORT)
|
||||
@click.option('--http-port', help="The host port to run Moe HTTP services on", type=NETWORK_PORT)
|
||||
|
@ -21,7 +21,8 @@ from nucypher.crypto.powers import DecryptingPower
|
|||
@click.option('--network', help="Network Domain Name", type=click.STRING)
|
||||
@click.option('--config-root', help="Custom configuration directory", type=click.Path())
|
||||
@click.option('--config-file', help="Path to configuration file", type=EXISTING_READABLE_FILE)
|
||||
@click.option('--provider-uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--poa', help="Inject POA middleware", is_flag=True, default=None)
|
||||
@click.option('--provider', 'provider_uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--registry-filepath', help="Custom contract registry filepath", type=EXISTING_READABLE_FILE)
|
||||
@click.option('--label', help="The label for a policy", type=click.STRING)
|
||||
@click.option('--dev', '-d', help="Enable development mode", is_flag=True)
|
||||
|
@ -35,24 +36,25 @@ def bob(click_config,
|
|||
action,
|
||||
teacher_uri,
|
||||
min_stake,
|
||||
http_port,
|
||||
controller_port,
|
||||
discovery_port,
|
||||
federated_only,
|
||||
network,
|
||||
config_root,
|
||||
config_file,
|
||||
pay_with,
|
||||
checksum_address ,
|
||||
provider_uri,
|
||||
registry_filepath,
|
||||
dev,
|
||||
force,
|
||||
poa,
|
||||
dry_run,
|
||||
label,
|
||||
policy_encrypting_key,
|
||||
alice_verifying_key,
|
||||
message_kit):
|
||||
"""
|
||||
Start and manage a "Bob" character.
|
||||
"Bob" management commands.
|
||||
"""
|
||||
|
||||
#
|
||||
|
@ -103,7 +105,7 @@ def bob(click_config,
|
|||
domains={network},
|
||||
provider_uri=provider_uri,
|
||||
federated_only=True,
|
||||
checksum_address=pay_with,
|
||||
checksum_address=checksum_address ,
|
||||
network_middleware=click_config.middleware)
|
||||
else:
|
||||
|
||||
|
@ -111,7 +113,7 @@ def bob(click_config,
|
|||
bob_config = BobConfiguration.from_configuration_file(
|
||||
filepath=config_file,
|
||||
domains={network} if network else None,
|
||||
checksum_address=pay_with,
|
||||
checksum_address=checksum_address ,
|
||||
rest_port=discovery_port,
|
||||
provider_uri=provider_uri,
|
||||
network_middleware=click_config.middleware)
|
||||
|
|
|
@ -14,7 +14,7 @@ from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
|||
|
||||
@click.command()
|
||||
@click.argument('action')
|
||||
@click.option('--teacher-uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--teacher', 'teacher_uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--enode', help="An ethereum bootnode enode address to start learning from", type=click.STRING)
|
||||
@click.option('--min-stake', help="The minimum stake the teacher must have to be a teacher", type=click.INT, default=0)
|
||||
@click.option('--network', help="Network Domain Name", type=click.STRING)
|
||||
|
@ -22,7 +22,7 @@ from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
|||
@click.option('--port', help="The host port to run Felix HTTP services on", type=NETWORK_PORT, default=FelixConfiguration.DEFAULT_REST_PORT)
|
||||
@click.option('--discovery-port', help="The host port to run Felix Node Discovery services on", type=NETWORK_PORT, default=FelixConfiguration.DEFAULT_LEARNER_PORT)
|
||||
@click.option('--dry-run', '-x', help="Execute normally without actually starting the node", is_flag=True, default=False)
|
||||
@click.option('--provider-uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--provider', 'provider_uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--geth', '-G', help="Run using the built-in geth node", is_flag=True)
|
||||
@click.option('--config-root', help="Custom configuration directory", type=click.Path())
|
||||
@click.option('--checksum-address', help="Run with a specified account", type=EIP55_CHECKSUM_ADDRESS)
|
||||
|
|
|
@ -9,7 +9,7 @@ from nucypher.network.middleware import RestMiddleware
|
|||
|
||||
|
||||
@click.command()
|
||||
@click.option('--teacher-uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--teacher', 'teacher_uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--min-stake', help="The minimum stake the teacher must have to be a teacher", type=click.INT, default=0)
|
||||
@click.option('--network', help="Network Domain Name", type=click.STRING)
|
||||
@click.option('--http-port', help="The host port to run Moe HTTP services on", type=NETWORK_PORT)
|
||||
|
|
|
@ -48,7 +48,7 @@ from nucypher.utilities.sandbox.constants import (
|
|||
@click.option('--federated-only', '-F', help="Connect only to federated nodes", is_flag=True, default=None)
|
||||
@click.option('--lonely', help="Do not connect to seednodes", is_flag=True)
|
||||
@click.option('--network', help="Network Domain Name", type=click.STRING)
|
||||
@click.option('--teacher-uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--teacher', 'teacher_uri', help="An Ursula URI to start learning from (seednode)", type=click.STRING)
|
||||
@click.option('--min-stake', help="The minimum stake the teacher must have to be a teacher", type=click.INT, default=0)
|
||||
@click.option('--rest-host', help="The host IP address to run Ursula network services on", type=click.STRING)
|
||||
@click.option('--rest-port', help="The host port to run Ursula network services on", type=NETWORK_PORT)
|
||||
|
@ -63,7 +63,7 @@ from nucypher.utilities.sandbox.constants import (
|
|||
@click.option('--sync/--no-sync', default=True)
|
||||
@click.option('--hw-wallet/--no-hw-wallet', default=False)
|
||||
@click.option('--geth', '-G', help="Run using the built-in geth node", is_flag=True)
|
||||
@click.option('--provider-uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--provider', 'provider_uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--registry-filepath', help="Custom contract registry filepath", type=EXISTING_READABLE_FILE)
|
||||
@nucypher_click_config
|
||||
def ursula(click_config,
|
||||
|
|
|
@ -41,7 +41,7 @@ from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
|||
@click.argument('action')
|
||||
@click.option('--force', is_flag=True)
|
||||
@click.option('--poa', help="Inject POA middleware", is_flag=True)
|
||||
@click.option('--provider-uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--provider', 'provider_uri', help="Blockchain provider's URI", type=click.STRING)
|
||||
@click.option('--geth', '-G', help="Run using the built-in geth node", is_flag=True)
|
||||
@click.option('--sync/--no-sync', default=True)
|
||||
@click.option('--hw-wallet/--no-hw-wallet', default=False) # TODO: Make True by default.
|
||||
|
|
|
@ -28,7 +28,7 @@ from nucypher.cli.types import (
|
|||
@click.option('--registry-filepath', help="Custom contract registry filepath", type=EXISTING_READABLE_FILE)
|
||||
@click.option('--poa', help="Inject POA middleware", is_flag=True)
|
||||
@click.option('--offline', help="Operate in offline mode", is_flag=True)
|
||||
@click.option('--provider-uri', help="Blockchain provider's URI i.e. 'file:///path/to/geth.ipc'", type=click.STRING)
|
||||
@click.option('--provider', 'provider_uri', help="Blockchain provider's URI i.e. 'file:///path/to/geth.ipc'", type=click.STRING)
|
||||
@click.option('--staking-address', help="Address to stake NU ERC20 tokens", type=EIP55_CHECKSUM_ADDRESS)
|
||||
@click.option('--worker-address', help="Address to assign as an Ursula-Worker", type=EIP55_CHECKSUM_ADDRESS)
|
||||
@click.option('--staking-reward/--no-staking-reward', is_flag=True, default=True)
|
||||
|
|
|
@ -31,7 +31,7 @@ services:
|
|||
image: circle:nucypher
|
||||
depends_on:
|
||||
- circleusula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.29.1.2 --rest-port 11500 --teacher-uri 172.29.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.29.1.2 --rest-port 11500 --teacher 172.29.1.1:11500
|
||||
networks:
|
||||
nucypher_circle_net:
|
||||
ipv4_address: 172.29.1.2
|
||||
|
@ -42,7 +42,7 @@ services:
|
|||
image: circle:nucypher
|
||||
depends_on:
|
||||
- circleusula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.29.1.3 --rest-port 11500 --teacher-uri 172.29.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.29.1.3 --rest-port 11500 --teacher 172.29.1.1:11500
|
||||
networks:
|
||||
nucypher_circle_net:
|
||||
ipv4_address: 172.29.1.3
|
||||
|
@ -53,7 +53,7 @@ services:
|
|||
image: circle:nucypher
|
||||
depends_on:
|
||||
- circleusula1
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.29.1.4 --rest-port 11500 --teacher-uri 172.29.1.1:11500
|
||||
command: nucypher ursula run --dev --federated-only --rest-host 172.29.1.4 --rest-port 11500 --teacher 172.29.1.1:11500
|
||||
networks:
|
||||
nucypher_circle_net:
|
||||
ipv4_address: 172.29.1.4
|
||||
|
|
|
@ -9,13 +9,13 @@ export NUCYPHER_USER_ESCROW_PROXY_SECRET='debuggerdebugger'
|
|||
export NUCYPHER_ADJUDICATOR_SECRET='debuggerdebugger'
|
||||
|
||||
# Deploy Main Contracts
|
||||
nucypher-deploy contracts --provider-uri ipc:///tmp/geth.ipc --poa
|
||||
nucypher-deploy contracts --provider ipc:///tmp/geth.ipc --poa
|
||||
|
||||
# Set Ursula Password
|
||||
export NUCYPHER_KEYRING_PASSWORD='debuggerdebuggerdebugger'
|
||||
|
||||
# Initialize New Ursula
|
||||
nucypher ursula init --provider-uri ipc:///tmp/geth.ipc --poa --network TEMPORARY_DOMAIN --rest-host 0.0.0.0
|
||||
nucypher ursula init --provider ipc:///tmp/geth.ipc --poa --network TEMPORARY_DOMAIN --rest-host 0.0.0.0
|
||||
|
||||
# Inline Staking
|
||||
nucypher ursula stake --value 15000 --duration 30 --force
|
||||
|
|
|
@ -22,9 +22,9 @@ sleep 2
|
|||
|
||||
# Connect Node #2 to Lonely Ursula
|
||||
echo "Starting Ursula #2..."
|
||||
nucypher --debug ursula run --dev --federated-only --teacher-uri localhost:11500 --rest-port 11501 > /tmp/ursulas-logs/ursula-11501.txt 2>&1 &
|
||||
nucypher --debug ursula run --dev --federated-only --teacher localhost:11500 --rest-port 11501 > /tmp/ursulas-logs/ursula-11501.txt 2>&1 &
|
||||
sleep 1
|
||||
|
||||
# Connect Node #3 to the local Fleet
|
||||
echo "Starting Ursula #3..."
|
||||
nucypher --debug ursula run --dev --federated-only --teacher-uri localhost:11500 --rest-port 11502 > /tmp/ursulas-logs/ursula-11502.txt 2>&1 &
|
||||
nucypher --debug ursula run --dev --federated-only --teacher localhost:11500 --rest-port 11502 > /tmp/ursulas-logs/ursula-11502.txt 2>&1 &
|
|
@ -47,7 +47,7 @@ def spin_up_federated_ursulas(quantity: int = FLEET_POPULATION):
|
|||
args = ['nucypher', '--debug',
|
||||
'ursula', 'run',
|
||||
'--rest-port', port,
|
||||
'--teacher-uri', TEACHER_URI,
|
||||
'--teacher', TEACHER_URI,
|
||||
'--federated-only',
|
||||
'--dev',
|
||||
'--config-root', 'demo-ursula-{}'.format(port)
|
||||
|
|
|
@ -35,7 +35,7 @@ DEMO_FLEET_STARTING_PORT = 11500
|
|||
args = ['--debug',
|
||||
'ursula', 'run',
|
||||
'--federated-only',
|
||||
'--teacher-uri', f'https://127.0.0.1:{DEMO_FLEET_STARTING_PORT}',
|
||||
'--teacher', f'https://127.0.0.1:{DEMO_FLEET_STARTING_PORT}',
|
||||
'--rest-port', DEMO_NODE_PORT,
|
||||
'--dev'
|
||||
]
|
||||
|
|
|
@ -105,11 +105,10 @@ def test_cli_lifecycle(click_runner,
|
|||
alice_init_args = ('alice', 'init',
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
'--config-root', alice_config_root)
|
||||
|
||||
if federated:
|
||||
alice_init_args += ('--federated-only', )
|
||||
else:
|
||||
alice_init_args += ('--provider-uri', TEST_PROVIDER_URI,
|
||||
alice_init_args += ('--provider', TEST_PROVIDER_URI,
|
||||
'--pay-with', testerchain.alice_account)
|
||||
|
||||
alice_init_response = click_runner.invoke(nucypher_cli, alice_init_args, catch_exceptions=False, env=envvars)
|
||||
|
@ -139,8 +138,8 @@ def test_cli_lifecycle(click_runner,
|
|||
if federated:
|
||||
bob_init_args += ('--federated-only', )
|
||||
else:
|
||||
bob_init_args += ('--provider-uri', TEST_PROVIDER_URI,
|
||||
'--pay-with', testerchain.bob_account)
|
||||
bob_init_args += ('--provider', TEST_PROVIDER_URI,
|
||||
'--checksum-address', testerchain.bob_account)
|
||||
|
||||
bob_init_response = click_runner.invoke(nucypher_cli, bob_init_args, catch_exceptions=False, env=envvars)
|
||||
assert bob_init_response.exit_code == 0
|
||||
|
@ -268,7 +267,7 @@ def test_cli_lifecycle(click_runner,
|
|||
'--mock-networking',
|
||||
'--json-ipc',
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
'--teacher-uri', teacher_uri,
|
||||
'--teacher', teacher_uri,
|
||||
'--config-file', alice_configuration_file_location,
|
||||
'--m', 2,
|
||||
'--n', 3,
|
||||
|
@ -281,7 +280,7 @@ def test_cli_lifecycle(click_runner,
|
|||
if federated:
|
||||
grant_args += ('--federated-only',)
|
||||
else:
|
||||
grant_args += ('--provider-uri', TEST_PROVIDER_URI)
|
||||
grant_args += ('--provider', TEST_PROVIDER_URI)
|
||||
|
||||
grant_result = click_runner.invoke(nucypher_cli, grant_args, catch_exceptions=False, env=envvars)
|
||||
assert grant_result.exit_code == 0
|
||||
|
@ -310,7 +309,7 @@ def test_cli_lifecycle(click_runner,
|
|||
retrieve_args = ('bob', 'retrieve',
|
||||
'--mock-networking',
|
||||
'--json-ipc',
|
||||
'--teacher-uri', teacher_uri,
|
||||
'--teacher', teacher_uri,
|
||||
'--config-file', bob_configuration_file_location,
|
||||
'--message-kit', ciphertext_message_kit,
|
||||
'--label', label,
|
||||
|
|
|
@ -79,7 +79,7 @@ def test_nucypher_deploy_contracts(click_runner,
|
|||
|
||||
command = ['contracts',
|
||||
'--registry-outfile', mock_primary_registry_filepath,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--poa']
|
||||
|
||||
user_input = '0\n' + 'Y\n' + (f'{INSECURE_SECRETS[1]}\n' * 8) + 'DEPLOY'
|
||||
|
@ -162,7 +162,7 @@ def test_upgrade_contracts(click_runner, mock_primary_registry_filepath):
|
|||
#
|
||||
|
||||
cli_action = 'upgrade'
|
||||
base_command = ('--registry-infile', mock_primary_registry_filepath, '--provider-uri', TEST_PROVIDER_URI, '--poa')
|
||||
base_command = ('--registry-infile', mock_primary_registry_filepath, '--provider', TEST_PROVIDER_URI, '--poa')
|
||||
|
||||
# Generate user inputs
|
||||
yes = 'Y\n' # :-)
|
||||
|
@ -301,7 +301,7 @@ def test_rollback(click_runner, mock_primary_registry_filepath):
|
|||
command = ('rollback',
|
||||
'--contract-name', contract_name,
|
||||
'--registry-infile', MOCK_REGISTRY_FILEPATH,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--poa')
|
||||
|
||||
result = click_runner.invoke(deploy, command, input=user_input, catch_exceptions=False)
|
||||
|
@ -355,7 +355,7 @@ def test_nucypher_deploy_allocation_contracts(click_runner,
|
|||
'--registry-infile', MOCK_REGISTRY_FILEPATH,
|
||||
'--allocation-infile', mock_allocation_infile.filepath,
|
||||
'--allocation-outfile', MOCK_ALLOCATION_REGISTRY_FILEPATH,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--poa')
|
||||
|
||||
account_index = '0\n'
|
||||
|
|
|
@ -61,7 +61,7 @@ def test_run_felix(click_runner,
|
|||
'--config-root', MOCK_CUSTOM_INSTALLATION_PATH_2,
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
'--no-registry',
|
||||
'--provider-uri', TEST_PROVIDER_URI)
|
||||
'--provider', TEST_PROVIDER_URI)
|
||||
|
||||
result = click_runner.invoke(nucypher_cli, init_args, catch_exceptions=False, env=envvars)
|
||||
assert result.exit_code == 0
|
||||
|
@ -73,7 +73,7 @@ def test_run_felix(click_runner,
|
|||
'--debug',
|
||||
'--registry-filepath', mock_primary_registry_filepath,
|
||||
'--config-file', configuration_file_location,
|
||||
'--provider-uri', TEST_PROVIDER_URI)
|
||||
'--provider', TEST_PROVIDER_URI)
|
||||
|
||||
result = click_runner.invoke(nucypher_cli, db_args, catch_exceptions=False, env=envvars)
|
||||
assert result.exit_code == 0
|
||||
|
@ -84,7 +84,7 @@ def test_run_felix(click_runner,
|
|||
'--debug',
|
||||
'--registry-filepath', mock_primary_registry_filepath,
|
||||
'--config-file', configuration_file_location,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--dry-run',
|
||||
'--no-registry')
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ def test_coexisting_configurations(click_runner,
|
|||
felix_init_args = ('felix', 'init',
|
||||
'--config-root', custom_filepath,
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--checksum-address', felix,
|
||||
'--registry-filepath', mock_primary_registry_filepath
|
||||
)
|
||||
|
@ -99,7 +99,7 @@ def test_coexisting_configurations(click_runner,
|
|||
# Use a custom local filepath to init a persistent Alice
|
||||
alice_init_args = ('alice', 'init',
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--pay-with', alice,
|
||||
'--registry-filepath', mock_primary_registry_filepath,
|
||||
'--config-root', custom_filepath)
|
||||
|
@ -115,7 +115,7 @@ def test_coexisting_configurations(click_runner,
|
|||
# Use the same local filepath to init a persistent Ursula
|
||||
init_args = ('ursula', 'init',
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--worker-address', ursula,
|
||||
'--staker-address', staker,
|
||||
'--rest-host', MOCK_IP_ADDRESS,
|
||||
|
@ -138,7 +138,7 @@ def test_coexisting_configurations(click_runner,
|
|||
'--staker-address', staker,
|
||||
'--rest-host', MOCK_IP_ADDRESS_2,
|
||||
'--registry-filepath', mock_primary_registry_filepath,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--config-root', custom_filepath)
|
||||
|
||||
result = click_runner.invoke(nucypher_cli, init_args, catch_exceptions=False, env=envvars)
|
||||
|
@ -212,7 +212,7 @@ def test_corrupted_configuration(click_runner, custom_filepath, testerchain, moc
|
|||
alice, ursula, another_ursula, felix, staker, *all_yall = testerchain.unassigned_accounts
|
||||
|
||||
init_args = ('ursula', 'init',
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--worker-address', another_ursula,
|
||||
'--staker-address', staker,
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
|
@ -239,7 +239,7 @@ def test_corrupted_configuration(click_runner, custom_filepath, testerchain, moc
|
|||
# Attempt installation again, with full args
|
||||
init_args = ('ursula', 'init',
|
||||
'--network', TEMPORARY_DOMAIN,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--worker-address', another_ursula,
|
||||
'--staker-address', staker,
|
||||
'--rest-host', MOCK_IP_ADDRESS,
|
||||
|
|
|
@ -23,7 +23,7 @@ def test_run_moe(click_runner, federated_ursulas):
|
|||
args = ('moe',
|
||||
'--ws-port', test_ws_port,
|
||||
'--network', ':fake-domain:',
|
||||
'--teacher-uri', teacher_uri,
|
||||
'--teacher', teacher_uri,
|
||||
'--http-port', MOCK_URSULA_STARTING_PORT,
|
||||
'--learn-on-launch', # TODO: Dumb name. Don't use this in production.
|
||||
'--dry-run')
|
||||
|
|
|
@ -79,7 +79,7 @@ def test_federated_ursula_learns_via_cli(click_runner, federated_ursulas):
|
|||
'--debug', # Display log output; Do not attach console
|
||||
'--federated-only', # Operating Mode
|
||||
'--rest-port', MOCK_URSULA_STARTING_PORT, # Network Port
|
||||
'--teacher-uri', teacher_uri,
|
||||
'--teacher', teacher_uri,
|
||||
'--dev', # Run in development mode (ephemeral node)
|
||||
'--dry-run' # Disable twisted reactor
|
||||
)
|
||||
|
|
|
@ -86,7 +86,7 @@ def test_new_stakeholder(click_runner,
|
|||
init_args = ('stake', 'new-stakeholder',
|
||||
'--poa',
|
||||
'--config-root', custom_filepath,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--registry-filepath', mock_registry_filepath)
|
||||
|
||||
result = click_runner.invoke(nucypher_cli,
|
||||
|
@ -255,7 +255,7 @@ def test_ursula_init(click_runner,
|
|||
'--staker-address', manual_staker,
|
||||
'--worker-address', manual_worker,
|
||||
'--config-root', custom_filepath,
|
||||
'--provider-uri', TEST_PROVIDER_URI,
|
||||
'--provider', TEST_PROVIDER_URI,
|
||||
'--registry-filepath', mock_registry_filepath,
|
||||
'--rest-host', MOCK_IP_ADDRESS,
|
||||
'--rest-port', MOCK_URSULA_STARTING_PORT)
|
||||
|
|
Loading…
Reference in New Issue