Skip to Content
Mastering Blockchain - Second Edition
book

Mastering Blockchain - Second Edition

by Ankur Daharwal, Imran Bashir, Pranav Burnwal
March 2018
Beginner to intermediate
656 pages
20h 9m
English
Packt Publishing
Content preview from Mastering Blockchain - Second Edition

Inputs

Generally, each input spends a previous output. Each output is considered as Unspent Transaction Output (UTXO) until an input consumes it. UTXO is an unspent transaction output that can be spent as an input to a new transaction.

Transaction input data structure is shown in the following table:

Field

Size

Description

Transaction hash

32 bytes

This is the hash of the previous transaction with UTXO.

Output index

4 bytes

This is the previous transactions output index, that is, UTXO to be spent.

Script length

1-9 bytes

This is the size of the unlocking script.

Unlocking script

Variable

Input script (ScriptSig) which satisfies the requirements of the locking script.

Sequence number

4 bytes

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Blockchain - Third Edition

Mastering Blockchain - Third Edition

Imran Bashir
Mastering Blockchain

Mastering Blockchain

Lorne Lantz, Daniel Cawrey
Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood

Publisher Resources

ISBN: 9781788839044Supplemental Content