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

Prevent high S signatures (and possibly other malleability causes) by consensus #1301

Open
jgriffiths opened this issue Dec 19, 2023 · 0 comments

Comments

@jgriffiths
Copy link
Contributor

jgriffiths commented Dec 19, 2023

Is your feature request related to a problem? Please describe.

Pre-segwit inputs cause problems for services building on both Bitcoin and Liquid, due to potential tx malleability (discussed extensively elsewhere). This increases the complexity of coding software which mediates or processes txs for users.

In Bitcoin the relationship to block miners is adversarial - if it is in their interest to do so, they can malleate a tx (or accept a malleated tx via non-standard means) and mine a valid block with it. In Elements/Liquid however the block producers are financially invested in the integrity of the chain and are are expected to not be malicious. A block producer including a malleated tx which facilitates a double spend or theft could erode the trust in the chain and its functionaries. Note that this could happen if a block producer is hacked for example, and not just out of malice/greed.

Liquid/Elements are potentially more sensitive to this issue given the push to build more complex contract structures, where dependent txs can be invalidated by malleation.

Describe the solution you'd like

High-S signatures are already non-standard and cannot be relayed. I propose for Elements we make such signatures invalid by consensus also. By doing so we prevent any possible bad behaviour by block producers, and at the same time reduce the barrier of entry/complexity of creating services using the chain.

Describe alternatives you've considered

The alternative is to do nothing and continue with the status quo. As above this makes building on Elements chains more difficult which could hamper future growth.

Additional context

Note that anyone holding back an old, validly-signed high-S tx must already transmit it OOB to a block producer in order to have it included in the chain. They, or the block producer can always maleiate the sig back to low-S in order to include it after this change is made.

A consensus failure can only occur while this change is deployed to the block producers, and only if one of them decides to fork the chain deliberately. As above the block producers are not incentivized to destroy the chain they work on, nonetheless this risk should be mitigated where required by whatever means are available (For example, updates to any legal contract).

It is possible that other standardness checks could also become consensus checks for Elements however they are not detailed here.

@jgriffiths jgriffiths changed the title Prevent high S signatures (and possibly other malliability causes) by concensus Prevent high S signatures (and possibly other malliability causes) by consensus Dec 19, 2023
@jgriffiths jgriffiths changed the title Prevent high S signatures (and possibly other malliability causes) by consensus Prevent high S signatures (and possibly other malleability causes) by consensus Jan 18, 2024
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

No branches or pull requests

1 participant