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

Disable sigops for Liquid #46

Open
junderw opened this issue Sep 18, 2023 · 0 comments · May be fixed by #47
Open

Disable sigops for Liquid #46

junderw opened this issue Sep 18, 2023 · 0 comments · May be fixed by #47

Comments

@junderw
Copy link
Member

junderw commented Sep 18, 2023

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
@junderw junderw linked a pull request Sep 19, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant