Serialization

Block Header

Field

Type

Length

Present

nVersion

signed int

4 bytes

Always

hashPrevBlock

uint256

32 bytes

Always

hashMerkleRoot

uint256

32 bytes

Always

nTime

unsigned int

4 bytes

Always

nBits

unsigned int

4 bytes

Always

nNonce

unsigned int

4 bytes

Always

Block

Field

Type

Length

Present

blockHeader

Block Header

70 bytes

Always

vTx

Transaction vector

Variable

Always

Bulletproof Range Proof

Field

Type

Length

Present

V

G1Element vector

Variable

Always

L

G1Element vector

Variable

Always

R

G1Element vector

Variable

Always

A

G1Element

Always

S

G1Element

Always

T1

G1Element

Always

T2

G1Element

Always

taux

Scalar

Always

mu

Scalar

Always

a

Scalar

Always

b

Scalar

Always

t

Scalar

Always

Transaction

Field

Type

Length

Present

nVersion

signed int

4 bytes

Always

vin

Transaction Input vector

Variable

Always

flags

unsigned char

1 byte

If vin.size() == 0

vin

Transaction Input vector

Variable

If vin.size() == 0

vout

Transaction Output vector

Variable

Always

wit

TxWitness vector

Same as vin

If flags&1

nLockTime

unsigned int

4 bytes

Always

vchTxSig

G2Element

If nVersion & 0x20

Transaction Input

Field

Type

Length

Present

prevout

OutPoint

36 bytes

Always

scriptSig

unsigned char vector

Variable

Always

nSequence

unsigned int

4 bytes

Always

Transaction Output

Field

Type

Length

Present

nValue

signed int

8 bytes

Always

nFlags

unsigned int

8 bytes

If nValue == INT64_MAX

scriptPubKey

unsigned char vector

Variable

Always

rangeProof

Bulletproof Range Proof

If nFlags & 0x01

spendingKey

G1Element

48 bytes

If nFlags & 0x01

blindingKey

G1Element

48 bytes

If nFlags & 0x01

ephemeralKey

G1Element

48 bytes

If nFlags & 0x01

viewTag

unsigned int

2 bytes

If nFlags & 0x01

tokenId

TokenId

If nFlags & 0x02

Scalar

Field

Type

Length

Present

data

Scalar

32

Always

G1Element

Field

Type

Length

Present

data

G1Element

48

Always

G2Element

Field

Type

Length

Present

data

G2Element

96

Always

TokenId

Field

Type

Length

Present

tokenId

uint256

32

Always

nftId

unsigned int

8

Always

OutPoint

Field

Type

Length

Present

hash

uint256

32

Always

n

unsigned int

4

Always

TxWitness

Field

Type

Length

Present

stack

vector of unsigned char vectors

Variable

Always