signature – Transaction keep beeing rejected “non-mandatory-script-verify-flag”

on

|

views

and

comments


I’m developping Bitcoin integration for Microsoft Dynamics Business Central to offer enterprise capability to apply Bitcoin receivable and payable to accounting.

To send a transaction, I’m using NBitcoin C# lib to prepare and sign raw transaction data before broadcasting but I keep having bellow error on Main Net.

It is the most basic transaction with one input and one output.
Both addresses are P2SH.
The transaction signature verification pass correctly in NBitcoin but the node keep returning the error “Code: -26, Error: non-mandatory-script-verify-flag (Witness requires empty scriptSig)”.

Raw Transaction Data :
01000000000101701c2bcfe6bc56becaf1c58a45f57de5558107a3f1fdd51bb4a0c1ce27dff30a0900000017160014e38512a037ee9199b5dd5e7af4b928453b523cc2ffffffff01701101000000000016001425ce1fbd74537b45319cb0553deec89f4289430102473044022012e3cee7d952acf046e3e282162d1cb4e6ff954a01b19fba8d3606b63256c9eb022079099799cb58d3b45ca85c678336c802889fe7d6c18012c5a1509d1b54441492012103220927928080eecf1af164e3413ed6733cfc27172174683aecb3bd2041d06a0000000000

When I decode the transaction I see the witness on input correctly and the output adress look fine too.

If I try to send the same transaction but using P2WPKH address I’m having a different error : ‘non-mandatory-script-verify-flag (Script failed an OP_EQUALVERIFY operation)”‘

Could someone know whats wrong in my transaction ? Anyhow I’m pretty sure I’m just not passing the right parameter to the library but idk wich

Share this
Tags

Must-read

The Great Bitcoin Crash of 2024

Bitcoin Crash The cryptocurrency world faced the hell of early 2024 when the most popular Bitcoin crashed by over 80% in a matter of weeks,...

Bitcoin Gambling: A comprehensive guide in 2024

Bitcoin Gambling With online currencies rapidly gaining traditional acceptance, the intriguing convergence of the crypto-trek and gambling industries is taking place. Cryptocurrency gambling, which started...

The Rise of Bitcoin Extractor: A comprehensive guide 2024

Bitcoin Extractor  Crypto mining is resources-thirsty with investors in mining hardware and those investing in the resources needed as the main beneficiaries. In this sense,...

Recent articles

More like this