Skip to main content

Introduction

Cowboy transactions use an instruction-based, ordered binary codec with three meters: Cycles, Cells and Accesses. CIP-40 §7.1 is the canonical field-order and encoding specification. Clients use its codec exports to construct, inspect, sign and submit transactions.

Canonical Fields

The shell is version=3, kind=0, then the ordinary transaction body. Kind 1 is decode-only and rejected at every admission and consensus boundary. Other versions and unknown kinds reject. A slot contains algorithm, mode, public_key and signature. Transaction slots accept secp256k1 (algorithm 1), native mode 0 or EIP-712 mode 1, no inline public key, and a 65-byte low-S r ‖ s ‖ v signature with v in {0,1}. The entire roster, policy revisions, entry indices and every descriptor are fixed before any signer signs. An address-derived account uses revision zero and exactly entries: [[0, slot]]; see CIP-40 §7.1 for the source-pinned bounds. Inside the sponsor Option, native bytes are the 20-byte address, minimal-UInt max_fee and expires_at_height, then the slot. Its address, both terms and slot descriptor are bound by the native preimage; its signature bytes follow the same zeroing rule as the other slots. Transaction JSON flattens the two terms beside address and signature in the closed sponsor object. A present sponsor rejects before hashing, recovery, fee resolution or state writes; a later sponsorship CIP defines escrow, refund and what is sponsorable.

Validation and Execution

The codec verifies version/kind, trusted chain identity, size, reserved fields, delivery and slot policy. It then completes whole-roster passes in this order: roster, recovery IDs, low-S/scalars, signature-cost preflight, identity-access preflight, hashes, recoveries. Recovered indexed keys and revisions must satisfy the signer account’s current policy. Nonce, balance and wallet/actor checks use the current execution state. The native signing hash and transaction ID are keccak256 of the tagged, chain-instance-bound signature-zeroed v3 encoding. EIP-712 slots select their own typed-data digest while transaction identity remains the native digest. Obtain chain_id and chain_instance_id together from the closed /chain-info response; never compute a context-free transaction digest. The fee precharge includes the primary and every co-signer. A single secp256k1 slot needs 15,000 Cycles total: 5,000 transaction base plus 10,000 signature verification, before calldata and instruction work. Valid engine-produced deferred transactions are origin-authenticated and unsigned; external ingress refuses them. A single account requires at least 5 charged identity accesses and client inspection schema 14; both source pins are in CIP-40 §7.3.

Further Reading