I create a transaction in regtest without send it, I have transaction data signed. I modified a little bit the scriptSig in order to replicate transaction malleability, I add two operations (2 OP_DROP) and increase the scriptSig length from 6A to 6C.

this is my final result.


When I try to send rawtransaction I receive this message:

error code: -26
error message:
scriptsig-not-pushonly (code 64).

I'm using bitcoin-core


One of the standardness rules (relay rules) in Bitcoin Core is that the scriptSig must contain only operations that push data to the stack. Since you have actual opcodes that do non-push things, this transaction is non-standard so your node is not accepting it.

On regtest, you can disable standardness checks by adding -acceptnonstdtxn to your startup command.

|improve this answer|||||
  • Thanks for reply. The similar transaction (with same procedure) works on testnet in the same node without use acceptnonstdtxn. – monkeyUser Jan 17 at 8:35
  • Tests (bitcoin.org/en/release/v0.19.0.1#miscellaneous-cli-changes) The regression test chain enabled by the -regtest command line flag now requires transactions to not violate standard policy by default. This is the same default used for mainnet and makes it easier to test mainnet behavior on regtest. Note that the testnet still allows non-standard txs by default and that the policy can be locally adjusted with the -acceptnonstdtxn command line flag for both test chains. (#15891) – monkeyUser Jan 17 at 11:11
  • 1
    Yes, that is expected behavior. Testnet defaults to -acceptnonstdtxn=1 while both mainnet and regtest default to -acceptnonstdtxn=0. On mainnet, this cannot be changed, but on regtest, it can. – Andrew Chow Jan 17 at 13:14
  • thanks for your time – monkeyUser Jan 17 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.