Skip to content

Update configuration validation (remove superstruct) #406

@jacobheun

Description

@jacobheun

Currently we use superstruct for config validation. This isn't really necessary and in most instances the validation is very loose. It also doesn't give us support for deep merge of default values, so default values may not get passed to the given module unless they are all explicitly defined.

Rather than restricting validation of the config, we should focus on providing defaults that are sane, and will be deeply merged into any passed configuration. We should do the minimum validation needed for libp2p to run, and create helpful error messages for users about how to correct their configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: Good to have, but can wait until someone steps upexp/noviceSomeone with a little familiarity can pick upkind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions