Callcium

Overview

Normative binary format specifications for Callcium.

Callcium defines two binary formats: one for describing ABI types, one for encoding constraint policies. These specifications are normative — they define the wire format precisely enough to audit a policy blob, verify encoding edge cases, or build tooling that parses the binary format directly.

If you are using the Solidity library, you do not need to read these. The builder and enforcer handle all encoding and traversal internally.

When to read the specs

  • You are auditing a policy blob and need to verify its encoding byte-by-byte.
  • You are writing tooling — a policy debugger, calldata simulator, or offchain decoder — that parses the binary format.
  • You need authoritative answers on edge case semantics: quantifier behavior on empty arrays, canonicalization requirements, contradiction detection rules.

Specifications

SpecVersionStatusDescription
Descriptorv2.0NormativeBinary encoding of ABI types. Used by policies to describe the shape of calldata they constrain.
Policyv3.0NormativeBinary encoding of constraint policies. Defines wire format, canonicalization rules, and evaluation semantics.

Versioning

Both specs are versioned independently. The document version tracks spec revisions. The wire format version is distinct and embedded in each blob's header. A policy header carries a major and a minor version; a minor version assigns reserved values and never changes the meaning of a blob an earlier minor accepts.

Set ordering

IN members are stored strictly ascending by their loaded 32-byte words, compared unsigned, so an enforcer can binary-search the set. The order is defined on the loaded words, not on numeric values: a signed constant loads sign-extended, so negative values (0xFF… in two's complement) sort after positive ones. A set {-1, 0, 1} is stored as [0, 1, -1], because 0x00..00 < 0x00..01 < 0xFF..FF.

On this page