hexresearch / hschain-utxo

UTXO-based contracts for hschain
0 stars 0 forks source link

Relative time check #170

Closed anton-k closed 3 years ago

anton-k commented 3 years ago

Implements relative time check primitive getBoxPostHeight. It allows us to query within the script blockchain height at which box was commited. With getBoxPostHeight we can create time bounds that are relative to the TX-post.

Channel and lightning demands this primitive. The ability to sign TX and give it to somebodyelse with output spend delayed by some amount from the time when somebody-esles desired to post the TX.

Similiar functionality is achiev3ed in Bitcoin with nSequence. But we can implement a better method by providing user method to query box-post time.