This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dido:public:ra:xapend:xapend.b_stds:defact:bitcoin:bips:bip_0112 [2020/05/19 21:02] char |
dido:public:ra:xapend:xapend.b_stds:defact:bitcoin:bips:bip_0112 [2021/08/17 13:10] (current) murphy |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== BIP 0112 - CHECKSEQUENCEVERIFY (soft fork) ==== | ==== BIP 0112 - CHECKSEQUENCEVERIFY (soft fork) ==== | ||
| - | [[dido:public:ra:xapend.stds:defact:bitcoin:bips| return to the Bitcoin Improvement Proposals ]] | + | [[dido:public:ra:xapend:xapend.b_stds:defact:bitcoin:bips| return to the Bitcoin Improvement Proposals ]] |
| <table> | <table> | ||
| Line 17: | Line 17: | ||
| </table> | </table> | ||
| - | : **Note**: The following is an excerpt from the official Bitcoin site. It is provided here as a convenience and is not authoritative. Refer to the original document(s) as the authoritative reference. | + | : **Note**: The following is an excerpt from the official [[dido:public:ra:xapend:xapend.a_glossary:b:bitcoin|Bitcoin]] site. It is provided here as a convenience and is not authoritative. Refer to the original document(s) as the authoritative reference. |
| === Abstract === | === Abstract === | ||
| - | //This BIP describes a new opcode (CHECKSEQUENCEVERIFY) for the Bitcoin scripting system that in combination with BIP 68 allows execution pathways of a script to be restricted based on the age of the output being spent.// | + | //This BIP describes a new opcode (CHECKSEQUENCEVERIFY) for the Bitcoin scripting system that in combination with BIP 68 allows execution pathways of a [[dido:public:ra:xapend:xapend.a_glossary:s:script|script]] to be restricted based on the age of the output being spent.// |
| === Summary === | === Summary === | ||
| Line 26: | Line 26: | ||
| * //the stack is empty; or// | * //the stack is empty; or// | ||
| * //the top item on the stack is less than 0; or// | * //the top item on the stack is less than 0; or// | ||
| - | * //the top item on the stack has the disable flag (1 << 31) unset; and// | + | * //the top item on the stack has the disable flag (1 << 31) unset; and//\\ |
| - | * //the transaction version is less than 2; or// | + | //a. the transaction version is less than 2; or//\\ |
| - | * //the transaction input sequence number disable flag (1 << 31) is set; or// | + | //b. the transaction input sequence number disable flag (1 << 31) is set; or//\\ |
| - | * //the relative lock-time type is not the same; or// | + | //c. the relative lock-time type is not the same; or//\\ |
| - | * //the top stack item is greater than the transaction input sequence (when masked according to the BIP68);// | + | //d. the top stack item is greater than the transaction input sequence (when masked according to the [[dido:public:ra:xapend:xapend.b_stds:defact:bitcoin:bips:bip_0068| BIP68 ]]);// |
| //Otherwise, script execution will continue as if a NOP had been executed.// | //Otherwise, script execution will continue as if a NOP had been executed.// | ||
| - | //[[dido:public:ra:xapend.stds:defact:bitcoin:bips:bip_0068 | BIP68]] prevents a non-final transaction from being selected for inclusion in a block until the corresponding input has reached the specified age, as measured in block-height or block-time. By comparing the argument to CHECKSEQUENCEVERIFY against the nSequence field, we indirectly verify a desired minimum age of the the output being spent; until that relative age has been reached any script execution pathway including the CHECKSEQUENCEVERIFY will fail to validate, causing the transaction not to be selected for inclusion in a block.// | + | //[[dido:public:ra:xapend:xapend.b_stds:defact:bitcoin:bips:bip_0068| BIP68]] prevents a non-final transaction from being selected for inclusion in a block until the corresponding input has reached the specified age, as measured in [[dido:public:ra:xapend:xapend.a_glossary:b:block_height|block-height]] or block-time. By comparing the [[dido:public:ra:xapend:xapend.a_glossary:a:argument|argument]] to CHECKSEQUENCEVERIFY against the nSequence field, we indirectly verify a desired minimum age of the the output being spent; until that relative age has been reached any script execution pathway including the CHECKSEQUENCEVERIFY will fail to validate, causing the transaction not to be selected for inclusion in a block.// |
| === Motivation === | === Motivation === | ||
| - | [[dido:public:ra:xapend.stds:defact:bitcoin:bips:bip_0068 | BIP68]] repurposes the transaction nSequence field meaning by giving sequence numbers new consensus-enforced semantics as a relative lock-time. However, there is no way to build Bitcoin scripts to make decisions based on this field.// | + | [[dido:public:ra:xapend:xapend.b_stds:defact:bitcoin:bips:bip_0068| BIP68]] repurposes the transaction nSequence field meaning by giving sequence numbers new consensus-enforced semantics as a relative lock-time. However, there is no way to build Bitcoin scripts to make decisions based on this field.// |
| //By making the nSequence field accessible to script, it becomes possible to construct code pathways that only become accessible some minimum time after proof-of-publication. This enables a wide variety of applications in phased protocols such as escrow, payment channels, or bidirectional pegs.// | //By making the nSequence field accessible to script, it becomes possible to construct code pathways that only become accessible some minimum time after proof-of-publication. This enables a wide variety of applications in phased protocols such as escrow, payment channels, or bidirectional pegs.// | ||