From 6098f11fbaea2c28b78258a96654e5b264c27cc1 Mon Sep 17 00:00:00 2001 From: James Campbell Date: Tue, 29 Mar 2022 10:10:27 -0500 Subject: [PATCH] Fix rst formatting and improve working --- docs/source/index.rst | 6 +-- .../digital_ocean_tutorial.rst | 41 +++++++++++-------- docs/source/pre_application/testnet.rst | 3 +- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index e41def053..d2c271fce 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -62,12 +62,12 @@ How does it Work? anyone she wants by creating a policy and uploading it to the PRE Application on the Threshold Network. -2. Alice gets information about the group of ``n`` Ursulas associated -with the policy, which are nodes on the NuCypher network. Each :term:`Ursula`` provides their encrypting key, and Alice creates +2. Alice gets information about the group of ``n`` PRE nodes (Ursulas) associated +with the policy, which are nodes on the Threshold network providing the PRE service. Each :term:`Ursula` provides their encrypting key, and Alice creates ``n`` re-encryption key shares (:term:`kFrag`), each of which is encrypted with a different Ursula's encrypting key. The Ursulas in the group stand ready to re-encrypt data in exchange for payment in fees and token rewards. The list of Ursulas and their associated encrypted re-encryption key shares are stored in a :term:`Treasure Map`. Alice -subsequently encrypts the treasure map for Bob. The treasure map provides Bob the requisite information and cryptographic material to successfully request the NuCypher network to re-encrypt the data shared by Alice – such that he can decrypt it with his private key. +subsequently encrypts the treasure map for Bob. The treasure map provides Bob the requisite information and cryptographic material to successfully request the Threshold network to re-encrypt the data shared by Alice – such that he can decrypt it with his private key. 3. Each policy created by Alice has an associated encryption key, which can be used by any entity (Enrico) to encrypt data on Alice's behalf. diff --git a/docs/source/pre_application/digital_ocean_tutorial.rst b/docs/source/pre_application/digital_ocean_tutorial.rst index 76dc398f0..ff84648e6 100644 --- a/docs/source/pre_application/digital_ocean_tutorial.rst +++ b/docs/source/pre_application/digital_ocean_tutorial.rst @@ -19,29 +19,30 @@ There are currently no Threshold faucets but if you ask in the `Discord `_` -- `DIGITAL_OCEAN_KEY_FINGERPRINT` - Your Digital Ocean `key fingerprint `_. +- ``DIGITALOCEAN_ACCESS_TOKEN`` - Your Digital Ocean `access token `_` +- ``DIGITAL_OCEAN_KEY_FINGERPRINT`` - Your Digital Ocean `key fingerprint `_. -Follow those two blog posts and either `export` the variables or add them to your `~/.bashrc` file. +Follow those two blog posts and either ``export`` the variables or add them to your ``~/.bashrc`` file. Infura ------ We need a way to interact with both the Ethereum and Polygon testnet networks; Infura makes this easy for us. -Create a new project at Infura with product type `ETHEREUM`. -Also,add the Polygon addon to this project. +Create a new project at Infura with product type ``ETHEREUM``. +Also, add the Polygon add-on to this project. We're going to create two more environment variables: -- `INFURA_RINKEBY_URL` -- `INFURA_MUMBAI_URL` +- ``INFURA_RINKEBY_URL`` +- ``INFURA_MUMBAI_URL`` -In the **Project Settings**, change the `ENDPOINTS` to `RINKEBY` / `POLYGON_MUMBAI` -Set the above environment variables to the corresponding `https` endpoint. +In the **Project Settings**, change the ``ENDPOINTS`` to ``RINKEBY`` / ``POLYGON_MUMBAI``. +Set the above environment variables to the corresponding ``https`` endpoint. Overall the environment variable process should look something like: .. code-block:: bash + $ export INFURA_RINKEBY_URL=https://rinkeby.infura.io/v3/bd76baxxxxxxxxxxxxxxxxxxxxxf0ff0 $ export INFURA_MUMBAI_URL=https://polygon-mumbai.infura.io/v3/bd76baxxxxxxxxxxxxxxxxxxxxxf0ff0 $ export DIGITALOCEAN_ACCESS_TOKEN=4ade7a8701xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbafd23 @@ -53,23 +54,27 @@ Setup Remote Node Locally, we will install `NuCypher Ops `_ to handle the heavy lifting of setting up a node. .. code-block:: bash + $ pip install nucypher-ops Now NuCypher Ops is installed we can create a droplet on Digital Ocean: .. code-block:: bash + nucypher-ops nodes create --network ibex --count 1 --cloudprovider digitalocean At this point you should see the droplet in your Digital Ocean dashboard. Now we can deploy the PRE Node: .. code-block:: bash + nucypher-ops ursula deploy --eth-provider $INFURA_RINKEBY_URL --nucypher-image nucypher/nucypher:experimental --payment-provider $INFURA_MUMBAI_URL --network ibex This should produce a large amount of logs as the ansible plays install all the requirements and setup the node. The final output should be similar to: .. code-block:: bash + some relevant info: config file: "/SOME_PATH/nucypher-ops/configs/ibex/nucypher/ibex-nucypher.json" inventory file: /SOME_PATH/nucypher-ops/configs/ibex-nucypher-2022-03-25.ansible_inventory.yml @@ -84,6 +89,7 @@ This tells us the location of several config files and helpfully prints the ip o Let's `ssh` into it and look at the logs: .. code-block:: bash + $ ssh root@123.456.789.xxx root@nucypher-ibex-1:~# root@nucypher-ibex-1:~# sudo docker logs --follow ursula @@ -93,26 +99,26 @@ Let's `ssh` into it and look at the logs: ... These lines will print repeatedly until the Operator is funded with some ETH and bonded to a staking provider. -Send the address that is printed some testnet eth. +Send ETH to the operator address that is printed Stake and Bond -------------- -Now that our operator is funded with some eth, we're ready to stake and bond. -At this point you need some testnet eth and 40K T in a metamask wallet. +Now that our operator is funded with ETH, we're ready to stake and bond. +At this point you need some testnet ETH and 40,000 T in a metamask wallet. Again, ask in the discord if you need help with this. Navigate to the `Testnet Staking Dashboard `_ and connect your metamask wallet. -Go to the `stake` tab and click "Stake liquid T on rinkeby" +Go to the **stake** tab and click "Stake liquid T on rinkeby" .. image:: ../.static/img/testnet_stake_dashboard.png :target: ../.static/img/testnet_stake_dashboard.png -Allow the 40K T spend, and then stake 40K T. -Both transaction will require authorisation via metamask. -You can ignore the "Configure Addresses" option - they should all be automatically set to the current connected account. +Allow the 40,000 T spend, and then stake it. +Both transactions will require authorization via metamask. +You can ignore the **Configure Addresses** option - they should all default to the currently connected account. -Once those transactions are confirmed, swith to the bond tab. +Once those transactions are confirmed, swith to the **bond** tab. Here you will paste the Operator address that is being printed by the docker logs: .. image:: ../.static/img/testnet_bond_dashboard.png @@ -122,6 +128,7 @@ Once that transaction is confirmed, switch back to view the logs of the node. You should see: .. code-block:: bash + Broadcasting CONFIRMOPERATORADDRESS Transaction (0.00416485444 ETH @ 88.58 gwei) TXHASH 0x3329exxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5ec9a6 ✓ Work Tracking diff --git a/docs/source/pre_application/testnet.rst b/docs/source/pre_application/testnet.rst index d1678968c..2097d3d11 100644 --- a/docs/source/pre_application/testnet.rst +++ b/docs/source/pre_application/testnet.rst @@ -7,7 +7,8 @@ Ibex Testnet NuCypher provides a public testnet running on the Ethereum Rinkeby testnet meant for staking providers and node operators to learn how to set up a PRE application node, as well as for internal development purposes. -The Threshold contract address for the testnet is `0xc3871E2C11Ff18d809Bce74d1e4229d561aa3F09`. You can view it on (etherscan)[https://rinkeby.etherscan.io/address/0xc3871e2c11ff18d809bce74d1e4229d561aa3f09] +The Threshold Token (T) contract address for the testnet is ``0xc3871E2C11Ff18d809Bce74d1e4229d561aa3F09``. +You can view it on `etherscan `_. .. attention::