You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
After being published I've got reject message from all the peers:
Received reject from (83.227.31.14:18333): <WSMessageReject: 0x60000046bc40> {message='tx', code=40, reason='non-mandatory-script-verify-flag (Non-canonical signature: S value is unnecessarily high)'}
Googling the issue doesn't help much. Am I missing something? @keeshux
Thanks
The text was updated successfully, but these errors were encountered:
Farid, unfortunately I haven't been able to keep this library up-to-date through the years. Bitcoin changed quite a lot so I can't guarantee that the code is still complying. I can look into this but certainly not soon.
I understand you are not actively maintaining this library anymore, but could you please point me out where you do such computations in your codebase so I can try fixing this myself instead?
The relevant code for signatures is signatureForHash256 in Core/WSKey.m. It's been a while but, given that verbatim comment, the enforcement of "low S" in signature must have been taken from somewhere in Bitcoin Core:
Am creating and signing new transaction just fine like this:
Here is the signed tx info:
version = 1,
id = 880afa2349cc47ed3c510c433b744e2f8810327a82e7a3a83a71b4fb577742dc,
size = 227 bytes,
coinbase = NO,
lockTime = 0,
inputs =
{(
{address='mrnE6Yxhk2fgpv4XfGygFU1vRizse3eEju', outpoint=7ec02457c4a6079f852ba029552efbf0be527f5abc22355934b5d35917ede6a3:0, script='[304602210080aace26ee3cce97f219430d60c7638f66383384e3554525647d3adf4f8ceda9022100b47327cad11dda8a5db891535abcddf36dde7766338d1bf00190db9168dee1a101] [0342468eba0e276ae2d1242095690735846a216f0e6b037a9268779d854f622a00]', sequence=0xffffffff}
)},
outputs =
{(
{address='mu4CVtiGvVtE2wHosbHC58RE2hG4CnHnvj', value=5213, script='DUP HASH160 [94826312542abcdd7cf86494a55dc4ed1bd9aad0] EQUALVERIFY CHECKSIG'},
{address='moNtTSY3abxJQFyyKGDMZvBswifVg7dTJy', value=12345510, script='DUP HASH160 [563a7982692821c0d5f43b8c60410554703d8090] EQUALVERIFY CHECKSIG'}
)}
After being published I've got reject message from all the peers:
Received reject from (83.227.31.14:18333): <WSMessageReject: 0x60000046bc40> {message='tx', code=40, reason='non-mandatory-script-verify-flag (Non-canonical signature: S value is unnecessarily high)'}
Googling the issue doesn't help much. Am I missing something? @keeshux
Thanks
The text was updated successfully, but these errors were encountered: