blockchain - modrpc/info GitHub Wiki

Table of Contents

Overview

Bitcoin

Overview

  • sending payment from one party to another without central authority
    • digital signatures can be used for this purpose
    • challenge: how to prevent double spending (without central authority)
  • HOW: network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work
    • this forms a record, which cannot be changed without redoing proof-of-work
    • longest chain serves as 1) proof of sequence of events witnessed and 2) prof that it came from the largest pool of CPU power
    • as long as a majority of CPU power is good, it can outpace attackers
  • messages are broadcast on a best effort basis
  • WHAT: P2P distributed timestamp server
    • generates computational proof of the chronological order of transactions

Transactions

  • electronic coin: defined as chain of digital signatures
  • transfer of coin:
    • owner transfers coin to the next by signing a hash of the previous transaction and the public key of the next owner> and adding these to the end of coin
    • payee can verify the signatures to verify the chain of ownership
  • challenge: how to avoid double-spending?
    • payee should know that previous owner did not sign any earlier transactions
  • solution:
    • to confirm absence of a transaction (prev spending), all transactions must be known
    • to accomplish this without central authority, transactions must be publicly announced
  • technically:
    • a system of participants who agreen on a signale history of the order in which they were received
    • payee needs proof that, at the time of each transaction, the majority of nodes agreed it was the first received

Timestamp Server

  • works by:
    • takes a hash of a block of items to be timestamped, and
    • widely publishes the hash (e.g. in a Usenet newsgroup post)
  • timestamp proves that the data must have existed at the time

Proof-of-Work

  • IMPLEMENT distributed timestamp server
    • use proof-of-work system
    • scan for a value that, when hashed, such as with SHA-256, the hash begins with a number of zero bits
    • the average work required is exponential in the number of zero bits required and can be verified by executing a single hash
  • majority decision making
    • majority decision is represnted by the longest chain, which has the greated proof-of-work effort invested in it

Network

  • Steps to run the network
    • new transactions are broadcast to all nodes
    • each node collects new transactions into a block
    • each node works on finding a difficult proof-of-work for its block
    • when a node finds a proof-of-work, it broadcasts the block to all nodes
    • nodes accept the block only if all transactions in it are valid and not already spent
    • nodes express their acceptance of the block by working on creating the next block in the chain, using the has of the accepted block as the previous hash

Etherium

  • https://ethereum.org/
    • On traditional server architectures, every application has to set up its own servers that run their own code in isolated silos, making sharing of data hard. If a single app is compromised or goes offline, many users and other apps are affected.
    • On a blockchain, anyone can set up a node that replicates the necessary data for all nodes to reach an agreement and be compensated by users and app developers. This allows user data to remain private and apps to be decentralized like the Internet was supposed to work.
  • Ethereum Developer's Guide
⚠️ **GitHub.com Fallback** ⚠️