mirror of https://github.com/nucypher/nucypher.git
Touches to the docs
parent
cf091f245a
commit
5778026cec
|
@ -56,10 +56,10 @@ Execution of these methods results in Alice recovering all fees for future perio
|
|||
Alice can refund ETH for any inactive periods without revoking the policy by using the method `PolicyManager.refund(bytes16)` or `PolicyManager.refund(bytes16, address)`.
|
||||
|
||||
|
||||
## Ursula's Contract Interaction
|
||||
## Staker's Contract Interaction
|
||||
|
||||
|
||||
### Ursula Locks Tokens
|
||||
### Staker Locks Tokens
|
||||
|
||||
In order to become a participant of the network, a staker stakes tokens in the `StakingEscrow` contract.
|
||||
The staker allows the (staking) contract to perform a transaction using the `NuCypherToken.approve(address, uint256)` method
|
||||
|
@ -82,9 +82,15 @@ The first parameter is used to identify the stake to divide and the last two for
|
|||
When calculating locked tokens using the `StakingEscrow.getLockedTokens(address, uint16)` method, all stakes that are active during the specified period are summed.
|
||||
|
||||
|
||||
### The Staker Bonds to a Worker ("Ursula")
|
||||
The staker must specify a worker who will confirm the activity and sign on behalf of this staker by calling the `StakingEscrow.setWorker(address)` method.
|
||||
Changing a worker is allowed no more than 1 time in `StakingEscrow.minWorkerPeriods()`.
|
||||
Only the worker can confirm activity.
|
||||
|
||||
|
||||
### Ursula Confirms Activity
|
||||
|
||||
In order to confirm activity every period, stakers call `StakingEscrow.confirmActivity()` wherein activities for the next period are registered.
|
||||
In order to confirm activity every period, workers call `StakingEscrow.confirmActivity()` wherein activities for the next period are registered.
|
||||
The staker gets a reward for every confirmed period.
|
||||
|
||||
### Ursula Generates Staking Rewards
|
||||
|
@ -110,10 +116,6 @@ The staker can set a minimum reward rate for a policy. For that, the staker shou
|
|||
Some users will have locked but not staked tokens.
|
||||
In that case, an instance of the `UserEscrow` contract will hold their tokens (method `UserEscrow.initialDeposit(uint256, uint256)`).
|
||||
All tokens will be unlocked after a specified time and the user can retrieve them using the `UserEscrow.withdraw(uint256)` method.
|
||||
When the user wants to become a staker - he uses the `UserEscrow` contract as a proxy for the `StakingEscrow` and `PolicyManager` contracts.
|
||||
When the user wants to become a staker - she uses the `UserEscrow` contract as a proxy for the `StakingEscrow` and `PolicyManager` contracts.
|
||||
|
||||
|
||||
### Ursula's Worker
|
||||
The staker must specify a worker who will confirm the activity and sign on behalf of this staker by calling the `StakingEscrow.setWorker(address)` method.
|
||||
Changing a worker is allowed no more than 1 time in `StakingEscrow.minWorkerPeriods()`.
|
||||
Only the worker can confirm activity.
|
||||
|
|
|
@ -18,7 +18,7 @@ All Demo Ursulas:
|
|||
* Using temporary resources (files, database, etc.)
|
||||
|
||||
|
||||
Running A Local Fleet
|
||||
Running a Local Fleet
|
||||
---------------------
|
||||
|
||||
1. Install NuCypher
|
||||
|
|
|
@ -21,7 +21,7 @@ Here is the recommended procedure for acquiring the code in preparation for
|
|||
contributing proposed changes:
|
||||
|
||||
|
||||
1. Use GitHub to Fork the `nucypher/nucypher` repository
|
||||
1. Use GitHub to fork the ``nucypher/nucypher`` repository
|
||||
|
||||
2. Clone your fork's repository to your local machine
|
||||
|
||||
|
@ -29,19 +29,19 @@ contributing proposed changes:
|
|||
|
||||
$ git clone https://github.com/<YOUR-GITHUB-USERNAME>/nucypher.git
|
||||
|
||||
3. Change Directories into ``nucypher``
|
||||
3. Change directories into ``nucypher``
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd nucypher
|
||||
$ cd nucypher
|
||||
|
||||
3. Add `nucypher/nucypher` as an upstream remote
|
||||
4. Add ``nucypher/nucypher`` as an upstream remote
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git remote add upstream https://github.com/nucypher/nucypher.git
|
||||
|
||||
4. Update your remote tracking branches
|
||||
5. Update your remote tracking branches
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -49,7 +49,7 @@ contributing proposed changes:
|
|||
|
||||
.. _`Developer Installation Guide`: https://docs.nucypher.com/en/latest/guides/installation_guide.html
|
||||
|
||||
5. Install the project dependencies: see the `Developer Installation Guide`_
|
||||
6. Install the project dependencies: see the `Developer Installation Guide`_
|
||||
|
||||
|
||||
Running the Tests
|
||||
|
@ -81,7 +81,7 @@ Optionally, to run the full, slow, verbose test suite run:
|
|||
(nucypher)$ pytest --runslow -s
|
||||
|
||||
|
||||
Making A Commit
|
||||
Making a Commit
|
||||
---------------
|
||||
|
||||
NuCypher takes pride in its commit history.
|
||||
|
@ -98,10 +98,10 @@ are first-time contributors to open source, so feel free to join our `Discord <h
|
|||
how we can best support the submission of your proposed changes.
|
||||
|
||||
|
||||
Opening A Pull Request
|
||||
Opening a Pull Request
|
||||
----------------------
|
||||
|
||||
When considering including commits as part of a pull request into `nucypher/nucypher`,
|
||||
When considering including commits as part of a pull request into ``nucypher/nucypher``,
|
||||
we *highly* recommend opening the pull request early, before it is finished with
|
||||
the mark "[WIP]" prepended to the title. We understand PRs marked "WIP" to be subject to change,
|
||||
history rewrites, and CI failures. Generally we will not review a WIP PR until the "[WIP]" marker
|
||||
|
@ -129,7 +129,7 @@ Generally speaking the preferred process of doing so is with an `interactive reb
|
|||
$ git remote update
|
||||
... (some upstream changes are reported)
|
||||
|
||||
2. Initiate an interactive rebase over `nucypher/nucypher@master`
|
||||
2. Initiate an interactive rebase over ``nucypher/nucypher@master``
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
@ -154,8 +154,8 @@ $ ./scripts/installation/install_solc.sh
|
|||
|
||||
## Systemd Service Installation
|
||||
|
||||
1. Use this template to create a file named _ursula.service_ and place it in */etc/systemd/system/*.
|
||||
|
||||
1. Use this template to create a file named `ursula.service` and place it in `/etc/systemd/system/`.
|
||||
|
||||
```
|
||||
[Unit]
|
||||
Description="Run 'Ursula', a NuCypher Staking Node."
|
||||
|
|
|
@ -79,7 +79,7 @@ Staking Overview
|
|||
|
||||
Most stakers on the Goerli testnet will complete the following steps:
|
||||
|
||||
1) Install nucypher on StakeHolder node https://docs.nucypher.com/en/latest/guides/installation_guide.html
|
||||
1) Install ``nucypher`` on StakeHolder node https://docs.nucypher.com/en/latest/guides/installation_guide.html
|
||||
2) Install and run Geth, Parity or another ethereum node (can be used with software or hardware Ethereum wallet).
|
||||
3) Request testnet tokens from faucet
|
||||
4) Stake tokens (See Below)
|
||||
|
@ -91,7 +91,7 @@ Most stakers on the Goerli testnet will complete the following steps:
|
|||
Interactive Method
|
||||
------------------
|
||||
|
||||
Run an Ethereum node for stakeholder
|
||||
Run an Ethereum node for Stakeholder
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Assuming you have ``geth`` installed, let's run a node on Görli testnet.
|
||||
|
@ -291,7 +291,7 @@ fees, or both:
|
|||
|
||||
.. code:: bash
|
||||
|
||||
nucypher stake collect-reward --staking-reward --policy-reward --staking-address 0x287A817426DD1AE78ea23e9918e2273b6733a43D --hw-wallet
|
||||
(nucypher)$ nucypher stake collect-reward --staking-reward --policy-reward --staking-address 0x287A817426DD1AE78ea23e9918e2273b6733a43D --hw-wallet
|
||||
|
||||
____ __ __
|
||||
/\ _`\ /\ \__ /\ \
|
||||
|
|
Loading…
Reference in New Issue