2014년 1월 24일 금요일

proof of work of bitcoin : satoshi paper


1.2) Proof-of-Work of bitcoin
    1). Scanning for a value that when hashed, the hash begins with number of zero bits.
   
    2). increment a nonce in the block until a value is found,  that gives the blocks hash the required zero bits

    3). As later blocks are chained after it,

          * the work to change the block would include redoing all the blocks  after it.
 
        * Every block contains a hash of the previous block.

             - Creating a chain of blocks from the genesis block to the current block.

            - By these properties, double-spending of bitcoins very difficult.


    4) Proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour.
    

v* Problem of majority decision in bitcoin
    
     1) Proof-of work is one-CPU-one-vote, not one-IP-one-vote.

     2) Majority decision is represented by the longest chain.

         è To modify a past block, an attacker redo the proof-of-work of the block and all blocks after it.

         è Probability of attack reduces exponentially as next blocks are added.
 



* Block of bitcoin 

  
  * There are multiple valid solutions for any given block

    - only one of the solutions needs to be found for the block to be solved.
  * Coinbase transaction:  known as a generation transaction.

      - appearing the first transaction in every block.
  * The number of generated Bitcoins per block: starts at 50.

      - halved every 210,000 blocks (about four years).
  * Bitcoin transactions are broadcast to the network,

      - all peers trying to solve blocks collect the transaction records.

      - add the transaction records to the block.
  * The difficulty of bitcoin is automatically adjusted by the network,

      - solving an average of 6 blocks per hour.

      - every 2016 blocks (about two weeks).
  * This increases (or decreases) the difficulty of generating blocks.


  * Hash of block:  SHA-256 hash of a block's header.

     - between 0the maximum value of a 256-bit number.

     - bitcoin uses: SHA256(SHA256(Block_Header))
  * If your hash is below the target, then you win.

     - If not, you increment the nonce and try again.

댓글 없음:

댓글 쓰기