Vouch can be configured through environment, command-line or configuration file. In the case of conflicting configuration the order of precedence is:
- command-line; then
- environment; then
- configuration file.
# The configuration file
Vouch's configuration file can be written in JSON or YAML. The file can either be in the user's home directory, in which case it will be called `.vouch.json` (or `.vouch.yml`), or it can be in a directory specified by the command line option `--base-dir` or environment variable `VOUCH_BASE_DIR`, in which case it will be called `vouch.json` (or `vouch.yml`).
A sample configuration file in YAML with is shown below:
```
# log-file is the location for Vouch log output. If this is not provided logs will be written to the console.
log-file: /home/me/vouch.log
# log-level is the global log level for Vouch logging.
log-level: Debug
# beacon-node-address is the address of the beacon node. Can be prysm, lighthouse, teku
beacon-node-address: localhost:4000
# metrics is the module that logs metrics, in this case using prometheus.
metrics:
prometheus:
# log-level is the log level for this module, over-riding the global level.
log-level: warn
# listen-address is the address on which prometheus listens for metrics requests.
listen-address: 0.0.0.0:8081
# graffiti provides graffiti data. Full details are in the separate document.
Vouch has a modular logging system that allows different modules to log at different levels. The available log levels are:
- **Fatal**: messages that result in Vouch stopping immediately;
- **Error**: messages due to Vouch being unable to fulfil a valid process;
- **Warning**: messages that result in Vouch not completing a process due to transient or user issues;
- **Information**: messages that are part of Vouch's normal startup and shutdown process;
- **Debug**: messages when one of Vouch's processes diverge from normal operations;
- **Trace**: messages that detail the flow of Vouch's normal operations; or
- **None**: no messages are written.
### Global level
The global level is used for all modules that do not have an explicit log level. This can be configured using the command line option `--log-level`, the environment variable `VOUCH_LOG_LEVEL` or the configuration option `log-level`.
### Module levels
Modules levels are used for each module, overriding the global log level. The available modules are:
- **accountmanager** access to validating accounts
This can be configured using the environment variables `VOUCH_<MODULE>_LOG_LEVEL` or the configuration option `<module>.log-level`. For example, the controller module logging could be configured using the environment variable `VOUCH_CONTROLLER_LOG_LEVEL` or the configuration option `controller.log-level`.
Advanced options can change the performance of Vouch to be severely detrimental to its operation. It is strongly recommended that these options are not changed unless the user understands completely what they do and their possible performance impact.
### controller.max-attestation-delay
This is a duration parameter, that defaults to `4s`. It defines the maximum time that Vouch will wait from the start of a slot for a block before attesting on the basis that the slot is empty.