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

Split up script into a core and utility part. #4344

Closed
sipa opened this issue Jun 16, 2014 · 5 comments
Closed

Split up script into a core and utility part. #4344

sipa opened this issue Jun 16, 2014 · 5 comments

Comments

@sipa
Copy link
Member

sipa commented Jun 16, 2014

Currently script.{h,cpp} defines both a core data structure (CScript, and its associated opcodes) with serializations, and several sets of utlity code related to it (signing, verification, identification).

I believe these should be separated, so with all the modularlization efforts, the core data structures can go in a common library that does not pull in keystore, for example (which pulls in key, crypto code, ...).

Related, the abstract CKeyStore class should probably move to the new place where signing ends up, while the implementations can stay in keystore. This breaks the cyclic dependency between keystore and script.

@theuni
Copy link
Member

theuni commented Jun 16, 2014

I spent some time on this last week. I managed to sever a few dependencies, but I was afraid that it would be hard to convince the others that this was worth doing. Good to see that it's on your radar as well.

I'll publish my work in a branch next week. Problem is, there will likely need to be a good bit of intermediary reorg with seemingly no benefit before the real splits can happen.

@jgarzik
Copy link
Contributor

jgarzik commented Jun 16, 2014

I tend to lump things into three buckets: CScript class, script eval, everything else.

Seems like it would not require lots of reorg to attain something like that as a first step.

@sipa
Copy link
Member Author

sipa commented Jun 16, 2014

@jgarzik SGTM

@jtimon
Copy link
Contributor

jtimon commented Aug 30, 2014

In case someone missed it, #4754 does basically what is said here and #4755 goes a little bit beyond that separating "everything else" into script/sign, script/standard, script/compressor and wallet/ismine.

@jtimon
Copy link
Contributor

jtimon commented Dec 30, 2014

@sipa I think this can be closed now, no?

@laanwj laanwj closed this as completed Feb 18, 2015
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants