mirror of https://github.com/nucypher/nucypher.git
Adding domains to Alice and Bob in examples, to aviod using the production defaults.
parent
4fd55ab6cb
commit
58302eb7db
|
@ -16,6 +16,8 @@ from nucypher.utilities.logging import SimpleObserver
|
|||
######################
|
||||
|
||||
# Execute the download script (download_finnegans_wake.sh) to retrieve the book
|
||||
from nucypher.utilities.sandbox.constants import TEMPORARY_DOMAIN
|
||||
|
||||
BOOK_PATH = os.path.join('.', 'finnegans-wake.txt')
|
||||
|
||||
# Change this value to to perform more or less total re-encryptions
|
||||
|
@ -31,7 +33,7 @@ globalLogPublisher.addObserver(SimpleObserver())
|
|||
# (will fail with bad connection) #####
|
||||
#######################################
|
||||
|
||||
SEEDNODE_URI = "https://localhost:11501"
|
||||
SEEDNODE_URI = "https://localhost:11500"
|
||||
|
||||
##############################################
|
||||
# Ursula, the Untrusted Re-Encryption Proxy #
|
||||
|
@ -50,6 +52,7 @@ label = b"secret/files/and/stuff"
|
|||
######################################
|
||||
|
||||
ALICE = Alice(network_middleware=RestMiddleware(),
|
||||
domains={TEMPORARY_DOMAIN},
|
||||
known_nodes=[ursula],
|
||||
learn_on_same_thread=True,
|
||||
federated_only=True)
|
||||
|
@ -61,6 +64,7 @@ ALICE = Alice(network_middleware=RestMiddleware(),
|
|||
policy_pubkey = ALICE.get_policy_encrypting_key_from_label(label)
|
||||
|
||||
BOB = Bob(known_nodes=[ursula],
|
||||
domains={TEMPORARY_DOMAIN},
|
||||
network_middleware=RestMiddleware(),
|
||||
federated_only=True,
|
||||
start_learning_now=True,
|
||||
|
|
|
@ -19,6 +19,8 @@ from nucypher.utilities.logging import SimpleObserver
|
|||
|
||||
|
||||
# Twisted Logger
|
||||
from nucypher.utilities.sandbox.constants import TEMPORARY_DOMAIN
|
||||
|
||||
globalLogPublisher.addObserver(SimpleObserver())
|
||||
|
||||
TEMP_ALICE_DIR = os.path.join('/', 'tmp', 'heartbeat-demo-alice')
|
||||
|
@ -50,6 +52,7 @@ ursula = Ursula.from_seed_and_stake_info(seed_uri=SEEDNODE_URL,
|
|||
alice_config = AliceConfiguration(
|
||||
config_root=os.path.join(TEMP_ALICE_DIR),
|
||||
is_me=True,
|
||||
domains={TEMPORARY_DOMAIN},
|
||||
known_nodes={ursula},
|
||||
start_learning_now=False,
|
||||
federated_only=True,
|
||||
|
|
|
@ -17,6 +17,7 @@ from nucypher.network.middleware import RestMiddleware
|
|||
from umbral.keys import UmbralPublicKey
|
||||
|
||||
from nucypher.utilities.logging import SimpleObserver
|
||||
from nucypher.utilities.sandbox.constants import TEMPORARY_DOMAIN
|
||||
|
||||
globalLogPublisher.addObserver(SimpleObserver())
|
||||
|
||||
|
@ -51,6 +52,7 @@ print("Creating the Doctor ...")
|
|||
|
||||
doctor = Bob(
|
||||
is_me=True,
|
||||
domains={TEMPORARY_DOMAIN},
|
||||
federated_only=True,
|
||||
crypto_power_ups=power_ups,
|
||||
start_learning_now=True,
|
||||
|
|
|
@ -18,7 +18,7 @@ export NUCYPHER_FILE_LOGS=0
|
|||
# Run Node #1 (Lonely Ursula)
|
||||
echo "Starting Lonely Ursula..."
|
||||
python3 "${0%/*}"/../local_fleet/run_lonely_ursula.py > /tmp/ursulas-logs/ursula-11500.txt 2>&1 &
|
||||
sleep 1
|
||||
sleep 2
|
||||
|
||||
# Connect Node #2 to Lonely Ursula
|
||||
echo "Starting Ursula #2..."
|
||||
|
@ -27,5 +27,4 @@ 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 &
|
||||
sleep 1
|
||||
nucypher --debug ursula run --dev --federated-only --teacher-uri localhost:11500 --rest-port 11502 > /tmp/ursulas-logs/ursula-11502.txt 2>&1 &
|
|
@ -30,7 +30,7 @@ from nucypher.utilities.sandbox.constants import select_test_port
|
|||
click_runner = CliRunner()
|
||||
|
||||
DEMO_NODE_PORT = select_test_port()
|
||||
DEMO_FLEET_STARTING_PORT = 11501
|
||||
DEMO_FLEET_STARTING_PORT = 11500
|
||||
|
||||
args = ['--debug',
|
||||
'ursula', 'run',
|
||||
|
|
|
@ -21,7 +21,7 @@ from nucypher.utilities.sandbox.constants import (
|
|||
@pytest_twisted.inlineCallbacks
|
||||
def test_run_felix(click_runner,
|
||||
testerchain,
|
||||
federated_ursulas,
|
||||
federated_ursulas, # TODO: Make these blockchain Ursulas
|
||||
deploy_user_input,
|
||||
mock_primary_registry_filepath):
|
||||
|
||||
|
|
Loading…
Reference in New Issue