Blockchain Technologies Feature Analysis

Copyright 2016 Digital Bazaar, Inc. (except for Data Structure sections)
Shared under a Creative Commons Attribution 4.0 International license

Abstract

This document analyses the security and performance characteristics of six interesting software systems related to blockchain technology and decentralized identity systems. The systems analyzed in this report are Bitcoin, Ethereum, Stellar, IPFS, Blockstack, and Hashgraph.

Overview

The security and performance findings of this report are summarized in table form at the beginning of the report. Each technology is then analyzed in detail for the rest of the report.

Each analysis of a particular blockchain technology starts by documenting the basic data structures used for the system. The basic data structures are a window into the information that the system needs to operate. They also provide a view into the capabilities and complexity of the given system.

Once the data structures are highlighted, an analysis on the security characteristics of the system is performed. This analysis is based on what the system is capable of doing today. A similar analysis is then performed for the performance characteristics of the system. Finally, the notable characteristics of the system are outlined in an attempt to highlight what makes the particular blockchain different from other blockchains.

Disclaimer

The analysis performed in this document is preliminary, the field of study is
rapidly evolving, and thus this document is a work in progress. There may be
errors or interpretations that do not align with the high-level summaries that
the authors have presented in this analysis. We are actively engaging with the
developer communities that created each technology analyzed in this document
in an attempt to ensure that the information provided and analysis performed
is accurate.
Table of Contents
Terminology
Security Principles Summary Chart
Performance Principles Summary Chart
Bitcoin
   ﹂ Data Structures
      ﹂ Block Format
      ﹂ Blockheader Format
      ﹂ Transaction Format
      ﹂ Transaction Input Format
      ﹂ Transaction Output Format
   ﹂ Security Characteristics
   ﹂ Performance Characteristics
   ﹂ Notable Features
Ethereum
   ﹂ Data Structures
      ﹂ Account Format
      ﹂ Message Transaction Format
      ﹂ Receipt Format
      ﹂ Block Format
   ﹂ Security Characteristics
   ﹂ Performance Characteristics
   ﹂ Notable Features
Stellar
   ﹂ Data Structures
      ﹂ LedgerHeader Format
      ﹂ Account Format
      ﹂ Transaction Format
   ﹂ Security Characteristics
   ﹂ Performance Characteristics
   ﹂ Notable Features
IPFS
   ﹂ Data Structures
      ﹂ Object Merkle DAG - IPFSLink
      ﹂ Object Merkle DAG - IPFSObject
      ﹂ Other
   ﹂ Security Characteristics
   ﹂ Performance Characteristics
   ﹂ Notable Features
Blockstack
   ﹂ Data Structures
      ﹂ Base Name Record Format
      ﹂ Base Namespace Format
      ﹂ Name Import Format
      ﹂ Namespace Preorder Format
      ﹂ Namespace Reveal Format
      ﹂ Namespace Ready Format
      ﹂ Name Preorder Format
      ﹂ Name Registration Format
      ﹂ Name Revoke Format
      ﹂ Name Update Format
   ﹂ Security Characteristics
   ﹂ Performance Characteristics
   ﹂ Notable Features
Hashgraph
   ﹂ Data Structures
      ﹂ Gossip Event
   ﹂ Security Characteristics
   ﹂ Performance Characteristics
   ﹂ Notable Features

Terminology

In order to perform a meaningful analysis of each system, it is important to define and use the terminology that is applied to each system consistently. The terminology below is used throughout the document and readers are strongly advised to understand the terminology before going further and to refer back to this section in order to fully understand the usage of each term in the analysis sections.

Security Principles Summary Chart

Principle Bitcoin Ethereum Stellar IPFS Blockstack Hashgraph
Confidentiality NONE NONE NONE Hash-based content addresses NONE NONE
Information Availability Block Mirroring Block Mirroring Ledger Mirroring Graph and file Mirroring Block Mirroring / DHT Mirroring Hashgraph Mirroring; optional event history
Integrity Multiple block verifications Multiple block verifications Latest block verification Hash-based content addressing Multiple block verifications Consensus with probability one
Non-repudiation Digital signatures Digital signatures Digital signatures Digital signatures Digital signatures Digital signatures
Provenance Transaction inputs/outputs Ethereum state machine and transition functions Digitally signed ledger transition instructions Digital signatures and versioning Transaction inputs & outputs and virtualchain references Hashgraph Mirroring; optional event history
Pseudonymity Public keys Public keys and contract addresses Public keys Public keys Public keys, but public information encouraged Not supported; could be layered
Selective Disclosure NONE NONE NONE NONE Selective access to encrypted storage Not supported; could be layered

Performance Principles Summary Chart

Principle Bitcoin Ethereum Stellar IPFS Blockstack Hashgraph
Consistency Block verifications. 30-60 minutes Block verifications. 20-60 minutes Single block verification. Less than 1 minute P2P mirroring. Limited primarily by network I/O. Several seconds for files less than 128KB. Block verifications. 30-60 minutes Consensus with probability one; Byzantine agreement, but attackers must control less than one-third
System Availability Block verifications. 30-60 minutes Block verifications. 20-60 minutes Single block verification. Less than 1 minute. Single storage request response. Several seconds for files less than 128KB Block verifications. 30-60 minutes Virtual voting; DoS resistant w/o proof-of-work, fast gossip
Failure Tolerance Longest chain wins Longest chain wins Last balloted block always has consensus. Content address hash. Highly resilient against network partitioning Longest chain wins Strong Byzantine fault tolerance
Scalability Block size. 7 transactions per second Block size. 7-20 transactions per second Thousands to tens of thousands of transactions per second. Thousands to tens of thousands of transactions per second. Scales linearly as nodes are added. Block size. 7 transactions per second Thousands to tens of thousands of transactions per second. Limited by bandwidth only
Latency Block verifications. 30-60 minutes Block verifications. 20-60 minutes Single block verification. Less than 1 minute. Single storage request response. Several seconds for files less than 128KB. Block verifications. 30-60 minutes Virtual voting; limited only by exponentially fast gossip protocol
Auditability Full Full Full Difficult Full Configurable
Liveliness Full Full Full Fails if nodes storing data fail Full Full
Denial of Service Resistance Spend Bitcoin Spend Ether Spend Stellar Files are only mirrored if requested Spend Bitcoin Signed State / Proof-of-stake / < 1/3 attackers
System Complexity Medium High Medium Medium Medium Low, but not full system

Bitcoin

Data Structures

Block Format

Field Description Size
Magic no value always 0xD9B4BEF9 4 bytes
Blocksize number of bytes following up to end of block 4 bytes
Blockheader See below 80 bytes
Transaction counter positive integer 1 - 9 bytes
transactions the (non empty) list of transactions Transaction counter - many transactions

Blockheader Format

Field Description Size
Version Block version number 4 bytes
hashPrevBlock 256-bit hash of the previous block header 32 bytes
hashMerkleRoot 256-bit hash based on all of the transactions in the block 32 bytes
Time Current timestamp as seconds since 1970-01-01T00:00 UTC 4 bytes
Bits Current target in compact format 4 bytes
Nonce 32-bit number (starts at 0) 4 bytes

Transaction Format

Field Description Size
Version no currently 1 4 bytes
In-counter positive integer 1 - 9 bytes
list of inputs the first input of the first transaction is also called "coinbase" (its content was ignored in earlier versions) In-counter - many inputs
Out-counter positive integer 1 - 9 bytes
list of outputs the outputs of the first transaction spend the mined bitcoins for the block Out-counter - many outputs
lock_time if non-zero and sequence numbers are < 0xFFFFFFFF: block height or timestamp when transaction is final bytes

Transaction Input Format

Field Description Size
Previous Transaction hash doubled SHA256-hashed of a (previous) to-be-used transaction 32 bytes
Previous Txout-index non negative integer indexing an output of the to-be-used transaction 4 bytes
Txin-script length non negative integer 1 - 9 bytes
Txin-script / scriptSig Script in-script length - many bytes
sequence_no normally 0xFFFFFFFF; irrelevant unless transaction's lock_time is > 0 4 bytes

Transaction Output Format

Field Description Size
value non negative integer giving the number of Satoshis to be transferred 8 bytes
Txout-script length non negative integer 1 - 9 bytes
Txout-script / scriptPubKey Script out-script length - many bytes

Security Characteristics

Performance Characteristics

Notable Features

Ethereum

Data Structures

Account Format

Field Description Size
nonce A scalar value equal to the number of transactions sent from this address or, in the case of accounts with associated code, the number of contract-creations made by this account. 32 bytes
balance A scalar value equal to the number of Wei owned by this address. 32 bytes
storageRoot A 256-bit hash of the root node of a Merkle Patricia tree that encodes the storage contents of the account (a mapping between 256-bit integer values), encoded into the trie as a mapping from the Keccak 256-bit hash of the 256-bit integer keys to the RLP-encoded 256-bit integer values. 32 bytes
codeHash The hash of the EVM code of this account—this is the code that gets executed should this address receive a message call; it is immutable and thus, unlike all other fields, cannot be changed after construction. All such code fragments are contained in the state database under their corresponding hashes for later retrieval. 32 bytes

Message Transaction Format

Field Description Size
nonce A 64-bit hash which proves combined with the mix-hash that a sufficient amount of computation has been carried out on this block 8 bytes
gasPrice A scalar value equal to the number of Wei to be paid per unit of gas for all computation costs incurred as a result of the execution of this transaction. 32 bytes
gasLimit A scalar value equal to the current limit of gas expenditure per block 32 bytes
to The 160-bit address of the message call’s recipient or, for a contract creation transaction, ∅, used here to denote the only member of B0. 20 bytes
value A scalar value equal to the number of Wei to be transferred to the message call’s recipient or, in the case of contract creation, as an endowment to the newly created account 32 bytes
v, r, s Values corresponding to the signature of the transaction and used to determine the sender of the transaction ?
data Only in non-contract messages. An unlimited size byte array specifying the input data of the message call. unlimited
init Only in contract messages.An unlimited size byte array specifying the EVM-code for the account initialisation procedure unlimited
body Only in contract messages. A fragment of code that executes each time the account receives a message call (either through a transaction or due to the internal execution of code) unlimited

Receipt Format

Field Description Size
state the post-transaction state ?
cumulativeGasUsed the cumulative gas used in the block containing the transaction receipt as of immediately after the transaction has happened ?
logs the set of logs created through execution of the transaction ?
logsBloom the Bloom filter composed from information in those logs ?

Block Format

Field Description Size
parentHash The Keccak 256-bit hash of the parent block’s header, in its entirety 32 bytes
ommersHash The Keccak 256-bit hash of the ommers list portion of this block 32 bytes
beneficiary The 160-bit address to which all fees collected from the successful mining of this block be transferred 20 bytes
stateRoot The Keccak 256-bit hash of the root node of the state trie, after all transactions are executed and finalisations applied 32 bytes
transactionsRoot The Keccak 256-bit hash of the root node of the trie structure populated with each transaction in the transactions list portion of the block 32 bytes
receiptsRoot The Keccak 256-bit hash of the root node of the trie structure populated with the receipts of each transaction in the transactions list portion of the block 32 bytes
logsBloom The Bloom filter composed from indexable information (logger address and log topics) contained in each log entry from the receipt of each transaction in the transactions list ?
difficulty A scalar value corresponding to the difficulty level of this block. This can be calculated from the previous block’s difficulty level and the timestamp. 32 bytes
number A scalar value equal to the number of ancestor blocks. The genesis block has a number of zero 32 bytes
timestamp A scalar value equal to the reasonable output of Unix’s time() at this block’s inception 4 bytes?
extraData An arbitrary byte array containing data relevant to this block. This must be 32 bytes or fewer 0-32 bytes
mixHash A 256-bit hash which proves combined with the nonce that a sufficient amount of computation has been carried out on this block 32 bytes
ommerBlockHeaders A list of ommer block headers (of the same format as everything above in this table) ?
transactions a series of the transactions ?

Security Characteristics

Performance Characteristics

Notable Features

Stellar

Data Structures

LedgerHeader Format

Field Description Size
ledgerVersion The protocol version of the ledger 4 bytes
previousLedgerHash Hash of the previous ledger header 32 bytes
scpValue What consensus agreed to 808 bytes
txSetResultHash The TransactionResultSet that led to this ledger 32 bytes
bucketListHash Hash of the ledger state 32 bytes
ledgerSeq Sequence number of this ledger 4 bytes
totalCoins Total number of stroops in existence. There are 10,000,000 stroops in 1 Stellar (XLM) - 1 Stellar is the unit of currency (e.g. U.S. Dollars). 8 bytes
feePool Fees burned since last inflation run 8 bytes
inflationSeq Inflation sequence number 4 bytes
idPool Last used global ID, used for generating objects 8 bytes
baseFee Base fee per operation in stroops 4 bytes
baseReserve Account base reserve in stroops 4 bytes
maxTxSetSize Maximum size a transaction set can be 4 bytes
skipList Hashes of ledgers in the past. allows you to jump back in time without walking the chain back ledger by ledger each slot contains the oldest ledger that is mod of either 50 5000 50000 or 500000 depending on index skipList[0] mod(50), skipList[1] mod(5000), etc. 128 bytes

Account Format

Field Description Size
accountID Master public key for this account 32 bytes
balance Account balance in stroops 8 bytes
seqNum Last sequence number used for this account 8 bytes
numSubEntries Number of sub-entries this account has drives the reserve 4 bytes
inflationDest Account to vote for during inflation 8 bytes
flags Flags set on issuer accounts. TrustLines are created with authorized set to "false" requiring the issuer to set it for each TrustLine. Values may be AUTH_REQUIRED_FLAG (if set, the authorized flag in TrustLines can be cleared), otherwise, authorization cannot be revoked and the flag is AUTH_REVOCABLE_FLAG. If AUTH_IMMUTABLE_FLAG is set, causes all AUTH_* flags to be read-only. 4-bytes
homeDomain Can be used for reverse federation and memo lookup 32 bytes
thresholds Stores unsigned bytes: [weight of master:low:medium:high] 4 bytes
signers Possible signers for this account 36 bytes per signer (720 bytes total)

Transaction Format

Field Description Size
sourceAccount Account used to run the transaction 32 bytes
fee The fee the sourceAccount will pay 4 bytes
seqNum Sequence number to consume in the account 8 bytes
timeBounds Validity range (inclusive) for the last ledger close time 4 bytes (pointer to 16 byte data structure)
memo Extra data carried along with the transaction. 0-32 bytes
operations Up to 100 operations associated with this transaction. 8-N bytes (dependent on op code)

Security Characteristics

Performance Characteristics

Notable Features

IPFS

Data Structures

Field Description Type
Name Name or alias of link. string
Hash Cryptographic hash of target. Multihash
Size Total size of target. int

Object Merkle DAG - IPFSObject

Field Description Type
links Array of links. Array of IPFSLinks
data Opaque content data. Array of bytes

Other

Merkle DAG (directed acyclic graph) structures can be used to build many types of other systems. Specialized structures exist for encrypted data, signed data, and a number of versioned file system primitives.

Security Characteristics

Performance Characteristics

Notable Features

Blockstack

Data Structures

Base Name Record Format

Base Namespace Format

Name Import Format

Namespace Preorder Format

Namespace Reveal Format

Namespace Ready Format

Name Preorder Format

Name Registration Format

Name Revoke Format

Name Transfer Format

Name Update Format

Security Characteristics

Performance Characteristics

Notable Features

Hashgraph

Data Structures

No implementation of hashgraph was available, so the hashgraph datastructure, per the whitepaper is summarized below.

Gossip Event

The hashgraph consensus mechanism uses a gossip protocol. Whenever a member of the hashgraph receives new information, it chooses another member at random and communicates that information to it. This is called a “gossip event” and it is stored a sequence of bytes that is digitally signed by its creator.

Security Characteristics

Performance Characteristics

Notable Features


This document, a part of the "Credentials on Public/Private Linked Ledgers"
project, has been funded in part by the United States Department of Homeland
Security's Science and Technology Directorate under contract HSHQDC-16-C-00058.
The content of this document does not necessarily reflect the position or the
policy of the U.S. Government and no official endorsement should be inferred.