The illustration above shows a simplified version of a block chainblock chain - A chain of blocks with each block referencing the block that preceded it. The most-difficult-to-recreate chain is the best block chain.. A blockblock - One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain. of one or more new transactions is collected into the transactiontransaction - A transaction spending satoshis. data part of a block. Copies of each transaction are hashed, and the hashes are then paired, hashed, paired again, and hashed again until a single hash remains, the merkle rootmerkle root - The root node of a merkle tree, a descendant of all the hashed pairs in the tree. Block headers must include a valid merkle root descended from all transactions in that block. of a merkle treemerkle tree - A tree constructed by hashing paired data (the leaves), then pairing and hashing the results until a single hash remains, the merkle root. In Dash, the leaves are almost always transactions from a single block..
The merkle root is stored in the block headerblock header - An 80-byte header belonging to a single block which is hashed repeatedly to create proof of work.. Each block also stores the hash of the previous block's header, chaining the blocks together. This ensures a transaction cannot be modified without modifying the block that records it and all following blocks.
Transactions are also chained together. Dash walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. software gives the impression that duffsduffs - Denominations of Dash value, usually measured in fractions of a dash but sometimes measured in multiples of a duff. One dash equals 100,000,000 duffs. are sent from and to wallets, but Dash value really moves from transaction to transaction. Each transaction spends the duffs previously received in one or more earlier transactions, so the input of one transaction is the output of a previous transaction.
A single transaction can create multiple outputsoutputs - An output in a transaction which contains two fields: a value field for transferring zero or more duffs and a pubkey script for indicating what conditions must be fulfilled for those duffs to be further spent., as would be the case when sending to multiple addressesaddresses - A 20-byte hash formatted using base58check to produce either a P2PKH or P2SH Dash address. Currently the most common way users exchange payment information., but each output of a particular transaction can only be used as an inputinput - An input in a transaction which contains three fields: an outpoint, a signature script, and a sequence number. The outpoint references a previous output and the signature script allows spending it. once in the block chain. Any subsequent reference is a forbidden double spend---an attempt to spend the same duffs twice.
Outputs are tied to transaction identifierstransaction identifiers - Identifiers used to uniquely identify a particular transaction; specifically, the sha256d hash of the transaction. ( TXIDs), which are the hashes of signed transactions.
Because each output of a particular transaction can only be spent once, the outputs of a transaction included in the block chain can be categorized as either an unspent transaction outputunspent transaction output - An Unspent Transaction Output (UTXO) that can be spent as an input in a new transaction. or a spent transaction output. For a payment to be valid, it must only use UTXOs as inputs.
Ignoring coinbase transactions (described later), if the value of a transaction's outputs exceed its inputs, the transaction will be rejected---but if the inputs exceed the value of the outputs, any difference in value may be claimed as a transaction feetransaction fee - The amount remaining when the value of all outputs in a transaction are subtracted from all inputs in a transaction; the fee is paid to the miner who includes that transaction in a block. by the Dash minerminer - Mining is the act of creating valid Dash blocks, which requires demonstrating proof of work, and miners are devices that mine or people who own those devices. who creates the block containing that transaction. For example, in the illustration above, each transaction spends 10,000 duffs fewer than it receives from its combined inputs, effectively paying a 10,000 duff transaction fee.
Updated almost 2 years ago