sig – Earlybirds Invest https://earlybirdsinvest.com Latest Crypto News Thu, 03 Apr 2025 02:09:50 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.9 https://i0.wp.com/earlybirdsinvest.com/wp-content/uploads/2024/12/cropped-New-Project-2024-12-17T235703.455.png?fit=32%2C32&ssl=1 sig – Earlybirds Invest https://earlybirdsinvest.com 32 32 240146708 For failed check (multi) SIG operation errors, the script must be zeroed https://earlybirdsinvest.com/for-failed-check-multi-sig-operation-errors-the-script-must-be-zeroed/ https://earlybirdsinvest.com/for-failed-check-multi-sig-operation-errors-the-script-must-be-zeroed/#respond Thu, 03 Apr 2025 02:09:49 +0000 https://earlybirdsinvest.com/for-failed-check-multi-sig-operation-errors-the-script-must-be-zeroed/

For P2SH transactions, an example redemption script:

 CScript((my_private_key.pub,OP_CHECKSIG,OP_IF,OP_1,OP_ELSE,OP_1,OP_ENDIF))

Works if the expression is true. Executes the IF statement. That is, the first signature matches. However, if the initial signature does not match the public key, instead of performing another statement, the site will return:

SendRawTransaction RPC Error-26: Non-monitoring-Script-Verify-Flag (must be zero if signature fails (multi-)SIG operation)

but, VerifyScript(txin.scriptSig, (txin_scriptPubKey), tx, 0, (SCRIPT_VERIFY_P2SH,)) Does not throw errors. This is also how you generate a signature.

def create_OP_CHECKSIG_signature(tx, txin_scriptPubKey, seckey):
    
    sighash = SignatureHash(txin_scriptPubKey, tx, 0, SIGHASH_ALL)
    signature = seckey.sign(sighash) + bytes((SIGHASH_ALL))
    return signature
#usage
sig = create_OP_CHECKSIG_signature(tx, redeemscript, my_private_key)

Any help is appreciated.

]]>
https://earlybirdsinvest.com/for-failed-check-multi-sig-operation-errors-the-script-must-be-zeroed/feed/ 0 28694
Required script-verify-flag-failed (signature must be zero check (multi) sig operation) https://earlybirdsinvest.com/required-script-verify-flag-failed-signature-must-be-zero-check-multi-sig-operation/ https://earlybirdsinvest.com/required-script-verify-flag-failed-signature-must-be-zero-check-multi-sig-operation/#respond Sun, 30 Mar 2025 16:02:37 +0000 https://earlybirdsinvest.com/required-script-verify-flag-failed-signature-must-be-zero-check-multi-sig-operation/

I would like to send a raw transaction, but I have a problem. I’m using a RegTest node. P2PKH address was generated in seed breeding
mjnJj4TFyU4jYrTVUHMA632UmuUMssZHq4

Next, as usual, generateToAddress 101 block

I’ve never touched

(
    {
        "txid": "6481bbba699177c735c3e336735674641459bbbe2aba85a1b8be233df8f36938",
        "vout": 0,
        "address": "mjnJj4TFyU4jYrTVUHMA632UmuUMssZHq4",
        "label": "",
        "scriptPubKey": "76a9142ec7cc30ef662cf7c757e3460995f2682871207688ac",
        "amount": 50,
        "confirmations": 101,
        "spendable": true,
        "solvable": false,
        "parent_descs": (
            "addr(mjnJj4TFyU4jYrTVUHMA632UmuUMssZHq4)#rwelz9me"
        ),
        "safe": true
    }
)

And then I make a transaction. Just send a little Saturday to another empty address

My Step: 1. Create an empty transaction with one input and two outputs (one for change)

CREATE TRANSACTION START
== Amount to send (sats): 100000000
== Fee (sats): 1000000
== Get UTXO id for pay: 6481bbba699177c735c3e336735674641459bbbe2aba85a1b8be233df8f36938
== Reversed UTXO id: 3869f3f83d23beb8a185ba2abebb59146474567336e3c335c7779169babb8164
== Full generated tx: {"version":1,"inputs":({"txid":"3869f3f83d23beb8a185ba2abebb59146474567336e3c335c7779169babb8164","vout":0,"scriptSig":"76a9142ec7cc30ef662cf7c757e3460995f2682871207688ac","sequence":4294967295}),"outputs":({"value":100000000,"scriptPubKey":"76a914796e2d78cff63c21f8ee823052b5362bc2cc2af388ac"},{"value":4899000000,"scriptPubKey":"76a914929b53a5d57f12e924b9c6d58524faec5c5cfee788ac"}),"locktime":0}
CREATE TRANSACTION END
  1. Next, serialize it
