Skip to content

Alternative bytecode_pattern approach #56

@A60AB5450353F40E

Description

@A60AB5450353F40E

So I was thinking to split how to store redeem script, how about split it to 3 fields:

  • redeem script pattern, computed by replacing each sequence of pushes with number of pushes, encoded as script number push
  • sequence of push sizes: just the sequence of push sizes encoded as script number pushes
  • sequence of pushes: just the pushes

One can then use _eq operator on the most general pattern, which should be better performance than regex, it would then be further narrowed down by using regex on push sizes or pushes, but those would be executed only on positive matches for the general template.
Also, the redeem script can be accurately reconstructed from this.

Could even do some more parsing and have a function to filter for the exact value of Nth push or something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions