Skip to content

Latest commit

 

History

History
201 lines (129 loc) · 8.29 KB

File metadata and controls

201 lines (129 loc) · 8.29 KB

Network Registry

To test HOPR protocol and develop dApps on top of HOPR at a resonable scale, nodes are only allowed to join the network (sending messages) if they are registered on a "Network Registry" smart contract.

This restriction on the access guarded by the "Network Registry" is only enabled in the staging or production environment by default.
If you are running a cluster of HOPR nodes locally in the anvil network, the "Network Registry" is not enabled.

There are two ways of registering a node:

  • By the node runner itself, providing the node runner is eligible; or
  • By the owner of the HoprNetworkRegistry smart contract

Relevant smart contracts are listed below, per environment (to be updated):

Contract Production
HoprNetworkRegistry 0x582b4b586168621dAf83bEb2AeADb5fb20F8d50d
HoprNetworkRegistryProxy 0x2bc6b78B0aA892e97714F0e3b1c74487f92C5884

Register a node by the runner

Self registration is currently disabled.

Register a node

An eligible node runner can call selfRegister(address[] nodeAddresses) method on HoprNetworkRegistry smart contract to register one or multiple HOPR node(s). This function should be called from the Safe holding HOPR token assets.

Deregister a node

A node runner can call selfDeregister(address[] nodeAddresses) method on HoprNetworkRegistry smart contract to remove previously registered HOPR nodes. This function should be called from the Safe holding HOPR token assets.

Register a node by the Network Registry contract owner

Eligibility

Owner can register any account for any node. The eligibility of an account is not going to be checked unless a sync method for that account gets called.

Register a node

Owner can call managerRegister(address[] accounts, address[] nodeAddresses) method from HoprNetworkRegistry smart contract to register a list of HOPR nodes for a list of accounts respectively. Note that this registration can overwrite existing entries.

make register-nodes network=rotsee environment_type=staging staking_addresses=<address1,address2,address3,address4> node_addresses=<nodeAddress1,nodeAddress2,nodeAddress3,nodeAddress4>

Deregister a node

Owner can call managerDeregister(address[] nodeAddresses) method from HoprNetworkRegistry smart contract to remove a list of nodes.

make deregister-nodes network=rotsee environment_type=staging node_addresses=<nodeAddress1,nodeAddress2>

Enable and disable globally

As mentioned in the beginning, by default, Network Registry is enabled for staging envirionment and disabled in the local network. To toggle the network registry, the following method can be called

make disable-network-registry network=rotsee environment_type=staging

or

make enable-network-registry network=rotsee environment_type=staging