unionlabs/union · error

not implemented

Error message

not implemented

What it means

The state-lens ICS23 MPT light client (Movement L2 state read via a lens) implements update_state and membership checks, but its misbehaviour handler is unimplemented!(). Submitting misbehaviour evidence to a union client of this type panics in the contract with "not implemented".

Source

Thrown at cosmwasm/lightclient/state-lens-ics23-mpt/src/client.rs:142

            extract_consensus_state(&header.l2_consensus_state, &client_state.extra);

        let mut state_update = StateUpdate::new(header.l2_height.height(), consensus_state);

        if client_state.l2_latest_height < header.l2_height.height() {
            client_state.l2_latest_height = header.l2_height.height();
            state_update = state_update.overwrite_client_state(client_state)
        }

        Ok(state_update)
    }

    fn misbehaviour(
        _ctx: IbcClientCtx<Self>,
        _caller: Addr,
        _misbehaviour: Self::Misbehaviour,
        _relayer: Addr,
    ) -> Result<Self::ClientState, IbcClientError<Self>> {
        unimplemented!()
    }
}

pub fn extract_consensus_state(
    l2_consensus_state: &Bytes,
    client_state_extra: &Extra,
) -> ConsensusState {
    // NOTE: The timestamp stored by the counterparty is expected to be in nanos.
    let l2_timestamp = Timestamp::from_nanos(extract_uint64(
        l2_consensus_state,
        client_state_extra.timestamp_offset as usize,
    ));

    let l2_state_root = extract_bytes32(
        l2_consensus_state,
        client_state_extra.state_root_offset as usize,
    );

View on GitHub (pinned to 031785bb6d)

Solutions

  1. Exclude state-lens MPT clients from misbehaviour submission in relayer config
  2. Upgrade the deployed client wasm once misbehaviour support is added
  3. If forking, return an IbcClientError (unsupported) instead of unimplemented!() so callers get a clean revert reason
  4. Confirm the intended union IBC spec revision before wiring monitoring to this client
Defensive patterns

Strategy: validation

Validate before calling

const MISBEHAVIOUR_UNSUPPORTED = new Set(["movement", "state-lens-ics23-mpt", "state-lens-ics23-smt"])
if (msg.kind === "misbehaviour" && MISBEHAVIOUR_UNSUPPORTED.has(clientType)) {
  log.warn(`misbehaviour not implemented for ${clientType}; dropping message`)
  return
}

Type guard

const supportsMisbehaviour = (clientType: string) =>
  !new Set(["movement", "state-lens-ics23-mpt", "state-lens-ics23-smt"]).has(clientType)

Prevention

When it happens

Trigger: A relayer submits a misbehaviour message against a state-lens-ics23-mpt client. Because state updates are verified through lens-produced state proofs rather than validator-signed headers, no equivocation evidence is currently defined, and the stub traps.

Common situations: Relayers with misbehaviour monitoring enabled across all clients; shared relayer profiles applied uniformly to every client type in a multi-chain setup.

Related errors


AI-assisted analysis of unionlabs/union@031785bb6d (2026-08-16). Data as JSON: /api/errors/b1c126e044565325. Report an issue: GitHub.