Bitcoin Forum
May 12, 2024, 08:34:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Error transaction help me  (Read 386 times)
honadu (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
November 30, 2017, 08:30:00 AM
 #1


i transaction for error :

Validation Error: BitcoindException(super=com.neemre.btcdcli4j.core.BitcoindException: Error #-26: 16: mandatory-script-verify-flag-failed (Non-canonical DER signature), code=-26)




{
    "hash": "9cce9d3b62917647050df970270700b56d69530ad23028dcc782e61f81d77ad8",
    "ver": 1,
    "vin_sz": 2,
    "vout_sz": 1,
    "size": 405,
    "in": [{"prev_out": {"hash": "50748b7a193a0b23f1e9494b511312f954cc6cf4792bacc69d207d16002080d","n": "0"},
   "scriptSig":"30460221009e38f007ccc1d411e9dba6e03a932ee5076e2f7f4fa6c38b9fa6ad972655460221009 9f89638981d465629e65c02bc5fa38fb9ca49e2d3fd9f83326ce8678195ac1601 04a6fc4cf229381673741d3b5673a2968007fdd16c52f7e2cba082e9ee5c429dcbf6535ef6d26f2 7d828c36d454e2afe880c0642b429c1a6136a2b29e5ccbcd",
            "sequence": 4294967295 },
   {"prev_out": {"hash": "3fad794a884fdbe30fec74b224efda235eb05f7944050183826073ee05f41","n": "0"},
 "scriptSig":"3045022100d2f9171fdce54734818bc6314389b2d7cce4c15cc6fa556b3886860e493b1a02204ae 329de78e09aad4dc52a0bec8c339c8c8e5f28cca6c47928acd26f95c2364d01 04a6fc4cf229381673741d3b5673a2968007fdd16c52f7e2cba0d22e9ee5c429dcbf6535ef6d26f 27d828c36d454e2afe880c0642b429c1a6136a2b29e5ccbcd",
            "sequence": 4294967295 }],
    "out": [{"value": "50.03560000",
            "scriptPubKey": "OP_DUP OP_HASH160 5f8f7b1e05c54508c471f1bb9a282f53bc1d21 OP_EQUALVERIFY OP_CHECKSIG"
        }
    ]
}
 
1715546099
Hero Member
*
Offline Offline

Posts: 1715546099

View Profile Personal Message (Offline)

Ignore
1715546099
Reply with quote  #2

1715546099
Report to moderator
1715546099
Hero Member
*
Offline Offline

Posts: 1715546099

View Profile Personal Message (Offline)

Ignore
1715546099
Reply with quote  #2

1715546099
Report to moderator
1715546099
Hero Member
*
Offline Offline

Posts: 1715546099

View Profile Personal Message (Offline)

Ignore
1715546099
Reply with quote  #2

1715546099
Report to moderator
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715546099
Hero Member
*
Offline Offline

Posts: 1715546099

View Profile Personal Message (Offline)

Ignore
1715546099
Reply with quote  #2

1715546099
Report to moderator
1715546099
Hero Member
*
Offline Offline

Posts: 1715546099

View Profile Personal Message (Offline)

Ignore
1715546099
Reply with quote  #2

1715546099
Report to moderator
1715546099
Hero Member
*
Offline Offline

Posts: 1715546099

View Profile Personal Message (Offline)

Ignore
1715546099
Reply with quote  #2

1715546099
Report to moderator
honadu (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
November 30, 2017, 08:50:46 AM
 #2


If anyone can help me get 0,5 btc
klaaas
Hero Member
*****
Offline Offline

Activity: 1568
Merit: 544



View Profile
November 30, 2017, 10:03:04 AM
 #3

Read this post error 16: mandatory-script-verify-flag-failed

I hope it helps.

Shopping online and sats back as a discount! (satsback) + LightningNetwork
amaclin1
Sr. Member
****
Offline Offline

Activity: 770
Merit: 305


View Profile
November 30, 2017, 10:41:00 AM
 #4

Can you post your transaction in raw hex form? Not json

Bitcoin SV GUI client for Windows and Linux
https://github.com/AlisterMaclin/bitcoin-sv/releases
pebwindkraft
Sr. Member
****
Offline Offline

Activity: 257
Merit: 343


View Profile
November 30, 2017, 11:15:51 PM
Merited by ABCbits (3)
 #5

I took a quick look at the second sig, and the length field of the signature for R-value:

Code:
    30: OP_SEQUENCE_0x30:    type tag indicating SEQUENCE, begin sigscript
    45: OP_LENGTH_0x45:      length of R + S
    02: OP_INT_0x02:         type tag INTEGER indicating length
    21: OP_LENGTH_0x21:      this is SIG R (33 Bytes)
        00D2F9171FDCE547:34818BC6314389B2
        D7CCE4C15CC6FA55:6B3886860E493B1A
        02
    21: unknown opcode

I can see a double zero is there, so the length of the R-Value should be 21hex, 33 bytes decimal. In you case it would end with "02".
However: the 02 should be the  type tag indicating length for S-Value, and 21 the length for your S-Value (which it is...).
I just added a "DD" into the end of the R-Value, then it decodes correctly:

Code:
    30: OP_SEQUENCE_0x30:    type tag indicating SEQUENCE, begin sigscript
    45: OP_LENGTH_0x45:      length of R + S
    02: OP_INT_0x02:         type tag INTEGER indicating length
    21: OP_LENGTH_0x21:      this is SIG R (33 Bytes)
        009E38F007CCC1D4:11E9DBA6E03A932E
        E5076E2F7F4FA6C3:8B9FA6AD97265546
        DD
    02: OP_INT_0x02:         type tag INTEGER indicating length
    21: OP_LENGTH_0x21:      this is SIG S (33 Bytes)
        0099F89638981D46:5629E65C02BC5FA3
        8FB9CA49E2D3FD9F:83326CE8678195AC
        16
    01: OP_SIGHASHALL:       this terminates the ECDSA signature (ASN1-DER structure)

So I guess the library you are using is not assembling the signatures correctly. What are you using?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!