Skip to content
This repository was archived by the owner on Oct 26, 2021. It is now read-only.

Conversation

@osoftware
Copy link

Encoding of the template the same way as checkbits in OP_CHECKMULTISIG.

@bitjson
Copy link
Owner

bitjson commented Dec 12, 2019

Thanks for getting the bitfield strategy specified! I expect we'll talk about this on the call tomorrow.


Once the `template` parameter is determined, it needs to be encoded to bytes, and then minimally pushed the same way as `checkbits` in `OP_CHECKMULTISIG`. While the encoding to bytes is straight forward, it is worth emphasizing that certain length-1 byte vectors must be pushed using special opcodes.

* For `template <= 8`, a length-1 byte array is to be pushed.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs rephrasing. It's about the number of bits, bitwise length or the position of the highest bit set.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants