Skip to content

Disable sigops for Liquid #46

@junderw

Description

@junderw

Low priority, since the mempool/backend already sets sigops to 0 when Liquid network is active...

But just in case someone uses mempool/electrs for other purposes we'd like to be correct.

As you can see here, Liquid counts sigops slightly differently for peg-in inputs' witnessScripts...

Liquid
https://github.com/ElementsProject/elements/blob/ae023ea98db010953bfc8aaf646b8e81ad30cdcd/src/consensus/tx_verify.cpp#L170-L188

Bitcoin
https://github.com/bitcoin/bitcoin/blob/f01416e23c9c820517c37003a2a98dd46d1022ba/src/consensus/tx_verify.cpp#L158-L164

Rather than code that difference in, it'd probably be simpler to just make sigops a non-Liquid only feature.

Choices (either or):

  1. Support Liquid and change the calculations based on liquid feature.
  2. Disable sigops when using liquid

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