• 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

transaction weight – Is it a bug that `OP_IF` is a part of the Tapscript opcodes?

transaction weight – Is it a bug that `OP_IF` is a part of the Tapscript opcodes?

June 9, 2026
Why Is Wall Avenue Already Shopping for Again In?

Why Is Wall Avenue Already Shopping for Again In?

June 8, 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

transaction weight – Is it a bug that `OP_IF` is a part of the Tapscript opcodes?

transaction weight – Is it a bug that `OP_IF` is a part of the Tapscript opcodes?

by Coininsight
June 9, 2026
0

It's at all times potential to precise spending circumstances of their disjunctive regular type, that's as a top-level "OR" of...

Why Is Wall Avenue Already Shopping for Again In?

Why Is Wall Avenue Already Shopping for Again In?

by Coininsight
June 8, 2026
0

Bitcoin ETF Information: U.S. spot Bitcoin ETF merchandise simply ended a report 13-day outflow streak on June 4, 2026, after...

Yuga Labs Simply Pulled Off A $500,000 Crypto Heist — Towards These Hackers

Yuga Labs Simply Pulled Off A $500,000 Crypto Heist — Towards These Hackers

by Coininsight
June 8, 2026
0

Trusted Editorial content material, reviewed by main business specialists and seasoned editors. Advert Disclosure Yuga Labs, the corporate behind Bored...

Cardano Crash Exposes ADA’s Deeper Downside, Says Longtime Bull

Cardano Crash Exposes ADA’s Deeper Downside, Says Longtime Bull

by Coininsight
June 8, 2026
0

Longtime Cardano supporter and crypto commentator Dan Gambardello mentioned ADA’s steep decline has uncovered deeper frustrations contained in the Cardano...

Bitcoin’s Pullback Exams Institutional Adoption Narrative As Pompliano Stays Bullish

Bitcoin’s Pullback Exams Institutional Adoption Narrative As Pompliano Stays Bullish

by Coininsight
June 7, 2026
0

Bitcoin’s latest value decline is testing one of many asset’s most distinguished bullish narratives: that institutional adoption will stabilize volatility...

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
Highway to Devcon Meetup and Occasion Grants

Highway to Devcon Meetup and Occasion Grants

June 9, 2026
AI Authorized Drafting Instruments Like Harvey Rework Legislation Practices

AI Authorized Drafting Instruments Like Harvey Rework Legislation Practices

June 9, 2026
transaction weight – Is it a bug that `OP_IF` is a part of the Tapscript opcodes?

transaction weight – Is it a bug that `OP_IF` is a part of the Tapscript opcodes?

June 9, 2026
Wish to get wealthy on passive earnings? Listed below are some errors to keep away from

Wish to get wealthy on passive earnings? Listed below are some errors to keep away from

June 9, 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

Highway to Devcon Meetup and Occasion Grants

Highway to Devcon Meetup and Occasion Grants

June 9, 2026
AI Authorized Drafting Instruments Like Harvey Rework Legislation Practices

AI Authorized Drafting Instruments Like Harvey Rework Legislation Practices

June 9, 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