• 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

Ethena Brings USDe and sUSDe to TRON, Expanding Digital Dollar Access Across Its Stablecoin Ecosystem

September 13, 2026

You Helped Build the CLARITY Act, Now Vote for It – Bitcoin News

September 13, 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

Ethena Brings USDe and sUSDe to TRON, Expanding Digital Dollar Access Across Its Stablecoin Ecosystem

by Coininsight
September 13, 2026
0

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

You Helped Build the CLARITY Act, Now Vote for It – Bitcoin News

by Coininsight
September 13, 2026
0

Key TakeawaysLummis says Democrats got 100-plus CLARITY Act changes, but the Senate still needs 60 votes.Polymarket gives the CLARITY Act...

Earn Points Before the EXT Token Launch

by Coininsight
September 12, 2026
0

Disclaimer: Crypto airdrops are promotional events in which tokens are distributed to existing cryptocurrency holders or individuals who meet certain...

Coinbase, Moov Bring Stablecoin Payments to 1,000+ Banks

by Coininsight
September 12, 2026
0

Join Our Telegram channel to stay up to date on breaking news coverage Coinbase has partnered with payments provider Moov...

Bitcoin Custody: How CoinCorner Vault Works

Bitcoin Custody: How CoinCorner Vault Works

by Coininsight
September 12, 2026
0

CoinCorner and AnchorWatch have launched a retail Bitcoin custody product known as Vault. It costs holders 1.5% of their steadiness...

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
Easy methods to Host a Storj Node – Setup, Earnings & Experiences

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

March 11, 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

Ethena Brings USDe and sUSDe to TRON, Expanding Digital Dollar Access Across Its Stablecoin Ecosystem

September 13, 2026

Citadel Urges SEC Oversight of Equity Event Contracts

September 13, 2026

Why Harassment Training Requires Reinforcement

September 13, 2026

You Helped Build the CLARITY Act, Now Vote for It – Bitcoin News

September 13, 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

Ethena Brings USDe and sUSDe to TRON, Expanding Digital Dollar Access Across Its Stablecoin Ecosystem

September 13, 2026

Citadel Urges SEC Oversight of Equity Event Contracts

September 13, 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