Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OP_SHA256 #40

Closed
5 tasks done
jrick opened this issue Nov 27, 2017 · 4 comments
Closed
5 tasks done

OP_SHA256 #40

jrick opened this issue Nov 27, 2017 · 4 comments

Comments

@jrick
Copy link
Member

jrick commented Nov 27, 2017

Now that the new OP_SHA256 rules have been activated in Decred, all of the atomic swap tools should switch over to this more secure hash function. They are currently using OP_RIPEMD160 due to the sha256 opcode not having been available in the Decred scripting vm.

Before this can be completed, all of the txscript packages must be updated to recognize the OP_SHA256 version of the atomic swap contract:

@dasource @metalicjames heads up, I'll be creating some PRs for your projects for this change.

@DesWurstes
Copy link
Contributor

TODO: After the required pull requests are merged, it needs dep ensure -update

@devwarrior777
Copy link
Contributor

devwarrior777 commented Jan 9, 2018

Hi,
Is it just the one vendor change in txscript/standard.go please?
//gf:future->
// pops[1].opcode.value == OP_SHA256 &&
// pops[2].opcode.value == OP_DATA_32 &&
pops[1].opcode.value == OP_RIPEMD160 &&
pops[2].opcode.value == OP_DATA_20 &&
//<-gf
...

Thanks

@jrick
Copy link
Member Author

jrick commented Jan 9, 2018

The links in the issue description contain the diffs for the vendored changes. In addition to these changes, the atomicswap tools themselves must also be updated to create contract scripts using SHA256-hashed secrets.

@metalicjames
Copy link
Contributor

@jrick Apologies for the delay, I must've missed the notification for your pull request into vtcd. Merged now.

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

No branches or pull requests

4 participants