mx-chain-go icon indicating copy to clipboard operation
mx-chain-go copied to clipboard

[FEAT] Launching API only node

Open miohtama opened this issue 3 years ago • 3 comments

I am not interested in validation, I want to launch a Elrond testnet node only for the sole purpose of RPC API. Is it possible?

Currently the node asks for a mandatory validator key even if I am not interested in participating the validation process:

ERROR[2021-08-21 08:46:01.220]   cryptoComponentsFactory create failed: open /go/elrond-go/cmd/node/config/validatorKey.pem: no such file or directory 
ERROR: 1

miohtama avatar Aug 21 '21 08:08 miohtama

Hello @miohtama ! Thank you for your feedback. By default, any node needs to have a pem file near it. Until staking for that key, it is only an observer, which can be seen as an API-only node. Each node has a public key which can be seen on the heartbeat. A solution would be to generate a new random key when starting without a key, but we prefer that a node has the same public key instead of creating one for each start.

Thanks!

bogdan-rosianu avatar Aug 23 '21 13:08 bogdan-rosianu

Each node has a public key which can be seen on the heartbeat. A solution would be to generate a new random key when starting without a key, but we prefer that a node has the same public key instead of creating one for each start.

Thank you for this.

I suggest for the user experience of node runner, this preference is not warranted. Because an observer node can easily regenerate its keys, there is little reason for to assume they would not do so. I am not sure what is gained by forcing nodes to manually configure keys, making Elrond nodes harder to operate than other blockchain nodes.

miohtama avatar Aug 24 '21 05:08 miohtama

@bogdan-rosianu I am not sure to understand why an RPC API should have a key? For Ethereum or BSC nodes, there is no need for this.

lcswillems avatar Sep 16 '21 06:09 lcswillems

we've added a new flag for the node -no-key in the upcoming v1.4.x mainnet release. https://github.com/multiversx/mx-chain-go/blob/bfd15e65b75af208854229568a2cfcafdff2e767/cmd/node/flags.go#L344 Will close this issue when the rc/v1.4.0 branch will be merged in the master branch.

iulianpascalau avatar Feb 08 '23 11:02 iulianpascalau

The release was done so we can close this issue. Thanks for reporting.

iulianpascalau avatar Feb 20 '23 13:02 iulianpascalau