Close Menu
  • Home
  • Altcoin
  • Bitcoin
  • Crypto
  • Forex
  • Online Money
What's Hot

Utexo Raises $7.5M To Launch Bitcoin-Native USDT Settlement Infrastructure

March 8, 2026

Healthcare Firm Handing Out $11,000,000 After Cyberattack Exposes Patients’ Sensitive Information

March 8, 2026

Kalshi, approved by the Commodity Futures Trading Commission, was last valued at $11 billion, while Polymarket was valued at $9 billion.

March 7, 2026
Facebook X (Twitter) Instagram
  • Altcoin
  • Bitcoin
  • Crypto
  • Forex
  • Online Money
Facebook X (Twitter) Instagram
Cointelegraphe
  • Home
  • Altcoin
  • Bitcoin
  • Crypto
  • Forex
  • Online Money
Cointelegraphe
Home»Bitcoin»bitcoin core – Redeem script Signature must be zero for failed CHECK(MULTI)SIG operation error
bitcoin core – Redeem script Signature must be zero for failed CHECK(MULTI)SIG operation error
Bitcoin

bitcoin core – Redeem script Signature must be zero for failed CHECK(MULTI)SIG operation error

adminBy adminApril 2, 2025No Comments1 Min Read
Share
Facebook Twitter LinkedIn Pinterest Email


For the P2SH transaction, an example of the redeem script:

redeem_script = CScript([ OP_DUP, my_private_key.pub, OP_CHECKSIG, 
  OP_IF, 
    OP_DROP, OP_0, OP_SWAP, OP_1, k1, k2, k3, OP_3, OP_CHECKMULTISIG, 
  OP_ELSE, 
    OP_DROP,OP_DROP,OP_1,OP_ENDIF 
])

It works when the expression is true leading to execute IF’s statements, meaning the first signature is matched. However, when the first signature doesn’t match the public key, instead of executing ELSE’s statements the site returns :

sendrawtransaction RPC error -26: non-mandatory-script-verify-flag
(Signature must be zero for failed CHECK(MULTI)SIG operation)

However, VerifyScript(txin.scriptSig, (txin_scriptPubKey), tx, 0, (SCRIPT_VERIFY_P2SH,)) doesn’t throw an error.
Also, this is how signature is generated:

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.



Source link

bitcoin CHECKMULTISIG Core Error failed operation Redeem script signature
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
admin
  • Website

Related Posts

Utexo Raises $7.5M To Launch Bitcoin-Native USDT Settlement Infrastructure

March 8, 2026

Kalshi, approved by the Commodity Futures Trading Commission, was last valued at $11 billion, while Polymarket was valued at $9 billion.

March 7, 2026

Remote isn’t a perk. It’s how Kraken operates.

March 6, 2026

Bitcoin Spot Market Strength Builds as War Intensifies

March 5, 2026
Add A Comment
Leave A Reply Cancel Reply

Top Insights

Utexo Raises $7.5M To Launch Bitcoin-Native USDT Settlement Infrastructure

March 8, 2026

Healthcare Firm Handing Out $11,000,000 After Cyberattack Exposes Patients’ Sensitive Information

March 8, 2026

Kalshi, approved by the Commodity Futures Trading Commission, was last valued at $11 billion, while Polymarket was valued at $9 billion.

March 7, 2026

The Power of The Pull Back Trading Strategy » Learn To Trade The Market

March 7, 2026
ads

Subscribe to Updates

Get the latest creative news from Cointelegraphe about Crypto, bItcoin and Altcoin.

About Us
About Us

At CoinTelegraphe, we are dedicated to bringing you the latest and most insightful news, analysis, and updates from the dynamic world of cryptocurrency. Our mission is to provide our readers with accurate, timely, and comprehensive information to help them navigate the complexities of the crypto market.

Facebook X (Twitter) Instagram Pinterest YouTube
Top Insights

Utexo Raises $7.5M To Launch Bitcoin-Native USDT Settlement Infrastructure

March 8, 2026

Healthcare Firm Handing Out $11,000,000 After Cyberattack Exposes Patients’ Sensitive Information

March 8, 2026

Kalshi, approved by the Commodity Futures Trading Commission, was last valued at $11 billion, while Polymarket was valued at $9 billion.

March 7, 2026
Get Informed

Subscribe to Updates

Get the latest creative news from Cointelegraphe about Crypto, bItcoin and Altcoin.

Please enable JavaScript in your browser to complete this form.
Loading
  • About us
  • Contact Us
  • Shop
  • Privacy Policy
  • Terms and Conditions
Copyright 2024 Cointelegraphe Design By Horaam Sultan.

Type above and press Enter to search. Press Esc to cancel.