理解区块链

本文章由老师所上课的内容,加上自己的理解,作为总结写出,并且会提出自己的一些疑问。(疑问会随着进一步学习不断解决)

总结

1.要理解区块链,需要理解Cryptography(密码学),Economics(经济学),Ditributed systems(分布式系统)三部分的内容
理解区块链
1).金融危机,国家灾难都证明了银行或者某一个中心都不是一定可以相信的,因此需要去中心化

2.A new digital currency aims to change the finnancial system should obey rules as follows
1)保护隐私(keep privacy)
Use public,private key pair
公钥用于交易,由私钥生成,公钥能被所有人看到以标识一次交易的对象,而私钥只有所有者所有,其他任何人都不会知道。

"there is not a way to derive from this public key what the private key is "

2)无法修改(can’t be modified)
for the one hand,no one could tamper the data in any of the block before
for the other hand,owing to the signature,only the people who have money can add a tansaction

“there is a big problem with this, that is what’s to stop somebody from just adding a transaction that spends all of someone else’s money”

solve->not every one could add a transaction:
first,we should create a private key and then generate a public key for transaction
then,when sending a transaction, a verified signature of the transaction will also be sent,if anyone change the tansaction,the signature will be invalid
tzy577
3) 货币有限(finite)

4)需要一定的代价或者努力(price or cost)
cpu

5)货币和用户间的联系(relationships between user and transaction)
用户拥有一个私钥,私钥可以生成公钥,用于交易。每一笔交易需要用户用交易数据和私钥生成签名用于确保交易真实

“you can check this siganature against this public key to see whether or not the private key behind this public key”

6)防止双花(prevent double spending)

疑问

1.parity中的library和多重签名钱包
那个攻击者不要承担parity的索赔要求吗?
为什么攻击者不用selfdestruct将所有钱转到自己的账户

2.如何保证分布式一致性

3.如何防止双花

4.计算某一块hash时,发生新交易——>放在下一块交易吗?

5.the DAO

6.SHA3

参考: 1.https://zhuanlan.zhihu.com/p/42481392
2.https://anders.com/blockchain/
“Blockchain Demo”