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

Variable

bytes

Operation (alpha-specific)

Name

Size

Contents

contents_and_signature_prefix

Variable

sequence of $alpha.operation.alpha.contents_or_signature_prefix

signature_suffix

64 bytes

bytes

bls_signature_prefix (33 bytes, 8-bit tag)

Bls_prefix (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Unnamed field 0

32 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

Bls (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Bls12_381.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_2

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

bytes

X_3

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

new_state

Variable

sequence of bytes

fee

32 bytes

bytes

exit_validity

1 byte

boolean (0 for false, 255 for true)

X_1

Name

Size

Contents

Unnamed field 0

Determined from data

$X_2

Unnamed field 1

Determined from data

$X_3

X_6

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

new_state

Variable

sequence of bytes

fee

32 bytes

bytes

X_4

Name

Size

Contents

Unnamed field 0

Determined from data

$X_2

Unnamed field 1

Determined from data

$X_6

X_7

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

Variable

sequence of bytes

X_0

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

pending_pis

Variable

sequence of $X_1

# bytes in next field

4 bytes

unsigned 30-bit integer

private_pis

Variable

sequence of $X_4

fee_pi

Determined from data

$X_7

# bytes in next field

4 bytes

unsigned 30-bit integer

proof

Variable

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

X_10

Name

Size

Contents

id

32 bytes

bytes

amount

Determined from data

$Z.t

X_9

Name

Size

Contents

op_code

4 bytes

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

price

Determined from data

$X_10

l1_dst

21 bytes

$public_key_hash

rollup_id

20 bytes

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

payload

Variable

sequence of bytes

alpha.michelson.v1.primitives (Enumeration: unsigned 8-bit integer):

Case number

Encoded string

0

parameter

1

storage

2

code

3

False

4

Elt

5

Left

6

None

7

Pair

8

Right

9

Some

10

True

11

Unit

12

PACK

13

UNPACK

14

BLAKE2B

15

SHA256

16

SHA512

17

ABS

18

ADD

19

AMOUNT

20

AND

21

BALANCE

22

CAR

23

CDR

24

CHECK_SIGNATURE

25

COMPARE

26

CONCAT

27

CONS

28

CREATE_ACCOUNT

29

CREATE_CONTRACT

30

IMPLICIT_ACCOUNT

31

DIP

32

DROP

33

DUP

34

EDIV

35

EMPTY_MAP

36

EMPTY_SET

37

EQ

38

EXEC

39

FAILWITH

40

GE

41

GET

42

GT

43

HASH_KEY

44

IF

45

IF_CONS

46

IF_LEFT

47

IF_NONE

48

INT

49

LAMBDA

50

LE

51

LEFT

52

LOOP

53

LSL

54

LSR

55

LT

56

MAP

57

MEM

58

MUL

59

NEG

60

NEQ

61

NIL

62

NONE

63

NOT

64

NOW

65

OR

66

PAIR

67

PUSH

68

RIGHT

69

SIZE

70

SOME

71

SOURCE

72

SENDER

73

SELF

74

STEPS_TO_QUOTA

75

SUB

76

SWAP

77

TRANSFER_TOKENS

78

SET_DELEGATE

79

UNIT

80

UPDATE

81

XOR

82

ITER

83

LOOP_LEFT

84

ADDRESS

85

CONTRACT

86

ISNAT

87

CAST

88

RENAME

89

bool

90

contract

91

int

92

key

93

key_hash

94

lambda

95

list

96

map

97

big_map

98

nat

99

option

100

or

101

pair

102

set

103

signature

104

string

105

bytes

106

mutez

107

timestamp

108

unit

109

operation

110

address

111

SLICE

112

DIG

113

DUG

114

EMPTY_BIG_MAP

115

APPLY

116

chain_id

117

CHAIN_ID

118

LEVEL

119

SELF_ADDRESS

120

never

121

NEVER

122

UNPAIR

123

VOTING_POWER

124

TOTAL_VOTING_POWER

125

KECCAK

126

SHA3

127

PAIRING_CHECK

128

bls12_381_g1

129

bls12_381_g2

130

bls12_381_fr

131

sapling_state

132

sapling_transaction_deprecated

133

SAPLING_EMPTY_STATE

134

SAPLING_VERIFY_UPDATE

135

ticket

136

TICKET_DEPRECATED

137

READ_TICKET

138

SPLIT_TICKET

139

JOIN_TICKETS

140

GET_AND_UPDATE

141

chest

142

chest_key

143

OPEN_CHEST

144

VIEW

145

view

146

constant

147

SUB_MUTEZ

148

tx_rollup_l2_address

149

MIN_BLOCK_TIME

150

sapling_transaction

151

EMIT

152

Lambda_rec

153

LAMBDA_REC

154

TICKET

155

BYTES

156

NAT

micheline.alpha.michelson_v1.expression (Determined from data, 8-bit tag)

Int (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

int

Determined from data

$Z.t

String (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

string

Variable

bytes

Sequence (tag 2)

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 $micheline.alpha.michelson_v1.expression

Prim__no_args__no_annots (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

prim

1 byte

unsigned 8-bit integer encoding an enumeration (see alpha.michelson.v1.primitives)

Prim__no_args__some_annots (tag 4)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

prim

1 byte

unsigned 8-bit integer encoding an enumeration (see alpha.michelson.v1.primitives)

# bytes in next field

4 bytes

unsigned 30-bit integer

annots

Variable

bytes

Prim__1_arg__no_annots (tag 5)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

prim

1 byte

unsigned 8-bit integer encoding an enumeration (see alpha.michelson.v1.primitives)

arg

Determined from data

$micheline.alpha.michelson_v1.expression

Prim__1_arg__some_annots (tag 6)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

prim

1 byte

unsigned 8-bit integer encoding an enumeration (see alpha.michelson.v1.primitives)

arg

Determined from data

$micheline.alpha.michelson_v1.expression

# bytes in next field

4 bytes

unsigned 30-bit integer

annots

Variable

bytes

Prim__2_args__no_annots (tag 7)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

prim

1 byte

unsigned 8-bit integer encoding an enumeration (see alpha.michelson.v1.primitives)

arg1

Determined from data

$micheline.alpha.michelson_v1.expression

arg2

Determined from data

$micheline.alpha.michelson_v1.expression

Prim__2_args__some_annots (tag 8)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

prim

1 byte

unsigned 8-bit integer encoding an enumeration (see alpha.michelson.v1.primitives)

arg1

Determined from data

$micheline.alpha.michelson_v1.expression

arg2

Determined from data

$micheline.alpha.michelson_v1.expression

# bytes in next field

4 bytes

unsigned 30-bit integer

annots

Variable

bytes

Prim__generic (tag 9)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

prim

1 byte

unsigned 8-bit integer encoding an enumeration (see alpha.michelson.v1.primitives)

# bytes in next field

4 bytes

unsigned 30-bit integer

args

Variable

sequence of $micheline.alpha.michelson_v1.expression

# bytes in next field

4 bytes

unsigned 30-bit integer

annots

Variable

bytes

Bytes (tag 10)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

bytes

Variable

bytes

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_13 (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

contents

Determined from data

$micheline.alpha.michelson_v1.expression

ty

Determined from data

$micheline.alpha.michelson_v1.expression

ticketer

22 bytes

$alpha.contract_id

X_8

Name

Size

Contents

Unnamed field 0

Determined from data

$X_9

Unnamed field 1

Determined from data

$X_13

X_16 (1 byte, 8-bit tag) ********************

Public (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Private (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Fee (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

X_14

Name

Size

Contents

Unnamed field 0

Determined from data

$X_2

Unnamed field 1

1 byte

$X_16

X_17

Name

Size

Contents

level

4 bytes

signed 32-bit integer

index

1 byte

unsigned 8-bit integer

commitment

48 bytes

bytes

commitment_proof

48 bytes

bytes

X_18

Name

Size

Contents

alice

21 bytes

$public_key_hash

bob

21 bytes

$public_key_hash

X_20

Name

Size

Contents

published_level

4 bytes

signed 32-bit integer

slot_index

1 byte

unsigned 8-bit integer

page_index

2 bytes

signed 16-bit integer

X_21 (Determined from data, 8-bit tag)

raw data proof (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

2 bytes

unsigned 16-bit integer

raw_data

Variable

bytes

metadata proof (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

dal page proof (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

dal_page_id

7 bytes

$X_20

# bytes in next field

4 bytes

unsigned 30-bit integer

dal_proof

Variable

bytes

X_22 (Determined from data, 8-bit tag)

inbox proof (tag 0)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

level

4 bytes

signed 32-bit integer

message_counter

Determined from data

$N.t

# bytes in next field

4 bytes

unsigned 30-bit integer

serialized_proof

Variable

bytes

reveal proof (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

reveal_proof

Determined from data

$X_21

first input (tag 2)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

X_23

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_24 (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_23

Proof (tag 1)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

# bytes in next field

4 bytes

unsigned 30-bit integer

pvm_step

Variable

bytes

? presence of field “input_proof”

1 byte

boolean (0 for false, 255 for true)

input_proof

Determined from data

$X_22

X_19

Name

Size

Contents

choice

Determined from data

$N.t

step

Determined from data

$X_24

X_25

Name

Size

Contents

compressed_state

32 bytes

bytes

inbox_level

4 bytes

signed 32-bit integer

predecessor

32 bytes

bytes

number_of_ticks

8 bytes

signed 64-bit integer

X_27 (Enumeration: unsigned 8-bit integer):

Case number

Encoded string

0

arith

1

wasm_2_0_0

X_29 (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_28

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_29

claimer

21 bytes

$public_key_hash

X_30

Name

Size

Contents

sender

21 bytes

$public_key_hash

destination

20 bytes

bytes

ticket_hash

32 bytes

bytes

amount

Determined from data

$X_29

X_32 (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_30

X_33

Name

Size

Contents

context_hash

32 bytes

bytes

withdraw_list_hash

32 bytes

bytes

X_35 (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_34

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_35

inbox_merkle_root

32 bytes

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

Bls (tag 3)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

Bls12_381.Public_key

48 bytes

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

deposit (tag 5)

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_36

Name

Size

Contents

entrypoint

Determined from data

$alpha.entrypoint

# bytes in next field

4 bytes

unsigned 30-bit integer

value

Variable

bytes

X_37

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

fitness.elem

Name

Size

Contents

# bytes in next field

4 bytes

unsigned 30-bit integer

Unnamed field 0

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 $fitness.elem

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

Variable

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_or_signature_prefix (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

Variable

$alpha.block_header.alpha.full_header

# bytes in next field

4 bytes

unsigned 30-bit integer

bh2

Variable

$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 at most 20 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_37

Drain_delegate (tag 9)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

consensus_key

21 bytes

$public_key_hash

delegate

21 bytes

$public_key_hash

destination

21 bytes

$public_key_hash

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_attestation (tag 22)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

attestor

21 bytes

$public_key_hash

attestation

Determined from data

$Z.t

level

4 bytes

signed 32-bit integer

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_36

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

Update_consensus_key (tag 114)

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

pk

Determined from data

$public_key

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_34

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_32

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_33

# bytes in next field

4 bytes

unsigned 30-bit integer

previous_message_result_path

Variable

sequence of bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

proof

Variable

bytes

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_28

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

pvm_kind

1 byte

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

# bytes in next field

4 bytes

unsigned 30-bit integer

kernel

Variable

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

origination_proof

Variable

bytes

# 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 next field

4 bytes

unsigned 30-bit integer

message

Variable

sequence of $X_2

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

rollup

20 bytes

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

rollup

20 bytes

bytes

commitment

76 bytes

$X_25

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

rollup

20 bytes

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_19

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

rollup

20 bytes

bytes

stakers

42 bytes

$X_18

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

rollup

20 bytes

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

staker

21 bytes

$public_key_hash

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_header

101 bytes

$X_17

Zk_rollup_origination (tag 250)

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

public_parameters

Variable

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

circuits_info

Variable

sequence of $X_14

# bytes in next field

4 bytes

unsigned 30-bit integer

init_state

Variable

sequence of bytes

nb_ops

4 bytes

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

Zk_rollup_publish (tag 251)

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

zk_rollup

20 bytes

bytes

# bytes in next field

4 bytes

unsigned 30-bit integer

op

Variable

sequence of $X_8

Zk_rollup_update (tag 252)

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

zk_rollup

20 bytes

bytes

update

Determined from data

$X_0

Signature_prefix (tag 255)

Name

Size

Contents

Tag

1 byte

unsigned 8-bit integer

signature_prefix

33 bytes

$bls_signature_prefix