【1. 组会】
看论文时要揣摩作者的思路,看看类似的思路能否应用到我的研究中。
还是应该横向学习:数据结构,操作系统。等等一切block-chain涉及的、你当前感兴趣的点,当积累了足够的横向知识,再去做纵向探索。
即使不开组会,到时间了也应该做ppt,作为工作记录。
要比一般人做的多,做的好,而不是做到最低标准,甚至连最低标准都没做到。比着最努力的那个人、那些人去做。有人做得到的你就做得到。
【2.下学期选课】
【Becky的论文课】全英文,用latax写论文及写论文的全过程。
【网络存储系统】主题是block-chain。形式是读材料。
在考虑是否做一件事前,先在心里划分:这件事是真的非我做不可吗?如果是,那就毫不犹豫去做;假如不是,那么想办法推给别人。比如陪弟弟看电影,并不一定非要我去做不可,我妈妈也一样可以;比如做早点,与其自己花费数小时去做一个全麦面包,多花一点钱去淘宝上买不是更划算?而训练自己的大脑、训练自己的肉体这些,则是必须要你亲力亲为,且是时间看得见的事情,是应该毫不犹豫去坚持的。
要让自己养成“时间饥渴症”。
【3.以太坊白皮书】
message:contract在执行代码过程中遇到CALL opcode,会建立并发送一则message给另一个contract。相当于触发一个新的contract。
【举例说明】
transaction :
STARTGAS&GASPRICE: 2000 gas* 0.001 ether/gas;
Value: 10 ether value;
Data: 64 bytes of data, with bytes 0-31 representing the number 2 and bytes 32-63 representing the string CHARLIE.
Suppose:
the contract's storage starts off empty
steps:
1. Check that the transaction is valid and well formed.
2. pay transaction fee:Check that the transaction sender has at least 2000 * 0.001 = 2 ether. If they do, then subtract 2 ether from the sender's account.
3. substract transaction's gas:Initialize gas = 2000; assuming the transaction is 170 bytes long and the byte-fee is 5, subtract 850 so that there is 1150 gas left.
4. pay transaction value:Subtract 10 more ether from the sender's account, and add it to the contract's account.
5. Run the contract code of the account. In this case, this is simple: it checks if the contract's storage at index2is used, notices that it is not, and so it sets the storage at index2 to the valueCHARLIE. Suppose this takes 187 gas, so the remaining amount of gas is 1150 - 187 = 963.
6. pay back gas. Add 963 * 0.001 = 0.963 ether back to the sender's account, and return the resulting state.
【总结】
transaction的实质,是发送方付钱来调用接收方拥有的合约代码段,以实现特定功能。