<div dir="ltr">Right. There are minor trade-offs to be made with regards to that design point of OP_<wbr>CHECKSIGFROMSTACKVERIFY. Fortunately this covenant construction isn't sensitive to that choice and can be made to work with either implementation of OP_<wbr>CHECKSIGFROMSTACKVERIFY.<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 2, 2016 at 11:35 PM, Johnson Lau <span dir="ltr"><<a href="mailto:jl2012@xbt.hk" target="_blank">jl2012@xbt.hk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>Interesting. I have implemented OP_<wbr>CHECKSIGFROMSTACKVERIFY in a different way from the Elements. Instead of hashing the data on stack, I directly put the 32 byte hash to the stack. This should be more flexible as not every system are using double-SHA256</div><div><br></div><div><a href="https://github.com/jl2012/bitcoin/commits/mast_v3_master" target="_blank">https://github.com/jl2012/<wbr>bitcoin/commits/mast_v3_master</a></div><div><br></div><br><div><blockquote type="cite"><div><div class="gmail-h5"><div>On 3 Nov 2016, at 01:30, Russell O'Connor via bitcoin-dev <<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.<wbr>linuxfoundation.org</a>> wrote:</div><br class="gmail-m_3266083758070358714Apple-interchange-newline"></div></div><div><div><div class="gmail-h5"><div dir="ltr">Hi all,<br><br>It is possible to implement covenants using two script extensions: OP_CAT and OP_CHECKSIGFROMSTACKVERIFY. Both of these op codes are already available in the Elements Alpha sidechain, so it is possible to construct covenants in Elements Alpha today. I have detailed how the construction works in a blog post at <<a href="https://blockstream.com/2016/11/02/covenants-in-elements-alpha.html" target="_blank">https://blockstream.com/2016/<wbr>11/02/covenants-in-elements-<wbr>alpha.html</a>>. As an example, I've constructed scripts for the Moeser-Eyal-Sirer vault.<br><br>I'm interested in collecting and implementing other useful covenants, so if people have ideas, please post them.<br><br>If there are any questions, I'd be happy to answer. <br><br>-- <br>Russell O'Connor<br></div></div></div> ______________________________<wbr>_________________<br>bitcoin-dev mailing list<br><a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.<wbr>linuxfoundation.org</a><br><a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" target="_blank">https://lists.linuxfoundation.<wbr>org/mailman/listinfo/bitcoin-<wbr>dev</a><br></div></blockquote></div><br></div></blockquote></div><br></div></div></div>