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

issue sipa opened this issue on June 16, 2014
  1. sipa commented at 12:25 AM on June 16, 2014: member

    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.

  2. theuni commented at 1:41 AM on June 16, 2014: member

    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.

  3. jgarzik commented at 1:54 AM on June 16, 2014: contributor

    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.

  4. sipa commented at 10:17 AM on June 16, 2014: member

    @jgarzik SGTM

  5. laanwj added the label Brainstorming on Jul 31, 2014
  6. laanwj added the label TX scripts on Jul 31, 2014
  7. jtimon commented at 11:05 AM on August 30, 2014: contributor

    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.

  8. jtimon commented at 5:44 PM on December 30, 2014: contributor

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

  9. laanwj closed this on Feb 18, 2015

  10. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me