scriptverifyflagfailed – Earlybirds Invest https://earlybirdsinvest.com Latest Crypto News Tue, 15 Apr 2025 15:21:27 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.8 https://i0.wp.com/earlybirdsinvest.com/wp-content/uploads/2024/12/cropped-New-Project-2024-12-17T235703.455.png?fit=32%2C32&ssl=1 scriptverifyflagfailed – Earlybirds Invest https://earlybirdsinvest.com 32 32 240146708 Error creating RPC request: Required script-verify-flag-failed (invalid schnorr signature) https://earlybirdsinvest.com/error-creating-rpc-request-required-script-verify-flag-failed-invalid-schnorr-signature/ https://earlybirdsinvest.com/error-creating-rpc-request-required-script-verify-flag-failed-invalid-schnorr-signature/#respond Tue, 15 Apr 2025 15:21:26 +0000 https://earlybirdsinvest.com/error-creating-rpc-request-required-script-verify-flag-failed-invalid-schnorr-signature/

I have 3 Taproot addresses: one is 50 btc, one is RECEPIENT, and the other is for change

sender bcrt1p7d90fjh4k2uu7jjzw6hev8nnak2cultvcyjaj5zum696eqpwfausw79xuk
wif cULydXkHkv3h1jH7yVaGcNCvWHzbVsDiAxW76Mc8QrSqzNPU2sUG
recipient bcrt1p725t652m53g7j87n2ypm3x9pdl9f88c4c2hjyvymq78qhrc6tpsq5wp62r
change bcrt1pj5fle7sshyr04yershteu745zs2peguum7z575rydshtscmdjysq4eus02

I’m trying to send one BTC and create a raw transaction for the spend type of keypath

This is at the sender’s hands:

(
    {
        "txid": "6ee6185784989263847ebd3d2aadb83bdbe80ed0011821085975226ae994e259",
        "vout": 0,
        "address": "bcrt1p7d90fjh4k2uu7jjzw6hev8nnak2cultvcyjaj5zum696eqpwfausw79xuk",
        "label": "",
        "scriptPubKey": "5120f34af4caf5b2b9cf4a4276af961e73ed958e7d6cc125d9505cde8bac802e4f79",
        "amount": 50,
        "confirmations": 101,
        "spendable": true,
        "solvable": true,
        "desc": "rawtr(f34af4caf5b2b9cf4a4276af961e73ed958e7d6cc125d9505cde8bac802e4f79)#qrffuhzp",
        "parent_descs": (
            "addr(bcrt1p7d90fjh4k2uu7jjzw6hev8nnak2cultvcyjaj5zum696eqpwfausw79xuk)#cx2kp4mn"
        ),
        "safe": true
    }
)
  1. Create a transaction object
     (CREATE TRANSACTION START)
    -- Amount to send (sats): 100000000
    -- Fee (sats): 1000000
    -- Get UTXO id for pay: 6ee6185784989263847ebd3d2aadb83bdbe80ed0011821085975226ae994e259
    -- Reversed UTXO id: 59e294e96a22755908211801d00ee8db3bb8ad2a3dbd7e84639298845718e66e
    -- Full generated tx: {
        "version":2,
        "inputs":
            ({
                "txid":"59e294e96a22755908211801d00ee8db3bb8ad2a3dbd7e84639298845718e66e",
                "vout":0,
                "scriptSig":"",
                "sequence":4294967295
            }),
        "outputs":({
                "value":100000000,
                "scriptPubKey":"51209545ea8add228f48fe9a881dc4c50b7e549cf8ae15791184d83c705c78d2c300"
            },{
                "value":4899000000,
                "scriptPubKey":"5120a89fe7d085c837d4991c2ebcf3d5a0a0a0e51ce6fc2a7a83236175c31b6c8900"
            }),
        "locktime":0}
    (CREATE TRANSACTION END)
  1. Sign and Serialization
