Re: [bitcoin-dev] Implementing Covenants with OP_CHECKSIGFROMSTACKVERIFY

2016-11-02 Thread Russell O'Connor via bitcoin-dev
Right. There are minor trade-offs to be made with regards to that design point of OP_CHECKSIGFROMSTACKVERIFY. Fortunately this covenant construction isn't sensitive to that choice and can be made to work with either implementation of OP_CHECKSIGFROMSTACKVERIFY. On Wed, Nov 2, 2016 at 11:35 PM, J

Re: [bitcoin-dev] Implementing Covenants with OP_CHECKSIGFROMSTACKVERIFY

2016-11-02 Thread Johnson Lau via bitcoin-dev
Interesting. I have implemented OP_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 https://github.com/jl2012/bitcoin/commits

[bitcoin-dev] Implementing Covenants with OP_CHECKSIGFROMSTACKVERIFY

2016-11-02 Thread Russell O'Connor via bitcoin-dev
Hi all, 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 w