1

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.

0200000001b6a6018077d7e817c13074f4127a641a3225b44e56318ef61d2b746b0271e308000000006c527547304402205fa24c98406b9f18732a586a2d5a5cf8ed5e033afca89dda772963f87bff457d022020c796be2fd4c6c47733214293263e244828211a51f044872090e610d5e1e8820121024f29076388ac6ed18b281a149e88043be7e78f72e138f3498853d8918f7f5448ffffffff01606b042a010000001976a914f1edb261a91e7cb03737708d718b2c47b7aa5c8e88ac00000000

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 0.19.0.1

0

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.