I'm considering different designs to implement "configuration options" with Ethereum.
The design should allow me to define arbitrary (= number and type) options, quick access to a list of options, their values, and validated change of options values.
A naive design would be one contract per config option. That would be a lot of contracts.
web3.js to validate changes to the configuration.
This would, like using normal contracts, allow to share the same code base between all parties. It should be pretty efficient (unless there is a problem with huge strings?).
So far, I'm seeing two drawbacks:
- I couldn't use those config options in the smart contracts directly.
- A malicious party could to submit illegal values (by simply ignoring the validation)
The first one can be solved by adding extra fields in the contracts and keep the values in sync (with all the problems that brings).
The second could be mitigated by people running the validation before trusting config values.
To make this work, I'd need to use
Am I missing something?