0xPolygon / polygon-edge

A Framework for Building Ethereum-compatible Blockchain Networks
https://polygon.technology/solutions/polygon-edge/
Apache License 2.0
1.01k stars 533 forks source link

How to add remote validators to a Supernet? #2108

Closed sahil3Vedi closed 8 months ago

sahil3Vedi commented 9 months ago

Adding Remote Validators to a Supernet

Description

For both docker and manual setups, we'd like some guide / recommended steps for setting up a remote validator and connecting it to an existing Supernet's bootnodes. We've been able to connect new local validators to an existing Supernet, but have been unable to do it with remote validators.

saurabh-lodha-16 commented 9 months ago

@Stefan-Ethernal sorry to tag you directly but would love to know a basic guide to achieve this. Thanks.

Stefan-Ethernal commented 9 months ago

It should be done by following the steps (however note that I haven't tested it personally in the past, so it might be possible that this use case is not working. The concern I have is whether discovery network protocol is able to discover those new nodes that are added on fly and belong to the different network):

An example of how it is done is found here. Note that administrator of the network is indeed the account which was used when running the rootchain deploy and the polybft supernet commands.

saurabh-lodha-16 commented 9 months ago

I understand. Thanks a lot once again for explaining this. They way I did was copying the genesis file to the remote validator. Then whitelisted the validator on the node which is my bootnode. The register and stake validator worked and the new node was able to join the network.

This issue was created at the genesis case where we want to setup the 4 nodes on different instances. Would love to know your thoughts for this in brief.

Stefan-Ethernal commented 8 months ago

This issue was created at the genesis case where we want to setup the 4 nodes on different instances. Would love to know your thoughts for this in brief.

Ok so when you are bootstrapping the network, there is the --validators flag in the genesis command. You should specify validators in the following format: <P2P multi address>:<ECDSA address>:<public BLS key> and you should be good to go.

saurabh-lodha-16 commented 8 months ago

Yes I managed to do this. I looked at the terraform configuration as well and managed to make this work. Thanks a lot once again.

We can close this