go-tableland
go-tableland copied to clipboard
[GOT-32] Reconsider the .json validator configuration file
The current config.json
validation configuration file looks reasonable, but I believe it has some problems.
In the same configuration file, we have two big groups of configurations:
- Protocol level configurations:
TableContraints
,QueryConstraints
, SC-addresses, etc. - Validator level configurations: wallet addresses, private keys, port numbers, etc.
In my opinion, a problem arises when we do some protocol-level configuration change. If people use that config.json
configuration file with docker-compose, if we edit any field, it might conflict with any other edition the validator has done in the file. For example, it feels very odd if the validator edited the port number or any other validator-related configuration.
Moreover, the "Protocol level configuration" fields shouldn't be changed by validators since they're part of the protocol. This makes the config.json
file be somewhat confusing.
If I'm a validator, and I look at config.json
, it isn't clear which fields I can change and which ones I must not change.
I feel it would be better to have these two groups live in different places. For example, it might make sense to leave the protocol level configurations hard-coded and migrated by the code in the SQLite table and not in the config file. (This is just an idea).
We should reflect on this and see if we can do better. Open to suggestions.