Skip to content

Conversation

@gandrewstone
Copy link

OP_DATASIGVERIFY allows signed data to be imported into a script. This data can then have many uses, depending on the rest of the script, such as deciding spendability of several possible addresses. This opcode therefore enables the powerful blockchain concept of an "oracle" -- an entity that publishes authoritative statements about extra-blockchain events -- to be used in the Bitcoin Cash blockchain. For an example use of how this opcode can be used to enable binary contracts on any security or betting on any quantitatively decidable event (such as a sports match) please click here. But this is just one example; as the Bitcoin Cash Script language grows in expressiveness, it is anticipated that this opcode will be used in many other applications.

@dexX7
Copy link

dexX7 commented Feb 21, 2018

I really like this proposal, though I'm wondering about the following:

  1. All other CHECKSIG opcodes use public keys instead of addresses. What's the rationale behind using the hash160 instead of a pubkey?

  2. And why prepending data with "Bitcoin Signed Message:\n"?

  3. Also I'm wondering, whether it could make more sense to simply check the signature for the data provided, without hashing the data first. If anyone wants to sign a hash, he or she could just do so and provide a hash instead of the data. With (2) this would allow to spend coins based on the status of other transactions, even without direct link by reusing the signature of that transaction.

@shadders
Copy link
Owner

shadders commented Feb 21, 2018 via email

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants