Darknode Registry

See Darknodes page:

The Darknode Registry is an Ethereum smart contract used to register Darknodes and define the network configuration for RenVM.

Bond

A bond of 100,000REN is required when registering a Darknode. This bond is slashed in half by the Darknode Slasher when a proof of malicious behaviour is produced. The bond prevents malicious adversaries from registering a large number of Darknodes to gain control over the network.

Epochs

The Darknode Registry partitions time into discrete intervals, called epochs. State changes that affect the configuration of the Darknode network are restricted to these discrete intervals, ensuring the stability of the network configuration during the epoch. This covers the (de)registration of Darknodes, as well as the public constants defined by the Darknode Registry.

Epochs are defined by their block number, and their block hash. Any account can trigger the next epoch, but the Darknode Registry prevents epochs from being triggered faster than the minimumEpochInterval — measured in block numbers.

Darknode Address

Darknodes are identified by their Darknode Address, an array of 20 bytes generated from an ECDSA private key held by the Darknode that is compatible with Ethereum addresses.

Registration

Before a Darknode is included (i.e. other Darknodes acknowledge it as part of the network of Darknodes that runs RenVM), it must have its Darknode Address registered by a Darknode operator. The Darknode operator is the Ethereum account that will receive the fees earned by the Darknode during its operations. The Darknode operator is the only account that can deregister a Darknode, other than the Darknode Slasher.

In the diagram below represents a timeline for the registration, deregistration, and refunding, of a Darknode. The grey boxes represent the discrete time intervals, epochs, and the coloured numbers are used to describe the sequence of events.

The lifecycle of a Darknode. Epochs are represented by grey blocks.

(1) Pending Registration The bond is sent to the Darknode Registry and the Darknode is in the Pending Registration state until the beginning of the next epoch. The account sending this transaction is considered to be the Darknode operator.

(2) Registered The registration is automatically finalised and the Darknode is in the Registered state. The Darknode is considered registered until it reaches the deregistered state at (4).

(3) Pending Deregistration The intent to deregister is sent to the Darknode Registry and the Darknode is in the Pending Deregistration state until the beginning of the next epoch. The Darknode is still considered registered until it reaches the deregistered state at (4).

(4) Deregistered The deregistration is automatically finalised and the Darknode is in the Deregistered state.

(5) Cooling The Darknode is no longer considered active. The bond cannot be refunded until the beginning of the next epoch.

(6) Refunded The intent to refund is sent to the Darknode Registry and the bond is returned to the Darknode operator. The Darknode is removed from the Darknode Registry and can be regsitered again by any account.