(SIGN AND SERIALIZE TRANSACTION START)
(INPUT 0)
-- txid (32 bytes): 59e294e96a22755908211801d00ee8db3bb8ad2a3dbd7e84639298845718e66e
-- Vout (4 bytes LE32): 00000000
-- ScriptSigLength (1 bytes Compact size): 00
-- ScriptSig (0 bytes):
-- Sequence (4 bytes LE32): ffffffff
-- (SIGHASH FOR 0 INPUT START)
---- Version (4 bytes LE32): 02000000
---- LockTime (4 bytes LE32): 00000000
---- InputIdx (4 bytes LE32): 00000000
---- SighashTypeBuf (1 bytes): 00
---- (HASH PREVOUTS (txid + LE32(vout)) START)
------ Prevout for 0 input (36 bytes): 59e294e96a22755908211801d00ee8db3bb8ad2a3dbd7e84639298845718e66e00000000
---- (HASH PREVOUTS END)
---- Finally hashPrevouts (32 bytes): 35bb28a690e32f668589a79a1b4f7ba82c00c08fe39b29672e861e90526991a9
---- (HASH AMOUNTS (LE64(amount))) START)
------ Amount for 0 input (8 bytes LE64): 3200000000000000
---- (HASH AMOUNTS END)
---- Finally hashAmounts (32 bytes): 0cbbab9d99fb661a1686f17ccaaf8a9d069aa8cb755925045a1d049c060b9e67
---- (HASH SCRIPT PUB KEYS (OP_1 + PUSH_32 + pubKeyHash) START)
------ ScriptPubKey for 0 input (34 bytes): 51209a57a657ad95ce7a5213b57cb0f39f6cac73eb66092eca82e6f45d6401727bc8
---- (HASH SCRIPT PUB KEYS END)
---- Finally hashScriptPubKeys (32 bytes): 96d403e277844293f22ba2b1914d646d8353adbe2c49a22a7f421a8c97221eaa
---- (HASH SEQUENCES (LE32(sequence)) START)
------ Sequence for 0 input (4 bytes LE32): ffffffff
---- (HASH SEQUENCES END)
---- Finally hashSequences (32 bytes): ad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0e
---- (HASH OUTPUTS (LE64(amount), CompactSize(size), scriptPubKey) START)
------ Amount of 0 out (8 bytes LE64): 00e1f50500000000
------ ScriptPubKey of 0 out (34 bytes): 51209545ea8add228f48fe9a881dc4c50b7e549cf8ae15791184d83c705c78d2c300
------ Size of 0 out (1 bytes CompactSize): 22
------ Output of 0 out (43 bytes): 00e1f505000000002251209545ea8add228f48fe9a881dc4c50b7e549cf8ae15791184d83c705c78d2c300
------ Amount of 1 out (8 bytes LE64): c0ce002401000000
------ ScriptPubKey of 1 out (34 bytes): 5120a89fe7d085c837d4991c2ebcf3d5a0a0a0e51ce6fc2a7a83236175c31b6c8900
------ Size of 1 out (1 bytes CompactSize): 22
------ Output of 1 out (43 bytes): c0ce002401000000225120a89fe7d085c837d4991c2ebcf3d5a0a0a0e51ce6fc2a7a83236175c31b6c8900
---- (HASH OUTPUTS END)
---- Finally hashOutputs (32 bytes): c74c74b357372c390436f57e6046707b88dc74a7199e9194922818188192de44
---- Preimage (174 bytes): 02000000000000000035bb28a690e32f668589a79a1b4f7ba82c00c08fe39b29672e861e90526991a90cbbab9d99fb661a1686f17ccaaf8a9d069aa8cb755925045a1d049c060b9e6796d403e277844293f22ba2b1914d646d8353adbe2c49a22a7f421a8c97221eaaad95131bc0b799c0b1af477fb14fcf26a6a9f76079e48bf090acb7e8367bfd0ec74c74b357372c390436f57e6046707b88dc74a7199e9194922818188192de440000000000
---- TaggedHash (32 bytes): 7f73f0e9137223806b5c6c4f157f30ed439949decb84b4ab1eff249fa61692c1
-- (SIGHASH FOR 0 INPUT END)
-- Sighash (32 bytes): 7f73f0e9137223806b5c6c4f157f30ed439949decb84b4ab1eff249fa61692c1
-- SignatureObject (64 bytes): 4227542a9daebfbf518e12b016f09f5f7feaae42bdf5874039dfd1ff7ec66b63b625e27be13a04b3d58c81891aca8908cd5ca548cfc3f080fd2d0bcfc0045138
-- Pubkey (32 bytes): f34af4caf5b2b9cf4a4276af961e73ed958e7d6cc125d9505cde8bac802e4f79
-- VALID? true
-- Witness count for 0 input (1 bytes Compact Size): 01
-- Signature len for 0 input (1 bytes Compact Size): 40
-- Signature for 0 input (64 bytes): 4227542a9daebfbf518e12b016f09f5f7feaae42bdf5874039dfd1ff7ec66b63b625e27be13a04b3d58c81891aca8908cd5ca548cfc3f080fd2d0bcfc0045138
(OUTPUT 0)
-- Value (8 bytes LE64): 00e1f50500000000
-- ScriptPubKey (34 bytes): 51209545ea8add228f48fe9a881dc4c50b7e549cf8ae15791184d83c705c78d2c300
-- ScriptPubKeySize (1 bytes Compact size): 22
(OUTPUT 1)
-- Value (8 bytes LE64): c0ce002401000000
-- ScriptPubKey (34 bytes): 5120a89fe7d085c837d4991c2ebcf3d5a0a0a0e51ce6fc2a7a83236175c31b6c8900
-- ScriptPubKeySize (1 bytes Compact size): 22
Locktime (4 bytes LE32): 00000000
Marker (1 bytes): 00
Flag (1 bytes): 01
Version (4 bytes LE32): 02000000
InputsLen (1 bytes Compact Size): 01
OutputsLen (1 bytes Compact Size): 02
Finally rawTx (205 bytes): 0200000000010159e294e96a22755908211801d00ee8db3bb8ad2a3dbd7e84639298845718e66e0000000000ffffffff0200e1f505000000002251209545ea8add228f48fe9a881dc4c50b7e549cf8ae15791184d83c705c78d2c300c0ce002401000000225120a89fe7d085c837d4991c2ebcf3d5a0a0a0e51ce6fc2a7a83236175c31b6c89000140eddd2049ece47dd2fea1fb2e5f9d0c475e32431a472c64d543160097359f266f13c3a409de8366d09b105741ecaee1cfac6542ed1e084cee58310d82da28775000000000
(SIGN AND SERIALIZE TRANSACTION END)

And in the end I got

Error creating RPC request: Required script-verify-flag-failed (invalid schnorr signature)

However, the transaction structure is valid, it is both a signature and a witness.

{
  "version": "02000000",
  "marker": "00",
  "flag": "01",
  "inputcount": "01",
  "inputs": (
    {
      "txid": "59e294e96a22755908211801d00ee8db3bb8ad2a3dbd7e84639298845718e66e",
      "vout": "00000000",
      "scriptsigsize": "00",
      "scriptsig": "",
      "sequence": "ffffffff"
    }
  ),
  "outputcount": "02",
  "outputs": (
    {
      "amount": "00e1f50500000000",
      "scriptpubkeysize": "22",
      "scriptpubkey": "51209545ea8add228f48fe9a881dc4c50b7e549cf8ae15791184d83c705c78d2c300"
    },
    {
      "amount": "c0ce002401000000",
      "scriptpubkeysize": "22",
      "scriptpubkey": "5120a89fe7d085c837d4991c2ebcf3d5a0a0a0e51ce6fc2a7a83236175c31b6c8900"
    }
  ),
  "witness": (
    {
      "stackitems": "01",
      "0": {
        "size": "40",
        "item": "4227542a9daebfbf518e12b016f09f5f7feaae42bdf5874039dfd1ff7ec66b63b625e27be13a04b3d58c81891aca8908cd5ca548cfc3f080fd2d0bcfc0045138"
      }
    }
  ),
  "locktime": "00000000"
}

Please help. Could there be something wrong with your bytes, data, or order? thank you very much!

]]>
https://earlybirdsinvest.com/error-creating-rpc-request-required-script-verify-flag-failed-invalid-schnorr-signature/feed/ 0 30941
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
Mandatory script-verify-flag-failed (invalid schnorr signature) error when creating child inscriptions in Taproot transactions https://earlybirdsinvest.com/mandatory-script-verify-flag-failed-invalid-schnorr-signature-error-when-creating-child-inscriptions-in-taproot-transactions/ https://earlybirdsinvest.com/mandatory-script-verify-flag-failed-invalid-schnorr-signature-error-when-creating-child-inscriptions-in-taproot-transactions/#respond Sun, 09 Feb 2025 10:45:01 +0000 https://earlybirdsinvest.com/mandatory-script-verify-flag-failed-invalid-schnorr-signature-error-when-creating-child-inscriptions-in-taproot-transactions/

I’m trying to create a child inscription in a Taproot transaction, but I’m running into the following error:

sendrawtransaction RPC error: {"code":-26,"message":"mandatory-script-verify-flag-failed (Invalid Schnorr signature)"}

