Merge pull request #2610 from derekpierre/docs-period-update

Update docs to reflect updated 7 day period length
pull/2594/head
KPrasch 2021-04-14 07:52:10 -07:00 committed by GitHub
commit dd9f96a1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 370 additions and 97 deletions

View File

@ -10,7 +10,7 @@ The `NuCypher DAO <https://client.aragon.org/#/nucypherdao/>`_ is a decentralize
rule over the NuCypher Network and powered by the `Aragon Project <https://aragon.org/>`_.
The NuCypher DAO comprises the core stakeholders: the stakers that put up resources to run nodes for the network and
serve users. NuCypher stakers will be able to validate issues, proposals, and changes that affect the daily operation
serve users. NuCypher stakers will be able to validate issues, proposals, and changes that affect the operation
of the network, with validation power directly proportional to the amount of tokens staked. These issues include
proposed smart contract upgrades, changes to the global fee rates, and adjustments to other parameters of the NuCypher
protocol and the DAO itself. Additionally, all NuCypher stakers will be able to submit proposals to the DAO,

View File

@ -0,0 +1,63 @@
Period Duration
===============
In the NuCypher Network, a *Period* is the minimum unit for policy duration. This applies to sharing policy durations
and also corresponds to the frequency that Workers must make an on-chain commitment to being online and available.
Periods begin at UTC midnight.
Genesis
-------
At the Network launch on October 15th, 2020, the duration of a period was 24 hours. As a result, before UTC midnight,
Workers needed to make a per period (daily) on-chain commitment transactions indicating availability for the subsequent
period (after UTC midnight).
The cost of the commitment transaction is approximately 200k gas units but may be higher depending on the number of
sub-stakes a Staker has. Given the significant increase in Ethereum gas price since network launch, the cost of the daily
commitment transaction significantly increased and became untenable. Particularly for short stake durations and stake
sizes closer to the minimum stake size, the NU staking rewards and fees received from running a Worker may not cover
the cost of this commitment transaction.
Reducing the total amount of gas fees required to run a Worker became a necessity, and there have been multiple
mitigations:
#. Removal of inactive sub-stakes i.e. sub-stakes that expired and were no longer relevant (`PR #2384 <https://github.com/nucypher/nucypher/issues/2384>`_).
#. Addition of a Worker configuration setting to specify a cap on the gas price that Workers were willing to pay for the
commitment transaction. Commitment attempts are made throughout the current period, and if the gas price at the time
is too high, the commitment is not made (`PR #2445 <https://github.com/nucypher/nucypher/issues/2445>`_).
Ultimately these were incremental solutions, which worked around the underlying issue. A more comprehensive next step
was to increase the period duration i.e. reduce the frequency with which Workers needed to make the on-chain commitment
transaction, thereby reducing the cost by a factor based on the increase in period duration.
Taking a long-term perspective, lowering Worker overhead encourages more participation, and enables more
competitive break-even policy fee price points for network usage which is likely to increase user adoption.
7-Day Period
------------
A `proposal to increase the protocol period duration <https://dao.nucypher.com/t/1-improve-staker-p-l-by-increasing-period-duration/110>`_,
outlining the pros and cons, was put forth to the :doc:`NuCypher DAO </architecture/dao>`, and a 7-day period duration
received the majority of votes. On Wednesday, April 14th, 2021, the NuCypher DAO approved the period migration, and subsequently,
the period duration for the NuCypher protocol.
Modifying the period duration to 7 days involved changes to the ``StakingEscrow`` and ``PolicyManager`` smart
contracts, and the economics parameters for the protocol that include period duration, inflation parameters,
minimum staking periods, policy fee per period etc. all of which needed to be adjusted due to the
new minimum unit of time.
The period duration modification reduces the frequency of on-chain
commitment transactions (and therefore worker gas costs) and has minimal impact on the total staking rewards
received for running a Worker. However, since the commitment transaction occurs every 7 days, staking rewards
will also be minted once every 7 days (instead of daily), but the reward rate remains the same
(the minted value will be 7 days worth).
Since period numbers are calculated relative to Unix epoch time, a period duration of 7 days will cause periods
to always start on Thursdays at UTC midnight *(Fun fact: the Unix epoch - January 1st, 1970 - was on a
Thursday so period calculations will always yield Thursday as the start of a new period).*
.. important::
The NuCypher DAO may decide to update the period duration again in the future.

View File

@ -12,7 +12,7 @@ Service Fees (Pricing)
Minimum fee rate
----------------
When stakers join the network, they specify a minimum fee rate, on a *per sharing policy* and *per 24h period* basis, that their worker (Ursula) will accept at the point of engagement with a network user (Alice). If Alices offered per period rate (contained alongside the sharing policys parameters in an ``Arrangement`` object) for a specified policy duration computes as equal to or greater than the minimum fee rate, the sharing policy will be accepted by Ursula and the access control service will commence. Ursula will service the sharing policy by being online and answering access requests, at that unchanging per period fee rate, until the specified expiration date or an early revocation is instigated by Alice.
When stakers join the network, they specify a minimum fee rate, on a *per sharing policy* and *per period (7 days)* basis, that their worker (Ursula) will accept at the point of engagement with a network user (Alice). If Alices offered per period rate (contained alongside the sharing policys parameters in an ``Arrangement`` object) for a specified policy duration computes as equal to or greater than the minimum fee rate, the sharing policy will be accepted by Ursula and the access control service will commence. Ursula will service the sharing policy by being online and answering access requests, at that unchanging per period fee rate, until the specified expiration date or an early revocation is instigated by Alice.
The minimum fee rate applies to each individual worker machine managing a given sharing policy. In other words, the rate is also *per Ursula*. If Alice wishes to employ multiple Ursulas to service a single sharing policy (``n`` > 1), a common configuration, then they must pay each staker associated with that policy the same fee rate. This rate will be the highest from the set of *minimum* fee rates specified by the stakers with which they engage. Alices may attempt price optimization strategies to find the cheapest group of Ursulas.
@ -24,7 +24,7 @@ The minimum sum of fees a staker can receive period-to-period is the product of
Global fee range
----------------
The global fee range is a means of establishing quasi-universal pricing for the NuCypher service. It is enforced via the function ``feeRateRange`` in ``PolicyManager.sol``, which specifies per sharing policy and per 24h period constraints expressed in **WEI**. Note that elsewhere, fee rates are discussed in **GWEI** and fiat (USD).
The global fee range is a means of establishing quasi-universal pricing for the NuCypher service. It is enforced via the function ``feeRateRange`` in ``PolicyManager.sol``, which specifies per sharing policy and per period (7 days) constraints expressed in **WEI**. Note that elsewhere, fee rates are discussed in **GWEI** and fiat (USD).
The minimum fee rate chosen by stakers must fall within the global fee range. The network will launch with the following parameters:
@ -55,6 +55,10 @@ Given its high enforceability, the presence of an inflexible fee range dictating
The Pricing Protocol & Economics paper_ serves as a resource for community debate, proposals for modification, and DAO-driven upgrades/redeployments in the future. The paper discusses the merits and risks of quasi-universal pricing and the enforcement of an upper and lower bound on all offered price points. It introduces a price point analysis from a demand-side, service-side and theoretical standpoint to produce the provisional constraints in absolute terms that the network will launch with (above).
.. note::
This Pricing Protocol & Economics paper was originally written when period lengths were 24 hours; period lengths are now 7 days but the core principles still apply.
Setting a discretionary fee rate
--------------------------------

View File

@ -3,7 +3,7 @@
Sub-stakes
==========
A staker may extend the unlock period for any number of portions of their total stake. This divides the stake into smaller parts, each with a unique unlock date in the future. Stakers may also acquire and lock new tokens. The total stake is represented as the sum of all the different sub-stakes active in a given period (new period every 24h), which includes locked sub-stakes, and any sub-stakes that have passed their unlock date, and can be freely withdrawn.
A staker may extend the unlock period for any number of portions of their total stake. This divides the stake into smaller parts, each with a unique unlock date in the future. Stakers may also acquire and lock new tokens. The total stake is represented as the sum of all the different sub-stakes active in a given period (new period every 7 days), which includes locked sub-stakes, and any sub-stakes that have passed their unlock date, and can be freely withdrawn.
Each sub-stake has:

View File

@ -48,7 +48,10 @@ Glossary
1 NU = 10\ :sup:`18` NuNits.
Period
A timeframe of approximately a day in the NuCypher Network.
A timeframe of approximately 7 days in the NuCypher Network. This parameter is used as a minimum unit for policy
duration, and is also the cadence with which workers must make an on-chain commitment to being online and
available. Note that period durations were 24 hours in the genesis (previous) protocol and could change again in the
future.
PKE
Public-key encryption.

View File

@ -133,6 +133,9 @@ Whitepapers
architecture/sub_stakes
architecture/slashing
architecture/service_fees
architecture/period_duration
.. TODO perhaps categorize architecture section
.. toctree::
:maxdepth: 1

View File

@ -12,7 +12,7 @@ Staker Overview
A nucypher staker is a holder of NU and manager of one or more stakes. NU is an ERC-20 token that underpins the network. Stakes are initiated by locking NU into
the *"Staking Escrow "* contract for a fixed duration of time. Staked NU earns two income streams: inflation
rewards (NU) and policy fees (ETH). Staked NU gradually unlocks with each completed period (24 hours),
rewards (NU) and policy fees (ETH). Staked NU gradually unlocks with each completed period (7 days),
depending on *re-stake* and *wind-down* configuration options.
Active network participation (work) is delegated to a *Worker* node through *bonding*.
@ -28,7 +28,7 @@ Worker Overview
The Worker is the bonded delegate of a Staker and an active network node, performing work on behalf of a Staker.
Workers must remain online to provide uninterrupted services on-demand, signalling their availability with
commitment transactions every period (24 hours).
a commitment transaction before the start of each period (every 7 days), which costs approximately 200k gas.
Staker and Worker Delegation

View File

@ -96,7 +96,7 @@ Some examples:
> worker address: 0xe88bF385a6ed8C86aA153f08F999d8698B5326e0
> rest url: https://xxx.xxx.xxx.xxx:9151
> missing commitments: 0
> last committed period: 18601
> last committed period: 2657
> ETH: 0.xxx
> provider: https://mainnet.infura.io/v3/xxxx
> ursula docker image: "nucypher/nucypher:latest"

View File

@ -92,7 +92,7 @@ workers can use, a software based wallet is the easiest.
Before proceeding it is important to know that the worker must spend ETH to unlock staked NU.
Periodic automated commitments are required to signal continued availability. Currently, Worker
nodes must perform one commitment transaction every 24 hours each costing ~200k gas.
nodes must perform one commitment transaction every 7 days each costing ~200k gas.
Use the `--max-gas-price` option to set the maximum commitment gas price you are willing to spend.
Workers will automatically retry and replace any previous commitment attempts. Too low of a gas price

View File

@ -34,8 +34,8 @@ Staking Procedure
.. caution::
Once NU is locked in the staking escrow contract, a worker node must be run to unlock it. Worker's make
periodic automated commitments which spend ~200k gas each transaction. Be sure to consider this operational
cost when locking NU.
periodic automated commitments (every 7 days) which cost at least ~200k gas, depending on how many sub-stakes
you have. Be sure to consider this operational cost when locking NU.
.. note::
@ -149,51 +149,45 @@ the commitment period.
Before proceeding it is important to know that the worker must spend ETH to unlock staked NU.
Once tokens are locked, the only way for them to become unlocked is by running a bonded Worker node.
Currently, Worker nodes must perform one automated transaction every 24 hours costing ~200k gas.
Currently, Worker nodes must perform one automated transaction every 7 days costing ~200k gas.
.. code:: bash
(nucypher)$ nucypher stake create
Account
-- ------------------------------------------
0 0x63e478bc474eBb6c31568ff131cCd95C24bfD552
1 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f
2 0x45D33d1Ff0A7E696556f36DE697E5C92C2CCcFaE
Select index of staking account [0]: 1
Selected 1: 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f
Enter stake value in NU (15000 NU - 30000 NU) [30000]: 30000
Enter stake duration (30 - 47103) [365]: 30
Enter ethereum account password (0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf):
Enter stake value in NU (15000 NU - 45000 NU) [45000]: 45000
Enter stake duration (4 - 62863) [52]: 4
══════════════════════════════ STAGED STAKE ══════════════════════════════
Staking address: 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f
Staking address: 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf
~ Chain -> ID # <CHAIN_ID>
~ Value -> 30000 NU (30000000000000000000000 NuNits)
~ Duration -> 30 Days (30 Periods)
~ Enactment -> Jun 19 20:00 EDT (period #18433)
~ Expiration -> Jul 19 20:00 EDT (period #18463)
~ Value -> 45000 NU (45000000000000000000000 NuNits)
~ Duration -> 28 Days (4 Periods)
~ Enactment -> Mar 24 2021 17:00 PDT (period #2673)
~ Expiration -> Apr 21 2021 17:00 PDT (period #2677)
═════════════════════════════════════════════════════════════════════════
* Ursula Node Operator Notice *
-------------------------------
By agreeing to stake 30000 NU (30000000000000000000000 NuNits):
By agreeing to stake 45000 NU (45000000000000000000000 NuNits):
- Staked tokens will be locked for the stake duration.
- You are obligated to maintain a networked and available Ursula-Worker node
bonded to the staker address 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f for the duration
of the stake(s) (30 periods).
bonded to the staker address 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf for the duration
of the stake(s) (4 periods).
- Agree to allow NuCypher network users to carry out uninterrupted re-encryption
work orders at-will without interference.
Failure to keep your node online, or violation of re-encryption work orders
will result in the loss of staked tokens as described in the NuCypher slashing protocol.
Failure to keep your node online or fulfill re-encryption work orders will result
in loss of staked NU as described in the NuCypher slashing protocol:
https://docs.nucypher.com/en/latest/architecture/slashing.html.
Keeping your Ursula node online during the staking period and successfully
producing correct re-encryption work orders will result in rewards
@ -201,6 +195,19 @@ the commitment period.
Accept ursula node operator obligation? [y/N]: y
Publish staged stake to the blockchain? [y/N]: y
Broadcasting APPROVEANDCALL Transaction (0.0821491982 ETH @ 261.575 gwei)
TXHASH 0xf4fc7d6b674c83e4fd99fef64e194b7455fc4438a639e2973b09f09f3493ad10
Waiting 600 seconds for receipt
Stake initialization transaction was successful.
...
StakingEscrow address: 0x40Ca356d8180Ddc21C82263F9EbCeaAc6Cad7250
View your stakes by running 'nucypher stake list'
or set your Ursula worker node address by running 'nucypher stake bond-worker'.
See https://docs.nucypher.com/en/latest/staking/running_a_worker.html
You will need to confirm two transactions here.
@ -216,20 +223,22 @@ Once you have created one or more stakes, you can view all active stakes for con
(nucypher)$ nucypher stake list
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f ════
Worker NO_WORKER_BONDED ════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker not bonded ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes (Unlocked)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╡
│ 0 │ 30000 NU │ 31 │ Jun 19 2020 │ Jul 19 2020 │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╛
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 45000 NU │ 5 │ Mar 24 2021 │ Apr 21 2021 │ DIVISIBLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
If the Worker in the list is shown as ``NO_WORKER_BONDED``, it means that you haven't yet
bonded a Worker node to your Staker.
@ -246,21 +255,17 @@ bonded a Worker node to your Staker.
After initiating a stake, the staker must delegate access to a work address through *bonding*.
There is a 1:1 relationship between the roles: A Staker may have multiple substakes but only ever has one Worker at a time.
.. important:: The Worker cannot be changed for a minimum of 2 periods (48 hours) once bonded.
.. important:: The Worker cannot be changed for a minimum of 2 periods (14 days) once bonded.
.. code:: bash
(nucypher)$ nucypher stake bond-worker
Enter ethereum account password (0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf):
Enter worker address: 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10
Commit to bonding worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 to staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf for a minimum of 2 periods? [y/N]: y
...
This worker can be replaced or detached after period #2674 (2021-04-01 00:00:00+00:00)
Account
-- ------------------------------------------
0 0x63e478bc474eBb6c31568ff131cCd95C24bfD552
1 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f
2 0x45D33d1Ff0A7E696556f36DE697E5C92C2CCcFaE
Select index of staking account [0]: 1
Selected 1: 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f
Enter worker address: 0x45D33d1Ff0A7E696556f36DE697E5C92C2CCcFaE
Commit to bonding worker 0x45D33d1Ff0A7E696556f36DE697E5C92C2CCcFaE to staker 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f for a minimum of 2 periods? [y/N]: y
.. note::

View File

@ -59,6 +59,55 @@ stake's duration is not shorter than the minimum. To prolong an existing stake's
(nucypher)$ nucypher stake prolong --hw-wallet
Enter ethereum account password (0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf):
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 30000 NU │ 5 │ Mar 24 2021 │ Apr 21 2021 │ DIVISIBLE │
├───────┼──────────┼─────────────┼─────────────┼───────────────┼───────────┤
│ 1 │ 15000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ EDITABLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
Select Stake (0, 1): 0
Enter number of periods to extend (1-62859): 4
Publish stake extension of 4 period(s) to the blockchain? [y/N]: y
Broadcasting PROLONGSTAKE Transaction (0.012197658 ETH @ 274 gwei)
TXHASH 0x049b98200c5949b75aa265ad4155f4ba02cb17a0309b16093bd7003c59fefb74
Waiting 600 seconds for receipt
Successfully Prolonged Stake
...
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 30000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ DIVISIBLE │
├───────┼──────────┼─────────────┼─────────────┼───────────────┼───────────┤
│ 1 │ 15000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ EDITABLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
Wind Down
~~~~~~~~~
@ -118,54 +167,71 @@ To divide an existing stake:
.. code:: bash
(nucypher)$ nucypher stake divide --hw-wallet
Enter ethereum account password (0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf):
NOTE: Showing divisible stakes only
Select Stake: 0
Enter target value (15000 NU - 16437.841006996376688377 NU): 15000
Enter number of periods to extend: 20
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 45000 NU │ 5 │ Mar 24 2021 │ Apr 21 2021 │ DIVISIBLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
Select Stake (0): 0
Enter target value (15000 NU - 30000 NU): 15000
Enter number of periods to extend: 4
══════════════════════════════ ORIGINAL STAKE ════════════════════════════
Staking address: 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f
~ Original Stake: | - | 0x270b | 0x45D3 | 0 | 31437.841006996376688377 NU | 33 periods . | Jun 19 20:00 EDT - Jul 22 20:00 EDT
Staking address: 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf
~ Original Stake: | - | 0xB548 | 0 | 45000 NU | 4 periods | Mar 24 17:00 PDT - Apr 21 17:00 PDT
══════════════════════════════ STAGED STAKE ══════════════════════════════
Staking address: 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f
~ Chain -> ID # 4 | Rinkeby
Staking address: 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf
~ Chain -> ID <CHAIN_ID>
~ Value -> 15000 NU (15000000000000000000000 NuNits)
~ Duration -> 53 Days (53 Periods)
~ Enactment -> Jun 19 20:00 EDT (period #18433)
~ Expiration -> Aug 11 20:00 EDT (period #18486)
~ Duration -> 56 Days (8 Periods)
~ Enactment -> Mar 24 2021 17:00 PDT (period #2673)
~ Expiration -> May 19 2021 17:00 PDT (period #2681)
═════════════════════════════════════════════════════════════════════════
Publish stake division to the blockchain? [y/N]: y
Enter password to unlock account 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f:
Confirm transaction DIVIDESTAKE on hardware wallet... (76058 gwei @ 1000000000)
Broadcasting DIVIDESTAKE Transaction (76058 gwei @ 1000000000)...
Broadcasting DIVIDESTAKE Transaction (0.019689812 ETH @ 273.5 gwei)
TXHASH 0x641029fcfd4e263dc38774c5510f539f50c00004941ed0c4c737e53b67ade024
Waiting 600 seconds for receipt
Successfully divided stake
OK | 0x74ddd647de6eaca7ef0c485706ef526001d959a3c2eaa98699e087a7d259d08b (75349 gas)
Block #6711982 | 0xd1c6d6df257ecd05632550565edb709ae577066a60ca433bc4d23de5fb332009
See https://rinkeby.etherscan.io/tx/0x74ddd647de6eaca7ef0c485706ef526001d959a3c2eaa98699e087a7d259d08b
...
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0x270b3f8af5ba2B79ea3Bd6a6Efc7ecAB056d3E3f ════
Worker 0x45D33d1Ff0A7E696556f36DE697E5C92C2CCcFaE ════
-------------- ----------------
Status Committed #18436
Restaking Yes (Unlocked)
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 0 ETH
-------------- ----------------
╒═══════╤═════════════════════════════╤═════════════╤═════════════╤═══════════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │
╞═══════╪═════════════════════════════╪═════════════╪═════════════╪═══════════════╡
0 │ 16437.841006996376688377 NU │ 31 │ Jun 19 2020 │ Jul 22 2020
├───────┼─────────────────────────────┼─────────────┼─────────────┼───────────────┤
1 │ 15000 NU │ 51 │ Jun 19 2020 │ Aug 11 2020
╘═══════╧═════════════════════════════╧═════════════╧═════════════╧═══════════════╛
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤═══════════════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪═══════════════════════╪═════════════╪═══════════════╪═══════════╡
0 │ 30000 NU │ 5 │ Mar 24 2021 │ Apr 21 2021 │ DIVISIBLE
├───────┼───────────────────────┼─────────────┼───────────────┼───────────┤
1 │ 15000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ EDITABLE
╘═══════╧═══════════════════════╧═════════════╧═══════════════╧═══════════╛
Increase
@ -188,6 +254,73 @@ This can help to decrease gas consumption in some operations. To merge two stake
.. code:: bash
(nucypher)$ nucypher stake merge --hw-wallet
Enter ethereum account password (0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf):
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 30000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ DIVISIBLE │
├───────┼──────────┼─────────────┼─────────────┼───────────────┼───────────┤
│ 1 │ 15000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ EDITABLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
Select Stake (0, 1): 0
NOTE: Showing stakes with 2680 final period only
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪══════════╡
│ 1 │ 15000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ EDITABLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧══════════╛
Select Stake (1): 1
Publish merging of 0 and 1 stakes? [y/N]: y
Broadcasting MERGESTAKE Transaction (0.013509688 ETH @ 278 gwei)
TXHASH 0xef5ac787a22fc9a0a3e13a173e6e6db7603ec0be4473084d8b2b06a414328d62
Waiting 600 seconds for receipt
Successfully Merged Stakes
...
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 45000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ DIVISIBLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
Note that some sub-stakes are inactive: [1]
Run `nucypher stake list --all` to show all sub-stakes.
Run `nucypher stake remove-inactive --all` to remove inactive sub-stakes; removal of inactive sub-stakes will reduce commitment gas costs.
Remove inactive sub-stake
@ -195,8 +328,8 @@ Remove inactive sub-stake
When sub-stakes terminate, are merged or edited,
there may be 'unused', inactive sub-stakes remaining on-chain.
Continued tracking of these unused sub-stakes adds unnecessary gas costs to daily operations.
Consequently, removal of unused sub-stakes will reduce daily gas costs.
Continued tracking of these unused sub-stakes adds unnecessary gas costs to node commitment operations.
Consequently, removal of unused sub-stakes will reduce per period gas costs.
Unused sub-stakes can be displayed by listing all sub-stakes
and will be indicated by the ``INACTIVE`` status label.
@ -204,16 +337,24 @@ and will be indicated by the ``INACTIVE`` status label.
.. code:: bash
(nucypher)$ nucypher stake list --all --hw-wallet
...
╒═══════╤═══════════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪═══════════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 123456.789 NU │ -4 │ Oct 15 2020 │ Nov 19 2020 │ INACTIVE │
├───────┼───────────────┼─────────────┼─────────────┼───────────────┼───────────┤
│ 1 │ 123456.789 NU │ 27 │ Oct 15 2020 │ Dec 20 2020 │ DIVISIBLE │
├───────┼───────────────┼─────────────┼─────────────┼───────────────┼───────────┤
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 45000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ DIVISIBLE │
├───────┼──────────┼─────────────┼─────────────┼───────────────┼───────────┤
│ 1 │ 15000 NU │ N/A │ Mar 24 2021 │ N/A │ INACTIVE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
To remove an unused sub-stake, run the following command and select the index
@ -222,6 +363,50 @@ of your ``INACTIVE`` sub-stake:
.. code:: bash
(nucypher)$ nucypher stake remove-inactive --hw-wallet
Enter ethereum account password (0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf):
Fetching inactive stakes
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 1 │ 15000 NU │ N/A │ Mar 24 2021 │ N/A │ INACTIVE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
Select Stake (1): 1
Publish removal of 1 stake? [y/N]: y
Broadcasting REMOVEUNUSEDSUBSTAKE Transaction (0.012804726 ETH @ 288.2 gwei)
TXHASH 0x942a70ee2adb5078fa6d8fa468f28d3e35386f90247035fdb5d19c34836200a0
Waiting 600 seconds for receipt
Successfully Removed Stake
...
Network <NETWORK_NAME> ═══════════════════════════════
Staker 0xB548378f13e9A2C7bEf66B890B46F2eD6Ed87fCf ════
Worker 0x6cf78fE4bD2a6573046d17f72f4C20462124Aa10 ════
-------------- -----------------------------------
Status Never Made a Commitment (New Stake)
Restaking Yes
Winding Down No
Snapshots Yes
Unclaimed Fees 0 ETH
Min fee rate 50 gwei
-------------- -----------------------------------
╒═══════╤══════════╤═════════════╤═════════════╤═══════════════╤═══════════╕
│ Idx │ Value │ Remaining │ Enactment │ Termination │ Status │
╞═══════╪══════════╪═════════════╪═════════════╪═══════════════╪═══════════╡
│ 0 │ 45000 NU │ 9 │ Mar 24 2021 │ May 19 2021 │ DIVISIBLE │
╘═══════╧══════════╧═════════════╧═════════════╧═══════════════╧═══════════╛
In order to make the operation as simple and cheap as possible,
@ -229,6 +414,9 @@ the removal algorithm simply relocates the last active sub-stake to the slot
occupied by the currently inactive one, so you will notice a slight
re-ordering of your sub-stakes. This is normal and doesn't have any negative implications.
For your convenience, run ``nucypher stake remove-inactive --all`` to remove all inactive sub-stakes using
one CLI command to execute a series of removal transactions.
Collect Staker Rewards
~~~~~~~~~~~~~~~~~~~~~~

View File

@ -26,10 +26,17 @@ NuCypher currently has two testnets available, each of them with different goals
* ``lynx``: Public Long-Term Support testnet, intended as a stable playground for network users (e.g., Alices wishing to create sharing policies). Running on Ethereum Goerli testnet.
* ``ibex``: Public testnet, intended as a playground for stakers and node operators (e.g., learning how to create and manage stakes, setting up a node), as well as for internal development purposes. Running on Ethereun Rinkeby testnet.
Q: How long is a period?
~~~~~~~~~~~~~~~~~~~~~~~~
Q: What is a period and how long is it?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 period is 24 hours. Periods begin at midnight UTC.
In the NuCypher protocol, a Period is the minimum unit of time. This applies to sharing policy durations, and
also corresponds to the frequency that Workers must make an on-chain commitment to being online and available
to provide service.
1 period is 7 days, and periods always start on Thursdays at midnight UTC.
At Network launch, 1 period was 24 hours, but this was updated by a NuCypher DAO proposal to be
7 days (see :doc:`/architecture/period_duration`).
Using the Network
@ -161,7 +168,7 @@ Participation in WorkLock is now closed, but since NU is an ERC-20 token, it can
Q: When/Why does a node operator need to use ``mint`` command?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The period following stake termination or later, but before withdrawing escrowed tokens. Each node on the NuCypher network sends daily transactions signalling continued commitment to providing service, and to calculation of NU rewards for prior periods ("minting"). At the final day/period of a stake, automatic minting will stop and intervention is required to complete the final minting calculation by calling ``mint`` manually.
The period following stake termination or later, but before withdrawing escrowed tokens. Each node on the NuCypher network sends per period commitment transactions signalling continued commitment to providing service, and to calculation of NU rewards for prior periods ("minting"). At the final period of a stake, automatic minting will stop and intervention is required to complete the final minting calculation by calling ``mint`` manually.
Q: What are the recommended specifications for running a nucypher node?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~