Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Clarify that this version only uses OP_RETURN #10

Open
Sjors opened this issue Jan 28, 2019 · 0 comments
Open

Clarify that this version only uses OP_RETURN #10

Sjors opened this issue Jan 28, 2019 · 0 comments

Comments

@Sjors
Copy link

Sjors commented Jan 28, 2019

If I understand correctly the current version only implements the OP_RETURN commitment scheme and not yet the Pay-to-contract one?

That would also explain why the Contract constructor doesn't have a commitment_scheme field.

From contract.rs:

    fn get_expected_script(&self) -> Script {
        let burn_script_builder = Builder::new();

        let burn_script_builder = burn_script_builder.push_opcode(All::OP_RETURN);
        let burn_script_builder = burn_script_builder.push_slice(self.bitcoin_hash().as_bytes());

        burn_script_builder.into_script()
    }

Is burn_script_builder a typo? It's seems to be called from places that have nothing to do with burn.

I find it confusing that the function get_expected_script lives under Verify for Contract, even though it's also used when constructing proof in kaleidoscope tx_builder.ts.

In general it's good to explicitly state which parts of the spec are (not) implemented.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant