Skip to main content

Module datadir

Module datadir 

Source
Expand description

zcashd datadir and config-file bootstrap for zcashd-compat mode.

Spec:

  • Zebra may create the supervised zcashd datadir and a first-start config.
  • Zebra must never overwrite an operator-provided config file.
  • The datadir prepared here must match the datadir zcashd will actually use after command-line overrides are applied.
  • Existing configs are audited for known zcashd-compat startup issues, then left unchanged.
  • Missing configs are bootstrapped so zcashd -zebra-compat can start without manual first-run setup.

ConstantsΒ§

BOOTSTRAP_ZCASH_CONF
Minimal config that lets zcashd start in zcashd-compat mode on first use.
DEFAULT_ZCASHD_DATADIR πŸ”’
The default zcashd-compat datadir name under Zebra’s state cache directory.
OVERRIDDEN_P2P_BOOL_OPTIONS πŸ”’
VALIDATION_ERROR_OPTIONS πŸ”’
ZCASH_CONF_FILENAME πŸ”’
The default zcashd config filename.

FunctionsΒ§

audit_zcash_conf πŸ”’
Audits existing configs without modifying them.
effective_zcashd_datadir
Returns the effective datadir used by supervised zcashd.
ensure_zcashd_datadir
Ensures the supervised zcashd datadir and effective config file are ready.
find_conf_arg πŸ”’
Extracts the last valid -conf=<path> value from Zebra’s extra args.
find_datadir_arg πŸ”’
Extracts the last valid -datadir=<path> value from Zebra’s extra args.
find_last_path_arg_value πŸ”’
Extracts the last valid -<name>=<path> value from Zebra’s extra args.
is_truthy πŸ”’
parse_zcash_conf_entries πŸ”’
record_path_arg_value πŸ”’
resolve_zcashd_conf_path πŸ”’
Resolves the last valid -conf=<path> we can infer from extra args.
resolve_zcashd_datadir_path
Applies the last valid -datadir=<path> command-line override, like zcashd.
unique_temp_conf_path πŸ”’
write_bootstrap_zcash_conf πŸ”’
Writes the bootstrap config without clobbering an operator-created file.