diff options
| author | Patrick Lodder <[email protected]> | 2015-10-06 17:51:59 +0200 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2015-10-06 17:51:59 +0200 |
| commit | 1b8848d5f35b7bb92486a7da6cbbdb31076b3c2f (patch) | |
| tree | d2f9e90eb8406f77408b9267dbb7d3744e4454fb /src/script | |
| parent | Merge pull request #1270 from rnicoll/1.10-fixmes (diff) | |
| download | discoin-1b8848d5f35b7bb92486a7da6cbbdb31076b3c2f.tar.xz discoin-1b8848d5f35b7bb92486a7da6cbbdb31076b3c2f.zip | |
Make low-s verification mandatory for standard script verification
This change makes a node only accept transactions with low-s
signature encoding for relay and mining, but allows transactions
with high-s signature encoding in mined blocks (no blocks will
be rejected)
Pros:
- If deployed by all miners, this will eliminate this particular
malleability attack.
- There is no impact on consensus
Cons:
- Wallets that do not implement low-s signature encoding will
see their transactions be rejected by growing numbers of peers
and ultimately not be able to get any transaction mined.
Follow ups:
- Eventually, this verification needs to be confirmed through a
consensus rule (enforcement of BIP62)
Diffstat (limited to 'src/script')
| -rw-r--r-- | src/script/standard.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/standard.h b/src/script/standard.h index a8b0acc98..e4203f377 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -50,7 +50,8 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY SCRIPT_VERIFY_MINIMALDATA | SCRIPT_VERIFY_NULLDUMMY | SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS | - SCRIPT_VERIFY_CLEANSTACK; + SCRIPT_VERIFY_CLEANSTACK | + SCRIPT_VERIFY_LOW_S; /** For convenience, standard but not mandatory verify flags. */ static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS; |