First proposed by Lighting Network, this contract allows two participants (e.g., Alice and Bob) to swap their tokens without trusting each other. It can be instantiated by the following script:
IF
<BKey> CHECKSIGVERIFY
HASH160 <H> EQUAL
ELSE
<AKey> CHECKSIGVERIFY
<ATime> CHECKLOCKTIMEVERIFY
ENDIF
Alice and Bob can swap their coins through the above contract, spefically,
The above protocol can be summarized by one sentence - “I’ll let you take my funds but in doing so you have to reveal a secret that lets me take your funds.”
HTLC can be further extended to support atomic cross-chain swap. (e.g., BTC <-> ETC)
Reference:
]]>Hard forks are created by the changes of the protocol such as block size, difficulty.
In hard forks, the new version blocks will not accepted by the old version nodes.
Hard forks can lead to double-spending transaction in the sense that an UTXO that has been spent on the new-chain can be spent again in the old-chain.
Soft forks are created by the changes of protocol in a way that does not affect the structure. (e.g., tighten the rules, add cosmetic functions)
In soft forks, the new version blocks will be accepted by the old version nodes.
New version blocks will be seen and accepted by both new version nodes and old version nodes, so the new version blocks will eventually dominate the the longest chain.
Check out [Hard Fork vs Soft Fork] for the details.
]]>*
*
*
*
Check out [TLS Handshake] for the details.
]]>In this blog, let me introduce a little bit about myself.
I was born at Anqing, Anhui in 1993, and raised in a small village, there I completed my first 3 years of elmentary school study, then in 2002, my parents immigrated to Beijing, the capital of China, so I transferred there as well to continue the study.
In 2007, I was in the 8th grade, usually students in this stage should prepare for the High School Entrance Exam. Unfortunately, due to the admission limitation posed by the education bureau of Beijing that immgrants without registration on the household department could not take that exam and been admitted by any high schools. Given this circumstance, I had to transfer back to my hometown to complete the rest of study. Thanksfully, in 2008, I passed the High School Entrance Exam and was admitted by the best high school in my county, which is Taihu Middle School.
Essentially, in China, attending a high school paves the way to the Universities. Students spend threes years in high school to get the primary study in Science and Literature. Back to my school time, at the beginning of my second year, students have to choose one topic from two tracks, either the Literature track or the Science track as their subject of College Entrance Exam. Based on my superiority on mathmatic and phyisic, I choosed Science track.
In the high school, the 3 years study equipped me the ground-knowledge about logic and philosophy. Meanwhile, I learned a lot from my teachers and peer classmates.
I took the College Entrance Exam in 2011, at Anhui province. I passed the exam and was admitted by Nanjing University of Aeronautics and Astronautics (NUAA). I spent 4 years in Electronic Engeering at Automation college.
]]>