레이블이 transaction인 게시물을 표시합니다. 모든 게시물 표시
레이블이 transaction인 게시물을 표시합니다. 모든 게시물 표시

2014년 1월 24일 금요일

Merkle tree structure of transaction in bitcoin




https://en.bitcoin.it/wiki/Protocol_specification#block



Merkle tree is to make sure that data blocks (transactions) received
from other peers in a peer-to-peer network are received undamaged and unaltered,
and even to check that the other peers do not lie and send fake blocks.
Merkle tree can be used to verify any kind of data stored.

transaction of bitcoin : satoshi paper


Bitcoin: A Peer-to-Peer Electronic Cash System   by  Satoshi Nakamoto.

1) Transaction

     1). Electronic coin : define as chain of digital signature.

     2). Transfer : adding the end of the coin with

            - signing   1) a hash of the previous transaction.

                2) public key of the next owner.

           - buyer : verify the signature.

Transaction data
   1. Input.

      * Previous tx : a hash of a previous transaction.

       * ScriptSig : the first half of a script.

           - hash of a simplified version of the transaction.

             - cf). Script : a signature + a public key.

  2. Output.

      * ScriptPubKey is the second half of a script.

            - The public key : buyer.
  3. verification.
     * ScriptSig + ScriptPubKey  : prove the transaction was created by the real owner.





Form of transaction data


https://en.bitcoin.it/wiki/Transactions