• 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

CLARITY Act Delay Shows Crypto Market Structure Fight Is Not Over

July 27, 2026

Investment Giant Fidelity Backs Clarity Act

July 27, 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

CLARITY Act Delay Shows Crypto Market Structure Fight Is Not Over

by Coininsight
July 27, 2026
0

The CLARITY Act appears unlikely to move through the Senate before the August recess, slowing the crypto market structure push...

Investment Giant Fidelity Backs Clarity Act

by Coininsight
July 27, 2026
0

Investment giant Fidelity is the latest big player to back the latest version of the long-awaited Clarity Act.  The Boston-based...

AI Giants Unleash 4 Frontier Models in 3 Weeks as the Race Enters Overdrive

by Coininsight
July 26, 2026
0

Key TakeawaysxAI shipped Grok 4.5 on July 8 at $2/$6 per million tokens, undercutting Opus 4.8 pricing by over 60%.Anthropic...

CASINO GROUPS ON THE ADVANTAGES OF STABLECOINS IN ONLINE GAMBLING

CASINO GROUPS ON THE ADVANTAGES OF STABLECOINS IN ONLINE GAMBLING

by Coininsight
July 26, 2026
0

On-line playing has been slowly adopting cryptos since round 2011, with digital cash first getting accepted at cube and poker...

bitcoin core – How do I arrange my very own customized signet?

bitcoin core – How do I arrange my very own customized signet?

by Coininsight
July 26, 2026
0

Configuration: a Home windows machine on an area WiFi community. For classroom functions I wish to have a customized Signet...

Load More
  • Trending
  • Comments
  • Latest
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
Easy methods to Host a Storj Node – Setup, Earnings & Experiences

Easy methods to Host a Storj Node – Setup, Earnings & Experiences

March 11, 2025
BitHub 77-Bit token airdrop information

BitHub 77-Bit token airdrop information

February 6, 2025
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

Will this week bring more bad news for BP shareholders?

July 27, 2026

Geth v1.10.0 | Ethereum Foundation Blog

July 27, 2026

CLARITY Act Delay Shows Crypto Market Structure Fight Is Not Over

July 27, 2026

XRP ستهيمن على نظام البنوك في اليابان بنسبة 80٪.

July 27, 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

Will this week bring more bad news for BP shareholders?

July 27, 2026

Geth v1.10.0 | Ethereum Foundation Blog

July 27, 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