• About
  • Privacy Poilicy
  • Disclaimer
  • Contact
CoinInsight
  • Home
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Ripple
  • Future of Crypto
  • Crypto Mining
No Result
View All Result
  • Home
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Ripple
  • Future of Crypto
  • Crypto Mining
No Result
View All Result
CoinInsight
No Result
View All Result
Home Bitcoin

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

Coininsight by Coininsight
April 3, 2025
in Bitcoin
0
bitcoin core – Redeem script Signature should be zero for failed CHECK(MULTI)SIG operation error
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


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

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

It really works when the expression is true resulting in execute IF’s statements, that means the primary signature is matched. Nevertheless, when the primary signature does not match the general public key, as an alternative of executing ELSE’s statements the positioning returns :

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

Nevertheless, VerifyScript(txin.scriptSig, (txin_scriptPubKey), tx, 0, (SCRIPT_VERIFY_P2SH,)) does not throw an error.
Additionally, that is how signature is generated:

def create_OP_CHECKSIG_signature(tx, txin_scriptPubKey, seckey):
    
    sighash = SignatureHash(txin_scriptPubKey, tx, 0, SIGHASH_ALL)
    signature = seckey.signal(sighash) + bytes([SIGHASH_ALL])
    return signature
#utilization
sig = create_OP_CHECKSIG_signature(tx, redeemscript, my_private_key)

Any assistance is appreciated.

Related articles

MEXC Launches Canton 0-Fee Carnival with $1M Prize Pool

October 31, 2026

SEC Charges Two Companies In $130 Million Crypto Trading Scheme

October 30, 2026


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

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

It really works when the expression is true resulting in execute IF’s statements, that means the primary signature is matched. Nevertheless, when the primary signature does not match the general public key, as an alternative of executing ELSE’s statements the positioning returns :

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

Nevertheless, VerifyScript(txin.scriptSig, (txin_scriptPubKey), tx, 0, (SCRIPT_VERIFY_P2SH,)) does not throw an error.
Additionally, that is how signature is generated:

def create_OP_CHECKSIG_signature(tx, txin_scriptPubKey, seckey):
    
    sighash = SignatureHash(txin_scriptPubKey, tx, 0, SIGHASH_ALL)
    signature = seckey.signal(sighash) + bytes([SIGHASH_ALL])
    return signature
#utilization
sig = create_OP_CHECKSIG_signature(tx, redeemscript, my_private_key)

Any assistance is appreciated.

Tags: BitcoinCHECKMULTISIGcore..errorFailedoperationRedeemscriptsignature
Share76Tweet47

Related Posts

MEXC Launches Canton 0-Fee Carnival with $1M Prize Pool

by Coininsight
October 31, 2026
0

Reason to trust Strict editorial policy that focuses on accuracy, relevance, and impartiality Created by industry experts and meticulously reviewed...

SEC Charges Two Companies In $130 Million Crypto Trading Scheme

by Coininsight
October 30, 2026
0

The Securities and Exchange Commission charged two foreign-operated, Colorado-incorporated companies with running a crypto investment fraud that used false federal...

Binance Hack Sparks $1.5B Liquidation Massacre Throughout Crypto

Binance Hack Sparks $1.5B Liquidation Massacre Throughout Crypto

by Coininsight
October 30, 2026
0

Key TakeawaysBinance confirmed a $6.3 billion hack, with investigators tracing the breach to a compromised worker laptop computer.Bitcoin plunged to...

Ultimate Guide on Crypto Bridges in 2026: 12 Leading Cross-Chain Protocols

by Coininsight
October 29, 2026
0

Key Takeaways Cross-chain protocols let users transfer digital assets and messages between different blockchain networks.  These platforms solve the fragmentation...

CFTC Sues Utah to Block Gambling Crackdown on Kalshi

by Coininsight
October 29, 2026
0

The Commodity Futures Trading Commission, joined by the Justice Department, sued the State of Utah and Attorney General Derek Brown...

Load More
  • Trending
  • Comments
  • Latest
What’s Actually Going On With Ripple’s Blockchain?

What’s Actually Going On With Ripple’s Blockchain?

January 12, 2026
MetaMask Launches An NFT Reward Program – Right here’s Extra Data..

MetaMask Launches An NFT Reward Program – Right here’s Extra Data..

July 24, 2025
Finest Bitaxe Gamma 601 Overclock Settings & Tuning Information

Finest Bitaxe Gamma 601 Overclock Settings & Tuning Information

November 26, 2025

Grantee Roundup: November 2020 | Ethereum Foundation Blog

September 28, 2026
Kuwait bans Bitcoin mining over power issues and authorized violations

Kuwait bans Bitcoin mining over power issues and authorized violations

2
The Ethereum Basis’s Imaginative and prescient | Ethereum Basis Weblog

The Ethereum Basis’s Imaginative and prescient | Ethereum Basis Weblog

2
Unchained Launches Multi-Million Greenback Bitcoin Legacy Mission

Unchained Launches Multi-Million Greenback Bitcoin Legacy Mission

1
Earnings Preview: Microsoft anticipated to report larger Q3 income, revenue

Earnings Preview: Microsoft anticipated to report larger Q3 income, revenue

1

Bitcoin mining difficulty hits 148 trillion as revenues fall to three-month lows

October 31, 2026

AI Certification for Business Leaders: What Should You Actually Learn?

October 31, 2026

MEXC Launches Canton 0-Fee Carnival with $1M Prize Pool

October 31, 2026

Compliance Program Handoff Checklist| Harbor Compliance BlogHarbor Compliance Blog

October 30, 2026

CoinInight

Welcome to CoinInsight.co.uk – your trusted source for all things cryptocurrency! We are passionate about educating and informing our audience on the rapidly evolving world of digital assets, blockchain technology, and the future of finance.

Categories

  • Bitcoin
  • Blockchain
  • Crypto Mining
  • Ethereum
  • Future of Crypto
  • Market
  • Regulation
  • Ripple

Recent News

Bitcoin mining difficulty hits 148 trillion as revenues fall to three-month lows

October 31, 2026

AI Certification for Business Leaders: What Should You Actually Learn?

October 31, 2026
  • About
  • Privacy Poilicy
  • Disclaimer
  • Contact

© 2025- https://coininsight.co.uk/ - All Rights Reserved

No Result
View All Result
  • Home
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Ripple
  • Future of Crypto
  • Crypto Mining

© 2025- https://coininsight.co.uk/ - All Rights Reserved

Social Media Auto Publish Powered By : XYZScripts.com
Verified by MonsterInsights