Skip to content
CryptoManiac edited this page Jan 29, 2014 · 17 revisions

A transaction is a signed section of data that is broadcast to the network and collected into blocks. It typically references previous transaction(s) and dedicates a certain number of novacoins from it to one or more new public key(s).

Currently there are a few transaction types possible.

User operation

This transactions are typically used to redeem novacoins from unspent inputs. It generally references unspent input(s) and creates a new output(s) with specified value(s) an destination(s).

Coinbase

Coinbase have a single input, and this input has a "coinbase" parameter instead of a scriptSig. The data in "coinbase" can be anything; it isn't used. Bitcoin puts the current compact-format target and the arbitrary-precision "extraNonce" number there, which increments every time the Nonce field in the block header overflows. Outputs can be anything, but Bitcoin creates one exactly like an IP address transaction. The extranonce contributes to enlarge the domain for the proof of work function.

This transactions are used to reward the proof-of-work miners. Proof-of-stake blocks have the coinbase transaction too, but with empty output.

There are three destination types allowed for user and coinbase transactions:

  • Public key (Pay-to-Pubkey);
  • Public key hash (Pay-to-PubkeyHash);
  • Script hash (Pay-to-ScriptHash).

Besides that, coinbase transactions are alowed to use the NULL destination type.

Coinstake

This transactions are used to provide a suitable proof for proof-of-stake block header. This type is similar to user transactions, but with some differences.

  • First input of this transaction is required to satisfy a current proof-of-stake difficulty.
  • It's allowed to generate new coins through paying negative fee.
  • A destination of the second output must be Pay-to-Pubkey.
General format of a transaction
Field Description sizeof
Version Currently 1 4
Timestamp Transaction timestamp 4
Inputs count variable int 1 - 9
Inputs array Inputs array or coinbase property inputs set size
Outputs count variable int 1 - 9
Outputs array Array of output structures outputs set size
Lock time block height or timestamp when transaction is final 4