A GUM Network transaction is an unchanged Solana legacy message with typed signature
records in front. **Standard Solana SDKs can't build or parse GUM Network
transactions**: they write bare 64-byte Ed25519 signatures, without the length
and tag GUM Network requires. For the signature types, see
[Typed signatures and addresses](/protocol/typed-signatures).

## How it differs from Solana

|                                    | Solana               | GUM Network                                                                  |
| ---------------------------------- | -------------------- | ----------------------------------------------------------------------- |
| Signature schemes                  | Ed25519 only         | Eight, identified by a type tag                                         |
| One signature on the wire          | 64 bytes             | Length, tag and payload: 66 bytes for Ed25519                           |
| Maximum transaction size           | 1,232 bytes          | 12,320 bytes                                                            |
| Message formats                    | Legacy and v0        | Legacy, plus a batched format for GUM batch transactions                |
| Address lookup tables              | Yes, in v0 messages  | No                                                                      |
| Durable nonces                     | Yes                  | No                                                                      |
| Signature-verification precompiles | Ed25519, secp256k1   | None                                                                    |
| Transaction ID                     | The first signature  | Derived from the first signature, see [Transaction ID](#transaction-id) |

## Layout

```layout
compact-u16   n, the number of signatures
n records, each:
  compact-u16   L, the record length (1 + payload length)
  u8            type tag
  L − 1 bytes   payload
message       Solana legacy message, byte for byte
```

- `n` must equal the message's required signature count, its first byte.
- Record _i_ signs for account key _i_ of the message, which for typed signers
  is a [typed address](/protocol/typed-signatures#addresses). Every record is
  verified against the serialized message.
- Tools may mark an unsigned slot with a single `0x00` length byte, but
  validators reject a transaction until every slot is signed.

**compact-u16** is Solana's variable-length integer (shortvec): 7 bits per
byte, lowest first, top bit set when another byte follows. Values up to 127
take one byte.

### The message

```layout
u8            required signature count
u8            read-only signed account count
u8            read-only unsigned account count
compact-u16   account count, then 32 bytes per account key, signers first
32 bytes      recent blockhash
compact-u16   instruction count, then the instructions
```

The first byte must be below `0x80`, or `0x81` for GUM Network's batched format,
which only approved senders can submit.

## Worked example: one Ed25519 signer

```layout
offset   bytes      meaning
0        01         1 signature
1        41         record length 65
2        00         tag 0x00, Ed25519
3–66     64 bytes   Ed25519 signature over the message
67–      …          Solana legacy message
```

## Record sizes

| Type                                                | Record: tag and payload                                      | On the wire, with length                                          |
| --------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
| Ed25519 `0x00`                                      | 65 bytes                                                     | 66 bytes                                                          |
| Secp256k1 `0x01`, Secp256r1 `0x02`, Ethereum `0x10` | 98 bytes with a compressed key, 130 with an uncompressed key | 99 or 132 bytes                                                   |
| Passkey `0x20`                                      | 249 bytes or more, depending on the WebAuthn data            | 251 bytes or more                                                 |
| OpenIDZK `0x40`                                     | 655 bytes plus the `aud` length, at most 816                 | 657 bytes plus the `aud` length, at most 818                      |
| Delegation `0x06`                                   | 105 bytes, plus the authorization and its length             | 173 bytes with an Ed25519 authorization, 239 with an Ethereum one |
| Sub-account delegation `0x60`                       | As `0x06`, plus 32 bytes                                     | 205 bytes with an Ed25519 authorization, 271 with an Ethereum one |

For an OpenIDZK `aud` longer than 127 bytes, add one byte. See
[OpenIDZK proofs](/protocol/openidzk-proofs#signature-layout-and-size).

## Transaction ID

A transaction's ID comes from its first signature and is written in base58:

- **Ed25519:** the 64-byte signature itself, as on Solana.
- **Every other type:** the SHA-512 hash of the typed signature bytes, tag
  included, also 64 bytes.

## Removed Solana features

| Feature                               | On GUM Network                                                                                         |
| ------------------------------------- | ------------------------------------------------------------------------------------------------- |
| v0 messages and address lookup tables | Rejected, and there's no address lookup table program. List every account in the message itself. |
| Durable nonces                        | Every nonce instruction in the System Program fails. Use a recent blockhash.                      |
| Signature-verification precompiles    | Not installed. Use typed signatures instead.                                                      |
