Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Bit-Wasp/malleability-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

High-S malleability fixer

Bitcoin transactions suffer from a property known as malleability, where certain parts of a transaction inputs script, which can never be committed by a signature (for example, the signatures themselves). Because of this, in certain cases the script can be changed, leaving the transaction still valid, but with a different identifier.

There are numerous avenues for malleability, but presently, an individiual is spamming the network using the low-s vector. This entails mutating a transactions signature by setting the S value to: -s mod n, an operation which leaves the signature perfectly valid for that transaction, but results in a different binary representation, and hence a different hash.

This script attempts listen for mutated transactions on the network, and leverge the malleability of signatures by changing them to it's low-s form. Approximately 95% of recent transactions have used the low-s form, and it has been proposed on several occasions to have nodes automatically fix high-s signatures, as it saves a few bits per signature.

It's use is not encouraged, I just wanted to write a proof of concept.

Setup

git clone https://github.com/Bit-Wasp/malleability-fixer.git
cd malleability-fixer  
composer install

And to run the application:

 bin/app

About

Peer to peer node that fixes transactions bearing low-s signature violations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages