Bitmime
You have not selected any currencies to display
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Cryptocurrency
    • Crypto Mining
  • Bitcoin
  • Ethereum
  • DeFi
  • Blockchain
  • Metaverse
No Result
View All Result
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Cryptocurrency
    • Crypto Mining
  • Bitcoin
  • Ethereum
  • DeFi
  • Blockchain
  • Metaverse
No Result
View All Result
Bitmime
No Result
View All Result
Home Bitcoin

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

Martin Spielberg by Martin Spielberg
April 4, 2025
in Bitcoin
0
bitcoin core – Redeem script Signature have to 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 would 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 have to be zero for failed CHECK(MULTI)SIG operation)

Nevertheless, VerifyScript(txin.scriptSig, (txin_scriptPubKey), tx, 0, (SCRIPT_VERIFY_P2SH,)) would 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

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

November 30, 2025
Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

November 30, 2025


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 would 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 have to be zero for failed CHECK(MULTI)SIG operation)

Nevertheless, VerifyScript(txin.scriptSig, (txin_scriptPubKey), tx, 0, (SCRIPT_VERIFY_P2SH,)) would 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: BitcoinCHECKMULTISIGcoreErrorfailedoperationRedeemscriptsignature
Share76Tweet47

Related Posts

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

by Martin Spielberg
November 30, 2025
0

It’s the weekend once more, and in as we speak’s crypto replace, the broader market stays oversold with the Worry...

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

by Martin Spielberg
November 30, 2025
0

Trusted Editorial content material, reviewed by main business specialists and seasoned editors. Advert Disclosure The pathway to buying Bitcoin and...

Bitcoin Value Stays Above $90K — How Lengthy Can It Maintain On?

Bitcoin Value Stays Above $90K — How Lengthy Can It Maintain On?

by Martin Spielberg
November 29, 2025
0

Over the previous week, the Bitcoin worth had its greatest efficiency for the reason that notorious October 10 downturn, which...

DMND Pool Now Open To All Miners, With SOC 2 Compliance And Stratum V2 Assist

DMND Pool Now Open To All Miners, With SOC 2 Compliance And Stratum V2 Assist

by Martin Spielberg
November 29, 2025
0

DMND, a brand new mining pool constructed round Stratum V2 which started taking candidates for a gentle personal launch earlier...

Steerage for newbie making an attempt to fetch information on Blockchain

Steerage for newbie making an attempt to fetch information on Blockchain

by Martin Spielberg
November 28, 2025
0

I'd actually recognize your skilled's steering on just a little mission I want to get going. The concept could be...

Load More
  • Trending
  • Comments
  • Latest
Alchemy Quietly Buys NFT Launchpad HeyMint – Right here’s Extra data

Alchemy Quietly Buys NFT Launchpad HeyMint – Right here’s Extra data

May 25, 2025
BitHub 77-Bit token airdrop information

BitHub 77-Bit token airdrop information

January 15, 2025
Volatility Shares debuts first 1x XRP futures ETF for US buyers

Volatility Shares debuts first 1x XRP futures ETF for US buyers

May 26, 2025
Texas football’s rivalry matchup with Texas A&M

Texas football’s rivalry matchup with Texas A&M

May 9, 2025
6 Methods Web3 Is Altering On-line Communities

6 Methods Web3 Is Altering On-line Communities

1
Dogecoin (DOGE) Eyes $0.50 Once more: Is a New Rally on the Horizon?

Dogecoin (DOGE) Eyes $0.50 Once more: Is a New Rally on the Horizon?

0
Binance Pool Introduces Merged Mining with Fractal Bitcoin (FB) Rewards

Binance Pool Introduces Merged Mining with Fractal Bitcoin (FB) Rewards

0
Are Retail Buyers Behind The Bitcoin Worth Surge This Bull Run?

Are Retail Buyers Behind The Bitcoin Worth Surge This Bull Run?

0
Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm

November 30, 2025
Crypto Holders Warned as UK Finances Confirms Platforms Will Observe Features

Crypto Holders Warned as UK Finances Confirms Platforms Will Observe Features

November 30, 2025
UK Launches Tax Crackdown On Resident Crypto Transactions

UK Launches Tax Crackdown On Resident Crypto Transactions

November 30, 2025
Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

Shopping for Bitcoin Will get An Improve As Apple Pay Joins The Crypto Wave

November 30, 2025

About Us

Welcome to Bitmime.com, your go-to destination for the latest and most reliable news from the world of cryptocurrency, blockchain, and decentralized finance.

Categories

  • Bitcoin
  • Blockchain
  • Crypto Mining
  • Cryptocurrency
  • DeFi
  • Ethereum
  • Metaverse
  • Uncategorized

Recent Posts

  • Weekend Crypto Replace: $100k BTC Narrative Nonetheless Alive, Cathie Wooden & Tom Lee Affirm
  • Crypto Holders Warned as UK Finances Confirms Platforms Will Observe Features
  • UK Launches Tax Crackdown On Resident Crypto Transactions
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

© 2024 bitmime.com. All rights reserved.

No Result
View All Result
  • Bitmime – Bitcoin, Ethereum, Crypto News and Market Analysis
  • Cryptocurrency
    • Crypto Mining
  • Bitcoin
  • Ethereum
  • DeFi
  • Blockchain
  • Metaverse

© 2024 bitmime.com. All rights reserved.