P2P message format

This page details the structure and layout of messages used by the Tezos P2P layer.

The elementary types used for message or header fields are documented in the Data_encoding module, for example:

Additionally, the type unsigned 30-bit integer is used to denote the subset of positive integers of type signed 31-bit integers.

Note

31-bit integers: The internal representation of integers in OCaml reserves one bit for GC tagging. The remaining bits encode a signed integer. For compatibility with 32-bit machines, we restrict these native integers to the 31-bit range.

Block header (shell)

Name

Size

Contents

level

4 bytes

signed 32-bit integer

proto

1 byte

unsigned 8-bit integer

predecessor

32 bytes

bytes

timestamp

8 bytes

signed 64-bit integer

validation_pass

1 byte

unsigned 8-bit integer

operations_hash

32 bytes

bytes

# bytes in field “fitness”

4 bytes

unsigned 30-bit integer

fitness

Variable

sequence of $fitness.elem

context

32 bytes

bytes

protocol_data

Variable

bytes

fitness.elem

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

bytes

Operation (shell)

Name

Size

Contents

branch

32 bytes

bytes

data

Variable

bytes

Block_header (alpha-specific)

Name

Size

Contents

payload_hash

32 bytes

bytes

payload_round

4 bytes

signed 32-bit integer

proof_of_work_nonce

8 bytes

bytes

? presence of field “seed_nonce_hash”

1 byte

boolean (0 for false, 255 for true)

seed_nonce_hash

32 bytes

bytes

liquidity_baking_toggle_vote

1 byte

signed 8-bit integer

signature

64 bytes

bytes

Operation (alpha-specific)

Name

Size

Contents

contents

Variable

sequence of $alpha.operation.alpha.contents

signature

64 bytes

bytes

public_key_hash (21 bytes, 8-bit tag)