I checked all the data, including transaction structure, signatures, TapRoot scripts, and more, but the error persists.

The input refers to the parent UTXO.

{
  "txid": "02cde20c6db772c9ddced410c52cb2bdcbf476016fa398cfa1ac5207f1ff462f",
  "vout": 0,
  "value": 546,
  "scriptPk": "5120932a0391d2ec13cb8f303ded9297ece089f739b3ced40bc98eebdd277fdb9c9d",
  "address": "tb1pjv4q8ywjasfuhres8hke99lvuzylwwdnem2qhjvwa0wjwl7mnjwsdqu3e0"
}

The output sends 546 Satoshis to the recipient address. The Taproot script for the child’s inscription includes:

Parent inscription data (InscriptionID). Child inscription metadata.

const childOrdinalStacks = (
  publicKey,
  bitcoin.opcodes.OP_CHECKSIG,
  bitcoin.opcodes.OP_FALSE,
  bitcoin.opcodes.OP_IF,
  Buffer.from("ord", "utf8"),
  1, 1,
  Buffer.from("text/plain;charset=utf-8", "utf8"),
  1, 2,
  pointerBuffer1,
  1, 3,
  Buffer.from(parentInscriptionId, "hex"),
  1, 5,
  cbor.encode(childMetadata),
  1, 7,
  Buffer.from("parcel.bitmap", "utf8"),
  bitcoin.opcodes.OP_0,
);

RAW TX Hash

020000000001022f46fff10752aca1cf98a36f0176f4cbbdb22cc510d4ceddc972b76d0ce2cd020000000000ffffffffc14499f6058bc6c6d5eed11c699c80007199690c12bee4a54fd46d5a9f5193e00100000000ffffffff022202000000000000225120932a0391d2ec13cb8f303ded9297ece089f739b3ced40bc98eebdd277fdb9c9d2202000000000000225120932a0391d2ec13cb8f303ded9297ece089f739b3ced40bc98eebdd277fdb9c9d01406fcbc5b6b63cb67c2289a5b4df1f3e1971b26ad4310b644da9a5a8488247f6ae44b50d7be59eecd8c58a268ce74eeb490b31bfda28cfeee6c101a914b54d613e03400058e04b9c6438f33f9a3541fe8d2a5c229794a00eb6c005aaedeb1b4622ca9c0c902d714b550e0b352578c761ac3853a5766078d7cded283f15070ef53b6c1ee8206705021108c86f6f7249e85d233414afa8eeaadaea2bad863b2ccce504126879ac0063036f7264010118746578742f706c61696e3b636861727365743d7574662d3801020222020103202f46fff10752aca1cf98a36f0176f4cbbdb22cc510d4ceddc972b76d0ce2cd02010528a264747970656b54657374204e46542023316b6465736372697074696f6e6954657374205465737401070d70617263656c2e6269746d6170003f68747470733a2f2f617277656176652e6e65742f4933326c517668673341514c583444632d334e48557773434e366e75382d6c78477352634e7765336372346821c06705021108c86f6f7249e85d233414afa8eeaadaea2bad863b2ccce50412687900000000

I’m using Tweaksigner to sign the input.

const signer = tweakSigner(wallet);
psbt.signInput(0, signer);
psbt.signInput(1, wallet.keyPair);


export function tweakSigner(wallet: Wallet, opts: any = {}) {
  let privateKey: any = wallet.keyPair.privateKey;
  if (!privateKey) {
    throw new Error('Private key is required for tweaking signer!');
  }
  if (wallet.keyPair.publicKey(0) === 3) {
    privateKey = ecc.privateNegate(privateKey);
  }
  const tweakedPrivateKey = ecc.privateAdd(privateKey, tapTweakHash(wallet.internalPubkey, opts.tweakHash));
  if (!tweakedPrivateKey) {
    throw new Error('Invalid tweaked private key!');
  }
  return ECPair.fromPrivateKey(Buffer.from(tweakedPrivateKey), {
    network: wallet.network,
  });
}


function tapTweakHash(pubKey: Buffer, h: Buffer | undefined): Buffer {
  return bitcoin.crypto.taggedHash(
    "TapTweak",
    Buffer.concat(h ? (pubKey, h) : (pubKey))
  );
}

]]>
https://earlybirdsinvest.com/mandatory-script-verify-flag-failed-invalid-schnorr-signature-error-when-creating-child-inscriptions-in-taproot-transactions/feed/ 0 18392