From cdfdadd6c37a179da314c71692ad7ce20dd9a089 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 31 Dec 2023 13:57:15 +0100 Subject: [PATCH] docs: include s/2 value in docs (#5914) --- crates/primitives/src/transaction/signature.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/primitives/src/transaction/signature.rs b/crates/primitives/src/transaction/signature.rs index 6d051633b5..9df9a29535 100644 --- a/crates/primitives/src/transaction/signature.rs +++ b/crates/primitives/src/transaction/signature.rs @@ -7,6 +7,8 @@ use serde::{Deserialize, Serialize}; /// The order of the secp256k1 curve, divided by two. Signatures that should be checked according /// to EIP-2 should have an S value less than or equal to this. +/// +/// `57896044618658097711785492504343953926418782139537452191302581570759080747168` const SECP256K1N_HALF: U256 = U256::from_be_bytes([ 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x5D, 0x57, 0x6E, 0x73, 0x57, 0xA4, 0x50, 0x1D, 0xDF, 0xE9, 0x2F, 0x46, 0x68, 0x1B, 0x20, 0xA0,