Ed25519 (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Ed25519.Public_key_hash

20 bytes

bytes

Secp256k1 (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Secp256k1.Public_key_hash

20 bytes

bytes

P256 (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

P256.Public_key_hash

20 bytes

bytes

N.t

A variable-length sequence of bytes encoding a Zarith natural number. Each byte has a running unary size bit: the most significant bit of each byte indicates whether this is the last byte in the sequence (0) or whether the sequence continues (1). Size bits ignored, the data is the binary representation of the number in little-endian order.

Name

Size

Contents

N.t

Determined from data

bytes

X_0

Name

Size

Contents

level

4 bytes

signed 32-bit integer

index

1 byte

unsigned 8-bit integer

header

48 bytes

bytes

X_1

Name

Size

Contents

alice

21 bytes

$public_key_hash

bob

21 bytes

$public_key_hash

X_5 (33 bytes, 8-bit tag) *********************

Value (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

value

32 bytes

bytes

Node (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

node

32 bytes

bytes

X_8

Name

Size

Contents

# bytes in next field

1 byte

unsigned 8-bit integer

Unnamed field 0

Variable

bytes

X_9

Name

Size

Contents

length

8 bytes

signed 64-bit integer

segment

Determined from data

$X_8

proof

Determined from data

$inode_tree

X_12

Name

Size

Contents

Unnamed field 0

1 byte

unsigned 8-bit integer

Unnamed field 1

Determined from data

$inode_tree

X_13 (Determined from data, 8-bit tag)

sparse_proof (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

sparse_proof

Variable

sequence of $X_12

dense_proof (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

dense_proof

Determined from data

sequence of exactly 32 $inode_tree

X_11

Name

Size

Contents

length

8 bytes

signed 64-bit integer

proofs

Determined from data

$X_13

X_14

Name

Size

Contents

Unnamed field 0

Determined from data

$X_8

Unnamed field 1

Determined from data

$tree_encoding

inode_tree (Determined from data, 8-bit tag)

Blinded_inode (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

blinded_inode

32 bytes

bytes

Inode_values (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

inode_values

Variable

sequence of $X_14

Inode_tree (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

inode_tree

Determined from data

$X_11

Inode_extender (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

inode_extender

Determined from data

$X_9

None (tag 4)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

tree_encoding (Determined from data, 8-bit tag)

Value (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

value

Variable

bytes

Blinded_value (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

blinded_value

32 bytes

bytes

Node (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

node

Variable

sequence of $X_14

Blinded_node (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

blinded_node

32 bytes

bytes

Inode (tag 4)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

inode

Determined from data

$X_11

Extender (tag 5)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

extender

Determined from data

$X_9

None (tag 6)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

X_4

Name

Size

Contents

version

2 bytes

signed 16-bit integer

before

33 bytes

$X_5

after

33 bytes

$X_5

state

Determined from data

$tree_encoding

X_39

Name

Size

Contents

inbox_level

4 bytes

signed 32-bit integer

message_counter

Determined from data

$N.t

# bytes in next field

4 bytes

unsigned 30-bit integer

payload

Variable

bytes

X_40 (Determined from data, 8-bit tag)

No_input_required (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Initial (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

First_after (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

level

4 bytes

signed 32-bit integer

counter

Determined from data

$N.t

X_3

Name

Size

Contents

tree_proof

Determined from data

$X_4

? presence of field “given”

1 byte

boolean (0 for false, 255 for true)

given

Determined from data

$X_39

requested

Determined from data

$X_40

X_79 (Determined from data, 8-bit tag)

Arithmetic PVM with proof (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

proof

Determined from data

$X_3

Wasm 2.0.0 PVM with proof (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

proof

Determined from data

$X_3

Unencodable (tag 255)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

X_80

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

bytes

X_81

Name

Size

Contents

? presence of field “state”

1 byte

boolean (0 for false, 255 for true)

state

32 bytes

bytes

tick

Determined from data

$N.t

X_82 (Determined from data, 8-bit tag)

Dissection (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

sequence of $X_81

Proof (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

pvm_step

Determined from data

$X_79

? presence of field “inbox”

1 byte

boolean (0 for false, 255 for true)

inbox

Determined from data

$X_80

X_2

Name

Size

Contents

choice

Determined from data

$N.t

step

Determined from data

$X_82

X_83

Name

Size

Contents

compressed_state

32 bytes

bytes

inbox_level

4 bytes

signed 32-bit integer

predecessor

32 bytes

bytes

number_of_ticks

4 bytes

signed 32-bit integer

X_84

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

bytes

X_85 (Enumeration: unsigned 8-bit integer):

Case number

Encoded string

0

arith_pvm_kind

1

wasm_2_0_0_pvm_kind

alpha.contract_id (22 bytes, 8-bit tag)

Implicit (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Signature.Public_key_hash

21 bytes

$public_key_hash

Originated (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Contract_hash

20 bytes

bytes

padding

1 byte

padding

X_164 (Determined from data, 8-bit tag)

case 0 (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

1 byte

unsigned 8-bit integer

case 1 (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

unsigned 16-bit integer

case 2 (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

4 bytes

signed 32-bit integer

case 3 (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

8 bytes

signed 64-bit integer

X_163

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

contents

Variable

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

ty

Variable

bytes

ticketer

22 bytes

$alpha.contract_id

amount

Determined from data

$X_164

claimer

21 bytes

$public_key_hash

X_165

Name

Size

Contents

sender

21 bytes

$public_key_hash

destination

20 bytes

bytes

ticket_hash

32 bytes

bytes

amount

Determined from data

$X_164

X_167 (Determined from data, 8-bit tag)

Batch (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

batch

Variable

bytes

Deposit (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

deposit

Determined from data

$X_165

X_168

Name

Size

Contents

context_hash

32 bytes

bytes

withdraw_list_hash

32 bytes

bytes

X_176 (33 bytes, 8-bit tag) ***********************

case 0 (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Context_hash

32 bytes

bytes

case 1 (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Context_hash

32 bytes

bytes

X_174

Name

Size

Contents

Unnamed field 0

Determined from data

$X_8

Unnamed field 1

33 bytes

$X_176

X_183

Name

Size

Contents

Unnamed field 0

32 bytes

bytes

Unnamed field 1

32 bytes

bytes

X_187

Name

Size

Contents

Unnamed field 0

32 bytes

bytes

X_195

This value’s binary representation is empty. It takes zero (0) bytes of output. X_199 (Determined from data, 8-bit tag) ***********************************

case 0 (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

1 byte

unsigned 8-bit integer

case 1 (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

unsigned 16-bit integer

case 2 (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

4 bytes

signed 32-bit integer

case 3 (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

8 bytes

signed 64-bit integer

case 4 (tag 4)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

1 byte

unsigned 8-bit integer

Unnamed field 1

32 bytes

$X_187

case 5 (tag 5)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

unsigned 16-bit integer

Unnamed field 1

32 bytes

$X_187

case 6 (tag 6)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

4 bytes

signed 32-bit integer

Unnamed field 1

32 bytes

$X_187

case 7 (tag 7)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

8 bytes

signed 64-bit integer

Unnamed field 1

32 bytes

$X_187

case 8 (tag 8)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

1 byte

unsigned 8-bit integer

Unnamed field 1

32 bytes

$X_187

case 9 (tag 9)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

unsigned 16-bit integer

Unnamed field 1

32 bytes

$X_187

case 10 (tag 10)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

4 bytes

signed 32-bit integer

Unnamed field 1

32 bytes

$X_187

case 11 (tag 11)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

8 bytes

signed 64-bit integer

Unnamed field 1

32 bytes

$X_187

case 12 (tag 12)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

1 byte

unsigned 8-bit integer

Unnamed field 1

64 bytes

$X_183

case 13 (tag 13)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

unsigned 16-bit integer

Unnamed field 1

64 bytes

$X_183

case 14 (tag 14)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

4 bytes

signed 32-bit integer

Unnamed field 1

64 bytes

$X_183

case 15 (tag 15)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

8 bytes

signed 64-bit integer

Unnamed field 1

64 bytes

$X_183

case 128 (tag 128)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

case 129 (tag 129)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

Variable

sequence of exactly 1 $X_174

case 130 (tag 130)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

Variable

sequence of exactly 2 $X_174

case 131 (tag 131)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

sequence of $X_174

case 192 (tag 192)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

1 byte

unsigned 8-bit integer

Unnamed field 0

Variable

bytes

case 193 (tag 193)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

2 bytes

unsigned 16-bit integer

Unnamed field 0

Variable

bytes

case 195 (tag 195)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

bytes

case 224 (tag 224)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

1 byte

unsigned 8-bit integer

Unnamed field 1

Determined from data

$X_8

Unnamed field 2

32 bytes

bytes

case 225 (tag 225)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

unsigned 16-bit integer

Unnamed field 1

Determined from data

$X_8

Unnamed field 2

32 bytes

bytes

case 226 (tag 226)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

4 bytes

signed 32-bit integer

Unnamed field 1

Determined from data

$X_8

Unnamed field 2

32 bytes

bytes

case 227 (tag 227)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

8 bytes

signed 64-bit integer

Unnamed field 1

Determined from data

$X_8

Unnamed field 2

32 bytes

bytes

X_169

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

sequence of $X_199

X_293 (Determined from data, 8-bit tag)

case 0 (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

signed 16-bit integer

Unnamed field 1

32 bytes

bytes

Unnamed field 2

32 bytes

bytes

Unnamed field 3

Determined from data

$X_169

case 1 (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

signed 16-bit integer

Unnamed field 1

32 bytes

bytes

Unnamed field 2

32 bytes

bytes

Unnamed field 3

Determined from data

$X_169

case 2 (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

signed 16-bit integer

Unnamed field 1

32 bytes

bytes

Unnamed field 2

32 bytes

bytes

Unnamed field 3

Determined from data

$X_169

case 3 (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

2 bytes

signed 16-bit integer

Unnamed field 1

32 bytes

bytes

Unnamed field 2

32 bytes

bytes

Unnamed field 3

Determined from data

$X_169

X_295 (Determined from data, 8-bit tag)

None (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Some (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Commitment_hash

32 bytes

bytes

X_294

Name

Size

Contents

level

4 bytes

signed 32-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

messages

Variable

sequence of bytes

predecessor

Determined from data

$X_295

inbox_merkle_root

32 bytes

bytes

Z.t

A variable-length sequence of bytes encoding a Zarith integer. Each byte has a running unary size bit: the most significant bit of each byte indicates whether this is the last byte in the sequence (0) or whether the sequence continues (1). The second most significant bit of the first byte is reserved for the sign (0 for positive, 1 for negative). Size and sign bits ignored, the data is the binary representation of the absolute value of the number in little-endian order.

Name

Size

Contents

Z.t

Determined from data

bytes

alpha.contract_id.originated (22 bytes, 8-bit tag)

Originated (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Contract_hash

20 bytes

bytes

padding

1 byte

padding

alpha.scripted.contracts

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

code

Variable

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

storage

Variable

bytes

alpha.entrypoint (Determined from data, 8-bit tag)

default (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

root (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

do (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

set_delegate (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

remove_delegate (tag 4)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

named (tag 255)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

1 byte

unsigned 8-bit integer

Unnamed field 0

Variable

bytes

X_296

Name

Size

Contents

entrypoint

Determined from data

$alpha.entrypoint

# bytes in next field

4 bytes

unsigned 30-bit integer

value

Variable

bytes

public_key (Determined from data, 8-bit tag)

Ed25519 (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Ed25519.Public_key

32 bytes

bytes

Secp256k1 (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Secp256k1.Public_key

33 bytes

bytes

P256 (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

P256.Public_key

33 bytes

bytes

X_297

Name

Size

Contents

Unnamed field 0

100 bytes

bytes

Unnamed field 1

100 bytes

bytes

alpha.inlined.preendorsement.contents (43 bytes, 8-bit tag)

Preendorsement (tag 20)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

slot

2 bytes

unsigned 16-bit integer

level

4 bytes

signed 32-bit integer

round

4 bytes

signed 32-bit integer

block_payload_hash

32 bytes

bytes

alpha.inlined.preendorsement

Name

Size

Contents

branch

32 bytes

bytes

operations

43 bytes

$alpha.inlined.preendorsement.contents

signature

Variable

bytes

alpha.block_header.alpha.full_header

Name

Size

Contents

level

4 bytes

signed 32-bit integer

proto

1 byte

unsigned 8-bit integer

predecessor

32 bytes

bytes

timestamp

8 bytes

signed 64-bit integer

validation_pass

1 byte

unsigned 8-bit integer

operations_hash

32 bytes

bytes

# bytes in field “fitness”

4 bytes

unsigned 30-bit integer

fitness

Variable

sequence of $X_80

context

32 bytes

bytes

payload_hash

32 bytes

bytes

payload_round

4 bytes

signed 32-bit integer

proof_of_work_nonce

8 bytes

bytes

? presence of field “seed_nonce_hash”

1 byte

boolean (0 for false, 255 for true)

seed_nonce_hash

32 bytes

bytes

liquidity_baking_toggle_vote

1 byte

signed 8-bit integer

signature

64 bytes

bytes

alpha.inlined.endorsement_mempool.contents (43 bytes, 8-bit tag)

Endorsement (tag 21)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

slot

2 bytes

unsigned 16-bit integer

level

4 bytes

signed 32-bit integer

round

4 bytes

signed 32-bit integer

block_payload_hash

32 bytes

bytes

alpha.inlined.endorsement

Name

Size

Contents

branch

32 bytes

bytes

operations

43 bytes

$alpha.inlined.endorsement_mempool.contents

signature

Variable

bytes

alpha.operation.alpha.contents (Determined from data, 8-bit tag)

Seed_nonce_revelation (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

level

4 bytes

signed 32-bit integer

nonce

32 bytes

bytes

Double_endorsement_evidence (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

op1

Variable

$alpha.inlined.endorsement

# bytes in next field

4 bytes

unsigned 30-bit integer

op2

Variable

$alpha.inlined.endorsement

Double_baking_evidence (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

bh1

Determined from data

$alpha.block_header.alpha.full_header

# bytes in next field

4 bytes

unsigned 30-bit integer

bh2

Determined from data

$alpha.block_header.alpha.full_header

Activate_account (tag 4)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

pkh

20 bytes

bytes

secret

20 bytes

bytes

Proposals (tag 5)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

period

4 bytes

signed 32-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

proposals

Variable

sequence of bytes

Ballot (tag 6)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

period

4 bytes

signed 32-bit integer

proposal

32 bytes

bytes

ballot

1 byte

signed 8-bit integer

Double_preendorsement_evidence (tag 7)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

op1

Variable

$alpha.inlined.preendorsement

# bytes in next field

4 bytes

unsigned 30-bit integer

op2

Variable

$alpha.inlined.preendorsement

Vdf_revelation (tag 8)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

solution

200 bytes

$X_297

Failing_noop (tag 17)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

arbitrary

Variable

bytes

Preendorsement (tag 20)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

slot

2 bytes

unsigned 16-bit integer

level

4 bytes

signed 32-bit integer

round

4 bytes

signed 32-bit integer

block_payload_hash

32 bytes

bytes

Endorsement (tag 21)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

slot

2 bytes

unsigned 16-bit integer

level

4 bytes

signed 32-bit integer

round

4 bytes

signed 32-bit integer

block_payload_hash

32 bytes

bytes

Dal_slot_availability (tag 22)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

endorser

21 bytes

$public_key_hash

endorsement

Determined from data

$Z.t

Reveal (tag 107)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

public_key

Determined from data

$public_key

Transaction (tag 108)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

amount

Determined from data

$N.t

destination

22 bytes

$alpha.contract_id

? presence of field “parameters”

1 byte

boolean (0 for false, 255 for true)

parameters

Determined from data

$X_296

Origination (tag 109)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

balance

Determined from data

$N.t

? presence of field “delegate”

1 byte

boolean (0 for false, 255 for true)

delegate

21 bytes

$public_key_hash

script

Determined from data

$alpha.scripted.contracts

Delegation (tag 110)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

? presence of field “delegate”

1 byte

boolean (0 for false, 255 for true)

delegate

21 bytes

$public_key_hash

Register_global_constant (tag 111)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in next field

4 bytes

unsigned 30-bit integer

value

Variable

bytes

Set_deposits_limit (tag 112)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

? presence of field “limit”

1 byte

boolean (0 for false, 255 for true)

limit

Determined from data

$N.t

Increase_paid_storage (tag 113)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

amount

Determined from data

$Z.t

destination

22 bytes

$alpha.contract_id.originated

Tx_rollup_origination (tag 150)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

Tx_rollup_submit_batch (tag 151)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

rollup

20 bytes

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

content

Variable

bytes

? presence of field “burn_limit”

1 byte

boolean (0 for false, 255 for true)

burn_limit

Determined from data

$N.t

Tx_rollup_commit (tag 152)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

rollup

20 bytes

bytes

commitment

Determined from data

$X_294

Tx_rollup_return_bond (tag 153)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

rollup

20 bytes

bytes

Tx_rollup_finalize_commitment (tag 154)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

rollup

20 bytes

bytes

Tx_rollup_remove_commitment (tag 155)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

rollup

20 bytes

bytes

Tx_rollup_rejection (tag 156)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

rollup

20 bytes

bytes

level

4 bytes

signed 32-bit integer

message

Determined from data

$X_167

message_position

Determined from data

$N.t

# bytes in next field

4 bytes

unsigned 30-bit integer

message_path

Variable

sequence of bytes

message_result_hash

32 bytes

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

message_result_path

Variable

sequence of bytes

previous_message_result

64 bytes

$X_168

# bytes in next field

4 bytes

unsigned 30-bit integer

previous_message_result_path

Variable

sequence of bytes

proof

Determined from data

$X_293

Tx_rollup_dispatch_tickets (tag 157)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

tx_rollup

20 bytes

bytes

level

4 bytes

signed 32-bit integer

context_hash

32 bytes

bytes

message_index

4 bytes

signed 31-bit integer in the range -1073741824 to 1073741823

# bytes in next field

4 bytes

unsigned 30-bit integer

message_result_path

Variable

sequence of bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

tickets_info

Variable

sequence of $X_163

Transfer_ticket (tag 158)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in next field

4 bytes

unsigned 30-bit integer

ticket_contents

Variable

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

ticket_ty

Variable

bytes

ticket_ticketer

22 bytes

$alpha.contract_id

ticket_amount

Determined from data

$N.t

destination

22 bytes

$alpha.contract_id

# bytes in next field

4 bytes

unsigned 30-bit integer

entrypoint

Variable

bytes

Sc_rollup_originate (tag 200)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

kind

1 byte

unsigned 8-bit integer encoding an enumeration (see X_85)

# bytes in next field

4 bytes

unsigned 30-bit integer

boot_sector

Variable

bytes

origination_proof

Determined from data

$X_79

# bytes in next field

4 bytes

unsigned 30-bit integer

parameters_ty

Variable

bytes

Sc_rollup_add_messages (tag 201)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in field “alpha.rollup_address”

4 bytes

unsigned 30-bit integer

rollup

Variable

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

message

Variable

sequence of $X_84

Sc_rollup_cement (tag 202)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in field “alpha.rollup_address”

4 bytes

unsigned 30-bit integer

rollup

Variable

bytes

commitment

32 bytes

bytes

Sc_rollup_publish (tag 203)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in field “alpha.rollup_address”

4 bytes

unsigned 30-bit integer

rollup

Variable

bytes

commitment

72 bytes

$X_83

Sc_rollup_refute (tag 204)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in field “alpha.rollup_address”

4 bytes

unsigned 30-bit integer

rollup

Variable

bytes

opponent

21 bytes

$public_key_hash

? presence of field “refutation”

1 byte

boolean (0 for false, 255 for true)

refutation

Determined from data

$X_2

Sc_rollup_timeout (tag 205)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in field “alpha.rollup_address”

4 bytes

unsigned 30-bit integer

rollup

Variable

bytes

stakers

42 bytes

$X_1

Sc_rollup_execute_outbox_message (tag 206)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in field “alpha.rollup_address”

4 bytes

unsigned 30-bit integer

rollup

Variable

bytes

cemented_commitment

32 bytes

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

output_proof

Variable

bytes

Sc_rollup_recover_bond (tag 207)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

rollup

20 bytes

bytes

Sc_rollup_dal_slot_subscribe (tag 208)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

# bytes in field “alpha.rollup_address”

4 bytes

unsigned 30-bit integer

rollup

Variable

bytes

slot_index

1 byte

unsigned 8-bit integer

Dal_publish_slot_header (tag 230)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

source

21 bytes

$public_key_hash

fee

Determined from data

$N.t

counter

Determined from data

$N.t

gas_limit

Determined from data

$N.t

storage_limit

Determined from data

$N.t

slot

53 bytes

$X_0