type Transaction struct {
Header TransactionHeader
Signature []byte
Payload []byte
}
type TransactionHeader struct {
From []byte
To []byte
Timestamp uint32
PayloadHash []byte
PayloadLength uint32
Nonce uint32
}
type Block struct {
*BlockHeader
Signature []byte
*TransactionSlice
}
type BlockHeader struct {
Origin []byte
PrevBlock []byte
MerkelRoot []byte
Timestamp uint32
Nonce uint32
}
def proof_of_work(block, difficulty) {
while (block.get_hash()[0:difficulty] != "0" * difficulty):
block.header.nonce += 1
}
- Every peer has to download all the data.
- Every peer is connected over TCP to as many peers as possible.
- Every new transaction or block is broadcast to the network.
- It's really hard to undo because Proof of Work is expensive.
- Blocks refer to the hash of the previous block.
- The more blocks built on top of a block, the safer it is.
^ Undoing transaction 3 blocks down requires recalculating all of them
-
The cost of modifying a previously verified block must be higher than the benefit of verifying new blocks.
-
We can now have an append-only, signed database that can be completitely decentralized.
Bitcoin peer-controlled currency
Bitcoin peer-controlled currency Namecoin distributed DNS service
Bitcoin peer-controlled currency Namecoin distributed DNS service Certcoin? web-of-trust style certificate store
Bitcoin peer-controlled currency Namecoin distributed DNS service Certcoin? web-of-trust style certificate store Keycoin? distribution of public keys for any identity