Sigil’s programmability is split into three surfaces: a native typed executor for primitives, a privileged WASM system-contract registry for chain policy, and per-organisation WASI zones for user code.

Native typed executor

The native executor handles 58 transaction variants directly in Rust. Each variant has a typed argument struct, a deterministic semantic check, and an apply function that writes to AkashaKV under a typed state partition. The native path is preferred for primitives that benefit from being uniformly available, deterministic, and gas-free: transfers, validator operations, DEX swaps, NFT mints, name registration, mail delivery commitments, mandate issuance, and Vigil callbacks. The executor is split per category in node/sigil-node/src/executor_*.rs. Adding a new primitive is a change to sigil-core (types) and sigil-node (executor), tested under node/sigil-node/tests/.

System contracts

Chain policy lives in privileged WASM system contracts. The registry is deployed at genesis and addressable by canonical name. The full set:
NameOwns
sigil.system.parametersScheduled protocol parameters, activation heights, emission policy.
sigil.system.validator_registryValidator candidates, keys, regions, status.
sigil.system.stakingBonded stake, delegation shares, undelegation queue, slashing accounting.
sigil.system.governanceProposals, votes, timelocks, emergency actions.
sigil.system.treasuryReserve accounts and disbursement ledger.
sigil.system.dexAMM pool policy, fee tiers, listing rules.
sigil.system.computeProvider registry policy, verification tier policy.
sigil.system.laborLabor market policy, dispute multisig, review rules.
System contracts run inside a Wasmtime executor with deterministic gas accounting. They have read access to all state partitions and write access only to their declared partitions. A system-contract upgrade requires a governance proposal under sigil.system.governance plus a 90-day timelock. The upgrade is the only mechanism to change a system contract; there is no admin key.

Organisation zones

Zones are scoped WASI execution environments owned by an organisation DID. A zone can:
  • Deploy private contracts in the zone’s namespace.
  • Hold its own balance.
  • Route messages to other zones through CZAC channels.
  • Pin storage through the storage marketplace.
  • Mint zone-local tokens and NFTs.
Each zone is gas-metered separately. Cross-zone messaging uses the CZAC (Cross-Zone Atomic Channel) protocol, which guarantees exactly-once delivery and ordered semantics. Zones do not have admin keys. Zone-policy changes are governed by the zone’s organisation DID, which may be an mhr operating under a FROST threshold. Implementation: node/sigil-zone/src/*.rs. CZAC: node/sigil-czac/src/*.rs.

Gas accounting

SurfaceGas model
Native typed executorNo gas. Per-class fee paid at admission.
System contractsWasmtime gas, paid by the caller.
Organisation zonesWasmtime gas, paid by the zone or the caller.
Native transactions pay a flat per-class fee under a local fee market. System-contract and zone calls pay Wasmtime gas at a rate set by sigil.system.parameters.

Determinism

All three surfaces are deterministic:
  • The native executor has no floating-point arithmetic, no wall-clock reads, no network I/O.
  • Wasmtime is compiled with non-deterministic features disabled (no SIMD instructions that vary across CPUs, no threads, no nan payload propagation).
  • All randomness comes from the on-chain randomness beacon.
Sigil enforces determinism through differential fuzzing across builds; see node/sigil-fuzz/.

Limits

LimitValue
Max contract size2 MiB
Max transaction size64 KiB (4 MiB for sigil_sendTransaction)
Max batch envelope16 MiB
Max gas per call100,000,000 units
Max stack depth512 frames
Max per-tx storage writes1,024
These limits are enforced both at admission and at apply.