diem/diem · error
Invalid Validator Config
Error message
Invalid Validator Config
What it means
The create-release command derives the release name from the --output path's file stem and calls .expect("Empty output path provided") on the Option<PathBuf>. It panics when the output path option was not supplied, because the tool cannot infer where to write or what to name the release.
Source
Thrown at config/management/genesis/src/builder.rs:211
let txn = self
.with_namespace(operator)
.get::<Transaction>(VALIDATOR_CONFIG)
.map(|r| r.value)?;
if let Transaction::UserTransaction(txn) = txn {
Some(txn)
} else {
None
}
.and_then(|txn| {
if let TransactionPayload::ScriptFunction(txn) =
txn.into_raw_transaction().into_payload()
{
Some(txn)
} else {
None
}
})
.ok_or_else(|| anyhow::anyhow!("Invalid Validator Config"))
}
pub fn build(
&self,
chain_id: ChainId,
publishing_option: Option<VMPublishingOption>,
) -> Result<Transaction> {
let diem_root_key = self.root_key()?;
let treasury_compliance_key = self.treasury_compliance_key()?;
let validators = self.validators()?;
let move_modules = self.move_modules()?;
let genesis = vm_genesis::encode_genesis_transaction(
diem_root_key,
treasury_compliance_key,
&validators,
&move_modules,
publishing_option,View on GitHub (pinned to fc4714a8ea)
Solutions
- Pass the required output path, e.g. `--output ./diem-framework-release.mrb` (the file stem becomes the release name)
- Check `writeset-transaction-generator create-release --help` for the exact flag name in your build
- Fix the calling script so the output variable is non-empty before invoking the tool
Example fix
// before writeset-transaction-generator create-release --chain-id 1 --url ... // after writeset-transaction-generator create-release --chain-id 1 --url ... --output ./release.mrb
Defensive patterns
Strategy: validation
Validate before calling
// bash guard before invoking create-release if [ -z "$OUTPUT_PATH" ]; then echo "--output is required" >&2; exit 1; fi
Try / catch
let out = Command::new("writeset-transaction-generator").args(["create-release", "--output", output_path, ...]).output()?;
if !out.status.success() {
eprintln!("create-release failed: {}", String::from_utf8_lossy(&out.stderr));
} Prevention
- Always pass --output with create-release
- Check --help for the flag name in your tool version
- Fail fast in wrapper scripts when the output variable is empty
When it happens
Trigger: Running the writeset-transaction-generator's create-release subcommand without the --output (path) argument, so opt.output is None.
Common situations: Forgetting the --output flag; CLI argument renamed/reordered between versions; scripting the tool with a variable that expands to nothing.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- config must be a FullNode config
- Validator config must be a Validator config
- Invalid faucet URL specified
- Failed to construct faucet URL from JSON-RPC URL
- No debugger attached
AI-assisted analysis of diem/diem@fc4714a8ea (2026-09-04).
Data as JSON: /api/errors/b104c45c91f4a6f8.
Report an issue: GitHub.