Please enable JavaScript.
Coggle requires JavaScript to display documents.
Week 4: Bitcoin users in Bitcoin ecosystem (wallet (exchange (Simple…
Week 4: Bitcoin users in Bitcoin ecosystem
Bitcoin Governance
mining centralization
existing situations
ASICs (expensive --> control by the rich)
ASIC possesses high computational power
Pro: committed to Bitcoin applications
con: dominate so unequal say among network members
resistance strategies
Memory hard: requires a large amount of memory prerequisite
memory bound: memory bottlenecks the computational time
e.g. Dogecoin or Litecoin
Scrypt algorithm
memory bound type of problem to prevent the brute force for passwords
non-interindepependent
but versifiers face the same required memory to check the answer
however, now no more ASICs resistant
using one or more hash functions to increase the hardness
x11 x13 chained together
e.g. DASH using x11 with variant SHA3
switching hash function periodically
Proof of useful work
the answers are useful to the rest of the world
however, it is not quite feasible
missing an inexhaustible puzzle space
missing an equiprobable space
missing decentralized algorithmatically generated problem
single entity based
mining pools
mining farms
making consensus updates in Bitcoin
BitcoinCore used by Bitcoin full nodes
hard vs soft fork
the changes of protocols
updated vs non-updated nodes
some updated protocols are backward compatible, e.g. size restraints
Bitcoin Improvement Proposal, BIP
standard
actual update or change in protocols
informational
no change in protocols
how the things should be done
process
best practices
proposed by Amir Taaki in 2011
involving network protocols, transaction validation, or anything affecting interoperability
miners vote for a BIP by including the BIP reference in the block they mine
proposed changes in mining puzzle
principles
puzzle should be hard to solve
finding nonce is difficult
but easily be verified
proposal framework
puzzle difficulty should be adjustable in response to the computation power on network, e.g. ASICs
puzzle difficulty should reflect the computational power on network
progress free
puzzle answers are independent of each others
psedorandomly generated puzzle
no need to find the exact pre-image of the hash
the pre-requisite number of leading zeros
wallet
(functions):
manage public & private keys for sending & receiving Bitcoin with the rest of Bitcoin network
virtual identity by private key
secure the private key(s)
cautious of identity theft
store, send, receive, & list transactions
types
mobile based
AirBitz
mycelium
not storing your private key
web based
blockchain.info
coinbase.com
storing your private key in its web site
electrum
not storing your private key
warm wallet
on the Internet connection
cold wallet
never in connection to the Internet
paper wallet
bitaddress.org
bitcoinpaperwallet.com
brain wallet
key stretch
many times of hash of your selected words
hardware wallet
Ledger
Trezor
Case
convenience vs security
bitcoin ATM
exchange
trade between currencies or cryptocurrencies
https://bitcoin.org/en/exchanges
centralized vs decentralized
centralized
easy to access
risk to your fund be hacked
need to be trusted
centralized authority
may be backed by a power authority with high security
decentralized
P2P
trustless
bitshares
bisq
openledgder
airswap
Etherdelta
NXT
CounterParty
easy of access
security
define the value of a Bitcoin
reputation may influence its exchange value
Simple Payment Verification
wallet does not need to download the entire blockchain
only download the header of each block, without the entire block
light weight
thin client
good for limited storage capacity
not possible to store the entire block
wallet keeps
your keys
network routing components
connect to P2P protocol
running a merkle proof of inclusion
connect to many different nodes to obtain a partial picture
create a honest picture
Reference client (Bitcoin core)
multisig
needs m of n keys to authorize the transaction
e.g. 2 of 3 keys
one key kept by a third party in case of a key lost
key generation and best practice
not to reuse pseudonym
one key one identity
lose key lose fund
wallet can generate for you
private key is just a series of random numbers
Just a Bunch of Keys (JBOK)
keep the pairs of your keys
Hierarchical deterministic (HD) Wallet
master key or randomly generated seed
could deterministically generate the key(s)
hash the seed with an index number
e.g. third key from hash(seed3)
mining implementation(miners in a competition and luck game)
steps as a full node
download the entire Bitcoin blockchain from peers, starting from genesis block, stay up to date, except you are in a mining pool
done once that is enough
keep track of incoming blocks from other miners
in case of SPV, just keep block headers & request info from full nodes for verifying transactions as needed
step1: verify incoming transactions
fill up the block with the new transaction
a miner attempts to include unconfirmed or pending transactions in the mempool into a block
verification is the process of unlocking script
P2PKH
P2SH
step 2: create the block, using the given meta data: time, version ...
create merkle root based on the list of transactions
prev block hash
timestamp
target
version
step 3: find a valid nonce
proof of work
i.e. a valid nonce to solve partial pre-image puzzle
find a nonce to make the hash of block header to be less than the target
two nonces
header nonce
32 bits only
coinbase nonce
to try out the answer by looping
loop with coinbase nonce
loop with header nonce
to check H(H(makeHeader(header, header_nonce)) < target
step 4: broadcast your block first if no competitor blocks it
other miners will check it and accept it
reward if it makes the longest chain
or reward from transaction fee
take profit if the block gets included in the longest chain --> profit
no reward
in case of an orphan
in case of a folk
could be another miner submit the valid block to the network at the same time
miners will randomly choose which to be the valid block and added and make the longest chain
incentives
revenue > cost
mining revenue
mining reward + transaction fee
mining cost
fixed cost
variable cost
theoretically supply cap at 21 million Bitcoins
practically, 1 million belongs to Satoshi Nakamoto and some private keys lost, and some of them burned
reward will be halved every 210, 000 blocks
transaction fee
set by the sender of a transaction
higher transaction fee incentivizes more miners to validate the block quicker
mining reward diminishes over number of block, transaction fee becomes more important
Mining Costs: Fixed Costs
ASIC
Application Specific Integrated Circuit
e.g. Antminer S9
14 trillion hashes per sec
10.9 years to find a block
only do SHA256
variable costs
embodied energy
electricity
cooling
warehouse
personnels
miner types
Reference client
wallet, with full blockchain database & network routing node, mining
solo miner
full copy of blockchain & network routing node, mining
mining node
mining, mining protocol nodes, stratum protocol
users perspectives
categorized by functions (not exhaustive but just cover most of them)
network routing
maintaining a full blockchain / a full node
actively maintain a full up to date copy of Bitcoin blockchain
has a wallet to manage private and public keys
mining / a miner
earn a mining reward
has a wallet to manage private and public keys
handling wallet services