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 | Staging | Production |
---|---|---|
xHOPR | 0xe8aD2ac347dA7549Aaca8F5B1c5Bf979d85bC78F | 0xD057604A14982FE8D88c5fC25Aac3267eA142a08 |
HOPR Boost | 0xd7ECa0E90cD85b08875E7d10d4D25B274C6CC549 | 0x43d13D7B83607F14335cF2cB75E87dA369D056c7 |
HOPR Stake (Season 3) | 0x0d4Ec37e692BcD36FE7dDcB37a14358d7F44d72C | 0xae933331ef0bE122f9499512d3ed4Fa3896DCf20 |
HoprNetworkRegistry | 0x3e5AA27125C90686444b2d093BFe9b843E82D2F5 | |
HoprNetworkRegistryProxy | 0x3ee6e1eaE59C44EC30bc5e8FEeE587f95C9F2626 |
To be updated
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.
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.
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.
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>
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>
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