From 1b8848d5f35b7bb92486a7da6cbbdb31076b3c2f Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Tue, 6 Oct 2015 17:51:59 +0200 Subject: 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) --- src/script/standard.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/script') 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; -- cgit v1.2.3