What is op_eval?

7

2

I have been hearing a lot lately about "OP_EVAL", what is it?

Gavin has mentioned it here: http://sourceforge.net/mailarchive/forum.php?thread_name=201110130938.35014.luke%40dashjr.org&forum_name=bitcoin-development

AFAIK it's what the military does after an operation...

Alex Waters

Posted 2011-10-17T13:34:10.027

Reputation: 3 081

Update: Gavin has created an article for OP_EVAL on the Github Wiki for the Bitcoin Project which explains it in exhaustive detail.David Perry 2011-10-19T23:55:09.363

Answers

7

OP_EVAL is a new opcode (operation code) for the Bitcoin block chain scripting language, proposed in this thread.

What this opcode does is take a binary representation of a script from the data supplied for authorizing use of an output, and add the corresponding script to what is being evaluated.

The goal of this is to create Bitcoin addresses which, to use, require an arbitrary verification scheme, without people sending to that address needing to know what the script is.

The "killer app" for this is for people who don't want to lose all their bitcoins if their computer is compromised. They will use addresses where coins can only be spent if signatures from two different keys stored on separate devices are provided. Again, this is transparent to others sending to this person, they only need to know the address and not the details of his desired script.

Meni Rosenfeld

Posted 2011-10-17T13:34:10.027

Reputation: 18 542

So to clarify, that scene where Xenia and Ourumov turn a key at the same time to activate the Golden Eye - that is kind of like an OP_EVAL? It's just an additional layer of security?Alex Waters 2011-10-17T23:32:43.647

and, could more than two keys be required?Alex Waters 2011-10-17T23:33:19.917

1Yes, this is the kind of application that OP_EVAL enables. But to clarify, even without OP_EVAL, the manufacturer can be instructed to build the Golden Eye so that both Xenia and Ourumov need to turn a key to activate it. With OP_EVAL, the manufacturer can be kept in the dark about what the needed procedure will be - he is only given a hashed version of the procedure.Meni Rosenfeld 2011-10-18T06:04:22.840

1And yes, you could use it for a variety of scripts, such as the requiring 3 or more keys. The exact possibilities depend on the capabilities of the rest of the scripting language, but I think you could make it "2 out of 3 keys required", or make the coins spendable only after a given time, etc.Meni Rosenfeld 2011-10-18T06:04:35.930