Lecture 3.2 作者: bao_zijian@163.com Bitcoin scripts Output "addresses" are really scripts 把output中的地址轉換為合約 the secret is that the input address is also a script 實際上 input scripts called scriptsig output scripts called scriptPublickey forth language. is a stack-based language no loops 一種類似forth的語言 :簡單,但是support for pretty sophistcated cryptography there are special purpose instructions to do compute hash functions and to compute signatures and verigy signatures
Bitcoin script instructions 256 opcodes total (15disabled,75 reserved) 可以做的運算: Arithmetic if/then logic/date handling Crypto
Lecture 3.3 作者: bao_zijian@163.com Applications of Bitcoin scripts
Example 1:Escrow transactions(第三方交易) a third party and do ascrow transactions MULTIGIS 多重簽名技術
Example 2:Green addresses 有個bank的存在 現實中有兩家公司:Instawaller and mount Gox
Example 3:Efficient micro-payments problem : Alice wants to pay Bob for each minue of phone service . She doesn't want to incur a transaction fee every minute. solution: low value transaction every minute
multi-palyer lotteries
Lecture 3.4 作者: bao_zijian@163.com Bitcoin blocks why bundle transactions together? single unit of work for miners limit length of hash-chaina of blocks faster to verify history
Lecture 3.5 作者: bao_zijian@163.com The bitcoin network let us talk about how Bitcoin blocks get put together. Bitcoin P2P network ad-hoc protocol(runs on TCP port 8333) Ad-hoc network with random topology all nodes are equal new nodes can join at any time Forget non-responding nodes after 3 hr should I relay a proposed transaction? Transaction valid with current block chain script matches a whitelist avoid unusual scripts Haven't seen beford avoid infinite loops doesn;t conflict with others I've relayed avoid double-spengs Race conditions Default behavior:accept what you hear first Network position matters miners may implement other logic!
How big is the network? impossible to measure exactly estimates-up to 1M 1P addresser/month Only about 5-10k "full nodes" Permannently connected Fully-validate this number may be dropping!
Lecture 3.6 作者: bao_zijian@163.com Limitations & improvements 10min.average creation time per block 1M bytes in a block
Througput limits in Bitcoin 7 transactions/sec compare to : VISA,PayPal
Cryptographic limits in Bitcoin only 1 signature algorithm(ECDSA/P256) Hard-coded hash functions
Hard-forking changes to Bitcoin
Next week, we will talk about Human beings aren't work for people, not nodes How do people interact with the network? How do people exchange bitcoins for cash? How do people securely store bitcoins? Currency needs to work for people, not nodes.