Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

[CLI] Validate Burrow config #1461

Open
silasdavis opened this issue Mar 18, 2021 · 0 comments
Open

[CLI] Validate Burrow config #1461

silasdavis opened this issue Mar 18, 2021 · 0 comments

Comments

@silasdavis
Copy link
Contributor

Currently we do very limited validation on a Burrow config: https://github.com/hyperledger/burrow/blob/main/config/config.go#L46-L51

We really ought to report unknown keys as this can help with typos and particularly with case variation. We currently use some jsonschema libraries to validate Vent projections: https://github.com/hyperledger/burrow/blob/main/config/config.go#L46-L51

This works nicely and doesn't require much configuration since all fields without json:omitempty are considered required by default so that takes care of most optionality and it will complain about extra fields out of the box. However we use some custom parsing so it does need a bit of work, we also support quite complex methods for aggregating a config from multiple sources (like separate genesis file, reading keys from stdin, etc) so it's not totally straight forward.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant