Skip to content

Instantly share code, notes, and snippets.

@xeroc
Created April 7, 2016 08:09
Show Gist options
  • Save xeroc/909579a6037f5d8dfb7a884bd911a373 to your computer and use it in GitHub Desktop.
Save xeroc/909579a6037f5d8dfb7a884bd911a373 to your computer and use it in GitHub Desktop.

Introduction: Blockchain "protocol" specifications:

  • Who is allowed to read the database?
  • Who is allowed to transact (private vs. public)?
  • Who is allowed to commit new data to the blockchain?
  • What is a valid operation/transaction (What can be added to the database?)?
  • What is a valid block?

Who is allowed to read the database?

  • verify blockchain requires full knowledge of all data on the blockchain
  • public verifiers/block producers -> public blockchain
  • may still contain encrypted (but validated) data

Who is allowed to transact (private vs. public)?

  • Even if the blockchain is publicly auditable, does not imply everyone can add data
  • Adding data may require a valid and authorized signature
  • By this, people can be allowed to do A, but prevented from doing B
  • Permission-less ledger: "No one can stop you from playing by the rules!"
  • Those "rules" are defined below and thus already restrict a permission-less ledger.

!Authorization!

Who is allowed to commit new data to the blockchain?

  • Miners, Stakers, Minters, Witnesses => block producers
  • Requirements from Consensus Mechanism need to be fulfilled
  • Maybe predefined producers, maybe voted, maybe undefined

What is a valid operation/transaction (What can be added to the database?)?

  • What kind of data can be added?
    • transfer operations?
    • deployment of smart contracts?
    • trade orders?
    • lending orders?
    • any kind of relational data
    • even object-relational data
    • or raw data
  • What requirements does this data need to fulfill to be valid?
    • double-spending of funds?!
    • overwriting of existing keys?
    • user is allowed to perform operation X?
    • user is allowed to perform operation X on account Y?

!Validation!

The "what is allowed" needs to be defined in the rules (i.e. the blockchain protocol) of the specific blockchain.

What is a valid block?

  • valid previous hash(!)
  • valid hash of the content (e.g. transactions, operations, merkle tree, ...)
  • data and time within a tolerance (NTP)
  • valid "consensus" requirement (e.g. pow, pos, signature, ...)

Examples

Bitcoin

  • What is a valid transaction (What can be added to the database?)
    • simple "transfers" of an amount of bitcoin/satoshi from an address to a "Script"
    • most used "target scripts" are also just addresses
    • require proper signature from the spending address (coin owner)
  • What is a valid block
    • set of valid transactions (merkle tree root)
    • date
    • organizational data (nonce, protocol version, etc)
    • valid proof of work
  • Who is allowed to transact (private vs. public)
    • anybody that has bitcoin and owns the private key(s)
  • Who is allowed to add data to the database?
    • POW miners

Ethereum

BitShares

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment