You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User kralverde reported being able to send (and have mined) a 256-byte OP_RETURN transaction.
That is ok because he was on testnet. Nonstandard transactions are allowed on testnet and regtest (but not on mainnet).
However, this occurence highlighted the fact that it is difficult to properly test mainnet behavior using testnet or regtest.
There is a CLI switch option "-acceptnonstdtxn" (which reveals itself only when executing "raven-qt --help -help-debug) which is intended to determine raven-qt behavior. There is also a parameter "fRequireStandard" in "chainparams.cpp" for each chain, which is intended to restrict whether that CLI switch option is allowed for that chain.
However, as currently coded, the logic for the option switch is broken because it allows nonstandard transactions on a chain only if that is already the default behavior for that chain, and disallows it otherwise.
Since the "fRequireStandard" values in "chainparams.cpp" are fixed at mainnet:true, testnet:false, regtest:false, those serve to hard-code whether that chain rejects nonstandard transactions.
A very simple code change can be made to change the behavior so that all chains default to rejecting nonstandard transactions, while allowing the "-acceptnonstdtxn" switch to change that behavior on testnet and regtest (but not mainnet).
Note that bitcoin has also fixed the "-acceptnonstdtxn" switch in their PR#15891, but in a more complicated way and with different results.
The text was updated successfully, but these errors were encountered:
User kralverde reported being able to send (and have mined) a 256-byte OP_RETURN transaction.
That is ok because he was on testnet. Nonstandard transactions are allowed on testnet and regtest (but not on mainnet).
However, this occurence highlighted the fact that it is difficult to properly test mainnet behavior using testnet or regtest.
There is a CLI switch option "-acceptnonstdtxn" (which reveals itself only when executing "raven-qt --help -help-debug) which is intended to determine raven-qt behavior. There is also a parameter "fRequireStandard" in "chainparams.cpp" for each chain, which is intended to restrict whether that CLI switch option is allowed for that chain.
However, as currently coded, the logic for the option switch is broken because it allows nonstandard transactions on a chain only if that is already the default behavior for that chain, and disallows it otherwise.
Since the "fRequireStandard" values in "chainparams.cpp" are fixed at mainnet:true, testnet:false, regtest:false, those serve to hard-code whether that chain rejects nonstandard transactions.
A very simple code change can be made to change the behavior so that all chains default to rejecting nonstandard transactions, while allowing the "-acceptnonstdtxn" switch to change that behavior on testnet and regtest (but not mainnet).
Note that bitcoin has also fixed the "-acceptnonstdtxn" switch in their PR#15891, but in a more complicated way and with different results.
The text was updated successfully, but these errors were encountered: