mx-chain-go
mx-chain-go copied to clipboard
[FEAT] Launching API only node
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
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!
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.
@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.
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.
The release was done so we can close this issue. Thanks for reporting.