diem/diem · error

Invalid entrypoint: {}

Error message

Invalid entrypoint: {}

What it means

The Move Prover's entrypoint parser expects a fully-qualified function name with exactly three '::'-separated segments: <address>::<module_name>::<function_name>. This error means the string passed as the entrypoint did not split into exactly 3 parts.

Source

Thrown at language/move-prover/interpreter/src/lib.rs:70

    #[structopt(long = "args", parse(try_from_str = parse_transaction_argument))]
    pub args: Vec<TransactionArgument>,
    /// Possibly-empty list of type arguments passed to the transaction (e.g., `T` in
    /// `main<T>()`). Must match the type arguments kinds expected by `script_file`.
    #[structopt(long = "ty-args", parse(try_from_str = parse_type_tag))]
    pub ty_args: Vec<TypeTag>,

    /// Skip checking of expressions
    #[structopt(long = "no-expr-check")]
    pub no_expr_check: bool,
    /// Level of verbosity
    #[structopt(short = "v", long = "verbose")]
    pub verbose: Option<u64>,
}

fn parse_entrypoint(input: &str) -> Result<(ModuleId, Identifier)> {
    let tokens: Vec<_> = input.split("::").collect();
    if tokens.len() != 3 {
        bail!("Invalid entrypoint: {}", input);
    }
    let module_id = ModuleId::new(
        AccountAddress::from_hex_literal(tokens[0])?,
        Identifier::new(tokens[1])?,
    );
    let func_name = Identifier::new(tokens[2])?;
    Ok((module_id, func_name))
}

#[derive(Debug, Eq, PartialEq)]
struct ExecutionResult {
    vm_result: VMResult<Vec<TypedValue>>,
    global_state: GlobalState,
}

//**************************************************************************************************
// Entry
//**************************************************************************************************

View on GitHub (pinned to fc4714a8ea)

Solutions

  1. Pass the entrypoint as three '::'-separated segments, e.g. '0x1::M::f'.
  2. Check that the address is a hex literal like 0x1 and the module/function names are valid identifiers.
  3. Quote the entrypoint in your shell so '::' is not mangled.

Example fix

// before
let ep = "0x1::MyModule";
// after
let ep = "0x1::MyModule::my_function";
Defensive patterns

Strategy: validation

Validate before calling

fn valid_entrypoint(ep: &str) -> bool { ep.split("::").count() == 3 }
assert!(valid_entrypoint("0x1::M::f"));

Try / catch

match parse_entrypoint(ep) {
    Ok((module, name)) => run(module, name),
    Err(e) => eprintln!("bad --entrypoint '{}': {}", ep, e),
}

Prevention

When it happens

Trigger: Calling the prover CLI/boogie benchmark runner with an entrypoint like '0x1::M' (2 segments) or 'a::b::c::d' (4 segments); passing a bare function name or a path-like string.

Common situations: Typing a module instead of a function, forgetting the address prefix, or scripting the prover with extra :: segments from a partially qualified name.

Related errors


AI-assisted analysis of diem/diem@fc4714a8ea (2026-09-04). Data as JSON: /api/errors/a15872ffbbb67f43. Report an issue: GitHub.