There are more and more use cases that would benefit from being able to ‘live-change’ the running neard binary (from enabling/disabling debug, changing number of peers, planning a shutdown at a given height etc etc).
There are 3 approaches that we’re considering, and we’re curious for the community feedback (especially from people who are running validator nodes).
create ‘dynamic-config.json’ file – that would live next to ‘config.json’. And it would be read either on each change, or when process receives signal.
open a separate port - to which you could send RPC requests that would modify the config.
add another ‘path’ to the :3030 port (same way how we have a ‘debug’ path there) - and have RPC served there.
The changes that can be done via this API will BE DANGEROUS - so we want to make sure that we pick the method that is easiest for you to secure.
If we had mechanism like this, then things like swapping keys (I assume you’re talking about the validator keys?) would be technically possible.
(But there are some other considerations - from message routing, to approval heights etc).
If this is something that you’re interested in - let’s create a separate topic and we can discuss the details there.
Ok - as there were no strong suggestions or preferences over the last week - I’d suggest going with the option that @matklad mentioned – having a separate config file that would be read when process receives a signal.