” Bitcoin is a system of programmable currency and is the first implementation of so-called smart contracts or autonomous contracts. For each transaction, scripts are run to verify that the funds spent meet the conditions intended by the previous user. Many conditions can be put in place (disclosure of a secret, time lock, multisignature), even if most often the funds are simply spent thanks to the signature of a single user.
Bitcoin is based on a parts model (UTXO), where each part is locked by an incomplete script written on the chain. During a transaction, the input bitcoin coins are unlocked by an additional script. Then, new parts are created from the old ones thanks to new locking scripts, which perpetuates the programmable nature of the system.
When I discovered how transactions work and what they allow, I was fascinated by the elegance of this solution. However, as I deepened my research, I was disturbed by the existence of something that differed from others, an exception: the schema Pay to Script Hash, which is commonly shortened to P2SH. “
Ludovic Lars article to read on viresinnumeris.fr
From Ailleurs: Source link