SERIALIZATION START
== Version (4 bytes LE):  01000000
== Input Count (1 bytes Compact Size): 01
==== TXID (32 bytes Natural Byte Order): 3869f3f83d23beb8a185ba2abebb59146474567336e3c335c7779169babb8164
==== VOut (4 bytes LE):  00000000
==== ScriptSig Size (1 bytes Compact Size): 19
==== ScriptSig (25 bytes): 76a9142ec7cc30ef662cf7c757e3460995f2682871207688ac
==== Sequence (4 bytes LE):  ffffffff
== Output Count: (1 bytes Compact Size): 02
==== Amount (8 bytes LE): 00e1f50500000000
==== ScriptPubKey Size (1 bytes Compact Size): 19
==== ScriptPubKey (25 bytes): 76a914796e2d78cff63c21f8ee823052b5362bc2cc2af388ac
==== Amount (8 bytes LE): c0ce002401000000
==== ScriptPubKey Size (1 bytes Compact Size): 19
==== ScriptPubKey (25 bytes): 76a914929b53a5d57f12e924b9c6d58524faec5c5cfee788ac
==== Locktime (4 bytes LE): 00000000
== SIGHASH_ALL (4 bytes LE):  01000000
== Final Buffer: 01000000013869f3f83d23beb8a185ba2abebb59146474567336e3c335c7779169babb8164000000001976a9142ec7cc30ef662cf7c757e3460995f2682871207688acffffffff0200e1f505000000001976a914796e2d78cff63c21f8ee823052b5362bc2cc2af388acc0ce0024010000001976a914929b53a5d57f12e924b9c6d58524faec5c5cfee788ac0000000001000000
SERIALIZATION END
  1. Please sign
 SIGNING START
== WIF: cRcGtESEBF1ztuwtftM7Ds9Mcu1x6PtCK1TiXKTvShZF43ZtVYVY
== Private Key: 7828a7d17099c3d5baeaa4a8de47d97038e9cefd62d5d04e4736e47fe0a81779
== Public Key: 03a1dbe0aea6bf483bc00ed3d101f54e0b1e06e9c2e5103de5950b135ff055f107
== Double sha256 of serialized tx: 08b7c9af7310ff1dbeea59575dd851565b52046a03631351b5aec94100655b91
== Der signature with sighash: 304502210085016fb2b7cc850ca2560da9e5873c922643388af63ae5a496899acd6e94537c022077df3eba94465a22f764338a9200865a591c7998206c9fbcf22080d9152f45af01
== All size (1 bytes Compact Size): 6b
== Sig len (1 bytes Compact Size): 48
== Pub Key (1 bytes Compact Size): 21
== ScriptSig Size (1 bytes Compact Size): 6c
== ScriptSig (108 bytes): 6b48304502210085016fb2b7cc850ca2560da9e5873c922643388af63ae5a496899acd6e94537c022077df3eba94465a22f764338a9200865a591c7998206c9fbcf22080d9152f45af012103a1dbe0aea6bf483bc00ed3d101f54e0b1e06e9c2e5103de5950b135ff055f107
SIGNING END

what happened ? der signature? Does it have it in my data and Argo? please help me. I wrote the code to send raw transactions, investigation procedures, but I think I made a mistake somewhere

  1. Final Hex and Command
bitcoin-cli -regtest \
       -rpcuser=bitcoin \
       -rpcpassword=ggbUUhXBbgUVDd2vdaMRb-KVYusRXbV-fVgjdMMdOWA \
       -rpcwallet="app_wallet" \
        sendrawtransaction 01000000013869f3f83d23beb8a185ba2abebb59146474567336e3c335c7779169babb8164000000006b48304502210085016fb2b7cc850ca2560da9e5873c922643388af63ae5a496899acd6e94537c022077df3eba94465a22f764338a9200865a591c7998206c9fbcf22080d9152f45af012103a1dbe0aea6bf483bc00ed3d101f54e0b1e06e9c2e5103de5950b135ff055f107ffffffff0200e1f505000000001976a914796e2d78cff63c21f8ee823052b5362bc2cc2af388acc0ce0024010000001976a914929b53a5d57f12e924b9c6d58524faec5c5cfee788ac00000000 0.10 200000
   

]]>
https://earlybirdsinvest.com/required-script-verify-flag-failed-signature-must-be-zero-check-multi-sig-operation/feed/ 0 28068